From 0b7e7702671a2b2f117263a6ac7d5fef2eddff0e Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 6 Jun 2010 21:45:51 +0000 Subject: [PATCH] Small bug on final screen redirection. --- sales/customer_credit_invoice.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index 5d6a3dbd..a3c9ae4d 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -206,7 +206,7 @@ function copy_from_cart() if (isset($_POST['ProcessCredit']) && can_process()) { - $newcredit = ($_SESSION['Items']->trans_no == 0); + $new_credit = ($_SESSION['Items']->trans_no == 0); if (!isset($_POST['WriteOffGLCode'])) $_POST['WriteOffGLCode'] = 0; @@ -215,8 +215,8 @@ if (isset($_POST['ProcessCredit']) && can_process()) { if ($new_credit) new_doc_date($_SESSION['Items']->document_date); $credit_no = $_SESSION['Items']->write($_POST['WriteOffGLCode']); - processing_end(); - if ($newcredit) { + processing_end();exit; + if ($new_credit) { meta_forward($_SERVER['PHP_SELF'], "AddedID=$credit_no"); } else { meta_forward($_SERVER['PHP_SELF'], "UpdatedID=$credit_no"); -- 2.30.2