sales_and_orders_decorator 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sales_and_orders_decorator.rb +18 -18
- data/lib/sales_and_orders_decorator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b682bd6764fc315a6ae2c43afbed7ed1c69611cf
|
4
|
+
data.tar.gz: f92fc2ecf84caefd83a4018b673bbe96d14a86ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 639083d2de9c03ccce8adb25451c2601efb64649aef1d6175bd4fd8614b14b0a8ce5bc1c926cca8640b0cdc7a2e4a1ecde73924b4a2d0934761c5a0fb4b2367e
|
7
|
+
data.tar.gz: 0da18fa643b06a3d5742a0dac6aba175d3f5c915155843f97d2989e6f442fda2a80fd50e71c84f9c3fca53f9f59c61b0d092ff72c9dd0b7e74397fa977e28d3b
|
@@ -75,7 +75,7 @@ class BuisnessDecorator
|
|
75
75
|
end
|
76
76
|
|
77
77
|
#returns the total sales with the root class total sales which is calculated already
|
78
|
-
def totalSale_counter_method
|
78
|
+
def totalSale_counter_method(sd)
|
79
79
|
@totalSale_counter += sd.totalSale
|
80
80
|
end
|
81
81
|
|
@@ -85,27 +85,27 @@ class BuisnessDecorator
|
|
85
85
|
end
|
86
86
|
|
87
87
|
#returns the total profit sales with the root class total profit of the sales sold which is calculated already
|
88
|
-
def profit_counter_method
|
88
|
+
def profit_counter_method(sd)
|
89
89
|
@profit_counter += sd.profit
|
90
90
|
end
|
91
91
|
|
92
92
|
#returns the total veg type quantity sales with the root class total veg pizza quantity sales sold that is calculated already
|
93
|
-
def vegCounter_method
|
93
|
+
def vegCounter_method(sd)
|
94
94
|
@vegCounter += sd.vegSale
|
95
95
|
end
|
96
96
|
|
97
97
|
#returns the total non veg type quantity sales with the root class total veg pizza quantity sales sold that is calculated already
|
98
|
-
def nonVegCounter_method
|
98
|
+
def nonVegCounter_method(sd)
|
99
99
|
@nonVegCounter += sd.nonVegSale
|
100
100
|
end
|
101
101
|
|
102
102
|
#returns the total offered type quantity sales with the root class total offered pizza quantity sales sold that is calculated already
|
103
|
-
def offeredSale_counter_method
|
103
|
+
def offeredSale_counter_method(sd)
|
104
104
|
@offeredSale_counter += sd.offeredSale
|
105
105
|
end
|
106
106
|
|
107
107
|
#returns the total non offered type quantity sales with the root class total non offered pizza quantity sales sold that is calculated already
|
108
|
-
def nonOfferedSale_counter_method
|
108
|
+
def nonOfferedSale_counter_method(sd)
|
109
109
|
@nonOfferedSale_counter += sd.nonOfferedSale
|
110
110
|
end
|
111
111
|
|
@@ -222,12 +222,12 @@ class WeekSalesDecorator < BuisnessDecorator
|
|
222
222
|
def main_method
|
223
223
|
common_method
|
224
224
|
@root_sales.sales_array.each do |sd|
|
225
|
-
totalSale_counter_method
|
226
|
-
profit_counter_method
|
227
|
-
vegCounter_method
|
228
|
-
nonVegCounter_method
|
229
|
-
offeredSale_counter_method
|
230
|
-
nonOfferedSale_counter_method
|
225
|
+
totalSale_counter_method(sd)
|
226
|
+
profit_counter_method(sd)
|
227
|
+
vegCounter_method(sd)
|
228
|
+
nonVegCounter_method(sd)
|
229
|
+
offeredSale_counter_method(sd)
|
230
|
+
nonOfferedSale_counter_method(sd)
|
231
231
|
end
|
232
232
|
#totalSale_counter += sd.totalSale
|
233
233
|
#profit_counter += sd.profit
|
@@ -271,12 +271,12 @@ class MonthSalesDecorator < BuisnessDecorator
|
|
271
271
|
def main_method
|
272
272
|
common_method
|
273
273
|
@root_sales.sales_array.each do |sd|
|
274
|
-
totalSale_counter_method
|
275
|
-
profit_counter_method
|
276
|
-
vegCounter_method
|
277
|
-
nonVegCounter_method
|
278
|
-
offeredSale_counter_method
|
279
|
-
nonOfferedSale_counter_method
|
274
|
+
totalSale_counter_method(sd)
|
275
|
+
profit_counter_method(sd)
|
276
|
+
vegCounter_method(sd)
|
277
|
+
nonVegCounter_method(sd)
|
278
|
+
offeredSale_counter_method(sd)
|
279
|
+
nonOfferedSale_counter_method(sd)
|
280
280
|
end
|
281
281
|
#totalSale_counter += sd.totalSale
|
282
282
|
#profit_counter += sd.profit
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sales_and_orders_decorator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kishore Kumar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|