api discount and change tax
This commit is contained in:
@@ -3,13 +3,13 @@ class Api::Foodcourt::BillsController < Api::ApiController
|
||||
def create
|
||||
Sale.transaction do
|
||||
if shift = ShiftSale.current_open_shift(current_login_employee)
|
||||
if booking = Booking.find(params[:booking_id])
|
||||
if @booking = Booking.find(params[:booking_id])
|
||||
cashier = Employee.find(shift.employee_id)
|
||||
order = booking.orders.first
|
||||
order = @booking.orders.first
|
||||
|
||||
if @sale_data = booking.sale
|
||||
if @sale_data = @booking.sale
|
||||
@status = true
|
||||
elsif @sale_data = Sale.generate_invoice_from_booking(booking, current_login_employee, cashier, order.source, params[:current_checkin_induties_count])
|
||||
elsif @sale_data = Sale.generate_invoice_from_booking(@booking, current_login_employee, cashier, order.source, params[:current_checkin_induties_count])
|
||||
@status = true
|
||||
else
|
||||
@status = false
|
||||
|
||||
Reference in New Issue
Block a user