[open-ils-commits] r12913 - in trunk/Open-ILS/web: js/ui/default/acq/po templates/default/acq/po (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 19 21:01:31 EDT 2009
Author: erickson
Date: 2009-04-19 21:01:30 -0400 (Sun, 19 Apr 2009)
New Revision: 12913
Modified:
trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js
trunk/Open-ILS/web/templates/default/acq/po/view.tt2
Log:
show some PO summary info along the top
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 2009-04-20 00:44:51 UTC (rev 12912)
+++ trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js 2009-04-20 01:01:30 UTC (rev 12913)
@@ -13,10 +13,12 @@
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.purchase_order.retrieve'],
{ async: true,
- params: [openils.User.authtoken, poId],
+ params: [openils.User.authtoken, poId, {flesh_price_summary:true, flesh_lineitem_count:true}],
oncomplete: function(r) {
PO = openils.Util.readResponse(r);
- console.log('got PO');
+ dojo.byId('acq-po-view-total-li').innerHTML = PO.lineitem_count();
+ dojo.byId('acq-po-view-total-enc').innerHTML = PO.amount_encumbered();
+ dojo.byId('acq-po-view-total-spent').innerHTML = PO.amount_spent();
}
}
);
Modified: trunk/Open-ILS/web/templates/default/acq/po/view.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/po/view.tt2 2009-04-20 00:44:51 UTC (rev 12912)
+++ trunk/Open-ILS/web/templates/default/acq/po/view.tt2 2009-04-20 01:01:30 UTC (rev 12913)
@@ -6,6 +6,11 @@
<div>
Purchase Order
</div>
+ <table class='oils-generic-table'>
+ <tr><td>Total Lineitems</td><td><span id='acq-po-view-total-li'/></td></tr>
+ <tr><td>Total Encumbered</td><td>$<span id='acq-po-view-total-enc'/></td></tr>
+ <tr><td>Total Spent</td><td>$<span id='acq-po-view-total-spent'/></td></tr>
+ </table>
</div>
</div>
<script type="text/javascript">var poId = '[% ctx.page_args.0 %]';</script>
More information about the open-ils-commits
mailing list