Stable branch merged up to 2.3.21
[fa-stable.git] / includes / ui / allocation_cart.inc
index 37c436a0ac3a96b2daa447f0f64985c4d7b014d9..9ecbf597895c09e26d78ba0804e2405bdce53709 100644 (file)
@@ -33,7 +33,7 @@ class allocation
        function allocation($type, $trans_no, $person_id = null, $person_type_id=null)
        {
                $this->allocs = array();
-               
+
                $this->trans_no = $trans_no;
                $this->type = $type;
                if ($person_id)
@@ -132,7 +132,8 @@ class allocation
                                $this->currency = isset($trans['bank_curr_code']) ? $trans['bank_curr_code'] : $trans['curr_code'];
                                $this->bank_amount = @$trans["bank_amount"];
                                $this->amount = $trans["Total"];
-                       }
+                       } else
+                               $this->date_ = Today();
                }
        /* Now populate the array of possible (and previous actual) allocations 
                for this customer/supplier. First get the transactions that have