diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index f3819466..bff00d82 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -138,6 +138,8 @@ $(function() { $(document).on('click',".customer_tr",function(){ // if(this.checked){ + $(this).closest('tr').find('.checkbox_check').prop( "checked", true ); + //$( "#checkbox_check" ).prop( "checked", true ); var sale_id = $("#sale_id").val() || 0; var customer_id = $(this).attr('data-ref'); diff --git a/app/views/origami/customers/index.html.erb b/app/views/origami/customers/index.html.erb index 1c6bebaa..b58ca35a 100644 --- a/app/views/origami/customers/index.html.erb +++ b/app/views/origami/customers/index.html.erb @@ -136,7 +136,7 @@ $(document).on('click',".customer_tr",function(){ // if(this.checked){ - + $(this).closest('tr').find('.checkbox_check').prop( "checked", true ); var sale_id = $("#sale_id").val() || 0; var customer_id = $(this).attr('data-ref'); diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index 1eb547e6..490ec341 100644 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -93,7 +93,7 @@
Cash
-
<%= @cash %>
+
<%= @cash %>

@@ -193,8 +193,11 @@ $(document).on('click', '.cashier_number', function(event){ update_balance(); break; case 'del' : - var cash=$('#amount').text(); - $('#cash').text(cash.substr(0,cash.length-1)); + var cash=$('#cash').text(); + if(cash.length == 1) + $('#cash').text("0.0"); + else + $('#cash').text(cash.substr(0,cash.length-1)); update_balance(); break; case 'clr': @@ -258,7 +261,7 @@ function update_balance(){ var card = $('#others').text(); var amount_due = $('#amount_due').text(); var total = parseFloat(cash) + parseFloat(credit) + parseFloat(card) - var result = amount_due - total + var result = amount_due - total; $('#balance').text(result.toFixed(2)); } diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb index 484de762..b149ebe7 100644 --- a/app/views/transactions/sales/show.html.erb +++ b/app/views/transactions/sales/show.html.erb @@ -23,7 +23,7 @@ Receipt Date Receipt no Cashier - OSales status + Sales status Receipt generated at