Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
25c73b5a
Commit
25c73b5a
authored
Jan 08, 2019
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S13099459 # Client - Incoming Issues (raised by Client) #Coupon problem
parent
ab63f7e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
20 deletions
+6
-20
ApplyCouponFP.java
cmsWebApp/src/performa/form/ApplyCouponFP.java
+4
-3
StripeCoupon.java
cmsWebApp/src/performa/orm/StripeCoupon.java
+2
-17
No files found.
cmsWebApp/src/performa/form/ApplyCouponFP.java
View file @
25c73b5a
...
@@ -32,7 +32,7 @@ public class ApplyCouponFP extends SaveFP
...
@@ -32,7 +32,7 @@ public class ApplyCouponFP extends SaveFP
HttpServletRequest
request
=
submission
.
getRequest
();
HttpServletRequest
request
=
submission
.
getRequest
();
ObjectTransaction
objTran
=
process
.
getTransaction
();
ObjectTransaction
objTran
=
process
.
getTransaction
();
HiringTeam
hiringTeam
=
(
HiringTeam
)
process
.
getAttribute
(
"HiringTeam"
);
HiringTeam
hiringTeam
=
(
HiringTeam
)
process
.
getAttribute
(
"HiringTeam"
);
LogMgr
.
log
(
HiringTeam
.
LOG
,
LogLevel
.
PROCESSING1
,
"Inside ApplyCouponFP for "
,
hiringTeam
);
LogMgr
.
log
(
HiringTeam
.
LOG
,
LogLevel
.
PROCESSING1
,
"Inside ApplyCouponFP for "
,
hiringTeam
);
if
(
hiringTeam
.
getCoupon
()
!=
null
&&
hiringTeam
.
getCoupon
().
getCouponCode
().
equals
(
hiringTeam
.
getCouponCode
()))
if
(
hiringTeam
.
getCoupon
()
!=
null
&&
hiringTeam
.
getCoupon
().
getCouponCode
().
equals
(
hiringTeam
.
getCouponCode
()))
...
@@ -46,7 +46,8 @@ public class ApplyCouponFP extends SaveFP
...
@@ -46,7 +46,8 @@ public class ApplyCouponFP extends SaveFP
.
andCouponCode
(
new
EqualsFilter
<>(
hiringTeam
.
getCouponCode
()))
.
andCouponCode
(
new
EqualsFilter
<>(
hiringTeam
.
getCouponCode
()))
.
search
(
objTran
);
.
search
(
objTran
);
if
(
coupon
!=
null
&&
coupon
.
getValid
())
// only allowing coupons with percentage off
if
(
coupon
!=
null
&&
coupon
.
getValid
()
&&
coupon
.
getPercentOff
()
!=
null
)
{
{
StripeUtils
.
applyCoupon
(
hiringTeam
);
StripeUtils
.
applyCoupon
(
hiringTeam
);
...
@@ -81,7 +82,7 @@ public class ApplyCouponFP extends SaveFP
...
@@ -81,7 +82,7 @@ public class ApplyCouponFP extends SaveFP
hiringTeam
.
setCouponExpiryDate
(
DateDiff
.
add
(
new
Date
(),
Calendar
.
MONTH
,
stripeCoupon
.
getDurationInMonths
()));
hiringTeam
.
setCouponExpiryDate
(
DateDiff
.
add
(
new
Date
(),
Calendar
.
MONTH
,
stripeCoupon
.
getDurationInMonths
()));
}
}
hiringTeam
.
setCoupon
(
stripeCoupon
);
hiringTeam
.
setCoupon
(
stripeCoupon
);
}
}
else
else
{
{
...
...
cmsWebApp/src/performa/orm/StripeCoupon.java
View file @
25c73b5a
package
performa
.
orm
;
package
performa
.
orm
;
import
java.io.*
;
import
java.util.*
;
import
oneit.appservices.config.*
;
import
oneit.logging.*
;
import
oneit.objstore.*
;
import
oneit.utils.*
;
import
performa.orm.types.*
;
public
class
StripeCoupon
extends
BaseStripeCoupon
public
class
StripeCoupon
extends
BaseStripeCoupon
{
{
...
@@ -24,6 +10,4 @@ public class StripeCoupon extends BaseStripeCoupon
...
@@ -24,6 +10,4 @@ public class StripeCoupon extends BaseStripeCoupon
{
{
// Do not add any code to this, always put it in initialiseNewObject
// Do not add any code to this, always put it in initialiseNewObject
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment