patron.has_email - Whether or not the patron has an email address
patron.has_phone - Whether or not the patron has a phone number
pref_ versions of all name fields (e.g. pref_family_name);
-* transasctions - a list of transactions, each of which
- contains:
+* transasctions - a list of transactions, each of which contains:
+ xact.id - Bill unique id
+ xact.title - Copy title
+ xact.copy_barcode - Copy barcode
+ xact.xact_finish - Billing finish date and time
+ xact.xact_start - Billing start date and time
xact.summary - information about the transaction
- xact.title - Item title
- xact.copy_barcode - Item barcode
+ xact.summary.balance_owed - Balance owed
+ xact.summary.last_billing_note - Last billing note
+ xact.summary.last_billing_type - Last billing type
+ xact.summary.last_payment_note - Last payment note
+ xact.summary.last_payment_ts - Last payment date and time
+ xact.summary.last_payment_type - Last payment type
+ xact.summary.total_owed - Total billed
+ xact.summary.total_paid - Total paid
+ xact.summary.xact_type - Billing type
+ xact.call_number - Information about the copy
+ xact.call_number.label - Copy call number
+ xact.call_number.prefix - Copy call number prefix
+ xact.call_number.suffix - Copy call number suffix
+ xact.call_number.owning_lib.name - The owning library's name
+ xact.call_number.owning_lib.shortname - The owning library's shortname
-->
Welcome to {{current_location.name}}!<br/>
You have the following bills:
patron.has_phone - Whether or not the patron has a phone number
pref_ versions of all name fields (e.g. pref_family_name);
* transasctions - a list of transactions, each of which contains:
- xact.id - Bill unique id
- xact.copy_barcode - Item barcode
- xact.xact_finish - Billing finish date and time
- xact.xact_start - Billing start date and time
- xact.summary - Information about the transaction
- xact.summary.balance_owed - Balance owed
- xact.summary.last_billing_note - Last billing note
- xact.summary.last_billing_type - Last billing type
- xact.summary.last_payment_note - Last payment note
- xact.summary.last_payment_ts - Last payment date and time
- xact.summary.last_payment_type - Last payment type
- xact.summary.total_owed - Total billed
- xact.summary.total_paid - Total paid
- xact.summary.xact_type - Billing type
- xact.title - Item title
+ xact.id - Bill unique id
+ xact.title - Copy title
+ xact.copy_barcode - Copy barcode
+ xact.xact_finish - Billing finish date and time
+ xact.xact_start - Billing start date and time
xact.summary - information about the transaction
- xact.title - Item title
- xact.copy_barcode - Item barcode
-
+ xact.summary.balance_owed - Balance owed
+ xact.summary.last_billing_note - Last billing note
+ xact.summary.last_billing_type - Last billing type
+ xact.summary.last_payment_note - Last payment note
+ xact.summary.last_payment_ts - Last payment date and time
+ xact.summary.last_payment_type - Last payment type
+ xact.summary.total_owed - Total billed
+ xact.summary.total_paid - Total paid
+ xact.summary.xact_type - Billing type
+ xact.call_number - Information about the copy
+ xact.call_number.label - Copy call number
+ xact.call_number.prefix - Copy call number prefix
+ xact.call_number.suffix - Copy call number suffix
+ xact.call_number.owning_lib.name - The owning library's name
+ xact.call_number.owning_lib.shortname - The owning library's shortname
-->
Welcome to {{current_location.name}}!<br/>
You had the following bills:
* circulations - list of loans made during this session. Each
includes:
- * title
- * author
- * copy.barcode
- * circ.due_date
+ * checkout.title
+ * checkout.author
+ * checkout.copy.barcode
+ * checkout.copy.circ_modifier.name
+ * checkout.copy.call_number.label
+ * checkout.copy.call_number.owning_lib.name
+ * checkout.copy.call_number.owning_lib.shortname
+ * checkout.circ.due_date
+ * checkout.circ.renewal_remaining
-->
<div>
<!--
Template for printing a table of holds to pull. Fields include:
-* holds - list of holds, each of which includes:
+* holds - list of holds, where each hold_data includes:
- * title
- * author
- * hold.hold_type
- * copy.location_name
- * volume.label - call number
- * copy.barcode
+ * hold_data.title
+ * hold_data.author
+ * hold_data.hold.hold_type
+ * hold_data.hold.pickup_lib.shortname
+ * hold_data.hold.pickup_lib.name
+ * hold_data.copy.location_name
+ * hold_data.volume.label - call number
+ * hold_data.volume.prefix
+ * hold_data.volume.suffix
+ * hold_data.copy.barcode
-->
<table id='pull-list-template-table'>
<style>
<!--
Template for printing hold request slips. Fields include:
-* call_number.label/prefix/suffix
+<<<<<<< HEAD
* hold.behind_desk
* copy.barcode
+* call_number.label
+* call_number.prefix
+* call_number.suffix
+=======
+* copy.barcode
+* copy.call_number.label
+* copy.call_number.prefix.name
+* copy.call_number.suffix.name
+>>>>>>> 57e65e1... Interim commit
* title
+
* patron.alias
* patron.family_name
* patron.first_given_name
* patron.second_given_name
* patron.card.barcode
+
+* hold.behind_desk
* hold.request_time
* hold.phone_notify
* hold.sms_notify
[% l('Barcode: [_1]', '{{copy.barcode}}') %]</div>
[% l('Title: [_1]', '{{title}}') %]</div>
<br/>
- <div>[% l('Call Number: [_1] [_2] [_3]', '{{call_number.prefix}}', '{{call_number.label}}', '{{call_number.suffix}}') %]</div>
+ <div>[% l('Call Number: [_1] [_2] [_3]', '{{copy.call_number.prefix.name}}', '{{copy.call_number.label}}', '{{copy.call_number.suffix.name}}') %]</div>
<br/>
<br/>
* dest_courier_code - from lib.courier_code library setting
* hold.behind_desk
* copy.barcode
+* copy.status.name - Transit copy status
* title
* patron.family_name
* patron.first_given_name
Template for printing a list of items that a patron has checked out.
Fields include:
-* patron - has several fields from the patron object, including a financial summary
+* patron - has several fields from the patron object, including a
+ financial summary
* first_given_name
* second_given_name
* has_email - boolean value to show/hide elements on the receipt
* has_phone - same as has_email
-* circulations - list of current loans, including
+* circulations - list of current loans, including for each
+ checkout
- * title
- * author
- * call_number.label
- * copy.barcode
- * circ.due_date
+ * checkout.title
+ * checkout.author
+ * checkout.circ.due_date
+ * checkout.circ.renewal_remaining
+ * checkout.copy.barcode
+ * checkout.copy.circ_modifier.name
+ * checkout.copy.call_number.label
+ * checkout.copy.call_number.owning_lib.name
+ * checkout.copy.call_number.owning_lib.shortname
+ * checkout.copy.location.name [Shelving location]
-->
<div>
Template for printing a renewal receipt. Fields include:
* circulations - list of renewals made during the session, including
+ for each renewal:
- * title
- * copy.barcode
- * circ.due_date
+ * renewal.title
+ * renewal.author
+ * renewal.circ.due_date
+ * renewal.circ.renewal_remaining
+ * renewal.circ.circ_lib
+ * renewal.circ.duration
+ * renewal.copy.barcode
+ * renewal.copy.circ_modifier
+ * renewal.copy.call_number.label
+ * renewal.copy.call_number.owning_lib.name
+ * renewal.copy.call_number.owning_lib.shortname
-->
<div>
* dest_address.post_code
* dest_courier_code - from lib.courier_code library setting
* copy.barcode
+* copy.status.name - Transit copy status
* title
* author
-->
var seed_copy = {
barcode : '33434322323',
+ status : {
+ name : 'In transit'
+ };
call_number : {
label : '636.8 JON',
record : {
simple_record : {
'title' : 'Test Title'
}
+ },
+ owning_lib : {
+ name : 'Ankers Memorial Library',
+ shortname : 'Ankers'
+ },
+ prefix : {
+ name : 'DISPLAY'
+ },
+ suffix : {
+ name : 'REF'
}
},
+ circ_modifier : {
+ name : 'Book'
+ },
location : {
name : 'General Collection'
},
+ status : {
+ name : 'In Transit'
+ },
// flattened versions for item status template
// TODO - make this go away
'call_number.label' : '636.8 JON',
'call_number.record.simple_record.title' : 'Test Title',
- 'location.name' : 'General Colleciton'
+<<<<<<< HEAD
+ 'location.name' : 'General Collection',
+ 'call_number.owning_lib.name' : 'Ankers Memorial Library',
+ 'call_number.owning_lib.shortname' : 'Ankers'
+=======
+ 'location.name' : 'General Collection'
+>>>>>>> 5a56beb... LP1823197: Provide call number prefix and suffix on hold shelf slip
}
var one_hold = {
email_notify : 'user@example.org',
request_time : new Date().toISOString(),
hold_type : 'T',
- shelf_expire_time : new Date().toISOString()
+ shelf_expire_time : new Date().toISOString(),
+ pickup_lib : {
+ name : 'Holder Public Library',
+ shortname : 'Holder'
+ }
}
var seed_transit = {
xact_start : new Date().toISOString(),
xact_finish : new Date().toISOString(),
summary : {
- xact_type : 'circulation',
+ balance_owed : 1.00,
+ last_billing_note : 'Test Note 1',
last_billing_type : 'Overdue materials',
- total_owed : 1.50,
last_payment_note : 'Test Note 1',
- last_payment_type : 'cash_payment',
last_payment_ts : new Date().toISOString(),
+ last_payment_type : 'cash_payment',
+ total_owed : 1.50,
total_paid : 0.50,
- balance_owed : 1.00
- }
+ xact_type : 'circulation'
+ },
+ call_number : {
+ label : 'GL 510.2',
+ prefix : 'DISPLAY',
+ suffix : 'YA',
+ owning_lib : {
+ name : 'Regina Public Library'
+ }
+ }
}, {
id : 2,
xact_start : new Date().toISOString(),
xact_finish : new Date().toISOString(),
summary : {
- xact_type : 'circulation',
+ balance_owed : 1.00,
+ last_billing_note : 'Test Note 2',
last_billing_type : 'Overdue materials',
- total_owed : 2.50,
last_payment_note : 'Test Note 2',
- last_payment_type : 'credit_payment',
last_payment_ts : new Date().toISOString(),
+ last_payment_type : 'credit_payment',
+ total_owed : 1.50,
total_paid : 0.50,
- balance_owed : 2.00
+ xact_type : 'circulation'
+ },
+ call_number : {
+ label : 'GL 510.2',
+ prefix : 'DISPLAY',
+ suffix : 'YA',
+ owning_lib : {
+ name : 'Regina Public Library'
+ }
+ }
}
- }
- ],
+ ],
copy : seed_copy,
copies : [ seed_copy ],
circ : {
due_date : new Date().toISOString(),
circ_lib : 1,
- duration : '7 days'
+ duration : '7 days',
+ renewal_remaining : 2
},
copy : seed_copy,
title : seed_record.title,
author : seed_record.author
- },
+ }
],
patron_money : {
transits : [ seed_transit ],
title : seed_record.title,
author : seed_record.author,
+ call_number : {
+ label : '646.5',
+ prefix : 'DISPLAY',
+ suffix : 'REF'
+ },
patron : seed_user,
address : seed_addr,
dest_location : egCore.idl.toHash(egCore.org.get(egCore.auth.user().ws_ou())),
'mbt' : ['summary', 'circulation'],
'circ' : ['target_copy'],
'acp' : ['call_number'],
- 'acn' : ['record'],
+ 'acn' : ['record','owning_lib','prefix','suffix'],
'bre' : ['simple_record']
}
},
xact_start : xact.xact_start(),
}
if (xact.circulation()) {
- newXact.copy_barcode = xact.circulation().target_copy().barcode(),
- newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title()
+ newXact.copy_barcode = xact.circulation().target_copy().barcode();
+ newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title();
+ newXact.call_number = {
+ label : xact.circulation().target_copy().call_number().label(),
+ prefix : xact.circulation().target_copy().call_number().prefix().label(),
+ suffix : xact.circulation().target_copy().call_number().suffix().label(),
+ owning_lib : {
+ name : xact.circulation().target_copy().call_number().owning_lib().name(),
+ shortname : xact.circulation().target_copy().call_number().owning_lib().shortname()
+ }
+ }
}
xacts.push(newXact);
}
'mbt' : ['summary', 'circulation'],
'circ' : ['target_copy'],
'acp' : ['call_number'],
- 'acn' : ['record'],
+ 'acn' : ['record','owning_lib','prefix','suffix'],
'bre' : ['simple_record']
}
},
}
if (xact.circulation()) {
newXact.copy_barcode = xact.circulation().target_copy().barcode(),
- newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title()
+ newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title();
+ newXact.call_number = {
+ label : xact.circulation().target_copy().call_number().label(),
+ prefix : xact.circulation().target_copy().call_number().prefix().label(),
+ suffix : xact.circulation().target_copy().call_number().suffix().label(),
+ owning_lib : {
+ name : xact.circulation().target_copy().call_number().owning_lib().name(),
+ shortname : xact.circulation().target_copy().call_number().owning_lib().shortname()
+ }
+ }
}
xacts.push(newXact);
}
call_number : egCore.idl.toHash(co.acn),
title : co.title,
author : co.author
- })
+ });
+ // Flesh selected fields of this circulation
+ print_data.circulations[0].copy.call_number =
+ egCore.idl.toHash(co.acn);
};
});
title : circ.target_copy().call_number().record().wide_display_entry().title(),
author : circ.target_copy().call_number().record().wide_display_entry().author()
})
+ // Flesh selected fields of this circulation
+ print_data.circulations[0].copy.call_number =
+ egCore.idl.toHash(circ.target_copy().call_number());
});
print_data.patron = {
title : egCore.idl.toHash(renewal.title),
author : egCore.idl.toHash(renewal.author)
});
+ // Flesh selected fields of this circulation
+ print_data.circulations[0].copy.call_number =
+ egCore.idl.toHash(renewal.acn);
+ print_data.circulations[0].copy.owning_lib =
+ egCore.idl.toHash(renewal.aou);
}
});
call_number : egCore.idl.toHash(evt.payload.volume)
};
+ // Define prefix and suffix in print_context
+
+ if (typeof print_context.call_number.prefix == 'object') {
+ print_context.call_number.prefix = "";
+ } else {
+ egCore.pcrud.retrieve('acnp', print_context.call_number.prefix)
+ .then(function(p) {
+ print_context.call_number.prefix =
+ egCore.idl.toHash(p).label;
+ })
+ }
+ if (typeof print_context.call_number.suffix == 'object') {
+ print_context.call_number.suffix = "";
+ } else {
+ egCore.pcrud.retrieve('acns', print_context.call_number.suffix)
+ .then(function(s) {
+ print_context.call_number.suffix =
+ egCore.idl.toHash(s).label;
+ })
+ }
+
var acn = print_context.call_number; // fix up pre/suffixes
if (acn.prefix == -1) acn.prefix = "";
if (acn.suffix == -1) acn.suffix = "";