X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fallocations%2Fcustomer_allocation_main.php;h=8d85e42317e8713d9aef77f8c3e93012d9de1548;hb=2c659ece419846b6e54773d8d7518d4821529997;hp=20baf5cace8b7002ffda2d6527091886b8308ef3;hpb=da8311619dd73feae101d246a1957b972e00cbd2;p=fa-stable.git diff --git a/sales/allocations/customer_allocation_main.php b/sales/allocations/customer_allocation_main.php index 20baf5ca..8d85e423 100644 --- a/sales/allocations/customer_allocation_main.php +++ b/sales/allocations/customer_allocation_main.php @@ -24,7 +24,7 @@ function display_allocatable_transactions() { unset($_SESSION['alloc']->allocs); unset($_SESSION['alloc']); - } + } if (!isset($_POST['customer_id'])) $_POST['customer_id'] = get_global_customer(); @@ -36,7 +36,7 @@ function display_allocatable_transactions() 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']); } @@ -61,7 +61,7 @@ function display_allocatable_transactions() 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); @@ -70,12 +70,12 @@ function display_allocatable_transactions() 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); } @@ -90,10 +90,11 @@ function display_allocatable_transactions() 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("" . _("Allocate") . ""); + amount_cell($myrow["Total"]); + amount_cell($myrow["Total"] - $myrow["alloc"]); + if ($myrow["Total"] - $myrow["alloc"] != 0.0) + label_cell("" . _("Allocate") . ""); else label_cell(""); end_row();