projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
acbb281
)
Rerun of /sales/includes/cart_class.inc.
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Wed, 2 May 2012 20:52:07 +0000
(22:52 +0200)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Wed, 2 May 2012 20:52:07 +0000
(22:52 +0200)
sales/includes/cart_class.inc
patch
|
blob
|
history
diff --git
a/sales/includes/cart_class.inc
b/sales/includes/cart_class.inc
index 633093675fd722258faec739f32f4d3a0a2f153a..40fb2a3f2fef9bf9798e92440b23cf2d76280467 100644
(file)
--- a/
sales/includes/cart_class.inc
+++ b/
sales/includes/cart_class.inc
@@
-243,6
+243,11
@@
class cart
// $policy - 0 or 1: writeoff/return for IV, back order/cancel for DN
function write($policy=0) {
begin_transaction(); // prevents partial database changes in case of direct delivery/invoice
// $policy - 0 or 1: writeoff/return for IV, back order/cancel for DN
function write($policy=0) {
begin_transaction(); // prevents partial database changes in case of direct delivery/invoice
+ if ($this->reference != 'auto' && $this->trans_no == 0 && !is_new_reference($this->reference, $this->trans_type))
+ {
+ commit_transaction();
+ return -1;
+ }
if (count($this->src_docs) == 0 && ($this->trans_type == ST_SALESINVOICE || $this->trans_type == ST_CUSTDELIVERY)) {
// this is direct document - first add parent
$ref = $this->reference;
if (count($this->src_docs) == 0 && ($this->trans_type == ST_SALESINVOICE || $this->trans_type == ST_CUSTDELIVERY)) {
// this is direct document - first add parent
$ref = $this->reference;
@@
-260,11
+265,6
@@
class cart
$this->due_date = $due_date;
}
$this->reference = @html_entity_decode($this->reference, ENT_QUOTES);
$this->due_date = $due_date;
}
$this->reference = @html_entity_decode($this->reference, ENT_QUOTES);
- if ($this->reference != 'auto' && $this->trans_no == 0 && !is_new_reference($this->reference, $this->trans_type))
- {
- commit_transaction();
- return -1;
- }
$this->Comments = @html_entity_decode($this->Comments, ENT_QUOTES);
foreach($this->line_items as $lineno => $line) {
$this->line_items[$lineno]->stock_id = @html_entity_decode($line->stock_id, ENT_QUOTES);
$this->Comments = @html_entity_decode($this->Comments, ENT_QUOTES);
foreach($this->line_items as $lineno => $line) {
$this->line_items[$lineno]->stock_id = @html_entity_decode($line->stock_id, ENT_QUOTES);