[open-ils-commits] r16210 - in trunk/Open-ILS/web: js/ui/default/conify/global/acq templates/default/conify/global/acq (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 12 13:26:41 EDT 2010
Author: senator
Date: 2010-04-12 13:26:37 -0400 (Mon, 12 Apr 2010)
New Revision: 16210
Modified:
trunk/Open-ILS/web/js/ui/default/conify/global/acq/provider.js
trunk/Open-ILS/web/templates/default/conify/global/acq/provider.tt2
Log:
Acq: Add a pane to show related invoices on provider interface
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/acq/provider.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/acq/provider.js 2010-04-12 15:31:11 UTC (rev 16209)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/acq/provider.js 2010-04-12 17:26:37 UTC (rev 16210)
@@ -85,6 +85,13 @@
phsListGrid.resetStore();
phsListGrid.loadAll({order_by:{acqphsm : 'provider'}}, {provider : providerId});
break;
+ case "tab-invoice":
+ invListGrid.resetStore();
+ invListGrid.loadAll(
+ {"order_by": {"acqinv": "provider"}},
+ {"provider": providerId}
+ );
+ break;
default:
paListGrid.overrideEditWidgets.provider = new
dijit.form.TextBox({disabled: 'true', value: providerId});
Modified: trunk/Open-ILS/web/templates/default/conify/global/acq/provider.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/acq/provider.tt2 2010-04-12 15:31:11 UTC (rev 16209)
+++ trunk/Open-ILS/web/templates/default/conify/global/acq/provider.tt2 2010-04-12 17:26:37 UTC (rev 16210)
@@ -29,6 +29,19 @@
}
}
+function getInvIdent(rowIndex, item) {
+ if (!item) return {};
+ return {
+ "id": this.grid.store.getValue(item, "id"),
+ "name": this.grid.store.getValue(item, "inv_ident")
+ };
+}
+
+function formatInvIdent(o) {
+ return "<a href='" + oilsBasePath + "/acq/invoice/view/" + o.id + "'>" +
+ o.name + "</a>";
+}
+
function getProviderName(rowIndex, item) {
if(!item) return '';
var name = this.grid.store.getValue(item, 'name');
@@ -195,6 +208,24 @@
</table>
</div>
</div>
+
+ <div dojoType="dijit.layout.ContentPane" title="Invoices" id="tab-invoice">
+ <big class="oils-acq-basic-roomy"><strong>Invoices</strong></big>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style="height:400px">
+ <table jsId="invListGrid"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['inv_ident', 'receiver', 'shipper']"
+ suppressFields="['id', 'provider']"
+ query="{id: '*'}"
+ fmClass="acqinv">
+ <thead>
+ <tr>
+ <th field="inv_ident" get="getInvIdent" formatter="formatInvIdent" />
+ <tr>
+ </thead>
+ </table>
+ </div>
+ </div>
</div>
</div>
[% END %]
More information about the open-ils-commits
mailing list