update sale ability and shipt slae
This commit is contained in:
@@ -89,6 +89,11 @@ class Ability
|
|||||||
can :moving, :movetable
|
can :moving, :movetable
|
||||||
|
|
||||||
can :move_dining, :moveroom
|
can :move_dining, :moveroom
|
||||||
|
|
||||||
|
can :first_bill, :payment
|
||||||
|
can :show, :payment
|
||||||
|
can :create, :payment
|
||||||
|
can :reprint, :payment
|
||||||
|
|
||||||
elsif user.role == "accountant"
|
elsif user.role == "accountant"
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class ShiftSale < ApplicationRecord
|
|||||||
#find open shift where is open today and is not closed and login by current cashier
|
#find open shift where is open today and is not closed and login by current cashier
|
||||||
today_date = DateTime.now.strftime("%Y-%m-%d")
|
today_date = DateTime.now.strftime("%Y-%m-%d")
|
||||||
puts today_date
|
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
|
return shift
|
||||||
#end
|
#end
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<li><%= link_to "Daily Sale Report", reports_dailysale_index_path, :tabindex =>"-1" %></li>
|
<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 "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 "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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -42,9 +42,9 @@
|
|||||||
<!-- <th>Credit Charges</th> -->
|
<!-- <th>Credit Charges</th> -->
|
||||||
<th>Credit Payment</th>
|
<th>Credit Payment</th>
|
||||||
<!-- <th>FOC Payment</th> -->
|
<!-- <th>FOC Payment</th> -->
|
||||||
<th>Card Payment</th>
|
<th>Other Payment</th>
|
||||||
<th>Grand Total +
|
<!-- <th>Grand Total
|
||||||
<!-- <br/>Rounding Adj --></th>
|
<br/>Rounding Adj</th> -->
|
||||||
<!-- <th>Rounding Adj</th> -->
|
<!-- <th>Rounding Adj</th> -->
|
||||||
<th>Grand Total</th>
|
<th>Grand Total</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<!-- <td><b><%= sprintf("%.2f",accept_credit) rescue '-'%></b></td> -->
|
<!-- <td><b><%= sprintf("%.2f",accept_credit) rescue '-'%></b></td> -->
|
||||||
<!-- <td><b><%= sprintf("%.2f",foc) rescue '-'%></b></td> -->
|
<!-- <td><b><%= sprintf("%.2f",foc) rescue '-'%></b></td> -->
|
||||||
<td><b><%= sprintf("%.2f",card) 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",rounding_adj) rescue '-'%></b></td> -->
|
||||||
<td><b><%= sprintf("%.2f",g_total) rescue '-'%></b></td>
|
<td><b><%= sprintf("%.2f",g_total) rescue '-'%></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user