<option mask='po' value='rollback_receive_po'>Un-Receive Purchase Order</option>
<option mask='po' value='print_po'>Print Purchase Order</option>
<option mask='po' value='po_history'>View PO History</option>
+ <option mask='po' value='batch_create_invoice'>[% l('Create Invoice From Selected Lineitems') %]</option>
+ <option mask='po' value='batch_link_invoice'>[% l('Link To Invoice for Selected Lineitems') %]</option>
</select>
<span id="acq-lit-export-attr-holder" class="hidden">
<input dojoType="dijit.form.FilteringSelect" id="acq-lit-export-attr" jsId="acqLitExportAttrSelector" labelAttr="description" searchAttr="description" />
location.href = oilsBasePath + '/acq/po/history/' + this.isPO;
break;
+ case 'batch_create_invoice':
+ this.batchCreateInvoice();
+ break;
+
+ case 'batch_link_invoice':
+ this.batchLinkInvoice();
+ break;
+
case 'receive_po':
this.receivePO();
break;
}
}
);
- }
+ };
+
+ this.batchCreateInvoice = function() {
+ var liIds = this.getSelected(false, null, true /* id_list */)
+ if (!liIds.length) return;
+ var path = oilsBasePath + '/acq/invoice/view?create=1';
+ dojo.forEach(liIds, function(li, idx) { path += '&attach_li=' + li });
+ location.href = path;
+ };
+ this.batchLinkInvoice = function(create) {
+ var liIds = this.getSelected(false, null, true /* id_list */)
+ if (!liIds.length) return;
+ if (!self.invoiceLinkDialogManager) {
+ self.invoiceLinkDialogManager =
+ new InvoiceLinkDialogManager("li");
+ }
+ self.invoiceLinkDialogManager.target = liIds;
+ acqLitLinkInvoiceDialog.show();
+ };
this.receivePO = function() {
if (!this.isPO) return;