X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcustomer_credit_invoice.php;h=b19746120882e497d25503e7516ea0edb5395646;hb=d193828f0a27570074695bf92bf11e96d0fd817b;hp=4959c23c6ae515fbfd2952fb09d62696cded95af;hpb=d567a10b7925c8bb97c734e213d6651a979af29d;p=fa-stable.git diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index 4959c23c..b1974612 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -178,24 +178,27 @@ function check_quantities() function copy_to_cart() { - $cart = &$_SESSION['Items']; - $cart->ship_via = $_POST['ShipperID']; - $cart->freight_cost = input_num('ChargeFreightCost'); - $cart->document_date = $_POST['CreditDate']; - $cart->Location = $_POST['Location']; - $cart->Comments = $_POST['CreditText']; + $cart = &$_SESSION['Items']; + $cart->ship_via = $_POST['ShipperID']; + $cart->freight_cost = input_num('ChargeFreightCost'); + $cart->document_date = $_POST['CreditDate']; + $cart->Location = $_POST['Location']; + $cart->Comments = $_POST['CreditText']; + if ($_SESSION['Items']->trans_no == 0) + $cart->reference = $_POST['ref']; } //----------------------------------------------------------------------------- function copy_from_cart() { - $cart = &$_SESSION['Items']; - $_POST['ShipperID'] = $cart->ship_via; - $_POST['ChargeFreightCost'] = price_format($cart->freight_cost); - $_POST['CreditDate']= $cart->document_date; - $_POST['Location']= $cart->Location; - $_POST['CreditText']= $cart->Comments; - $_POST['cart_id'] = $cart->cart_id; + $cart = &$_SESSION['Items']; + $_POST['ShipperID'] = $cart->ship_via; + $_POST['ChargeFreightCost'] = price_format($cart->freight_cost); + $_POST['CreditDate']= $cart->document_date; + $_POST['Location']= $cart->Location; + $_POST['CreditText']= $cart->Comments; + $_POST['cart_id'] = $cart->cart_id; + $_POST['ref'] = $cart->reference; } //----------------------------------------------------------------------------- @@ -247,7 +250,7 @@ function display_credit_items() // $_POST['ref'] = references::get_next(11); if ($_SESSION['Items']->trans_no==0) { - ref_cells(_("Reference"), 'ref', '', $_SESSION['Items']->reference, "class='tableheader2'"); + ref_cells(_("Reference"), 'ref', '', null, "class='tableheader2'"); } else { label_cells(_("Reference"), $_SESSION['Items']->reference, "class='tableheader2'"); }