{
unset($_SESSION['alloc']->allocs);
unset($_SESSION['alloc']);
- }
+ }
if (!isset($_POST['customer_id']))
$_POST['customer_id'] = get_global_customer();
set_global_customer($_POST['customer_id']);
- if (isset($_POST['customer_id']) && ($_POST['customer_id'] == reserved_words::get_all()))
+ if (isset($_POST['customer_id']) && ($_POST['customer_id'] == reserved_words::get_all()))
{
unset($_POST['customer_id']);
}
if (!isset($_POST['customer_id']))
$th = array(_("Transaction Type"), _("#"), _("Reference"), _("Date"), _("Customer"),
_("Currency"), _("Total"), _("Left To Allocate"), "");
- else
+ else
$th = array(_("Transaction Type"), _("#"), _("Reference"), _("Date"),
_("Total"), _("Left To Allocate"), "");
table_header($th);
while ($myrow = db_fetch($trans_items))
{
- if ($myrow["settled"] == 1)
+ if ($myrow["settled"] == 1)
{
start_row("class='settledbg'");
$has_settled_items = true;
- }
- else
+ }
+ else
{
alt_table_row_color($k);
}
label_cell($myrow["DebtorName"]);
label_cell($myrow["curr_code"]);
}
- amount_cell(-$myrow["Total"]);
- amount_cell(-$myrow["Total"] - $myrow["alloc"]);
- if (-$myrow["Total"] - $myrow["alloc"] != 0.0)
- label_cell("<a href='$path_to_root/sales/allocations/customer_allocate.php?trans_no=" . $myrow["trans_no"] . "&trans_type=" . $myrow["type"] . "'>" . _("Allocate") . "</a>");
+ amount_cell($myrow["Total"]);
+ amount_cell($myrow["Total"] - $myrow["alloc"]);
+ if ($myrow["Total"] - $myrow["alloc"] != 0.0)
+ label_cell("<a href='$path_to_root/sales/allocations/customer_allocate.php?trans_no="
+ .$myrow["trans_no"] . "&trans_type=" . $myrow["type"] . "'>" . _("Allocate") . "</a>");
else
label_cell("");
end_row();