From: Janusz Dobrowolski Date: Tue, 19 Mar 2013 22:03:14 +0000 (+0100) Subject: Cleanup in Customer Payments (fixed blinking error msg during processing payment) X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=e40e8b32911dff0ef61f70a308dd32995004ee53;p=textcart.git Cleanup in Customer Payments (fixed blinking error msg during processing payment) --- diff --git a/sales/customer_payments.php b/sales/customer_payments.php index d437c37..d0a0ea8 100644 --- a/sales/customer_payments.php +++ b/sales/customer_payments.php @@ -252,6 +252,7 @@ if (get_post('AddPaymentItem') && can_process()) { new_doc_date($_POST['DateBanked']); + $new_pmt = !$_SESSION['alloc']->trans_no; //Chaitanya : 13-OCT-2011 - To support Edit feature $payment_no = write_customer_payment($_SESSION['alloc']->trans_no, $_POST['customer_id'], $_POST['BranchID'], $_POST['bank_account'], $_POST['DateBanked'], $_POST['ref'], @@ -259,13 +260,11 @@ if (get_post('AddPaymentItem') && can_process()) { $_SESSION['alloc']->trans_no = $payment_no; $_SESSION['alloc']->write(); - - unset($_POST); - unset($_SESSION); + unset($_SESSION['alloc']); //Chaitanya : 13-OCT-2011 - To support Edit feature //meta_forward($_SERVER['PHP_SELF'], "AddedID=$payment_no"); - meta_forward($_SERVER['PHP_SELF'], !$_SESSION['alloc']->trans_no ? "AddedID=$payment_no" : "UpdatedID=$payment_no"); + meta_forward($_SERVER['PHP_SELF'], $new_pmt ? "AddedID=$payment_no" : "UpdatedID=$payment_no"); } //----------------------------------------------------------------------------------------------