[Koha-patches] [PATCH] Bug 5946 : (MT1177) aqplan.pl, fix the problem of calculating the total remaining.
Chris Cormack
chrisc at catalyst.net.nz
Thu Mar 24 21:36:42 CET 2011
From: Alex Arnaud <alex.arnaud at biblibre.com>
---
koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js
index b5ec994..28afc19 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js
+++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js
@@ -557,12 +557,14 @@ function getElementsByClass( searchClass, domNode, tagName) {
function calcTotalRow(cell) {
- var bud_id = cell.className;
+ var string = cell.name;
+ var pos = string.indexOf(",", 0);
+ var bud_id = string.substring(0, pos);
var val1 = cell.value;
- var remainingTotal = document.getElementById("budget_est_"+bud_id).textContent;
+ var remainingTotal = document.getElementById("budget_est_"+bud_id);
var remainingNew =0;
var budgetTotal = document.getElementById("budget_tot_"+bud_id ).textContent;
- var arr = getElementsByClass(bud_id);
+ var arr = getElementsByClass(cell.className);
budgetTotal = budgetTotal.replace(/\,/, "");
--
1.7.1
More information about the Koha-patches
mailing list