From 052d2ef59dfd71c239c163d9c9ace5f75f65ac01 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sat, 20 Jul 2019 14:55:14 +0200 Subject: [PATCH] Removed finally unimplemented freight cost field in Purchasing. --- purchasing/includes/po_class.inc | 7 ++----- purchasing/includes/ui/po_ui.inc | 4 ++-- purchasing/po_receive_items.php | 6 +++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/purchasing/includes/po_class.inc b/purchasing/includes/po_class.inc index df485f00..7db50351 100644 --- a/purchasing/includes/po_class.inc +++ b/purchasing/includes/po_class.inc @@ -138,20 +138,17 @@ class purch_order // // Returns taxes for PO/GRN. - // $receival=true in purchase receive context. // - function get_taxes($shipping_cost=null, $receival=false) + function get_taxes() { $items = array(); $prices = array(); - if($shipping_cost==null) - $shipping_cost = 0;//$this->freight_cost; foreach ($this->line_items as $ln_itm) { $items[] = $ln_itm->stock_id; $prices[] = round($ln_itm->price * $ln_itm->quantity, user_price_dec()); } - $taxes = get_tax_for_items($this->trans_type, $items, $prices, $shipping_cost, + $taxes = get_tax_for_items($this->trans_type, $items, $prices, 0, $this->tax_group_id, $this->tax_included); // Adjustment for swiss franken, we always have 5 rappen = 1/20 franken diff --git a/purchasing/includes/ui/po_ui.inc b/purchasing/includes/ui/po_ui.inc index 34252f34..3dd64c62 100644 --- a/purchasing/includes/ui/po_ui.inc +++ b/purchasing/includes/ui/po_ui.inc @@ -283,11 +283,11 @@ function display_po_items(&$order, $editable=true) label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right", 2); - $taxes = $order->get_taxes(input_num('freight_cost')); + $taxes = $order->get_taxes(); $tax_total = display_edit_tax_items($taxes, $colspan, $order->tax_included, 2, $order->trans_type==ST_SUPPINVOICE); - $display_total = price_format(($total + input_num('freight_cost') + $tax_total)); + $display_total = price_format(($total + $tax_total)); start_row(); label_cells(_("Amount Total"), $display_total, "colspan=$colspan align='right'","align='right'"); diff --git a/purchasing/po_receive_items.php b/purchasing/po_receive_items.php index 36bb7ca0..84eb79fe 100644 --- a/purchasing/po_receive_items.php +++ b/purchasing/po_receive_items.php @@ -142,14 +142,14 @@ function display_po_receive_items() $colspan = count($th)-1; - $display_sub_total = price_format($total/* + input_num('freight_cost')*/); + $display_sub_total = price_format($total); label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right"); - $taxes = $_SESSION['PO']->get_taxes(input_num('freight_cost'), true); + $taxes = $_SESSION['PO']->get_taxes(); $tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['PO']->tax_included); - $display_total = price_format(($total + input_num('freight_cost') + $tax_total)); + $display_total = price_format(($total + $tax_total)); start_row(); label_cells(_("Amount Total"), $display_total, "colspan=$colspan align='right'","align='right'"); -- 2.30.2