From f6905bbd83a9ccbb8b9663030170e4176b8c35ae Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 12 Apr 2018 16:03:54 -0400 Subject: [PATCH] JBAS-1967 Display ERP close date in invoice UI Display the new ERP close date field for staff in the invoice UI when either the invoice is closed or a value is present. Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/acq/invoice/view.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Open-ILS/web/js/ui/default/acq/invoice/view.js b/Open-ILS/web/js/ui/default/acq/invoice/view.js index 4dda75c2e7..e3d66c762a 100644 --- a/Open-ILS/web/js/ui/default/acq/invoice/view.js +++ b/Open-ILS/web/js/ui/default/acq/invoice/view.js @@ -1268,6 +1268,8 @@ function drawInvoicePane(parentNode, inv, args) { } } + dojo.mixin(override, {erp_export_date : {readOnly: true}}); + dojo.mixin(override, { provider : { dijitArgs : { @@ -1310,6 +1312,12 @@ function drawInvoicePane(parentNode, inv, args) { // Display the close date/by data for closed invoices. var readOnly = inv && inv.close_date(); var suppress = readOnly ? ['id'] : ['id', 'close_date', 'closed_by']; + + // Only hide the ERP export date when the invoice is still open + // and no value is present. A re-opened invoice can have an export + // date and we want that to be visible. + if (!readOnly && (!inv || !inv.erp_export_date())) + suppress.push('erp_export_date'); pane = new openils.widget.EditPane({ fmObject : inv, -- 2.11.0