add link for oqs in origami

This commit is contained in:
phyusin
2018-02-22 18:51:57 +06:30
parent 8d03fab703
commit 7cbb67fd30
20 changed files with 257 additions and 109 deletions

View File

@@ -65,6 +65,8 @@
<td style="width:60%; text-align:left">
<span id="item-order-id" class="hidden"><%=odr_item['order_id'] %></span>
<span id="item-account-type" class="hidden"><%=odr_item['account_id'] %></span>
<span id="item-code" class="hidden"><%=odr_item['item_code'] %></span>
<span id="item-instance-code" class="hidden"><%=odr_item['item_instance_code'] %></span>
<span id="item-name-price">
<%=odr_item['item_name'] %>
<% if !odr_item['set_menu_items'].nil?
@@ -132,6 +134,8 @@
<td style="width:60%; text-align:left">
<span id="item-order-id" class="hidden"><%=order_item[order.order_id.to_s]['order_id'] %></span>
<span id="item-account-type" class="hidden"><%=order_item[order.order_id.to_s]['account_id'] %></span>
<span id="item-code" class="hidden"><%=order_item[order.order_id.to_s]['item_code'] %></span>
<span id="item-instance-code" class="hidden"><%=order_item[order.order_id.to_s]['item-instance-code'] %></span>
<span id="item-name-price">
<%=order_item[order.order_id.to_s]['item_name'] %>
<% if !order_item[order.order_id.to_s]['set_menu_items'].nil?
@@ -194,7 +198,9 @@
<th>#</th>
<th>Receipt No.</th>
<th>Total</th>
<% if !@current_user.nil? && @current_user.role == 'cashier' %>
<th>Action</th>
<% end %>
</thead>
<tbody>
<% @sale_data.each_with_index do |sale_data, sale_index| %>
@@ -207,9 +213,12 @@
<td><input type="radio" name="rdn_receipt" id="rdn_receipt" value="<%= sale_data.sale_id %>" <%= checked %>></td>
<td><span id="receipt_no"><%= sale_data.receipt_no %></span></td>
<td><span id="grand_total"><%= sale_data.grand_total %></span></td>
<% if !@current_user.nil? && @current_user.role == 'cashier' %>
<td>
<button type="button" class="btn btn-block waves-effect btn-primary btn_pay" id=<%= sale_data.sale_id %> >Pay</button>
</td>
<% end %>
</tr>
<% end %>
<% end %>
@@ -228,7 +237,9 @@
<!-- Action Panel -->
<div>
<button type="button" class="btn bg-default btn-block waves-effect" id="back" ><i class="material-icons">reply</i> Back </button>
<button id="equal_split" class="btn btn-block waves-effect bg-blue">= Split</button>
<% if !@current_user.nil? && @current_user.role == 'cashier' %>
<button id="equal_split" class="btn btn-block waves-effect bg-blue">= Split</button>
<% end %>
<% if !@orders.empty? %>
<button id="order_split" class="btn btn-block waves-effect bg-blue">By Order</button>
<button id="order_item_split" class="btn btn-block waves-effect bg-blue">By Order Item</button>
@@ -689,6 +700,8 @@ function get_selected_order_items(){
var order_item = {};
order_item.id = $(this).attr('id').substr(0,16);
order_item.order_id = $(this).find('#item-order-id').text().trim();
order_item.item_code = $(this).find('#item-code').text().trim();
order_item.item_instance_code = $(this).find('#item-instance-code').text().trim();
order_item.name = $(this).find('#item-name-price').text().split('@')[0];
order_item.account_id = $(this).find('#item-account-type').text();
order_item.qty = $(this).find('#item-qty').text();