- qrpay selection when add orders
- minor fixes
This commit is contained in:
Dev Team
2025-06-18 13:38:40 +06:30
parent e48e7f960a
commit b9aa1ec870
4 changed files with 383 additions and 7 deletions

View File

@@ -305,12 +305,18 @@
<% end%>
</div>
<div class="row customer_detail p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="col-lg-6 col-md-6 col-sm-6" >
<% if @status == 'sale' %>
&nbsp; Customer: <%= @pending.customer.name rescue "-" %>
<% else%>
&nbsp; Customer: <%= @pending.orders.first.customer.name rescue "-" %>
<% end%>
<input type="hidden" name="customer_id" value="<%= @pending.customer.customer_id rescue "-" %>" />
<span>
Customer: <%= @pending.customer.name rescue "-" %>
</span>
<% else %>
<input type="hidden" name="customer_id" value="<%= @pending.orders.first.customer_id rescue "-" %>" />
<span>
Customer: <%= @pending.orders.first.customer.name rescue "-" %>
</span>
<% end %>
</div>
</div>
</div>
@@ -428,7 +434,7 @@
<hr>
<!-- <button type="button" id="request_bills" class="btn btn-block bg-blue waves-effect">Req.Bill</button> -->
<% order_id = @pending.try(:orders).try(:first).try(:order_id) if @status == 'order' %>
<button type="button" class="btn btn-block bg-blue waves-effect req_bill" data-toggle="modal" data-target="#read_modal" >Req.Bill</button>
<button type="button" class="btn btn-block bg-blue waves-effect req_bill" data-toggle="modal" data-target="#payment_modal" >Req.Bill</button>
<button type="button" id="order_cancel" class="btn btn-block bg-red waves-effect" >CANCEL</button>
<input type="hidden" id="save_order_id" value="<%=order_id%>">
<%end%>
@@ -510,10 +516,18 @@
</div>
</div>
</div>
<%= render "layouts/read_modal" %>
<%= render "read_modal" %>
<script type="text/javascript">
var cashier_type = 'food_court';
$("#read_modal").on("hidden.bs.modal", function (e) {
$("#read_modal").css("display", "none");
});
$("#payment_modal").on("hidden.bs.modal", function (e) {
$("#read_modal").css("display", "none");
});
$(document).ready( function() {
if ("<%= @pending %>" || "<%= @booking %>") { // adjust column gap
$('.card-columns').css('column-gap', '0.3rem')