mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
[bug] unable to run task find_incoherent_invoices
This commit is contained in:
parent
47fe464954
commit
6f3a1d0c6a
@ -1,5 +1,7 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
|
- Fix a bug: unable to run task find_incoherent_invoices
|
||||||
|
|
||||||
## v4.5.5 2020 August 26
|
## v4.5.5 2020 August 26
|
||||||
|
|
||||||
- Improved portuguese translations
|
- Improved portuguese translations
|
||||||
|
@ -25,7 +25,7 @@ namespace :fablab do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
Invoice.where('created_at > ? AND stp_invoice_id IS NOT NULL', date).each do |invoice|
|
Invoice.where('created_at > ? AND stp_invoice_id IS NOT NULL', date).each do |invoice|
|
||||||
stp_invoice = Stripe::Invoice.retrieve(invoice.stp_invoice_id)
|
stp_invoice = Stripe::Invoice.retrieve(invoice.stp_invoice_id, api_key: Setting.get('stripe_secret_key'))
|
||||||
next if invoice.amount_paid == stp_invoice.total
|
next if invoice.amount_paid == stp_invoice.total
|
||||||
|
|
||||||
puts "Id: #{invoice.id}, reference: #{invoice.reference}, stripe id: #{stp_invoice.id}, " \
|
puts "Id: #{invoice.id}, reference: #{invoice.reference}, stripe id: #{stp_invoice.id}, " \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user