Merge branch 'adminbsb_ui_changes' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
phyusin
2018-09-19 10:41:27 +06:30
3 changed files with 14 additions and 3 deletions

View File

@@ -1219,7 +1219,6 @@ def self.get_by_shift_sale_credit_payment(shift_sale_range,shift,from,to,filter,
sub_query2 = "SELECT (CASE WHEN shift_closed_at IS NOT NULL AND credit_payment > 0
THEN CONCAT(DATE_FORMAT(CONVERT_TZ(shift_started_at,'+00:00','+06:30'),'%d %b %y %h:%i%p'),' - ',DATE_FORMAT(CONVERT_TZ(shift_closed_at,'+00:00','+06:30'),'%d %b %y %h:%i%p'))
WHEN shift_started_at IS NOT NULL AND shift_closed_at IS NULL AND credit_payment > 0 THEN DATE_FORMAT(CONVERT_TZ(shift_started_at,'+00:00','+06:30'),'%d %b %y %h:%i%p')
ELSE '-' END)
FROM shift_sales
WHERE shift_sales.id = s.shift_sale_id"

View File

@@ -83,7 +83,13 @@
<td><%= credit.cashier_name rescue '-' %></td>
<td><%= credit.sale.customer.name rescue '-' %></td>
<td><%= number_with_precision(credit.payment_amount, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>
<td><%= credit.credit_payment_shift_name rescue '-' %></td>
<td>
<%if credit.credit_payment_shift_name == '-' %>
<%= credit.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%>
<% else %>
<%= credit.credit_payment_shift_name rescue '-' %>
<% end %>
</td>
<td><%= credit.credit_payment_receipt_date rescue '-' %></td>
<td><%= credit.credit_payment_cashier_name rescue '-' %></td>
<td><%= number_with_precision(credit.credit_payment, precision: precision.to_i ,delimiter: delimiter) rescue '-' %></td>

View File

@@ -55,7 +55,13 @@
<td><%= credit.cashier_name rescue '-' %></td>
<td><%= credit.sale.customer.name rescue '-' %></td>
<td><%= credit.payment_amount rescue '-' %></td>
<td><%= credit.credit_payment_shift_name rescue '-' %></td>
<td>
<%if credit.credit_payment_shift_name == '-' %>
<%= credit.sale_date.utc.getlocal.strftime("%e %b %I:%M%p") rescue '-'%>
<% else %>
<%= credit.credit_payment_shift_name rescue '-' %>
<% end %>
</td>
<td><%= credit.credit_payment_receipt_date rescue '-' %></td>
<td><%= credit.credit_payment_cashier_name rescue '-' %></td>
<td><%= credit.credit_payment rescue '-' %></td>