Removed finally unimplemented freight cost field in Purchasing.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 20 Jul 2019 12:55:14 +0000 (14:55 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 19 Aug 2019 10:41:58 +0000 (12:41 +0200)
purchasing/includes/po_class.inc
purchasing/includes/ui/po_ui.inc
purchasing/po_receive_items.php

index df485f00cb543e0a880afe6b5007bfc32fe60bf6..7db50351e79fde1942bb2cf9e6129012fce237c6 100644 (file)
@@ -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
index 34252f3427a325df1302e5ec08a2986b195e02c9..3dd64c62d23720b4d586335897d8cad69ab393ef 100644 (file)
@@ -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'");
index 36bb7ca04cc76c7a56fe84c554b7f40b0ee6444f..84eb79fe1157b2386563d14902ea22766720aabe 100644 (file)
@@ -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'");