caboose-cms 0.9.163 → 0.9.164

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e81b5e959f5700883248c2a026030e0338423120
4
- data.tar.gz: 75d8aa80a958573c030512067944fb4ee92dbbdd
3
+ metadata.gz: 52112fdba754ce88011e49c74845f1af024a2b5e
4
+ data.tar.gz: 41cb9e6883c044cadad7c0b4191faca6b95748f0
5
5
  SHA512:
6
- metadata.gz: d6ced582df9dd50f1d55894c263db7381c295aabb925800663c9e77f8fe3388231bce56149e2dcfd5a4523db49c9f536450bd3b1898fb75f6dfb0dc4d7d0e13f
7
- data.tar.gz: e98813ecbc21ea355af831c02e7a1fb92d0da95696e0ac426ac654e2dd2b45cdaee215eb190d22d69ba19ad1aa37fcf00e9cc0421a15e177a059aa85e1aacdba
6
+ metadata.gz: de344c5b6d5ced5f06c123ac9b1011c235543e264d12d7f8091cdc745253523ceb8d35c8eea4558512a2c1649381204fa3a16565d2cd363a0b43989f09b13a53
7
+ data.tar.gz: ba17886efa38d8209d992fe469998a8a5182a62f05dd1e12a10f7fb2ae0d92397db1e2bbde34ef0f82dc5340d15d2d263517a4236c31c30972019b3cc51b6b27
@@ -244,18 +244,16 @@ module Caboose
244
244
 
245
245
 
246
246
  if !params[:game_id].blank?
247
- game = Colonnade::Game.find(params[:game_id])
248
- menu = Colonnade::Menu.where(:game_id => game.id).first if game
249
- invoice_ids = Colonnade::SuiteMenu.where(:menu_id => menu.id).pluq(:invoice_id) if menu
247
+ menu_ids = Colonnade::Menu.where(:game_id => params[:game_id]).pluq(:id)
248
+ invoice_ids = Colonnade::SuiteMenu.where(:menu_id => menu_ids).pluq(:invoice_id) if !menu_ids.blank?
249
+ invoice_ids = invoice_ids.to_s.gsub('[','').gsub(']','')
250
250
  end
251
251
 
252
- where << "(id in (?))" if invoice_ids
253
- terms << invoice_ids if invoice_ids
254
-
252
+ where3 = params[:game_id].blank? ? 'id is not null' : ( invoice_ids.blank? ? "id is null" : "id in (#{invoice_ids})" )
255
253
 
256
254
  where2 = where.join(' AND ')
257
255
 
258
- pdf.invoices = Invoice.where(where2, *terms).all
256
+ pdf.invoices = Invoice.where(where2, *terms).where(where3).all
259
257
  if params[:print_card_details]
260
258
  pdf.print_card_details = params[:print_card_details].to_i == 1
261
259
  end
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.163'
2
+ VERSION = '0.9.164'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.163
4
+ version: 0.9.164
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-04 00:00:00.000000000 Z
11
+ date: 2018-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg