X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fsales_ui.inc;h=9a5cc40316485ed5679038d9b6ce59a69fc1fb2d;hb=3b06c6c4718610a408cae2e9b76c3134ca30b84c;hp=49232d81a8a3ca926f89ad1b3dcf1b2920a74a7a;hpb=b5290bacccd3388d097dc01a2c6a2762b9ee4e57;p=fa-stable.git diff --git a/sales/includes/sales_ui.inc b/sales/includes/sales_ui.inc index 49232d81..9a5cc403 100644 --- a/sales/includes/sales_ui.inc +++ b/sales/includes/sales_ui.inc @@ -42,11 +42,11 @@ 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; + global $Ajax, $no_check_edit_conflicts; - if (get_post('cart_id') && $_POST['cart_id'] != $_SESSION[$cartname]->cart_id) { + 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();