[open-ils-commits] r16154 - in trunk/Open-ILS/web: css/skin/default js/ui/default/acq/common js/ui/default/acq/invoice js/ui/default/acq/po templates/default/acq/invoice templates/default/acq/po (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Apr 7 10:52:15 EDT 2010
Author: erickson
Date: 2010-04-07 10:52:12 -0400 (Wed, 07 Apr 2010)
New Revision: 16154
Removed:
trunk/Open-ILS/web/js/ui/default/acq/invoice/attach.js
trunk/Open-ILS/web/templates/default/acq/invoice/attach.tt2
Modified:
trunk/Open-ILS/web/css/skin/default/acq.css
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
trunk/Open-ILS/web/js/ui/default/acq/invoice/common.js
trunk/Open-ILS/web/js/ui/default/acq/invoice/view.js
trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js
trunk/Open-ILS/web/templates/default/acq/invoice/view.tt2
trunk/Open-ILS/web/templates/default/acq/po/view.tt2
Log:
More Invoice UI work. This covers:
New view interface
Creating new invoices directly in the view UI
Creating invices from PO/LI
Attaching PO/LI data to an existing invoice
UI for handling of prorated item types
Support for creating a new invoice fromt the po view page
Modified: trunk/Open-ILS/web/css/skin/default/acq.css
===================================================================
--- trunk/Open-ILS/web/css/skin/default/acq.css 2010-04-07 14:35:09 UTC (rev 16153)
+++ trunk/Open-ILS/web/css/skin/default/acq.css 2010-04-07 14:52:12 UTC (rev 16154)
@@ -197,6 +197,8 @@
/* INVOICING */
#oils-acq-invoice-table td { padding: 5px; }
+.oils-acq-invoice-table td { padding: 5px; vertical-align: bottom;}
+.oils-acq-invoice-table thead td { font-weight: bold; background: #e0e0e0;}
#acq-invoice-new-msg { font-weight: bold; margin: 10px;}
#acq-invoice-li-details { padding: 10px; font-weight: bold; border: 1px solid #888; margin: 10px; }
#acq-invoice-create { margin: 10px; }
Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2010-04-07 14:35:09 UTC (rev 16153)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2010-04-07 14:52:12 UTC (rev 16154)
@@ -376,7 +376,7 @@
actViewInvoice.disabled = false;
actNewInvoice.onclick = function() {
- location.href = oilsBasePath + '/acq/invoice/attach?create=1&attach_li=' + li.id();
+ location.href = oilsBasePath + '/acq/invoice/view?create=1&attach_li=' + li.id();
nodeByName("action_none", row).selected = true;
};
actLinkInvoice.onclick = function() {
Deleted: trunk/Open-ILS/web/js/ui/default/acq/invoice/attach.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/invoice/attach.js 2010-04-07 14:35:09 UTC (rev 16153)
+++ trunk/Open-ILS/web/js/ui/default/acq/invoice/attach.js 2010-04-07 14:52:12 UTC (rev 16154)
@@ -1,162 +0,0 @@
-dojo.require('dojo.date.locale');
-dojo.require('dojo.date.stamp');
-dojo.require('dijit.layout.ContentPane');
-dojo.require('dijit.form.TextBox');
-dojo.require('dijit.form.NumberTextBox');
-dojo.require('dijit.form.CurrencyTextBox');
-dojo.require('openils.User');
-dojo.require('openils.Util');
-dojo.require('openils.PermaCrud');
-dojo.require('openils.widget.AutoFieldWidget');
-
-dojo.requireLocalization('openils.acq', 'acq');
-var localeStrings = dojo.i18n.getLocalization('openils.acq', 'acq');
-
-var pcrud = new openils.PermaCrud();
-var cgi = new openils.CGI();
-var doCreate = false;
-var invoiceId;
-var lineitem;
-var invoicePane;
-var entryPane;
-
-function init() {
-
- invoiceId = cgi.param('invoice_id');
- doCreate = cgi.param('create');
- attachLi = cgi.param('attach_li');
-
- invoicePane = drawInvoicePane(dojo.byId('acq-view-invoice-div'));
-
- fieldmapper.standardRequest(
- ["open-ils.acq", "open-ils.acq.lineitem.retrieve"], {
- async: true,
- params: [openils.User.authtoken, attachLi, {
- flesh_attrs: true,
- flesh_li_details: true,
- flesh_cancel_reason: true,
- flesh_po : true,
- flesh_pl : true
- }],
- oncomplete: function(r) {
- lineitem = openils.Util.readResponse(r);
- drawPage();
- }
- }
- );
-
- dojo.connect(createInvoiceButton, 'onClick', function() { createInvoice(); });
-}
-
-function liMarcAttr(name) {
- var attr = lineitem.attributes().filter(
- function(attr) {
- if(
- attr.attr_type() == 'lineitem_marc_attr_definition' &&
- attr.attr_name() == name)
- return attr
- }
- )[0];
- return (attr) ? attr.attr_value() : '';
-}
-
-function drawPage() {
-
- var idents = [];
- if(liMarcAttr('isbn')) idents.push(liMarcAttr('isbn'));
- if(liMarcAttr('upc')) idents.push(liMarcAttr('upc'));
- if(liMarcAttr('issn')) idents.push(liMarcAttr('issn'));
-
- var orderDate = '';
- var po = lineitem.purchase_order();
- if(po.order_date()) {
- var dt = dojo.date.stamp.fromISOString(po.order_date());
- orderDate = dojo.date.locale.format(dt, {selector:'date'});
- }
-
- dojo.byId('acq-invoice-li-details').innerHTML =
- dojo.string.substitute(
- localeStrings.INVOICE_ITEM_DETAILS,
- [
- liMarcAttr('title'),
- liMarcAttr('author'),
- idents.join(','),
- lineitem.estimated_unit_price() || '',
- lineitem.id(),
- lineitem.purchase_order().name(),
- orderDate
- ]
- );
-
- //invoicePo.attr('value', lineitem.purchase_order().name());
- //invoicePo.attr('disabled', true);
-
- //numCopiesInvoiced.attr('value', lineitem.lineitem_details().length);
-
- var numReceived = 0;
- dojo.forEach(lineitem.lineitem_details(), function(lid) { if(lid.recv_time) numReceived++ });
- //numCopiesReceived.attr('value', numReceived);
-
- entryPane = new openils.widget.EditPane({
- fmClass : 'acqie',
- mode : 'create',
- hideActionButtons : true,
- existingTable : invoicePane.table,
- overrideWidgetArgs : {
- inv_item_count : {widgetValue : numReceived},
- phys_item_count : {widgetValue : numReceived}
- },
- fieldOrder : [
- 'purchase_order',
- 'inv_item_count',
- 'phys_item_count',
- 'cost_billed',
- 'note'
- ],
- suppressFields : [
- 'invoice',
- 'purchase_order',
- 'lineitem',
- 'actual_cost'
- ]
- });
- entryPane.startup();
-
-}
-
-
-function createInvoice() {
-
- var inv = new fieldmapper.acqinv();
- dojo.forEach(invoicePane.fieldList,
- function(field) {
- inv[field.name]( field.widget.getFormattedValue() );
- }
- );
-
- var entry = new fieldmapper.acqie();
- dojo.forEach(entryPane.fieldList,
- function(field) {
- entry[field.name]( field.widget.getFormattedValue() );
- }
- );
- entry.purchase_order(lineitem.purchase_order().id());
- entry.lineitem(lineitem.id());
-
- fieldmapper.standardRequest(
- ['open-ils.acq', 'open-ils.acq.invoice.create'],
- {
- params : [openils.User.authtoken, inv, [entry]],
- oncomplete : function(r) {
- var resp = openils.Util.readResponse(r);
- if(resp) {
- location.href =
- location.href.replace(/invoice\/attach.*/, 'invoice/view/' + resp.id());
- }
- }
- }
- );
-}
-
-openils.Util.addOnLoad(init);
-
Modified: trunk/Open-ILS/web/js/ui/default/acq/invoice/common.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/invoice/common.js 2010-04-07 14:35:09 UTC (rev 16153)
+++ trunk/Open-ILS/web/js/ui/default/acq/invoice/common.js 2010-04-07 14:52:12 UTC (rev 16154)
@@ -2,7 +2,8 @@
dojo.require('openils.User');
dojo.require('openils.widget.EditPane');
-function drawInvoicePane(parentNode, inv) {
+function drawInvoicePane(parentNode, inv, args) {
+ args = args || {};
var override;
if(!inv) {
@@ -13,6 +14,10 @@
};
}
+ for(var field in args) {
+ override[field] = {widgetValue : args[field]};
+ }
+
var pane = new openils.widget.EditPane({
fmObject : inv,
fmClass : 'acqinv',
@@ -26,7 +31,8 @@
'inv_type',
'provider',
'shipper'
- ]
+ ],
+ suppressFields : ['id']
});
pane.startup();
Modified: trunk/Open-ILS/web/js/ui/default/acq/invoice/view.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/invoice/view.js 2010-04-07 14:35:09 UTC (rev 16153)
+++ trunk/Open-ILS/web/js/ui/default/acq/invoice/view.js 2010-04-07 14:52:12 UTC (rev 16154)
@@ -1,30 +1,306 @@
dojo.require('dojo.date.locale');
dojo.require('dojo.date.stamp');
+dojo.require('dijit.form.CheckBox');
+dojo.require('dijit.form.CurrencyTextBox');
+dojo.require('dijit.form.NumberTextBox');
dojo.require('openils.User');
dojo.require('openils.Util');
+dojo.require('openils.CGI');
dojo.require('openils.PermaCrud');
dojo.require('openils.widget.EditPane');
+dojo.require('openils.widget.AutoFieldWidget');
dojo.requireLocalization('openils.acq', 'acq');
var localeStrings = dojo.i18n.getLocalization('openils.acq', 'acq');
+var fundLabelFormat = ['${0} (${1})', 'code', 'year'];
+var fundSearchFormat = ['${0} (${1})', 'code', 'year'];
+
+var cgi = new openils.CGI();
var pcrud = new openils.PermaCrud();
+var attachLi;
+var attachPo;
var invoice;
+var itemTbody;
+var itemTemplate;
+var entryTemplate;
+var totalAmountBox;
+var invoicePane;
+var itemTypes;
+function nodeByName(name, context) {
+ return dojo.query('[name='+name+']', context)[0];
+}
+
function init() {
+ attachLi = cgi.param('attach_li');
+ attachPo = cgi.param('attach_po');
+
+ itemTypes = pcrud.retrieveAll('aiit');
+
+ if(cgi.param('create')) {
+ renderInvoice();
+
+ } else {
+ fieldmapper.standardRequest(
+ ['open-ils.acq', 'open-ils.acq.invoice.retrieve'],
+ {
+ params : [openils.User.authtoken, invoiceId],
+ oncomplete : function(r) {
+ invoice = openils.Util.readResponse(r);
+ renderInvoice();
+ }
+ }
+ );
+ }
+}
+
+function renderInvoice() {
+
+ // in create mode, let the LI or PO render the invoice with seed data
+ if( !(cgi.param('create') && (attachPo || attachLi)) ) {
+ invoicePane = drawInvoicePane(dojo.byId('acq-view-invoice-div'), invoice);
+ }
+
+ dojo.byId('acq-invoice-new-item').onclick = function() {
+ addInvoiceItem(new fieldmapper.acqii());
+ }
+
+ addToTotal(0);
+
+ if(invoice) {
+ dojo.forEach(
+ invoice.items(),
+ function(item) {
+ addInvoiceItem(item);
+ }
+ );
+
+ dojo.forEach(
+ invoice.entries(),
+ function(entry) {
+ addInvoiceEntry(entry);
+ }
+ );
+ }
+
+ if(attachLi) doAttachLi();
+ if(attachPo) doAttachPo();
+}
+
+function doAttachLi() {
+
fieldmapper.standardRequest(
- ['open-ils.acq', 'open-ils.acq.invoice.retrieve'],
- {
- params : [openils.User.authtoken, invoiceId],
- oncomplete : function(r) {
- invoice = openils.Util.readResponse(r);
- drawInvoicePane(dojo.byId('acq-view-invoice-div'), invoice);
+ ["open-ils.acq", "open-ils.acq.lineitem.retrieve"], {
+ async: true,
+ params: [openils.User.authtoken, attachLi, {
+ clear_marc : true,
+ flesh_attrs : true,
+ flesh_po : true,
+ }],
+ oncomplete: function(r) {
+ lineitem = openils.Util.readResponse(r);
+
+ if(cgi.param('create')) {
+ // render the invoice using some seed data from the Lineitem
+ var invoiceArgs = {provider : lineitem.provider(), shipper : lineitem.provider()};
+ invoicePane = drawInvoicePane(dojo.byId('acq-view-invoice-div'), null, invoiceArgs);
+ }
+
+ var entry = new fieldmapper.acqie();
+ entry.isnew(true);
+ entry.lineitem(lineitem);
+ addInvoiceEntry(entry);
}
}
);
}
+function doAttachPo() {
+ fieldmapper.standardRequest(
+ ['open-ils.acq', 'open-ils.acq.purchase_order.retrieve'],
+ { async: true,
+ params: [openils.User.authtoken, attachPo, {
+ flesh_lineitems : true,
+ clear_marc : true
+ }],
+ oncomplete: function(r) {
+ var po = openils.Util.readResponse(r);
+
+ if(cgi.param('create')) {
+ // render the invoice using some seed data from the PO
+ var invoiceArgs = {provider : po.provider(), shipper : po.provider()};
+ invoicePane = drawInvoicePane(dojo.byId('acq-view-invoice-div'), null, invoiceArgs);
+ }
+
+ dojo.forEach(po.lineitems(),
+ function(lineitem) {
+ var entry = new fieldmapper.acqie();
+ entry.isnew(true);
+ entry.lineitem(lineitem);
+ addInvoiceEntry(entry);
+ }
+ );
+ }
+ }
+ );
+}
+
+function addToTotal(amount) {
+
+ var oldTotal = 0;
+ if(totalAmountBox) {
+ oldTotal = totalAmountBox.attr('value');
+ } else {
+ totalAmountBox = new dijit.form.CurrencyTextBox(
+ {style : 'width: 5em'}, dojo.byId('acq-invoice-total-invoiced'));
+ }
+
+ totalAmountBox.attr('value', Number(oldTotal + amount));
+}
+
+function addInvoiceItem(item) {
+ itemTbody = dojo.byId('acq-invoice-item-tbody');
+ if(itemTemplate == null) {
+ itemTemplate = itemTbody.removeChild(dojo.byId('acq-invoice-item-template'));
+ }
+
+ var row = itemTemplate.cloneNode(true);
+ var itemType = itemTypes.filter(function(t) { return (t.code() == item.inv_item_type()) })[0];
+
+ new dijit.form.TextBox({}, nodeByName('title', row));
+ new dijit.form.TextBox({}, nodeByName('author', row));
+ new dijit.form.CurrencyTextBox({required : true, style : 'width: 5em'}, nodeByName('cost_billed', row));
+
+
+ var fundDebit = item.fund_debit();
+ var fundFilter = {active : 't'};
+ if(fundDebit) {
+
+ // If a fund debit exists, this item has been "applied" to the invoice
+ fundFilter = {'-or' : [{id : fundDebit.fund()}, fundFilter]}
+
+ } else {
+
+ fundDebit = new fieldmapper.acqfdeb();
+ //new dijit.form.CheckBox({}, nodeByName('prorate', row));
+ }
+
+ var itemType = itemTypes.filter(function(t) { return (t.code() == item.inv_item_type()) })[0];
+
+ var fundWidget = new openils.widget.AutoFieldWidget({
+ fmObject : fundDebit,
+ fmField : 'fund',
+ labelFormat : fundLabelFormat,
+ searchFormat : fundSearchFormat,
+ searchFilter : fundFilter,
+ dijitArgs :
+ (!item.fund_debit() && itemType && openils.Util.isTrue(itemType.prorate())) ?
+ {disabled : true} : {},
+ parentNode : nodeByName('fund', row)
+ });
+ fundWidget.build();
+
+
+ new openils.widget.AutoFieldWidget({
+ fmObject : item,
+ fmField : 'inv_item_type',
+ parentNode : nodeByName('inv_item_type', row),
+ dijitArgs : {required : true}
+ }).build(
+ function(w, ww) {
+ // When the inv_item_type is set to prorate=true, don't allow the user the edit the fund
+ // since this charge will be prorated against (potentially) multiple funds
+ dojo.connect(w, 'onChange',
+ function() {
+ if(!item.fund_debit()) {
+ var itemType = itemTypes.filter(function(t) { return (t.code() == w.attr('value')) })[0];
+ if(openils.Util.isTrue(itemType.prorate())) {
+ fundWidget.widget.attr('disabled', true);
+ fundWidget.widget.attr('value', '');
+ } else {
+ fundWidget.widget.attr('disabled', false);
+ }
+ }
+ }
+ );
+ }
+ );
+
+ nodeByName('delete', row).onclick = function() {
+ // TODO: confirm, etc.
+ itemTbody.removeChild(row);
+ }
+
+ itemTbody.appendChild(row);
+}
+
+function addInvoiceEntry(entry) {
+ entryTbody = dojo.byId('acq-invoice-entry-tbody');
+ if(entryTemplate == null) {
+ entryTemplate = entryTbody.removeChild(dojo.byId('acq-invoice-entry-template'));
+ }
+
+ if(dojo.query('[lineitem=' + entry.lineitem().id() +']', entryTbody)[0])
+ // Is it ever valid to have multiple entries for 1 lineitem in a single invoice?
+ return;
+
+ var row = entryTemplate.cloneNode(true);
+ row.setAttribute('lineitem', entry.lineitem().id());
+ var lineitem = entry.lineitem();
+
+ var idents = [];
+ if(liMarcAttr(lineitem, 'isbn')) idents.push(liMarcAttr(lineitem, 'isbn'));
+ if(liMarcAttr(lineitem, 'upc')) idents.push(liMarcAttr(lineitem, 'upc'));
+ if(liMarcAttr(lineitem, 'issn')) idents.push(liMarcAttr(lineitem, 'issn'));
+
+ nodeByName('title', row).innerHTML = liMarcAttr(lineitem, 'title');
+ nodeByName('author', row).innerHTML = liMarcAttr(lineitem, 'author');
+ nodeByName('idents', row).innerHTML = idents.join(',');
+
+ if(entry.purchase_order()) {
+ openils.Util.show(nodeByName('purchase_order_span', row), 'inline');
+ nodeByName('purchase_order', row).innerHTML = entry.purchase_order().name();
+ nodeByName('purchase_order', row).onclick = function() {
+ location.href = oilsBasePath + '/acq/po/view/ ' + entry.purchase_order().id();
+ }
+ }
+
+ new dijit.form.NumberTextBox(
+ {value : entry.inv_item_count(), required : true, constraints : {min: 0}, style : 'width:5em'},
+ nodeByName('inv_item_count', row));
+
+ new dijit.form.NumberTextBox(
+ {value : entry.phys_item_count(), required : true, constraints : {min: 0}, style : 'width:5em'},
+ nodeByName('phys_item_count', row));
+
+ new dijit.form.CurrencyTextBox(
+ {value : entry.cost_billed(), required : true, style : 'width: 5em'},
+ nodeByName('cost_billed', row));
+
+ nodeByName('detach', row).onclick = function() {
+ // TODO: confirm, etc.
+ entryTbody.removeChild(row);
+ }
+
+ entryTbody.appendChild(row);
+}
+
+function liMarcAttr(lineitem, name) {
+ var attr = lineitem.attributes().filter(
+ function(attr) {
+ if(
+ attr.attr_type() == 'lineitem_marc_attr_definition' &&
+ attr.attr_name() == name)
+ return attr
+ }
+ )[0];
+ return (attr) ? attr.attr_value() : '';
+}
+
+
+
openils.Util.addOnLoad(init);
Modified: trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js 2010-04-07 14:35:09 UTC (rev 16153)
+++ trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js 2010-04-07 14:52:12 UTC (rev 16154)
@@ -287,6 +287,11 @@
if (PO.lineitem_count() > 1)
openils.Util.show("acq-po-split");
}
+
+ dojo.byId('acq-po-create-invoice-link').onclick =
+ function() {
+ location.href = oilsBasePath + '/acq/invoice/view?create=1&attach_po=' + poId;
+ };
}
Deleted: trunk/Open-ILS/web/templates/default/acq/invoice/attach.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/invoice/attach.tt2 2010-04-07 14:35:09 UTC (rev 16153)
+++ trunk/Open-ILS/web/templates/default/acq/invoice/attach.tt2 2010-04-07 14:52:12 UTC (rev 16154)
@@ -1,31 +0,0 @@
-[% WRAPPER 'default/base.tt2' %]
-[% ctx.page_title = 'Attach Invoice Entry' %]
-<script src='[% ctx.media_prefix %]/js/ui/default/acq/invoice/common.js'> </script>
-<script src='[% ctx.media_prefix %]/js/ui/default/acq/invoice/attach.js'> </script>
-<script type="text/javascript">var invoiceId = '[% ctx.page_args.0 %]';</script>
-<div dojoType="dijit.layout.ContentPane" style="height:100%">
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
- <div> Attach Invoice Entry </div>
- <div> </div>
- </div>
-
- <div id='acq-invoice-li-details'>
- </div>
-
- <div id='acq-invoice-new-msg'>
- This will create a new invoice. To link this item to an existing invoice,
- click <a href='javascript:void(0);' id='acq-invoice-link-existing'>here</a>.
- </div>
-
- <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-
- <!-- load the generic invoice table -->
- <div id='acq-invoice-create'>
- <div><div id='acq-view-invoice-div'/></div>
- <button dojoType='dijit.form.Button' jsId='createInvoiceButton'>Create & Continue</button>
- </div>
-
- </div>
-</div>
-[% END %]
Modified: trunk/Open-ILS/web/templates/default/acq/invoice/view.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/invoice/view.tt2 2010-04-07 14:35:09 UTC (rev 16153)
+++ trunk/Open-ILS/web/templates/default/acq/invoice/view.tt2 2010-04-07 14:52:12 UTC (rev 16154)
@@ -1,5 +1,5 @@
[% WRAPPER 'default/base.tt2' %]
-[% ctx.page_title = 'Invoice' %]
+[% ctx.page_title = 'Invoicing' %]
<script src='[% ctx.media_prefix %]/js/ui/default/acq/invoice/common.js'> </script>
<script src='[% ctx.media_prefix %]/js/ui/default/acq/invoice/view.js'> </script>
<script type="text/javascript">var invoiceId = '[% ctx.page_args.0 %]';</script>
@@ -14,5 +14,99 @@
<div id='acq-view-invoice-div'/>
</div>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <table class='oils-acq-invoice-table'>
+ <thead/>
+ <tbody>
+ <tr>
+ <td colspan='0'>
+ <h3>Bibliographic Items</h3>
+ </td>
+ </tr>
+ </tbody>
+ <!-- acq.invoice_entry -->
+ <thead>
+ <td>ISBN/UPC/ISSN</td>
+ <td>Title</td>
+ <td>Author</td>
+ <td># Items Invoiced / # Received</td>
+ <td>Amount Billed</td>
+ <td>Detach</td>
+ </thead>
+ <tbody id='acq-invoice-entry-tbody'>
+ <tr id='acq-invoice-entry-template'>
+ <td><div name='idents'/></td>
+ <td>
+ <span name='title'></span>
+ <span name='purchase_order_span' class='hidden'>
+ (PO: <a href='javascript:void(0);' name='purchase_order'></a>)
+ </span>
+ </td>
+ <td><div name='author'/></td>
+ <td nowrap='nowrap'>
+ <span name='inv_item_count'></span> / <span name='phys_item_count'></span>
+ </td>
+ <td><div name='cost_billed'/></td>
+ <td><a href='javascript:void(0);' name='detach'>Detach</a></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td style='margin-top:15px;' colspan='0'>
+ <h3>Taxes, Fees, Misc.</h3>
+ </td>
+ </tr>
+ </tbody>
+ <!-- acq.invoice_item -->
+ <thead>
+ <td>Charge Type</td>
+ <td>Title / Description (optional)</td>
+ <td>Author (optional)</td>
+ <td>Fund</td>
+ <td>Amount Billed</td>
+ <td>Delete</td>
+ </thead>
+ <tbody id='acq-invoice-item-tbody'>
+ <tr id='acq-invoice-item-template'>
+ <td><div name='inv_item_type'/></td>
+ <td><div name='title'/></td>
+ <td><div name='author'/></td>
+ <td><div name='fund'/></td>
+ <td><div name='cost_billed'/></td>
+ <td><a href='javascript:void(0);' name='delete'>Delete</a></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td colspan='0'>
+ <a href='javascript:void(0);' id='acq-invoice-new-item'>Add Invoice Item...</a>
+ </td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td style='margin-top:15px;' colspan='0'>
+ <h3> </h3>
+ </td>
+ </tr>
+ </tbody>
+ <thead>
+ <tr>
+ <td colspan='4'/>
+ <td>Total Amount</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td colspan='4' style='text-align:right;'>
+ <button dojoType='dijit.form.Button' jsId='invoiceSaveButton'>Save & Continue</button>
+ <button dojoType='dijit.form.Button' jsId='invoiceProcessButton'>Process Invoice</button>
+ </td>
+ <td><div id='acq-invoice-total-invoiced'/></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
</div>
[% END %]
Modified: trunk/Open-ILS/web/templates/default/acq/po/view.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/po/view.tt2 2010-04-07 14:35:09 UTC (rev 16153)
+++ trunk/Open-ILS/web/templates/default/acq/po/view.tt2 2010-04-07 14:52:12 UTC (rev 16154)
@@ -50,10 +50,12 @@
</td>
</tr>
<tr><td><a class="hidden" id="acq-po-split" href="javascript:void(0);" onclick="if (confirm(localeStrings.CONFIRM_SPLIT_PO)) splitPo();">Split Order by Lineitems</a></td></tr>
- <tr id='acq-po-invoices'> <!-- TODO: hidden until applicable -->
- <td>Invoice(s)</td>
+ <tr id='acq-po-view-invoices'> <!-- TODO: hidden until applicable -->
+ <td>Invoicing</td>
<td>
- <a href="javascript:void(0);" id="acq-po-view-invoices">(0)</a>
+ <a href="javascript:void(0);" id="acq-po-view-invoice-link">View Invoices(0)</a> /
+ <a href="javascript:void(0);" id="acq-po-create-invoice-link">Create Invoice</a> /
+ <a href="javascript:void(0);" id="acq-po-link-invoice-link">Link Invoice</a>
</td>
</tr>
</table>
More information about the open-ils-commits
mailing list