Merge branch 'r-1902001-01' of gitlab.com:code2lab/SXRestaurant into r-1902001-01

This commit is contained in:
NyanLinHtut
2019-05-30 14:05:11 +06:30
24 changed files with 456 additions and 408 deletions

View File

@@ -205,4 +205,14 @@ i.logout_icon{
.mbl-right-btn{ .mbl-right-btn{
text-align: right; text-align: right;
} }
.mbl-table{
display: block;
overflow: scroll;
}
.mbl-table-card{
overflow: scroll;
display: inline-block;
}
} }

View File

@@ -87,31 +87,44 @@ class Reports::SaleitemController < BaseReportController
end end
def print_sale_items def print_sale_items
type = params[:type] from, to = get_date_range_from_params
account = params[:account]
from_date = to_date = '-'
if !params[:from].nil?
from_date = Date.parse(params[:from])
end
if !params[:to].nil?
to_date = Date.parse(params[:to])
end
shift = params[:shift_name] shift_sale_range = ''
shift_name = "All Shifts"
if shift.to_i > 0
shift_name = params[:shift_from].to_s+" - ".to_s+params[:shift_to].to_s
end
period_name = get_period_name(params[:period]) shift = ''
shift_name = 'All Shift'
if params[:shift_name].to_i != 0
shift_sale_range = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
shift_sale = ShiftSale.find(params[:shift_name])
if to.blank?
shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL ',shift_sale.shift_started_at)
else
if shift_sale.shift_closed_at.blank?
shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL',shift_sale.shift_started_at)
else
shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',shift_sale.shift_started_at, shift_sale.shift_closed_at)
end
end
sh_name = "#{shift_sale.shift_started_at.utc.getlocal.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.utc.getlocal.strftime('%d %B %l:%M%p')}"
employee = Employee.find(shift_sale.employee_id)
shift_name = employee.nil? ? sh_name : "#{sh_name} (#{employee.name})"
end
shop_details = shop_detail shop_details = shop_detail
account_type = params[:account_type]
@type = params[:period_type]
period_name = get_period_name(params[:period])
@sale_data, @other_charges,@product, @discount_data , @cash_data , @card_data , @credit_data , @foc_data , @grand_total , @change_amount = Sale.get_by_shift_items(shift_sale_range,shift, from, to, Sale::SALE_STATUS_COMPLETED,@type,account_type)
# get printer info # get printer info
print_settings = PrintSetting.find_by_unique_code('CloseCashierPdf') # SaleItemsPdf print_settings = PrintSetting.find_by_unique_code('CloseCashierPdf') # SaleItemsPdf
printer = Printer::CashierStationPrinter.new(print_settings) printer = Printer::CashierStationPrinter.new(print_settings)
printer.print_sale_items_report(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, params[:sale_items], params[:menu_cate_count]) printer.print_sale_items_report(print_settings, shop_details, period_name, @type, account_type, from, to, shift_name, @sale_data)
respond_to do |format| respond_to do |format|
format.html { redirect_to '/en/reports/saleitem/', notice: 'Printing Completed.'} format.html { redirect_to '/en/reports/saleitem/', notice: 'Printing Completed.'}

View File

@@ -81,10 +81,10 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker
end end
end end
def print_sale_items_report(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, menu_cate_count) def print_sale_items_report(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items)
filename = "tmp/reports_sale_items.pdf" filename = "tmp/reports_sale_items.pdf"
pdf = SaleItemsPdf.new(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, nil, menu_cate_count, nil) pdf = SaleItemsPdf.new(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, nil, nil, nil)
pdf.render_file filename pdf.render_file filename

View File

@@ -105,7 +105,7 @@ class SaleItemsPdf < Prawn::Document
text "From Date : ", :size => self.item_font_size,:align => :left text "From Date : ", :size => self.item_font_size,:align => :left
end end
bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do
text "#{ from_date}" , :size => self.item_font_size,:align => :left text "#{ from_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left
end end
y_position = cursor y_position = cursor
@@ -113,14 +113,14 @@ class SaleItemsPdf < Prawn::Document
text "To Date : ", :size => self.item_font_size,:align => :left text "To Date : ", :size => self.item_font_size,:align => :left
end end
bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do
text "#{ to_date}" , :size => self.item_font_size,:align => :left text "#{ to_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left
end end
y_position = cursor y_position = cursor
bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do
text "Shift : ", :size => self.item_font_size,:align => :left text "Shift : ", :size => self.item_font_size,:align => :left
end end
bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do bounding_box([@label_name_width,y_position], :width => @label_item_width) do
text "#{shift}" , :size => self.item_font_size,:align => :left text "#{shift}" , :size => self.item_font_size,:align => :left
end end
@@ -148,7 +148,7 @@ class SaleItemsPdf < Prawn::Document
arr = Array.new arr = Array.new
unless sale_items.nil? unless sale_items.nil?
JSON.parse(sale_items).each do |item| sale_items.each do |item|
if !arr.include?(item['menu_category_id']) if !arr.include?(item['menu_category_id'])

View File

@@ -4,13 +4,13 @@
<div class="row"> <div class="row">
<% if defined? @payment_method %> <% if defined? @payment_method %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_payments") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_payments") %></label>
<%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %> <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -27,8 +27,8 @@
</div> </div>
<% if not defined? payments %> <% if not defined? payments %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_payments") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_payments") %></label>
<select name="payment_type" id="payment_type" class="form-control"> <select name="payment_type" id="payment_type" class="form-control">
<% @payments.each do |pm| %> <% @payments.each do |pm| %>
@@ -40,21 +40,21 @@
</select> </select>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.all_shift") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" > <select class="form-control select" name="shift_name" id="shift_name" >
</select> </select>
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 mbl-right-btn mbl-style">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -18,8 +18,8 @@
<a href="javascript:export_to('<%=reports_card_sale_tran_index_path%>.xls')" class = "btn btn-info wave-effects"><%= t("views.btn.exp_to_excel") %></a> <a href="javascript:export_to('<%=reports_card_sale_tran_index_path%>.xls')" class = "btn btn-info wave-effects"><%= t("views.btn.exp_to_excel") %></a>
</div> </div>
<div class="margin-top-20"> <div class="margin-top-20 mbl-table">
<div class="card" style="width:112%;"> <div class="card mbl-table-card" style="width:112%;">
<table class="table table-striped" border="0"> <table class="table table-striped" border="0">
<thead> <thead>

View File

@@ -4,13 +4,13 @@
<div class="row"> <div class="row">
<% if defined? @payment_method %> <% if defined? @payment_method %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_payments") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_payments") %></label>
<%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %> <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -27,7 +27,7 @@
</div> </div>
<% if not defined? payments %> <% if not defined? payments %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_payments") %></label> <label class="font-14"><%= t("views.right_panel.detail.select_payments") %></label>
<select name="payment_type" id="payment_type" class="form-control"> <select name="payment_type" id="payment_type" class="form-control">
@@ -40,21 +40,21 @@
</select> </select>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.all_shift") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" > <select class="form-control select" name="shift_name" id="shift_name" >
</select> </select>
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 mbl-right-btn mbl-style">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -18,8 +18,8 @@
<a href="javascript:export_to('<%=reports_card_settle_tran_index_path%>.xls')" class = "btn btn-info wave-effects"><%= t("views.btn.exp_to_excel") %></a> <a href="javascript:export_to('<%=reports_card_settle_tran_index_path%>.xls')" class = "btn btn-info wave-effects"><%= t("views.btn.exp_to_excel") %></a>
</div> </div>
<div class="margin-top-20"> <div class="margin-top-20 mbl-table">
<div class="card"> <div class="card mbl-table-card">
<table class="table table-striped" border="0"> <table class="table table-striped" border="0">
<thead> <thead>

View File

@@ -11,17 +11,17 @@
<input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true"> <input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true">
<% end %> <% end %>
</div> --> </div> -->
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;">
</div> </div>
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t :commissioner %></label> <label class="font-14 mbl_lbl"><%= t :commissioner %></label>
<select class="form-control" name="commissioner" id="commissioner" style="height: 37px;"> <select class="form-control" name="commissioner" id="commissioner" style="height: 37px;">
<option value=""></option> <option value=""></option>
<% @commissioner.each do |c| %> <% @commissioner.each do |c| %>
@@ -33,7 +33,7 @@
<% end %> <% end %>
</select> </select>
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20"> <div class="col-lg-2 col-md-2 col-sm-2 margin-top-20 mbl-right-btn mbl-style">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-info wave-effects'> <input type="submit" value="Generate Report" class='btn btn-info wave-effects'>
</div> </div>

View File

@@ -2,8 +2,8 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="form-group col-md-2"> <div class="form-group col-md-2 mbl-style">
<label class="font-20"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-20 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -19,32 +19,32 @@
</select> </select>
</div> </div>
<% if defined? filter_for_credit %> <% if defined? filter_for_credit %>
<div class="form-group col-md-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 col-mbl-view mbl-style">
<label class="font-20">Select Paid/ Unpaid</label> <label class="font-14">Select Paid/ Unpaid</label>
<%= select_tag "filter_check", options_for_select(@filter_for_credit, :selected => params[:filter_check]), :class => "form-control", :style => "height: 37px;" %> <%= select_tag "filter_check", options_for_select(@filter_for_credit, :selected => params[:filter_check]), :class => "form-control", :style => "height: 37px;" %>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.order_source") %></label> <label class="font-14"><%= t("views.right_panel.detail.order_source") %></label>
<%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %> <%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %>
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-20">From</label> <label class="font-20 mbl_lbl">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;">
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-2 col-mbl-view mbl-style">
<label class="font-20">To</label> <label class="font-20 mbl_lbl">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-2 mbl-style">
<label class="font-20">All Shift</label> <label class="font-20 mbl_lbl">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;"> <select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;">
</select> </select>
</div> </div>
</div> </div>
<div class="row clearfix"> <div class="row clearfix">
<div class="form-group col-md-12" align="right"> <div class="form-group col-md-12 mbl-style mbl-right-btn" align="right">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -30,7 +30,7 @@
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date" style="height: 35px;"> <input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date" style="height: 35px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20 mbl-right-btn"> <div class="col-lg-2 col-md-2 col-sm-2 margin-top-20 mbl-right-btn mbl-style">
<label></label><br> <label></label><br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -2,8 +2,8 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -20,8 +20,8 @@
</div> </div>
<!-- <input type="hidden" name="report_type" value="sale_item" id="sel_sale_type"> --> <!-- <input type="hidden" name="report_type" value="sale_item" id="sel_sale_type"> -->
<% if defined? commissioners %> <% if defined? commissioners %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14">Select Commissioner</label> <label class="font-14 mbl_lbl">Select Commissioner</label>
<select class="form-control" id="commissioner" name="commissioner"> <select class="form-control" id="commissioner" name="commissioner">
<option value="">--Select Commissioner--</option> <option value="">--Select Commissioner--</option>
<% if !@commissioners.nil? %> <% if !@commissioners.nil? %>
@@ -36,21 +36,21 @@
</select> </select>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="from" id="from" type="text" placeholder="From date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="to" id="to" type="text" placeholder="To date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14">All Shift</label> <label class="font-14 mbl_lbl">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" > <select class="form-control select" name="shift_name" id="shift_name" >
</select> </select>
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20"> <div class="col-lg-2 col-md-2 col-sm-2 margin-top-20 mbl-right-btn mbl-style">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -2,8 +2,8 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-13"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-13 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -19,32 +19,32 @@
</select> </select>
</div> </div>
<% if defined? providers %> <% if defined? providers %>
<div class="col-lg-1 col-md-1 col-sm-1"> <div class="col-lg-1 col-md-1 col-sm-1 col-mbl-view mbl-style">
<label class="font-13"><%= t("views.right_panel.detail.select_providers") %></label> <label class="font-13"><%= t("views.right_panel.detail.select_providers") %></label>
<%= select_tag "provider", options_for_select(@providers, :selected => params[:provider]), :class => "form-control", :style => "height: 35px;" %> <%= select_tag "provider", options_for_select(@providers, :selected => params[:provider]), :class => "form-control", :style => "height: 35px;" %>
</div> </div>
<% end %> <% end %>
<% if defined? payment_types %> <% if defined? payment_types %>
<div class="col-lg-1 col-md-1 col-sm-1"> <div class="col-lg-1 col-md-1 col-sm-1 col-mbl-view mbl-style">
<label class="font-13"><%= t("views.right_panel.detail.select_payment") %></label> <label class="font-13"><%= t("views.right_panel.detail.select_payment") %></label>
<%= select_tag "payment_type", options_for_select(@payment_types, :selected => params[:payment_type]), :class => "form-control", :style => "height: 35px;" %> <%= select_tag "payment_type", options_for_select(@payment_types, :selected => params[:payment_type]), :class => "form-control", :style => "height: 35px;" %>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-13"><%= t("views.right_panel.detail.from") %></label> <label class="font-13 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-13"><%= t("views.right_panel.detail.to") %></label> <label class="font-13 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-13"><%= t("views.right_panel.detail.all_shift") %></label> <label class="font-13 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" > <select class="form-control select" name="shift_name" id="shift_name" >
</select> </select>
</div> </div>
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20"> <div class="col-lg-1 col-md-1 col-sm-1 margin-top-20 mbl-right-btn mbl-style">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -2,8 +2,8 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -19,26 +19,26 @@
</select> </select>
</div> </div>
<% if defined? payments %> <% if defined? payments %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_payments") %></label> <label class="font-14"><%= t("views.right_panel.detail.select_payments") %></label>
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %> <%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3 from" name="from" id="from" type="text" placeholder="From date" style="height: 34px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3 from" name="from" id="from" type="text" placeholder="From date" style="height: 34px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3 to" name="to" id="to" type="text" placeholder="To date" style="height: 34px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3 to" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.all_shift") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;" > <select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;" >
</select> </select>
</div> </div>
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20"> <div class="col-lg-1 col-md-1 col-sm-1 margin-top-20 mbl-right-btn mbl-style">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -18,8 +18,8 @@
<a href="javascript:export_to('<%=reports_payment_method_index_path%>.xls')" class = "btn btn-info wave-effects"><%= t("views.btn.exp_to_excel") %></a> <a href="javascript:export_to('<%=reports_payment_method_index_path%>.xls')" class = "btn btn-info wave-effects"><%= t("views.btn.exp_to_excel") %></a>
</div> </div>
<div class="margin-top-20"> <div class="margin-top-20 mbl-table">
<div class="card"> <div class="card mbl-table-card">
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr>

View File

@@ -2,8 +2,8 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -33,21 +33,21 @@
</select> </select>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.all_shift") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" > <select class="form-control select" name="shift_name" id="shift_name" >
</select> </select>
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20" style="margin-top: 20px;"> <div class="col-lg-2 col-md-2 col-sm-2 margin-top-20 mbl-style mbl-right-btn" style="margin-top: 20px;">
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -2,8 +2,8 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -20,8 +20,8 @@
</div> </div>
<% if defined? payments %> <% if defined? payments %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_payments") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_payments") %></label>
<select name="payment_type" id="payment_type" class="form-control"> <select name="payment_type" id="payment_type" class="form-control">
<% @payments.each do |pm| %> <% @payments.each do |pm| %>
@@ -33,21 +33,21 @@
</select> </select>
</div> </div>
<% end %> <% end %>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.all_shift") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" > <select class="form-control select" name="shift_name" id="shift_name" >
</select> </select>
</div> </div>
<div class="col-lg-1 col-md-1 col-sm-1 margin-top-20"> <div class="col-lg-1 col-md-1 col-sm-1 margin-top-20 mbl-style mbl-right-btn">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -2,8 +2,8 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -19,8 +19,8 @@
</select> </select>
</div> </div>
<!-- <input type="hidden" name="report_type" value="sale_item" id="sel_sale_type"> --> <!-- <input type="hidden" name="report_type" value="sale_item" id="sel_sale_type"> -->
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14">Select Type</label> <label class="font-14 mbl_lbl">Select Type</label>
<select name="sale_type" id="sel_sale_type" class="form-control"> <select name="sale_type" id="sel_sale_type" class="form-control">
<option value="">Select Type</option> <option value="">Select Type</option>
<option value="revenue" selected>Revenue Only</option> <option value="revenue" selected>Revenue Only</option>
@@ -32,8 +32,8 @@
<option value="other">Other Amount Only</option> <option value="other">Other Amount Only</option>
</select> </select>
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_account") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_account") %></label>
<select name="account_type" id="account_type" class="form-control"> <select name="account_type" id="account_type" class="form-control">
<option value = "">Select Account</option> <option value = "">Select Account</option>
@@ -42,21 +42,21 @@
<%end %> <%end %>
</select> </select>
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="from" id="from" type="text" placeholder="From date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="to" id="to" type="text" placeholder="To date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control m-t-3 datepicker" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14">All Shift</label> <label class="font-14 mbl_lbl">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" > <select class="form-control select" name="shift_name" id="shift_name" >
</select> </select>
</div> </div>
<div class="col-lg-12 col-md-12 col-sm-12 margin-top-20"> <div class="col-lg-12 col-md-12 col-sm-12 margin-top-20 mbl-right-btn">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-primary float_right'> <input type="submit" value="Generate Report" class='btn btn-primary float_right'>
</div> </div>

View File

@@ -15,7 +15,7 @@
<hr /> <hr />
<div class="text-right"> <div class="text-right">
<%= link_to "Print", reports_print_sale_items_path(:type => params[:sale_type], :period => params[:period], :account => params[:account_type], :from => @from, :to => @to, :shift_name => params[:shift_name], :shift_from => @shift_from, :shift_to => @shift_to, :menu_cate_count => @menu_cate_count, :sale_items => @sale_data.to_json), :method => 'post', class:"btn btn-info wave-effects" %> <button class="btn btn-info wave-effects" onclick="print_sale_items()">Print</button>
<a href="javascript:export_to('<%=reports_saleitem_index_path%>.xls')" class = "btn btn-info wave-effects "><%= t("views.btn.exp_to_excel") %></a> <a href="javascript:export_to('<%=reports_saleitem_index_path%>.xls')" class = "btn btn-info wave-effects "><%= t("views.btn.exp_to_excel") %></a>
</div> </div>
@@ -66,6 +66,7 @@
<% other_sub_total = 0 %> <% other_sub_total = 0 %>
<% product_sub_total = 0 %> <% product_sub_total = 0 %>
<% count = 0 %> <% count = 0 %>
<% row_count = 0 %>
<% total_price = 0 %> <% total_price = 0 %>
<% cate_count = 0 %> <% cate_count = 0 %>
<% acc_count = 0 %> <% acc_count = 0 %>
@@ -78,6 +79,7 @@
<% total_tax = 0 %> <% total_tax = 0 %>
<% unless @sale_data.blank? %> <% unless @sale_data.blank? %>
<% @sale_data.each do |sale| %> <% @sale_data.each do |sale| %>
<% row_count += 1 %>
<!-- all total qty sum --> <!-- all total qty sum -->
<% if sale.status_type != "Discount" && sale.status_type != "foc" && sale.status_type != "promotion" <% if sale.status_type != "Discount" && sale.status_type != "foc" && sale.status_type != "promotion"
@@ -285,6 +287,7 @@
<%end%> <%end%>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
@@ -293,10 +296,7 @@
<script> <script>
$(function(){ $(function(){
var check_arr = []; var check_arr = [];
var search = '<%= params[:period_type] %>'; var search = '<%= params[:period_type] %>';
if(search){ if(search){
@@ -407,4 +407,29 @@
} }
}); });
function print_sale_items(){
var period = $('#sel_period').val();
var type = $('#sel_sale_type').val();
var account = $('#account_type').val();
var from = $('#from').val();
var to = $('#to').val();
var shift = $('#shift_name').val();
// var flag = false;
// alert($('#row_count').val())
// if (flag == true) {
$.ajax({
type: "POST",
url: "<%= reports_print_sale_items_path %>",
data: "period="+period+"&period_type="+type+"&account_type="+account+"&from="+from+"&to="+to+"&shift_name="+shift,
success: function(data){
if (data != null){
location.reload();
}
$("#loader").hide();
}
});
// }
}
</script> </script>

View File

@@ -2,8 +2,8 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -19,21 +19,21 @@
</select> </select>
</div> </div>
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<!-- <label class="font-14">Select Shift Period</label> --> <!-- <label class="font-14">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div> </div>
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2"> <div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t("views.right_panel.detail.all_shift") %></label> <label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" > <select class="form-control select" name="shift_name" id="shift_name" >
</select> </select>
</div> </div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20"><br> <div class="col-lg-2 col-md-2 col-sm-2 margin-top-20 mbl-style mbl-right-btn"><br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>
</div> </div>

View File

@@ -11,17 +11,17 @@
<input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true"> <input class="form-control" name="daterange" id="daterange" type="text" placeholder="Date Range" readonly="true">
<% end %> <% end %>
</div> --> </div> -->
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-14">From</label> <label class="font-14 mbl_lbl">From</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
</div> </div>
<div class="col-lg-3 col-md-3 col-sm-3"> <div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<label class="font-14">To</label> <label class="font-14 mbl_lbl">To</label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4 mbl-style">
<label class="font-14">Select Item</label> <label class="font-14 mbl_lbl">Select Item</label>
<select class="form-control" name="item_code" id="item_code"> <select class="form-control" name="item_code" id="item_code">
<option value="">Select Item</option> <option value="">Select Item</option>
<% @inventory_definitions.each do |item| %> <% @inventory_definitions.each do |item| %>
@@ -43,7 +43,7 @@
<% end %> <% end %>
</select> </select>
</div> </div>
<div class="form-group col-md-2 margin-top-20"><br> <div class="form-group col-md-2 margin-top-20 mbl-right-btn mbl-style"><br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>
<!-- <div class="form-group col-md-2 margin-top-20"> <!-- <div class="form-group col-md-2 margin-top-20">

View File

@@ -2,8 +2,8 @@
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %> <% if period_type != false %>
<div class="row"> <div class="row">
<div class="form-group col-lg-2 col-md-2 col-sm-2"> <div class="form-group col-lg-2 col-md-2 col-sm-2 mbl-style">
<label class="font-20"><%= t("views.right_panel.detail.select_period") %><%= t("views.right_panel.detail.select_period") %></label> <label class="font-20 mbl_lbl"><%= t("views.right_panel.detail.select_period") %><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control"> <select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option> <option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option> <option value="0">Today</option>
@@ -19,21 +19,21 @@
</select> </select>
</div> </div>
<div class="form-group col-lg-2 col-md-2 col-sm-2"> <div class="form-group col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> --> <!-- <label class="">Select Shift Period</label> -->
<label class="font-20"><%= t("views.right_panel.detail.from") %></label> <label class="font-20 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 34px;">
</div> </div>
<div class="form-group col-lg-2 col-md-2 col-sm-2"> <div class="form-group col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-20"><%= t("views.right_panel.detail.to") %></label> <label class="font-20 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;"> <input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 34px;">
</div> </div>
<div class="form-group col-lg-3 col-md-3 col-sm-3"> <div class="form-group col-lg-3 col-md-3 col-sm-3 mbl-style">
<label class="font-20"><%= t("views.right_panel.detail.all_shift") %></label> <label class="font-20 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
<select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;"> <select class="form-control select" name="shift_name" id="shift_name" style="height: 37px;">
</select> </select>
</div> </div>
<div class=" col-lg-1 col-md-1 col-sm-1 margin-top-20"> <div class=" col-lg-1 col-md-1 col-sm-1 margin-top-20 mbl-right-btn mbl-style">
<br> <br>
<input type="submit" value="Generate Report" class='btn btn-primary'> <input type="submit" value="Generate Report" class='btn btn-primary'>
</div> </div>

View File

@@ -23,8 +23,8 @@
<!-- </div> --> <!-- </div> -->
<!-- </div> --> <!-- </div> -->
<div class="margin-top-20"> <div class="margin-top-20 mbl-table">
<div class="card"> <div class="card mbl-table-card">
<% if @sale_data.count > 0 %> <% if @sale_data.count > 0 %>
<table class="table table-striped" border="0"> <table class="table table-striped" border="0">
<thead> <thead>

BIN
dump.rdb

Binary file not shown.