smerp-quotation-engine 0.4.1 → 0.4.3
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd150303402ebb754c70e29639f48678773cce7ddc42471dc879723ffa77a982
|
|
4
|
+
data.tar.gz: 9b1f15b65e171d5acada842c27b39d7c0409d2990c5eb68068d65e7aec50908e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8af4d1990375a472a8d01dfe28cf0aa077917583c90b89800a1b7ea699566ff695fa7f83b40df6470f3598fef284c08be8a82a150ec65f0cd4692c2e3db160d
|
|
7
|
+
data.tar.gz: 9ef0c32a54cba5823319101e096488b0773fdfec5418e71ea70fccd54d8bcfc4ea6feadae35a35e73f23dc2b97915706c272b84b04783f61b6433455b2937651
|
|
@@ -225,13 +225,11 @@ module Smerp::Quotation::Engine
|
|
|
225
225
|
s.start_col = 1
|
|
226
226
|
s.insert_row ["Description", "Quantity", "", "Unit Price (RM)", "Total (RM)"]
|
|
227
227
|
|
|
228
|
-
|
|
229
|
-
|
|
230
228
|
seq = 1
|
|
231
|
-
level =
|
|
229
|
+
level = 0
|
|
232
230
|
@quotation.quotation_items.each do |i|
|
|
233
231
|
patch = " " * level
|
|
234
|
-
name = []
|
|
232
|
+
name = [""]
|
|
235
233
|
name << patch
|
|
236
234
|
name << "#{helpers.level_seq_conv(level, seq)}. "
|
|
237
235
|
name << i.name
|
|
@@ -257,7 +255,10 @@ module Smerp::Quotation::Engine
|
|
|
257
255
|
|
|
258
256
|
end
|
|
259
257
|
|
|
260
|
-
|
|
258
|
+
output = "#{@quotation.id}.xlsx"
|
|
259
|
+
exp.save_to(output)
|
|
260
|
+
|
|
261
|
+
send_data(File.read(File.join(Rails.root, output)), type: 'application/octet-stream', disposition: "attachment")
|
|
261
262
|
|
|
262
263
|
end
|
|
263
264
|
|
|
@@ -265,7 +266,7 @@ module Smerp::Quotation::Engine
|
|
|
265
266
|
seq = 1
|
|
266
267
|
item.children.each do |c|
|
|
267
268
|
patch = " " * level
|
|
268
|
-
name = []
|
|
269
|
+
name = [""]
|
|
269
270
|
name << patch
|
|
270
271
|
name << "#{helpers.level_seq_conv(level, seq)}. "
|
|
271
272
|
name << c.name
|