add FOC,VOID remark in Transaction/Sale and new Transaction/Survey
This commit is contained in:
@@ -11,7 +11,7 @@ class Transactions::SalesController < ApplicationController
|
|||||||
to = params[:to]
|
to = params[:to]
|
||||||
|
|
||||||
if receipt_no.nil? && from.nil? && to.nil?
|
if receipt_no.nil? && from.nil? && to.nil?
|
||||||
@sales = Sale.where("NOT sale_status = 'void' " ).order("sale_id desc")
|
@sales = Sale.order("sale_id desc")
|
||||||
@sales = Kaminari.paginate_array(@sales).page(params[:page]).per(20)
|
@sales = Kaminari.paginate_array(@sales).page(params[:page]).per(20)
|
||||||
else
|
else
|
||||||
sale = Sale.search(receipt_no,from,to)
|
sale = Sale.search(receipt_no,from,to)
|
||||||
|
|||||||
5
app/controllers/transactions/surveys_controller.rb
Normal file
5
app/controllers/transactions/surveys_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
class Transactions::SurveysController < ApplicationController
|
||||||
|
def index
|
||||||
|
@surveys = Survey.all
|
||||||
|
end
|
||||||
|
end
|
||||||
9
app/views/layouts/_left_sidebar.html.erb
Executable file → Normal file
9
app/views/layouts/_left_sidebar.html.erb
Executable file → Normal file
@@ -69,14 +69,14 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<% if can? :menage, Inventory %>
|
<!-- <% if can? :menage, Inventory %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= inventory_path %>">
|
<a href="<%= inventory_path %>">
|
||||||
<i class="material-icons">store</i>
|
<i class="material-icons">store</i>
|
||||||
<span><%= t :inventory %></span>
|
<span><%= t :inventory %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<%end%>
|
<%end%> -->
|
||||||
<li class="header"><%= t :backend %></li>
|
<li class="header"><%= t :backend %></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="javascript:void(0);" class="menu-toggle">
|
<a href="javascript:void(0);" class="menu-toggle">
|
||||||
@@ -109,6 +109,11 @@
|
|||||||
<a href="<%= transactions_shift_sales_path %>"><%= (t :shiftsale) %></a>
|
<a href="<%= transactions_shift_sales_path %>"><%= (t :shiftsale) %></a>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if can? :menage, Survey %>
|
||||||
|
<li>
|
||||||
|
<a href="<%= transactions_surveys_path %>"><%= t("views.right_panel.detail.survey") %></a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<% if can? :index, :dailysale %>
|
<% if can? :index, :dailysale %>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<td><%= @sale.receipt_no %></td>
|
<td><%= @sale.receipt_no %></td>
|
||||||
<td><%= @sale.cashier_name rescue '-' %></td>
|
<td><%= @sale.cashier_name rescue '-' %></td>
|
||||||
<td> <%= @sale.sale_status %> </td>
|
<td> <%= @sale.sale_status %> </td>
|
||||||
<td> <%= @sale.requested_at.strftime("%m-%d-%Y %H:%M %p") %> </td>
|
<td colspan="2"> <%= @sale.requested_at.strftime("%m-%d-%Y %H:%M %p") %> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="border-top:2px solid #000">
|
<tr style="border-top:2px solid #000">
|
||||||
<th><%= t :sale %> <%= t("views.right_panel.detail.item_txt") %> <%= t("views.right_panel.detail.name_txt2") %></th>
|
<th><%= t :sale %> <%= t("views.right_panel.detail.item_txt") %> <%= t("views.right_panel.detail.name_txt2") %></th>
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
<th><%= t("views.right_panel.detail.unit_price") %></th>
|
<th><%= t("views.right_panel.detail.unit_price") %></th>
|
||||||
<th><%= t("views.right_panel.detail.total_price") %></th>
|
<th><%= t("views.right_panel.detail.total_price") %></th>
|
||||||
<th><%= t("views.right_panel.detail.created_at") %></th>
|
<th><%= t("views.right_panel.detail.created_at") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.remark") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
<% @sale.sale_items.each do |s| %>
|
<% @sale.sale_items.each do |s| %>
|
||||||
|
|
||||||
@@ -69,42 +70,43 @@
|
|||||||
<td><%= number_with_precision(s.price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td><%= number_with_precision(s.price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
<td><%= number_with_precision(s.qty * s.price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td><%= number_with_precision(s.qty * s.price, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
<td><%=l s.created_at.utc.getlocal , :format => :short rescue ' ' %></td>
|
<td><%=l s.created_at.utc.getlocal , :format => :short rescue ' ' %></td>
|
||||||
|
<td><%=s.remark rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr style="border-top:2px solid #000">
|
<tr style="border-top:2px solid #000">
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= t("views.right_panel.detail.total") %></td>
|
<td><%= t("views.right_panel.detail.total") %></td>
|
||||||
<td colspan="2"><%= number_with_precision(@sale.total_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td colspan="3"><%= number_with_precision(@sale.total_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= t("views.right_panel.detail.discount") %></td>
|
<td><%= t("views.right_panel.detail.discount") %></td>
|
||||||
<td colspan="2"><%= number_with_precision(@sale.total_discount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td colspan="3"><%= number_with_precision(@sale.total_discount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% @sale.sale_taxes.each do |r|%>
|
<% @sale.sale_taxes.each do |r|%>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= r.tax_name %> </td>
|
<td><%= r.tax_name %> </td>
|
||||||
<td colspan="2"><%= number_with_precision(r.tax_payable_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td colspan="3"><%= number_with_precision(r.tax_payable_amount, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= t("views.right_panel.detail.grand_total") %></td>
|
<td><%= t("views.right_panel.detail.grand_total") %></td>
|
||||||
<td colspan="2"><%= number_with_precision(@sale.grand_total, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td colspan="3"><%= number_with_precision(@sale.grand_total, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan="5"> <td></tr>
|
<tr><td colspan="5"> <td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= t("views.right_panel.detail.total_pay_amount") %></td>
|
<td><%= t("views.right_panel.detail.total_pay_amount") %></td>
|
||||||
<td colspan="2"><%= number_with_precision(@sale.amount_received, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td colspan="3"><%= number_with_precision(@sale.amount_received, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% @sale_receivables.each do |r|%>
|
<% @sale_receivables.each do |r|%>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td> <%= r.payment_method.capitalize rescue ' '%> Payment</td>
|
<td> <%= r.payment_method.capitalize rescue ' '%> Payment</td>
|
||||||
<td colspan="2"><%= number_with_precision(r.payment_amount, :precision => 2, :delimiter => ',') rescue ' '%>
|
<td colspan="3"><%= number_with_precision(r.payment_amount, :precision => 2, :delimiter => ',') rescue ' '%>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -114,7 +116,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 style="text-align:center"></td>
|
<td colspan=2 style="text-align:center"></td>
|
||||||
<td><%= t("views.right_panel.detail.change") %></td>
|
<td><%= t("views.right_panel.detail.change") %></td>
|
||||||
<td colspan="2"><%= number_with_precision(@sale.amount_changed, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
<td colspan="3"><%= number_with_precision(@sale.amount_changed, :precision => 2, :delimiter => ',') rescue ' '%></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -258,9 +260,3 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
53
app/views/transactions/surveys/index.html.erb
Normal file
53
app/views/transactions/surveys/index.html.erb
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<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 active"><%= t("views.right_panel.detail.survey") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
|
<div class="main-box-body clearfix p-l-15 p-r-15">
|
||||||
|
<div class="card">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table ">
|
||||||
|
<thead>
|
||||||
|
<th><%= t("views.right_panel.detail.dining") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.created_by") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.child") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.adult") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.male") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.female") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.foreigner") %></th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% if !@surveys.nil? %>
|
||||||
|
<% @surveys.each do |survey| %>
|
||||||
|
<tr>
|
||||||
|
<td><%= survey.dining_name rescue ' '%></td>
|
||||||
|
<td><%= survey.receipt_no rescue '-'%></td>
|
||||||
|
<td><%= survey.created_by rescue ' '%></td>
|
||||||
|
<td><%= survey.child rescue ' '%></td>
|
||||||
|
<td><%= survey.adult rescue ' '%></td>
|
||||||
|
<td><%= survey.male rescue ' '%></td>
|
||||||
|
<td><%= survey.female rescue ' '%></td>
|
||||||
|
<td>
|
||||||
|
<% if !survey.foreigner.nil? %>
|
||||||
|
<%= JSON.parse(survey.foreigner) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
5
config/locales/en.yml
Executable file → Normal file
5
config/locales/en.yml
Executable file → Normal file
@@ -450,7 +450,10 @@ en:
|
|||||||
additional_parameter: "Additional parameter"
|
additional_parameter: "Additional parameter"
|
||||||
lookup: "Lookup"
|
lookup: "Lookup"
|
||||||
product_sale_report: "Product Sale"
|
product_sale_report: "Product Sale"
|
||||||
group_type: "Group Type"
|
dining: "Dining"
|
||||||
|
child: "Child"
|
||||||
|
adult: "Adult"
|
||||||
|
foreigner: "Foreigner"
|
||||||
|
|
||||||
code_txt: "code "
|
code_txt: "code "
|
||||||
charge_txt: "charge"
|
charge_txt: "charge"
|
||||||
|
|||||||
11
config/locales/mm.yml
Executable file → Normal file
11
config/locales/mm.yml
Executable file → Normal file
@@ -65,8 +65,8 @@ mm:
|
|||||||
sale_audits: "အရောင်းပြင်ဆင်ခြင်းများ"
|
sale_audits: "အရောင်းပြင်ဆင်ခြင်းများ"
|
||||||
bottom: "အရောင်းအနဲဆုံး"
|
bottom: "အရောင်းအနဲဆုံး"
|
||||||
payment: "ငွေပေးချေမှု"
|
payment: "ငွေပေးချေမှု"
|
||||||
backend: "Backend"
|
backend: "နောက်ကွယ်"
|
||||||
date_time: "DateTime"
|
date_time: "ရက်စွဲအချိန်"
|
||||||
|
|
||||||
views:
|
views:
|
||||||
btn:
|
btn:
|
||||||
@@ -444,8 +444,11 @@ mm:
|
|||||||
additional_parameter: "ထပ်ဖြည့်အကြောင်းအရာ"
|
additional_parameter: "ထပ်ဖြည့်အကြောင်းအရာ"
|
||||||
survey: "ခြုံငုံလေ့လာခြင်း"
|
survey: "ခြုံငုံလေ့လာခြင်း"
|
||||||
lookup: "သတ်မှတ်ချက်များ"
|
lookup: "သတ်မှတ်ချက်များ"
|
||||||
product_sale_report: "Product Sale"
|
product_sale_report: "ကုန်ပစ္စည်းရောင်းရမှုအစီရင်ခံစာ"
|
||||||
group_type: "Group Type"
|
dining: "ဆိုင်စား"
|
||||||
|
child: "ကလေး"
|
||||||
|
adult: "လူကြီး"
|
||||||
|
foreigner: "နိုင်ငံခြားသား"
|
||||||
|
|
||||||
code_txt: "ကုတ်ဒ် "
|
code_txt: "ကုတ်ဒ် "
|
||||||
charge_txt: "ကောက်ခံသည်"
|
charge_txt: "ကောက်ခံသည်"
|
||||||
|
|||||||
@@ -383,6 +383,7 @@ scope "(:locale)", locale: /en|mm/ do
|
|||||||
resources :credit_notes
|
resources :credit_notes
|
||||||
resources :bookings
|
resources :bookings
|
||||||
resources :shift_sales
|
resources :shift_sales
|
||||||
|
resources :surveys
|
||||||
|
|
||||||
get "/sales/:sale_id/manual_complete_sale" => "manual_sales#manual_complete_sale", :as => "manual_complete_sale"
|
get "/sales/:sale_id/manual_complete_sale" => "manual_sales#manual_complete_sale", :as => "manual_complete_sale"
|
||||||
get "/sales/:sale_id/void" => "manual_sales#void", :as => "void"
|
get "/sales/:sale_id/void" => "manual_sales#void", :as => "void"
|
||||||
|
|||||||
Reference in New Issue
Block a user