Skip to content

Instantly share code, notes, and snippets.

@ro-fdm
Created August 23, 2016 08:14
Show Gist options
  • Save ro-fdm/43d86c54623c745498bb0843183e6f0c to your computer and use it in GitHub Desktop.
Save ro-fdm/43d86c54623c745498bb0843183e6f0c to your computer and use it in GitHub Desktop.
crear remesa para salud por derecho con los nuevos sufijos
a = Account.find 60
ba = a.bank_accounts.find_by_code("bane5156dc1ca2bbb02ba9eb0fbfbdf")
ba.core_suffix = "002"
ba.core_presenter_suffix = "002"
ba.save
reload!
r = Remittance.find_by_code("rem52f909210c1902ff10ae24eb4273")
date_collect = Date.new(2016, 8, 19)
r.debits.each{|d| d.remittance_id = nil; d.status = "READY"; d.collect_at = date_collect; d.save}
date = r.debits.first.send_at
rs = Remittances.generate_remittances(date)
Xmls.generate_debits_transmission(rs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment