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
678e69b4
Commit
678e69b4
authored
Feb 27, 2018
by
chenith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
J006: payment plan details updated.
parent
0466906a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
32 deletions
+89
-32
SaveJobFP.java
cmsWebApp/src/performa/form/SaveJobFP.java
+1
-1
Company.java
cmsWebApp/src/performa/orm/Company.java
+31
-2
PaymentPlan.java
cmsWebApp/src/performa/orm/PaymentPlan.java
+17
-1
common.css
cmsWebApp/webroot/css/common.css
+9
-1
job_payment.jsp
cmsWebApp/webroot/extensions/adminportal/job_payment.jsp
+31
-27
No files found.
cmsWebApp/src/performa/form/SaveJobFP.java
View file @
678e69b4
...
...
@@ -108,7 +108,7 @@ public class SaveJobFP extends SaveFP
CompanyUser
companyUser
=
loggedInUser
.
getExtension
(
CompanyUser
.
REFERENCE_CompanyUser
);
Company
company
=
companyUser
.
getCompany
();
BusinessObjectParser
.
assertFieldCondition
(
company
.
get
PaymentPlan
()
!=
null
,
job
,
Company
.
SINGLEREFERENCE_PaymentPlan
,
"mandatory"
,
exceptions
,
true
,
request
);
BusinessObjectParser
.
assertFieldCondition
(
company
.
get
SelectedPaymentPlan
()
!=
null
,
job
,
Company
.
SINGLEREFERENCE_PaymentPlan
,
"mandatory"
,
exceptions
,
true
,
request
);
}
super
.
validate
(
process
,
submission
,
exceptions
,
params
);
...
...
cmsWebApp/src/performa/orm/Company.java
View file @
678e69b4
...
...
@@ -8,6 +8,7 @@ import oneit.objstore.rdbms.filters.IsNotNullFilter;
import
oneit.security.SecUser
;
import
oneit.utils.CollectionUtils
;
import
oneit.utils.StringUtils
;
import
oneit.utils.math.NullArith
;
import
oneit.utils.parsers.FieldException
;
...
...
@@ -97,9 +98,37 @@ public class Company extends BaseCompany
public
Double
getPaymentPlanAmount
()
{
if
(
getSelectedPaymentPlan
()!=
null
)
PaymentPlan
selectedPaymentPlan
=
getSelectedPaymentPlan
();
if
(
selectedPaymentPlan
!=
null
)
{
return
selectedPaymentPlan
.
getAmount
();
}
return
null
;
}
public
Double
getPerJobPaymentPlanAmount
()
{
PaymentPlan
selectedPaymentPlan
=
getSelectedPaymentPlan
();
if
(
selectedPaymentPlan
!=
null
)
{
return
NullArith
.
divide
(
selectedPaymentPlan
.
getAmount
(),
selectedPaymentPlan
.
getActiveJobCount
());
}
return
null
;
}
public
Double
getPaymentPlanSaveAmount
()
{
PaymentPlan
selectedPaymentPlan
=
getSelectedPaymentPlan
();
if
(
selectedPaymentPlan
!=
null
)
{
return
getSelectedPaymentPlan
().
get
Amount
();
return
selectedPaymentPlan
.
getPerMonthSave
Amount
();
}
return
null
;
...
...
cmsWebApp/src/performa/orm/PaymentPlan.java
View file @
678e69b4
package
performa
.
orm
;
import
oneit.utils.math.NullArith
;
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
;
// This constructor should not be called
public
PaymentPlan
()
...
...
@@ -11,6 +14,7 @@ public class PaymentPlan extends BasePaymentPlan
// Do not add any code to this, always put it in initialiseNewObject
}
@Override
public
String
getToString
()
{
...
...
@@ -21,4 +25,15 @@ public class PaymentPlan extends BasePaymentPlan
return
super
.
getToString
();
}
public
Double
getPerMonthSaveAmount
()
{
if
(
getActiveJobCount
()!=
null
)
{
return
NullArith
.
subtract
(
NullArith
.
multiply
(
getActiveJobCount
(),
PER_PER_JOB_AMOUNT
,
0
D
),
getAmount
(),
0
D
);
}
return
null
;
}
}
\ No newline at end of file
cmsWebApp/webroot/css/common.css
View file @
678e69b4
...
...
@@ -5983,7 +5983,7 @@ input{
font-family
:
"Usual-Light"
;
font-size
:
40px
;
font-weight
:
300
;
/*line-height: 48px;*/
display
:
inline-block
;
text-align
:
center
;
}
...
...
@@ -5997,6 +5997,10 @@ input{
color
:
#8D8D8D
;
font-family
:
"Usual-Light"
;
font-size
:
12px
;
display
:
inline-block
;
text-align
:
left
;
vertical-align
:
middle
;
margin-right
:
6px
;
}
.per-job
{
...
...
@@ -6047,4 +6051,7 @@ input{
.payment-paln-count
{
width
:
75px
;
font-size
:
24px
;
text-align
:
center
;
margin-top
:
6px
;
}
\ No newline at end of file
cmsWebApp/webroot/extensions/adminportal/job_payment.jsp
View file @
678e69b4
...
...
@@ -56,22 +56,18 @@
<p>Hire for any role, save up to $995.00 / mo</p>
</div>
<div class="a-label-row payment-type-row">
<div class="col-md-2 col-sm-2 col-xs-2 text-right">
</div>
<div class="col-md-2 col-sm-2 col-xs-2 text-right">
<div class="col-md-6 col-sm-6 col-xs-6 text-right">
<div class="active-jobs-per-mont">
Active Jobs Per Month
</div>
</div>
<div class="col-md-2 col-sm-2 col-xs-2">
<oneit:ormInput type="number" obj="<%= company %>" attributeName="PaymentJobCount"
min="<%= minCount %>" max="<%= maxCount %>" step="1" cssClass="
form-control
payment-paln-count"/>
min="<%= minCount %>" max="<%= maxCount %>" step="1" cssClass="payment-paln-count"/>
</div>
<div class="col-md-
4 col-sm-4 col-xs-4 text-righ
t">
<oneit:recalcClass htmlTag="span" classScript="company.getPaymentPlanAmount()!=null ? 'show': 'hide'" company="<%= company %>">
<div class="col-md-
6 col-sm-6 col-xs-6 text-lef
t">
<oneit:recalcClass htmlTag="span" classScript="company.getP
erJobP
aymentPlanAmount()!=null ? 'show': 'hide'" company="<%= company %>">
<div >
<span class="payment-amt text-right">
<oneit:recalc mode="Currency" script="company.getPaymentPlanAmount()" company="<%= company %>" nullValue=""/>
<oneit:recalc mode="Currency" script="company.getP
erJobP
aymentPlanAmount()" company="<%= company %>" nullValue=""/>
</span>
<span class="text-left">
<p class="per-job">
...
...
@@ -80,28 +76,36 @@
</span>
</div>
</oneit:recalcClass>
</div>
<div class="col-md-2 col-sm-2 col-xs-2 text-right">
</div>
</div>
<div class="a-label-row text-center">
<oneit:button value="Select Plan" name="saveJob" cssClass="btn btn-primary largeBtn btn-green"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry ("fromPage", fromPage)
.mapEntry("JobStatus", JobStatus.OPEN)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry ("attribNamesToRestore", Collections.singleton("Job"))
.toMap() %>" />
</div>
<div class="a-label-row text-center">
<div class="col-md-4 col-sm-4 col-xs-4">
</div>
<div class="col-md-4 col-sm-4 col-xs-4 payment-job-det text-center">
$1500.00 Monthly for up to 5 jobs / month Save $995.00 per month
<oneit:recalcClass htmlTag="span" classScript="company.getPaymentPlanAmount()!=null ? 'show': 'hide'" company="<%= company %>">
<div class="a-label-row text-center">
<oneit:button value="Select Plan" name="saveJob" cssClass="btn btn-primary largeBtn btn-green"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry ("fromPage", fromPage)
.mapEntry("JobStatus", JobStatus.OPEN)
.mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry ("attribNamesToRestore", Collections.singleton("Job"))
.toMap() %>" />
</div>
<div class="col-md-4 col-sm-4 col-xs-4">
<div class="a-label-row text-center">
<div class="col-md-4 col-sm-4 col-xs-4">
</div>
<div class="col-md-4 col-sm-4 col-xs-4 payment-job-det text-center">
<oneit:toString value="<%= PaymentPlan.PER_PER_JOB_AMOUNT %>" mode="Currency"/>
Monthly for up to
<oneit:recalc mode="EscapeHTML" script="company.getPaymentJobCount()" company="<%= company %>" nullValue=""/>
jobs / month
Save
<oneit:recalc mode="Currency" script="company.getPaymentPlanSaveAmount()" company="<%= company %>" nullValue=""/>
per month
</div>
<div class="col-md-4 col-sm-4 col-xs-4">
</div>
</div>
</
div
>
</
oneit:recalcClass
>
</div>
<div class="form-page-area payment-optio-sep">
...
...
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