X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fincludes%2Fpo_class.inc;h=f9f75aacc027574db79d361e770ba2f2c3201d5c;hb=7010ff2972dfbc8be4e577bdeac6b8da7278b691;hp=b767e9ea9261f66e9ee64245c4f9067bae4bd475;hpb=da996b57bbeeb3e83c37526b3ae687b291ca6045;p=fa-stable.git diff --git a/purchasing/includes/po_class.inc b/purchasing/includes/po_class.inc index b767e9ea..f9f75aac 100644 --- a/purchasing/includes/po_class.inc +++ b/purchasing/includes/po_class.inc @@ -33,8 +33,10 @@ class purch_order var $tax_group_array = null; // saves db queries var $tax_included; // type of prices var $terms; - + var $ex_rate; + var $reference; + var $tax_overrides = array(); // array of taxes manually inserted during sales invoice entry (direct invoice) function purch_order() { @@ -55,7 +57,7 @@ class purch_order function add_to_order($line_no, $stock_id, $qty, $item_descr, $price, $uom, $req_del_date, $qty_inv, $qty_recd) { - if ($qty != 0 && isset($qty)) + if (isset($qty) && $qty != 0) { $this->line_items[$line_no] = new po_line_details($line_no, $stock_id, $item_descr, $qty, $price, $uom, $req_del_date, $qty_inv, $qty_recd); @@ -148,7 +150,11 @@ class purch_order $val = $taxes['1']['Value']; $val1 = (floatval((intval(round(($val*20),0)))/20)); $taxes['1']['Value'] = $val1; - } + } + foreach($this->tax_overrides as $id => $value) // add values entered manually + { + $taxes[$id]['Override'] = $value; + } return $taxes; }