1 dojo.require('openils.widget.ProgressDialog');
3 function getInvIdent(rowIndex, item) {
6 "inv_ident": this.grid.store.getValue(item, "inv_ident") ||
7 this.grid.store.getValue(item, "id"),
8 "id": this.grid.store.getValue(item, "id")
13 function formatInvIdent(inv) {
15 return "<a href='" + oilsBasePath + "/acq/invoice/view/" +
16 inv.id + "'>" + inv.inv_ident + "</a>";
20 function printInvoiceVouchers() {
21 var inv_ids = dijit.byId("acq-unified-inv-grid").
22 getSelectedItems().map(function(o) {return o.id[0];});
24 progressDialog.show(true);
29 fieldmapper.standardRequest(
30 ["open-ils.acq", "open-ils.acq.invoice.print.html"], {
31 "params": [openils.User.authtoken, inv_ids],
33 "onresponse": function(r) {
34 if (r = openils.Util.readResponse(r)) {
36 html = "<style type='text/css'>.acq-invoice-" +
37 "voucher {page-break-after:always;}" +
40 html += r.template_output().data();
43 "oncomplete": function() {
44 progressDialog.hide();
45 openils.Util.printHtmlString(html);