X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=purchasing%2Fincludes%2Fui%2Fpo_ui.inc;h=18093ceff59b4a351259f2c2750ec036b21771f0;hb=7e830126b96477e969fe3b48d9fc0e78f6c1fe00;hp=555737055066fcaa2dc2cda0388ba9031571d05a;hpb=9a98bb3bc7a94f1a8e47f8dab45a87c8b4212080;p=fa-stable.git diff --git a/purchasing/includes/ui/po_ui.inc b/purchasing/includes/ui/po_ui.inc index 55573705..18093cef 100644 --- a/purchasing/includes/ui/po_ui.inc +++ b/purchasing/includes/ui/po_ui.inc @@ -27,6 +27,7 @@ function copy_from_cart() $_POST['StkLocation'] = $cart->Location; $_POST['delivery_address'] = $cart->delivery_address; $_POST['tax_algorithm'] = $cart->tax_algorithm; + $_POST['prep_amount'] = price_format($cart->prep_amount); } function copy_to_cart() @@ -44,6 +45,7 @@ function copy_to_cart() $cart->delivery_address = $_POST['delivery_address']; if (isset($_POST['tax_algorithm'])) $cart->tax_algorithm = $_POST['tax_algorithm']; + $cart->prep_amount = input_num('prep_amount', 0); } // ------------------------------------------------------------------------------ @@ -353,6 +355,14 @@ function display_po_summary(&$po, $is_self=false, $editable=false) label_row(_("Delivery Address"), $po->delivery_address, "class='tableheader2'", "colspan=9"); + if (!$editable && ($po->prep_amount > 0)) + { + start_row(); + label_cells(_("Required Pre-Payment"), price_format($po->prep_amount), "class='tableheader2'"); + label_cells(_("Pre-Payments Allocated"), price_format($po->alloc), "class='tableheader2'"); + end_row(); + } + if ($po->Comments != "") label_row(_("Order Comments"), $po->Comments, "class='tableheader2'", "colspan=9"); @@ -462,6 +472,29 @@ function po_item_controls(&$order, &$rowcounter, $line_no=-1) //--------------------------------------------------------------------------------------------------- +function display_po_footer(&$trans) +{ + global $Ajax; + +start_table(TABLESTYLE2); + +if (list_updated('tax_algorithm')) { + $trans->tax_algorithm = $_POST['tax_algorithm']; + $Ajax->activate('items_table'); +} + +if ($trans->trans_type == ST_SUPPINVOICE) { + tax_algorithm_list_row(_("Tax algorithm:"), 'tax_algorithm', null, true); + cash_accounts_list_row(_("Payment:"), 'cash_account', null, false, _('Delayed')); +} elseif ($trans->trans_type == ST_PURCHORDER) + amount_row(_("Pre-Payment Required:"), 'prep_amount'); + +textarea_row(_("Memo:"), 'Comments', null, 70, 4); + +end_table(); +} +//--------------------------------------------------------------------------------------------------- + ?> \ No newline at end of file