Last active
September 10, 2019 08:37
-
-
Save pythonandchips/fdf48b8a385b6f2d24e6f6d0d0fb646a to your computer and use it in GitHub Desktop.
FCB DI ISSUE FIX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This updates any bill that had incorrectly calculated vat effects | |
# when the bill was in foreign currency and was ether ec service or ec goods | |
# To be ran ater Fix PR is deployed https://github.com/fac/freeagent/pull/19751 | |
def fix_fcb_di | |
bills = Bill.in_foreign_currency.where( | |
ec_status: [EcStatus::EC_SERVICES, EcStatus::EC_GOODS] | |
) | |
progress_bar = ProgressBar.new(bills.length) | |
bills.each do |b| | |
b.update_sales_tax_effects | |
progress_bar.increment! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment