}
else {
$order_no = $_GET['InvoicePrepayments'];
- $payments = get_payments_for($_GET['InvoicePrepayments'], ST_SALESORDER);
}
processing_start();
- $_SESSION['Items'] = new Cart(ST_SALESORDER, $order_no, ST_SALESINVOICE);
+ $_SESSION['Items'] = new cart(ST_SALESORDER, $order_no, ST_SALESINVOICE);
$_SESSION['Items']->order_no = $order_no;
$_SESSION['Items']->src_docs = array($order_no);
$_SESSION['Items']->trans_no = 0;
$_SESSION['Items']->trans_type = ST_SALESINVOICE;
- $_SESSION['Items']->prepayments = $payments;
+
$_SESSION['Items']->update_payments();
copy_from_cart();
if (!isset($_POST['ship_via'])) {
$_POST['ship_via'] = $_SESSION['Items']->ship_via;
}
-label_cell(_("Shipping Company"), "class='tableheader2'");
+label_cell(_("Shipping"), "class='tableheader2'");
if ($prepaid)
{
- $shipper = get_shipper($_SESSION['Items']->ship_via);
- label_cells(null, $shipper['shipper_name']);
+ $shipping = get_item($_SESSION['Items']->ship_via);
+ label_cells(null, $shipping['description']);
} else
- shippers_list_cells(null, 'ship_via', $_POST['ship_via']);
+ shipping_methods_list_cells(null, 'ship_via', $_POST['ship_via']);
if (!isset($_POST['InvoiceDate']) || !is_date($_POST['InvoiceDate'])) {
$_POST['InvoiceDate'] = new_doc_date();