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
875cd680
Commit
875cd680
authored
Nov 05, 2018
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPJ discounts and payments
parent
08b9f5b8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
14 deletions
+40
-14
MakePaymentFP.java
cmsWebApp/src/performa/form/MakePaymentFP.java
+1
-2
HiringTeam.java
cmsWebApp/src/performa/orm/HiringTeam.java
+9
-0
PaymentPlan.java
cmsWebApp/src/performa/orm/PaymentPlan.java
+2
-1
created_job.jsp
cmsWebApp/webroot/extensions/adminportal/created_job.jsp
+13
-6
job_review_submit.jsp
...bApp/webroot/extensions/adminportal/job_review_submit.jsp
+4
-1
manage_plan.jsp
cmsWebApp/webroot/extensions/adminportal/manage_plan.jsp
+11
-4
No files found.
cmsWebApp/src/performa/form/MakePaymentFP.java
View file @
875cd680
...
@@ -25,7 +25,6 @@ import performa.orm.Company;
...
@@ -25,7 +25,6 @@ import performa.orm.Company;
import
performa.orm.CompanyUser
;
import
performa.orm.CompanyUser
;
import
performa.orm.HiringTeam
;
import
performa.orm.HiringTeam
;
import
performa.orm.Job
;
import
performa.orm.Job
;
import
performa.orm.types.AssessmentType
;
import
performa.orm.types.JobStatus
;
import
performa.orm.types.JobStatus
;
import
performa.utils.StripeUtils
;
import
performa.utils.StripeUtils
;
...
@@ -67,7 +66,7 @@ public class MakePaymentFP extends SaveFP
...
@@ -67,7 +66,7 @@ public class MakePaymentFP extends SaveFP
try
try
{
{
Map
<
String
,
Object
>
chargeParams
=
new
HashMap
<>();
Map
<
String
,
Object
>
chargeParams
=
new
HashMap
<>();
chargeParams
.
put
(
"amount"
,
NullArith
.
intVal
(
NullArith
.
multiply
(
job
.
getAssessmentType
()
==
AssessmentType
.
COMPREHENSIVE
?
499.0
:
399.0
,
100
,
0
d
)));
chargeParams
.
put
(
"amount"
,
NullArith
.
intVal
(
NullArith
.
multiply
(
hiringTeam
.
getPPJAmount
(
job
)
,
100
,
0
d
)));
chargeParams
.
put
(
"currency"
,
"aud"
);
chargeParams
.
put
(
"currency"
,
"aud"
);
chargeParams
.
put
(
"description"
,
"Charges of creating job"
);
chargeParams
.
put
(
"description"
,
"Charges of creating job"
);
chargeParams
.
put
(
"customer"
,
hiringTeam
.
getStripeReference
());
chargeParams
.
put
(
"customer"
,
hiringTeam
.
getStripeReference
());
...
...
cmsWebApp/src/performa/orm/HiringTeam.java
View file @
875cd680
...
@@ -12,6 +12,7 @@ import oneit.utils.DateDiff;
...
@@ -12,6 +12,7 @@ import oneit.utils.DateDiff;
import
oneit.utils.StringUtils
;
import
oneit.utils.StringUtils
;
import
oneit.utils.filter.Filter
;
import
oneit.utils.filter.Filter
;
import
oneit.utils.parsers.FieldException
;
import
oneit.utils.parsers.FieldException
;
import
performa.orm.types.AssessmentType
;
import
performa.utils.StripeUtils
;
import
performa.utils.StripeUtils
;
...
@@ -177,4 +178,11 @@ public class HiringTeam extends BaseHiringTeam
...
@@ -177,4 +178,11 @@ public class HiringTeam extends BaseHiringTeam
return
super
.
getWriteability_ManageOwnBilling
();
return
super
.
getWriteability_ManageOwnBilling
();
}
}
public
Double
getPPJAmount
(
Job
job
)
{
double
amount
=
job
!=
null
?
(
job
.
getAssessmentType
()
==
AssessmentType
.
COMPREHENSIVE
?
PaymentPlan
.
PER_PER_JOB_AMOUNT
:
PaymentPlan
.
PER_PER_JOB_EXPRESS
)
:
PaymentPlan
.
PER_PER_JOB_AMOUNT
;
return
amount
*
(
getCoupon
()
!=
null
?
(
100
-
getCoupon
().
getPercentageOff
())
*
0.01
:
1
);
}
}
}
\ No newline at end of file
cmsWebApp/src/performa/orm/PaymentPlan.java
View file @
875cd680
...
@@ -6,7 +6,8 @@ import oneit.utils.math.NullArith;
...
@@ -6,7 +6,8 @@ import oneit.utils.math.NullArith;
public
class
PaymentPlan
extends
BasePaymentPlan
public
class
PaymentPlan
extends
BasePaymentPlan
{
{
private
static
final
long
serialVersionUID
=
0L
;
private
static
final
long
serialVersionUID
=
0L
;
public
static
final
Double
PER_PER_JOB_AMOUNT
=
499
D
;
public
static
final
Double
PER_PER_JOB_AMOUNT
=
385
D
;
public
static
final
Double
PER_PER_JOB_EXPRESS
=
285
D
;
// This constructor should not be called
// This constructor should not be called
public
PaymentPlan
()
public
PaymentPlan
()
...
...
cmsWebApp/webroot/extensions/adminportal/created_job.jsp
View file @
875cd680
...
@@ -17,11 +17,8 @@
...
@@ -17,11 +17,8 @@
boolean fromJob = request.getParameter("fromJob") != null ? Boolean.parseBoolean(request.getParameter("fromJob")) : false;
boolean fromJob = request.getParameter("fromJob") != null ? Boolean.parseBoolean(request.getParameter("fromJob")) : false;
String nextPage = WebUtils.getSamePageInRenderMode(request, (fromJob ? "Page" : WebUtils.VIEW_APPLICANTS));
String nextPage = WebUtils.getSamePageInRenderMode(request, (fromJob ? "Page" : WebUtils.VIEW_APPLICANTS));
HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam hiringTeam = job.getHiringTeam();
HiringTeam billlingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
HiringTeam billingTeam = hiringTeam.getManageOwnBilling() ? hiringTeam : hiringTeam.getBilledByTeam();
Integer activeCount = billlingTeam.getUsedCredits();
Integer totCount = billlingTeam.getAvailableCredits();
Integer remCount = (totCount - activeCount) > 0 ? (totCount - activeCount) : 0;
%>
%>
<script>
<script>
function copyToClipboard() {
function copyToClipboard() {
...
@@ -76,7 +73,17 @@
...
@@ -76,7 +73,17 @@
<oneit:button value="<%= "Go to Job" + (fromJob ? "s" : "")%>" name="gotoPage" cssClass="btn btn-primary largeBtn"
<oneit:button value="<%= "Go to Job" + (fromJob ? "s" : "")%>" name="gotoPage" cssClass="btn btn-primary largeBtn"
requestAttribs='<%= CollectionUtils.mapEntry("nextPage", nextPage).toMap() %>'/>
requestAttribs='<%= CollectionUtils.mapEntry("nextPage", nextPage).toMap() %>'/>
</div>
</div>
<div class="space-55">You have <%= remCount %> jobs remaining for this month.</div>
<%
if(!billingTeam.isTrue(hiringTeam.getIsPPJ()))
{
Integer activeCount = billingTeam.getUsedCredits();
Integer totCount = billingTeam.getAvailableCredits();
Integer remCount = (totCount - activeCount) > 0 ? (totCount - activeCount) : 0;
%>
<div class="space-55">You have <%= remCount %> jobs remaining for this month.</div>
<%
}
%>
</div>
</div>
<div class="job-desc-box">
<div class="job-desc-box">
...
...
cmsWebApp/webroot/extensions/adminportal/job_review_submit.jsp
View file @
875cd680
...
@@ -364,7 +364,10 @@
...
@@ -364,7 +364,10 @@
{
{
%>
%>
<oneit:button value="Open this Job" name="savePayment" cssClass="btn btn-primary btn-green top-margin-25 largeBtn"
<oneit:button value="Open this Job" name="savePayment" cssClass="btn btn-primary btn-green top-margin-25 largeBtn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", sharingPage).toMap() %>" />
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", sharingPage)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry ("attribNamesToRestore", Collections.singleton("Job"))
.toMap() %>" />
<%
<%
}
}
else if(billlingTeam.canCreateJob())
else if(billlingTeam.canCreateJob())
...
...
cmsWebApp/webroot/extensions/adminportal/manage_plan.jsp
View file @
875cd680
...
@@ -168,11 +168,18 @@
...
@@ -168,11 +168,18 @@
</div>
</div>
<div class="manage-plan-payplan">
<div class="manage-plan-payplan">
<div class="per-job-amount">
<div class="per-job-amount">
<oneit:toString value="<%= PaymentPlan.PER_PER_JOB_AMOUNT %>" mode="CurrencyDollarsOnly"/>/ Job
<oneit:toString value="<%= hiringTeam.getPPJAmount(null) %>" mode="CurrencyDollarsOnly"/>/ Job
</div>
<div class="per-job-amount-past">
was <oneit:toString value="<%= PaymentPlan.PER_PER_JOB_AMOUNT %>" mode="CurrencyDollarsOnly"/> per job
</div>
</div>
<%
if(hasValidCoupon)
{
%>
<div class="per-job-amount-past">
was <oneit:toString value="<%= PaymentPlan.PER_PER_JOB_AMOUNT %>" mode="CurrencyDollarsOnly"/> per job
</div>
<%
}
%>
</div>
</div>
<div class="clearboth"></div>
<div class="clearboth"></div>
</div>
</div>
...
...
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