Lines 344-374
Link Here
|
344 |
|
344 |
|
345 |
<div id="acqui_basket_content" class="yui-g"> |
345 |
<div id="acqui_basket_content" class="yui-g"> |
346 |
[% IF ( books_loop ) %] |
346 |
[% IF ( books_loop ) %] |
347 |
<h2>Orders</h2> |
347 |
<h2>Orders</h2> |
348 |
<label for="show_all_details"> |
|
|
349 |
<input type="checkbox" style="vertical-align: middle;" id="show_all_details" /> |
350 |
Show all details |
351 |
</label> |
352 |
<table id="orders"> |
348 |
<table id="orders"> |
353 |
<thead> |
349 |
<thead> |
354 |
<tr> |
350 |
<tr> |
355 |
<th>No.</th> |
351 |
<th>No.</th> |
356 |
<th class="anti-the">Order</th> |
352 |
<th>Order</th> |
357 |
<th class="tax_excluded">RRP tax exc.</th> |
353 |
<th>RRP tax exc.</th> |
358 |
<th class="tax_excluded">ecost tax exc.</th> |
354 |
<th>ecost tax exc.</th> |
359 |
<th class="tax_included">RRP tax inc.</th> |
355 |
<th>RRP tax inc.</th> |
360 |
<th class="tax_included">ecost tax inc.</th> |
356 |
<th>ecost tax inc.</th> |
361 |
<th>Qty.</th> |
357 |
<th>Qty.</th> |
362 |
<th class="tax_excluded">Total tax exc. ([% currency | html %])</th> |
358 |
<th>Total tax exc. ([% currency | html %])</th> |
363 |
<th class="tax_included">Total tax inc. ([% currency | html %])</th> |
359 |
<th>Total tax inc. ([% currency | html %])</th> |
364 |
<th>GST %</th> |
360 |
<th>GST %</th> |
365 |
<th>GST</th> |
361 |
<th>GST</th> |
366 |
<th>Fund</th> |
362 |
<th>Fund</th> |
367 |
<th>Supplier report</th> |
363 |
<th>Supplier report</th> |
368 |
[% IF ( active ) %] |
364 |
[% IF ( active ) %] |
369 |
[% UNLESS ( closedate ) %] |
365 |
[% UNLESS ( closedate ) %] |
370 |
<th>Modify</th> |
366 |
<th class="NoSort">Modify</th> |
371 |
<th>Cancel order</th> |
367 |
<th class="NoSort">Cancel order</th> |
372 |
[% END %] |
368 |
[% END %] |
373 |
[% END %] |
369 |
[% END %] |
374 |
</tr> |
370 |
</tr> |
Lines 378-390
Link Here
|
378 |
<tr> |
374 |
<tr> |
379 |
<th></th> |
375 |
<th></th> |
380 |
<th>Total (GST [% foot_loo.tax_rate * 100 | html %])</th> |
376 |
<th>Total (GST [% foot_loo.tax_rate * 100 | html %])</th> |
381 |
<th class="tax_excluded"> </th> |
377 |
<th> </th> |
382 |
<th class="tax_excluded"> </th> |
378 |
<th> </th> |
383 |
<th class="tax_included"> </th> |
379 |
<th> </th> |
384 |
<th class="tax_included"> </th> |
380 |
<th> </th> |
385 |
<th>[% foot_loo.quantity | html %]</th> |
381 |
<th>[% foot_loo.quantity | html %]</th> |
386 |
<th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price | html %]</th> |
382 |
<th>[% foot_loo.total_tax_excluded | $Price | html %]</th> |
387 |
<th class="tax_included">[% foot_loo.total_tax_included | $Price | html %]</th> |
383 |
<th>[% foot_loo.total_tax_included | $Price | html %]</th> |
388 |
<th> </th> |
384 |
<th> </th> |
389 |
<th>[% foot_loo.tax_value | $Price | html %]</th> |
385 |
<th>[% foot_loo.tax_value | $Price | html %]</th> |
390 |
<th> </th> |
386 |
<th> </th> |
Lines 400-412
Link Here
|
400 |
<tr> |
396 |
<tr> |
401 |
<th></th> |
397 |
<th></th> |
402 |
<th>Total ([% currency | html %])</th> |
398 |
<th>Total ([% currency | html %])</th> |
403 |
<th class="tax_excluded"> </th> |
399 |
<th> </th> |
404 |
<th class="tax_excluded"> </th> |
400 |
<th> </th> |
405 |
<th class="tax_included"> </th> |
401 |
<th> </th> |
406 |
<th class="tax_included"> </th> |
402 |
<th> </th> |
407 |
<th>[% total_quantity | html %]</th> |
403 |
<th>[% total_quantity | html %]</th> |
408 |
<th class="tax_excluded">[% total_tax_excluded | $Price | html %]</th> |
404 |
<th>[% total_tax_excluded | $Price | html %]</th> |
409 |
<th class="tax_included">[% total_tax_included | $Price | html %]</th> |
405 |
<th>[% total_tax_included | $Price | html %]</th> |
410 |
<th> </th> |
406 |
<th> </th> |
411 |
<th>[% total_tax_value | $Price | html %]</th> |
407 |
<th>[% total_tax_value | $Price | html %]</th> |
412 |
<th> </th> |
408 |
<th> </th> |
Lines 475-487
Link Here
|
475 |
</td> |
471 |
</td> |
476 |
[% 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 ... %] |
477 |
[%# 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 %] |
478 |
<td class="number tax_excluded [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price | html %]</td> |
474 |
<td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price | html %]</td> |
479 |
<td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price | html %]</td> |
475 |
<td class="number [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price | html %]</td> |
480 |
<td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price | html %]</td> |
476 |
<td class="number [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price | html %]</td> |
481 |
<td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price | html %]</td> |
477 |
<td class="number [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price | html %]</td> |
482 |
<td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity | html %]</td> |
478 |
<td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity | html %]</td> |
483 |
<td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price | html %]</td> |
479 |
<td class="number [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price | html %]</td> |
484 |
<td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price | html %]</td> |
480 |
<td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price | html %]</td> |
485 |
<td class="number">[% books_loo.tax_rate * 100 | html %]</td> |
481 |
<td class="number">[% books_loo.tax_rate * 100 | html %]</td> |
486 |
<td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price | html %]</td> |
482 |
<td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price | html %]</td> |
487 |
<td>[% books_loo.budget_name | html %]</td> |
483 |
<td>[% books_loo.budget_name | html %]</td> |
Lines 589-601
Link Here
|
589 |
</p> |
585 |
</p> |
590 |
[% END %] |
586 |
[% END %] |
591 |
</td> |
587 |
</td> |
592 |
<td class="number tax_excluded">[% order.rrp_tax_excluded | $Price | html %]</td> |
588 |
<td class="number">[% order.rrp_tax_excluded | $Price | html %]</td> |
593 |
<td class="number tax_excluded">[% order.ecost_tax_excluded | $Price | html %]</td> |
589 |
<td class="number">[% order.ecost_tax_excluded | $Price | html %]</td> |
594 |
<td class="number tax_included">[% order.rrp_tax_included | $Price | html %]</td> |
590 |
<td class="number">[% order.rrp_tax_included | $Price | html %]</td> |
595 |
<td class="number tax_included">[% order.ecost_tax_included | $Price | html %]</td> |
591 |
<td class="number">[% order.ecost_tax_included | $Price | html %]</td> |
596 |
<td class="number">[% order.quantity | html %]</td> |
592 |
<td class="number">[% order.quantity | html %]</td> |
597 |
<td class="number tax_excluded">[% order.total_tax_excluded | $Price | html %]</td> |
593 |
<td class="number">[% order.total_tax_excluded | $Price | html %]</td> |
598 |
<td class="number tax_included">[% order.total_tax_included | $Price | html %]</td> |
594 |
<td class="number">[% order.total_tax_included | $Price | html %]</td> |
599 |
<td class="number">[% order.tax_rate * 100 | html %]</td> |
595 |
<td class="number">[% order.tax_rate * 100 | html %]</td> |
600 |
<td class="number">[% order.tax_value | $Price | html %]</td> |
596 |
<td class="number">[% order.tax_value | $Price | html %]</td> |
601 |
<td>[% order.budget_name | html %] |
597 |
<td>[% order.budget_name | html %] |
Lines 712-740
Link Here
|
712 |
|
708 |
|
713 |
[% MACRO jsinclude BLOCK %] |
709 |
[% MACRO jsinclude BLOCK %] |
714 |
[% Asset.js("js/acquisitions-menu.js") | $raw %] |
710 |
[% Asset.js("js/acquisitions-menu.js") | $raw %] |
715 |
[% INCLUDE 'datatables.inc' %] |
711 |
[% INCLUDE 'datatables.inc' %] |
|
|
712 |
[% INCLUDE 'columns_settings.inc' %] |
716 |
[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %] |
713 |
[% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %] |
717 |
<script type="text/javascript"> |
714 |
<script> |
718 |
function updateColumnsVisibility(visible) { |
|
|
719 |
if ( visible ) { |
720 |
$("table .tax_excluded, .tax_included").show(); |
721 |
} else { |
722 |
[% IF ( listincgst ) %] |
723 |
$("table .tax_excluded").hide(); |
724 |
[% ELSE %] |
725 |
$("table .tax_included").hide(); |
726 |
[% END %] |
727 |
} |
728 |
} |
729 |
|
730 |
$(document).ready(function() { |
715 |
$(document).ready(function() { |
731 |
if ( $('#toolbar').length ) {$('#toolbar').fixFloat();} |
716 |
if ( $('#toolbar').length ) {$('#toolbar').fixFloat();} |
732 |
$("#show_all_details").click(function(){ |
|
|
733 |
updateColumnsVisibility($(this).is(":checked")); |
734 |
}); |
735 |
|
736 |
$("#show_all_details").prop('checked', false); |
737 |
updateColumnsVisibility(false); |
738 |
[% UNLESS ( closedate ) %] |
717 |
[% UNLESS ( closedate ) %] |
739 |
$('#addtoBasket').on('show', function () { |
718 |
$('#addtoBasket').on('show', function () { |
740 |
$(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML); |
719 |
$(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML); |
Lines 782-788
Link Here
|
782 |
</script> |
761 |
</script> |
783 |
|
762 |
|
784 |
[% UNLESS ( closedate ) %] |
763 |
[% UNLESS ( closedate ) %] |
785 |
<script type="text/javascript"> |
764 |
<script> |
786 |
function transfer_order_popup(ordernumber) { |
765 |
function transfer_order_popup(ordernumber) { |
787 |
var url = "/cgi-bin/koha/acqui/transferorder.pl?" |
766 |
var url = "/cgi-bin/koha/acqui/transferorder.pl?" |
788 |
+ "ordernumber=" + ordernumber |
767 |
+ "ordernumber=" + ordernumber |
Lines 797-803
Link Here
|
797 |
} |
776 |
} |
798 |
</script> |
777 |
</script> |
799 |
[% ELSE %] |
778 |
[% ELSE %] |
800 |
<script type="text/javascript"> |
779 |
<script> |
801 |
$(document).ready(function(){ |
780 |
$(document).ready(function(){ |
802 |
$("#basketgroupid").change(function(){ |
781 |
$("#basketgroupid").change(function(){ |
803 |
if($(this).val() == "new"){ |
782 |
if($(this).val() == "new"){ |
Lines 807-813
Link Here
|
807 |
}); |
786 |
}); |
808 |
</script> |
787 |
</script> |
809 |
[% UNLESS ( grouped ) %] |
788 |
[% UNLESS ( grouped ) %] |
810 |
<script type="text/javascript"> |
789 |
<script> |
811 |
function confirm_reopen() { |
790 |
function confirm_reopen() { |
812 |
var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; |
791 |
var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; |
813 |
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 818-836
Link Here
|
818 |
</script> |
797 |
</script> |
819 |
[% END %] |
798 |
[% END %] |
820 |
[% END %] |
799 |
[% END %] |
821 |
<script type="text/javascript"> |
800 |
<script> |
822 |
$(document).ready(function() { |
801 |
$(document).ready(function() { |
823 |
var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { |
802 |
var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) %]; |
824 |
"sPaginationType": "four_button", |
803 |
KohaTable("orders", { |
825 |
[% IF ( active ) %] |
804 |
[% IF ( active ) %] |
826 |
"aoColumnDefs": [ |
805 |
"aoColumnDefs": [ |
827 |
[% UNLESS ( closedate ) %] |
806 |
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, |
828 |
{ "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, |
|
|
829 |
[% END %] |
830 |
{ "sType": "anti-the", "aTargets": [ "anti-the" ] } |
807 |
{ "sType": "anti-the", "aTargets": [ "anti-the" ] } |
831 |
], |
808 |
], |
832 |
[% END %] |
809 |
[% END %] |
833 |
} ) ); |
810 |
"sPaginationType": "four_button", |
|
|
811 |
"autoWidth": false |
812 |
}, columns_settings); |
813 |
|
834 |
var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { |
814 |
var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { |
835 |
"sPaginationType": "four_button" |
815 |
"sPaginationType": "four_button" |
836 |
} ) ); |
816 |
} ) ); |
837 |
- |
|
|