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 #2
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);
     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 #4
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;
 }
 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;
 }