X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fincludes%2Fpo_class.inc;h=0464c42b6fe73fdaa627f257be9d408f0e1a330f;hb=927ebef2443b6dda544056e33ec84b71d2bdb6c2;hp=c9ec00df2f32362d5ca993b480c1e699026266f4;hpb=90b3d069d96b99671af51726e2953352738abb75;p=fa-stable.git diff --git a/purchasing/includes/po_class.inc b/purchasing/includes/po_class.inc index c9ec00df..0464c42b 100644 --- a/purchasing/includes/po_class.inc +++ b/purchasing/includes/po_class.inc @@ -35,9 +35,16 @@ class purch_order var $tax_algorithm; var $stored_algorithm; // copy to find the change after invoice in processed var $terms; - + var $ex_rate; + var $cash_account; + var $reference; + var $tax_overrides = array(); // array of taxes manually inserted during sales invoice entry (direct invoice) + var $prep_amount = 0; // prepayment required + var $alloc; // sum of payments allocated + var $prepayments = array(); + function purch_order() { /*Constructor function initialises a new purchase order object */ @@ -58,7 +65,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); @@ -149,8 +156,13 @@ class purch_order // Adjustment for swiss franken, we always have 5 rappen = 1/20 franken if ($this->curr_code == 'CHF') { $val = $taxes['1']['Value']; - $taxes['1']['Value'] = (floatval((intval(round(($val*20),0)))/20)); - } + $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; } @@ -240,4 +252,3 @@ class po_line_details } } -?>