1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

(bug) unable to decode base64 invoices logo

This commit is contained in:
Sylvain 2022-03-23 16:51:36 +01:00
parent 3f935adeb2
commit e503d28b4d
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class PDF::Invoice < Prawn::Document
# logo
img_b64 = Setting.get('invoice_logo')
begin
image StringIO.new(Base64.decode64(img_b64.value)), fit: [415, 40]
image StringIO.new(Base64.decode64(img_b64)), fit: [415, 40]
rescue StandardError => e
puts "Unable to decode invoice logo from base64: #{e}"
end

View File

@ -30,7 +30,7 @@ class PDF::PaymentSchedule < Prawn::Document
# logo
img_b64 = Setting.get('invoice_logo')
begin
image StringIO.new(Base64.decode64(img_b64.value)), fit: [415, 40]
image StringIO.new(Base64.decode64(img_b64)), fit: [415, 40]
rescue StandardError => e
puts "Unable to decode invoice logo from base64: #{e}"
end