qb_iif 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +3 -0
  4. data/CHANGELOG.md +18 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +20 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +188 -0
  9. data/Rakefile +7 -0
  10. data/lib/qb_iif/dsl/accnt.rb +15 -0
  11. data/lib/qb_iif/dsl/base.rb +54 -0
  12. data/lib/qb_iif/dsl/bud.rb +14 -0
  13. data/lib/qb_iif/dsl/class.rb +9 -0
  14. data/lib/qb_iif/dsl/ctype.rb +9 -0
  15. data/lib/qb_iif/dsl/cust.rb +51 -0
  16. data/lib/qb_iif/dsl/emp.rb +31 -0
  17. data/lib/qb_iif/dsl/invitem.rb +32 -0
  18. data/lib/qb_iif/dsl/invmemo.rb +9 -0
  19. data/lib/qb_iif/dsl/othername.rb +25 -0
  20. data/lib/qb_iif/dsl/paymeth.rb +9 -0
  21. data/lib/qb_iif/dsl/shipmeth.rb +10 -0
  22. data/lib/qb_iif/dsl/spl.rb +29 -0
  23. data/lib/qb_iif/dsl/terms.rb +13 -0
  24. data/lib/qb_iif/dsl/timeact.rb +17 -0
  25. data/lib/qb_iif/dsl/timerhdr.rb +14 -0
  26. data/lib/qb_iif/dsl/todo.rb +12 -0
  27. data/lib/qb_iif/dsl/trns.rb +56 -0
  28. data/lib/qb_iif/dsl/vend.rb +39 -0
  29. data/lib/qb_iif/dsl/vtype.rb +9 -0
  30. data/lib/qb_iif/iif.rb +64 -0
  31. data/lib/qb_iif/keywords.rb +12 -0
  32. data/lib/qb_iif/rails/renderer.rb +15 -0
  33. data/lib/qb_iif/rails/template_handler.rb +20 -0
  34. data/lib/qb_iif/railtie.rb +17 -0
  35. data/lib/qb_iif/version.rb +3 -0
  36. data/lib/qb_iif.rb +7 -0
  37. data/qb_iif.gemspec +28 -0
  38. data/spec/controllers/invoices_controller_spec.rb +26 -0
  39. data/spec/fixtures/accnt.iif +2 -0
  40. data/spec/fixtures/bud.iif +2 -0
  41. data/spec/fixtures/class.iif +2 -0
  42. data/spec/fixtures/ctype.iif +2 -0
  43. data/spec/fixtures/cust.iif +2 -0
  44. data/spec/fixtures/emp.iif +2 -0
  45. data/spec/fixtures/invitem.iif +2 -0
  46. data/spec/fixtures/invmemo.iif +2 -0
  47. data/spec/fixtures/mixed.iif +13 -0
  48. data/spec/fixtures/othername.iif +2 -0
  49. data/spec/fixtures/paymeth.iif +2 -0
  50. data/spec/fixtures/rails/invoices.iif +6 -0
  51. data/spec/fixtures/shipmeth.iif +2 -0
  52. data/spec/fixtures/terms.iif +2 -0
  53. data/spec/fixtures/timeact.iif +4 -0
  54. data/spec/fixtures/todo.iif +2 -0
  55. data/spec/fixtures/trns.iif +7 -0
  56. data/spec/fixtures/vend.iif +2 -0
  57. data/spec/fixtures/vtype.iif +2 -0
  58. data/spec/internal/app/controllers/invoices_controller.rb +7 -0
  59. data/spec/internal/app/views/invoices/index.iif.riif +27 -0
  60. data/spec/internal/config/database.yml +3 -0
  61. data/spec/internal/config/routes.rb +3 -0
  62. data/spec/internal/db/schema.rb +3 -0
  63. data/spec/internal/log/.gitignore +1 -0
  64. data/spec/internal/public/favicon.ico +0 -0
  65. data/spec/qb_iif/dsl/accnt_spec.rb +22 -0
  66. data/spec/qb_iif/dsl/bud_spec.rb +28 -0
  67. data/spec/qb_iif/dsl/class_spec.rb +20 -0
  68. data/spec/qb_iif/dsl/ctype_spec.rb +19 -0
  69. data/spec/qb_iif/dsl/cust_spec.rb +20 -0
  70. data/spec/qb_iif/dsl/emp_spec.rb +24 -0
  71. data/spec/qb_iif/dsl/invitem_spec.rb +21 -0
  72. data/spec/qb_iif/dsl/invmemo_spec.rb +19 -0
  73. data/spec/qb_iif/dsl/othername_spec.rb +23 -0
  74. data/spec/qb_iif/dsl/paymeth_spec.rb +19 -0
  75. data/spec/qb_iif/dsl/shipmeth_spec.rb +19 -0
  76. data/spec/qb_iif/dsl/terms_spec.rb +23 -0
  77. data/spec/qb_iif/dsl/timeact_spec.rb +35 -0
  78. data/spec/qb_iif/dsl/todo_spec.rb +22 -0
  79. data/spec/qb_iif/dsl/trns_spec.rb +55 -0
  80. data/spec/qb_iif/dsl/vend_spec.rb +21 -0
  81. data/spec/qb_iif/dsl/vtype_spec.rb +19 -0
  82. data/spec/qb_iif/iif_spec.rb +61 -0
  83. data/spec/spec_helper.rb +19 -0
  84. metadata +283 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dde2ea9aa7d439940a02bd99be6d77ba1192ecaa
4
+ data.tar.gz: ef4cb4fdaa8578ada05a0c71b5ea050e31eee89c
5
+ SHA512:
6
+ metadata.gz: 36f12edbb2bdf8de52b2ca6adbd04b44b515079a61c61089e619cb3e1119c18097df540e39d19894908ef584dfc1266f398a4d5fd105e297bb9c3f5214130eee
7
+ data.tar.gz: bf34cf13a78b38940967deeeff8827a5281df7577d603b4bf2f01e9fcdbeb9697ea8c306cc205d34ccb7db6c5a961a7aeda98812ebf2954853f1889b0ea8dba3
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format Fuubar
3
+
data/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ ## 0.1.0
2
+ * Implement OTHERNAME
3
+ * Implement TIMEACT
4
+ * Implement TERMS
5
+ * Implement VEND
6
+ * Implement VTYPE
7
+ * Implement SHIPMETH
8
+ * Implement PAYMETH
9
+ * Implement INVMEMO
10
+ * Implement INVITEM
11
+ * Implement CTYPE
12
+ * Implement CLASS
13
+ * Implement ACCNT
14
+ * Implement EMP
15
+ * Implement CUST
16
+ * Implement TRNS and SPL
17
+ * Implement Mixed document in one IIF file. (DSL had been changed)
18
+
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in qb_iif.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Practical Strategies, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Jordan
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,188 @@
1
+ QBIif
2
+ ========
3
+
4
+ A simple DSL to generate IIF file for QuickBook and extend Rails render builder.
5
+
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'qb_iif'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install qb_iif
20
+ ## Keywords
21
+
22
+ Please use underscore before the keyword. The keyword mapping as follow:
23
+ ```ruby
24
+ ESCAPED_KEYWORDS = {
25
+ _class: :class,
26
+ _1099: :"1099"
27
+ }
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ### With Rails
33
+
34
+ With a custom template handler, it works with Rails.
35
+
36
+ ```ruby
37
+ # invoices_controller.rb
38
+
39
+ class InvoicesController < ApplicationController
40
+ def show
41
+ respond_to do |format|
42
+ format.iif { render iif: render_to_string, filename: 'batman'}
43
+ format.html
44
+ end
45
+ end
46
+ end
47
+ ```
48
+
49
+ ```ruby
50
+ # show.iif.riif
51
+
52
+ iif.trns do
53
+ row do
54
+ trnsid 123
55
+ trnstype 'INVOICE'
56
+ date '8/31/1988'
57
+ accnt 'Accounts Receivable'
58
+ name 'Customer'
59
+ amount 20
60
+ docnum invoice.id
61
+ clear 'N'
62
+ toprint 'N'
63
+ addr1 'Baker'
64
+ addr2 'Customer'
65
+ end
66
+
67
+ spl do
68
+ row do
69
+ splid '777'
70
+ trnstype 'INVOICE'
71
+ date '8/31/1988'
72
+ accnt 'Income Account'
73
+ amount '-20'
74
+ clear 'N'
75
+ qnty '-2'
76
+ price 10
77
+ invitem 'Sales Item'
78
+ taxable 'N'
79
+ end
80
+ end
81
+
82
+ spl do
83
+ row do
84
+ splid '888'
85
+ end
86
+ end
87
+ end
88
+ ```
89
+
90
+ ### Without Rails
91
+
92
+ ```ruby
93
+ QbIif::IIF.new do
94
+ trns do
95
+ row do
96
+ trnsid 123
97
+ trnstype 'INVOICE'
98
+ date '8/31/1988'
99
+ accnt 'Accounts Receivable'
100
+ name 'Customer'
101
+ amount 20
102
+ docnum 1
103
+ clear 'N'
104
+ toprint 'N'
105
+ addr1 'Baker'
106
+ addr2 'Customer'
107
+ end
108
+
109
+ spl do
110
+ row do
111
+ splid '777'
112
+ trnstype 'INVOICE'
113
+ date '8/31/1988'
114
+ accnt 'Income Account'
115
+ amount '-20'
116
+ clear 'N'
117
+ qnty '-2'
118
+ price 10
119
+ invitem 'Sales Item'
120
+ taxable 'N'
121
+ end
122
+ end
123
+
124
+ spl do
125
+ row do
126
+ splid '888'
127
+ end
128
+ end
129
+ end
130
+ end
131
+ ```
132
+
133
+ Result:
134
+
135
+ ```
136
+ !TRNS TRNSID TRNSTYPE DATE ACCNT NAME CLASS AMOUNT DOCNUM MEMO CLEAR TOPRINT ADDR1 ADDR2 ADDR3 ADDR4 ADDR5 DUEDATE TERMS PAID SHIPDATE
137
+ !SPL SPLID TRNSTYPE DATE ACCNT NAME CLASS AMOUNT DOCNUM MEMO CLEAR QNTY PRICE INVITEM PAYMETH TAXABLE REIMBEXP EXTRA
138
+ !ENDTRNS
139
+ TRNS 123 INVOICE 8/31/1988 Accounts Receivable Customer 20 1 N N Baker Customer
140
+ SPL 777 INVOICE 8/31/1988 Income Account -20 N -2 10 Sales Item N
141
+ SPL 888
142
+ ENDTRNS
143
+ ```
144
+
145
+ If you prefer, you can pass an argument along with your block:
146
+
147
+ ```ruby
148
+ QbIif::IIF.new do |riif|
149
+ riif.trns do |trns|
150
+ trns.row do |row|
151
+ row.trnsid 123
152
+ row.trnstype 'INVOICE'
153
+ row.date '8/31/1988'
154
+ row.accnt 'Accounts Receivable'
155
+ row.name 'Customer'
156
+ end
157
+ end
158
+ end
159
+ ```
160
+
161
+ ## Editors
162
+
163
+ ### Vim
164
+
165
+ ```VimL
166
+ au BufWinEnter,BufRead,BufNewFile *.riif set filetype=ruby
167
+ ```
168
+
169
+ ## Resources
170
+
171
+ [Use Intuit Interchange Format (.iif) files](http://support.quickbooks.intuit.com/support/articles/HOW12778)
172
+
173
+ ## Contributing
174
+
175
+ 1. Fork it
176
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
177
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
178
+ 4. Push to the branch (`git push origin my-new-feature`)
179
+ 5. Create new Pull Request
180
+
181
+ ## Contributors
182
+
183
+ https://github.com/pracstrat
184
+
185
+ ## Changes
186
+
187
+ See [CHANGELOG.md](CHANGELOG.md)
188
+
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
7
+
@@ -0,0 +1,15 @@
1
+ module QbIif::DSL
2
+ class Accnt < Base
3
+ HEADER_COLUMNS = [
4
+ :name,
5
+ :accnttype,
6
+ :obamount,
7
+ :desc,
8
+ :scd,
9
+ :accnum,
10
+ :extra
11
+ ]
12
+ START_COLUMN = 'ACCNT'
13
+ END_COLUMN = ''
14
+ end
15
+ end
@@ -0,0 +1,54 @@
1
+ module QbIif::DSL
2
+ class Base
3
+
4
+ include QbIif::Keywords
5
+
6
+ def initialize
7
+ @rows = []
8
+ @current_row = []
9
+ end
10
+
11
+ def build(&block)
12
+
13
+ instance_eval(&block)
14
+
15
+ output
16
+ end
17
+
18
+ def row(&block)
19
+ @current_row = [self.class::START_COLUMN]
20
+
21
+ instance_eval(&block)
22
+
23
+ @rows << @current_row
24
+ end
25
+
26
+ def output
27
+ {
28
+ headers: headers,
29
+ rows: rows
30
+ }
31
+ end
32
+
33
+ def headers
34
+ [
35
+ ["!#{self.class::START_COLUMN}"].concat(
36
+ self.class::HEADER_COLUMNS.map(&:upcase)
37
+ )
38
+ ]
39
+ end
40
+
41
+ def rows
42
+ @rows
43
+ end
44
+
45
+ def method_missing(method_name, *args, &block)
46
+ method_name = escaped(method_name)
47
+ if self.class::HEADER_COLUMNS.include?(method_name)
48
+ @current_row[self.class::HEADER_COLUMNS.index(method_name) + 1] = args[0]
49
+ else
50
+ super
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,14 @@
1
+ module QbIif::DSL
2
+ class Bud < Base
3
+ HEADER_COLUMNS = [
4
+ :accnt,
5
+ :period,
6
+ :amount,
7
+ :startdate,
8
+ :class,
9
+ :customer
10
+ ]
11
+ START_COLUMN = 'BUD'
12
+ END_COLUMN = ''
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ module QbIif::DSL
2
+ class Class < Base
3
+ HEADER_COLUMNS = [
4
+ :name
5
+ ]
6
+ START_COLUMN = 'CLASS'
7
+ END_COLUMN = ''
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module QbIif::DSL
2
+ class Ctype < Base
3
+ HEADER_COLUMNS = [
4
+ :name
5
+ ]
6
+ START_COLUMN = 'CTYPE'
7
+ END_COLUMN = ''
8
+ end
9
+ end
@@ -0,0 +1,51 @@
1
+ module QbIif::DSL
2
+ class Cust < Base
3
+ HEADER_COLUMNS = [
4
+ :name,
5
+ :baddr1,
6
+ :baddr2,
7
+ :baddr3,
8
+ :baddr4,
9
+ :baddr5,
10
+ :saddr1,
11
+ :saddr2,
12
+ :saddr3,
13
+ :saddr4,
14
+ :saddr5,
15
+ :phone1,
16
+ :phone2,
17
+ :faxnum,
18
+ :cont1,
19
+ :cont2,
20
+ :ctype,
21
+ :terms,
22
+ :taxable,
23
+ :limit,
24
+ :resalenum,
25
+ :rep,
26
+ :taxitem,
27
+ :notepad,
28
+ :salutation,
29
+ :companyname,
30
+ :firstname,
31
+ :midinit,
32
+ :lastname,
33
+ :custfld1,
34
+ :custfld2,
35
+ :custfld3,
36
+ :custfld4,
37
+ :custfld5,
38
+ :custfld6,
39
+ :custfld7,
40
+ :jobdesc,
41
+ :jobtype,
42
+ :jobstatus,
43
+ :jobstart,
44
+ :jobprojend,
45
+ :jobend,
46
+ :note
47
+ ]
48
+ START_COLUMN = 'CUST'
49
+ END_COLUMN = ''
50
+ end
51
+ end
@@ -0,0 +1,31 @@
1
+ module QbIif::DSL
2
+ class Emp < Base
3
+ HEADER_COLUMNS = [
4
+ :name,
5
+ :init,
6
+ :addr1,
7
+ :addr2,
8
+ :addr3,
9
+ :addr4,
10
+ :addr5,
11
+ :ssno,
12
+ :phone1,
13
+ :phone2,
14
+ :notepad,
15
+ :firstname,
16
+ :midinit,
17
+ :lastname,
18
+ :salutation,
19
+ :custfld1,
20
+ :custfld2,
21
+ :custfld3,
22
+ :custfld4,
23
+ :custfld5,
24
+ :custfld6,
25
+ :custfld7,
26
+ :note
27
+ ]
28
+ START_COLUMN = 'EMP'
29
+ END_COLUMN = ''
30
+ end
31
+ end
@@ -0,0 +1,32 @@
1
+ module QbIif::DSL
2
+ class Invitem < Base
3
+ HEADER_COLUMNS = [
4
+ :name,
5
+ :invitemtype,
6
+ :desc,
7
+ :purchasedesc,
8
+ :accnt,
9
+ :assetaccnt,
10
+ :cogsaccnt,
11
+ :price,
12
+ :cost,
13
+ :taxable,
14
+ :paymeth,
15
+ :taxvend,
16
+ :taxdist,
17
+ :toprint,
18
+ :prefvend,
19
+ :reorderpoint,
20
+ :extra,
21
+ :custfld1,
22
+ :custfld2,
23
+ :custfld3,
24
+ :custfld4,
25
+ :custfld5,
26
+ :dep_type,
27
+ :ispassedthru
28
+ ]
29
+ START_COLUMN = 'INVITEM'
30
+ END_COLUMN = ''
31
+ end
32
+ end
@@ -0,0 +1,9 @@
1
+ module QbIif::DSL
2
+ class Invmemo < Base
3
+ HEADER_COLUMNS = [
4
+ :name
5
+ ]
6
+ START_COLUMN = 'INVMEMO'
7
+ END_COLUMN = ''
8
+ end
9
+ end
@@ -0,0 +1,25 @@
1
+ module QbIif::DSL
2
+ class Othername < Base
3
+ HEADER_COLUMNS = [
4
+ :name,
5
+ :baddr1,
6
+ :baddr2,
7
+ :baddr3,
8
+ :baddr4,
9
+ :baddr5,
10
+ :phone1,
11
+ :phone2,
12
+ :faxnum,
13
+ :cont1,
14
+ :notepad,
15
+ :salutation,
16
+ :companyname,
17
+ :firstname,
18
+ :midinit,
19
+ :lastname,
20
+ :note
21
+ ]
22
+ START_COLUMN = 'OTHERNAME'
23
+ END_COLUMN = ''
24
+ end
25
+ end
@@ -0,0 +1,9 @@
1
+ module QbIif::DSL
2
+ class Paymeth < Base
3
+ HEADER_COLUMNS = [
4
+ :name
5
+ ]
6
+ START_COLUMN = 'PAYMETH'
7
+ END_COLUMN = ''
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ module QbIif::DSL
2
+ class Shipmeth < Base
3
+ HEADER_COLUMNS = [
4
+ :name
5
+ ]
6
+ START_COLUMN = 'SHIPMETH'
7
+ END_COLUMN = ''
8
+ end
9
+ end
10
+
@@ -0,0 +1,29 @@
1
+ module QbIif::DSL
2
+ class Spl < Base
3
+ HEADER_COLUMNS = [
4
+ :splid,
5
+ :trnstype,
6
+ :date,
7
+ :accnt,
8
+ :name,
9
+ :class,
10
+ :amount,
11
+ :docnum,
12
+ :memo,
13
+ :clear,
14
+ :qnty,
15
+ :price,
16
+ :invitem,
17
+ :paymeth,
18
+ :taxable,
19
+ :reimbexp,
20
+ :extra
21
+ ]
22
+ START_COLUMN = 'SPL'
23
+ END_COLUMN = ''
24
+
25
+ def headers
26
+ []
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,13 @@
1
+ module QbIif::DSL
2
+ class Terms < Base
3
+ HEADER_COLUMNS = [
4
+ :name,
5
+ :duedays,
6
+ :discper,
7
+ :discdays,
8
+ :termstype,
9
+ ]
10
+ START_COLUMN = 'TERMS'
11
+ END_COLUMN = ''
12
+ end
13
+ end
@@ -0,0 +1,17 @@
1
+ module QbIif::DSL
2
+ class Timeact < Base
3
+ HEADER_COLUMNS = [
4
+ :date,
5
+ :job,
6
+ :emp,
7
+ :item,
8
+ :pitem,
9
+ :duration,
10
+ :proj,
11
+ :note,
12
+ :billingstatus
13
+ ]
14
+ START_COLUMN = 'TIMEACT'
15
+ END_COLUMN = ''
16
+ end
17
+ end
@@ -0,0 +1,14 @@
1
+ module QbIif::DSL
2
+ class Timerhdr < Base
3
+ HEADER_COLUMNS = [
4
+ :ver,
5
+ :rel,
6
+ :companyname,
7
+ :importedbefore,
8
+ :fromtimer,
9
+ :companycreatetime
10
+ ]
11
+ START_COLUMN = 'TIMERHDR'
12
+ END_COLUMN = ''
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ module QbIif::DSL
2
+ class Todo < Base
3
+ HEADER_COLUMNS = [
4
+ :refnum,
5
+ :isdone,
6
+ :date,
7
+ :desc
8
+ ]
9
+ START_COLUMN = 'TODO'
10
+ END_COLUMN = ''
11
+ end
12
+ end