From: Bill Erickson Date: Thu, 12 Apr 2018 20:03:54 +0000 (-0400) Subject: JBAS-1967 Display ERP close date in invoice UI X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f6905bbd83a9ccbb8b9663030170e4176b8c35ae;p=working%2FEvergreen.git 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 --- 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,