}
return $this->add_item($type, $type_no, $date_, $due_date,
$amount, $amount_allocated, $current_allocated);
}
return $this->add_item($type, $type_no, $date_, $due_date,
$amount, $amount_allocated, $current_allocated);
function read($type = null, $trans_no = 0)
{
if ($type == null) { // re-read
function read($type = null, $trans_no = 0)
{
if ($type == null) { // re-read
if ($trans_no == 0) return; // this is new payment
/* Now get trans that might have previously been allocated to by this trans
if ($trans_no == 0) return; // this is new payment
/* Now get trans that might have previously been allocated to by this trans
while ($myrow = db_fetch($trans_items))
{
$this->add_or_update_item ($myrow["type"], $myrow["trans_no"],
while ($myrow = db_fetch($trans_items))
{
$this->add_or_update_item ($myrow["type"], $myrow["trans_no"],
$alloc_item->type_no, $alloc_item->current_allocated);
}
// Exchange Variations Joe Hunt 2008-09-20 ////////////////////
$alloc_item->type_no, $alloc_item->current_allocated);
}
// Exchange Variations Joe Hunt 2008-09-20 ////////////////////
exchange_variation($this->type, $this->trans_no,
$alloc_item->type, $alloc_item->type_no, $this->date_,
$alloc_item->current_allocated,
exchange_variation($this->type, $this->trans_no,
$alloc_item->type, $alloc_item->type_no, $this->date_,
$alloc_item->current_allocated,
amount_cells(null, "amount" . $counter, price_format('amount' . $counter));
$un_allocated = round($alloc_item->amount - $alloc_item->amount_allocated, 6);
amount_cells(null, "amount" . $counter, price_format('amount' . $counter));
$un_allocated = round($alloc_item->amount - $alloc_item->amount_allocated, 6);
label_cell("<a href='#' name=Alloc$counter onclick='allocate_all(this.name.substr(5));return true;'>"
. _("All") . "</a>");
label_cell("<a href='#' name=DeAll$counter onclick='allocate_none(this.name.substr(5));return true;'>"
label_cell("<a href='#' name=Alloc$counter onclick='allocate_all(this.name.substr(5));return true;'>"
. _("All") . "</a>");
label_cell("<a href='#' name=DeAll$counter onclick='allocate_none(this.name.substr(5));return true;'>"
/*Now check to see that the AllocAmt is no greater than the
amount left to be allocated against the transaction under review */
/*Now check to see that the AllocAmt is no greater than the
amount left to be allocated against the transaction under review */