//
// 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
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'");
$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'");