1 function InvoiceLinkDialogManager(which, target) {
5 this.linkFoundInvoice = function(r) {
6 self.inv = openils.Util.readResponse(r);
7 var path = oilsBasePath + "/acq/invoice/view/" + self.inv.id();
8 if (!dojo.isArray(self.target)) self.target = [self.target];
9 dojo.forEach(self.target, function(target, idx) {
10 id = (typeof target != 'object') ? target : target.id();
11 var join = (idx == 0) ? '?' : '&';
12 path += join + "attach_" + self.which + "=" + id;
21 new openils.widget.AutoFieldWidget({
22 "fmField": "provider",
24 "parentNode": dojo.byId("acq-" + this.which + "-link-invoice-provider"),
25 "orgLimitPerms": ["VIEW_INVOICE"],
29 dijit.byId("acq-" + this.which + "-link-invoice-link").onClick =
34 "provider": dijit.byId(
35 "acq-" + self.which + "-link-invoice-provider"
39 "acq-" + self.which + "-link-invoice-inv_ident"
44 "onresponse": self.linkFoundInvoice,
45 "oncomplete": function() {
47 alert(localeStrings.NO_FIND_INVOICE);