Example #1
0
 public function setUp()
 {
     global $dd;
     Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10);
     $dd = new DemoData();
     $dd->setEnableQuickPunch(FALSE);
     //Helps prevent duplicate punch IDs and validation failures.
     $dd->setUserNamePostFix('_' . uniqid(NULL, TRUE));
     //Needs to be super random to prevent conflicts and random failing tests.
     $this->company_id = $dd->createCompany();
     Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10);
     //$dd->createPermissionGroups( $this->company_id, 40 ); //Administrator only.
     $dd->createCurrency($this->company_id, 10);
     $dd->createPayStubAccount($this->company_id);
     $this->createPayStubAccounts();
     //$this->createPayStubAccrualAccount();
     $dd->createPayStubAccountLink($this->company_id);
     $this->getPayStubAccountLinkArray();
     $dd->createUserWageGroups($this->company_id);
     $this->user_id = $dd->createUser($this->company_id, 100);
     //$this->absence_policy_id = $dd->createAbsencePolicy( $this->company_id, 10 );
     $this->createPayPeriodSchedule(10);
     $this->createPayPeriods();
     $this->getAllPayPeriods();
     $this->assertGreaterThan(0, $this->company_id);
     $this->assertGreaterThan(0, $this->user_id);
     return TRUE;
 }
 public function setUp()
 {
     global $dd;
     Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10);
     $dd = new DemoData();
     $dd->setUserNamePostFix(rand(1000, 99999));
     $this->company_id = $dd->createCompany();
     Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10);
     $dd->createPermissionGroups($this->company_id);
     $dd->createCurrency($this->company_id, 10);
     $dd->createPayStubAccount($this->company_id);
     $this->createPayStubAccounts();
     //$this->createPayStubAccrualAccount();
     $dd->createPayStubAccountLink($this->company_id);
     $this->getPayStubAccountLinkArray();
     $dd->createUserWageGroups($this->company_id);
     $this->user_id = $dd->createUser($this->company_id, 100);
     $this->createPayPeriodSchedule();
     $this->createPayPeriods();
     $this->getAllPayPeriods();
     $this->branch_ids[] = $dd->createBranch($this->company_id, 10);
     $this->branch_ids[] = $dd->createBranch($this->company_id, 20);
     $this->department_ids[] = $dd->createDepartment($this->company_id, 10);
     $this->department_ids[] = $dd->createDepartment($this->company_id, 20);
     return TRUE;
 }
Example #3
0
 public function setUp()
 {
     global $dd;
     Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10);
     $dd = new DemoData();
     $dd->setEnableQuickPunch(FALSE);
     //Helps prevent duplicate punch IDs and validation failures.
     $dd->setUserNamePostFix('_' . uniqid(NULL, TRUE));
     //Needs to be super random to prevent conflicts and random failing tests.
     $this->company_id = $dd->createCompany();
     Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10);
     //$dd->createPermissionGroups( $this->company_id, 40 ); //Administrator only.
     $dd->createCurrency($this->company_id, 10);
     //$dd->createPayStubAccount( $this->company_id );
     ////$this->createPayStubAccrualAccount();
     //$dd->createPayStubAccountLink( $this->company_id );
     $dd->createUserWageGroups($this->company_id);
     $this->user_id = $dd->createUser($this->company_id, 100);
     $user_obj = $this->getUserObject($this->user_id);
     //Use a consistent hire date, others its difficult to get things correct due to the hire date being in different parts or different pay periods.
     //Make sure it is not on a pay period start date though.
     $user_obj->setHireDate(strtotime('05-Mar-2001'));
     $user_obj->Save(FALSE);
     $this->createPayPeriodSchedule();
     $this->createPayPeriods(TTDate::getBeginDayEpoch(TTDate::getBeginYearEpoch($user_obj->getHireDate())));
     $this->getAllPayPeriods();
     $this->assertGreaterThan(0, $this->company_id);
     $this->assertGreaterThan(0, $this->user_id);
     return TRUE;
 }
 public function setUp()
 {
     global $dd;
     Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10);
     TTDate::setTimeZone('PST8PDT');
     $dd = new DemoData();
     $dd->setEnableQuickPunch(FALSE);
     //Helps prevent duplicate punch IDs and validation failures.
     $dd->setUserNamePostFix('_' . uniqid(NULL, TRUE));
     //Needs to be super random to prevent conflicts and random failing tests.
     $this->company_id = $dd->createCompany();
     Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10);
     $dd->createCurrency($this->company_id, 10);
     //$dd->createPermissionGroups( $this->company_id, 40 ); //Administrator only.
     $dd->createPayStubAccount($this->company_id);
     $this->createPayStubAccounts();
     $this->createPayStubAccrualAccount();
     $dd->createPayStubAccountLink($this->company_id);
     $this->getPayStubAccountLinkArray();
     //Company Deductions
     $dd->createCompanyDeduction($this->company_id);
     $this->createCompanyDeductions();
     $dd->createUserWageGroups($this->company_id);
     $this->user_id = $dd->createUser($this->company_id, 100);
     $this->createPayPeriodSchedule();
     $this->createPayPeriods();
     $this->getAllPayPeriods();
     //Create policies
     $policy_ids['overtime'][] = $dd->createOverTimePolicy($this->company_id, 10);
     //$policy_ids['overtime'][] = $dd->createOverTimePolicy( $this->company_id, 20, $policy_ids['accrual'][0] );
     $policy_ids['overtime'][] = $dd->createOverTimePolicy($this->company_id, 20);
     $policy_ids['premium'][] = $dd->createPremiumPolicy($this->company_id, 10);
     $policy_ids['premium'][] = $dd->createPremiumPolicy($this->company_id, 20);
     //Create Policy Group
     $dd->createPolicyGroup($this->company_id, NULL, NULL, NULL, $policy_ids['overtime'], $policy_ids['premium'], NULL, array($this->user_id));
     $this->createPunchData();
     $this->addPayStubAmendments();
     $this->createPayStub();
     $this->assertGreaterThan(0, $this->company_id);
     $this->assertGreaterThan(0, $this->user_id);
     return TRUE;
 }
Example #5
0
 public function setUp()
 {
     global $dd;
     Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10);
     $dd = new DemoData();
     $dd->setUserNamePostFix(rand(1000, 99999));
     $this->company_id = $dd->createCompany();
     Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10);
     $dd->createPermissionGroups($this->company_id);
     $dd->createCurrency($this->company_id, 10);
     $dd->createPayStubAccount($this->company_id);
     $this->createPayStubAccounts();
     //$this->createPayStubAccrualAccount();
     $dd->createPayStubAccountLink($this->company_id);
     $this->getPayStubAccountLinkArray();
     $dd->createUserWageGroups($this->company_id);
     $this->user_id = $dd->createUser($this->company_id, 100);
     //$this->absence_policy_id = $dd->createAbsencePolicy( $this->company_id, 10 );
     return TRUE;
 }
Example #6
0
 public function setUp()
 {
     global $dd;
     Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10);
     $dd = new DemoData();
     $dd->setEnableQuickPunch(FALSE);
     //Helps prevent duplicate punch IDs and validation failures.
     $dd->setUserNamePostFix('_' . uniqid(NULL, TRUE));
     //Needs to be super random to prevent conflicts and random failing tests.
     $this->company_id = $dd->createCompany();
     Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10);
     //$dd->createPermissionGroups( $this->company_id, 40 ); //Administrator only.
     $this->currency_id = $dd->createCurrency($this->company_id, 10);
     $dd->createUserWageGroups($this->company_id);
     $this->user_id = $dd->createUser($this->company_id, 100);
     $this->branch_ids[] = $dd->createBranch($this->company_id, 10);
     $this->branch_ids[] = $dd->createBranch($this->company_id, 20);
     $this->department_ids[] = $dd->createDepartment($this->company_id, 10);
     $this->department_ids[] = $dd->createDepartment($this->company_id, 20);
     $this->assertGreaterThan(0, $this->company_id);
     $this->assertGreaterThan(0, $this->user_id);
     return TRUE;
 }
 public function setUp()
 {
     global $dd;
     Debug::text('Running setUp(): ', __FILE__, __LINE__, __METHOD__, 10);
     $dd = new DemoData();
     $dd->setUserNamePostFix(rand(1000, 99999));
     $this->company_id = $dd->createCompany();
     Debug::text('Company ID: ' . $this->company_id, __FILE__, __LINE__, __METHOD__, 10);
     $dd->createCurrency($this->company_id, 10);
     $dd->createPermissionGroups($this->company_id);
     $dd->createPayStubAccount($this->company_id);
     $this->createPayStubAccounts();
     $this->createPayStubAccrualAccount();
     $dd->createPayStubAccountLink($this->company_id);
     $this->getPayStubAccountLinkArray();
     //Company Deductions
     $dd->createCompanyDeduction($this->company_id);
     $this->createCompanyDeductions();
     $dd->createUserWageGroups($this->company_id);
     $this->user_id = $dd->createUser($this->company_id, 100);
     $this->createPayPeriodSchedule();
     $this->createPayPeriods();
     $this->getAllPayPeriods();
     //Create policies
     $policy_ids['overtime'][] = $dd->createOverTimePolicy($this->company_id, 10);
     //$policy_ids['overtime'][] = $dd->createOverTimePolicy( $this->company_id, 20, $policy_ids['accrual'][0] );
     $policy_ids['overtime'][] = $dd->createOverTimePolicy($this->company_id, 20);
     $policy_ids['premium'][] = $dd->createPremiumPolicy($this->company_id, 10);
     $policy_ids['premium'][] = $dd->createPremiumPolicy($this->company_id, 20);
     //Create Policy Group
     $dd->createPolicyGroup($this->company_id, NULL, NULL, NULL, $policy_ids['overtime'], $policy_ids['premium'], NULL, array($this->user_id));
     $this->createPunchData();
     $this->addPayStubAmendments();
     $this->createPayStub();
     return TRUE;
 }