fix date in sale tran
This commit is contained in:
@@ -60,17 +60,17 @@
|
|||||||
</th>
|
</th>
|
||||||
<%end%>
|
<%end%>
|
||||||
<%end%>
|
<%end%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= @sale.receipt_date.strftime("%d-%M-%Y") %></td>
|
<td><%= @sale.receipt_date.strftime("%d-%m-%Y") %></td>
|
||||||
<td><%= @sale.receipt_no %></td>
|
<td><%= @sale.receipt_no %></td>
|
||||||
<td><%= @sale.cashier_name rescue '-' %></td>
|
<td><%= @sale.cashier_name rescue '-' %></td>
|
||||||
<td><%= @sale.sale_status %> </td>
|
<td><%= @sale.sale_status %> </td>
|
||||||
<td colspan="2"> <%= @sale.requested_at.strftime("%m-%d-%Y %H:%M %p") %> </td>
|
<td colspan="2"> <%= @sale.requested_at.strftime("%d-%m-%Y %H:%M %p") %> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="border-top:2px solid #000">
|
<tr style="border-top:2px solid #000">
|
||||||
<th><%= t :sale %> <%= t("views.right_panel.detail.item_txt") %> <%= t("views.right_panel.detail.name_txt2") %></th>
|
<th><%= t :sale %> <%= t("views.right_panel.detail.item_txt") %> <%= t("views.right_panel.detail.name_txt2") %></th>
|
||||||
<th><%= t("views.right_panel.detail.qty") %></th>
|
<th><%= t("views.right_panel.detail.qty") %></th>
|
||||||
@@ -78,20 +78,20 @@
|
|||||||
<th><%= t("views.right_panel.detail.total_price") %></th>
|
<th><%= t("views.right_panel.detail.total_price") %></th>
|
||||||
<th><%= t("views.right_panel.detail.created_at") %></th>
|
<th><%= t("views.right_panel.detail.created_at") %></th>
|
||||||
<th><%= t("views.right_panel.detail.remark") %></th>
|
<th><%= t("views.right_panel.detail.remark") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
<% @sale.sale_items.each do |s| %>
|
<% @sale.sale_items.each do |s| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%=s.product_name rescue ' '%></td>
|
<td><%=s.product_name rescue ' '%></td>
|
||||||
<td><%=s.qty rescue ' '%></td>
|
<td><%=s.qty rescue ' '%></td>
|
||||||
<td><%= number_with_precision(s.unit_price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td><%= number_with_precision(s.unit_price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
<td><%= number_with_precision(s.price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td><%= number_with_precision(s.price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
<td><%=l s.created_at.utc.getlocal , :format => :short rescue ' ' %></td>
|
<td><%=l s.created_at.utc.getlocal , :format => :short rescue ' ' %></td>
|
||||||
<td><%=s.remark rescue ' '%></td>
|
<td><%=s.remark rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr style="border-top:2px solid #000">
|
<tr style="border-top:2px solid #000">
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= t("views.right_panel.detail.total") %></td>
|
<td><%= t("views.right_panel.detail.total") %></td>
|
||||||
<td colspan="3"><%= number_with_precision(@sale.total_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td colspan="3"><%= number_with_precision(@sale.total_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -102,10 +102,10 @@
|
|||||||
<% @sale.sale_taxes.each do |r|%>
|
<% @sale.sale_taxes.each do |r|%>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= r.tax_name %> </td>
|
<td><%= r.tax_name %> </td>
|
||||||
<td colspan="3"><%= number_with_precision(r.tax_payable_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td colspan="3"><%= number_with_precision(r.tax_payable_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= t("views.right_panel.detail.grand_total") %></td>
|
<td><%= t("views.right_panel.detail.grand_total") %></td>
|
||||||
@@ -122,8 +122,8 @@
|
|||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td> <%= r.payment_method.capitalize rescue ' '%> Payment</td>
|
<td> <%= r.payment_method.capitalize rescue ' '%> Payment</td>
|
||||||
<td colspan="3"><%= number_with_precision(r.payment_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td colspan="3"><%= number_with_precision(r.payment_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= t("views.right_panel.detail.change") %></td>
|
<td><%= t("views.right_panel.detail.change") %></td>
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% if @response["status"] == true %>
|
<% if @response["status"] == true %>
|
||||||
<% @response["data"].each do |transaction| %>
|
<% @response["data"].each do |transaction| %>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
<td><%= transaction["redeem"]%></td>
|
<td><%= transaction["redeem"]%></td>
|
||||||
<td><%= transaction["rebate"] %></td>
|
<td><%= transaction["rebate"] %></td>
|
||||||
<td><%= transaction["balance"] %></td>
|
<td><%= transaction["balance"] %></td>
|
||||||
<td><%= transaction["account_status"] %></td>
|
<td><%= transaction["account_status"] %></td>
|
||||||
<td><%= transaction["status"] %></td>
|
<td><%= transaction["status"] %></td>
|
||||||
<td><%= transaction["receipt_no"] %></td>
|
<td><%= transaction["receipt_no"] %></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@@ -241,13 +241,13 @@
|
|||||||
<th><%= t("views.right_panel.detail.remark") %></th>
|
<th><%= t("views.right_panel.detail.remark") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @sale_audits.each do |audit| %>
|
<% @sale_audits.each do |audit| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= audit.action%></td>
|
<td><%= audit.action%></td>
|
||||||
<td><%= audit.action_at.strftime("%m-%d-%Y %H:%M %p")%></td>
|
<td><%= audit.action_at.strftime("%m-%d-%Y %H:%M %p")%></td>
|
||||||
<td><%= audit.approved_by%></td>
|
<td><%= audit.approved_by%></td>
|
||||||
<td><%= audit.remark%></td>
|
<td><%= audit.remark%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -297,7 +297,7 @@
|
|||||||
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
||||||
<button class='btn btn-md waves-effect payment-btn-box payment_btn bg-green' data-type='Credit' data-value='Credit'>Credit</button>
|
<button class='btn btn-md waves-effect payment-btn-box payment_btn bg-green' data-type='Credit' data-value='Credit'>Credit</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% @payment_methods.each_with_index do |pay, pay_index| %>
|
<% @payment_methods.each_with_index do |pay, pay_index| %>
|
||||||
<%if (pay_index+1)%3 == 0 %>
|
<%if (pay_index+1)%3 == 0 %>
|
||||||
<div class="row clearfix"></div>
|
<div class="row clearfix"></div>
|
||||||
@@ -308,8 +308,8 @@
|
|||||||
<%end %>
|
<%end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- </select> -->
|
<!-- </select> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer p-r-30 pb-3">
|
<div class="modal-footer p-r-30 pb-3">
|
||||||
<button type="button" class="btn btn-md btn-link btn-danger waves-effect" data-dismiss="modal">CLOSE</button>
|
<button type="button" class="btn btn-md btn-link btn-danger waves-effect" data-dismiss="modal">CLOSE</button>
|
||||||
@@ -367,17 +367,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// click select option icon for add
|
// click select option icon for add
|
||||||
$('.payment_btn').on('click', function(event){
|
$('.payment_btn').on('click', function(event){
|
||||||
active = $(this).hasClass('selected-payment');
|
active = $(this).hasClass('selected-payment');
|
||||||
value = $(this).data('value');
|
value = $(this).data('value');
|
||||||
type = $(this).data('type');
|
type = $(this).data('type');
|
||||||
group = $(this).data('group');
|
group = $(this).data('group');
|
||||||
payments = $(".payment_btn");
|
payments = $(".payment_btn");
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
$(this).removeClass('selected-payment');
|
$(this).removeClass('selected-payment');
|
||||||
}else{
|
}else{
|
||||||
$(this).addClass('selected-payment');
|
$(this).addClass('selected-payment');
|
||||||
}
|
}
|
||||||
}); //End selecct attribute buttom
|
}); //End selecct attribute buttom
|
||||||
@@ -415,7 +415,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
swal("Opps","You are not authorized for void","warning")
|
swal("Opps","You are not authorized for void","warning")
|
||||||
}
|
}
|
||||||
@@ -438,14 +438,14 @@
|
|||||||
if(!location.pathname.includes("credit_payment")){
|
if(!location.pathname.includes("credit_payment")){
|
||||||
calculate_member_discount(sale_id,"Cash",tax_type);
|
calculate_member_discount(sale_id,"Cash",tax_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$( "#loading_wrapper" ).hide();
|
$( "#loading_wrapper" ).hide();
|
||||||
receipt_no = "<%= @sale.receipt_no %>";
|
receipt_no = "<%= @sale.receipt_no %>";
|
||||||
if((receipt_no!=undefined) && (receipt_no!=""))
|
if((receipt_no!=undefined) && (receipt_no!=""))
|
||||||
createReceiptNoInFirstBillData(receipt_no,type);
|
createReceiptNoInFirstBillData(receipt_no,type);
|
||||||
|
|
||||||
window.location = '/origami/sale/'+sale_id+'/transaction/payment';
|
window.location = '/origami/sale/'+sale_id+'/transaction/payment';
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -454,4 +454,3 @@
|
|||||||
window.location = '/origami/sale/'+sale_id+'/transaction/payment';
|
window.location = '/origami/sale/'+sale_id+'/transaction/payment';
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ class ActionController::Base
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
# check for license file
|
# check for license file
|
||||||
# if check_license
|
if check_license
|
||||||
# current_license(ENV["SX_PROVISION_URL"])
|
current_license(ENV["SX_PROVISION_URL"])
|
||||||
# else
|
else
|
||||||
# redirect_to activate_path
|
redirect_to activate_path
|
||||||
# end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
# application_path="#{File.expand_path("../..", __FILE__)}"
|
application_path="#{File.expand_path("../..", __FILE__)}"
|
||||||
# directory application_path
|
directory application_path
|
||||||
# #environment ENV.fetch("RAILS_ENV") { "production" }
|
#environment ENV.fetch("RAILS_ENV") { "production" }
|
||||||
# environment "production"
|
environment "production"
|
||||||
# pidfile "#{application_path}/tmp/puma/pid"
|
pidfile "#{application_path}/tmp/puma/pid"
|
||||||
# state_path "#{application_path}/tmp/puma/state"
|
state_path "#{application_path}/tmp/puma/state"
|
||||||
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||||
# port ENV.fetch("PORT") { 62158 }
|
port ENV.fetch("PORT") { 62158 }
|
||||||
# workers 2
|
workers 2
|
||||||
# preload_app!
|
preload_app!
|
||||||
# threads 1,1
|
threads 1,1
|
||||||
|
|||||||
Reference in New Issue
Block a user