! -> Note
$ -> Affected files
+04-Oct-2010 Janusz Dobrowolski
+# [0000252] Error during credit invoice processing for already allocated sales invoice.
+$ /sales/includes/db/custalloc_db.inc
+
04-Oct-2010 Joe Hunt
# Dimension Report doesn't show up with correct references
$ /reporting/rep501.php
AND trans_type_from <> ".ST_CUSTCREDIT;
$result = db_query($sql, "can't retrieve invoice allocations");
- while($free < $amount && ($alloc = db_fetch($result))) {
- $unalloc = min($alloc['amt'], $free);
+ while(($free < $amount) && ($alloc = db_fetch($result))) {
+ $unalloc = min($alloc['amt'], $amount-$free);
update_debtor_trans_allocation($alloc['trans_type_to'], $alloc['trans_no_to'],
-$unalloc);
update_debtor_trans_allocation($alloc['trans_type_from'], $alloc['trans_no_from'],