By changing a simple sentence in allocation_cart.inc, the customer/supplier payments...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 9 Sep 2009 22:28:27 +0000 (22:28 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 9 Sep 2009 22:28:27 +0000 (22:28 +0000)
CHANGELOG.txt
includes/ui/allocation_cart.inc

index cbf3d88eba22545bc91369c1e42259b1eb5d3056..e71bc6b3516361f326523ba24d1b999e09467b37 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+10-Swp-2009 Joe Hunt
+! By changing a simple sentence in allocation_cart.inc, the customer/supplier payments works with prompt payment discounts
+$ /includes/ui/allocation_cart.inc
+
 09-Sep-2009 Janusz Dobrowolski
 # Added two special access areas for bank gl postings and grn removal.
 $ /gl/gl_journal.php
index d89eb9ecc3dc966bc4e5014f3d7e5257eb27d180..32cb1addca324e554af992fa98cfa6b9ad4e76b7 100644 (file)
@@ -339,7 +339,7 @@ function check_allocations()
        if ($_SESSION['alloc']->type == 21 || $_SESSION['alloc']->type == 22) 
                $amount = -$amount;
 
-       if ($total_allocated - $amount  > sys_prefs::allocation_settled_allowance())
+       if ($total_allocated - ($amount + input_num('discount'))  > sys_prefs::allocation_settled_allowance())
        {
                display_error(_("These allocations cannot be processed because the amount allocated is more than the total amount left to allocate."));
                return false;