remove unnessary timezone convertion
This commit is contained in:
@@ -42,7 +42,7 @@ class MenuCategory < ApplicationRecord
|
||||
|
||||
from_t = Time.parse(menu.valid_time_from.strftime("%H:%M:%S"))
|
||||
to_t = Time.parse(menu.valid_time_to.strftime("%H:%M:%S"))
|
||||
current_t = Time.parse(Time.now.utc.getlocal.strftime("%H:%M:%S"))
|
||||
current_t = Time.parse(Time.now.strftime("%H:%M:%S"))
|
||||
|
||||
from = from_t.hour * 3600 + from_t.min*60 + from_t.sec
|
||||
to = to_t.hour * 3600 + to_t.min* 60 + to_t.sec
|
||||
|
||||
@@ -30,7 +30,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
|
||||
# #Generate PDF
|
||||
# #Print
|
||||
# cashier = shift_sale.employee.name
|
||||
# shift_name = shift_sale.shift_started_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") + "_" + shift_sale.shift_closed_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p")
|
||||
# shift_name = shift_sale.shift_started_at.strftime("%d-%m-%Y %I:%M %p") + "_" + shift_sale.shift_closed_at.strftime("%d-%m-%Y %I:%M %p")
|
||||
|
||||
# pdf = CloseCashierCustomisePdf.new(printer_settings,shift_sale,shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges)
|
||||
# filename = "tmp/close_cashier_#{cashier}_#{shift_name}.pdf"
|
||||
@@ -55,7 +55,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
|
||||
#Generate PDF
|
||||
#Print
|
||||
cashier = shift_sale.employee.name
|
||||
shift_name = shift_sale.shift_started_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") + "_" + shift_sale.shift_closed_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p")
|
||||
shift_name = shift_sale.shift_started_at.strftime("%d-%m-%Y %I:%M %p") + "_" + shift_sale.shift_closed_at.strftime("%d-%m-%Y %I:%M %p")
|
||||
filename = "tmp/close_cashier_#{cashier}_#{shift_name}.pdf"
|
||||
pdf = CloseCashierPdf.new(printer_settings, shift_sale, sale_items, total_other_charges_info, @account_cate_count, @menu_cate_count, @totalByAccount, shop_details, sale_taxes, other_payment, amount, discount, member_discount, total_dinein, total_takeway, total_other_charges, total_waste, total_spoile, total_credit_payments, payment_methods, foodcourt)
|
||||
close_cashier_pdf = Lookup.collection_of("print_settings") #print_settings with name:CloseCashierPdf
|
||||
|
||||
@@ -202,7 +202,7 @@ class Sale < ApplicationRecord
|
||||
def generate_invoice_by_items (items, requested_by)
|
||||
taxable = true
|
||||
self.requested_by = requested_by
|
||||
self.requested_at = DateTime.now.utc.getlocal
|
||||
self.requested_at = DateTime.now
|
||||
|
||||
items.each do |item|
|
||||
add_item(item)
|
||||
|
||||
Reference in New Issue
Block a user