X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fcart_class.inc;h=f388b54cac18e438ba4c17d63eb5db614642814c;hb=389721f442ea4dc96ba1cafd65919e717e0d8746;hp=1f54a613b487ef5f065ff1350010a4131187c00e;hpb=e1c22a904052bae141ace1ebdaaf2b81d9111139;p=fa-stable.git diff --git a/sales/includes/cart_class.inc b/sales/includes/cart_class.inc index 1f54a613..f388b54c 100644 --- a/sales/includes/cart_class.inc +++ b/sales/includes/cart_class.inc @@ -1,13 +1,13 @@ . + See the License here . ***********************************************************************/ /* Definition of the cart class this class can hold all the information for: @@ -151,7 +151,7 @@ class cart $this->customer_id = get_global_customer(); else $this->customer_id = ''; - $this->document_date = Today(); + $this->document_date = new_doc_date(); if (!is_date_in_fiscalyear($this->document_date)) $this->document_date = end_fiscalyear(); $this->reference = references::get_next($this->trans_type); @@ -222,15 +222,11 @@ class cart $this->trans_no = 0; $this->order_no= $this->trans_type==13 ? key($src->trans_no) : $src->order_no; } -// if we want to save old or derivative document first decode html entities -// from text fields. For new documents this is not needed. - if ($this->trans_no || $this->trans_type != 30) { - $this->reference = @html_entity_decode($this->reference); - $this->Comments = @html_entity_decode($this->Comments); - foreach($this->line_items as $lineno => $line) { - $this->line_items[$lineno]->stock_id = @html_entity_decode($line->stock_id); - $this->line_items[$lineno]->description = @html_entity_decode($line->description); - } + $this->reference = @html_entity_decode($this->reference); + $this->Comments = @html_entity_decode($this->Comments); + foreach($this->line_items as $lineno => $line) { + $this->line_items[$lineno]->stock_id = @html_entity_decode($line->stock_id); + $this->line_items[$lineno]->item_description = @html_entity_decode($line->item_description); } switch($this->trans_type) { case 10: