[0000179] cannot allocate amount for ST_BANKPAYMENT type payments
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Fri, 4 Dec 2009 17:59:20 +0000 (17:59 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Fri, 4 Dec 2009 17:59:20 +0000 (17:59 +0000)
CHANGELOG.txt
includes/ui/allocation_cart.inc

index 8ecbdd882ab4628469a83b5cfea2aaac5e05e11f..f535328be12c023d28284608a9cc6b37c75c117b 100644 (file)
@@ -19,12 +19,16 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+04-Dec-2009 Janusz Dobrowolski
+# [0000179] Cannot allocate ST_BANKPAYMENT type payments
+$ /includes/ui/allocation_cart.inc
+
 04-Dec-2009 Joe Hunt
 # Print Statement prints balances in wrong place.
 $ /reporting/rep108.php
 
 03-Dec-2009 Janusz Dobrowolski
-# Fixed bug [0000179] data error in supplier allocations
+# Fixed bug [0000178] data error in supplier allocations
 $ /includes/ui/allocation_cart.inc
 
 ------------------------------- Release 2.2.1 ----------------------------------
index 6d081aefb97e1646f2621a56b8bd281441123373..bd84f5cc7533b738238d3d1d8694b7beddfb770d 100644 (file)
@@ -341,7 +341,9 @@ function check_allocations()
        }
 
        $amount = $_SESSION['alloc']->amount;
-       if ($_SESSION['alloc']->type == 21 || $_SESSION['alloc']->type == 22) 
+       
+
+       if (in_array($_SESSION['alloc']->type, array(ST_BANKPAYMENT, ST_SUPPCREDIT, ST_SUPPAYMENT)))
                $amount = -$amount;
 
        if ($total_allocated - ($amount + input_num('discount'))  > $SysPrefs->allocation_settled_allowance())