Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-07-11 04:00:55 +06:30
99 changed files with 2085 additions and 1781 deletions

View File

@@ -4,7 +4,7 @@
<% type = request.path_info.include?('quick_service') || request.path_info.include?('food_court')%>
<% modify_order = request.path_info.include?('modify_order')%>
<div class="container-fluid " style="padding:0px 3px 0px 3px; overflow-x: hidden; ">
<div class="container-fluid addorder-pages" style="padding:0px 3px 0px 3px;">
<div id="oqs_loading_wrapper" style="display:none;">
<div id="oqs_loading"></div>
</div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class='row'>
<div class="col-lg-10 col-md-10 col-sm-10">
<h2> <%= t :cash_in %> </h2>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class='row'>
<div class="col-lg-10 col-md-10 col-sm-10">
<h2><%= t :cash_out %></h2>

View File

@@ -176,25 +176,40 @@
<div class="body">
<h6><%= t("views.right_panel.detail.order") %></h6>
<table class="table">
<% if !@total_order.nil? %>
<tr>
<td width="40px"><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.order") %> : </td>
<td align="right" width="60px"><%= @total_order.total_order %></td>
</tr>
<% end %>
<% if !@total_accounts.nil? %>
<% @total_accounts.each do |account| %>
<tr>
<td width="40px"><%= account.title %> (Account) : </td>
<td align="right" width="60px">
<% @account_data.each do |data| %>
<% acc = account.title %>
<%= data[""+acc+""] %> <% if !data[''+acc+''].nil? %> ( <%= data[''+acc+'_amount'] %> ) <% end %>
<% if !(@total_payment_methods.nil?) %>
<% @total_payment_methods.each do |payment| %>
<% if !@sale_data[0].empty? %>
<% if payment.payment_method != 'mpu' && payment.payment_method != 'visa' && payment.payment_method != 'master' && payment.payment_method != 'jcb' %>
<tr>
<% if payment.payment_method == 'paypar' %>
<td>Redeem Sales : </td>
<% elsif payment.payment_method == 'paymal' %>
<td>Card Sales : </td>
<% else %>
<td><%= payment.payment_method.to_s.capitalize %> Sales : </td>
<% end %>
<td align="right">
<% @sale_data.each do |data| %>
<% pay_mth = payment.payment_method %>
<%= data[pay_mth] %>
<% end %>
</td>
</tr>
<% end %>
<% end %>
</td>
</tr>
<% end %>
<% end %>
<% total_card = @sale_data.select { |hash| hash["card"]!=nil } %>
<% if !total_card.nil? %>
<tr>
<td><%= t("views.right_panel.detail.other_payment") %> : </td>
<td align="right">
<% total_other_amt = 0 %>
<% @sale_data.map { |k,v| k.map{|meth,amt| meth != 'cash' && meth != 'foc' && meth != 'creditnote' ? total_other_amt += amt : meth }} %>
<%= total_other_amt %>
</td>
</tr>
<% end %>
<% end %>
<% if !@top_items.nil? %>
<tr>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>
@@ -300,12 +300,14 @@ var originalDiscount = totalDiscount;
switch (input_type) {
case 'num':
var input_value = $(this).attr("data-value");
if (parseFloat(original_value) == 0){
$('#discount-amount').val(input_value);
}
else{
$('#discount-amount').val(original_value + '' + input_value);
}
if (input_value == "." && original_value.includes(".")) {
break;
}
if (parseFloat(input_value) >= 0 && !original_value.includes(".") && (parseFloat(original_value) == 0)) {
$('#discount-amount').val(parseFloat(input_value));
} else {
$('#discount-amount').val(original_value + input_value);
}
break;
case 'add':
var input_value = $(this).attr("data-value");

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>

View File

@@ -1,6 +1,6 @@
<%= stylesheet_link_tag 'order_reservation', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'order_reservation', 'data-turbolinks-track': 'reload' %>
<div class="container-fluid">
<div class="container-fluid m-top-100">
<!-- start count function -->
<%
pending_count = 0

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class="row">
<!-- Column One -->
<div class="col-lg-6 col-md-6 col-sm-6">
@@ -202,7 +202,7 @@
<%else%>
<button type="button" class="btn bg-default btn-block" onclick="window.location.href = '/origami/sale/<%=@sale_data.sale_id%>/<%=@cashier_type%>/payment'"><i class="material-icons">reply</i> Back </button>
<%end%>
<button id="charge_other" class="btn bg-primary btn-block action-btn">Enter</button>
<button id="charge_other" class="btn bg-primary btn-block action-btn" style="height: 35px">Enter</button>
</div>
</div>
</div>

View File

@@ -680,8 +680,10 @@ $(document).ready(function(){
$('#pay').click(function() {
sub_total = $('#sub-total').text();
member = $('#membership_id').text();
if (payment_type && payment_type.length > 0 && !other_payments.some(x => payment_type.indexOf(x[0]) >= 0 && x[1] > 0) && sub_total != 0.0 && member) {
if (payment_type && payment_type.length > 0 && parseInt(jQuery.inArray("Credit", payment_type)) == -1 && !other_payments.some(x => payment_type.indexOf(x[0]) >= 0 && x[1] > 0) && sub_total != 0.0 && member) {
swal("Oops","Please Pay with " + payment_methods.find(x => payment_type.indexOf(x) >= 0) + " Payment","warning");
} else if (payment_type && payment_type.length > 0 && parseInt(jQuery.inArray("Credit", payment_type)) != -1 && $('#credit').text() == 0 && sub_total != 0.0 && member) {
swal("Oops","Please Pay with Credit Payment","warning");
} else {
$( "#loading_wrapper").show();
if($('#balance').text() > 0){

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class="row clearfix">
<!-- Column One -->
<div class="col-lg-10 col-md-10 col-sm-10">

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class="row">
<!-- Column One -->
<div class="col-lg-5 col-md-5 col-sm-5">

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>

View File

@@ -1,4 +1,4 @@
<div class="container-fluid">
<div class="container-fluid m-top-100">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
<div class="card">