diff --git a/app/Utils/Number.php b/app/Utils/Number.php index 402d07710308..5aaa05fef8da 100644 --- a/app/Utils/Number.php +++ b/app/Utils/Number.php @@ -60,8 +60,6 @@ class Number */ public static function formatMoney($value, $currency, $country, $settings) { -Log::error('code = '.$settings->show_currency_code); -Log::error('symbol = '.$settings->show_currency_symbol); $thousand = $currency->thousand_separator; $decimal = $currency->decimal_separator; diff --git a/resources/views/portal/default/invoices/index.blade.php b/resources/views/portal/default/invoices/index.blade.php index 69c487bd647a..35f6a45f492a 100644 --- a/resources/views/portal/default/invoices/index.blade.php +++ b/resources/views/portal/default/invoices/index.blade.php @@ -114,7 +114,7 @@ $(function() { }, columns: [ - {data: 'checkbox', name: 'checkbox', title: '', searchable: false, orderable: false}, + {data: 'checkbox', name: 'checkbox', title: '', searchable: false, orderable: false}, {data: 'invoice_number', name: 'invoice_number', title: '{{ctrans('texts.invoice_number')}}', visible: true}, {data: 'invoice_date', name: 'invoice_date', title: '{{ctrans('texts.invoice_date')}}', visible: true}, {data: 'amount', name: 'amount', title: '{{ctrans('texts.total')}}', visible: true}, @@ -136,14 +136,19 @@ $(document).ready(function() { toggleButtonGroup(); - $("#datatable").on('change', 'input[type=checkbox]', function() { - selected = []; - $.each($("input[name='hashed_ids[]']:checked"), function(){ - - selected.push($(this).val()); - }); + + $('#datatable').on('click', '.odd, .even' ,function(e) { + + if($(e.target).is(':checkbox')) return; //ignore when click on the checkbox - toggleButtonGroup(); + var $cb= $(this).find('input[type="checkbox"]'); + $cb.prop('checked', !$cb.is(':checked')); + + buildCheckboxArray(); + }); + + $("#datatable").on('change', 'input[type=checkbox]', function() { + buildCheckboxArray(); }); $('#table_filter').on('keyup', function(){ @@ -179,6 +184,17 @@ $(document).ready(function() { }); +function buildCheckboxArray() +{ + selected = []; + $.each($("input[name='hashed_ids[]']:checked"), function(){ + + selected.push($(this).val()); + }); + + toggleButtonGroup(); +} + function toggleButtonGroup() { if(selected.length == 0)