bill channel for request bill and creditnote payment duoble amt
This commit is contained in:
@@ -16,7 +16,7 @@ class Origami::RequestBillsController < ApplicationController
|
||||
bk_order = BookingOrder.find_by_order_id(order_id)
|
||||
order = Order.find(order_id)
|
||||
check_booking = Booking.find_by_booking_id(bk_order.booking_id)
|
||||
|
||||
table = DiningFacility.find(check_booking.dining_facility_id)
|
||||
if check_booking.sale_id.nil?
|
||||
# Create Sale if it doesn't exist
|
||||
@status, @sale_id = @sale.generate_invoice_from_booking(check_booking.id,current_login_employee, current_user, order.source)
|
||||
@@ -33,6 +33,8 @@ class Origami::RequestBillsController < ApplicationController
|
||||
|
||||
# Promotion Activation
|
||||
Promotion.promo_activate(@sale)
|
||||
#bill channel
|
||||
ActionCable.server.broadcast "bill_channel",table: table
|
||||
if order.source == "quick_service"
|
||||
result = {:status=> @status, :data => @sale.sale_id }
|
||||
render :json => result.to_json
|
||||
|
||||
@@ -472,7 +472,7 @@ class SalePayment < ApplicationRecord
|
||||
elsif paid_amount.to_f > 0 #|| paid_amount != "0.0"
|
||||
table_update_status(sObj)
|
||||
update_shift
|
||||
elsif method_status && paid_amount.to_f == 0
|
||||
elsif method_status && paid_amount.to_f == 0 && is_credit == 0
|
||||
table_update_status(sObj)
|
||||
update_shift
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user