Fixed [0000082] bad js allocations after All/None button press.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 20 Nov 2008 13:31:32 +0000 (13:31 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 20 Nov 2008 13:31:32 +0000 (13:31 +0000)
CHANGELOG.txt
sales/allocations/customer_allocate.php

index cf942b6d1832c9adc2362871de3d9407d74e8ddb..0516a8469e371e081a8c1010fdf7dcb82ae5de80 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+20-Nov-2008 Janusz Dobrowolski
+# [0000082] Bad js allocation on All/None button press.
+$ /sales/allocations/customer_allocate.php
+
 20-Nov-2008 Joe Hunt
 # Do not allow editing invoice if allocated > 0
 $ /sales/inquiry/customer_inquiry.php
index 39076ec19fce4b1b0342fac31fa0c8fbfddc29ca..5f30f66cf2a54d36c9aa5a52fd419bb7d5a4f0d5 100644 (file)
@@ -54,7 +54,7 @@ function check_data()
 
                  /*Now check to see that the AllocAmt is no greater than the
                amount left to be allocated against the transaction under review */
-               if (input_num('amount' . $counter) > $_POST['un_allocated' . $counter])
+               if (input_num('amount' . $counter) > input_num('un_allocated' . $counter))
                {
                    //$_POST['amount' . $counter] = $_POST['un_allocated' . $counter];
                }
@@ -219,7 +219,7 @@ function edit_allocations_for_transaction($type, $trans_no)
                        label_cell("<a href='#' name='Alloc$counter' onclick='allocate_all(this.name.substr(5));return true;'>"
                                         . _("All") . "</a>");
                        label_cell("<a href='#' name='DeAll$counter' onclick='allocate_none(this.name.substr(5));return true;'>"
-                                        . _("None") . "</a>".hidden("un_allocated" . $counter, $un_allocated, false));
+                                        . _("None") . "</a>".hidden("un_allocated" . $counter, price_format($un_allocated), false));
                        end_row();
 
            $total_allocated += input_num('amount' . $counter);