Fixed returned variable handling

This commit is contained in:
2023-12-30 22:53:08 -05:00
parent bf417c163c
commit 02b5fb4d0e
6 changed files with 25 additions and 29 deletions

View File

@@ -21,10 +21,10 @@ class InvoiceController < ApplicationController
def show
begin
qbo = Qbo.first
qbo.perform_authenticated_request do |access_token|
@pdf = qbo.perform_authenticated_request do |access_token|
service = Quickbooks::Service::Invoice.new(:company_id => qbo.realm_id, :access_token => access_token)
invoice = service.fetch_by_id(params[:id])
@pdf = service.pdf(invoice)
service.pdf(invoice)
end
return unless @pdf