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:
parent
3f935adeb2
commit
e503d28b4d
@ -27,7 +27,7 @@ class PDF::Invoice < Prawn::Document
|
|||||||
# logo
|
# logo
|
||||||
img_b64 = Setting.get('invoice_logo')
|
img_b64 = Setting.get('invoice_logo')
|
||||||
begin
|
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
|
rescue StandardError => e
|
||||||
puts "Unable to decode invoice logo from base64: #{e}"
|
puts "Unable to decode invoice logo from base64: #{e}"
|
||||||
end
|
end
|
||||||
|
@ -30,7 +30,7 @@ class PDF::PaymentSchedule < Prawn::Document
|
|||||||
# logo
|
# logo
|
||||||
img_b64 = Setting.get('invoice_logo')
|
img_b64 = Setting.get('invoice_logo')
|
||||||
begin
|
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
|
rescue StandardError => e
|
||||||
puts "Unable to decode invoice logo from base64: #{e}"
|
puts "Unable to decode invoice logo from base64: #{e}"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user