청구서 작성 오류
12997 단어 quickeebooks
묘사
안녕하세요,영수증을 만들 때 오류가 발생합니다
2:Fixnum의 정의되지 않은 메서드 "to xml"
제 창고 추적입니다.
(gem)roxml-3.3.1/lib/roxml/xml/references.rb:301:in
block (2 levels) in update_xml'
(gem) roxml-3.3.1/lib/roxml/xml/references.rb:300:in
클릭'(gem)roxml-3.3.1/lib/roxml/xml/references.rb:300:in
block in update_xml'
(gem) roxml-3.3.1/lib/roxml/xml/references.rb:291:in
클릭'(gem)roxml-3.3.1/lib/roxml/xml/references.rb:291:in
update_xml'
(gem) quickeebooks-0.1.5/lib/quickeebooks.rb:63:in
블록(2층) in to xml'(gem)quickeebooks-0.1.5/lib/quickeebooks.rb:60:in
each'
(gem) quickeebooks-0.1.5/lib/quickeebooks.rb:60:in
블록이 xml에 삽입됨(gem)quickeebooks-0.1.5/lib/quickeebooks.rb:52:in
tap'
(gem) quickeebooks-0.1.5/lib/quickeebooks.rb:52:in
to_xml'(gem)roxml-3.3.1/lib/roxml/xml/references.rb:298:in
block in update_xml'
(gem) roxml-3.3.1/lib/roxml/xml/references.rb:291:in
클릭'(gem)roxml-3.3.1/lib/roxml/xml/references.rb:291:in
update_xml'
(gem) quickeebooks-0.1.5/lib/quickeebooks.rb:63:in
블록(2층) in to xml'(gem)quickeebooks-0.1.5/lib/quickeebooks.rb:60:in
each'
(gem) quickeebooks-0.1.5/lib/quickeebooks.rb:60:in
블록이 xml에 삽입됨(gem)quickeebooks-0.1.5/lib/quickeebooks.rb:52:in
tap'
(gem) quickeebooks-0.1.5/lib/quickeebooks.rb:52:in
to_xml'(gem)quickeebooks-0.1.5/lib/quickeebooks/online/model/intuit_type.rb:32:in
to_xml_inject_ns'
(gem) quickeebooks-0.1.5/lib/quickeebooks/common/online_line_item_model_methods.rb:18:in
to_xml_ns'(gem)quickeebooks-0.1.5/lib/quickeebooks/online/service/invoice.rb:14:in
create'
app/services/quickbooks_sync.rb:82:in
블록(2등급) 수출영수증'(gem)activerecord-3.2.11/lib/active_record/relation/delegation.rb:6:in
each'
(gem) activerecord-3.2.11/lib/active_record/relation/delegation.rb:6:in
마다'애플리케이션/서비스/quickbooks\u 동기화.rb:59:in
block in export_invoices'
(gem) activerecord-3.2.11/lib/active_record/associations/collection_proxy.rb:89:in
마다'(gem)activerecord-3.2.11/lib/active_record/associations/collection_proxy.rb:89:in
method_missing'
app/services/quickbooks_sync.rb:58:in
수출영수증'어플리케이션/컨트롤러/quickbook 컨트롤러.rb:50:in
block in sync_invoices'
(gem) actionpack-3.2.11/lib/action_controller/metal/mime_responds.rb:270:in
호출(gem) actionpack-3.2.11/lib/action controller/metal/mime 응답.rb:270:in
retrieve_collector_from_mimes'
(gem) actionpack-3.2.11/lib/action_controller/metal/mime_responds.rb:194:in
회복어플리케이션/컨트롤러/quickbook 컨트롤러.rb:49:in
sync_invoices'
(gem) actionpack-3.2.11/lib/action_controller/metal/implicit_render.rb:4:in
보내기 동작'(gem)actionpack-3.2.11/lib/abstract\u controller/base.rb:167:in
process_action'
(gem) actionpack-3.2.11/lib/action_controller/metal/rendering.rb:10:in
과정 행동'(gem)actionpack-3.2.11/lib/abstract_controller/callbacks.rb:18:in
block in process_action'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:447:in
u run_uu926487399_uuprocess_uaction_uuu932969398_uucallbacks'(gem)activesupport-3.2.11/lib/active_support/callbacks.rb:405:in
__run_callback'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:385:in
_run_process_action_callbacks'(gem)activesupport-3.2.11/lib/active_support/callbacks.rb:81:in
run_callbacks'
(gem) actionpack-3.2.11/lib/abstract_controller/callbacks.rb:17:in
과정 행동'(gem)actionpack-3.2.11/lib/action_controller/metal/rescue.rb:29:in
process_action'
(gem) actionpack-3.2.11/lib/action_controller/metal/instrumentation.rb:30:in
프로세스에서 막힘 동작'(gem)activesupport-3.2.11/lib/active_support/notifications.rb:123:in
block in instrument'
(gem) activesupport-3.2.11/lib/active_support/notifications/instrumenter.rb:20:in
기기'(gem)activesupport-3.2.11/lib/active_support/notifications.rb:123:in
instrument'
(gem) actionpack-3.2.11/lib/action_controller/metal/instrumentation.rb:29:in
과정 행동'(gem)actionpack-3.2.11/lib/action_controller/metal/params_wrapper.rb:207:in
process_action'
(gem) activerecord-3.2.11/lib/active_record/railties/controller_runtime.rb:18:in
과정 행동'(gem)newrelic_rpm-3.5.8.72/lib/newrelic/agent/instrumentation/rails3/action_controller.rb:34:in
block in process_action'
(gem) newrelic_rpm-3.5.8.72/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:268:in
블록의 실행 동작(gem)newrelic_rpm-3.5.8.72/lib/newrelic/agent/method_tracer.rb:240:in
trace_execution_scoped'
(gem) newrelic_rpm-3.5.8.72/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:263:in
"신유적"으로 "행동"수행(gem)newrelic_rpm-3.5.8.72/lib/newrelic/agent/instrumentation/rails3/action_controller.rb:33:in
process_action'
(gem) actionpack-3.2.11/lib/abstract_controller/base.rb:121:in
프로세스(gem)actionpack-3.2.11/lib/abstract_controller/rendering.rb:45:in
process'
(gem) actionpack-3.2.11/lib/action_controller/metal.rb:203:in
스케줄링(gem)actionpack-3.2.11/lib/action_controller/metal/rack_delegation.rb:14:in
dispatch'
(gem) actionpack-3.2.11/lib/action_controller/metal.rb:246:in
블록이 실행 중'(gem)actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:73:in
call'
(gem) actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:73:in
스케줄링(gem)actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:36:in
call'
(gem) actionpack-3.2.11/lib/action_dispatch/routing/mapper.rb:42:in
통화'(gem) 여정 - 1.0.4/lib/journey/router.rb:68:in
block in call'
(gem) journey-1.0.4/lib/journey/router.rb:56:in
마다'(gem) 여정 - 1.0.4/lib/journey/router.rb:56:in
call'
(gem) actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:601:in
통화'(gem) newrelic rpm-3.5.8.72/lib/newrelic/rack/error 수집기.rb:8:in
call'
(gem) newrelic_rpm-3.5.8.72/lib/new_relic/rack/agent_hooks.rb:14:in
호출(gem)newrelic_rpm-3.5.8.72/lib/new_relic/rack/browser_monitoring.rb:12:in
call'
(gem) newrelic_rpm-3.5.8.72/lib/new_relic/rack/developer_mode.rb:24:in
호출(gem)better_errors-0.3.2/lib/better_errors/middleware.rb:51:in
app_call'
(gem) better_errors-0.3.2/lib/better_errors/middleware.rb:45:in
통화'(gem)bullet-4.3.1/lib/bullet/rack.rb:11:in
call'
(gem) warden-1.2.1/lib/warden/manager.rb:35:in
폐색호출'(gem)warden-1.2.1/lib/warden/manager.rb:34:in
catch'
(gem) warden-1.2.1/lib/warden/manager.rb:34:in
호출(gem)actionpack-3.2.11/lib/action_dispatch/middleware/best_standards_support.rb:17:in
call'
(gem) rack-1.4.5/lib/rack/etag.rb:23:in
호출'(gem)rack-1.4.5/lib/rack/conditionalget.rb:25:in
call'
(gem) actionpack-3.2.11/lib/action_dispatch/middleware/head.rb:14:in
호출'(gem)actionpack-3.2.11/lib/action_dispatch/middleware/params_parser.rb:21:in
call'
(gem) actionpack-3.2.11/lib/action_dispatch/middleware/flash.rb:242:in
호출'(gem)rack-1.4.5/lib/rack/session/abstract/id.rb:210:in
context'
(gem) rack-1.4.5/lib/rack/session/abstract/id.rb:205:in
call'(gem)actionpack-3.2.11/lib/action_dispatch/middleware/cookies.rb:341:in
call'
(gem) activerecord-3.2.11/lib/active_record/query_cache.rb:64:in
호출'(gem)activerecord-3.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in
call'
(gem) actionpack-3.2.11/lib/action_dispatch/middleware/callbacks.rb:28:in
폐색호출'(gem)activesupport-3.2.11/lib/active_support/callbacks.rb:405:in
_run__660557959__call__829375442__callbacks'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:405:in
uu run_ucallback'(gem)activesupport-3.2.11/lib/active_support/callbacks.rb:385:in
_run_call_callbacks'
(gem) activesupport-3.2.11/lib/active_support/callbacks.rb:81:in
실행 콜백'(gem)actionpack-3.2.11/lib/action_dispatch/middleware/callbacks.rb:27:in
call'
(gem) rails-dev-tweaks-0.6.1/lib/rails_dev_tweaks/granular_autoload/middleware.rb:34:in
호출'(gem)actionpack-3.2.11/lib/action_dispatch/middleware/remote_ip.rb:31:in
call'
(gem) airbrake-3.1.8/lib/airbrake/rails/middleware.rb:15:in
통화'(gem)actionpack-3.2.11/lib/action_dispatch/middleware/debug_exceptions.rb: 16:in
call'
(gem) actionpack-3.2.11/lib/action_dispatch/middleware/show_exceptions.rb:56:in
호출(gem)railties-3.2.11/lib/rails/rack/logger.rb:32:in
call_app'
(gem) railties-3.2.11/lib/rails/rack/logger.rb:18:in
통화'(gem)actionpack-3.2.11/lib/action_dispatch/middleware/request_id.rb:22:in
call'
(gem) rack-1.4.5/lib/rack/methodoverride.rb:21:in
call'(gem)rack-1.4.5/lib/rack/runtime.rb:17:in
call'
(gem) activesupport-3.2.11/lib/active_support/cache/strategy/local_cache.rb:72:in
호출'(gem)rack-1.4.5/lib/rack/lock.rb:15:in
call'
(gem) actionpack-3.2.11/lib/action_dispatch/middleware/static.rb:62:in
호출(gem)airbrake-3.1.8/lib/airbrake/user_informer.rb: 16:in
_call'
(gem) airbrake-3.1.8/lib/airbrake/user_informer.rb:12:in
호출(gem)railties-3.2.11/lib/rails/engine.rb:479:in
call'
(gem) railties-3.2.11/lib/rails/application.rb:223:in
호출(gem)rack-1.4.5/lib/rack/content_length.rb:14:in
call'
(gem) railties-3.2.11/lib/rails/rack/log_tailer.rb:17:in
통화'(gem)thin-1.5.0/lib/thin/connection.rb:81:in
block in pre_process'
(gem) thin-1.5.0/lib/thin/connection.rb:79:in
catch'(gem)thin-1.5.0/lib/thin/connection.rb:79:in
pre_process'
(gem) thin-1.5.0/lib/thin/connection.rb:54:in
프로세스(gem)thin-1.5.0/lib/thin/connection.rb:39:in
receive_data'
(gem) eventmachine-1.0.1/lib/eventmachine.rb:187:in
시스템 실행(gem)eventmachine-1.0.1/lib/eventmachine.rb:187:in
run'
(gem) thin-1.5.0/lib/thin/backends/base.rb:63:in
시작(gem)thin-1.5.0/lib/thin/server.rb:159:in
start'
(gem) rack-1.4.5/lib/rack/handler/thin.rb:13:in
run'(gem)rack-1.4.5/lib/rack/server.rb:268:in
start'
(gem) railties-3.2.11/lib/rails/commands/server.rb:70:in
시작(gem)railties-3.2.11/lib/rails/commands.rb:55:in
block in <top (required)>'
(gem) railties-3.2.11/lib/rails/commands.rb:50:in
클릭'(gem)railties-3.2.11/lib/rails/commands.rb:50:in
<top (required)>'
script/rails:6:in
요구 사항스크립트/rails:6:in`
이것은 나의 물건이다
<Quickeebooks::Online::Model::Invoice:0x11a9c2b4@line_items=[#<Quickeebooks::Online::Model::InvoiceLineItem:0x11e860dc@desc=“Gildan 2000-White”,@amount=#<BigD
ecimal:11e8608c、'0.1E1',9(18)>、@unit#u price=#、@saddable=true、@quantity=20>、#、@unit#u price=#\、@saddable=true、@quantity=82>,
#,@unit#u price=#\,@sadable=true,@quantity=10>,#,@unit#u price=#\,@sadable=true,@quantity=1>,@header=#,@total#u amount=#\,@sub u total#u amount=#
내가 뭘 잘못했어??제 비밀번호예요. def export_invoices(account, oauth_client)
sync = QuickbooksSync.new(account.quickbooks_token, account.quickbooks_secret)
account.customers.each do |c|
c.orders.has_line_items.each do |o|
invoice_service = Quickeebooks::Online::Service::Invoice.new
invoice_service.access_token = sync.oauth_client
invoice_service.realm_id = account.quickbooks_realm_id
invoice = Quickeebooks::Online::Model::Invoice.new
header = Quickeebooks::Online::Model::InvoiceHeader.new
header.customer_id=c.quickbooks_id
header.tax_rate=o.sales_tax
header.total_amount=o.order_total
header.sub_total_amount=o.order_subtotal
invoice.header= header
o.lineitems.each do |li|
lineitem = Quickeebooks::Online::Model::InvoiceLineItem.new
lineitem.desc=li.description2
lineitem.amount=li.price_per
lineitem.unit_price=li.unit_cost2
lineitem.taxable=li.taxable
lineitem.quantity=li.amount2
invoice.line_items << lineitem
end
puts invoice.inspect
invoice_service.create(invoice)
end
end
end
토론 #1
내가 좀 더 깊이 파헤쳤는데 실제 오류는 고객 Id=2토론 #2
를 설정하려고 했을 때인 것 같아. 어쨌든 내 잘못이야.나는 고객 id를Quickeebooks:Online::Model:::id의 형식이 아닌 정수로 설정합니다
Reference
이 문제에 관하여(청구서 작성 오류), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://github.com/ruckus/quickeebooks/issues/55
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
def export_invoices(account, oauth_client)
sync = QuickbooksSync.new(account.quickbooks_token, account.quickbooks_secret)
account.customers.each do |c|
c.orders.has_line_items.each do |o|
invoice_service = Quickeebooks::Online::Service::Invoice.new
invoice_service.access_token = sync.oauth_client
invoice_service.realm_id = account.quickbooks_realm_id
invoice = Quickeebooks::Online::Model::Invoice.new
header = Quickeebooks::Online::Model::InvoiceHeader.new
header.customer_id=c.quickbooks_id
header.tax_rate=o.sales_tax
header.total_amount=o.order_total
header.sub_total_amount=o.order_subtotal
invoice.header= header
o.lineitems.each do |li|
lineitem = Quickeebooks::Online::Model::InvoiceLineItem.new
lineitem.desc=li.description2
lineitem.amount=li.price_per
lineitem.unit_price=li.unit_cost2
lineitem.taxable=li.taxable
lineitem.quantity=li.amount2
invoice.line_items << lineitem
end
puts invoice.inspect
invoice_service.create(invoice)
end
end
end
Reference
이 문제에 관하여(청구서 작성 오류), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://github.com/ruckus/quickeebooks/issues/55텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)