From: Galen Charlton Date: Sat, 5 Feb 2022 17:33:30 +0000 (-0500) Subject: LP#1929741: update LI worksheet template X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bb4e1bc85ad9fba90693872fdc4bab563c7ee1dc;p=working%2FEvergreen.git LP#1929741: update LI worksheet template This commit adds back various elements to better match the Dojo version of the template. This commmit also corrects some IDs in the upgrade script. Signed-off-by: Galen Charlton Signed-off-by: Ruth Frasur Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 95cda0bbec..7935ff97d3 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -22281,6 +22281,7 @@ VALUES ( $TEMPLATE$ [%- USE money=format('%.2f'); + USE date; SET li = template_data.lineitem; SET title = ''; SET author = ''; @@ -22295,13 +22296,88 @@ $TEMPLATE$ END; -%] -
Title: [% title.substr(0, 80) %][% IF title.length > 80 %]...[% END %]
-
Author: [% author %]
-
Item Count: [% li.lineitem_details.size %]
-
Lineitem ID: [% li.id %]
-
PO # : [% li.purchase_order%]
-
Est. Price: [% money(li.estimated_unit_price) %]
+
+
+
Title: [% title.substr(0, 80) %][% IF title.length > 80 %]...[% END %]
+
Author: [% author %]
+
Item Count: [% li.lineitem_details.size %]
+
Lineitem ID: [% li.id %]
+
PO # : [% li.purchase_order %]
+
Est. Price: [% money(li.estimated_unit_price) %]
+
Open Holds: [% template_data.hold_count %]
+ [% IF li.cancel_reason.label %] +
[% li.cancel_reason.label %]
+ [% END %] + + [% IF li.distribution_formulas.size > 0 %] + [% SET forms = [] %] + [% FOREACH form IN li.distribution_formulas; forms.push(form.formula.name); END %] +
Distribution Formulas: [% forms.join(',') %]
+ [% END %] + + [% IF li.lineitem_notes.size > 0 %] + Lineitem Notes: +
    + [%- FOR note IN li.lineitem_notes -%] +
  • + [% IF note.alert_text %] + [% note.alert_text.code -%] + [% IF note.value -%] + : [% note.value %] + [% END %] + [% ELSE %] + [% note.value -%] + [% END %] +
  • + [% END %] +
+ [% END %] +
+
+ + + + + + + + + + + + + + + + [% FOREACH detail IN li.lineitem_details %] + [% detail.owning_lib = detail.owning_lib.shortname %] + [% END %] + [% FOREACH detail IN li.lineitem_details.sort('owning_lib') %] + [% + IF detail.eg_copy_id; + SET copy = detail.eg_copy_id; + SET cn_label = copy.call_number.label; + ELSE; + SET copy = detail; + SET cn_label = detail.cn_label; + END + %] + + + + + + + + + + + + [% END %] + +
BranchBarcodeCall NumberFundShelving LocationRecd.NotesDelayed / Canceled
[% detail.owning_lib %][% IF copy.barcode %][% detail.barcode %][% END %][% IF cn_label %][% cn_label %][% END %][% IF detail.fund %][% detail.fund.code %] ([% detail.fund.year %])[% END %][% copy.location.name %][% IF detail.recv_time %][% date.format(helpers.format_date(detail.recv_time, staff_org_timezone), '%x %r', locale) %][% END %][% detail.note %][% detail.cancel_reason.label %]
+
$TEMPLATE$ ); diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.picklist-po-angular.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.picklist-po-angular.sql index 242da1065b..610adc3f51 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.picklist-po-angular.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.picklist-po-angular.sql @@ -54,10 +54,11 @@ VALUES ( INSERT INTO config.print_template (id, name, label, owner, active, locale, template) VALUES ( - 4, 'lineitem_worksheet', 'Lineitem Worksheet', 1, TRUE, 'en-US', + 5, 'lineitem_worksheet', 'Lineitem Worksheet', 1, TRUE, 'en-US', $TEMPLATE$ [%- USE money=format('%.2f'); + USE date; SET li = template_data.lineitem; SET title = ''; SET author = ''; @@ -72,19 +73,94 @@ $TEMPLATE$ END; -%] -
Title: [% title.substr(0, 80) %][% IF title.length > 80 %]...[% END %]
-
Author: [% author %]
-
Item Count: [% li.lineitem_details.size %]
-
Lineitem ID: [% li.id %]
-
PO # : [% li.purchase_order%]
-
Est. Price: [% money(li.estimated_unit_price) %]
+
+
+
Title: [% title.substr(0, 80) %][% IF title.length > 80 %]...[% END %]
+
Author: [% author %]
+
Item Count: [% li.lineitem_details.size %]
+
Lineitem ID: [% li.id %]
+
PO # : [% li.purchase_order %]
+
Est. Price: [% money(li.estimated_unit_price) %]
+
Open Holds: [% template_data.hold_count %]
+ [% IF li.cancel_reason.label %] +
[% li.cancel_reason.label %]
+ [% END %] + + [% IF li.distribution_formulas.size > 0 %] + [% SET forms = [] %] + [% FOREACH form IN li.distribution_formulas; forms.push(form.formula.name); END %] +
Distribution Formulas: [% forms.join(',') %]
+ [% END %] + + [% IF li.lineitem_notes.size > 0 %] + Lineitem Notes: +
    + [%- FOR note IN li.lineitem_notes -%] +
  • + [% IF note.alert_text %] + [% note.alert_text.code -%] + [% IF note.value -%] + : [% note.value %] + [% END %] + [% ELSE %] + [% note.value -%] + [% END %] +
  • + [% END %] +
+ [% END %] +
+
+ + + + + + + + + + + + + + + + [% FOREACH detail IN li.lineitem_details %] + [% detail.owning_lib = detail.owning_lib.shortname %] + [% END %] + [% FOREACH detail IN li.lineitem_details.sort('owning_lib') %] + [% + IF detail.eg_copy_id; + SET copy = detail.eg_copy_id; + SET cn_label = copy.call_number.label; + ELSE; + SET copy = detail; + SET cn_label = detail.cn_label; + END + %] + + + + + + + + + + + + [% END %] + +
BranchBarcodeCall NumberFundShelving LocationRecd.NotesDelayed / Canceled
[% detail.owning_lib %][% IF copy.barcode %][% detail.barcode %][% END %][% IF cn_label %][% cn_label %][% END %][% IF detail.fund %][% detail.fund.code %] ([% detail.fund.year %])[% END %][% copy.location.name %][% IF detail.recv_time %][% date.format(helpers.format_date(detail.recv_time, staff_org_timezone), '%x %r', locale) %][% END %][% detail.note %][% detail.cancel_reason.label %]
+
$TEMPLATE$ ); INSERT INTO config.print_template (id, name, label, owner, active, locale, template) -VALUES (5, 'purchase_order', 'Purchase Order', 1, TRUE, 'en-US', +VALUES (6, 'purchase_order', 'Purchase Order', 1, TRUE, 'en-US', $TEMPLATE$ [%-