X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=inline;f=sales%2Fincludes%2Fsales_ui.inc;h=378f336127fc3fe22d417cc954b1587abb785e90;hb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;hp=8e2048cf21eb69d608da3b6c73d7b05c360c3b70;hpb=960bbc5e344bce59854afae242a269dd6b54671b;p=fa-stable.git diff --git a/sales/includes/sales_ui.inc b/sales/includes/sales_ui.inc index 8e2048cf..378f3361 100644 --- a/sales/includes/sales_ui.inc +++ b/sales/includes/sales_ui.inc @@ -42,15 +42,14 @@ function processing_active() Check if the cart was not destroyed during opening the edition page in another browser tab. */ -function check_edit_conflicts($cartname='Items') +function check_edit_conflicts($cart_id, $cartname='Items') { - global $Ajax; - - if (isset($_POST['cart_id']) && $_POST['cart_id'] != $_SESSION[$cartname]->cart_id) { + global $Ajax, $no_check_edit_conflicts; + + if ((!isset($no_check_edit_conflicts) || $no_check_edit_conflicts==0) && get_post('cart_id') && $cart_id != $_SESSION[$cartname]->cart_id) { display_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.')); $Ajax->activate('_page_body'); display_footer_exit(); } } -?> \ No newline at end of file