X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_credit_invoice.php;h=c46215389ae56f464bfe160dd5f60cf91cfae23f;hb=6ffe5f040543994725beaf9f8059c054919043d7;hp=c86f82b3dde26c2889dd8e7454fa41d8b9aab6cf;hpb=d9b4de9d7e9d3ba77f6ece752fd6cc988effd8f1;p=fa-stable.git diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index c86f82b3..c4621538 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -54,7 +54,8 @@ if (isset($_GET['AddedID'])) { display_note(get_customer_trans_view_str($trans_type, $credit_no, _("&View This Credit Note")), 0, 0); - display_note(print_document_link($credit_no, _("&Print This Credit Note"), true, $trans_type),1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Print This Credit Note"), true, $trans_type),1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Email This Credit Note"), true, $trans_type, false, "printlink", "", 1),1); display_note(get_gl_view_str($trans_type, $credit_no, _("View the GL &Journal Entries for this Credit Note")),1); @@ -68,7 +69,8 @@ if (isset($_GET['AddedID'])) { display_note(get_customer_trans_view_str($trans_type, $credit_no, _("&View This Credit Note")), 0, 0); - display_note(print_document_link($credit_no, _("&Print This Credit Note"), true, $trans_type),1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Print This Credit Note"), true, $trans_type),1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Email This Credit Note"), true, $trans_type, false, "printlink", "", 1),1); display_note(get_gl_view_str($trans_type, $credit_no, _("View the GL &Journal Entries for this Credit Note")),1); @@ -88,7 +90,7 @@ function can_process() set_focus('CreditDate'); return false; } elseif (!is_date_in_fiscalyear($_POST['CreditDate'])) { - display_error(_("The entered date is not in fiscal year.")); + display_error(_("The entered date is out of fiscal year or is closed for further data entry.")); set_focus('CreditDate'); return false; } @@ -140,6 +142,7 @@ if (isset($_GET['InvoiceNumber']) && $_GET['InvoiceNumber'] > 0) { } elseif ( isset($_GET['ModifyCredit']) && $_GET['ModifyCredit']>0) { + check_is_closed(ST_CUSTCREDIT,$_GET['ModifyCredit']); $_SESSION['Items'] = new Cart(ST_CUSTCREDIT,$_GET['ModifyCredit']); copy_from_cart(); @@ -206,7 +209,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; @@ -216,7 +219,7 @@ if (isset($_POST['ProcessCredit']) && can_process()) { $credit_no = $_SESSION['Items']->write($_POST['WriteOffGLCode']); processing_end(); - if ($newcredit) { + if ($new_credit) { meta_forward($_SERVER['PHP_SELF'], "AddedID=$credit_no"); } else { meta_forward($_SERVER['PHP_SELF'], "UpdatedID=$credit_no"); @@ -348,7 +351,7 @@ function display_credit_options() global $Ajax; br(); -i f (isset($_POST['_CreditType_update'])) + if (isset($_POST['_CreditType_update'])) $Ajax->activate('options'); div_start('options');