Created
November 19, 2013 10:55
-
-
Save pavloo/7543681 to your computer and use it in GitHub Desktop.
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
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