diff --git a/services/web/app/coffee/Features/Subscription/SubscriptionController.coffee b/services/web/app/coffee/Features/Subscription/SubscriptionController.coffee index 0669b72524..adaf8e6e65 100644 --- a/services/web/app/coffee/Features/Subscription/SubscriptionController.coffee +++ b/services/web/app/coffee/Features/Subscription/SubscriptionController.coffee @@ -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'] diff --git a/services/web/app/views/subscriptions/new.jade b/services/web/app/views/subscriptions/new.jade index e35b6da33d..7f9f3eebf4 100644 --- a/services/web/app/views/subscriptions/new.jade +++ b/services/web/app/views/subscriptions/new.jade @@ -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 .form-group diff --git a/services/web/public/coffee/main/new-subscription.coffee b/services/web/public/coffee/main/new-subscription.coffee index cb093068bc..87a80a2ce3 100644 --- a/services/web/public/coffee/main/new-subscription.coffee +++ b/services/web/public/coffee/main/new-subscription.coffee @@ -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()