"COPIES_TO_RECEIVE": "Number of copies to receive: ",
"CREATE_PO_INVALID": "A purchase order must have an ordering agency and a provider.",
"INVOICE_COPY_COUNT_INFO": "Copies received on this invoice: ${0} out of ${1}.",
- "INVOICE_IDENT_COLLIDE": "There is already an invoice in the system with the given combination of 'Vendor Invoice ID' and 'Provider,' which is not allowed."
+ "INVOICE_IDENT_COLLIDE": "There is already an invoice in the system with the given combination of 'Vendor Invoice ID' and 'Provider,' which is not allowed.",
+ "NEW_INVOICE": "New Invoice"
}
var join = (idx == 0) ? '?' : '&';
path += join + "attach_" + self.which + "=" + id;
});
- location.href = path;
+ if (openils.XUL.isXUL()) {
+ openils.XUL.newTabEasy(
+ path,
+ /* tab title */ dojo.string.substitute(
+ localeStrings.INVOICE_NUMBER, [self.inv.inv_ident()]
+ ),
+ null,
+ true /* <browser> wrapper */
+ );
+ } else {
+ location.href = path;
+ }
};
this.which = which;
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;
+ if (openils.XUL.isXUL())
+ openils.XUL.newTabEasy(path, localeStrings.NEW_INVOICE, null, true);
+ else
+ location.href = path;
};
this.batchLinkInvoice = function(create) {