141 lines
6.5 KiB
Plaintext
Executable File
141 lines
6.5 KiB
Plaintext
Executable File
|
|
<div class="page-header">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
|
<li class="breadcrumb-item"><a href="<%= transactions_bookings_path %>"><%= t :booking %></a></li>
|
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
|
<span class="float-right">
|
|
<%= link_to 'Back', transactions_bookings_path %>
|
|
</span>
|
|
</ol>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12 col-sm-12">
|
|
<!-- Nav tabs -->
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" data-toggle="tab" href="#booking" role="tab"><%= t :booking_details %></a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-toggle="tab" href="#order" role="tab"><%= t :order_details %></a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-toggle="tab" href="#sale" role="tab"><%= t :sale_details %></a>
|
|
</li>
|
|
</ul>
|
|
<!-- Nav tabs - End -->
|
|
<div class="tab-content" style="min-height:670px; max-height:670px;">
|
|
<div class="tab-pane active" id="booking" role="tabpanel">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("views.right_panel.detail.booking_id") %></th>
|
|
<th><%= t("views.right_panel.detail.sale_id") %></th>
|
|
<th><%= t("views.right_panel.detail.table") %></th>
|
|
<th><%= t("views.right_panel.detail.checkin_time") %></th>
|
|
<th><%= t("views.right_panel.detail.checkout_time") %></th>
|
|
<th><%= t("views.right_panel.detail.checkin_by") %></th>
|
|
<th> <%= t("views.right_panel.detail.checkout_by") %></th>
|
|
<th><%= t("views.right_panel.detail.booking_status") %></th>
|
|
<th><%= t("views.right_panel.detail.booking_date") %></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td><%= @booking.booking_id%></td>
|
|
<td><%= link_to @booking.sale_id, transactions_sale_path(booking.sale_id) rescue '-' %></td>
|
|
<td><%= @booking.dining_facility.name rescue '' %></td>
|
|
<td><%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %></td>
|
|
<td><%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") rescue '-' %></td>
|
|
<td><%= @booking.checkin_by rescue '-' %></td>
|
|
<td><%= @booking.checkout_by rescue '-' %></td>
|
|
<td><%= @booking.booking_status %> </td>
|
|
<td><%= @booking.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-pane" id="order" role="tabpanel">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("views.right_panel.detail.order_id") %></th>
|
|
<th><%= t("views.right_panel.header.menu_item") %></th>
|
|
<th><%= t("views.right_panel.detail.qty") %></th>
|
|
<th><%= t("views.right_panel.detail.unit_price") %></th>
|
|
<th><%= t("views.right_panel.detail.option") %></th>
|
|
<th><%= t("views.right_panel.detail.status") %></th>
|
|
<th><%= t("views.right_panel.detail.waiter") %></th>
|
|
<th><%= t("views.right_panel.detail.created_at") %></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @order_items.each do |order_item| %>
|
|
<tr>
|
|
<td><%= link_to order_item.order_id, transactions_order_path(order_item.order_id) %><%= %></td>
|
|
<td><%= order_item.item_name %></td>
|
|
<td><%= order_item.qty %></td>
|
|
<td><%= order_item.price %></td>
|
|
<td><%= order_item.options %></td>
|
|
<td><%= order_item.order_item_status %></td>
|
|
<td><%= order_item.item_order_by %> </td>
|
|
<td><%= order_item.created_at.strftime("%d-%m-%y %I:%M %p") %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="tab-pane" id="sale" role="tabpanel">
|
|
<div class="table-responsive">
|
|
<table class="table table- table-striped table-hover js-basic- ">
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("views.right_panel.detail.sale_id") %></th>
|
|
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
|
<th><%= t("views.right_panel.detail.total_discount") %></th>
|
|
<th><%= t("views.right_panel.detail.tax_amount") %></th>
|
|
<th><%= t("views.right_panel.detail.sub_total") %></th>
|
|
<th><%= t("views.right_panel.detail.grand_total") %></th>
|
|
<th><%= t :cashier %></th>
|
|
<th><%= t("views.right_panel.detail.sales_status") %></th>
|
|
<th><%= t("views.right_panel.detail.receipt_date") %></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% if @sale %>
|
|
<tr>
|
|
<td><%= link_to @sale.sale_id, transactions_sale_path(@sale) %></td>
|
|
<td><%= @sale.receipt_no %></td>
|
|
<td><%= @sale.total_discount %></td>
|
|
<td><%= @sale.total_tax %></td>
|
|
<td><%= @sale.total_amount %></td>
|
|
<td><%= @sale.grand_total rescue '-' %></td>
|
|
<td><%= @sale.cashier_name rescue '-' %></td>
|
|
<td> <%= @sale.sale_status %> </td>
|
|
<td> <%= @sale.receipt_date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> </td>
|
|
</tr>
|
|
<% else %>
|
|
<tr><td colspan="9"><strong><p style="text-align: center">There is no data ....</p></strong></td></tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|