intacctrb 0.4 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30b63bbaba31ddbb33e76307484aacba28d123d0
4
- data.tar.gz: b9a906512745354721255a1a6c445b0bebc7d394
3
+ metadata.gz: ee9a368332271eeae712d46da16f1092c3dadc3a
4
+ data.tar.gz: 5cd70c9d0c36a56adc82c543f785c6c591783eb6
5
5
  SHA512:
6
- metadata.gz: 3c905eee5af2b696c5e4d7bcc73d443e41d0e76e84fe2ebdbc62e308724b33155ac5d220bf90dc643b5b36ee4c0275e5689851e626470d3e950428b5761127ea
7
- data.tar.gz: 229206df620b0e43979ae6473b5044b774515291fcc462a5d71148323240635f5c67d13a9a30437a822d851c13124e30d5b193cf34639f1a4bea12756b8ee169
6
+ metadata.gz: 3194f0c0a85fb73f7eb5d6de46231b513b82c9c3dcf6cf569aea6fedcfb6cf1a4fa26a940b9c820cdd59687e79b8cef7df87d472ebd0788fef30809f14247152
7
+ data.tar.gz: 16014a3f2092f1958ef9e25bfbade1d895580fceda90391c6c5ac24c482d0d88225d514d3a8123bfe458ff4a17a27613c10d52daa9861638ea5db0199a6fe391
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- intacctrb (0.4)
4
+ intacctrb (0.4.1)
5
5
  hooks
6
6
  nokogiri
7
7
 
@@ -157,8 +157,8 @@ module IntacctRB
157
157
  def je_xml xml
158
158
  xml.recordno object.intacct_id if object.intacct_id
159
159
  xml.journal object.journal_id
160
- xml.batch_date (object.date.try(:strftime, '%Y-%m-%d')) if object.date
161
- xml.reverse_date (object.reverse_date.try(:strftime, '%Y-%m-%d')) if object.reverse_date
160
+ xml.batch_date date_string(object.date) if object.date
161
+ xml.reverse_date date_string(object.reverse_date) if object.reverse_date
162
162
  xml.batch_title object.description
163
163
  xml.referenceno object.reference_number
164
164
  je_item_fields(xml)
@@ -184,5 +184,13 @@ module IntacctRB
184
184
  }
185
185
  end
186
186
 
187
+ def date_string(date)
188
+ if date.is_a?(Date) || date.is_a?(DateTime)
189
+ date.strftime('%Y-%m-%d')
190
+ elsif date.is_a? String
191
+ date
192
+ end
193
+ end
194
+
187
195
  end
188
196
  end
@@ -1,3 +1,3 @@
1
1
  module IntacctRB
2
- VERSION = "0.4"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intacctrb
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Hale