remove git conflict
This commit is contained in:
@@ -307,6 +307,18 @@ function show_order_detail(url,sr_no){
|
|||||||
$('#expected_time').text('');
|
$('#expected_time').text('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if((data.pickup_time!=undefined) && (data.pickup_time!=null)){
|
||||||
|
var newPickupDate = new Date(data.pickup_time);
|
||||||
|
var pickup_time = timeFormat(newPickupDate);
|
||||||
|
var pickup_datetime = getOrderMonth(newPickupDate.getMonth()) +' '+ (newPickupDate.getDate() >= 10? newPickupDate.getDate() : '0' + newPickupDate.getDate()) +', '+newPickupDate.getFullYear()+'('+getOrderDay(newPickupDate.getDay())+')'+' '+pickup_time;
|
||||||
|
|
||||||
|
$('.pickup-time').show();
|
||||||
|
$('#pickup_time').text(pickup_datetime? pickup_datetime : '');
|
||||||
|
}else{
|
||||||
|
$('.pickup-time').hide();
|
||||||
|
$('#pickup_time').text('');
|
||||||
|
}
|
||||||
|
|
||||||
item_list.empty();
|
item_list.empty();
|
||||||
|
|
||||||
if(items!=undefined && items!=""){
|
if(items!=undefined && items!=""){
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ class OrderReservation < ApplicationRecord
|
|||||||
order_reservation.order_reservation_type = order_reserve[:order_type]
|
order_reservation.order_reservation_type = order_reserve[:order_type]
|
||||||
order_reservation.customer_id = order_reserve[:cus_info]
|
order_reservation.customer_id = order_reserve[:cus_info]
|
||||||
order_reservation.requested_time = Time.zone.parse(order_reserve[:requested_time]).utc
|
order_reservation.requested_time = Time.zone.parse(order_reserve[:requested_time]).utc
|
||||||
|
if order_reserve[:pickup_time]
|
||||||
|
order_reservation.pickup_time = Time.zone.parse(order_reserve[:pickup_time]).utc
|
||||||
|
end
|
||||||
order_reservation.callback_url = order_reserve[:callback_url]
|
order_reservation.callback_url = order_reserve[:callback_url]
|
||||||
order_reservation.transaction_ref = order_reserve[:reference]
|
order_reservation.transaction_ref = order_reserve[:reference]
|
||||||
if order_reserve[:order_info]
|
if order_reserve[:order_info]
|
||||||
|
|||||||
@@ -113,6 +113,11 @@ class ReceiptBillA5Pdf < Prawn::Document
|
|||||||
end
|
end
|
||||||
|
|
||||||
def cashier_info(sale_data, customer_name, latest_order_no)
|
def cashier_info(sale_data, customer_name, latest_order_no)
|
||||||
|
move_down line_move
|
||||||
|
if !latest_order_no.nil?
|
||||||
|
move_down line_move
|
||||||
|
text "OrderNo : #{ latest_order_no }", :size => self.header_font_size,:align => :left
|
||||||
|
end
|
||||||
move_down line_move
|
move_down line_move
|
||||||
# move_down 2
|
# move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
@@ -159,15 +164,6 @@ class ReceiptBillA5Pdf < Prawn::Document
|
|||||||
# - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" ,
|
# - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" ,
|
||||||
# :size => self.item_font_size,:align => :right
|
# :size => self.item_font_size,:align => :right
|
||||||
# end
|
# end
|
||||||
|
|
||||||
if !latest_order_no.nil?
|
|
||||||
y_position = cursor
|
|
||||||
move_down line_move
|
|
||||||
bounding_box([0,y_position], :width =>self.page_width - 10, :height => self.item_height) do
|
|
||||||
text "OrderNo : #{ latest_order_no }",:size => self.item_font_size,:align => :left
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
move_down line_move
|
move_down line_move
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -114,7 +114,11 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
|
|
||||||
def cashier_info(sale_data, customer_name, latest_order_no)
|
def cashier_info(sale_data, customer_name, latest_order_no)
|
||||||
move_down line_move
|
move_down line_move
|
||||||
|
if !latest_order_no.nil?
|
||||||
|
move_down line_move
|
||||||
|
text "OrderNo : #{ latest_order_no }", :size => self.header_font_size,:align => :left
|
||||||
|
end
|
||||||
|
move_down line_move
|
||||||
# move_down 2
|
# move_down 2
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0,y_position], :width =>self.description_width + self.price_num_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.description_width + self.price_num_width, :height => self.item_height) do
|
||||||
@@ -153,13 +157,6 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
# - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" ,
|
# - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" ,
|
||||||
# :size => self.item_font_size,:align => :right
|
# :size => self.item_font_size,:align => :right
|
||||||
# end
|
# end
|
||||||
if !latest_order_no.nil?
|
|
||||||
y_position = cursor
|
|
||||||
move_down line_move
|
|
||||||
bounding_box([0,y_position], :width =>self.page_width - 10, :height => self.item_height) do
|
|
||||||
text "OrderNo : #{ latest_order_no }",:size => self.item_font_size,:align => :left
|
|
||||||
end
|
|
||||||
end
|
|
||||||
move_down line_move
|
move_down line_move
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
if @order
|
if @order
|
||||||
|
|
||||||
json.(@order, :order_reservation_id,:order_reservation_type,:customer_id,
|
json.(@order, :order_reservation_id,:order_reservation_type,:customer_id,
|
||||||
:requested_time,:expected_waiting_time,:callback_url,:transaction_ref,:item_count,:total_customer,:payment_type,
|
:requested_time,:pickup_time,:expected_waiting_time,:callback_url,:transaction_ref,:item_count,:total_customer,:payment_type,
|
||||||
:payment_status,:payment_ref,:taxes,:total_amount,:total_tax,
|
:payment_status,:payment_ref,:taxes,:total_amount,:total_tax,
|
||||||
:discount_amount,:convenience_charge,:grand_total,:status,:order_remark,
|
:discount_amount,:convenience_charge,:grand_total,:status,:order_remark,
|
||||||
:remark,:sale_id)
|
:remark,:sale_id)
|
||||||
|
|||||||
@@ -429,6 +429,12 @@
|
|||||||
<b><span id="expected_time"></span> MINS</b>
|
<b><span id="expected_time"></span> MINS</b>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="body-td align-left pickup-time">
|
||||||
|
<span class="font-13">PICK-UP TIME</span><br>
|
||||||
|
<b id="pickup_time"></b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="body-td align-left">
|
<td class="body-td align-left">
|
||||||
<span class="font-13">NAME</span><br>
|
<span class="font-13">NAME</span><br>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ class CreateOrderReservations < ActiveRecord::Migration[5.1]
|
|||||||
t.string :order_reservation_type, :null => false
|
t.string :order_reservation_type, :null => false
|
||||||
t.string :customer_id, :null => false
|
t.string :customer_id, :null => false
|
||||||
t.datetime :requested_time, :null => false
|
t.datetime :requested_time, :null => false
|
||||||
|
t.datetime :pickup_time, :null => false
|
||||||
t.string :callback_url, :null => false
|
t.string :callback_url, :null => false
|
||||||
t.string :transaction_ref, :null => false
|
t.string :transaction_ref, :null => false
|
||||||
t.string :sale_id
|
t.string :sale_id
|
||||||
@@ -23,6 +24,7 @@ class CreateOrderReservations < ActiveRecord::Migration[5.1]
|
|||||||
t.string :status, :null => false, :default => "new"
|
t.string :status, :null => false, :default => "new"
|
||||||
t.string :order_remark
|
t.string :order_remark
|
||||||
t.string :remark
|
t.string :remark
|
||||||
|
t.json :action_times
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user