From 421cdd7ad299a3950dda56523dd61a280c8bd243 Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Mon, 30 Oct 2017 15:55:24 +0000 Subject: [PATCH 1/1] LP#1708487 Add Title and Barcode to Bill Print Templates - Add additional documentation to Bills, Current; Bills, Payment; and Bills, Historical print templates. - Convert xacts to objects containing all required information for print templates Signed-off-by: Kyle Huckins Changes to be committed: modified: Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2 modified: Open-ILS/src/templates/staff/share/print_templates/t_bills_current.tt2 modified: Open-ILS/src/templates/staff/share/print_templates/t_bills_historical.tt2 modified: Open-ILS/web/js/ui/default/staff/circ/patron/bills.js Signed-off-by: Kathy Lussier --- .../share/print_templates/t_bill_payment.tt2 | 3 ++ .../share/print_templates/t_bills_current.tt2 | 3 +- .../print_templates/t_bills_historical.tt2 | 2 + .../js/ui/default/staff/circ/patron/bills.js | 52 ++++++++++++++++--- 4 files changed, 53 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2 index 2f2cfecfa2..57e50fe40e 100644 --- a/Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2 +++ b/Open-ILS/src/templates/staff/share/print_templates/t_bill_payment.tt2 @@ -8,6 +8,9 @@ includes: * new_balance - balance after the payments were applied * payments - list of specific payments +Individual payments within payments contain: +* payment.xact.copy_barcode - Copy barcode +* payment.xact.title - Copy title --> Welcome to {{current_location.name}}!
A receipt of your transaction:
diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_bills_current.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_bills_current.tt2 index d75850f00e..a229d80ba9 100644 --- a/Open-ILS/src/templates/staff/share/print_templates/t_bills_current.tt2 +++ b/Open-ILS/src/templates/staff/share/print_templates/t_bills_current.tt2 @@ -6,7 +6,8 @@ to this template includes: contains: summary - information about the transaction - + title - Copy title + copy_barcode - Copy barcode --> Welcome to {{current_location.name}}!
You have the following bills: diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_bills_historical.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_bills_historical.tt2 index 57efdc58a3..5a75e3b3e8 100644 --- a/Open-ILS/src/templates/staff/share/print_templates/t_bills_historical.tt2 +++ b/Open-ILS/src/templates/staff/share/print_templates/t_bills_historical.tt2 @@ -6,6 +6,8 @@ to this template includes: contains: summary - information about the transaction + title - Copy title + copy_barcode - Copy barcode --> Welcome to {{current_location.name}}!
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 8f06491ad8..ce240f919b 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 @@ -464,7 +464,14 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, var xacts = []; egCore.pcrud.search('mbt', {id : ids}, - {flesh : 1, flesh_fields : {'mbt' : ['summary']}}, + {flesh : 5, flesh_fields : { + 'mbt' : ['summary', 'circulation'], + 'circ' : ['target_copy'], + 'acp' : ['call_number'], + 'acn' : ['record'], + 'bre' : ['simple_record'] + } + }, {authoritative : true} ).then( function() { @@ -480,7 +487,21 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, }, null, function(xact) { - xacts.push(egCore.idl.toHash(xact)); + newXact = { + billing_total : xact.billing_total(), + billings : xact.billings(), + grocery : xact.grocery(), + id : xact.id(), + payment_total : xact.payment_total(), + payments : xact.payments(), + summary : egCore.idl.toHash(xact.summary()), + unrecovered : xact.unrecovered(), + xact_finish : xact.xact_finish(), + xact_start : xact.xact_start(), + copy_barcode : xact.circulation().target_copy().barcode(), + title : xact.circulation().target_copy().call_number().record().simple_record().title() + } + xacts.push(newXact); } ); } @@ -908,7 +929,14 @@ function($scope, $q , egCore , patronSvc , billSvc , egPromptDialog , $location var xacts = []; egCore.pcrud.search('mbt', {id : ids}, - {flesh : 1, flesh_fields : {'mbt' : ['summary']}}, + {flesh : 5, flesh_fields : { + 'mbt' : ['summary', 'circulation'], + 'circ' : ['target_copy'], + 'acp' : ['call_number'], + 'acn' : ['record'], + 'bre' : ['simple_record'] + } + }, {authoritative : true} ).then( function() { @@ -924,12 +952,24 @@ function($scope, $q , egCore , patronSvc , billSvc , egPromptDialog , $location }, null, function(xact) { - xacts.push(egCore.idl.toHash(xact)); + newXact = { + billing_total : xact.billing_total(), + billings : xact.billings(), + grocery : xact.grocery(), + id : xact.id(), + payment_total : xact.payment_total(), + payments : xact.payments(), + summary : egCore.idl.toHash(xact.summary()), + unrecovered : xact.unrecovered(), + xact_finish : xact.xact_finish(), + xact_start : xact.xact_start(), + copy_barcode : xact.circulation().target_copy().barcode(), + title : xact.circulation().target_copy().call_number().record().simple_record().title() + } + xacts.push(newXact); } ); } - - }]) .controller('BillPaymentHistoryCtrl', -- 2.43.2