change some func: for order rervation
This commit is contained in:
@@ -6,7 +6,7 @@ class Reports::OrderReservationController < BaseReportController
|
||||
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@shift_sale_range = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
@shift_sale_range = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
|
||||
@shift = ''
|
||||
if params[:shift_name].to_i != 0
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
discount_amount = order_reservation.discount_amount
|
||||
delivery_fee = order_reservation.delivery_fee ? order_reservation.delivery_fee : 0.0
|
||||
convenience_charge = order_reservation.convenience_charge
|
||||
if !JSON.parse(order_reservation.taxes).empty?
|
||||
if !JSON.parse(order_reservation.taxes).nil? && !JSON.parse(order_reservation.taxes).empty?
|
||||
JSON.parse(order_reservation.taxes).each do |tax_data|
|
||||
if tax_data[0] == "delivery_tax"
|
||||
delivery_tax = tax_data[1]
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
discount_amount = order_reservation.discount_amount
|
||||
delivery_fee = order_reservation.delivery_fee ? order_reservation.delivery_fee : 0.0
|
||||
convenience_charge = order_reservation.convenience_charge
|
||||
if !JSON.parse(order_reservation.taxes).empty?
|
||||
if !JSON.parse(order_reservation.taxes).nil? && !JSON.parse(order_reservation.taxes).empty?
|
||||
JSON.parse(order_reservation.taxes).each do |tax_data|
|
||||
if tax_data[0] == "delivery_tax"
|
||||
delivery_tax = tax_data[1]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">Stock Check Report</li>
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', inventory_path %>
|
||||
<%= link_to 'Back', reports_stock_check_index_path %>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
discount_amount = order_reservation.discount_amount
|
||||
delivery_fee = order_reservation.delivery_fee ? order_reservation.delivery_fee : 0.0
|
||||
convenience_charge = order_reservation.convenience_charge
|
||||
if !JSON.parse(order_reservation.taxes).empty?
|
||||
if !JSON.parse(order_reservation.taxes).nil? && !JSON.parse(order_reservation.taxes).empty?
|
||||
JSON.parse(order_reservation.taxes).each do |tax_data|
|
||||
if tax_data[0] == "delivery_tax"
|
||||
delivery_tax = tax_data[1]
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
discount_amount = @order_reservation.discount_amount
|
||||
delivery_fee = @order_reservation.delivery_fee ? @order_reservation.delivery_fee : 0.0
|
||||
convenience_charge = @order_reservation.convenience_charge
|
||||
if !JSON.parse(@order_reservation.taxes).empty?
|
||||
if !JSON.parse(@order_reservation.taxes).nil? && !JSON.parse(@order_reservation.taxes).empty?
|
||||
JSON.parse(@order_reservation.taxes).each do |tax_data|
|
||||
if tax_data[0] == "delivery_tax"
|
||||
delivery_tax = tax_data[1]
|
||||
|
||||
Reference in New Issue
Block a user