Lines 17-22
Link Here
|
17 |
[% USE Branches %] |
17 |
[% USE Branches %] |
18 |
[% USE Price %] |
18 |
[% USE Price %] |
19 |
[% USE AuthorisedValues %] |
19 |
[% USE AuthorisedValues %] |
|
|
20 |
[% USE ColumnsSettings %] |
20 |
[% SET footerjs = 1 %] |
21 |
[% SET footerjs = 1 %] |
21 |
[% INCLUDE 'doc-head-open.inc' %] |
22 |
[% INCLUDE 'doc-head-open.inc' %] |
22 |
<title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title> |
23 |
<title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title> |
Lines 343-373
Link Here
|
343 |
|
344 |
|
344 |
<div id="acqui_basket_content" class="yui-g"> |
345 |
<div id="acqui_basket_content" class="yui-g"> |
345 |
[% IF ( books_loop ) %] |
346 |
[% IF ( books_loop ) %] |
346 |
<h2>Orders</h2> |
347 |
<h2>Orders</h2> |
347 |
<label for="show_all_details"> |
|
|
348 |
<input type="checkbox" style="vertical-align: middle;" id="show_all_details" /> |
349 |
Show all details |
350 |
</label> |
351 |
<table id="orders"> |
348 |
<table id="orders"> |
352 |
<thead> |
349 |
<thead> |
353 |
<tr> |
350 |
<tr> |
354 |
<th>No.</th> |
351 |
<th>No.</th> |
355 |
<th class="anti-the">Order</th> |
352 |
<th>Order</th> |
356 |
<th class="tax_excluded">RRP tax exc.</th> |
353 |
<th>RRP tax exc.</th> |
357 |
<th class="tax_excluded">ecost tax exc.</th> |
354 |
<th>ecost tax exc.</th> |
358 |
<th class="tax_included">RRP tax inc.</th> |
355 |
<th>RRP tax inc.</th> |
359 |
<th class="tax_included">ecost tax inc.</th> |
356 |
<th>ecost tax inc.</th> |
360 |
<th>Qty.</th> |
357 |
<th>Qty.</th> |
361 |
<th class="tax_excluded">Total tax exc. ([% currency %])</th> |
358 |
<th>Total tax exc. ([% currency %])</th> |
362 |
<th class="tax_included">Total tax inc. ([% currency %])</th> |
359 |
<th>Total tax inc. ([% currency %])</th> |
363 |
<th>GST %</th> |
360 |
<th>GST %</th> |
364 |
<th>GST</th> |
361 |
<th>GST</th> |
365 |
<th>Fund</th> |
362 |
<th>Fund</th> |
366 |
<th>Supplier report</th> |
363 |
<th>Supplier report</th> |
367 |
[% IF ( active ) %] |
364 |
[% IF ( active ) %] |
368 |
[% UNLESS ( closedate ) %] |
365 |
[% UNLESS ( closedate ) %] |
369 |
<th>Modify</th> |
366 |
<th class="NoSort">Modify</th> |
370 |
<th>Cancel order</th> |
367 |
<th class="NoSort">Cancel order</th> |
371 |
[% END %] |
368 |
[% END %] |
372 |
[% END %] |
369 |
[% END %] |
373 |
</tr> |
370 |
</tr> |
Lines 377-389
Link Here
|
377 |
<tr> |
374 |
<tr> |
378 |
<th></th> |
375 |
<th></th> |
379 |
<th>Total (GST [% foot_loo.tax_rate * 100 %])</th> |
376 |
<th>Total (GST [% foot_loo.tax_rate * 100 %])</th> |
380 |
<th class="tax_excluded"> </th> |
377 |
<th> </th> |
381 |
<th class="tax_excluded"> </th> |
378 |
<th> </th> |
382 |
<th class="tax_included"> </th> |
379 |
<th> </th> |
383 |
<th class="tax_included"> </th> |
380 |
<th> </th> |
384 |
<th>[% foot_loo.quantity %]</th> |
381 |
<th>[% foot_loo.quantity %]</th> |
385 |
<th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price%]</th> |
382 |
<th>[% foot_loo.total_tax_excluded | $Price%]</th> |
386 |
<th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th> |
383 |
<th>[% foot_loo.total_tax_included | $Price %]</th> |
387 |
<th> </th> |
384 |
<th> </th> |
388 |
<th>[% foot_loo.tax_value | $Price %]</th> |
385 |
<th>[% foot_loo.tax_value | $Price %]</th> |
389 |
<th> </th> |
386 |
<th> </th> |
Lines 399-411
Link Here
|
399 |
<tr> |
396 |
<tr> |
400 |
<th></th> |
397 |
<th></th> |
401 |
<th>Total ([% currency %])</th> |
398 |
<th>Total ([% currency %])</th> |
402 |
<th class="tax_excluded"> </th> |
399 |
<th> </th> |
403 |
<th class="tax_excluded"> </th> |
400 |
<th> </th> |
404 |
<th class="tax_included"> </th> |
401 |
<th> </th> |
405 |
<th class="tax_included"> </th> |
402 |
<th> </th> |
406 |
<th>[% total_quantity %]</th> |
403 |
<th>[% total_quantity %]</th> |
407 |
<th class="tax_excluded">[% total_tax_excluded | $Price %]</th> |
404 |
<th>[% total_tax_excluded | $Price %]</th> |
408 |
<th class="tax_included">[% total_tax_included | $Price %]</th> |
405 |
<th>[% total_tax_included | $Price %]</th> |
409 |
<th> </th> |
406 |
<th> </th> |
410 |
<th>[% total_tax_value | $Price %]</th> |
407 |
<th>[% total_tax_value | $Price %]</th> |
411 |
<th> </th> |
408 |
<th> </th> |
Lines 474-486
Link Here
|
474 |
</td> |
471 |
</td> |
475 |
[% SET zero_regex = "^0{1,}\.?0{1,}[^1-9]" %] [%# 0 or 0.0 or 0.00 or 00 or 00.0 or 00.00 or 0.000 ... %] |
472 |
[% SET zero_regex = "^0{1,}\.?0{1,}[^1-9]" %] [%# 0 or 0.0 or 0.00 or 00 or 00.0 or 00.00 or 0.000 ... %] |
476 |
[%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %] |
473 |
[%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %] |
477 |
<td class="number tax_excluded [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %]</td> |
474 |
<td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %]</td> |
478 |
<td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td> |
475 |
<td class="number [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td> |
479 |
<td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td> |
476 |
<td class="number [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td> |
480 |
<td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td> |
477 |
<td class="number [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td> |
481 |
<td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td> |
478 |
<td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td> |
482 |
<td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td> |
479 |
<td class="number [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td> |
483 |
<td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td> |
480 |
<td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td> |
484 |
<td class="number">[% books_loo.tax_rate * 100 %]</td> |
481 |
<td class="number">[% books_loo.tax_rate * 100 %]</td> |
485 |
<td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td> |
482 |
<td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td> |
486 |
<td>[% books_loo.budget_name %]</td> |
483 |
<td>[% books_loo.budget_name %]</td> |
Lines 536-548
Link Here
|
536 |
<tr> |
533 |
<tr> |
537 |
<th>No.</th> |
534 |
<th>No.</th> |
538 |
<th>Order</th> |
535 |
<th>Order</th> |
539 |
<th class="tax_excluded">RRP tax exc.</th> |
536 |
<th>RRP tax exc.</th> |
540 |
<th class="tax_excluded">ecost tax exc.</th> |
537 |
<th>ecost tax exc.</th> |
541 |
<th class="tax_included">RRP tax inc.</th> |
538 |
<th>RRP tax inc.</th> |
542 |
<th class="tax_included">ecost tax inc.</th> |
539 |
<th>ecost tax inc.</th> |
543 |
<th>Qty.</th> |
540 |
<th>Qty.</th> |
544 |
<th class="tax_excluded">Total tax exc. ([% currency %])</th> |
541 |
<th>Total tax exc. ([% currency %])</th> |
545 |
<th class="tax_included">Total tax inc. ([% currency %])</th> |
542 |
<th>Total tax inc. ([% currency %])</th> |
546 |
<th>GST %</th> |
543 |
<th>GST %</th> |
547 |
<th>GST</th> |
544 |
<th>GST</th> |
548 |
<th>Fund</th> |
545 |
<th>Fund</th> |
Lines 711-739
Link Here
|
711 |
|
708 |
|
712 |
[% MACRO jsinclude BLOCK %] |
709 |
[% MACRO jsinclude BLOCK %] |
713 |
[% Asset.js("js/acquisitions-menu.js") %] |
710 |
[% Asset.js("js/acquisitions-menu.js") %] |
714 |
[% INCLUDE 'datatables.inc' %] |
711 |
[% INCLUDE 'datatables.inc' %] |
|
|
712 |
[% INCLUDE 'columns_settings.inc' %] |
715 |
[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %] |
713 |
[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %] |
716 |
<script type="text/javascript"> |
714 |
<script> |
717 |
function updateColumnsVisibility(visible) { |
|
|
718 |
if ( visible ) { |
719 |
$("table .tax_excluded, .tax_included").show(); |
720 |
} else { |
721 |
[% IF ( listincgst ) %] |
722 |
$("table .tax_excluded").hide(); |
723 |
[% ELSE %] |
724 |
$("table .tax_included").hide(); |
725 |
[% END %] |
726 |
} |
727 |
} |
728 |
|
729 |
$(document).ready(function() { |
715 |
$(document).ready(function() { |
730 |
if ( $('#toolbar').length ) {$('#toolbar').fixFloat();} |
716 |
if ( $('#toolbar').length ) {$('#toolbar').fixFloat();} |
731 |
$("#show_all_details").click(function(){ |
|
|
732 |
updateColumnsVisibility($(this).is(":checked")); |
733 |
}); |
734 |
|
735 |
$("#show_all_details").prop('checked', false); |
736 |
updateColumnsVisibility(false); |
737 |
[% UNLESS ( closedate ) %] |
717 |
[% UNLESS ( closedate ) %] |
738 |
$('#addtoBasket').on('show', function () { |
718 |
$('#addtoBasket').on('show', function () { |
739 |
$(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML); |
719 |
$(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML); |
Lines 781-787
Link Here
|
781 |
</script> |
761 |
</script> |
782 |
|
762 |
|
783 |
[% UNLESS ( closedate ) %] |
763 |
[% UNLESS ( closedate ) %] |
784 |
<script type="text/javascript"> |
764 |
<script> |
785 |
function transfer_order_popup(ordernumber) { |
765 |
function transfer_order_popup(ordernumber) { |
786 |
var url = "/cgi-bin/koha/acqui/transferorder.pl?" |
766 |
var url = "/cgi-bin/koha/acqui/transferorder.pl?" |
787 |
+ "ordernumber=" + ordernumber |
767 |
+ "ordernumber=" + ordernumber |
Lines 796-802
Link Here
|
796 |
} |
776 |
} |
797 |
</script> |
777 |
</script> |
798 |
[% ELSE %] |
778 |
[% ELSE %] |
799 |
<script type="text/javascript"> |
779 |
<script> |
800 |
$(document).ready(function(){ |
780 |
$(document).ready(function(){ |
801 |
$("#basketgroupid").change(function(){ |
781 |
$("#basketgroupid").change(function(){ |
802 |
if($(this).val() == "new"){ |
782 |
if($(this).val() == "new"){ |
Lines 806-812
Link Here
|
806 |
}); |
786 |
}); |
807 |
</script> |
787 |
</script> |
808 |
[% UNLESS ( grouped ) %] |
788 |
[% UNLESS ( grouped ) %] |
809 |
<script type="text/javascript"> |
789 |
<script> |
810 |
function confirm_reopen() { |
790 |
function confirm_reopen() { |
811 |
var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; |
791 |
var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; |
812 |
var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?")); |
792 |
var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?")); |
Lines 817-835
Link Here
|
817 |
</script> |
797 |
</script> |
818 |
[% END %] |
798 |
[% END %] |
819 |
[% END %] |
799 |
[% END %] |
820 |
<script type="text/javascript"> |
800 |
<script> |
|
|
801 |
var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) %]; |
821 |
$(document).ready(function() { |
802 |
$(document).ready(function() { |
822 |
var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { |
803 |
KohaTable("orders", { |
823 |
"sPaginationType": "four_button", |
|
|
824 |
[% IF ( active ) %] |
804 |
[% IF ( active ) %] |
825 |
"aoColumnDefs": [ |
805 |
"aoColumnDefs": [ |
826 |
[% UNLESS ( closedate ) %] |
806 |
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, |
827 |
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, |
|
|
828 |
[% END %] |
829 |
{ "sType": "anti-the", "aTargets": [ "anti-the" ] } |
807 |
{ "sType": "anti-the", "aTargets": [ "anti-the" ] } |
830 |
], |
808 |
], |
831 |
[% END %] |
809 |
[% END %] |
832 |
} ) ); |
810 |
"sPaginationType": "four_button", |
|
|
811 |
"autoWidth": false |
812 |
}, columns_settings); |
813 |
|
833 |
var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { |
814 |
var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { |
834 |
"sPaginationType": "four_button" |
815 |
"sPaginationType": "four_button" |
835 |
} ) ); |
816 |
} ) ); |
836 |
- |
|
|