From: Jason Boyer Date: Mon, 21 May 2018 16:09:09 +0000 (-0400) Subject: LP1772444: Add Patron Names to Bill Receipts X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fjboyer%2Flp1772444_patron_name_bills;p=working%2FEvergreen.git LP1772444: Add Patron Names to Bill Receipts The bills_current and bills_historical receipt templates were missing patron information. This has been added to match most other receipt templates (money_summary is not included since it could potentially be stale). Signed-off-by: Jason Boyer --- diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js index 392b696179..261188aa21 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js @@ -516,13 +516,26 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, {authoritative : true} ).then( function() { + var cusr = patronSvc.current; egCore.print.print({ context : 'receipt', template : 'bills_current', scope : { transactions : xacts, current_location : egCore.idl.toHash( - egCore.org.get(egCore.auth.user().ws_ou())) + egCore.org.get(egCore.auth.user().ws_ou())), + patron : { + prefix : cusr.prefix(), + first_given_name : cusr.first_given_name(), + second_given_name : cusr.second_given_name(), + family_name : cusr.family_name(), + suffix : cusr.suffix(), + card : { barcode : cusr.card().barcode() }, + expire_date : cusr.expire_date(), + alias : cusr.alias(), + has_email : Boolean(cusr.email() && cusr.email().match(/.*@.*/).length), + has_phone : Boolean(cusr.day_phone() || cusr.evening_phone() || cusr.other_phone()) + } } }); }, @@ -997,13 +1010,26 @@ function($scope, $q , egCore , patronSvc , billSvc , egPromptDialog , $location {authoritative : true} ).then( function() { + var cusr = patronSvc.current; egCore.print.print({ context : 'receipt', template : 'bills_historical', scope : { transactions : xacts, current_location : egCore.idl.toHash( - egCore.org.get(egCore.auth.user().ws_ou())) + egCore.org.get(egCore.auth.user().ws_ou())), + patron : { + prefix : cusr.prefix(), + first_given_name : cusr.first_given_name(), + second_given_name : cusr.second_given_name(), + family_name : cusr.family_name(), + suffix : cusr.suffix(), + card : { barcode : cusr.card().barcode() }, + expire_date : cusr.expire_date(), + alias : cusr.alias(), + has_email : Boolean(cusr.email() && cusr.email().match(/.*@.*/).length), + has_phone : Boolean(cusr.day_phone() || cusr.evening_phone() || cusr.other_phone()) + } } }); },