diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 48bb8b12..5b0c6845 100755 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -215,4 +215,12 @@ i.logout_icon{ overflow: scroll; display: inline-block; } + + .p-l-15{ + padding: 0px 10px; + } + + #order_by{ + width: 100% !important; + } } diff --git a/app/controllers/reports/shiftsale_controller.rb b/app/controllers/reports/shiftsale_controller.rb index 27645d83..0a969ca0 100755 --- a/app/controllers/reports/shiftsale_controller.rb +++ b/app/controllers/reports/shiftsale_controller.rb @@ -52,14 +52,11 @@ class Reports::ShiftsaleController < BaseReportController shift_id = params[:id] @shift = ShiftSale.find_by_id(shift_id) shift_obj = ShiftSale.where('id =?',shift_id) - puts "shift obj!!!!!" - puts shift_obj.to_json + if ENV["SERVER_MODE"] != "cloud" #no print in cloud server close_cashier_pdf = Lookup.collection_of("print_settings") - puts "close !!!!" - puts close_cashier_pdf unique_code = "CloseCashierPdf" diff --git a/app/models/sale.rb b/app/models/sale.rb index 21836a6f..40518815 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -959,7 +959,8 @@ def self.get_by_shiftsales(from,to,shift) :credit_sales => shift_sale.credit_sales, :other_sales => shift_sale.other_sales.to_f, :foc_sales => foc, - :grand_total => shift_sale.grand_total + :grand_total => shift_sale.grand_total, + :shift_id => shift_sale.id } end diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb index 96747cd8..6ce18cb3 100755 --- a/app/views/reports/receipt_no/index.html.erb +++ b/app/views/reports/receipt_no/index.html.erb @@ -24,8 +24,8 @@ -
| <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> ) | <%= t("views.right_panel.detail.shift_name") %> | <%= t("views.right_panel.detail.table") %> | <%= t("views.right_panel.detail.receipt_no") %> | -<%= t :cashier %> <%= t("views.right_panel.detail.name") %> | +<%= t :cashier %> <%= t("views.right_panel.detail.name") %> | <%= t("views.right_panel.detail.revenue") %> | -+ | @@ -48,7 +48,7 @@ <% table_name=nil table_type =nil if result.table_id.to_i>0 - table = DiningFacility.find(result.table_id) + table = DiningFacility.find(result.table_id) table_type = table.type table_name = table.name end %> @@ -57,7 +57,7 @@ | <%= @shift_from %> - <%= @shift_to %> | <%= table_type %> - <%= table_name %> | <%= result.receipt_no rescue '-' %> | -<%= result.cashier_name rescue '-' %> | +<%= result.cashier_name rescue '-' %> | <%=result.grand_total%> | @@ -76,8 +76,8 @@ <% if item.price.to_i < 0.to_i %> <% if item.qty.to_i < 0.to_i%> [PROMO QTY]<%= item.product_name rescue '-' %> - <% else %> - [PROMO PRICE]<%= item.product_name rescue '-' %> + <% else %> + [PROMO PRICE]<%= item.product_name rescue '-' %> <% end %> <% else %> <%= item.product_name rescue '-' %> @@ -86,70 +86,70 @@<%= item.qty rescue '-' %> | <%= item.unit_price rescue '-' %> | <%= item.price rescue '-' %> | -<%=l item.created_at.utc.getlocal, :format => :short rescue '-' %> | +<%=l item.created_at.utc.getlocal, :format => :short rescue '-' %> | <% end %> - +
|---|---|---|---|---|---|---|
| - | + | No. of Guest | <%= survey.total_customer rescue '-' %> | -- | + + <% end %> + <% if !result.total_amount.nil?%> | |
| - | + | <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> | <%= result.total_amount %> | -- | + <% end %> <% if result.total_discount.to_f > 0 %> | |
| - | + | <%= t("views.right_panel.detail.total") %> - <%= t("views.right_panel.detail.discount") %> + <%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> | - <%= result.total_discount %> | -- | + <% end %> - + <% if !result.total_tax.nil? %> | |
| - | + | Tax Amount | <%= result.total_tax %> | -+ | ||
| - | + | Payment <%= rec.payment_method.upcase %> | <%= rec.payment_amount %> ( <%= rec.payment_status %> ) | - | ||
| - | + | Payment Ref. | <%= rec.payment_reference %> | @@ -157,10 +157,10 @@ <% end %> <% end %> <% end %> - <% if result.amount_changed != 0 && !result.amount_changed.nil? %> + <% if result.amount_changed != 0 && !result.amount_changed.nil? %> | ||
| - | + | <%= t("views.right_panel.detail.change") %> <%= t("views.right_panel.detail.amount") %> | <%= result.amount_changed %> | @@ -169,25 +169,25 @@ <% if !result.customer_id.nil?%> | ||
| - | + | Customer | -<%= result.customer.name rescue '-'%> + | <%= result.customer.name rescue '-'%> (<%= result.customer.company rescue '-' %>) | ||
| Total Nett - <%= grand_total %> | -+ | |||||
|
<%= form_tag transactions_card_sale_trans_path, :method => :get do %>
-
+
+
- <%= 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" %>
<% end %>
<% if not defined? status %>
-
-
+
+
<% end %>
-
-
+
-
+
-
+
+
-
-
+
+
-
-
+
+ |
-
+
-
+
|
<%= form_tag transactions_credit_notes_path, :method => :get do %>
-
+
+
+
-
+
- <%= 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" %>
-
-
+
+
-
-
+
+
-
-
+
+ |
-
+
-
+
| <%= t("views.right_panel.detail.order_reservation_id") %> | <%= t("views.right_panel.detail.sale_id") %> | @@ -112,8 +119,8 @@ %> <% if @order_reservations != 0 %> <% @order_reservations.each do |order_reservation| %> - <% - provider = "" + <% + provider = "" discount_amount = order_reservation.discount_amount delivery_fee = order_reservation.delivery_fee ? order_reservation.delivery_fee : 0.0 convenience_charge = order_reservation.convenience_charge @@ -187,4 +194,4 @@ $('#sel_period').val("<%= params[:period] %>"); $('#filter').val("<%= params[:filter] %>"); }); - \ No newline at end of file + diff --git a/app/views/transactions/orders/index.html.erb b/app/views/transactions/orders/index.html.erb index 41aa63e6..47216911 100755 --- a/app/views/transactions/orders/index.html.erb +++ b/app/views/transactions/orders/index.html.erb @@ -8,12 +8,19 @@ +|||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= t("views.right_panel.detail.order_id") %> | - +<%= t :table %>/<%= t :room %> | <%= t("views.right_panel.detail.order_by") %> | <%= t("views.right_panel.detail.type") %> | @@ -60,7 +67,7 @@<%= order.status %> | <%= order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> | <%= order.item_count %> | - + <% end %>
|---|
| <%= t("views.right_panel.detail.sale_id") %> | <%= t("views.right_panel.detail.receipt_no") %> | @@ -144,24 +151,24 @@ $('#from').val("<%= params[:from] %>"); $('#to').val("<%= params[:to] %>"); $('#sel_period').val("<%= params[:period] %>"); - + var check_arr = []; search_by_period(); $('#sel_period').change(function(){ - + search_by_period(); - + }); - + function search_by_period(){ var period = $('#sel_period').val(); var period_type = 0; var from = ""; var to = ""; - show_shift_name(period,period_type,from,to,'shift_item'); - } - + show_shift_name(period,period_type,from,to,'shift_item'); + } + // OK button is clicked $('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){ new_date = new Date(date) ; @@ -176,32 +183,32 @@ to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear(); $('#to').val(to); search_by_date(); - }); - + }); + function search_by_date(){ from = $("#from").val(); - to = $("#to").val(); + to = $("#to").val(); var period = 0; - var period_type = 1; + var period_type = 1; if(to != '' && from != ''){ shift_name = from + ',' + to; check_arr.push(to); - + console.log(check_arr.length) if(check_arr.length == 1){ - show_shift_name(period,period_type,from,to,'shift_item'); + show_shift_name(period,period_type,from,to,'shift_item'); } if(check_arr.length == 3){ check_arr = []; } } - + } - + function show_shift_name(period,period_type,from,to,shift_item){ var shift = $('#shift_name'); if (from == '' && to == '') { @@ -209,18 +216,18 @@ to = $("#to").val(); } shift.empty(); - + var str = ''; - var param_shift = ''; + var param_shift = ''; var param_shift = '<%= params[:shift_name] rescue '-'%>'; url = '<%= reports_get_shift_by_date_path %>'; - + $.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){ str = ''; - $(data.message).each(function(index){ - + $(data.message).each(function(index){ + var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date; var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date; var shift_id = data.message[index].shift_id ; @@ -229,18 +236,18 @@ selected = 'selected = "selected"'; } else{ - selected = ''; - } + selected = ''; + } }else{ - selected = ''; - } + selected = ''; + } str += ''; - + // console.log(sh_date) - }) + }) shift.append(str); }); } }); - \ No newline at end of file + diff --git a/app/views/transactions/shift_sales/index.html.erb b/app/views/transactions/shift_sales/index.html.erb index 481b52c8..01c4f17f 100755 --- a/app/views/transactions/shift_sales/index.html.erb +++ b/app/views/transactions/shift_sales/index.html.erb @@ -7,6 +7,13 @@ +
|---|