Last active
May 24, 2022 13:56
-
-
Save philiplambok/5f78390d442c6f4ea0835570105dd4ff to your computer and use it in GitHub Desktop.
Update the legacy invoice to enable manual transfer
This file contains hidden or 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
# find the service | |
mekari_pay_addons_service = Service.find_by(name: "Jurnal Pay") | |
# find the related invoices | |
invoices = Invoice.where(service: service, status: %i[unpaid, expired], enable_manual_transfer: false) | |
# enable manual transfer for all the related invoices | |
invoices.update_all(enable_manual_transfer: true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment