From: Jason Etheridge Date: Fri, 23 Sep 2011 18:58:25 +0000 (-0400) Subject: silent macro updates X-Git-Tag: sprint4-merge-nov22~4805^2 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2Fphasefx%2Fmerged_bill_and_receipt_fixes;p=working%2FEvergreen.git silent macro updates Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js index 73fbc61b52..c256315f8c 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js @@ -270,6 +270,25 @@ OpenILS.data.prototype = { for (var i in x) { obj.print_list_templates[i] = x[i]; } + // handle macro changes + var templates = [ 'bills_current', 'bills_historical' ]; + for (var i = 0; i < templates.length; i++) { + if (obj.print_list_templates[templates[i]]) { + // mbts_id + obj.print_list_templates[templates[i]].line_item = + obj.print_list_templates[templates[i]].line_item.replace( + /%id%/g, '%mbts_id%'); + // mbts_xact_start + obj.print_list_templates[templates[i]].line_item = + obj.print_list_templates[templates[i]].line_item.replace( + /%xact_start%/g, '%mbts_xact_start%'); + // mbts_xact_finish + obj.print_list_templates[templates[i]].line_item = + obj.print_list_templates[templates[i]].line_item.replace( + /%xact_finish%/g, '%mbts_xact_finish%'); + } + } + // obj.stash('print_list_templates'); obj.data_progress('Saved print templates retrieved from file. '); }