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:
<span ng-if="patron_money.balance_owed">You owe the library ${{patron_money.balance_owed}}</span>
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 <gmc@equinoxinitiative.org>
Signed-off-by: Terra McCanna <tmccanna@georgialibraries.org>
<!--
Template for printing checkout receipts; fields available include:
+* patron_money - summary of the patron's current financial obligations:
+
+ * 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
+
* circulations - list of loans made during this session. Each
includes:
* title
* copy_barcode
* due_date
- * patron_money.balance_owed - must be grabbed from a specific circulation, e.g. circulations[0].patron_money.balance_owed
-->
<div>
},
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,
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,
};
});
+ print_data.patron_money = patronSvc.patron_stats.fines;
+
return egCore.print.print({
context : 'default',
template : 'checkout',