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});
}
}
+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');
</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 %]