From 25c3864bc8d902c8c205e93de33981028b4d3957 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Fri, 4 Dec 2009 17:59:20 +0000 Subject: [PATCH] [0000179] cannot allocate amount for ST_BANKPAYMENT type payments --- CHANGELOG.txt | 6 +++++- includes/ui/allocation_cart.inc | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8ecbdd8..f535328 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 ---------------------------------- diff --git a/includes/ui/allocation_cart.inc b/includes/ui/allocation_cart.inc index 6d081ae..bd84f5c 100644 --- a/includes/ui/allocation_cart.inc +++ b/includes/ui/allocation_cart.inc @@ -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()) -- 2.30.2