remove git conflict

This commit is contained in:
phyusin
2018-09-07 17:44:57 +06:30
parent aecccffa1e
commit fa421ee718
7 changed files with 35 additions and 19 deletions

View File

@@ -307,6 +307,18 @@ function show_order_detail(url,sr_no){
$('#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();
if(items!=undefined && items!=""){

View File

@@ -57,6 +57,9 @@ class OrderReservation < ApplicationRecord
order_reservation.order_reservation_type = order_reserve[:order_type]
order_reservation.customer_id = order_reserve[:cus_info]
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.transaction_ref = order_reserve[:reference]
if order_reserve[:order_info]

View File

@@ -113,6 +113,11 @@ class ReceiptBillA5Pdf < Prawn::Document
end
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 2
y_position = cursor
@@ -159,15 +164,6 @@ class ReceiptBillA5Pdf < Prawn::Document
# - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" ,
# :size => self.item_font_size,:align => :right
# 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
stroke_horizontal_rule
end

View File

@@ -114,7 +114,11 @@ class ReceiptBillPdf < Prawn::Document
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 2
y_position = cursor
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') })" ,
# :size => self.item_font_size,:align => :right
# 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
stroke_horizontal_rule
end

View File

@@ -1,7 +1,7 @@
if @order
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,
:discount_amount,:convenience_charge,:grand_total,:status,:order_remark,
:remark,:sale_id)

View File

@@ -429,6 +429,12 @@
<b><span id="expected_time"></span> MINS</b>
</td>
</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>
<td class="body-td align-left">
<span class="font-13">NAME</span><br>

View File

@@ -4,7 +4,8 @@ class CreateOrderReservations < ActiveRecord::Migration[5.1]
t.string :order_reservation_id, :limit => 16, :primary_key => true
t.string :order_reservation_type, :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 :transaction_ref, :null => false
t.string :sale_id
@@ -23,6 +24,7 @@ class CreateOrderReservations < ActiveRecord::Migration[5.1]
t.string :status, :null => false, :default => "new"
t.string :order_remark
t.string :remark
t.json :action_times
t.timestamps
end
end