{
return pager_link(_("Allocate"),
"/purchasing/allocations/supplier_allocate.php?trans_no="
- .$row["trans_no"] . "&trans_type=" . $row["type"], ICON_ALLOC);
+ .$row["trans_no"] . "&trans_type=" . $row["type"]. "&supplier_id=" . $row["supplier_id"], ICON_ALLOC);
}
function amount_left($row)
{
- return price_format(-$row["Total"]-$row["alloc"]);
+ return price_format($row['type'] == ST_JOURNAL ? abs($row["Total"])-$row["alloc"] : -$row["Total"]-$row["alloc"]);
}
function amount_total($row)
$cols = array(
_("Transaction Type") => array('fun'=>'systype_name'),
- _("#") => array('fun'=>'trans_view'),
+ _("#") => array('fun'=>'trans_view', 'align'=>'right'),
_("Reference"),
_("Date") => array('name'=>'tran_date', 'type'=>'date', 'ord'=>'asc'),
_("Supplier") => array('ord'=>''),