Lines 555-561
Link Here
|
555 |
$(document).ready(function(){ |
555 |
$(document).ready(function(){ |
556 |
// keep a copy for re-rendering |
556 |
// keep a copy for re-rendering |
557 |
var $funds_tree = $('#bookfund').html(); |
557 |
var $funds_tree = $('#bookfund').html(); |
558 |
var base_query = { "me.order_id": {"in": [[% multiple_orders | html %]]}}; |
558 |
var base_query = { "me.order_id": {"-in": [[% multiple_orders | html %]]}}; |
559 |
var pending_orders_url = "/api/v1/acquisitions/orders?only_active=1"; |
559 |
var pending_orders_url = "/api/v1/acquisitions/orders?only_active=1"; |
560 |
var options = { |
560 |
var options = { |
561 |
"ajax": { |
561 |
"ajax": { |
Lines 697-703
Link Here
|
697 |
params['ordernumber'] = row.order_id; |
697 |
params['ordernumber'] = row.order_id; |
698 |
params['booksellerid'] = row.basket.vendor_id; |
698 |
params['booksellerid'] = row.basket.vendor_id; |
699 |
|
699 |
|
700 |
if(row.suggestions && row.suggestions[0].reason) { |
700 |
if(row.suggestions?.length && row.suggestions[0].reason) { |
701 |
|
701 |
|
702 |
params["suggestionid"] = row.suggestions[0].suggestion_id; |
702 |
params["suggestionid"] = row.suggestions[0].suggestion_id; |
703 |
const options = Array.from(document.querySelectorAll('#reason option')); |
703 |
const options = Array.from(document.querySelectorAll('#reason option')); |
Lines 1042-1048
Link Here
|
1042 |
"data": function(row, type, val, meta) { |
1042 |
"data": function(row, type, val, meta) { |
1043 |
if(row.invoice) { |
1043 |
if(row.invoice) { |
1044 |
if(CAN_user_acquisition) { |
1044 |
if(CAN_user_acquisition) { |
1045 |
return '<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid='+row.invoice_id+'" title="Invoice detail page">'+row.invoice.invoice_number+"</a>"; |
1045 |
return '<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid='+encodeURIComponent(row.invoice_id)+'" title="Invoice detail page">'+escape_str(row.invoice.invoice_number)+"</a>"; |
1046 |
} |
1046 |
} |
1047 |
return row.invoice.invoice_number; |
1047 |
return row.invoice.invoice_number; |
1048 |
} |
1048 |
} |
Lines 1138-1154
Link Here
|
1138 |
o.parent().hide(); |
1138 |
o.parent().hide(); |
1139 |
} |
1139 |
} |
1140 |
}); |
1140 |
}); |
1141 |
if(row.suggestions) { |
1141 |
if(row.suggestions?.length) { |
1142 |
$("#suggestion_fieldset").show(); |
1142 |
$("#suggestion_fieldset").show(); |
1143 |
if(row.suggestions[0].suggester) { |
1143 |
if(row.suggestions[0].suggester) { |
1144 |
$("#biblio_suggestion_suggester").parent().show(); |
1144 |
$("#biblio_suggestion_suggester").parent().show(); |
1145 |
$("#biblio_suggestion_suggester") |
1145 |
$("#biblio_suggestion_suggester") |
1146 |
.html( |
1146 |
.html( |
1147 |
[row.suggestions[0].suggester.surname, row.suggestions[0].suggester.firstname] |
1147 |
[escape_str(row.suggestions[0].suggester.surname), escape_str(row.suggestions[0].suggester.firstname)] |
1148 |
.filter(function(name){ |
1148 |
.filter(function(name){ |
1149 |
return name |
1149 |
return name |
1150 |
}) |
1150 |
}) |
1151 |
.join(', ')+' (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid='+row.suggestions[0].suggestion_id+'&op=show">'+SUGGESTION.format(row.suggestions[0].suggestion_id)+'</a>)' |
1151 |
.join(', ')+' (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid='+encodeURIComponent(row.suggestions[0].suggestion_id)+'&op=show">'+SUGGESTION.format(row.suggestions[0].suggestion_id)+'</a>)' |
1152 |
); |
1152 |
); |
1153 |
} else { |
1153 |
} else { |
1154 |
$("#biblio_suggestion_suggester").parent().hide(); |
1154 |
$("#biblio_suggestion_suggester").parent().hide(); |
1155 |
- |
|
|