Topic: Invalid Edit Session error and fix
When we first login to FA, there is no $_SESSION[$cartname] available.
When we then choose Sales => Direct Sales Invoice and then we change the payment terms first we get the error:
This edit session has been abandoned by opening sales document in another browser tab. You cannot edit more than one sales document at once.
The fix is to change line 49 in sales/includes/sales_ui.inc:
if ((!isset($SysPrefs->no_check_edit_conflicts) || $SysPrefs->no_check_edit_conflicts==0) && $cart_id && $cart_id != $_SESSION[$cartname]->cart_id) {
to
if ((!isset($SysPrefs->no_check_edit_conflicts) || $SysPrefs->no_check_edit_conflicts==0) && $cart_id && isset($_SESSION[$cartname]) && $cart_id != $_SESSION[$cartname]->cart_id) {