X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Finquiry%2Fcustomer_allocation_inquiry.php;h=2d08467fc142b53e58a6dfefb6d8c341b408848c;hb=1466764d49233238c6097c95341875be552d7487;hp=66bbb58c5ec69dcffbf8046f2486468a10e868f5;hpb=372edd6599ac0de148e29b566344bb4a0d93c114;p=fa-stable.git diff --git a/sales/inquiry/customer_allocation_inquiry.php b/sales/inquiry/customer_allocation_inquiry.php index 66bbb58c..2d08467f 100644 --- a/sales/inquiry/customer_allocation_inquiry.php +++ b/sales/inquiry/customer_allocation_inquiry.php @@ -95,7 +95,7 @@ function alloc_link($row) $link = pager_link(_("Allocation"), "/sales/allocations/customer_allocate.php?trans_no=" . $row["trans_no"] - ."&trans_type=" . $row["type"], ICON_MONEY); + ."&trans_type=" . $row["type"]."&debtor_no=" . $row["debtor_no"], ICON_ALLOC); if ($row["type"] == ST_CUSTCREDIT && $row['TotalAmount'] > 0) { @@ -103,12 +103,12 @@ function alloc_link($row) return $link; } elseif (($row["type"] == ST_CUSTPAYMENT || $row["type"] == ST_BANKDEPOSIT) && - ($row['TotalAmount'] - $row['Allocated']) > 0) + (floatcmp($row['TotalAmount'], $row['Allocated']) >= 0)) { /*its a receipt which could have an allocation*/ return $link; } - elseif ($row["type"] == ST_CUSTPAYMENT && $row['TotalAmount'] < 0) + elseif ($row["type"] == ST_CUSTPAYMENT && $row['TotalAmount'] <= 0) { /*its a negative receipt */ return ''; @@ -136,7 +136,8 @@ function fmt_credit($row) } //------------------------------------------------------------------------------------------------ -$sql = get_sql_for_customer_allocation_inquiry(); +$sql = get_sql_for_customer_allocation_inquiry(get_post('TransAfterDate'), get_post('TransToDate'), + get_post('customer_id'), get_post('filterType'), check_value('showSettled')); //------------------------------------------------------------------------------------------------ $cols = array(