3 INSERT INTO config.upgrade_log (version) VALUES ('0306'); --atz
5 UPDATE action_trigger.event_definition SET template =
7 [%# start JEDI document -%]
8 [%- BLOCK big_block -%]
10 "recipient":"[% target.provider.san %]",
11 "sender":"[% target.ordering_agency.mailing_address.san %]",
14 "po_number":[% target.id %],
15 "date":"[% date.format(date.now, '%Y%m%d') %]",
17 [%- IF target.provider.edi_default.vendcode -%]
18 "id":"[% target.ordering_agency.mailing_address.san _ ' ' _ target.provider.edi_default.vendcode %]",
21 "id":"[% target.ordering_agency.mailing_address.san %]"
25 [%- # target.provider.name (target.provider.id) -%]
26 "[% target.provider.san %]",
27 {"id-qualifier": 92, "id":"[% target.provider.id %]"}
29 "currency":"[% target.provider.currency_type %]",
31 [% FOR li IN target.lineitems %]
34 {"id-qualifier":"SA","id":"[% li.id %]"},
35 {"id-qualifier":"IB","id":"[% helpers.get_li_attr('isbn_13', li.attributes) || helpers.get_li_attr('isbn_10', li.attributes) %]"}
37 "price":[% li.estimated_unit_price || '0.00' %],
39 {"BTI":"[% helpers.get_li_attr('title', '', li.attributes) %]"},
40 {"BPU":"[% helpers.get_li_attr('publisher', '', li.attributes) %]"},
41 {"BPD":"[% helpers.get_li_attr('pubdate', '', li.attributes) %]"},
42 {"BPH":"[% helpers.get_li_attr('pagination','', li.attributes) %]"}
44 "quantity":[% li.lineitem_details.size %]
45 }[% UNLESS loop.last %],[% END %]
46 [%-# TODO: lineitem details (later) -%]
49 "line_items":[% target.lineitems.size %]
50 }] [% # close ORDERS array %]
51 }] [% # close body array %]
54 [% tempo = PROCESS big_block; helpers.escape_json(tempo) %]