diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 4126bf81..39152c58 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -96,7 +96,7 @@ select.form-control { } .pay{ - width: 98%; + width: 86%; height:211px; line-height:211px; text-align:center; @@ -105,11 +105,12 @@ select.form-control { } .payment{ - height:70px;line-height:70px; + height:70px; + line-height:70px; align:center; color:white; font-size:16px; - margin-top:5px; + margin:5px; } .font-12 { @@ -157,7 +158,7 @@ select.form-control { } .long{ - width:49%; + width:43%; } .sold { @@ -239,7 +240,7 @@ select.form-control { /* End Colors */ .left{ - margin-left:1px; + margin-left:20px; } .bottom{ @@ -259,6 +260,14 @@ tr.discount-item-row:hover { color: red !important; } +.border-top{ + border-top:1px solid #fff; +} + +.border-right{ + border-right:1px solid #fff; +} + .border-left{ border-left:1px solid #fff; } diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index 0cd18f0f..cfaa96bd 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -3,270 +3,271 @@
-
-
-
-
+
+
+
+
- - - - - - - - - - - - - - - -
Receipt No : <%=@sale_data.receipt_no rescue ' '%>Receipt Date : <%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>
Table No - <%=@table_no%>Sale Id <% if @sale_data %><%=@sale_data.sale_id %><% end %>
Customer : <%= @sale_data.customer.name%>Customer ID : <%= @sale_data.customer.customer_id%>
+
+
Receipt No : <%=@sale_data.receipt_no rescue ' '%>
+
Receipt Date : <%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %>
+
+
+
Table No : <%=@table_no%>
+
Sale ID : <% if @sale_data %><%=@sale_data.sale_id %><% end %>
+
+ +
+
Customer : <%= @sale_data.customer.name%> +
+
Customer ID : <%= @sale_data.customer.customer_id%>
+
-
+ +
- - - - - - - -
#ItemsQTY - Price -
-
-
- -
- - - <% sub_total = 0 - count = 0 - %> - <% @sale_data.sale_items.each do |sale_item| - count += 1 - %> - - <% sub_total += sale_item.price%> - - - - - - - <%end %> - -
<%= count %> - <%=sale_item.product_name%>@<%=sale_item.unit_price%> - - <%=sale_item.qty%> - - <%=(sale_item.price)%> -
-
-
- -
- +
+
+ +
+ + + <% sub_total = 0 + count = 0 + %> + <% @sale_data.sale_items.each do |sale_item| + count += 1 + %> + + <% sub_total += sale_item.price%> + + + + + + + <%end %> + +
<%= count %><%=sale_item.product_name%>@<%=sale_item.unit_price%><%=sale_item.qty%><%=(sale_item.price)%>
+
+
+
+ + + + +
+
+ +
+
+
+
+
Amount Due
+
<%= @sale_data.grand_total %>
+
+
+
+
Cash
+
<%= @cash %>
+
+ +
+
Credit
+
<%= @credit %>
+
+ <% if @other == 0.0 && @ppamount == 0.0 && @visacount == 0.0 && @jcbcount == 0.0 && @mastercount == 0.0%> +
+
Other Payments
+
<%= @other %>
+
+ <% else %> +
+
Other Payments
+
+ <% end %> +
+
+
+ + <% if @other != 0.0 %> +
+
+
MPU
+
<%= @other %>
+ <% else %> + + <% end %> + + <% if @ppamount != 0.0 %> +
+
+
Redeem
+
<%= @ppamount %>
+
+ <% else %> + + <% end %> + + <% if @visacount != 0.0 %> +
+
+
Visa
+
<%= @visacount %>
+
+ <% else %> + + <% end %> + + <% if @jcbcount != 0.0 %> +
+
+
JCB
+
<%= @jcbcount %>
+
+ <% else %> + + <% end %> + + <% if @mastercount != 0.0 %> +
+
+
Master
+
<%= @mastercount %>
+
+ <% else %> + + <% end %> +
+
+
Balance
+
<%= @sale_data.grand_total %>
+
+
-
-
-
-
Amount Due
-
<%= @sale_data.grand_total %>
-
-
-
-
Cash
-
<%= @cash %>
-
- -
-
Credit
-
<%= @credit %>
-
- <% if @other == 0.0 && @ppamount == 0.0 && @visacount == 0.0 && @jcbcount == 0.0 && @mastercount == 0.0%> -
-
Other Payments
-
<%= @other %>
-
- <% else %> -
-
Other Payments
-
- <% end %> - - - <% if @other != 0.0 %> -
-
-
MPU
-
<%= @other %>
-
- <% else %> - - <% end %> - - <% if @ppamount != 0.0 %> -
-
-
Redeem
-
<%= @ppamount %>
-
- <% else %> - - <% end %> - - <% if @visacount != 0.0 %> -
-
-
Visa
-
<%= @visacount %>
-
- <% else %> - - <% end %> - - <% if @jcbcount != 0.0 %> -
-
-
JCB
-
<%= @jcbcount %>
-
- <% else %> - - <% end %> - - <% if @mastercount != 0.0 %> -
-
-
Master
-
<%= @mastercount %>
-
- <% else %> - - <% end %> -
-
-
Balance
-
<%= @sale_data.grand_total %>
-
-
- -
-
-
-
1
-
2
-
3
+ -
- - - +
+
+ +
@@ -393,16 +394,16 @@ title: "Infomation!", text: 'Changed amount ' + $('#balance').text() * (-1), }, function () { - window.location.href = '/origami'; + window.location.href = '/origami'; }); }else{ $('#pay').text("Pay"); swal({ - title: "Infomation!", - text: 'Thank You !', - }, function () { - window.location.href = '/origami'; - }); + title: "Infomation!", + text: 'Thank You !', + }, function () { + window.location.href = '/origami'; + }); } } }); @@ -411,19 +412,19 @@ $('#void').on('click',function () { swal({ - title: "Infomation!", - text: 'Are you sure want to Void !', - }, function () { - var sale_id = $('#sale_id').text(); - var ajax_url = "/origami/sale/" + sale_id + '/void'; - $.ajax({ - type: 'POST', - url: ajax_url, - success: function () { - window.location.href = '/origami/'; - } - }) - }); + title: "Infomation!", + text: 'Are you sure want to Void !', + }, function () { + var sale_id = $('#sale_id').text(); + var ajax_url = "/origami/sale/" + sale_id + '/void'; + $.ajax({ + type: 'POST', + url: ajax_url, + success: function () { + window.location.href = '/origami/'; + } + }) + }); }); }); @@ -459,17 +460,17 @@ if (cash > 0) { swal({ - title: "Infomation!", - text: 'Thank You !', - }, function () { - window.location.href = '/origami'; - }); + title: "Infomation!", + text: 'Thank You !', + }, function () { + window.location.href = '/origami'; + }); } } }); }); - + function calculate_member_discount(sale_id) { var sub_total = $('#sub-total').text(); var member_id = $('#membership_id').text();