Merged changes up to 2.3.16 into unstable
[fa-stable.git] / sales / inquiry / customer_allocation_inquiry.php
index 66bbb58c5ec69dcffbf8046f2486468a10e868f5..298d1b07793e1b6dd105cdb5276eb75cf88da8b9 100644 (file)
@@ -41,7 +41,7 @@ start_row();
 
 customer_list_cells(_("Select a customer: "), 'customer_id', $_POST['customer_id'], true);
 
-date_cells(_("from:"), 'TransAfterDate', '', null, -30);
+date_cells(_("from:"), 'TransAfterDate', '', null, -$_SESSION["wa_current_user"]->prefs->transaction_days());
 date_cells(_("to:"), 'TransToDate', '', null, 1);
 
 cust_allocations_list_cells(_("Type:"), 'filterType', null);
@@ -103,7 +103,7 @@ 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;