A bug in Customer Allocations fixed.
[fa-stable.git] / sales / allocations / customer_allocate.php
index ab3a30013ab7cf11ea2c7d3dd960379d14e52321..8c051386dfe81bd5f3c340780d66f123c5b82447 100644 (file)
@@ -46,7 +46,12 @@ function edit_allocations_for_transaction($type, $trans_no)
        global $systypes_array;
 
        $cart = $_SESSION['alloc'];
-
+       
+       if ($cart->type == ST_JOURNAL && $cart->bank_amount < 0)
+       {
+               $cart->bank_amount = -$cart->bank_amount;
+               $cart->amount = -$cart->amount;
+       }       
     display_heading(sprintf(_("Allocation of %s # %d"), $systypes_array[$cart->type], $cart->trans_no));
 
     display_heading($cart->person_name);