Fixes in sales reports to use debtor_trans.tax_included field instead of trans_tax_de...
[fa-stable.git] / sales / includes / sales_ui.inc
index 56e4746e60f56caae919492fec9418a4f0000de2..49232d81a8a3ca926f89ad1b3dcf1b2920a74a7a 100644 (file)
@@ -1,5 +1,14 @@
 <?php
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
 include_once($path_to_root . "/includes/date_functions.inc");
 
 include_once($path_to_root . "/includes/ui.inc");
@@ -10,12 +19,14 @@ include_once($path_to_root . "/includes/banking.inc");
 //
 function processing_start()
 {
+       page_processing(false);
     processing_end();
     $_SESSION['Processing'] = $_SERVER['PHP_SELF'];
 }
 
 function processing_end()
 {
+       page_processing(true);
     unset($_SESSION['Processing']);
     if ( isset($_SESSION['Items']) ) {
                unset($_SESSION['Items']->line_items);
@@ -34,8 +45,8 @@ function processing_active()
 function check_edit_conflicts($cartname='Items')
 {
        global $Ajax;
-       
-       if (isset($_POST['cart_id']) && $_POST['cart_id'] != $_SESSION[$cartname]->cart_id) {
+
+       if (get_post('cart_id') && $_POST['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();