Commit a599586699e3125742d5aebc24021a8bbe246867
1 parent
f837d2291a
Exists in
master
add total amount
Showing
3 changed files
with
45 additions
and
9 deletions
Show diff stats
css/custom.css
... | ... | @@ -1111,7 +1111,7 @@ input.hidden { |
1111 | 1111 | } |
1112 | 1112 | .apply-coupen-btn{ |
1113 | 1113 | position: absolute; |
1114 | - bottom: 97px; | |
1114 | + bottom: 117px; | |
1115 | 1115 | right: 13px; |
1116 | 1116 | border: none; |
1117 | 1117 | border-radius: 1px; |
... | ... | @@ -1123,7 +1123,7 @@ input.hidden { |
1123 | 1123 | .coupen-approved{ |
1124 | 1124 | position: absolute; |
1125 | 1125 | right: 86px;; |
1126 | - bottom: 98px; | |
1126 | + bottom: 118px; | |
1127 | 1127 | color: rgb(66, 181, 73); |
1128 | 1128 | font-size: 30px !important; |
1129 | 1129 | } | ... | ... |
pages/registration.html
... | ... | @@ -133,7 +133,9 @@ |
133 | 133 | </div> |
134 | 134 | <div class=form-group-text> |
135 | 135 | Fields marked with "<b>*</b>" are mandatory. |
136 | - <!-- * Total Amount: ₹{{ticketAmnt}} --> | |
136 | + </div> | |
137 | + <div class=form-group-text> | |
138 | + * Total Amount: ₹{{payingAmnt}} | |
137 | 139 | </div> |
138 | 140 | </div> |
139 | 141 | <div class="clearfix"></div> | ... | ... |
script.js
... | ... | @@ -750,7 +750,7 @@ |
750 | 750 | $scope.ngShow = false; |
751 | 751 | } |
752 | 752 | } |
753 | - | |
753 | + $scope.payingAmnt = 1180; | |
754 | 754 | $rootScope.tokenCall = function(val) { |
755 | 755 | if (val == undefined) { |
756 | 756 | $('#invalidToken').css('display', 'block'); |
... | ... | @@ -764,11 +764,25 @@ |
764 | 764 | .then(function(searchResult) { |
765 | 765 | if (searchResult.data.length == 0) { |
766 | 766 | $scope.tokencheck = false; |
767 | - $scope.discountAmount = 0; | |
767 | + $scope.discountAmount = 0; | |
768 | + | |
768 | 769 | } else { |
769 | 770 | $scope.discountpercentage = searchResult.data[0].discount; |
770 | - $scope.tokencheck = true; | |
771 | - } | |
771 | + $scope.tokencheck = true; | |
772 | + } | |
773 | + $scope.ticketAmnt = 1180; | |
774 | + var amount = $scope.ticketAmnt * 100 | |
775 | + if($scope.tokencheck == true){ | |
776 | + var amount = $scope.ticketAmnt | |
777 | + if($scope.discountpercentage == "100") { | |
778 | + $scope.discountpercentage = "99.9"; | |
779 | + } | |
780 | + $scope.percDiscount = $scope.discountpercentage/100; | |
781 | + $scope.discountAmount = amount * $scope.percDiscount; | |
782 | + } | |
783 | + var taxAmount = $scope.ticketAmnt - $scope.discountAmount | |
784 | + $scope.payingAmnt = taxAmount; | |
785 | + $scope.payingAmnt = $scope.payingAmnt.toFixed() | |
772 | 786 | },function(err){ |
773 | 787 | console.log(err) |
774 | 788 | }); |
... | ... | @@ -909,6 +923,26 @@ |
909 | 923 | |
910 | 924 | // } |
911 | 925 | // }else{ |
926 | + // $scope.ticketAmnt = 1180; | |
927 | + // var amount = $scope.ticketAmnt * 100 | |
928 | + // console.log("amount",amount) | |
929 | + // console.log("amount",$scope.tokencheck) | |
930 | + // if($scope.tokencheck == true){ | |
931 | + // var amount = $scope.ticketAmnt | |
932 | + // console.log("amount",amount) | |
933 | + // if($scope.discountpercentage == "100") { | |
934 | + // $scope.discountpercentage = "99.9"; | |
935 | + // } | |
936 | + // $scope.percDiscount = $scope.discountpercentage/100; | |
937 | + // console.log("$scope.percDiscount",$scope.percDiscount) | |
938 | + // $scope.discountAmount = amount * $scope.percDiscount; | |
939 | + // } | |
940 | + // console.log("$scope.discountAmount",$scope.discountAmount) | |
941 | + // var taxAmount = $scope.ticketAmnt - $scope.discountAmount | |
942 | + // console.log("taxAmount",taxAmount) | |
943 | + // $scope.payingAmnt = taxAmount; | |
944 | + // $scope.payingAmnt = $scope.payingAmnt.toFixed() | |
945 | + | |
912 | 946 | $scope.submit = function() { |
913 | 947 | Analytics.trackEvent('register', 'click', 'Registration'); |
914 | 948 | $scope.loading = true; |
... | ... | @@ -983,11 +1017,11 @@ |
983 | 1017 | }); |
984 | 1018 | } |
985 | 1019 | var i = 0; |
986 | - $scope.payingAmnt = $scope.payingAmnt * 100; | |
1020 | + $scope.payingAmntt = $scope.payingAmnt * 100; | |
987 | 1021 | var options = { |
988 | 1022 | //"key": "rzp_test_YwHsVFiDIQ2WUQ", |
989 | 1023 | "key": "rzp_live_mkmCb4FkstuWaS", |
990 | - "amount": $scope.payingAmnt, | |
1024 | + "amount": $scope.payingAmntt, | |
991 | 1025 | |
992 | 1026 | "name": "Startup Jalsa", |
993 | 1027 | "description":"amount", | ... | ... |