From 082b0f00ec5292669a82a0c611ef67650282a7c4 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Fri, 21 Mar 2008 17:11:58 +0000 Subject: [PATCH] Improved javascript allocations --- includes/ui/ui_view.inc | 37 +++++++++++++------- purchasing/allocations/supplier_allocate.php | 6 ++-- sales/allocations/customer_allocate.php | 6 ++-- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index 9f0e4450..08402fca 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -1076,7 +1076,7 @@ function add_js_user_num() { $js = ""; add_js_user_num(); diff --git a/purchasing/allocations/supplier_allocate.php b/purchasing/allocations/supplier_allocate.php index a0e3b86f..0a85f478 100644 --- a/purchasing/allocations/supplier_allocate.php +++ b/purchasing/allocations/supplier_allocate.php @@ -227,7 +227,7 @@ function edit_allocations_for_transaction($type, $trans_no) } label_row(_("Total Allocated"), number_format2($total_allocated,user_price_dec()), - "colspan=6 align=right", "align=right"); + "colspan=6 align=right", "align=right id='total_allocated'"); if (-$_SESSION['alloc']->amount - $total_allocated < 0) { $font1 = ""; @@ -237,11 +237,11 @@ function edit_allocations_for_transaction($type, $trans_no) $font1 = $font2 = ""; $left_to_allocate = price_format(-$_SESSION['alloc']->amount - $total_allocated); label_row(_("Left to Allocate"), $font1 . $left_to_allocate . $font2, "colspan=6 align=right", - "nowrap align=right"); + "nowrap align=right id='left_to_allocate'"); end_table(); hidden('TotalNumberOfAllocs', $counter); - hidden('left_to_allocate', $left_to_allocate); +// hidden('left_to_allocate', $left_to_allocate); echo "
"; submit('UpdateDisplay', _("Update")); echo " "; diff --git a/sales/allocations/customer_allocate.php b/sales/allocations/customer_allocate.php index 6d09d766..e1fd9ea2 100644 --- a/sales/allocations/customer_allocate.php +++ b/sales/allocations/customer_allocate.php @@ -226,7 +226,7 @@ function edit_allocations_for_transaction($type, $trans_no) } label_row(_("Total Allocated"), price_format($total_allocated), - "colspan=6 align=right", "nowrap align=right"); + "colspan=6 align=right", "nowrap align=right id='total_allocated'"); if ($_SESSION['alloc']->amount - $total_allocated < 0) { $font1 = ""; @@ -237,11 +237,11 @@ function edit_allocations_for_transaction($type, $trans_no) $left_to_allocate = $_SESSION['alloc']->amount - $total_allocated; $left_to_allocate = price_format($left_to_allocate); label_row(_("Left to Allocate"), $font1 . $left_to_allocate . $font2, - "colspan=6 align=right ", "nowrap align=right"); + "colspan=6 align=right ", "nowrap align=right id='left_to_allocate'"); end_table(1); hidden('TotalNumberOfAllocs', $counter); - hidden('left_to_allocate', $left_to_allocate); +// hidden('left_to_allocate', $left_to_allocate); submit_center_first('UpdateDisplay', _("Update")); submit('Process', _("Process")); } -- 2.30.2