|
Lines 576-591
Link Here
|
| 576 |
[% INCLUDE 'calendar.inc' %] |
576 |
[% INCLUDE 'calendar.inc' %] |
| 577 |
[% INCLUDE 'datatables.inc' %] |
577 |
[% INCLUDE 'datatables.inc' %] |
| 578 |
[% Asset.js("js/modals/edifact-modal.js") | $raw %] |
578 |
[% Asset.js("js/modals/edifact-modal.js") | $raw %] |
|
|
579 |
<script> |
| 580 |
addPrefs({ |
| 581 |
AcqEnableFiles: [% Koha.Preference('AcqEnableFiles') ? 1 : 0 | html %], |
| 582 |
}); |
| 583 |
const invoiceincgst = [% invoiceincgst ? 1 : 0 | html %]; |
| 584 |
const has_files = [% files ? 1 : 0 | html %]; |
| 585 |
</script> |
| 586 |
|
| 579 |
<script> |
587 |
<script> |
| 580 |
function updateColumnsVisibility(visible) { |
588 |
function updateColumnsVisibility(visible) { |
| 581 |
if ( visible ) { |
589 |
if ( visible ) { |
| 582 |
$("table .tax_excluded, .tax_included").show(); |
590 |
$("table .tax_excluded, .tax_included").show(); |
| 583 |
} else { |
591 |
} else { |
| 584 |
[% IF ( invoiceincgst ) %] |
592 |
if (invoiceincgst){ |
| 585 |
$("table .tax_excluded").hide(); |
593 |
$("table .tax_excluded").hide(); |
| 586 |
[% ELSE %] |
594 |
} else { |
| 587 |
$("table .tax_included").hide(); |
595 |
$("table .tax_included").hide(); |
| 588 |
[% END %] |
596 |
} |
| 589 |
} |
597 |
} |
| 590 |
} |
598 |
} |
| 591 |
|
599 |
|
|
Lines 596-609
Link Here
|
| 596 |
searching: false, |
604 |
searching: false, |
| 597 |
dom: "t", |
605 |
dom: "t", |
| 598 |
}); |
606 |
}); |
| 599 |
[% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %] |
607 |
if (prefs.AcqEnableFiles && has_files){ |
| 600 |
$("#invoice_files_table").kohaTable({ |
608 |
$("#invoice_files_table").kohaTable({ |
| 601 |
info: false, |
609 |
info: false, |
| 602 |
paging: false, |
610 |
paging: false, |
| 603 |
searching: false, |
611 |
searching: false, |
| 604 |
dom: "t", |
612 |
dom: "t", |
| 605 |
}); |
613 |
}); |
| 606 |
[% END %] |
614 |
} |
| 607 |
$("#show_all_details").click(function(){ |
615 |
$("#show_all_details").click(function(){ |
| 608 |
updateColumnsVisibility( $(this).is(":checked") ); |
616 |
updateColumnsVisibility( $(this).is(":checked") ); |
| 609 |
}); |
617 |
}); |
| 610 |
- |
|
|