add pending order

This commit is contained in:
Zin Moe
2020-03-13 12:10:18 +06:30
parent 03fe9e43f2
commit 05fff8c136
10 changed files with 591 additions and 97 deletions

View File

@@ -6,10 +6,12 @@
<div id="oqs_loading_wrapper" style="display:none;">
<div id="oqs_loading"></div>
</div>
<% @order_id = params[:order_id].gsub('"', '') if params[:order_id] %>
<input type="hidden" name="type" id="role" value="<%= current_user.role%>">
<input type="hidden" name="cashier_type" id="cashier_type" value="<%= type%>">
<input type="hidden" name="link_type" id="link_type" value="<%= @cashier_type %>">
<input type="hidden" name="display_type" id="display_type" value="<%= @display_type%>">
<input type="hidden" name="order_id" id="order_id" value= "<%= @order_id %>">
<div class="row m-t--10 h-100">
<div class="col-lg-2 col-md-2 col-sm-2 hidden d-flex flex-column h-100" id="menu_data">
<li class="list-menu">
@@ -158,7 +160,7 @@
<div class="card h-100">
<div class="card-header" style="padding: 0.12rem 0.25rem">
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-12" id='app_order'>
Mobile Orders <span class="badge badge-danger" style="font-size: 0.75rem;border-radius: 5px;"><%= @app_order_new_count %></span>
Orders
</button>
<div class="row ">
<div class="col-md-9 col-lg-9 col-sm-9 ">
@@ -198,15 +200,20 @@
<div class="card-footer flex-grow-1 custom-card-footer" id="orders-footer">
<table class="table" id="order-charges-table" border="0">
<tr>
<td colspan="2" style="padding:2px; text-align:" class="charges-name"><strong>Total:</strong></td>
<td style="padding:2px; text-align: center;"><strong id="total_qty">0</strong></td>
<td style="padding:2px; text-align:" class="item-attr float-right"><strong id="sub_total">0.00</strong></td>
<td colspan="2" style="padding:2px;" class="charges-name"><strong>Total:</strong></td>
<td style="padding:2px 20px 2px 2px;"><strong id="total_qty">0</strong></td>
<td style="padding:2px;" class="item-attr <%= params[:modify] ? '' : 'text-right'%>"><strong id="sub_total">0.00</strong></td>
</tr>
</table>
<% if @sale_id.nil?%>
<button type="button" class="btn btn-primary action-btn create col-md-12" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<% if params[:update] %>
<button type="button" class="btn btn-primary action-btn create col-md-12 m-t-5" id="create_pay_order" disabled="disabled" style=" height: 50px; width: 100%;">Update Order & Pay</button>
<% else %>
<button type="button" class="btn btn-primary action-btn create col-md-12" id="add_to_existing_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<% if @sale_id.nil?%>
<button type="button" class="btn btn-primary action-btn create col-md-4 d-inline" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<% else %>
<button type="button" class="btn btn-primary action-btn create col-md-4 d-inline" id="add_to_existing_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<% end %>
<button type="button" class="btn btn-primary action-btn create col-md-7 m-l-15 d-inline" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
<% end %>
</div>
</div>
@@ -349,7 +356,8 @@
<h4 class="modal-title" style="color:#fff;" id="set_name"></h4>
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#fff;">&times;</button>
</div>
<div class="modal-body" id="set-menu-item-slimscroll" data-height="50">
<div class="modal-body" data-height="50">
<!-- id="set-menu-item-slimscroll" -->
<div class="row set-item">
<div class="col-md-4">
<p class="set_default_option" style="text-align: center;"> <%= image_tag "logo.png" ,width: '', height: '', :id => 'logo' %></p>