diff --git a/app/assets/javascripts/reports/shiftsale.coffee b/app/assets/javascripts/reports/shiftsale.coffee new file mode 100644 index 00000000..24f83d18 --- /dev/null +++ b/app/assets/javascripts/reports/shiftsale.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/CRM.scss b/app/assets/stylesheets/CRM.scss index 6f8d90f0..cf6782dd 100644 --- a/app/assets/stylesheets/CRM.scss +++ b/app/assets/stylesheets/CRM.scss @@ -13,7 +13,7 @@ .selected-item { color: #fff !important; - background-color: #54A5AF !important; + background-color: #7a62d3 !important; } .assign { @@ -23,6 +23,14 @@ .assign .text-muted{ color: #fff !important; } +.normal{ + color: #fff !important; + background-color: #54A5AF; +} +.cancel { + color: #fff !important; + background-color: #FF0000; +} .red{ color: #fff !important; background-color: red; @@ -39,9 +47,9 @@ } .card-columns { @include media-breakpoint-only(lg) { - column-count: 6; + column-count: 5; } @include media-breakpoint-only(xl) { - column-count: 6; + column-count: 5; } } \ No newline at end of file diff --git a/app/assets/stylesheets/reports/shiftsale.scss b/app/assets/stylesheets/reports/shiftsale.scss new file mode 100644 index 00000000..0e0a4c32 --- /dev/null +++ b/app/assets/stylesheets/reports/shiftsale.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the reports/shiftsale controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/api/orders_controller.rb b/app/controllers/api/orders_controller.rb index ecbd6fe4..8c7d7396 100644 --- a/app/controllers/api/orders_controller.rb +++ b/app/controllers/api/orders_controller.rb @@ -68,8 +68,10 @@ class Api::OrdersController < Api::ApiController if booking.dining_facility_id.to_i == params[:table_id].to_i && booking.booking_status != 'moved' if !booking.sale_id.nil? sale_status = check_order_with_booking(booking) + # puts "WWwwWWWWWWww" + # puts sale_status if sale_status - return false , @message = "bill requested" + return return_json_status_with_code(400, "bill requested") end else @order.new_booking = false @@ -77,23 +79,28 @@ class Api::OrdersController < Api::ApiController end else sale_status = check_order_with_table(params[:table_id]) + # puts "OOOOOOOOO" + # puts sale_status if sale_status - return false , @message = "bill requested" + return return_json_status_with_code(400, "bill requested") end end end #booking exists else sale_status = check_order_with_table(params[:table_id]) + # puts "MMMMMMMM" + # puts sale_status if sale_status - return false , @message = "bill requested" + # return false , @message = "bill requested" + return return_json_status_with_code(400, "bill requested") end end @status, @booking = @order.generate end - # render json for http status code 202 - def return_json_status_with_code(code, msg, booking_id) + # render json for http status code + def return_json_status_with_code(code, msg) render status: code, json: { message: msg, booking_id: booking_id @@ -104,12 +111,14 @@ class Api::OrdersController < Api::ApiController table = DiningFacility.find(table_id) if table booking = table.get_current_booking - puts booking + # puts booking if booking - if booking.sale.sale_status == "completed" || booking.sale.sale_status == "billed" + if !booking.sale_id.nil? + if booking.sale.sale_status == "completed" || booking.sale.sale_status == "new" @order.new_booking = true - return true - else + return false + end + else @order.new_booking = false @order.booking_id = booking.booking_id return false @@ -118,10 +127,11 @@ class Api::OrdersController < Api::ApiController end end + # this can always true def check_order_with_booking(booking) - if booking.sale.sale_status == "completed" || booking.sale.sale_status == "billed" + if booking.sale.sale_status == "completed" || booking.sale.sale_status == "new" @order.new_booking = true - return true + return false else @order.new_booking = false @order.booking_id = params[:booking_id] diff --git a/app/controllers/base_origami_controller.rb b/app/controllers/base_origami_controller.rb index be4b4055..126b20b0 100644 --- a/app/controllers/base_origami_controller.rb +++ b/app/controllers/base_origami_controller.rb @@ -7,7 +7,7 @@ class BaseOrigamiController < ActionController::Base rescue_from CanCan::AccessDenied do |exception| flash[:warning] = exception.message - redirect_to root_path + redirect_to origami_root_path end def current_user diff --git a/app/controllers/crm/dining_queues_controller.rb b/app/controllers/crm/dining_queues_controller.rb index b4f902fc..9c5f8b73 100644 --- a/app/controllers/crm/dining_queues_controller.rb +++ b/app/controllers/crm/dining_queues_controller.rb @@ -96,6 +96,17 @@ class Crm::DiningQueuesController < BaseCrmController end end + def cancel_queue + queue = DiningQueue.find(params[:id]) + + status = queue.update_attributes(id: params[:id],status:"Cancel") + + if status == true + render json: JSON.generate({:status => true , notice: 'Dining queue was successfully canceled .'}) + else + render json: JSON.generate({:status => false, :error_message => "Record not found"}) + end + end private # Use callbacks to share common setup or constraints between actions. diff --git a/app/controllers/origami/other_charges_controller.rb b/app/controllers/origami/other_charges_controller.rb new file mode 100644 index 00000000..654f539a --- /dev/null +++ b/app/controllers/origami/other_charges_controller.rb @@ -0,0 +1,48 @@ +class Origami::OtherChargesController < BaseOrigamiController + authorize_resource :class => false + + def index + sale_id = params[:sale_id] + if Sale.exists?(sale_id) + @sale_data = Sale.find(sale_id) + end + end + + def create + sale_id = params[:sale_id] + other_charges_items = JSON.parse(params[:other_charges_items]) + sub_total = params[:sub_total] + + if Sale.exists?(sale_id) + sale = Sale.find(sale_id) + table_id = sale.bookings[0].dining_facility_id + table_type = DiningFacility.find(table_id).type + sale.total_amount = sub_total.to_f + sale.grand_total = sub_total.to_f + sale.total_tax; + sale.save + if other_charges_items.length > 0 + #save sale item for discount + other_charges_items.each do |di| + # origin_sale_item = SaleItem.find(di["id"]) + sale_item = SaleItem.new + + sale_item.sale_id = sale_id + sale_item.product_code = "Other Charges" + sale_item.product_name = di["name"] + sale_item.remark = "Other Charges" + + sale_item.qty = 1 + sale_item.unit_price = di["price"] + sale_item.taxable_price = di["price"] + sale_item.is_taxable = 0 + + sale_item.price = di["price"] + sale_item.save + end + end + end + + dining = {:table_id => table_id, :table_type => table_type } + render :json => dining.to_json + end +end \ No newline at end of file diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 1d26438e..0d2d9082 100644 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -9,7 +9,12 @@ class Origami::PaymentsController < BaseOrigamiController sale_data = Sale.find_by_sale_id(sale_id) sale_items = SaleItem.where("sale_id=?",sale_id) + new_total = Sale.get_rounding_adjustment(sale_data.grand_total) + rounding_adj = sale_data.grand_total - new_total + + sale_data.update_attributes(grand_total: new_total,rounding_adjustment:rounding_adj) # Print for First Bill to Customer + unique_code = "ReceiptBillPdf" #shop detail shop_details = Shop.find(1) diff --git a/app/controllers/origami/sale_edit_controller.rb b/app/controllers/origami/sale_edit_controller.rb index 975ae73f..d4fba302 100644 --- a/app/controllers/origami/sale_edit_controller.rb +++ b/app/controllers/origami/sale_edit_controller.rb @@ -1,5 +1,5 @@ class Origami::SaleEditController < BaseOrigamiController - + authorize_resource :class => false # Index for sale item void OR edit def edit sale_id = params[:sale_id] diff --git a/app/controllers/origami/void_controller.rb b/app/controllers/origami/void_controller.rb index 3515b010..b8972cf2 100644 --- a/app/controllers/origami/void_controller.rb +++ b/app/controllers/origami/void_controller.rb @@ -1,5 +1,5 @@ class Origami::VoidController < BaseOrigamiController - + authorize_resource :class => false def overall_void sale_id = params[:sale_id] diff --git a/app/controllers/reports/shiftsale_controller.rb b/app/controllers/reports/shiftsale_controller.rb new file mode 100644 index 00000000..5f13857d --- /dev/null +++ b/app/controllers/reports/shiftsale_controller.rb @@ -0,0 +1,18 @@ +class Reports::ShiftsaleController < ApplicationController + # authorize_resource :class => false + + def index + + from, to, report_type = get_date_range_from_params + @sale_data = Sale.get_by_shiftsales(from,to) + respond_to do |format| + format.html + format.xls + end + end + + def show + + end +end + diff --git a/app/helpers/reports/shiftsale_helper.rb b/app/helpers/reports/shiftsale_helper.rb new file mode 100644 index 00000000..967a8c6b --- /dev/null +++ b/app/helpers/reports/shiftsale_helper.rb @@ -0,0 +1,2 @@ +module Reports::ShiftsaleHelper +end diff --git a/app/models/ability.rb b/app/models/ability.rb index 87371392..066311af 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -40,11 +40,14 @@ class Ability can :add_customer, Customer can :update_sale_by_customer, Customer + can :index, :other_charges + can :create, :other_charges can :index, :discount can :create, :discount can :remove_discount_items, :discount can :remove_all_discount, :discount + can :first_bill, :payment can :show, :payment can :create, :payment can :reprint, :payment @@ -54,6 +57,14 @@ class Ability can :move_dining, :moveroom + can :edit, :sale_edit + can :item_void, :sale_edit + can :item_void_cancel, :sale_edit + can :cancel_all_void, :sale_edit + can :apply_void, :sale_edit + + can :overall_void, :void + elsif user.role == "cashier" can :read, Order diff --git a/app/models/dining_facility.rb b/app/models/dining_facility.rb index 0e10307b..510da53d 100644 --- a/app/models/dining_facility.rb +++ b/app/models/dining_facility.rb @@ -39,6 +39,16 @@ class DiningFacility < ApplicationRecord end end + def get_moved_booking + booking = Booking.where("dining_facility_id = #{self.id} and booking_status ='moved' and checkin_at between '#{DateTime.now.utc - 5.hours}' and '#{DateTime.now.utc}' and checkout_at is null").limit(1) + + if booking.count > 0 then + return booking[0] + else + return nil + end + end + def get_new_booking # query for new # if status diff --git a/app/models/order.rb b/app/models/order.rb index d3056787..249e82ea 100644 --- a/app/models/order.rb +++ b/app/models/order.rb @@ -55,7 +55,7 @@ class Order < ApplicationRecord end - return false, @message = "booking fail" + return false end diff --git a/app/models/sale.rb b/app/models/sale.rb index 470519c5..693f6874 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -320,6 +320,41 @@ class Sale < ApplicationRecord end end + def self.get_rounding_adjustment(num) + ## 0 -- 25 -- 50 -- 75 -- 100 + # if get_rounded_amt == true + value = 0 + + num = num.to_f.round + get_last_no = num.to_s.last(2).to_f + if get_last_no.between?(0,25) + ## down to 0 + num -= get_last_no + else + if get_last_no.between?(26,50) + ## up to 50 + value = 50 - get_last_no.to_f + num += value + puts 'up to 50' + else + if get_last_no.between?(51, 75) + ## down to 50 + value = get_last_no.to_f - 50 + num -= value + puts 'down to 50' + else + ## up to 100 + value = 100 - get_last_no.to_f + num += value + puts 'up to 100' + end + end + end + # end + return num + end + + def self.daily_sales_list(from,to) payments_total = Sale.select("CAST((CONVERT_TZ(sales.receipt_date,'+00:00','+06:30')) AS DATE) as sale_date, SUM(case when (sale_payments.payment_method='mpu') then sale_payments.payment_amount else 0 end) as mpu_amount, @@ -385,13 +420,13 @@ def self.get_by_range_by_saleitems(from,to,status,report_type) .group('mi.id') .order("mi.menu_category_id") - query = query.joins("JOIN sale_items i ON i.sale_id = sales.sale_id + query = query.joins("JOIN sale_items i ON i.sale_id = sales.sale_id JOIN menu_items mi ON i.product_code = mi.item_code" + " JOIN menu_categories mc ON mc.id = mi.menu_category_id JOIN employees ea ON ea.id = sales.cashier_id") - query = query.where("receipt_date between ? and ? and sale_status=?",from,to,status) + query = query.where("receipt_date between ? and ? and sale_status=?",from,to,status) @@ -407,6 +442,11 @@ def self.get_by_range_by_saleitems(from,to,status,report_type) end + +def self.get_by_shiftsales(from,to) + return ShiftSale.where("(shift_started_at between ? and ? OR shift_closed_at between ? and ? )", from, to, from, to) +end + def get_cash_amount cash = 0.0 self.sale_payments.each do |pay| @@ -446,6 +486,7 @@ end end end + private def generate_custom_id diff --git a/app/views/crm/dining_queues/index.html.erb b/app/views/crm/dining_queues/index.html.erb index 4adbead9..4f39147f 100644 --- a/app/views/crm/dining_queues/index.html.erb +++ b/app/views/crm/dining_queues/index.html.erb @@ -18,19 +18,25 @@
- <% @i =0 %> + <% @dining_queues.each do |queue| %> -
" data-id="<%= queue.id %>" style="width: 17.5rem;"> + <% if queue.status == "Assign" + @bg_color = "assign" + elsif queue.status == "Cancel" + @bg_color = "cancel" + else + @bg_color = "normal" + end + %> +
- - <%= @i += 1 %> . Queue No - Seater : <%= queue.seater %> -

- <%= queue.queue_no %> -

- + Queue No : <%= queue.queue_no %> + Seater : <%= queue.seater %>
+ Name : <%= queue.name %>
+ Contact No : <%= queue.contact_no %> + Remark : <%= queue.remark %>
@@ -43,7 +49,7 @@
- +
\ No newline at end of file diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 345ca63f..558d35dd 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -42,6 +42,7 @@
  • <%= link_to "Daily Sale Report", reports_dailysale_index_path, :tabindex =>"-1" %>
  • <%= link_to "Sales Item Report", reports_saleitem_index_path, :tabindex =>"-1" %>
  • <%= link_to "Receipt Report", reports_receipt_no_index_path, :tabindex =>"-1" %>
  • + diff --git a/app/views/layouts/origami.html.erb b/app/views/layouts/origami.html.erb index 1f519d2b..d6bbf436 100644 --- a/app/views/layouts/origami.html.erb +++ b/app/views/layouts/origami.html.erb @@ -19,14 +19,14 @@ <%= render 'layouts/header_orgiami' %>
    <% flash.each do |type, message| %> - <% if !flash["errors"]%> -
    - - <%=message%> -
    - <% end %> + <% if !flash["errors"]%> +
    + + <%=message%> +
    + <% end %> - <% end %> + <% end %> <%= yield %>
    diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index dde68c48..f89560f3 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -303,7 +303,8 @@ <% if @status_order == 'order' && @status_sale != 'sale' %> - + + @@ -313,6 +314,7 @@ + @@ -390,6 +392,25 @@ $(document).ready(function(){ return false; }); + // Add Other Charges + $('#other-charges').click(function() { + var sale = $('#sale_id').val(); + if (sale!="") { + var sale_id = sale + }else{ + var sale_id = $('#save_order_id').attr('data-order'); + } + + if(sale_id!=""){ + window.location.href = '/origami/' + sale_id + '/other_charges' + } + else { + alert("Please select an table!"); + } + + return false; + }); + // Discount for Payment $('#discount').click(function() { var sale = $('#sale_id').val(); @@ -408,7 +429,6 @@ $(document).ready(function(){ return false; }); - }); // Print for first bill diff --git a/app/views/origami/other_charges/index.html.erb b/app/views/origami/other_charges/index.html.erb new file mode 100644 index 00000000..129aa0e0 --- /dev/null +++ b/app/views/origami/other_charges/index.html.erb @@ -0,0 +1,331 @@ +
    + +
    + +
    + +
    +
    +
    + +

    Receipt No: <%=@sale_data.receipt_no rescue ' '%>

    + +
    +
    +

    Date: <%=@sale_data.receipt_date.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%>

    +
    +
    +
    + + + + + + + + <% sub_total = 0 %> + <% @sale_data.sale_items.each do |sale_item| %> + <% + sub_total += sale_item.qty*sale_item.unit_price + unless sale_item.price == 0 + %> + > + + + + + <% + end + end + %> + +
    ItemsQTY + Price +
    + + <%=sale_item.product_name%>@<%=sale_item.unit_price%> + + <%=sale_item.qty%> + + <%=(sale_item.qty*sale_item.unit_price)%> +
    +
    + +
    +
    +
    + + + +
    + +
    +
    +
    Other Charges Control
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    3000
    +
    +
    +
    1
    +
    2
    +
    3
    +
    +
    + +
    +
    +
    5000
    +
    +
    +
    4
    +
    5
    +
    6
    +
    +
    + +
    +
    +
    10000
    +
    +
    +
    7
    +
    8
    +
    9
    +
    +
    + +
    +
    +
    15000
    +
    +
    +
    0
    +
    .
    +
    00
    +
    +
    + +
    +
    +
    20000
    +
    +
    +
    +
    DEL
    +
    CLR
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    + + +
    + +
    + + +
    +
    +
    + + diff --git a/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb new file mode 100644 index 00000000..34173d99 --- /dev/null +++ b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb @@ -0,0 +1,127 @@ +
    +
    + <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> + <% if period_type != false %> +
    +
    + + +
    + + +
    + + + +
    +
    + + +
    +
    + +
    +
    + <% end %> + + <% end %> +
    +
    + + \ No newline at end of file diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb new file mode 100644 index 00000000..8582a578 --- /dev/null +++ b/app/views/reports/shiftsale/index.html.erb @@ -0,0 +1,160 @@ + + +
    + <%= render :partial=>'shift_sale_report_filter', + :locals=>{ :period_type => true, :shift_name => false, :report_path =>reports_shiftsale_index_path} %> +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    + + + <% if params[:from]%> + + + + <% end %> + + + + + + + + + + + + + + + + + <% void = 0%> + <% cash = 0%> + <% credit = 0%> + <% accept_credit = 0%> + <% foc = 0%> + <% card = 0%> + <% total = 0%> + <% rounding_adj = 0%> + <% g_total = 0 %> + + <% @sale_data.each do |result| %> + + + + + + + + + + + + <% grand_total = result[:grand_total].to_f - result[:rounding_adj].to_f %> + + + <% void += result[:void_amount].to_f %> + <% cash += result[:cash_amount].to_f %> + <% credit += result[:credit_amount].to_f %> + <% accept_credit += result[:accept_credit_amount].to_f %> + <% foc += result[:foc_amount].to_f %> + <% card += result[:card_amount].to_f %> + <% total += result[:grand_total].to_f %> + <% rounding_adj += result[:rounding_adj].to_f %> + <% g_total += grand_total.to_f %> + + <% end %> + + + + + + + + + + + + + + +
    From Date : <%= params[:from] rescue '-'%> ,To Date : <%= params[:to] rescue '-'%>
    Cashier StationShift NameVoid AmountCash PaymentCredit ChargesCredit PaymentFOC PaymentCard PaymentGrand Total + +
    Rounding Adj
    Rounding AdjGrand Total
    + <%= result[:cashier_station_name] rescue '-'%> + <%= result[:shift_started_at].strftime("%e %b %I:%M%p") rescue '-' %> - + <%= result[:shift_closed_at].strftime("%e %b %I:%M%p") rescue '-' %> + <%= sprintf "%.2f",result[:cash_amount].to_f.to_d rescue '-'%><%= sprintf "%.2f",result[:credit_amount].to_f.to_d rescue '-'%><%= sprintf "%.2f",result[:accept_credit_amount].to_f.to_d rescue '-'%><%= sprintf "%.2f",result[:foc_amount].to_f.to_d rescue '-'%><%= sprintf "%.2f",result[:card_amount].to_f.to_d rescue '-'%><%= sprintf "%.2f",result[:grand_total].to_f.to_d rescue '-'%><%= sprintf "%.2f",result[:rounding_adj].to_f.to_d rescue '-'%><%= sprintf "%.2f",grand_total.to_f.to_d rescue '-'%>
    (<%= sprintf("%.2f",void) rescue '-'%>)<%= sprintf("%.2f",cash) rescue '-'%><%= sprintf("%.2f",credit) rescue '-'%><%= sprintf("%.2f",accept_credit) rescue '-'%><%= sprintf("%.2f",foc) rescue '-'%><%= sprintf("%.2f",card) rescue '-'%><%= sprintf("%.2f",total) rescue '-'%><%= sprintf("%.2f",rounding_adj) rescue '-'%><%= sprintf("%.2f",g_total) rescue '-'%>
    +
    +
    +
    + + + \ No newline at end of file diff --git a/app/views/reports/daily_sale/index.html.erb b/app/views/reports/shiftsale/index.xls.erb similarity index 79% rename from app/views/reports/daily_sale/index.html.erb rename to app/views/reports/shiftsale/index.xls.erb index 7b790148..67e76e3c 100644 --- a/app/views/reports/daily_sale/index.html.erb +++ b/app/views/reports/shiftsale/index.xls.erb @@ -1,26 +1,4 @@ - - -
    - <%= render :partial=>'shift_sale_report_filter', - :locals=>{ :period_type => true, :shift_name => false, :report_path =>reports_daily_sales_path} %> -
    -
    - -
    -
    - -
    -
    - -
    -
    +
    @@ -135,56 +113,4 @@ <% end %>
    -
    -
    - - - \ No newline at end of file +
    \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index dd38914d..35669703 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -93,6 +93,11 @@ Rails.application.routes.draw do # post '/:booking_id' => 'home#item_show' + # Other Charges + get "/:sale_id/other_charges" => "other_charges#index" + post "/:sale_id/other_charges" => "other_charges#create" + + # Discount get "/:id/discount" => "discounts#index" post "/:id/discount" => "discounts#create" get "/:id/remove_all_discount" => "discounts#remove_all_discount" @@ -168,6 +173,7 @@ Rails.application.routes.draw do get "/dining_queues/:id/assign" =>"dining_queues#assign", :as => "assign" post "/dining_queues/assign_table" =>"dining_queues#assign_table", :as => "assign_table" + post "/dining_queues/cancel_queue" =>"dining_queues#cancel_queue", :as => "cancel_queue" end @@ -263,6 +269,7 @@ Rails.application.routes.draw do resources :receipt_no, :only => [:index, :show] resources :dailysale, :only => [:index, :show] resources :saleitem, :only => [:index, :show] + resources :shiftsale, :only => [:index, :show] # resources :sales, :only => [:index, :show] # resources :orders, :only => [:index, :show] # resources :customers, :only => [:index, :show] diff --git a/spec/controllers/reports/shiftsale_controller_spec.rb b/spec/controllers/reports/shiftsale_controller_spec.rb new file mode 100644 index 00000000..ed90f941 --- /dev/null +++ b/spec/controllers/reports/shiftsale_controller_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe Reports::ShiftsaleController, type: :controller do + +end diff --git a/spec/helpers/reports/shiftsale_helper_spec.rb b/spec/helpers/reports/shiftsale_helper_spec.rb new file mode 100644 index 00000000..3555ce0c --- /dev/null +++ b/spec/helpers/reports/shiftsale_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the Reports::ShiftsaleHelper. For example: +# +# describe Reports::ShiftsaleHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +RSpec.describe Reports::ShiftsaleHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end