3 include_once($path_to_root . "/includes/date_functions.inc");
5 include_once($path_to_root . "/includes/ui.inc");
6 include_once($path_to_root . "/includes/banking.inc");
8 //----------------------------------------------------------------------------
9 // helper functions for script execution control
11 function processing_start()
14 $_SESSION['Processing'] = $_SERVER['PHP_SELF'];
17 function processing_end()
19 unset($_SESSION['Processing']);
20 if ( isset($_SESSION['Items']) ) {
21 unset($_SESSION['Items']->line_items);
22 unset($_SESSION['Items']);
26 function processing_active()
28 return (isset($_SESSION['Processing']) && $_SESSION['Processing']==$_SERVER['PHP_SELF']);
31 Check if the cart was not destroyed during opening the edition page in
34 function check_edit_conflicts($cartname='Items')
38 if (isset($_POST['cart_id']) && $_POST['cart_id'] != $_SESSION[$cartname]->cart_id) {
39 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.'));
40 $Ajax->activate('_page_body');
41 display_footer_exit();