mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
add vat number option to payment form
This commit is contained in:
parent
80dc2f9224
commit
97f0fad525
3 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
.form-group
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue