while ($myrow = db_fetch($trans_items))
{
+//_vd($myrow);
$this->add_or_update_item ($myrow["type"], $myrow["trans_no"],
sql2date($myrow["tran_date"]),
sql2date($myrow["due_date"]),
if ($this->person_type == PT_SUPPLIER)
clear_supp_alloctions($this->type, $this->trans_no, $this->date_);
else
- clear_cust_alloctions($this->type, $this->trans_no, $this->date_);
+ clear_cust_alloctions($this->type, $this->trans_no);
// now add the new allocations
$total_allocated = 0;
update_debtor_trans_allocation($alloc_item->type, $alloc_item->type_no);
}
// Exchange Variations Joe Hunt 2008-09-20 ////////////////////
- exchange_variation($this->type, $this->trans_no,
+ if (!in_array($alloc_item->type, array(ST_SALESQUOTE, ST_SALESORDER, ST_PURCHORDER)))
+ exchange_variation($this->type, $this->trans_no,
$alloc_item->type, $alloc_item->type_no, $this->date_,
$amount, $this->person_type);
for ($counter = 0; $counter < get_post("TotalNumberOfAllocs"); $counter++)
{
if (!isset($_POST['amount'.$counter])) continue;
+
if (!check_num('amount' . $counter, 0))
{
display_error(_("The entry for one or more amounts is invalid or negative."));