update reprint
This commit is contained in:
@@ -37,7 +37,7 @@ class Origami::RequestBillsController < BaseOrigamiController
|
|||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||||
|
|
||||||
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, food_total, beverage_total,member_info)
|
printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, food_total, beverage_total,member_info)
|
||||||
redirect_to origami_path(@sale_data.sale_id)
|
# redirect_to origami_path(@sale_data.sale_id)
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -250,14 +250,16 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
end
|
end
|
||||||
move_down 5
|
move_down 5
|
||||||
end
|
end
|
||||||
stroke_horizontal_rule
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# show member information
|
# show member information
|
||||||
def member_info(member_info,customer_name,rebate_amount,sale_data)
|
def member_info(member_info,customer_name,rebate_amount,sale_data)
|
||||||
|
|
||||||
if rebate_amount != nil
|
if rebate_amount != nil
|
||||||
|
|
||||||
if rebate_amount["status"] == true
|
if rebate_amount["status"] == true
|
||||||
|
stroke_horizontal_rule
|
||||||
rebate_amount["data"].each do |res|
|
rebate_amount["data"].each do |res|
|
||||||
|
|
||||||
if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Rebate"
|
if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Rebate"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<button type="submit" class="btn btn-primary btn-md">Search</button>
|
<button type="submit" class="btn btn-primary btn-md">Search</button>
|
||||||
<!-- <a href="modal-window" data-toggle= "modal" data-target="#modal-window" class="btn btn-primary btn-md" id="card_read" >Read Card</a> -->
|
<!-- <a href="modal-window" data-toggle= "modal" data-target="#modal-window" class="btn btn-primary btn-md" id="card_read" >Read Card</a> -->
|
||||||
|
|
||||||
<button type="button" class="btn btn-info btn-md" data-toggle="modal" data-target="#myModal">Open Modal</button>
|
<!-- <button type="button" class="btn btn-info btn-md" data-toggle="modal" data-target="#myModal">Open Modal</button> -->
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -12,20 +12,23 @@
|
|||||||
<!-- Column One -->
|
<!-- Column One -->
|
||||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||||
|
|
||||||
<div class="tab-content" style="max-height:670px; overflow:auto">
|
<div class="tab-content" style="max-height:670px; overflow-y:scroll">
|
||||||
|
|
||||||
<!--- Panel 1 - Table Orders -->
|
<!--- Panel 1 - Table Orders -->
|
||||||
<div class="active" id="tables" role="tabpanel">
|
<div class="active" role="tabpanel">
|
||||||
<div class="tab-pane" id="rooms" role="tabpanel">
|
<div class="tab-pane" role="tabpanel">
|
||||||
<div class="card-columns" style="padding-top:10px; column-gap: 2.2rem;">
|
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||||
<% @i =0 %>
|
<% @i =0 %>
|
||||||
<% @dining_queues.each do |queue| %>
|
<% @dining_queues.each do |queue| %>
|
||||||
<div class="card select-queue <%= !queue.status.nil? ? "assign" : ""%>" data-id="<%= queue.id %>">
|
<div class="card select-queue <%= !queue.status.nil? ? "assign" : ""%>" data-id="<%= queue.id %>">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<p class="hidden queue-id"><%= queue.id %></p>
|
<p class="hidden queue-id"><%= queue.id %></p>
|
||||||
<p class="hidden queue-status"><%= queue.status %></p>
|
<p class="hidden queue-status"><%= queue.status %></p>
|
||||||
<span class="card-title"><%= @i += 1 %> . Queue No </span>
|
<span class="card-title">
|
||||||
<h1 style="text-align: center"><%= queue.queue_no %></h1>
|
<%= @i += 1 %> . Queue No </span>
|
||||||
|
<p style="font-size: 30px ;text-align: center;">
|
||||||
|
<strong><%= queue.queue_no %></strong>
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -175,7 +175,7 @@
|
|||||||
<!-- Column Three -->
|
<!-- Column Three -->
|
||||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
<button type="button" class="btn btn-primary btn-block" id='back'>Back</button>
|
||||||
<button type="button" id="re-print" class="btn btn-primary btn-block">VOID</button>
|
<button type="button" id="void" class="btn btn-primary btn-block">VOID</button>
|
||||||
<button type="button" id="re-print" class="btn btn-primary btn-block">Re.Print</button>
|
<button type="button" id="re-print" class="btn btn-primary btn-block">Re.Print</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -206,4 +206,10 @@ $('#pay').on('click',function() {
|
|||||||
$('#back').on('click',function(){
|
$('#back').on('click',function(){
|
||||||
window.location.href = '/origami/';
|
window.location.href = '/origami/';
|
||||||
})
|
})
|
||||||
|
$('#re-print').click(function() {
|
||||||
|
var sale_id = $('#sale_id').val();
|
||||||
|
window.location.href = '/origami/'+ sale_id + "/reprint"
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ Rails.application.routes.draw do
|
|||||||
get "/:id/discount" => "discounts#index"
|
get "/:id/discount" => "discounts#index"
|
||||||
post "/:id/discount" => "discounts#create"
|
post "/:id/discount" => "discounts#create"
|
||||||
|
|
||||||
post "/:id/request_bills" => "request_bills#print"
|
post "/:id/request_bills" => "request_bills#print" ,:defaults => { :format => 'json' }
|
||||||
get '/:sale_id/reprint' => 'payments#reprint' ,:defaults => { :format => 'json' }
|
get '/:sale_id/reprint' => 'payments#reprint' ,:defaults => { :format => 'json' }
|
||||||
#--------- Payment ------------#
|
#--------- Payment ------------#
|
||||||
get 'sale/:sale_id/payment' => 'payments#show'
|
get 'sale/:sale_id/payment' => 'payments#show'
|
||||||
|
|||||||
Reference in New Issue
Block a user