@@ -63,6 +63,7 @@ module.exports = SubscriptionController =
currency: currency
subdomain: Settings.apis.recurly.subdomain
showCouponField: req.query.scf
+ showVatField: req.query.svf
couponCode: req.query.cc or ""
subscriptionFormOptions: JSON.stringify
acceptedCards: ['discover', 'mastercard', 'visa']
@@ -152,7 +152,11 @@ block content
if (showCouponField)
.form-group
input.form-control(type='text', ng-blur="applyCoupon()", ng-model="data.coupon", placeholder="#{translate('coupon')}")
-
+ .row
+ .col-md-8
+ if (showVatField)
+ .form-group
+ input.form-control(type='text', ng-blur="applyVatNumber()", ng-model="data.vat_number", placeholder="#{translate('vat_number')}")
.row
.col-xs-7
@@ -60,6 +60,10 @@ define [
$scope.applyCoupon = ->
pricing.coupon($scope.data.coupon).done()
+ $scope.applyVatNumber = ->
+ pricing.tax({tax_code: 'digital', vat_number: $scope.data.vat_number}).done()
+
$scope.changeCurrency = (newCurrency)->
$scope.currencyCode = newCurrency
pricing.currency(newCurrency).done()