X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_payments.php;h=d0a0ea8b04e0038429615fdd88c108e1af5f68b2;hb=1e4cd218cd0b7e1093b4b63d6636f5360b3c7958;hp=d437c37336af53f67212975ea69ec7e1ba7dd5fc;hpb=ad0fdc78ec8ae2b67ef1b3a6d4f3393dba242310;p=fa-stable.git diff --git a/sales/customer_payments.php b/sales/customer_payments.php index d437c373..d0a0ea8b 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"); } //----------------------------------------------------------------------------------------------