X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_credit_invoice.php;h=e482386b971a7f9f14998fca9fd46cc814b75e6b;hb=3d439a337e0115e35a6e2ba28434602a418ebaa5;hp=5713a9a2c1e3cc73cd44827f6543d1c1c5e2ca1f;hpb=17b390efcf904072b02ec866b2a427490471a260;p=fa-stable.git diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index 5713a9a2..e482386b 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -20,7 +20,6 @@ $path_to_root = ".."; include_once($path_to_root . "/sales/includes/cart_class.inc"); include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/data_checks.inc"); -include_once($path_to_root . "/includes/manufacturing.inc"); include_once($path_to_root . "/sales/includes/sales_db.inc"); include_once($path_to_root . "/sales/includes/sales_ui.inc"); include_once($path_to_root . "/reporting/includes/reporting.inc"); @@ -88,7 +87,7 @@ function can_process() global $Refs; if (!is_date($_POST['CreditDate'])) { - display_error(_("The entered date is invalid."));; + display_error(_("The entered date is invalid.")); set_focus('CreditDate'); return false; } elseif (!is_date_in_fiscalyear($_POST['CreditDate'])) { @@ -98,15 +97,15 @@ function can_process() } if ($_SESSION['Items']->trans_no==0) { - if (!$Refs->is_valid($_POST['ref'])) { - display_error(_("You must enter a reference."));; + if (!$Refs->is_valid($_POST['ref'], ST_CUSTCREDIT)) { + display_error(_("You must enter a reference.")); set_focus('ref'); return false; } } if (!check_num('ChargeFreightCost', 0)) { - display_error(_("The entered shipping cost is invalid or less than zero."));; + display_error(_("The entered shipping cost is invalid or less than zero.")); set_focus('ChargeFreightCost'); return false; } @@ -238,11 +237,11 @@ function display_credit_items() end_row(); start_row(); -// if (!isset($_POST['ref'])) -// $_POST['ref'] = $Refs->get_next(11); - if ($_SESSION['Items']->trans_no==0) { - ref_cells(_("Reference"), 'ref', '', null, "class='tableheader2'"); + ref_cells(_("Reference"), 'ref', '', null, "class='tableheader2'", false, ST_CUSTCREDIT, + array('customer' => $_SESSION['Items']->customer_id, + 'branch' => $_SESSION['Items']->Branch, + 'date' => get_post('CreditDate'))); } else { label_cells(_("Reference"), $_SESSION['Items']->reference, "class='tableheader2'"); } @@ -253,10 +252,6 @@ function display_credit_items() } label_cell(_("Shipping Company"), "class='tableheader2'"); shippers_list_cells(null, 'ShipperID', $_POST['ShipperID']); -// if (!isset($_POST['sales_type_id'])) -// $_POST['sales_type_id'] = $_SESSION['Items']->sales_type; -// label_cell(_("Sales Type"), "class='tableheader2'"); -// sales_types_list_cells(null, 'sales_type_id', $_POST['sales_type_id']); end_row(); end_table();