Update payment.rb

This commit is contained in:
2016-08-05 21:41:52 -04:00
committed by GitHub
parent 62fa98a656
commit b6e43b5837

View File

@@ -19,16 +19,11 @@ class Payment
def save def save
payment = Quickbooks::Model::Payment.new payment = Quickbooks::Model::Payment.new
payment.customer_id = @customer_id.to_i #Qbo.get_base(:customer).service.fetch_by_id(@customer_id) payment.customer_id = @customer_id.to_i
payment.deposit_to_account_id = @account_id.to_i #Qbo.get_base(:account).service.fetch_by_id(@account_id) payment.deposit_to_account_id = @account_id.to_i
payment.payment_method_id = @payment_method_id.to_i #Qbo.get_base(:payment_method).service.fetch_by_id(@payment_method_id) payment.payment_method_id = @payment_method_id.to_i
payment.total = @total_amount payment.total = @total_amount
Qbo.get_base(:payment).service.update(payment)
#begin
Qbo.get_base(:payment).service.update(payment)
#rescue Exception => e
# @errors.add(e.message)
#end
end end
def save! def save!
@@ -39,8 +34,4 @@ class Payment
def update_attribute def update_attribute
end end
def new
# TODO things & stuff
end
end end