Commit cd4f64c6 by Nilu

S12524060 # Client - Incoming Issues (raised by Client) #Click on Share gives error

S12525428 # Client - Incoming Issues (raised by Client) #Review button gives error - job was Draft
parent bf25423b
...@@ -106,6 +106,7 @@ public class HiringTeam extends BaseHiringTeam ...@@ -106,6 +106,7 @@ public class HiringTeam extends BaseHiringTeam
return card != null ? String.format("%02d", card.getExpMonth()) + " / " + (card.getExpYear() % 100) : ""; return card != null ? String.format("%02d", card.getExpMonth()) + " / " + (card.getExpYear() % 100) : "";
} }
@Override @Override
public Integer getUsedCredits() public Integer getUsedCredits()
{ {
...@@ -113,6 +114,13 @@ public class HiringTeam extends BaseHiringTeam ...@@ -113,6 +114,13 @@ public class HiringTeam extends BaseHiringTeam
} }
@Override
public Integer getAvailableCredits()
{
return super.getAvailableCredits()!= null ? super.getAvailableCredits() : 0;
}
public boolean hasValidCoupon() throws FieldException public boolean hasValidCoupon() throws FieldException
{ {
if(getCoupon() != null) if(getCoupon() != null)
...@@ -151,7 +159,7 @@ public class HiringTeam extends BaseHiringTeam ...@@ -151,7 +159,7 @@ public class HiringTeam extends BaseHiringTeam
{ {
if(getManageOwnBilling()) if(getManageOwnBilling())
{ {
return getAvailableCredits() > getUsedCredits() || !getHasCap() || (getHasCap() && getMaxCap() > getUsedCredits()); return getAvailableCredits() > getUsedCredits() || !getHasCap() || (getHasCap() && getMaxCap() > getUsedCredits());
} }
return getBilledByTeam().canCreateJob(); return getBilledByTeam().canCreateJob();
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
if(!billingTeam.isTrue(hiringTeam.getIsPPJ())) if(!billingTeam.isTrue(hiringTeam.getIsPPJ()))
{ {
Integer activeCount = billingTeam.getUsedCredits(); Integer activeCount = billingTeam.getUsedCredits();
Integer totCount = billingTeam.getAvailableCredits() != null ? billingTeam.getAvailableCredits() : 0; Integer totCount = billingTeam.getAvailableCredits();
Integer remCount = totCount - activeCount > 0 ? totCount - activeCount : 0; Integer remCount = totCount - activeCount > 0 ? totCount - activeCount : 0;
%> %>
<div class="space-55">You have <%= remCount %> jobs remaining for this month.</div> <div class="space-55">You have <%= remCount %> jobs remaining for this month.</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment