Bug 30070: (follow-up) Further javascript fixes
This fixes an issue with the datatables when a message file is found to be missing the linked vendor or basket details. This removes the datatables error: DataTables warning: table id=edi_msgs - Requested unknown parameter '4' for row 12, column 4. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
f4498d54ac
commit
a2fb53a719
|
|
@ -114,7 +114,13 @@
|
|||
"searchable": true,
|
||||
"orderable": true,
|
||||
"render": function(data, type, row, meta) {
|
||||
return '<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid="'+row.vendor_id+'>'+row.vendor.name+'</a>';
|
||||
let link;
|
||||
if ( row.vendor ) {
|
||||
link = '<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid='+row.vendor_id+'">'+row.vendor.name+'</a>';
|
||||
} else {
|
||||
link = '<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid='+row.vendor_id+'">'+row.vendor_id+'</a>';
|
||||
}
|
||||
return link;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -122,13 +128,15 @@
|
|||
"searchable": false,
|
||||
"orderable": false,
|
||||
"render": function(data, type, row, meta) {
|
||||
let rendered = '';
|
||||
if ( row.type == 'QUOTE' || row.type == 'ORDERS' ) {
|
||||
if ( row.basked_id ) {
|
||||
return '<a href="/cgi-bin/koha/acqui/basket.pl?basketno='+row.basked_id+'">Basket: '+row.basket_id+'</a>';
|
||||
if ( row.basket_id ) {
|
||||
rendered = '<a href="/cgi-bin/koha/acqui/basket.pl?basketno='+row.basket_id+'">Basket: '+row.basket_id+'</a>';
|
||||
}
|
||||
} else {
|
||||
return '<a href="/cgi-bin/koha/acqui/invoices.pl?message_id='+row.id+'&op=do_search">Invoices</a>';
|
||||
rendered = '<a href="/cgi-bin/koha/acqui/invoices.pl?message_id='+row.id+'&op=do_search">Invoices</a>';
|
||||
}
|
||||
return rendered;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue