Acq: show provider name in the PO viewing interface
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 26 Mar 2010 14:37:12 +0000 (14:37 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 26 Mar 2010 14:37:12 +0000 (14:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16003 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
Open-ILS/web/js/ui/default/acq/po/view_po.js
Open-ILS/web/templates/default/acq/po/view.tt2

index 69e1a8e..676e792 100644 (file)
@@ -902,6 +902,9 @@ sub retrieve_purchase_order_impl {
     if ($options->{"flesh_notes"}) {
         push @{$flesh->{"flesh_fields"}->{"acqpo"}}, "notes";
     }
+    if ($options->{"flesh_provider"}) {
+        push @{$flesh->{"flesh_fields"}->{"acqpo"}}, "provider";
+    }
     my $po = $e->retrieve_acq_purchase_order([$po_id, $flesh])
         or return $e->event;
 
index 72e7ce1..60cf428 100644 (file)
@@ -252,6 +252,7 @@ function makeCancelWidget(node, labelnode) {
 function renderPo() {
     dojo.byId("acq-po-view-id").innerHTML = PO.id();
     dojo.byId("acq-po-view-name").innerHTML = PO.name();
+    dojo.byId("acq-po-view-provider").innerHTML = PO.provider().name();
     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();
@@ -289,6 +290,7 @@ function init() {
         ['open-ils.acq', 'open-ils.acq.purchase_order.retrieve'],
         {   async: true,
             params: [openils.User.authtoken, poId, {
+                "flesh_provider": true,
                 "flesh_price_summary": true,
                 "flesh_lineitem_count": true,
                 "flesh_notes": true
index 4c43c7a..b5c45aa 100644 (file)
@@ -9,6 +9,7 @@
             <table class='oils-generic-table'>
                 <tr><td>ID</td><td><a id='acq-po-view-id'/></td></tr>
                 <tr><td>Name</td><td><a id='acq-po-view-name' href='javascript:void(0);' onclick='updatePoName()'></a></td></tr>
+                <tr><td>Provider</td><td><span id="acq-po-view-provider"/></td></tr>
                 <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>