From: Janusz Dobrowolski Date: Sun, 13 Feb 2011 08:55:37 +0000 (+0000) Subject: Fixed credit processing errors handling. X-Git-Tag: 2.3-final~800 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=8d714fab3ec1b97b645cf879a6bfd5ee174d05c8;p=fa-stable.git Fixed credit processing errors handling. --- diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index a88cdabe..24f70ce6 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -204,11 +204,13 @@ 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 ($new_credit) { - meta_forward($_SERVER['PHP_SELF'], "AddedID=$credit_no"); - } else { - meta_forward($_SERVER['PHP_SELF'], "UpdatedID=$credit_no"); + if($credit_no) { + processing_end(); + if ($new_credit) { + meta_forward($_SERVER['PHP_SELF'], "AddedID=$credit_no"); + } else { + meta_forward($_SERVER['PHP_SELF'], "UpdatedID=$credit_no"); + } } }