X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_credit_invoice.php;h=af42db4c0378e497a870c5c8fb567cfb38c48e77;hb=9f832e8ab3c679ab67e5d086a99774dac58e004a;hp=7cf3856d0c50090755aff89816ad432935b2ef04;hpb=d1babda7c01b314d35fb89f2d195553b55936532;p=fa-stable.git diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index 7cf3856d..af42db4c 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -97,7 +97,7 @@ function can_process() } if ($_SESSION['Items']->trans_no==0) { - if (!$Refs->is_valid($_POST['ref'])) { + if (!$Refs->is_valid($_POST['ref'], ST_CUSTCREDIT)) { display_error(_("You must enter a reference."));; set_focus('ref'); return false; @@ -237,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'"); } @@ -252,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();