update sale ability and shipt slae
This commit is contained in:
@@ -90,6 +90,11 @@ class Ability
|
||||
|
||||
can :move_dining, :moveroom
|
||||
|
||||
can :first_bill, :payment
|
||||
can :show, :payment
|
||||
can :create, :payment
|
||||
can :reprint, :payment
|
||||
|
||||
elsif user.role == "accountant"
|
||||
|
||||
can :index, :dailysale
|
||||
|
||||
@@ -21,7 +21,7 @@ class ShiftSale < ApplicationRecord
|
||||
#find open shift where is open today and is not closed and login by current cashier
|
||||
today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||
puts today_date
|
||||
shift = ShiftSale.where("TO_CHAR(shift_started_at, 'YYYY-MM-DD')=? and shift_started_at is not null and shift_closed_at is null and employee_id = #{current_user}", today_date).take
|
||||
shift = ShiftSale.where("DATE(shift_started_at)= #{ today_date } and shift_started_at is not null and shift_closed_at is null and employee_id = #{current_user}").take
|
||||
|
||||
return shift
|
||||
#end
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<li><%= link_to "Daily Sale Report", reports_dailysale_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Sales Item Report", reports_saleitem_index_path, :tabindex =>"-1" %></li>
|
||||
<li><%= link_to "Receipt Report", reports_receipt_no_index_path, :tabindex =>"-1" %></li>
|
||||
<!-- <li><%= link_to "Shift Sale Report", reports_shiftsale_index_path, :tabindex =>"-1" %></li> -->
|
||||
<li><%= link_to "Shift Sale Report", reports_shiftsale_index_path, :tabindex =>"-1" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
<!-- <th>Credit Charges</th> -->
|
||||
<th>Credit Payment</th>
|
||||
<!-- <th>FOC Payment</th> -->
|
||||
<th>Card Payment</th>
|
||||
<th>Grand Total +
|
||||
<!-- <br/>Rounding Adj --></th>
|
||||
<th>Other Payment</th>
|
||||
<!-- <th>Grand Total
|
||||
<br/>Rounding Adj</th> -->
|
||||
<!-- <th>Rounding Adj</th> -->
|
||||
<th>Grand Total</th>
|
||||
</tr>
|
||||
@@ -101,7 +101,7 @@
|
||||
<!-- <td><b><%= sprintf("%.2f",accept_credit) rescue '-'%></b></td> -->
|
||||
<!-- <td><b><%= sprintf("%.2f",foc) rescue '-'%></b></td> -->
|
||||
<td><b><%= sprintf("%.2f",card) rescue '-'%></b></td>
|
||||
<td><b><%= sprintf("%.2f",total) rescue '-'%></b></td>
|
||||
<!-- <td><b><%= sprintf("%.2f",total) rescue '-'%></b></td> -->
|
||||
<!-- <td><b><%= sprintf("%.2f",rounding_adj) rescue '-'%></b></td> -->
|
||||
<td><b><%= sprintf("%.2f",g_total) rescue '-'%></b></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user