From: Galen Charlton Date: Tue, 7 Nov 2017 18:41:55 +0000 (-0500) Subject: LP#1708488: adjust how patron financial summary is exposed to checkout receipts X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a4c36a7f0e258614cc659c9ee5b5e96829955dcd;p=Evergreen.git LP#1708488: adjust how patron financial summary is exposed to checkout receipts This patch builds on the previous patch by grabbing the patron's financial summary from the patron stats values. The "patron_money" template value is no longer associated with a particular loan, meaning that you can do things like this: You owe the library ${{patron_money.balance_owed}} The additional values include * patron_money.balance_owed - current balance * patron_money.total_paid - payments made on outstanding fines/fees * patron_money.total_owed - total of outstanding fines/fees Signed-off-by: Galen Charlton Signed-off-by: Terra McCanna --- diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_checkout.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_checkout.tt2 index 9c3c6b978d..6b445b9de7 100644 --- a/Open-ILS/src/templates/staff/share/print_templates/t_checkout.tt2 +++ b/Open-ILS/src/templates/staff/share/print_templates/t_checkout.tt2 @@ -1,13 +1,18 @@
diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index f7a7148e20..11510f4258 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -469,15 +469,16 @@ function($scope , $q , egCore , ngToast) { }, copy : seed_copy, title : seed_record.title, - author : seed_record.author, - patron_money : { - balance_owed : "$5.00", - total_owed : "$10.10", - total_paid : "$5.10" - } + author : seed_record.author }, ], + patron_money : { + balance_owed : 5.01, + total_owed : 10.12, + total_paid : 5.11 + }, + in_house_uses : [ { num_uses : 3, diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js index e3ad2f7281..83a6a6fecd 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js @@ -264,7 +264,6 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , if (co.circ) { print_data.circulations.push({ circ : egCore.idl.toHash(co.circ), - patron_money : egCore.idl.toHash(co.evt[0].payload.patron_money), copy : egCore.idl.toHash(co.acp), call_number : egCore.idl.toHash(co.acn), title : co.title, @@ -273,6 +272,8 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , }; }); + print_data.patron_money = patronSvc.patron_stats.fines; + return egCore.print.print({ context : 'default', template : 'checkout',