lib/intacctrb/journal_entry.rb in intacctrb-0.2pre vs lib/intacctrb/journal_entry.rb in intacctrb-0.2.1pre
- old
+ new
@@ -29,21 +29,21 @@
end
successful?
end
- def delete
- # return false unless object.payment.intacct_system_id.present?
- send_xml('delete') do |xml|
- xml.function(controlid: "1") {
- xml.delete_bill(externalkey: "false", key: object.intacct_key)
- }
- end
+ # def delete
+ # # return false unless object.payment.intacct_system_id.present?
+ # send_xml('delete') do |xml|
+ # xml.function(controlid: "1") {
+ # xml.delete_bill(externalkey: "false", key: object.intacct_key)
+ # }
+ # end
+ #
+ # successful?
+ # end
- successful?
- end
-
def get_list(options = {})
send_xml('readByQuery') do |xml|
xml.function(controlid: "f4") {
xml.readByQuery {
xml.object "glbatch"
@@ -82,11 +82,11 @@
def get(options = {})
send_xml('read') do |xml|
xml.function(controlid: "f4") {
xml.read {
xml.object "glbatch"
- xml.keys object.intacct_id || options[:intact_id]
+ xml.keys object.try(:intacct_id) || options[:intacct_id]
if options[:fields]
xml.fields {
fields.each do |field|
xml.field field.to_s
end
@@ -166,24 +166,23 @@
def je_item_fields xml
xml.entries {
object.rows.each do |row|
xml.glentry {
- puts "row[:specialty_id]: #{row[:specialty_id]}"
xml.tr_type row[:type]
xml.amount row[:amount]
xml.accountno row[:account_number]
xml.description row[:memo]
xml.location row[:location_id] if row[:location_id]
xml.department row[:department_id] if row[:department_id]
xml.customer row[:customer_id] if row[:customer_id]
xml.employee row[:employee_id] if row[:employee_id]
xml.project row[:project_id] if row[:project_id]
- xml.specialty row[:specialty_id] if row[:specialty_id]
xml.item row[:item_id] if row[:itemid]
- xml.class row[:class_id] if row[:class_id]
+ xml.classid row[:class_id] if row[:class_id]
}
end
}
end
+
end
end