Skip to content

Instantly share code, notes, and snippets.

@gtan66
Created August 26, 2015 18:42
Show Gist options
  • Save gtan66/0a52e6a5a5c69c134fb1 to your computer and use it in GitHub Desktop.
Save gtan66/0a52e6a5a5c69c134fb1 to your computer and use it in GitHub Desktop.
cancel move in with already charged SD
p = PrimaryReservation.where(account_id: 7442, office_num: "1018")
p.started_on = p.started_on.last_month
p.save
ReservationService.new.move_out!(p, Date.now, "Move Out")
i = p.last.invoices.last
i.without_versioning :destroy
i.versions.each(&:delete)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment