shop upate for 20 files
This commit is contained in:
@@ -9,7 +9,7 @@ class Api::CallWaitersController < ActionController::API
|
|||||||
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time
|
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time
|
||||||
|
|
||||||
# get printer info
|
# get printer info
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
unique_code = "CallWaiterPdf"
|
unique_code = "CallWaiterPdf"
|
||||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class Origami::AlipayController < BaseOrigamiController
|
|||||||
sale_data = Sale.find_by_sale_id(@sale_id)
|
sale_data = Sale.find_by_sale_id(@sale_id)
|
||||||
total = 0
|
total = 0
|
||||||
@alipaycount = 0
|
@alipaycount = 0
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
@rounding_adj = 0
|
@rounding_adj = 0
|
||||||
@can_alipay = 0
|
@can_alipay = 0
|
||||||
@member_discount = 0
|
@member_discount = 0
|
||||||
@@ -54,7 +54,7 @@ class Origami::AlipayController < BaseOrigamiController
|
|||||||
ref_no = params[:ref_no]
|
ref_no = params[:ref_no]
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
# if shop_details.is_rounding_adj
|
# if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class Origami::CreditPaymentsController < BaseOrigamiController
|
|||||||
@creditcount = 0
|
@creditcount = 0
|
||||||
others = 0
|
others = 0
|
||||||
|
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
if @shop.is_rounding_adj
|
if @shop.is_rounding_adj
|
||||||
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
||||||
else
|
else
|
||||||
@@ -32,7 +32,7 @@ class Origami::CreditPaymentsController < BaseOrigamiController
|
|||||||
sale_id = params[:sale_id]
|
sale_id = params[:sale_id]
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
if shop_details.is_rounding_adj
|
if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class Origami::DingaController < BaseOrigamiController
|
|||||||
@membership_rebate_balance=0
|
@membership_rebate_balance=0
|
||||||
sale_data = Sale.find_by_sale_id(@sale_id)
|
sale_data = Sale.find_by_sale_id(@sale_id)
|
||||||
|
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
# if @shop.is_rounding_adj
|
# if @shop.is_rounding_adj
|
||||||
# new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
# new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
||||||
# else
|
# else
|
||||||
@@ -77,7 +77,7 @@ class Origami::DingaController < BaseOrigamiController
|
|||||||
payment_method = "dinga"
|
payment_method = "dinga"
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
if shop_details.is_rounding_adj
|
if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class Origami::HomeController < BaseOrigamiController
|
|||||||
@rooms = Room.all.active.order('status desc')
|
@rooms = Room.all.active.order('status desc')
|
||||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||||
@orders = Order.where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
@orders = Order.where("DATE_FORMAT(date,'%Y-%m-%d') = ? and status != 'billed'",DateTime.now.strftime('%Y-%m-%d')).order('date desc')
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
|
|
||||||
# @shift = ShiftSale.current_open_shift(current_user.id)
|
# @shift = ShiftSale.current_open_shift(current_user.id)
|
||||||
end
|
end
|
||||||
@@ -26,7 +26,7 @@ class Origami::HomeController < BaseOrigamiController
|
|||||||
@status_sale = ""
|
@status_sale = ""
|
||||||
@sale_array = Array.new
|
@sale_array = Array.new
|
||||||
|
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
@membership = MembershipSetting::MembershipSetting
|
@membership = MembershipSetting::MembershipSetting
|
||||||
@payment_methods = PaymentMethodSetting.all
|
@payment_methods = PaymentMethodSetting.all
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class Origami::JcbController < BaseOrigamiController
|
|||||||
sale_data = Sale.find_by_sale_id(@sale_id)
|
sale_data = Sale.find_by_sale_id(@sale_id)
|
||||||
total = 0
|
total = 0
|
||||||
@jcbcount = 0
|
@jcbcount = 0
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
@rounding_adj = 0
|
@rounding_adj = 0
|
||||||
@can_jcb = 0
|
@can_jcb = 0
|
||||||
@member_discount= 0
|
@member_discount= 0
|
||||||
@@ -56,7 +56,7 @@ class Origami::JcbController < BaseOrigamiController
|
|||||||
ref_no = params[:ref_no]
|
ref_no = params[:ref_no]
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
# if shop_details.is_rounding_adj
|
# if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Origami::JunctionPayController < BaseOrigamiController
|
|||||||
@cashier_id = current_user.emp_id
|
@cashier_id = current_user.emp_id
|
||||||
|
|
||||||
@payment_method_setting_nav = PaymentMethodSetting.all
|
@payment_method_setting_nav = PaymentMethodSetting.all
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
if @shop.is_rounding_adj
|
if @shop.is_rounding_adj
|
||||||
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
||||||
else
|
else
|
||||||
@@ -52,7 +52,7 @@ class Origami::JunctionPayController < BaseOrigamiController
|
|||||||
|
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
# if shop_details.is_rounding_adj
|
# if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class Origami::MasterController < BaseOrigamiController
|
|||||||
sale_data = Sale.find_by_sale_id(@sale_id)
|
sale_data = Sale.find_by_sale_id(@sale_id)
|
||||||
total = 0
|
total = 0
|
||||||
@mastercount = 0
|
@mastercount = 0
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
@rounding_adj = 0
|
@rounding_adj = 0
|
||||||
@can_master = 0
|
@can_master = 0
|
||||||
@member_discount = 0
|
@member_discount = 0
|
||||||
@@ -53,7 +53,7 @@ class Origami::MasterController < BaseOrigamiController
|
|||||||
ref_no = params[:ref_no]
|
ref_no = params[:ref_no]
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
# if shop_details.is_rounding_adj
|
# if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class Origami::MovetableController < BaseOrigamiController
|
|||||||
@type = (DiningFacility.find(change_to)).type
|
@type = (DiningFacility.find(change_to)).type
|
||||||
@moved_by = @current_user.name
|
@moved_by = @current_user.name
|
||||||
@date = DateTime.now
|
@date = DateTime.now
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
unique_code = "MoveTablePdf"
|
unique_code = "MoveTablePdf"
|
||||||
pdf_no = PrintSetting.where(:unique_code => unique_code).count
|
pdf_no = PrintSetting.where(:unique_code => unique_code).count
|
||||||
#print_settings = PrintSetting.find_by_unique_code(unique_code)
|
#print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class Origami::MpuController < BaseOrigamiController
|
|||||||
sale_data = Sale.find_by_sale_id(@sale_id)
|
sale_data = Sale.find_by_sale_id(@sale_id)
|
||||||
total = 0
|
total = 0
|
||||||
@mpucount = 0
|
@mpucount = 0
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
@rounding_adj = 0
|
@rounding_adj = 0
|
||||||
@can_mpu = 0
|
@can_mpu = 0
|
||||||
@member_discount = 0
|
@member_discount = 0
|
||||||
@@ -54,7 +54,7 @@ class Origami::MpuController < BaseOrigamiController
|
|||||||
ref_no = params[:ref_no]
|
ref_no = params[:ref_no]
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
# if shop_details.is_rounding_adj
|
# if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class Origami::PaymalController < BaseOrigamiController
|
|||||||
@membership_rebate_balance=0
|
@membership_rebate_balance=0
|
||||||
sale_data = Sale.find_by_sale_id(@sale_id)
|
sale_data = Sale.find_by_sale_id(@sale_id)
|
||||||
|
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
# if @shop.is_rounding_adj
|
# if @shop.is_rounding_adj
|
||||||
# new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
# new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
||||||
# else
|
# else
|
||||||
@@ -73,7 +73,7 @@ class Origami::PaymalController < BaseOrigamiController
|
|||||||
sale_id = params[:sale_id]
|
sale_id = params[:sale_id]
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
# if shop_details.is_rounding_adj
|
# if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
end
|
end
|
||||||
|
|
||||||
#shop detail
|
#shop detail
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
# customer= Customer.where('customer_id=' +.customer_id)
|
# customer= Customer.where('customer_id=' +.customer_id)
|
||||||
customer = Customer.find(sale_data.customer_id)
|
customer = Customer.find(sale_data.customer_id)
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
@@ -99,7 +99,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
|
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
if shop_details.is_rounding_adj
|
if shop_details.is_rounding_adj
|
||||||
a = saleObj.grand_total % 25 # Modulus
|
a = saleObj.grand_total % 25 # Modulus
|
||||||
@@ -238,7 +238,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
@dining = ''
|
@dining = ''
|
||||||
@other_payment = 0.0
|
@other_payment = 0.0
|
||||||
|
|
||||||
@shop = Shop::ShopDetail #show shop info
|
@shop = Shop.first #show shop info
|
||||||
|
|
||||||
@customer_lists = Customer.where("customer_id = 'CUS-000000000001' or customer_id = 'CUS-000000000002'")
|
@customer_lists = Customer.where("customer_id = 'CUS-000000000001' or customer_id = 'CUS-000000000002'")
|
||||||
|
|
||||||
@@ -391,7 +391,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
customer= Customer.find(saleObj.customer_id)
|
customer= Customer.find(saleObj.customer_id)
|
||||||
|
|
||||||
#shop detail
|
#shop detail
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
# get member information
|
# get member information
|
||||||
rebate = MembershipSetting.find_by_rebate(1)
|
rebate = MembershipSetting.find_by_rebate(1)
|
||||||
if customer.membership_id != nil && rebate
|
if customer.membership_id != nil && rebate
|
||||||
@@ -475,7 +475,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
customer= Customer.find(saleObj.customer_id)
|
customer= Customer.find(saleObj.customer_id)
|
||||||
|
|
||||||
#shop detail
|
#shop detail
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# get printer info
|
# get printer info
|
||||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class Origami::PayparPaymentsController < BaseOrigamiController
|
|||||||
payment_method = "paypar"
|
payment_method = "paypar"
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
if shop_details.is_rounding_adj
|
if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class Origami::RedeemPaymentsController < BaseOrigamiController
|
|||||||
@membership_rebate_balance=0
|
@membership_rebate_balance=0
|
||||||
sale_data = Sale.find_by_sale_id(@sale_id)
|
sale_data = Sale.find_by_sale_id(@sale_id)
|
||||||
|
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
# if @shop.is_rounding_adj
|
# if @shop.is_rounding_adj
|
||||||
# new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
# new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
||||||
# else
|
# else
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class Origami::RoomsController < BaseOrigamiController
|
|||||||
@status_sale = ""
|
@status_sale = ""
|
||||||
@sale_array = Array.new
|
@sale_array = Array.new
|
||||||
|
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
@membership = MembershipSetting::MembershipSetting
|
@membership = MembershipSetting::MembershipSetting
|
||||||
@payment_methods = PaymentMethodSetting.all
|
@payment_methods = PaymentMethodSetting.all
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Origami::TableInvoicesController < BaseOrigamiController
|
class Origami::TableInvoicesController < BaseOrigamiController
|
||||||
def index
|
def index
|
||||||
@table = DiningFacility.find(params[:table_id])
|
@table = DiningFacility.find(params[:table_id])
|
||||||
shop = Shop::ShopDetail
|
shop = Shop.first
|
||||||
puts "table bookig lenght"
|
puts "table bookig lenght"
|
||||||
@sale_array = Array.new
|
@sale_array = Array.new
|
||||||
@table.bookings.each do |booking|
|
@table.bookings.each do |booking|
|
||||||
@@ -33,7 +33,7 @@ class Origami::TableInvoicesController < BaseOrigamiController
|
|||||||
@table = DiningFacility.find(params[:table_id])
|
@table = DiningFacility.find(params[:table_id])
|
||||||
@membership = MembershipSetting::MembershipSetting
|
@membership = MembershipSetting::MembershipSetting
|
||||||
@payment_methods = PaymentMethodSetting.all
|
@payment_methods = PaymentMethodSetting.all
|
||||||
shop = Shop::ShopDetail
|
shop = Shop.first
|
||||||
@sale_array = Array.new
|
@sale_array = Array.new
|
||||||
@table.bookings.each do |booking|
|
@table.bookings.each do |booking|
|
||||||
if booking.sale_id.nil?
|
if booking.sale_id.nil?
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class Origami::UnionpayController < BaseOrigamiController
|
|||||||
sale_data = Sale.find_by_sale_id(@sale_id)
|
sale_data = Sale.find_by_sale_id(@sale_id)
|
||||||
total = 0
|
total = 0
|
||||||
@unionpaycount = 0
|
@unionpaycount = 0
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
@rounding_adj = 0
|
@rounding_adj = 0
|
||||||
@can_unionpay = 0
|
@can_unionpay = 0
|
||||||
@member_discount = 0
|
@member_discount = 0
|
||||||
@@ -51,7 +51,7 @@ class Origami::UnionpayController < BaseOrigamiController
|
|||||||
ref_no = params[:ref_no]
|
ref_no = params[:ref_no]
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
# if shop_details.is_rounding_adj
|
# if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class Origami::VisaController < BaseOrigamiController
|
|||||||
sale_data = Sale.find_by_sale_id(@sale_id)
|
sale_data = Sale.find_by_sale_id(@sale_id)
|
||||||
total = 0
|
total = 0
|
||||||
@visacount = 0
|
@visacount = 0
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
@rounding_adj = 0
|
@rounding_adj = 0
|
||||||
@can_visa = 0
|
@can_visa = 0
|
||||||
@member_discount = 0
|
@member_discount = 0
|
||||||
@@ -51,7 +51,7 @@ class Origami::VisaController < BaseOrigamiController
|
|||||||
ref_no = params[:ref_no]
|
ref_no = params[:ref_no]
|
||||||
if(Sale.exists?(sale_id))
|
if(Sale.exists?(sale_id))
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
# if shop_details.is_rounding_adj
|
# if shop_details.is_rounding_adj
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class Origami::VoucherController < BaseOrigamiController
|
|||||||
@vouchercount = 0
|
@vouchercount = 0
|
||||||
others = 0
|
others = 0
|
||||||
|
|
||||||
@shop = Shop::ShopDetail
|
@shop = Shop.first
|
||||||
if @shop.is_rounding_adj
|
if @shop.is_rounding_adj
|
||||||
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -535,7 +535,7 @@ class Sale < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def adjust_rounding
|
def adjust_rounding
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
if shop_details.is_rounding_adj
|
if shop_details.is_rounding_adj
|
||||||
a = self.grand_total % 25 # Modulus
|
a = self.grand_total % 25 # Modulus
|
||||||
@@ -555,7 +555,7 @@ class Sale < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def compute_adjust_rounding(grand_total)
|
def compute_adjust_rounding(grand_total)
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
# rounding adjustment
|
# rounding adjustment
|
||||||
if shop_details.is_rounding_adj
|
if shop_details.is_rounding_adj
|
||||||
a = grand_total % 25 # Modulus
|
a = grand_total % 25 # Modulus
|
||||||
@@ -577,7 +577,7 @@ class Sale < ApplicationRecord
|
|||||||
#Generate new Receipt No when it is not assigned
|
#Generate new Receipt No when it is not assigned
|
||||||
def generate_receipt_no
|
def generate_receipt_no
|
||||||
#shop_code and client_code
|
#shop_code and client_code
|
||||||
shop_details = Shop::ShopDetail
|
shop_details = Shop.first
|
||||||
|
|
||||||
#Date-Shift-
|
#Date-Shift-
|
||||||
if self.receipt_no.nil?
|
if self.receipt_no.nil?
|
||||||
|
|||||||
Reference in New Issue
Block a user