Skip to content

Instantly share code, notes, and snippets.

@pavloo
Created November 19, 2013 10:55
Show Gist options
  • Save pavloo/7543681 to your computer and use it in GitHub Desktop.
Save pavloo/7543681 to your computer and use it in GitHub Desktop.
createRegularPayment: (period) ->
payment = @get('store').createRecord('RegularPayment',
{
period: period.period
date: period.date
})
template = @get('store').createRecord('paymentTemplate',
{
title: @get('paymentTitle')
field_value: @get('contractNumber')
payment_provider: @get('provider')
account: @get('selectedAccount')
amount: @get('amount')
currency: @get('selectedAccount.currency_iso_code')
regular_payment: payment
})
template.save()
@_resetAndRedirect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment