From: erickson Date: Wed, 5 May 2010 17:45:07 +0000 (+0000) Subject: don't assume order date is set in invoice po_item rendering X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4d138f9fe4ce24152a17066b40179dadbba8ddda;p=evergreen%2Fbjwebb.git don't assume order date is set in invoice po_item rendering git-svn-id: svn://svn.open-ils.org/ILS/trunk@16390 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 da87e49dc..956ec7850 100644 --- a/Open-ILS/web/js/ui/default/acq/invoice/view.js +++ b/Open-ILS/web/js/ui/default/acq/invoice/view.js @@ -333,6 +333,8 @@ function addInvoiceItem(item) { var po_item = item.po_item(); var node = nodeByName('inv_item_type', row); var itemType = itemTypes.filter(function(t) { return (t.code() == item.inv_item_type()) })[0]; + orderDate = (!po.order_date()) ? '' : + dojo.date.locale.format(dojo.date.stamp.fromISOString(po.order_date()), {selector:'date'}); node.innerHTML = dojo.string.substitute( localeStrings.INVOICE_ITEM_PO_DETAILS, @@ -341,7 +343,7 @@ function addInvoiceItem(item) { oilsBasePath, po.id(), po.name(), - dojo.date.locale.format(dojo.date.stamp.fromISOString(po.order_date()), {selector:'date'}), + orderDate, po_item.estimated_cost() ] );