EDI: support po-name as secondary identifier
authorBill Erickson <berick@esilibrary.com>
Mon, 26 Nov 2012 15:10:36 +0000 (10:10 -0500)
committerBill Erickson <berick@esilibrary.com>
Mon, 26 Nov 2012 15:10:36 +0000 (10:10 -0500)
If enabled, the PO name value will be sent to the EDI generator to be
included in the EDI message as a secondary identifier for the purchase
order.  Vendors can then use this value as necessary, e.g. displaying
the PO name on the vendor order site.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
edi_order.tt2

index 2cca34d..9c6fe3b 100644 (file)
     ELSIF VENDOR_SAN == '1699342'; VENDOR_ULS = 1;
     END;
 
+    # if true, pass the PO name as a secondary identifier
+    # RFF+LI:<name>/li_id
+    INC_PO_NAME = 0;
+    IF VENDOR_INGRAM;
+        INC_PO_NAME = 1;
+    END;
+
     # GIR configuration --------------------------------------
 
     INC_COPIES = 1; # copies on/off switch
 
         "po_number":[% target.id %],
 
+        [% IF INC_PO_NAME %]
+        "po_name":"[% target.name | replace('\/', ' ') | replace('"', '\"') %]",
+        [% END %]
+
         "date":"[% date.format(date.now, '%Y%m%d') %]",
 
         "buyer":[