X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fcart_class.inc;h=062d9bad732a49529f6b417d2af54dce4e625a9f;hb=9a98bb3bc7a94f1a8e47f8dab45a87c8b4212080;hp=cc7d15675b660a8437f6f08c7e8fbd94c0d6d58c;hpb=6dd72f4aebd5f2650c485e7e2b1a7326e9d6e384;p=fa-stable.git diff --git a/sales/includes/cart_class.inc b/sales/includes/cart_class.inc index cc7d1567..062d9bad 100644 --- a/sales/includes/cart_class.inc +++ b/sales/includes/cart_class.inc @@ -64,7 +64,9 @@ class cart var $tax_group_array = null; // saves db queries var $price_factor; // ditto for price calculations - var $pos; // user assigned POS (contains cash accont number/name) + var $pos; // user assigned POS + var $cash_account; + var $account_name; var $cash_discount; // not used as of FA 2.1 var $dimension_id; var $dimension2_id; @@ -75,8 +77,8 @@ class cart //------------------------------------------------------------------------- // // $trans_no==0 => open new/direct document - // $trans_no!=0 && $prep_child==false => update with parent constarints for reedition - // $trans_no!=0 && $prep_child==true => prepare for child doc entry + // $trans_no!=0 && $no_edit==false => update with parent constarints for reedition + // $trans_no!=0 && $no_edit==true => read only: for view, or later child doc entry // function Cart($type, $trans_no=0, $prep_child=false) { /*Constructor function initialises a new shopping cart */ @@ -241,7 +243,7 @@ class cart // Writing new/modified sales document to database. // Makes parent documents for direct delivery/invoice by recurent call. // $policy - 0 or 1: writeoff/return for IV, back order/cancel for DN - function write($policy=0) { + function write($policy=0) { begin_transaction(); // prevents partial database changes in case of direct delivery/invoice if (count($this->src_docs) == 0 && ($this->trans_type == ST_SALESINVOICE || $this->trans_type == ST_CUSTDELIVERY)) { // this is direct document - first add parent @@ -482,7 +484,7 @@ class cart function get_shipping_tax() { - $tax_items = get_shipping_tax_as_array(); + $tax_items = get_shipping_tax_as_array($this->tax_group_id); $tax_rate = 0; if ($tax_items != null) { foreach ($tax_items as $item_tax) {