Commit 3d48ef86 by nilu

S21294007 # Client - Incoming Issues (raised by Client) #Free Trial

parent 4ab4a41c
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<column name="last_plan_amount" type="Double" nullable="true"/> <column name="last_plan_amount" type="Double" nullable="true"/>
<column name="google_address_text" type="String" nullable="true" length="300"/> <column name="google_address_text" type="String" nullable="true" length="300"/>
<column name="plan_cancelled" type="Boolean" nullable="true"/> <column name="plan_cancelled" type="Boolean" nullable="true"/>
<column name="on_trial" type="Boolean" nullable="true"/>
<column name="company_id" type="Long" length="11" nullable="false"/> <column name="company_id" type="Long" length="11" nullable="false"/>
<column name="billing_team_id" type="Long" length="11" nullable="true"/> <column name="billing_team_id" type="Long" length="11" nullable="true"/>
<column name="added_by_user_id" type="Long" length="11" nullable="false"/> <column name="added_by_user_id" type="Long" length="11" nullable="false"/>
......
...@@ -36,6 +36,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -36,6 +36,7 @@ CREATE TABLE tl_hiring_team (
last_plan_amount numeric(20,5) NULL, last_plan_amount numeric(20,5) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NULL,
plan_cancelled char(1) NULL, plan_cancelled char(1) NULL,
on_trial char(1) NULL,
company_id numeric(12) NOT NULL, company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL, billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL, added_by_user_id numeric(12) NOT NULL,
......
...@@ -37,6 +37,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -37,6 +37,7 @@ CREATE TABLE tl_hiring_team (
last_plan_amount number(20,5) NULL, last_plan_amount number(20,5) NULL,
google_address_text varchar2(300) NULL, google_address_text varchar2(300) NULL,
plan_cancelled char(1) NULL, plan_cancelled char(1) NULL,
on_trial char(1) NULL,
company_id number(12) NOT NULL, company_id number(12) NOT NULL,
billing_team_id number(12) NULL, billing_team_id number(12) NULL,
added_by_user_id number(12) NOT NULL, added_by_user_id number(12) NOT NULL,
......
...@@ -37,6 +37,7 @@ CREATE TABLE tl_hiring_team ( ...@@ -37,6 +37,7 @@ CREATE TABLE tl_hiring_team (
last_plan_amount numeric(20,5) NULL, last_plan_amount numeric(20,5) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NULL,
plan_cancelled char(1) NULL, plan_cancelled char(1) NULL,
on_trial char(1) NULL,
company_id numeric(12) NOT NULL, company_id numeric(12) NOT NULL,
billing_team_id numeric(12) NULL, billing_team_id numeric(12) NULL,
added_by_user_id numeric(12) NOT NULL, added_by_user_id numeric(12) NOT NULL,
......
...@@ -70,6 +70,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -70,6 +70,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public static final String FIELD_LastPlanAmount = "LastPlanAmount"; public static final String FIELD_LastPlanAmount = "LastPlanAmount";
public static final String FIELD_GoogleAddressText = "GoogleAddressText"; public static final String FIELD_GoogleAddressText = "GoogleAddressText";
public static final String FIELD_PlanCancelled = "PlanCancelled"; public static final String FIELD_PlanCancelled = "PlanCancelled";
public static final String FIELD_OnTrial = "OnTrial";
public static final String FIELD_IsLogoDeleted = "IsLogoDeleted"; public static final String FIELD_IsLogoDeleted = "IsLogoDeleted";
public static final String FIELD_CouponCode = "CouponCode"; public static final String FIELD_CouponCode = "CouponCode";
public static final String FIELD_StripeBrand = "StripeBrand"; public static final String FIELD_StripeBrand = "StripeBrand";
...@@ -122,6 +123,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -122,6 +123,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final DefaultAttributeHelper<HiringTeam> HELPER_LastPlanAmount = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_LastPlanAmount = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_PlanCancelled = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_PlanCancelled = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_OnTrial = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_IsLogoDeleted = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_IsLogoDeleted = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_CouponCode = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_CouponCode = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_StripeBrand = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_StripeBrand = DefaultAttributeHelper.INSTANCE;
...@@ -157,6 +159,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -157,6 +159,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private Double _LastPlanAmount; private Double _LastPlanAmount;
private String _GoogleAddressText; private String _GoogleAddressText;
private Boolean _PlanCancelled; private Boolean _PlanCancelled;
private Boolean _OnTrial;
private Boolean _IsLogoDeleted; private Boolean _IsLogoDeleted;
private String _CouponCode; private String _CouponCode;
private String _StripeBrand; private String _StripeBrand;
...@@ -213,6 +216,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -213,6 +216,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final AttributeValidator[] FIELD_LastPlanAmount_Validators; private static final AttributeValidator[] FIELD_LastPlanAmount_Validators;
private static final AttributeValidator[] FIELD_GoogleAddressText_Validators; private static final AttributeValidator[] FIELD_GoogleAddressText_Validators;
private static final AttributeValidator[] FIELD_PlanCancelled_Validators; private static final AttributeValidator[] FIELD_PlanCancelled_Validators;
private static final AttributeValidator[] FIELD_OnTrial_Validators;
// Arrays of behaviour decorators // Arrays of behaviour decorators
...@@ -271,6 +275,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -271,6 +275,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
FIELD_LastPlanAmount_Validators = (AttributeValidator[])setupAttribMetaData_LastPlanAmount(validatorMapping).toArray (new AttributeValidator[0]); FIELD_LastPlanAmount_Validators = (AttributeValidator[])setupAttribMetaData_LastPlanAmount(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_GoogleAddressText_Validators = (AttributeValidator[])setupAttribMetaData_GoogleAddressText(validatorMapping).toArray (new AttributeValidator[0]); FIELD_GoogleAddressText_Validators = (AttributeValidator[])setupAttribMetaData_GoogleAddressText(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_PlanCancelled_Validators = (AttributeValidator[])setupAttribMetaData_PlanCancelled(validatorMapping).toArray (new AttributeValidator[0]); FIELD_PlanCancelled_Validators = (AttributeValidator[])setupAttribMetaData_PlanCancelled(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_OnTrial_Validators = (AttributeValidator[])setupAttribMetaData_OnTrial(validatorMapping).toArray (new AttributeValidator[0]);
REFERENCE_HiringTeam.initialiseReference (); REFERENCE_HiringTeam.initialiseReference ();
...@@ -1014,6 +1019,25 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -1014,6 +1019,25 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return validators; return validators;
} }
// Meta Info setup
private static List setupAttribMetaData_OnTrial(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "on_trial");
metaInfo.put ("defaultValue", "Boolean.TRUE");
metaInfo.put ("name", "OnTrial");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.OnTrial:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_OnTrial, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "OnTrial", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.OnTrial:", validators);
return validators;
}
// END OF STATIC METADATA DEFINITION // END OF STATIC METADATA DEFINITION
...@@ -1069,6 +1093,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -1069,6 +1093,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_LastPlanAmount = (Double)(HELPER_LastPlanAmount.initialise (_LastPlanAmount)); _LastPlanAmount = (Double)(HELPER_LastPlanAmount.initialise (_LastPlanAmount));
_GoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (_GoogleAddressText)); _GoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (_GoogleAddressText));
_PlanCancelled = (Boolean)(Boolean.FALSE); _PlanCancelled = (Boolean)(Boolean.FALSE);
_OnTrial = (Boolean)(Boolean.TRUE);
_IsLogoDeleted = (Boolean)(Boolean.FALSE); _IsLogoDeleted = (Boolean)(Boolean.FALSE);
_CouponCode = (String)(HELPER_CouponCode.initialise (_CouponCode)); _CouponCode = (String)(HELPER_CouponCode.initialise (_CouponCode));
_StripeBrand = (String)(HELPER_StripeBrand.initialise (_StripeBrand)); _StripeBrand = (String)(HELPER_StripeBrand.initialise (_StripeBrand));
...@@ -3859,6 +3884,104 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -3859,6 +3884,104 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
/** /**
* Get the attribute OnTrial
*/
public Boolean getOnTrial ()
{
assertValid();
Boolean valToReturn = _OnTrial;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getOnTrial ((HiringTeam)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preOnTrialChange (Boolean newOnTrial) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postOnTrialChange () throws FieldException
{
}
public FieldWriteability getWriteability_OnTrial ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute OnTrial. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setOnTrial (Boolean newOnTrial) throws FieldException
{
boolean oldAndNewIdentical = HELPER_OnTrial.compare (_OnTrial, newOnTrial);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newOnTrial = bhd.setOnTrial ((HiringTeam)this, newOnTrial);
oldAndNewIdentical = HELPER_OnTrial.compare (_OnTrial, newOnTrial);
}
if (FIELD_OnTrial_Validators.length > 0)
{
Object newOnTrialObj = HELPER_OnTrial.toObject (newOnTrial);
if (newOnTrialObj != null)
{
int loopMax = FIELD_OnTrial_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_OnTrial);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_OnTrial_Validators[v].checkAttribute (this, FIELD_OnTrial, metadata, newOnTrialObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_OnTrial () != FieldWriteability.FALSE, "Field OnTrial is not writeable");
preOnTrialChange (newOnTrial);
markFieldChange (FIELD_OnTrial);
_OnTrial = newOnTrial;
postFieldChange (FIELD_OnTrial);
postOnTrialChange ();
}
}
/**
* Get the attribute IsLogoDeleted * Get the attribute IsLogoDeleted
*/ */
public Boolean getIsLogoDeleted () public Boolean getIsLogoDeleted ()
...@@ -5528,6 +5651,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5528,6 +5651,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
tl_hiring_teamPSet.setAttrib (FIELD_LastPlanAmount, HELPER_LastPlanAmount.toObject (_LastPlanAmount)); // tl_hiring_teamPSet.setAttrib (FIELD_LastPlanAmount, HELPER_LastPlanAmount.toObject (_LastPlanAmount)); //
tl_hiring_teamPSet.setAttrib (FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject (_GoogleAddressText)); // tl_hiring_teamPSet.setAttrib (FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject (_GoogleAddressText)); //
tl_hiring_teamPSet.setAttrib (FIELD_PlanCancelled, HELPER_PlanCancelled.toObject (_PlanCancelled)); // tl_hiring_teamPSet.setAttrib (FIELD_PlanCancelled, HELPER_PlanCancelled.toObject (_PlanCancelled)); //
tl_hiring_teamPSet.setAttrib (FIELD_OnTrial, HELPER_OnTrial.toObject (_OnTrial)); //
_Company.getPersistentSets (allSets); _Company.getPersistentSets (allSets);
_BilledByTeam.getPersistentSets (allSets); _BilledByTeam.getPersistentSets (allSets);
_AddedByUser.getPersistentSets (allSets); _AddedByUser.getPersistentSets (allSets);
...@@ -5575,6 +5699,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5575,6 +5699,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_LastPlanAmount = (Double)(HELPER_LastPlanAmount.fromObject (_LastPlanAmount, tl_hiring_teamPSet.getAttrib (FIELD_LastPlanAmount))); // _LastPlanAmount = (Double)(HELPER_LastPlanAmount.fromObject (_LastPlanAmount, tl_hiring_teamPSet.getAttrib (FIELD_LastPlanAmount))); //
_GoogleAddressText = (String)(HELPER_GoogleAddressText.fromObject (_GoogleAddressText, tl_hiring_teamPSet.getAttrib (FIELD_GoogleAddressText))); // _GoogleAddressText = (String)(HELPER_GoogleAddressText.fromObject (_GoogleAddressText, tl_hiring_teamPSet.getAttrib (FIELD_GoogleAddressText))); //
_PlanCancelled = (Boolean)(HELPER_PlanCancelled.fromObject (_PlanCancelled, tl_hiring_teamPSet.getAttrib (FIELD_PlanCancelled))); // _PlanCancelled = (Boolean)(HELPER_PlanCancelled.fromObject (_PlanCancelled, tl_hiring_teamPSet.getAttrib (FIELD_PlanCancelled))); //
_OnTrial = (Boolean)(HELPER_OnTrial.fromObject (_OnTrial, tl_hiring_teamPSet.getAttrib (FIELD_OnTrial))); //
_Company.setFromPersistentSets (objectID, allSets); _Company.setFromPersistentSets (objectID, allSets);
_BilledByTeam.setFromPersistentSets (objectID, allSets); _BilledByTeam.setFromPersistentSets (objectID, allSets);
_AddedByUser.setFromPersistentSets (objectID, allSets); _AddedByUser.setFromPersistentSets (objectID, allSets);
...@@ -5847,6 +5972,15 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5847,6 +5972,15 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
e.addException (ex); e.addException (ex);
} }
try
{
setOnTrial (otherHiringTeam.getOnTrial ());
}
catch (FieldException ex)
{
e.addException (ex);
}
} }
} }
...@@ -5890,6 +6024,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5890,6 +6024,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_LastPlanAmount = sourceHiringTeam._LastPlanAmount; _LastPlanAmount = sourceHiringTeam._LastPlanAmount;
_GoogleAddressText = sourceHiringTeam._GoogleAddressText; _GoogleAddressText = sourceHiringTeam._GoogleAddressText;
_PlanCancelled = sourceHiringTeam._PlanCancelled; _PlanCancelled = sourceHiringTeam._PlanCancelled;
_OnTrial = sourceHiringTeam._OnTrial;
_IsLogoDeleted = sourceHiringTeam._IsLogoDeleted; _IsLogoDeleted = sourceHiringTeam._IsLogoDeleted;
_CouponCode = sourceHiringTeam._CouponCode; _CouponCode = sourceHiringTeam._CouponCode;
_StripeBrand = sourceHiringTeam._StripeBrand; _StripeBrand = sourceHiringTeam._StripeBrand;
...@@ -5986,6 +6121,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -5986,6 +6121,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_LastPlanAmount = (Double)(HELPER_LastPlanAmount.readExternal (_LastPlanAmount, vals.get(FIELD_LastPlanAmount))); // _LastPlanAmount = (Double)(HELPER_LastPlanAmount.readExternal (_LastPlanAmount, vals.get(FIELD_LastPlanAmount))); //
_GoogleAddressText = (String)(HELPER_GoogleAddressText.readExternal (_GoogleAddressText, vals.get(FIELD_GoogleAddressText))); // _GoogleAddressText = (String)(HELPER_GoogleAddressText.readExternal (_GoogleAddressText, vals.get(FIELD_GoogleAddressText))); //
_PlanCancelled = (Boolean)(HELPER_PlanCancelled.readExternal (_PlanCancelled, vals.get(FIELD_PlanCancelled))); // _PlanCancelled = (Boolean)(HELPER_PlanCancelled.readExternal (_PlanCancelled, vals.get(FIELD_PlanCancelled))); //
_OnTrial = (Boolean)(HELPER_OnTrial.readExternal (_OnTrial, vals.get(FIELD_OnTrial))); //
_IsLogoDeleted = (Boolean)(HELPER_IsLogoDeleted.readExternal (_IsLogoDeleted, vals.get(FIELD_IsLogoDeleted))); // _IsLogoDeleted = (Boolean)(HELPER_IsLogoDeleted.readExternal (_IsLogoDeleted, vals.get(FIELD_IsLogoDeleted))); //
_CouponCode = (String)(HELPER_CouponCode.readExternal (_CouponCode, vals.get(FIELD_CouponCode))); // _CouponCode = (String)(HELPER_CouponCode.readExternal (_CouponCode, vals.get(FIELD_CouponCode))); //
_StripeBrand = (String)(HELPER_StripeBrand.readExternal (_StripeBrand, vals.get(FIELD_StripeBrand))); // _StripeBrand = (String)(HELPER_StripeBrand.readExternal (_StripeBrand, vals.get(FIELD_StripeBrand))); //
...@@ -6037,6 +6173,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -6037,6 +6173,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
vals.put (FIELD_LastPlanAmount, HELPER_LastPlanAmount.writeExternal (_LastPlanAmount)); vals.put (FIELD_LastPlanAmount, HELPER_LastPlanAmount.writeExternal (_LastPlanAmount));
vals.put (FIELD_GoogleAddressText, HELPER_GoogleAddressText.writeExternal (_GoogleAddressText)); vals.put (FIELD_GoogleAddressText, HELPER_GoogleAddressText.writeExternal (_GoogleAddressText));
vals.put (FIELD_PlanCancelled, HELPER_PlanCancelled.writeExternal (_PlanCancelled)); vals.put (FIELD_PlanCancelled, HELPER_PlanCancelled.writeExternal (_PlanCancelled));
vals.put (FIELD_OnTrial, HELPER_OnTrial.writeExternal (_OnTrial));
vals.put (FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.writeExternal (_IsLogoDeleted)); vals.put (FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.writeExternal (_IsLogoDeleted));
vals.put (FIELD_CouponCode, HELPER_CouponCode.writeExternal (_CouponCode)); vals.put (FIELD_CouponCode, HELPER_CouponCode.writeExternal (_CouponCode));
vals.put (FIELD_StripeBrand, HELPER_StripeBrand.writeExternal (_StripeBrand)); vals.put (FIELD_StripeBrand, HELPER_StripeBrand.writeExternal (_StripeBrand));
...@@ -6174,6 +6311,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -6174,6 +6311,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
listener.notifyFieldChange(this, other, FIELD_PlanCancelled, HELPER_PlanCancelled.toObject(this._PlanCancelled), HELPER_PlanCancelled.toObject(otherHiringTeam._PlanCancelled)); listener.notifyFieldChange(this, other, FIELD_PlanCancelled, HELPER_PlanCancelled.toObject(this._PlanCancelled), HELPER_PlanCancelled.toObject(otherHiringTeam._PlanCancelled));
} }
if (!HELPER_OnTrial.compare(this._OnTrial, otherHiringTeam._OnTrial))
{
listener.notifyFieldChange(this, other, FIELD_OnTrial, HELPER_OnTrial.toObject(this._OnTrial), HELPER_OnTrial.toObject(otherHiringTeam._OnTrial));
}
// Compare single assocs // Compare single assocs
_Company.compare (otherHiringTeam._Company, listener); _Company.compare (otherHiringTeam._Company, listener);
...@@ -6236,6 +6377,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -6236,6 +6377,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
visitor.visitField(this, FIELD_LastPlanAmount, HELPER_LastPlanAmount.toObject(getLastPlanAmount())); visitor.visitField(this, FIELD_LastPlanAmount, HELPER_LastPlanAmount.toObject(getLastPlanAmount()));
visitor.visitField(this, FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject(getGoogleAddressText())); visitor.visitField(this, FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject(getGoogleAddressText()));
visitor.visitField(this, FIELD_PlanCancelled, HELPER_PlanCancelled.toObject(getPlanCancelled())); visitor.visitField(this, FIELD_PlanCancelled, HELPER_PlanCancelled.toObject(getPlanCancelled()));
visitor.visitField(this, FIELD_OnTrial, HELPER_OnTrial.toObject(getOnTrial()));
visitor.visitAssociation (_Company); visitor.visitAssociation (_Company);
visitor.visitAssociation (_BilledByTeam); visitor.visitAssociation (_BilledByTeam);
visitor.visitAssociation (_AddedByUser); visitor.visitAssociation (_AddedByUser);
...@@ -6421,6 +6563,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -6421,6 +6563,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return filter.matches (getPlanCancelled ()); return filter.matches (getPlanCancelled ());
} }
else if (attribName.equals (FIELD_OnTrial))
{
return filter.matches (getOnTrial ());
}
else if (attribName.equals (SINGLEREFERENCE_Company)) else if (attribName.equals (SINGLEREFERENCE_Company))
{ {
return filter.matches (getCompany ()); return filter.matches (getCompany ());
...@@ -6640,6 +6786,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -6640,6 +6786,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return this; return this;
} }
public SearchAll andOnTrial (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_hiring_team.on_trial", "OnTrial");
return this;
}
public SearchAll andCompany (QueryFilter<Company> filter) public SearchAll andCompany (QueryFilter<Company> filter)
{ {
filter.addFilter (context, "tl_hiring_team.company_id", "Company"); filter.addFilter (context, "tl_hiring_team.company_id", "Company");
...@@ -6889,6 +7041,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -6889,6 +7041,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return this; return this;
} }
public SearchBillingTeams andOnTrial (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "tl_hiring_team.on_trial", "OnTrial");
return this;
}
public SearchBillingTeams andCompany (QueryFilter<Company> filter) public SearchBillingTeams andCompany (QueryFilter<Company> filter)
{ {
filter.addFilter (context, "tl_hiring_team.company_id", "Company"); filter.addFilter (context, "tl_hiring_team.company_id", "Company");
...@@ -7066,6 +7224,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -7066,6 +7224,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return HELPER_PlanCancelled.toObject (getPlanCancelled ()); return HELPER_PlanCancelled.toObject (getPlanCancelled ());
} }
else if (attribName.equals (FIELD_OnTrial))
{
return HELPER_OnTrial.toObject (getOnTrial ());
}
else if (attribName.equals (FIELD_IsLogoDeleted)) else if (attribName.equals (FIELD_IsLogoDeleted))
{ {
return HELPER_IsLogoDeleted.toObject (getIsLogoDeleted ()); return HELPER_IsLogoDeleted.toObject (getIsLogoDeleted ());
...@@ -7207,6 +7369,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -7207,6 +7369,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return HELPER_PlanCancelled; return HELPER_PlanCancelled;
} }
else if (attribName.equals (FIELD_OnTrial))
{
return HELPER_OnTrial;
}
else if (attribName.equals (FIELD_IsLogoDeleted)) else if (attribName.equals (FIELD_IsLogoDeleted))
{ {
return HELPER_IsLogoDeleted; return HELPER_IsLogoDeleted;
...@@ -7348,6 +7514,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -7348,6 +7514,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
setPlanCancelled ((Boolean)(HELPER_PlanCancelled.fromObject (_PlanCancelled, attribValue))); setPlanCancelled ((Boolean)(HELPER_PlanCancelled.fromObject (_PlanCancelled, attribValue)));
} }
else if (attribName.equals (FIELD_OnTrial))
{
setOnTrial ((Boolean)(HELPER_OnTrial.fromObject (_OnTrial, attribValue)));
}
else if (attribName.equals (FIELD_IsLogoDeleted)) else if (attribName.equals (FIELD_IsLogoDeleted))
{ {
setIsLogoDeleted ((Boolean)(HELPER_IsLogoDeleted.fromObject (_IsLogoDeleted, attribValue))); setIsLogoDeleted ((Boolean)(HELPER_IsLogoDeleted.fromObject (_IsLogoDeleted, attribValue)));
...@@ -7496,6 +7666,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -7496,6 +7666,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return getWriteability_PlanCancelled (); return getWriteability_PlanCancelled ();
} }
else if (fieldName.equals (FIELD_OnTrial))
{
return getWriteability_OnTrial ();
}
else if (fieldName.equals (MULTIPLEREFERENCE_Users)) else if (fieldName.equals (MULTIPLEREFERENCE_Users))
{ {
return getWriteability_Users (); return getWriteability_Users ();
...@@ -7694,6 +7868,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -7694,6 +7868,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
fields.add (FIELD_PlanCancelled); fields.add (FIELD_PlanCancelled);
} }
if (getWriteability_OnTrial () != FieldWriteability.TRUE)
{
fields.add (FIELD_OnTrial);
}
if (getWriteability_IsLogoDeleted () != FieldWriteability.TRUE) if (getWriteability_IsLogoDeleted () != FieldWriteability.TRUE)
{ {
fields.add (FIELD_IsLogoDeleted); fields.add (FIELD_IsLogoDeleted);
...@@ -7751,6 +7930,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -7751,6 +7930,7 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
result.add(HELPER_LastPlanAmount.getAttribObject (getClass (), _LastPlanAmount, false, FIELD_LastPlanAmount)); result.add(HELPER_LastPlanAmount.getAttribObject (getClass (), _LastPlanAmount, false, FIELD_LastPlanAmount));
result.add(HELPER_GoogleAddressText.getAttribObject (getClass (), _GoogleAddressText, false, FIELD_GoogleAddressText)); result.add(HELPER_GoogleAddressText.getAttribObject (getClass (), _GoogleAddressText, false, FIELD_GoogleAddressText));
result.add(HELPER_PlanCancelled.getAttribObject (getClass (), _PlanCancelled, false, FIELD_PlanCancelled)); result.add(HELPER_PlanCancelled.getAttribObject (getClass (), _PlanCancelled, false, FIELD_PlanCancelled));
result.add(HELPER_OnTrial.getAttribObject (getClass (), _OnTrial, false, FIELD_OnTrial));
result.add(HELPER_IsLogoDeleted.getAttribObject (getClass (), _IsLogoDeleted, false, FIELD_IsLogoDeleted)); result.add(HELPER_IsLogoDeleted.getAttribObject (getClass (), _IsLogoDeleted, false, FIELD_IsLogoDeleted));
result.add(HELPER_CouponCode.getAttribObject (getClass (), _CouponCode, false, FIELD_CouponCode)); result.add(HELPER_CouponCode.getAttribObject (getClass (), _CouponCode, false, FIELD_CouponCode));
result.add(HELPER_StripeBrand.getAttribObject (getClass (), _StripeBrand, false, FIELD_StripeBrand)); result.add(HELPER_StripeBrand.getAttribObject (getClass (), _StripeBrand, false, FIELD_StripeBrand));
...@@ -8328,6 +8508,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8328,6 +8508,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
/** /**
* Get the attribute OnTrial
*/
public Boolean getOnTrial (HiringTeam obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute OnTrial.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setOnTrial (HiringTeam obj, Boolean newOnTrial) throws FieldException
{
return newOnTrial;
}
/**
* Get the attribute IsLogoDeleted * Get the attribute IsLogoDeleted
*/ */
public Boolean getIsLogoDeleted (HiringTeam obj, Boolean original) public Boolean getIsLogoDeleted (HiringTeam obj, Boolean original)
...@@ -8591,6 +8789,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8591,6 +8789,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return toPlanCancelled (); return toPlanCancelled ();
} }
if (name.equals ("OnTrial"))
{
return toOnTrial ();
}
if (name.equals ("Company")) if (name.equals ("Company"))
{ {
return toCompany (); return toCompany ();
...@@ -8680,6 +8882,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8680,6 +8882,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public PipeLine<From, String> toGoogleAddressText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_GoogleAddressText)); } public PipeLine<From, String> toGoogleAddressText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_GoogleAddressText)); }
public PipeLine<From, Boolean> toPlanCancelled () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_PlanCancelled)); } public PipeLine<From, Boolean> toPlanCancelled () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_PlanCancelled)); }
public PipeLine<From, Boolean> toOnTrial () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_OnTrial)); }
public Company.CompanyPipeLineFactory<From, Company> toCompany () { return toCompany (Filter.ALL); } public Company.CompanyPipeLineFactory<From, Company> toCompany () { return toCompany (Filter.ALL); }
public Company.CompanyPipeLineFactory<From, Company> toCompany (Filter<Company> filter) public Company.CompanyPipeLineFactory<From, Company> toCompany (Filter<Company> filter)
......
...@@ -265,6 +265,11 @@ public class HiringTeam extends BaseHiringTeam ...@@ -265,6 +265,11 @@ public class HiringTeam extends BaseHiringTeam
{ {
if(getManageOwnBilling()) if(getManageOwnBilling())
{ {
if(isTrue(getOnTrial()))
{
return true;
}
return getCardID() != null && getIsPPJ() != null && (getIsPPJ() || (!getIsPPJ() && getPaymentPlan() != null && getStripeSubscription() != null)); return getCardID() != null && getIsPPJ() != null && (getIsPPJ() || (!getIsPPJ() && getPaymentPlan() != null && getStripeSubscription() != null));
} }
...@@ -281,4 +286,14 @@ public class HiringTeam extends BaseHiringTeam ...@@ -281,4 +286,14 @@ public class HiringTeam extends BaseHiringTeam
return getBilledByTeam().allowJobCreation(); return getBilledByTeam().allowJobCreation();
} }
public boolean allowTrialJobCreation()
{
if(getManageOwnBilling())
{
return isTrue(isPPJ()) || ( isFalse(isPPJ()) && getPaymentPlan() != null && getStripeSubscription() != null && (getAvailableCredits() > getUsedCredits() || !getHasCap() || (getHasCap() && getMaxCap() > getUsedCredits())));
}
return getBilledByTeam().allowJobCreation();
}
} }
\ No newline at end of file
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
<ATTRIB name="LastPlanAmount" type="Double" dbcol="last_plan_amount" /> <ATTRIB name="LastPlanAmount" type="Double" dbcol="last_plan_amount" />
<ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" /> <ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300" />
<ATTRIB name="PlanCancelled" type="Boolean" dbcol="plan_cancelled" defaultValue="Boolean.FALSE"/> <ATTRIB name="PlanCancelled" type="Boolean" dbcol="plan_cancelled" defaultValue="Boolean.FALSE"/>
<ATTRIB name="OnTrial" type="Boolean" dbcol="on_trial" defaultValue="Boolean.TRUE"/>
<ATTRIB name="TrialJobCount" type="Integer" dbcol="trial_job_count" defaultValue="0"/>
<SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" /> <SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" mandatory="true" backreferenceName="HiringTeams" />
<SINGLEREFERENCE name="BilledByTeam" type="HiringTeam" dbcol="billing_team_id" mandatory="false" backreferenceName="BillingTeams" /> <SINGLEREFERENCE name="BilledByTeam" type="HiringTeam" dbcol="billing_team_id" mandatory="false" backreferenceName="BillingTeams" />
......
...@@ -56,6 +56,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -56,6 +56,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
private Double dummyLastPlanAmount; private Double dummyLastPlanAmount;
private String dummyGoogleAddressText; private String dummyGoogleAddressText;
private Boolean dummyPlanCancelled; private Boolean dummyPlanCancelled;
private Boolean dummyOnTrial;
// Static constants corresponding to attribute helpers // Static constants corresponding to attribute helpers
...@@ -87,6 +88,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -87,6 +88,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
private static final DefaultAttributeHelper HELPER_LastPlanAmount = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_LastPlanAmount = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_PlanCancelled = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_PlanCancelled = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_OnTrial = DefaultAttributeHelper.INSTANCE;
...@@ -121,10 +123,11 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -121,10 +123,11 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
dummyLastPlanAmount = (Double)(HELPER_LastPlanAmount.initialise (dummyLastPlanAmount)); dummyLastPlanAmount = (Double)(HELPER_LastPlanAmount.initialise (dummyLastPlanAmount));
dummyGoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (dummyGoogleAddressText)); dummyGoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (dummyGoogleAddressText));
dummyPlanCancelled = (Boolean)(HELPER_PlanCancelled.initialise (dummyPlanCancelled)); dummyPlanCancelled = (Boolean)(HELPER_PlanCancelled.initialise (dummyPlanCancelled));
dummyOnTrial = (Boolean)(HELPER_OnTrial.initialise (dummyOnTrial));
} }
private String SELECT_COLUMNS = "{PREFIX}tl_hiring_team.object_id as id, {PREFIX}tl_hiring_team.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_hiring_team.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_hiring_team.hiring_team_name, {PREFIX}tl_hiring_team.hiring_team_logo, {PREFIX}tl_hiring_team.hiring_team_type, {PREFIX}tl_hiring_team.industry, {PREFIX}tl_hiring_team.time_zone, {PREFIX}tl_hiring_team.state, {PREFIX}tl_hiring_team.country, {PREFIX}tl_hiring_team.post_code, {PREFIX}tl_hiring_team.city, {PREFIX}tl_hiring_team.has_client_support, {PREFIX}tl_hiring_team.manage_own_billing, {PREFIX}tl_hiring_team.stripe_reference, {PREFIX}tl_hiring_team.stripe_subscription, {PREFIX}tl_hiring_team.stripe_fixed_sub_item, {PREFIX}tl_hiring_team.stripe_metered_sub_item, {PREFIX}tl_hiring_team.name_on_card, {PREFIX}tl_hiring_team.card_post_code, {PREFIX}tl_hiring_team.card_id, {PREFIX}tl_hiring_team.plan_renewed_on, {PREFIX}tl_hiring_team.used_credits, {PREFIX}tl_hiring_team.available_credits, {PREFIX}tl_hiring_team.is_ppj, {PREFIX}tl_hiring_team.has_cap, {PREFIX}tl_hiring_team.max_cap, {PREFIX}tl_hiring_team.coupon_expiry_date, {PREFIX}tl_hiring_team.last_plan_amount, {PREFIX}tl_hiring_team.google_address_text, {PREFIX}tl_hiring_team.plan_cancelled, {PREFIX}tl_hiring_team.company_id, {PREFIX}tl_hiring_team.billing_team_id, {PREFIX}tl_hiring_team.added_by_user_id, {PREFIX}tl_hiring_team.payment_plan_id, {PREFIX}tl_hiring_team.coupon_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}tl_hiring_team.object_id as id, {PREFIX}tl_hiring_team.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_hiring_team.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_hiring_team.hiring_team_name, {PREFIX}tl_hiring_team.hiring_team_logo, {PREFIX}tl_hiring_team.hiring_team_type, {PREFIX}tl_hiring_team.industry, {PREFIX}tl_hiring_team.time_zone, {PREFIX}tl_hiring_team.state, {PREFIX}tl_hiring_team.country, {PREFIX}tl_hiring_team.post_code, {PREFIX}tl_hiring_team.city, {PREFIX}tl_hiring_team.has_client_support, {PREFIX}tl_hiring_team.manage_own_billing, {PREFIX}tl_hiring_team.stripe_reference, {PREFIX}tl_hiring_team.stripe_subscription, {PREFIX}tl_hiring_team.stripe_fixed_sub_item, {PREFIX}tl_hiring_team.stripe_metered_sub_item, {PREFIX}tl_hiring_team.name_on_card, {PREFIX}tl_hiring_team.card_post_code, {PREFIX}tl_hiring_team.card_id, {PREFIX}tl_hiring_team.plan_renewed_on, {PREFIX}tl_hiring_team.used_credits, {PREFIX}tl_hiring_team.available_credits, {PREFIX}tl_hiring_team.is_ppj, {PREFIX}tl_hiring_team.has_cap, {PREFIX}tl_hiring_team.max_cap, {PREFIX}tl_hiring_team.coupon_expiry_date, {PREFIX}tl_hiring_team.last_plan_amount, {PREFIX}tl_hiring_team.google_address_text, {PREFIX}tl_hiring_team.plan_cancelled, {PREFIX}tl_hiring_team.on_trial, {PREFIX}tl_hiring_team.company_id, {PREFIX}tl_hiring_team.billing_team_id, {PREFIX}tl_hiring_team.added_by_user_id, {PREFIX}tl_hiring_team.payment_plan_id, {PREFIX}tl_hiring_team.coupon_id, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -203,6 +206,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -203,6 +206,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_LastPlanAmount)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_LastPlanAmount)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_GoogleAddressText)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_GoogleAddressText)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_PlanCancelled)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_PlanCancelled)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.FIELD_OnTrial)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_Company)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_Company)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_BilledByTeam)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_BilledByTeam)||
!tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_AddedByUser)|| !tl_hiring_teamPSet.containsAttrib(HiringTeam.SINGLEREFERENCE_AddedByUser)||
...@@ -297,10 +301,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -297,10 +301,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}tl_hiring_team " + "UPDATE {PREFIX}tl_hiring_team " +
"SET hiring_team_name = ?, hiring_team_logo = ?, hiring_team_type = ?, industry = ?, time_zone = ?, state = ?, country = ?, post_code = ?, city = ?, has_client_support = ?, manage_own_billing = ?, stripe_reference = ?, stripe_subscription = ?, stripe_fixed_sub_item = ?, stripe_metered_sub_item = ?, name_on_card = ?, card_post_code = ?, card_id = ?, plan_renewed_on = ?, used_credits = ?, available_credits = ?, is_ppj = ?, has_cap = ?, max_cap = ?, coupon_expiry_date = ?, last_plan_amount = ?, google_address_text = ?, plan_cancelled = ?, company_id = ? , billing_team_id = ? , added_by_user_id = ? , payment_plan_id = ? , coupon_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET hiring_team_name = ?, hiring_team_logo = ?, hiring_team_type = ?, industry = ?, time_zone = ?, state = ?, country = ?, post_code = ?, city = ?, has_client_support = ?, manage_own_billing = ?, stripe_reference = ?, stripe_subscription = ?, stripe_fixed_sub_item = ?, stripe_metered_sub_item = ?, name_on_card = ?, card_post_code = ?, card_id = ?, plan_renewed_on = ?, used_credits = ?, available_credits = ?, is_ppj = ?, has_cap = ?, max_cap = ?, coupon_expiry_date = ?, last_plan_amount = ?, google_address_text = ?, plan_cancelled = ?, on_trial = ?, company_id = ? , billing_team_id = ? , added_by_user_id = ? , payment_plan_id = ? , coupon_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE tl_hiring_team.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE tl_hiring_team.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_HiringTeamName.getForSQL(dummyHiringTeamName, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamName))).listEntry (HELPER_HiringTeamLogo.getForSQL(dummyHiringTeamLogo, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TimeZone))).listEntry (HELPER_State.getForSQL(dummyState, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasClientSupport))).listEntry (HELPER_ManageOwnBilling.getForSQL(dummyManageOwnBilling, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_ManageOwnBilling))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeSubscription))).listEntry (HELPER_StripeFixedSubItem.getForSQL(dummyStripeFixedSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeFixedSubItem))).listEntry (HELPER_StripeMeteredSubItem.getForSQL(dummyStripeMeteredSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeMeteredSubItem))).listEntry (HELPER_NameOnCard.getForSQL(dummyNameOnCard, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_NameOnCard))).listEntry (HELPER_CardPostCode.getForSQL(dummyCardPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardPostCode))).listEntry (HELPER_CardID.getForSQL(dummyCardID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardID))).listEntry (HELPER_PlanRenewedOn.getForSQL(dummyPlanRenewedOn, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanRenewedOn))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))).listEntry (HELPER_AvailableCredits.getForSQL(dummyAvailableCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_AvailableCredits))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_IsPPJ))).listEntry (HELPER_HasCap.getForSQL(dummyHasCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasCap))).listEntry (HELPER_MaxCap.getForSQL(dummyMaxCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MaxCap))).listEntry (HELPER_CouponExpiryDate.getForSQL(dummyCouponExpiryDate, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CouponExpiryDate))).listEntry (HELPER_LastPlanAmount.getForSQL(dummyLastPlanAmount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_LastPlanAmount))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_GoogleAddressText))).listEntry (HELPER_PlanCancelled.getForSQL(dummyPlanCancelled, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanCancelled))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BilledByTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Coupon)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_HiringTeamName.getForSQL(dummyHiringTeamName, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamName))).listEntry (HELPER_HiringTeamLogo.getForSQL(dummyHiringTeamLogo, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TimeZone))).listEntry (HELPER_State.getForSQL(dummyState, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasClientSupport))).listEntry (HELPER_ManageOwnBilling.getForSQL(dummyManageOwnBilling, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_ManageOwnBilling))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeSubscription))).listEntry (HELPER_StripeFixedSubItem.getForSQL(dummyStripeFixedSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeFixedSubItem))).listEntry (HELPER_StripeMeteredSubItem.getForSQL(dummyStripeMeteredSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeMeteredSubItem))).listEntry (HELPER_NameOnCard.getForSQL(dummyNameOnCard, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_NameOnCard))).listEntry (HELPER_CardPostCode.getForSQL(dummyCardPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardPostCode))).listEntry (HELPER_CardID.getForSQL(dummyCardID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardID))).listEntry (HELPER_PlanRenewedOn.getForSQL(dummyPlanRenewedOn, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanRenewedOn))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))).listEntry (HELPER_AvailableCredits.getForSQL(dummyAvailableCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_AvailableCredits))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_IsPPJ))).listEntry (HELPER_HasCap.getForSQL(dummyHasCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasCap))).listEntry (HELPER_MaxCap.getForSQL(dummyMaxCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MaxCap))).listEntry (HELPER_CouponExpiryDate.getForSQL(dummyCouponExpiryDate, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CouponExpiryDate))).listEntry (HELPER_LastPlanAmount.getForSQL(dummyLastPlanAmount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_LastPlanAmount))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_GoogleAddressText))).listEntry (HELPER_PlanCancelled.getForSQL(dummyPlanCancelled, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanCancelled))).listEntry (HELPER_OnTrial.getForSQL(dummyOnTrial, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_OnTrial))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BilledByTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Coupon)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -626,6 +630,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -626,6 +630,7 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_LastPlanAmount, HELPER_LastPlanAmount.getFromRS(dummyLastPlanAmount, r, "last_plan_amount")); tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_LastPlanAmount, HELPER_LastPlanAmount.getFromRS(dummyLastPlanAmount, r, "last_plan_amount"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_GoogleAddressText, HELPER_GoogleAddressText.getFromRS(dummyGoogleAddressText, r, "google_address_text")); tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_GoogleAddressText, HELPER_GoogleAddressText.getFromRS(dummyGoogleAddressText, r, "google_address_text"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_PlanCancelled, HELPER_PlanCancelled.getFromRS(dummyPlanCancelled, r, "plan_cancelled")); tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_PlanCancelled, HELPER_PlanCancelled.getFromRS(dummyPlanCancelled, r, "plan_cancelled"));
tl_hiring_teamPSet.setAttrib(HiringTeam.FIELD_OnTrial, HELPER_OnTrial.getFromRS(dummyOnTrial, r, "on_trial"));
tl_hiring_teamPSet.setAttrib(HiringTeam.SINGLEREFERENCE_Company, r.getObject ("company_id")); tl_hiring_teamPSet.setAttrib(HiringTeam.SINGLEREFERENCE_Company, r.getObject ("company_id"));
tl_hiring_teamPSet.setAttrib(HiringTeam.SINGLEREFERENCE_BilledByTeam, r.getObject ("billing_team_id")); tl_hiring_teamPSet.setAttrib(HiringTeam.SINGLEREFERENCE_BilledByTeam, r.getObject ("billing_team_id"));
...@@ -648,10 +653,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr ...@@ -648,10 +653,10 @@ public class HiringTeamPersistenceMgr extends ObjectPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}tl_hiring_team " + "INSERT INTO {PREFIX}tl_hiring_team " +
" (hiring_team_name, hiring_team_logo, hiring_team_type, industry, time_zone, state, country, post_code, city, has_client_support, manage_own_billing, stripe_reference, stripe_subscription, stripe_fixed_sub_item, stripe_metered_sub_item, name_on_card, card_post_code, card_id, plan_renewed_on, used_credits, available_credits, is_ppj, has_cap, max_cap, coupon_expiry_date, last_plan_amount, google_address_text, plan_cancelled, company_id, billing_team_id, added_by_user_id, payment_plan_id, coupon_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " + " (hiring_team_name, hiring_team_logo, hiring_team_type, industry, time_zone, state, country, post_code, city, has_client_support, manage_own_billing, stripe_reference, stripe_subscription, stripe_fixed_sub_item, stripe_metered_sub_item, name_on_card, card_post_code, card_id, plan_renewed_on, used_credits, available_credits, is_ppj, has_cap, max_cap, coupon_expiry_date, last_plan_amount, google_address_text, plan_cancelled, on_trial, company_id, billing_team_id, added_by_user_id, payment_plan_id, coupon_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ")",
CollectionUtils.listEntry (HELPER_HiringTeamName.getForSQL(dummyHiringTeamName, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamName))).listEntry (HELPER_HiringTeamLogo.getForSQL(dummyHiringTeamLogo, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TimeZone))).listEntry (HELPER_State.getForSQL(dummyState, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasClientSupport))).listEntry (HELPER_ManageOwnBilling.getForSQL(dummyManageOwnBilling, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_ManageOwnBilling))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeSubscription))).listEntry (HELPER_StripeFixedSubItem.getForSQL(dummyStripeFixedSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeFixedSubItem))).listEntry (HELPER_StripeMeteredSubItem.getForSQL(dummyStripeMeteredSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeMeteredSubItem))).listEntry (HELPER_NameOnCard.getForSQL(dummyNameOnCard, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_NameOnCard))).listEntry (HELPER_CardPostCode.getForSQL(dummyCardPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardPostCode))).listEntry (HELPER_CardID.getForSQL(dummyCardID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardID))).listEntry (HELPER_PlanRenewedOn.getForSQL(dummyPlanRenewedOn, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanRenewedOn))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))).listEntry (HELPER_AvailableCredits.getForSQL(dummyAvailableCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_AvailableCredits))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_IsPPJ))).listEntry (HELPER_HasCap.getForSQL(dummyHasCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasCap))).listEntry (HELPER_MaxCap.getForSQL(dummyMaxCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MaxCap))).listEntry (HELPER_CouponExpiryDate.getForSQL(dummyCouponExpiryDate, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CouponExpiryDate))).listEntry (HELPER_LastPlanAmount.getForSQL(dummyLastPlanAmount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_LastPlanAmount))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_GoogleAddressText))).listEntry (HELPER_PlanCancelled.getForSQL(dummyPlanCancelled, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanCancelled))) .listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BilledByTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Coupon)))) .listEntry (objectID.longID ()).toList().toArray()); CollectionUtils.listEntry (HELPER_HiringTeamName.getForSQL(dummyHiringTeamName, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamName))).listEntry (HELPER_HiringTeamLogo.getForSQL(dummyHiringTeamLogo, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamLogo))).listEntry (HELPER_HiringTeamType.getForSQL(dummyHiringTeamType, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HiringTeamType))).listEntry (HELPER_Industry.getForSQL(dummyIndustry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Industry))).listEntry (HELPER_TimeZone.getForSQL(dummyTimeZone, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_TimeZone))).listEntry (HELPER_State.getForSQL(dummyState, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_State))).listEntry (HELPER_Country.getForSQL(dummyCountry, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_Country))).listEntry (HELPER_PostCode.getForSQL(dummyPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PostCode))).listEntry (HELPER_City.getForSQL(dummyCity, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_City))).listEntry (HELPER_HasClientSupport.getForSQL(dummyHasClientSupport, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasClientSupport))).listEntry (HELPER_ManageOwnBilling.getForSQL(dummyManageOwnBilling, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_ManageOwnBilling))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeSubscription))).listEntry (HELPER_StripeFixedSubItem.getForSQL(dummyStripeFixedSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeFixedSubItem))).listEntry (HELPER_StripeMeteredSubItem.getForSQL(dummyStripeMeteredSubItem, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_StripeMeteredSubItem))).listEntry (HELPER_NameOnCard.getForSQL(dummyNameOnCard, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_NameOnCard))).listEntry (HELPER_CardPostCode.getForSQL(dummyCardPostCode, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardPostCode))).listEntry (HELPER_CardID.getForSQL(dummyCardID, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CardID))).listEntry (HELPER_PlanRenewedOn.getForSQL(dummyPlanRenewedOn, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanRenewedOn))).listEntry (HELPER_UsedCredits.getForSQL(dummyUsedCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_UsedCredits))).listEntry (HELPER_AvailableCredits.getForSQL(dummyAvailableCredits, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_AvailableCredits))).listEntry (HELPER_IsPPJ.getForSQL(dummyIsPPJ, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_IsPPJ))).listEntry (HELPER_HasCap.getForSQL(dummyHasCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_HasCap))).listEntry (HELPER_MaxCap.getForSQL(dummyMaxCap, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_MaxCap))).listEntry (HELPER_CouponExpiryDate.getForSQL(dummyCouponExpiryDate, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_CouponExpiryDate))).listEntry (HELPER_LastPlanAmount.getForSQL(dummyLastPlanAmount, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_LastPlanAmount))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_GoogleAddressText))).listEntry (HELPER_PlanCancelled.getForSQL(dummyPlanCancelled, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_PlanCancelled))).listEntry (HELPER_OnTrial.getForSQL(dummyOnTrial, tl_hiring_teamPSet.getAttrib (HiringTeam.FIELD_OnTrial))) .listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Company)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_BilledByTeam)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_AddedByUser)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_PaymentPlan)))).listEntry (SQLManager.CheckNull((Long)(tl_hiring_teamPSet.getAttrib (HiringTeam.SINGLEREFERENCE_Coupon)))) .listEntry (objectID.longID ()).toList().toArray());
tl_hiring_teamPSet.setStatus (PersistentSetStatus.PROCESSED); tl_hiring_teamPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("CompanyUser", companyUser) .mapEntry("CompanyUser", companyUser)
.mapEntry("Skip", Boolean.FALSE) .mapEntry("Skip", Boolean.FALSE)
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap())
.toMap() %>"/> .toMap() %>"/>
...@@ -89,6 +90,7 @@ ...@@ -89,6 +90,7 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("CompanyUser", companyUser) .mapEntry("CompanyUser", companyUser)
.mapEntry("Skip", Boolean.TRUE) .mapEntry("Skip", Boolean.TRUE)
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("socialLogin", socialLogin).mapEntry("Company", company).toMap())
.toMap() %>"/> .toMap() %>"/>
</div> </div>
......
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
</div> </div>
</oneit:form> </oneit:form>
<% <%
if(billingTeam.getCardID() == null) if(!billingTeam.isTrue(billingTeam.getOnTrial()) && billingTeam.getCardID() == null)
{ {
%> %>
<oneit:form name="setupBilling" method="post" enctype="multipart/form-data"> <oneit:form name="setupBilling" method="post" enctype="multipart/form-data">
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
<% <%
} }
else if(billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.getStripeSubscription() == null)) else if(!billingTeam.isTrue(billingTeam.getOnTrial()) && (billingTeam.getIsPPJ() == null || (!billingTeam.getIsPPJ() && billingTeam.getStripeSubscription() == null)))
{ {
%> %>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">tl_hiring_team</tableName>
<column name="on_trial" type="Boolean" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
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