X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_credit_invoice.php;h=24f70ce6b2c876b288cddd5833077ddb8c240615;hb=20d61f658e58584338364ce8ea86cc66d0dba8fd;hp=a88cdabed2aab5159d5070c458a9aa392b9bd28e;hpb=e0e9bd8bd00ee6d601be62991d5e59fe03d07f80;p=fa-stable.git 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"); + } } }