fix conflit

This commit is contained in:
Zin Lin Phyo
2017-06-27 14:04:29 +06:30
16 changed files with 306 additions and 159 deletions

View File

@@ -1,7 +1,7 @@
<div class="row">
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
<%= current_login_employee.name %>
<% if current_login_employee.role = "admin" %>
<% elsif current_login_employee.role = "cashier" %>
<%= link_to "Cashier Station", origami_path %>
@@ -13,7 +13,23 @@
<%= link_to "Cashier Station", oishi_path %>
<% end %>
<% shop = Shop.first %>
<!-- -->
<div class="card">
<div class="page-header" style="width:100%;text-align:center;background-color:#ddd;">
<h4 style="color : #ef404a;font-weight:bold;font-style:italic;"><%= shop.name %></h4>
</div>
<div class="card-block">
<%= shop.address %>
</div>
<div class="card-block">
<%= shop.phone_no %>
</div>
</div>
</div>
</div>

View File

@@ -34,7 +34,8 @@
<div class="tab-pane active" id="completed" role="tabpanel">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<%
@queue_completed_item.each do |qid|
@queue_completed_item.each do |qid|
if qid.price != 0
%>
<div class="card queue_station">
<div class="card-block">
@@ -69,7 +70,8 @@
<p class="hidden assigned-order-item"><%= qid.assigned_order_item_id %></p>
</div>
</div>
<%
<%
end
end
%>
</div>
@@ -85,8 +87,9 @@
<!--- Order Items -->
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<%
@queue_items_details.each do |qid|
if qid.station_name == qsi[:station_name]
@queue_items_details.each do |qid|
if qid.price != 0
if qid.station_name == qsi[:station_name]
%>
<div class="card queue_station">
<div class="card-block">
@@ -121,7 +124,8 @@
<button id=<%= 'assigned_queue_' + qid.assigned_order_item_id.to_s %> class="btn btn-primary order-item order-complete">COMPLETE</button>
</div>
</div>
<%
<%
end
end
end
%>

View File

@@ -29,7 +29,10 @@
<tbody>
<% sub_total = 0 %>
<% @sale_data.sale_items.each do |sale_item| %>
<% sub_total += sale_item.qty*sale_item.unit_price%>
<%
sub_total += sale_item.qty*sale_item.unit_price
unless sale_item.price == 0
%>
<tr class="item-row" id=<%= sale_item.sale_item_id %> >
<td style="width:60%; text-align:left">
<span id="item-account-type" class="hidden"><%=sale_item.account_id%></span>
@@ -42,7 +45,10 @@
<span id="item-total-price"><%=(sale_item.qty*sale_item.unit_price)%></span>
</td>
</tr>
<%end %>
<%
end
end
%>
</tbody>
</table>
</div>
@@ -166,7 +172,7 @@
<div class="col-md-3">
<div class="form-group">
<button id="net" class="btn btn-warning fluid action-btn">Net</button>
<button id="net" class="btn btn-warning fluid action-btn">Nett</button>
<button id="percentage" class="btn btn-primary fluid action-btn">Percentage</button>
<button id="remove-item" class="btn btn-default fluid action-btn">Remove</button>
</div>

View File

@@ -139,7 +139,7 @@
<%if @customer %>
<p class="hidden customer-id"><%= @customer.customer_id rescue "" %></p>
<p>Customer : <%= @customer.name rescue "" %></p>
<%end%>
<%end%>
</div>
</div>
<div class="card-text">
@@ -250,8 +250,10 @@
</table>
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
<% end %>
<% if @sale_array.size > 1 %>
<br><br>
Pending Payment
<% end %>
<% @sale_array.each do |sale|
if @sale_array.size > 1
unless sale.receipt_no == @sale_array[0].receipt_no
@@ -474,20 +476,20 @@ $('#edit').on('click',function(){
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
window.location.href = '/origami/table/'+ dining_id + "/sale/"+ sale_id + "/edit";
})
$('#void').on('click',function () {
var sure = confirm("Are you sure want to Void");
if (sure == true) {
var sale_id = $('#sale_id').val();
var ajax_url = "/origami/sale/" + sale_id + '/void';
$.ajax({
type: 'POST',
url: ajax_url,
success: function () {
window.location.href = '/origami/';
}
})
} else {
$('#void').on('click',function () {
var sure = confirm("Are you sure want to Void");
if (sure == true) {
var sale_id = $('#sale_id').val();
var ajax_url = "/origami/sale/" + sale_id + '/void';
$.ajax({
type: 'POST',
url: ajax_url,
success: function () {
window.location.href = '/origami/';
}
})
} else {
}

View File

@@ -155,7 +155,7 @@
sub_total = 0
if @status == "sale"
@obj.sale_items.each do |sale_item|
sub_total = sub_total + sale_item.price
sub_total = sub_total + sale_item.price
%>
<input type="hidden" id="sale_id" value="<%= @obj.sale_id %>">
<% unless sale_item.price == 0 %>
@@ -213,32 +213,52 @@
</table>
</div>
<br>
<%
if @status_sale == 'sale'
unless @order_items.nil?
%>
Pending New Order
<table class="table table-striped">
<%
count = 0
@order_items.each do |order_item |
count += 1
%>
<%
if @status == 'sale'
unless @order_items.nil?
%>
Added New Order
<table class="table table-striped">
<%
@order_items.each do |order_item |
<tr>
<td><%= count %>
<td class='item-name'><%= order_item.item_name %></td>
<td class='item-attr'><%= order_item.qty %></td>
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
</tr>
<%
end
%>
</table>
<button class='btn btn-primary' id='add_invoice'> Add to existing invoice </button>
<% end %>
<% if @sale_array.size > 1 %>
<br><br>
Pending Payment
<% end %>
<% @sale_array.each do |sale|
if @sale_array.size > 1
unless sale.receipt_no == @sale_array[0].receipt_no
%>
<tr>
<td class='item-name'><%= order_item.item_name %></td>
<td class='item-attr'><%= order_item.qty %></td>
<td class='item-attr'><%= order_item.qty*order_item.price %></td>
</tr>
<%
end
%>
</table>
<button class='btn btn-primary'> Add to existing invoice </button>
<%
end
end
%>
<table class="table table-striped">
<tr>
<td>Receipt No - <%= sale.receipt_no %></td>
<td><button class='btn btn-sm btn-primary invoicedetails' id="<%= sale.sale_id %>">Show Detail </button></td>
</tr>
</table>
<%
end
end
end
end
%>
</div>
</div>