Esempio n. 1
0
     $filter_columns[Misc::trimSortPrefix($column_key)] = $columns[$column_key];
 }
 if ($action == 'display_form' or $action == 'print_form') {
     Debug::Text('Generating PDF: ', __FILE__, __LINE__, __METHOD__, 10);
     //Get company information
     $clf = TTnew('CompanyListFactory');
     $company_obj = $clf->getById($current_company->getId())->getCurrent();
     $border = 0;
     $pdf = new fpdi();
     $pdf->setMargins(5, 5, 5, 5);
     $pdf->SetAutoPageBreak(FALSE);
     $pdf->SetFont('freeserif', '', 10);
     if ($show_background == TRUE) {
         //Import original Gov't supplied PDF.
         $pagecount = $pdf->setSourceFile(Environment::getBasePath() . 'interface' . DIRECTORY_SEPARATOR . 'forms' . DIRECTORY_SEPARATOR . 'us' . DIRECTORY_SEPARATOR . 'tax' . DIRECTORY_SEPARATOR . 'w3.pdf');
         $tplidx_summary = $pdf->ImportPage(1);
     }
     $pdf->AddPage();
     if (isset($tplidx_summary)) {
         $pdf->useTemplate($tplidx_summary, 0, 0);
     }
     //Form year
     if ($show_background == TRUE) {
         $pdf->SetFont('freeserif', '', 18);
         $pdf->setFillColor(255, 255, 255);
         $pdf->setXY(135, 154);
         $pdf->Cell(20, 7, $filter_data['year'], $border, 1, 'C', 1);
         $pdf->SetFont('freeserif', '', 10);
         $pdf->setXY(59, 203.3);
         $pdf->Cell(9, 4, $filter_data['year'], $border, 1, 'C', 1);
         $pdf->SetFont('freeserif', '', 10);
Esempio n. 2
0
     }
     unset($pay_period_ids, $ps_entries);
 }
 //Calc Part 1, Line 3 here.
 if (isset($lines_arr)) {
     $lines_arr['total'] = Misc::ArrayAssocSum($lines_arr, NULL, 6);
     Debug::Arr($lines_arr, 'Lines Array: ', __FILE__, __LINE__, __METHOD__, 10);
     //Line 8
     $p1_line8 = $lines_arr['total']['p1_6'] - 0;
 }
 $border = 0;
 $pdf = new fpdi();
 //Import original Gov't supplied PDF.
 if ($show_background == TRUE) {
     $pagecount = $pdf->setSourceFile(Environment::getBasePath() . 'interface' . DIRECTORY_SEPARATOR . 'forms' . DIRECTORY_SEPARATOR . 'us' . DIRECTORY_SEPARATOR . 'tax' . DIRECTORY_SEPARATOR . 'f940ez.pdf');
     $tplidx = $pdf->ImportPage(1);
 }
 $pdf->setMargins(0, 0, 0, 0);
 $pdf->SetAutoPageBreak(FALSE);
 $pdf->SetFont('freeserif', '', 10);
 $pdf->AddPage();
 if (isset($tplidx)) {
     $pdf->useTemplate($tplidx, 0, 0);
 }
 $pdf->setXY(40, 39);
 $pdf->Cell(75, 6, $current_company->getName(), $border, 0, 'L');
 $pdf->setXY(157, 39);
 $pdf->Cell(10, 6, $filter_data['year'], $border, 0, 'R');
 $pdf->setXY(122, 47);
 $pdf->Cell(45, 6, $current_company->getBusinessNumber(), $border, 0, 'R');
 $pdf->setXY(40, 56);
Esempio n. 3
0
 $cdlf = new CompanyDeductionListFactory();
 $cdlf->getByCompanyIdAndStatusIdAndTypeId($current_company->getId(), array(10, 20), 10);
 if ($cdlf->getRecordCount() > 0) {
     foreach ($cdlf as $cd_obj) {
         $tax_deductions[] = array('id' => $cd_obj->getId(), 'province' => $cd_obj->getProvince(), 'district' => $cd_obj->getDistrict(), 'pay_stub_entry_account_id' => $cd_obj->getPayStubEntryAccount(), 'include' => $cd_obj->getIncludePayStubEntryAccount(), 'exclude' => $cd_obj->getExcludePayStubEntryAccount(), 'user_ids' => $cd_obj->getUser());
     }
 }
 $border = 0;
 $adjust_x = 0;
 $adjust_y = 0;
 $pdf = new fpdi();
 $pdf->SetFont('freeserif', '', 10);
 if ($show_background == TRUE) {
     $pagecount = $pdf->setSourceFile(Environment::getBasePath() . 'interface' . DIRECTORY_SEPARATOR . 'forms' . DIRECTORY_SEPARATOR . 'us' . DIRECTORY_SEPARATOR . 'tax' . DIRECTORY_SEPARATOR . 'f1099misc.pdf');
     //Import original Gov't supplied PDF.
     $tplidx[1] = $pdf->ImportPage(1);
     $tplidx[2] = $pdf->ImportPage(2);
     $tplidx[3] = $pdf->ImportPage(3);
     $tplidx[4] = $pdf->ImportPage(4);
     $tplidx[5] = $pdf->ImportPage(5);
     $tplidx[6] = $pdf->ImportPage(6);
 }
 if (isset($raw_rows)) {
     $ulf = new UserListFactory();
     $x = 0;
     foreach ($raw_rows as $user_id => $raw_row) {
         $user_obj = $ulf->getById($user_id)->getCurrent();
         //Handle state/district data here
         //FIXME: Loop through each raw_row pay stub account IDs, and match them to tax deductions
         //that way if a user is removed from a tax deduction half way through the year it will
         //still match up, assuming it isn't deleted.