promotion + merge with master
This commit is contained in:
@@ -24,6 +24,7 @@ class Api::BillController < Api::ApiController
|
||||
@sale = Sale.new
|
||||
@status, @sale_id = @sale.generate_invoice_from_order(params[:order_id], current_login_employee, get_cashier)
|
||||
end
|
||||
# Promotion.promo_activate(@sale)
|
||||
else
|
||||
@status = false
|
||||
@error_message = "No Current Open Shift"
|
||||
|
||||
@@ -10,8 +10,7 @@ class Promotion < ApplicationRecord
|
||||
PROMO_TYPE3 = "Net_price"
|
||||
PROMO_TYPE4 = "Percentage"
|
||||
|
||||
def self.promo_activate
|
||||
saleObj = Sale.first # Test
|
||||
def self.promo_activate(saleObj)
|
||||
current_day = Time.now.strftime("%Y-%m-%d")
|
||||
current_time = Time.now.strftime('%H:%M:%S')
|
||||
day = Date.today.wday
|
||||
|
||||
@@ -340,7 +340,7 @@ class Sale < ApplicationRecord
|
||||
tax_profiles = TaxProfile.all.order("order_by asc")
|
||||
|
||||
customer = Customer.find(self.customer_id)
|
||||
|
||||
puts customer
|
||||
#Create new tax records
|
||||
tax_profiles.each do |tax|
|
||||
customer.tax_profiles.each do |cus_tax|
|
||||
|
||||
@@ -108,9 +108,7 @@
|
||||
<button id="cash_in" type="button" class="btn btn-block btn-primary"> Cash In </button>
|
||||
<button id="cash_out" type="button" class="btn btn-block btn-primary"> Cash Out </button>
|
||||
<!-- Temporary Disabled -->
|
||||
<%if current_login_employee.role == "cashier" && @shop.quick_sale_summary == true%>
|
||||
<button id="sale_summary" type="button" class="btn btn-block btn-primary">Sale Summary</button>
|
||||
<%end%>
|
||||
|
||||
<button id="close_cashier" type="button" class="btn btn-block btn-primary"> Close Cashier </button>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user