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)
$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
//----------------------------------------------------------------------------------------
function add_supp_allocation($amount, $trans_type_from, $trans_no_from,
- $trans_type_to, $trans_no_to, $date_)
+ $trans_type_to, $trans_no_to, $date_=null)
{
+ if (!$date_)
+ $date = Today();
+
$date = date2sql($date_);
$sql = "INSERT INTO ".TB_PREF."supp_allocations (
amt, date_alloc,
new_doc_date($_POST['DatePaid']);
$_SESSION['alloc']->trans_no = $payment_id;
+ $_SESSION['alloc']->date_ = $_POST['DatePaid'];
$_SESSION['alloc']->write();
unset($_POST['bank_account']);