当前位置: 首页>>代码示例>>PHP>>正文


PHP Misc::AdjustXY方法代码示例

本文整理汇总了PHP中Misc::AdjustXY方法的典型用法代码示例。如果您正苦于以下问题:PHP Misc::AdjustXY方法的具体用法?PHP Misc::AdjustXY怎么用?PHP Misc::AdjustXY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Misc的用法示例。


在下文中一共展示了Misc::AdjustXY方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getROE


//.........这里部分代码省略.........
             //Last day paid
             $last_date = getdate($r_obj->getLastDate());
             $pdf->setXY(175, 75);
             $pdf->Cell(8, 10, $last_date['mday'], $border, 0, 'C');
             $pdf->setXY(185, 75);
             $pdf->Cell(8, 10, $last_date['mon'], $border, 0, 'C');
             $pdf->setXY(196, 75);
             $pdf->Cell(10, 10, $last_date['year'], $border, 0, 'C');
             //Pay Period End Date
             $pay_period_end_date = getdate($r_obj->getPayPeriodEndDate());
             $pdf->setXY(175, 86);
             $pdf->Cell(8, 10, $pay_period_end_date['mday'], $border, 0, 'C');
             $pdf->setXY(185, 86);
             $pdf->Cell(8, 10, $pay_period_end_date['mon'], $border, 0, 'C');
             $pdf->setXY(196, 86);
             $pdf->Cell(10, 10, $pay_period_end_date['year'], $border, 0, 'C');
             //Insurable Hours
             $pdf->SetFontSize(10);
             $pdf->setXY(75, 113);
             $pdf->Cell(25, 10, Misc::getBeforeDecimal($r_obj->getInsurableHours()), $border, 0, 'R');
             $pdf->setXY(101, 113);
             $pdf->Cell(10, 10, Misc::getAfterDecimal(Misc::MoneyFormat($r_obj->getInsurableHours(), FALSE)), $border, 0, 'L');
             //Enter Code
             $pdf->setXY(185, 113);
             $pdf->Cell(10, 10, $r_obj->getCode(), $border, 0, 'C');
             //Further Information Contact Name
             $pdf->setXY(130, 126);
             $pdf->Cell(75, 5, $created_user_obj->getFullName(), $border, 0, 'R');
             $pdf->setXY(130, 132);
             $pdf->Cell(75, 10, $created_user_obj->getWorkPhone(), $border, 0, 'R');
             //Insurable Earnings
             $pdf->setXY(75, 131);
             $pdf->Cell(25, 10, Misc::getBeforeDecimal($r_obj->getInsurableEarnings()), $border, 0, 'R');
             $pdf->setXY(101, 131);
             $pdf->Cell(10, 10, Misc::getAfterDecimal(Misc::MoneyFormat($r_obj->getInsurableEarnings(), FALSE)), $border, 0, 'L');
             //Check to see if a pay period didn't have earnings.
             if ($r_obj->isPayPeriodWithNoEarnings() == TRUE) {
                 $pay_period_earnings = $r_obj->getInsurableEarningsByPayPeriod();
                 if (is_array($pay_period_earnings)) {
                     //Add additional entries for testing alignment purposes.
                     /*
                     for( $y=0; $y < 14; $y++ ) {
                     	$pay_period_earnings[] = array('amount' => rand(1,10) );
                     }
                     */
                     $top_left_x = $x = Misc::AdjustXY(30, 0);
                     $top_left_y = $y = Misc::AdjustXY(157, 0);
                     $col = 1;
                     $i = 1;
                     foreach ($pay_period_earnings as $pay_period_earning) {
                         Debug::Text('I: ' . $i . ' X: ' . $x . ' Y: ' . $y . ' Col: ' . $col . ' Amount: ' . (double) $pay_period_earning['amount'], __FILE__, __LINE__, __METHOD__, 10);
                         $pdf->setXY($x, $y);
                         $pdf->Cell(6, 6, Misc::MoneyFormat((double) $pay_period_earning['amount'], FALSE), $border, 0, 'R');
                         if ($i > 0 and $i % 3 == 0) {
                             $x = $top_left_x;
                             $y += 7;
                         } else {
                             $x += 35;
                         }
                         $i++;
                     }
                 }
             }
             //Box 17A, Vacation pay in last pay period.
             $vacation_pay = $r_obj->getLastPayPeriodVacationEarnings();
             if ($vacation_pay > 0) {
                 $pdf->setXY(132, 155);
                 $pdf->Cell(10, 10, Misc::getBeforeDecimal(Misc::MoneyFormat($vacation_pay, FALSE)), $border, 0, 'R');
                 $pdf->Cell(10, 10, Misc::getAfterDecimal(Misc::MoneyFormat($vacation_pay, FALSE)), $border, 0, 'L');
             }
             //Comments
             $pdf->setXY(115, 212);
             $pdf->MultiCell(85, 5, $r_obj->getComments(), $border, 'L');
             //English
             $pdf->setXY(8.5, 256.5);
             $pdf->Cell(10, 10, 'X', $border, 0, 'L');
             //ROE creator phone number
             $pdf->setXY(75, 258);
             $pdf->Cell(25, 10, $created_user_obj->getWorkPhone(), $border, 0, 'L');
             //ROE create name.
             $pdf->SetFontSize(12);
             $pdf->setXY(87, 273);
             $pdf->Cell(75, 10, $created_user_obj->getFullName(), $border, 0, 'C');
             //Create Date
             $created_date = getdate($r_obj->getCreatedDate());
             $pdf->SetFontSize(10);
             $pdf->setXY(175, 273);
             $pdf->Cell(8, 10, $created_date['mday'], $border, 0, 'C');
             $pdf->setXY(185, 273);
             $pdf->Cell(8, 10, $created_date['mon'], $border, 0, 'C');
             $pdf->setXY(195, 273);
             $pdf->Cell(10, 10, $created_date['year'], $border, 0, 'C');
         }
         $output = $pdf->Output('', 'S');
     }
     if (isset($output)) {
         return $output;
     }
     return FALSE;
 }
开发者ID:alachaum,项目名称:timetrex,代码行数:101,代码来源:ROEFactory.class.php

示例2: drawCell

 function drawCell($data, $field_layout_data, $additional_x_offset = 0, $additional_y_offset = 0)
 {
     if (isset($data) and $data !== NULL or $this->getShowBorder() == TRUE) {
         Debug::Text('&nbsp;&nbsp;Data: ' . $data, __FILE__, __LINE__, __METHOD__, 10);
         if (isset($field_layout_data['x']) and $field_layout_data['y']) {
             $this->getPDFObject()->setXY(Misc::AdjustXY($field_layout_data['x'], $this->getXOffset() + $additional_x_offset), Misc::AdjustXY($field_layout_data['y'], $this->getYOffset() + $additional_y_offset));
         }
         if (!isset($field_layout_data['ln'])) {
             $field_layout_data['ln'] = 0;
         }
         if (isset($field_layout_data['fontsize'])) {
             if (!isset($field_layout_data['fontstyle'])) {
                 $field_layout_data['fontstyle'] = $this->getDefaultFontStyle();
             }
             $this->getPDFObject()->SetFont($this->getDefaultFont(), $field_layout_data['fontstyle'], $field_layout_data['fontsize']);
         }
         if (isset($field_layout_data['w']) and isset($field_layout_data['h']) and isset($field_layout_data['align'])) {
             if (isset($field_layout_data['multicell'])) {
                 $this->getPDFObject()->MultiCell($field_layout_data['w'], $field_layout_data['h'], $data, $this->getShowBorder(), $field_layout_data['align']);
             } else {
                 if (isset($field_layout_data['split_decimal'])) {
                     $this->getPDFObject()->Cell($field_layout_data['w'] - $this->getDecimalFieldSize(), $field_layout_data['h'], Misc::getBeforeDecimal($data), $this->getShowBorder(), 0, $field_layout_data['align']);
                     $this->getPDFObject()->Cell($this->getDecimalFieldSize(), $field_layout_data['h'], Misc::getAfterDecimal($data), $this->getShowBorder(), $field_layout_data['ln'], $field_layout_data['align']);
                 } else {
                     $this->getPDFObject()->Cell($field_layout_data['w'], $field_layout_data['h'], $data, $this->getShowBorder(), $field_layout_data['ln'], $field_layout_data['align']);
                 }
             }
         }
         if (isset($field_layout_data['fontsize'])) {
             $this->SetFont();
             //Return to default font
         }
     }
     return TRUE;
 }
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:35,代码来源:TaxForms.class.php

示例3: getPayStub

 function getPayStub($pslf = NULL, $hide_employer_rows = TRUE)
 {
     if (!is_object($pslf) and $this->getId() != '') {
         $pslf = new PayStubListFactory();
         $pslf->getById($this->getId());
     }
     if (get_class($pslf) !== 'PayStubListFactory') {
         return FALSE;
     }
     $border = 0;
     if ($pslf->getRecordCount() > 0) {
         $pdf = new TTPDF('P', 'mm', 'Letter');
         $pdf->setMargins(0, 0);
         //$pdf->SetAutoPageBreak(TRUE, 30);
         $pdf->SetAutoPageBreak(FALSE);
         $pdf->SetFont('freeserif', '', 10);
         //$pdf->SetFont('FreeSans','',10);
         $i = 0;
         foreach ($pslf as $pay_stub_obj) {
             $psealf = new PayStubEntryAccountListFactory();
             Debug::text($i . '. Pay Stub Transaction Date: ' . $pay_stub_obj->getTransactionDate(), __FILE__, __LINE__, __METHOD__, 10);
             //Get Pay Period information
             $pplf = new PayPeriodListFactory();
             $pay_period_obj = $pplf->getById($pay_stub_obj->getPayPeriod())->getCurrent();
             //Use Pay Stub dates, not Pay Period dates.
             $pp_start_date = $pay_stub_obj->getStartDate();
             $pp_end_date = $pay_stub_obj->getEndDate();
             $pp_transaction_date = $pay_stub_obj->getTransactionDate();
             //Get pay period numbers
             $ppslf = new PayPeriodScheduleListFactory();
             $pay_period_schedule_obj = $ppslf->getById($pay_period_obj->getPayPeriodSchedule())->getCurrent();
             //Get User information
             $ulf = new UserListFactory();
             $user_obj = $ulf->getById($pay_stub_obj->getUser())->getCurrent();
             //Get company information
             $clf = new CompanyListFactory();
             $company_obj = $clf->getById($user_obj->getCompany())->getCurrent();
             //Change locale to users own locale.
             TTi18n::setCountry($user_obj->getCountry());
             TTi18n::setLanguage($user_obj->getUserPreferenceObject()->getLanguage());
             TTi18n::setLocale();
             //
             // Pay Stub Header
             //
             $pdf->AddPage();
             $adjust_x = 20;
             $adjust_y = 10;
             //Logo
             $pdf->Image($company_obj->getLogoFileName(), Misc::AdjustXY(0, $adjust_x + 0), Misc::AdjustXY(1, $adjust_y + 0), 50, 12, '', '', '', FALSE, 300, '', FALSE, FALSE, 0, TRUE);
             //Company name/address
             $pdf->SetFont('', 'B', 14);
             $pdf->setXY(Misc::AdjustXY(50, $adjust_x), Misc::AdjustXY(0, $adjust_y));
             $pdf->Cell(75, 5, $company_obj->getName(), $border, 0, 'C');
             $pdf->SetFont('', '', 10);
             $pdf->setXY(Misc::AdjustXY(50, $adjust_x), Misc::AdjustXY(5, $adjust_y));
             $pdf->Cell(75, 5, $company_obj->getAddress1() . ' ' . $company_obj->getAddress2(), $border, 0, 'C');
             $pdf->setXY(Misc::AdjustXY(50, $adjust_x), Misc::AdjustXY(10, $adjust_y));
             $pdf->Cell(75, 5, $company_obj->getCity() . ', ' . $company_obj->getProvince() . ' ' . strtoupper($company_obj->getPostalCode()), $border, 0, 'C');
             //Pay Period info
             $pdf->SetFont('', '', 10);
             $pdf->setXY(Misc::AdjustXY(125, $adjust_x), Misc::AdjustXY(0, $adjust_y));
             $pdf->Cell(30, 5, TTi18n::gettext('Pay Start Date:') . ' ', $border, 0, 'R');
             $pdf->setXY(Misc::AdjustXY(125, $adjust_x), Misc::AdjustXY(5, $adjust_y));
             $pdf->Cell(30, 5, TTi18n::gettext('Pay End Date:') . ' ', $border, 0, 'R');
             $pdf->setXY(Misc::AdjustXY(125, $adjust_x), Misc::AdjustXY(10, $adjust_y));
             $pdf->Cell(30, 5, TTi18n::gettext('Payment Date:') . ' ', $border, 0, 'R');
             $pdf->SetFont('', 'B', 10);
             $pdf->setXY(Misc::AdjustXY(155, $adjust_x), Misc::AdjustXY(0, $adjust_y));
             $pdf->Cell(20, 5, TTDate::getDate('DATE', $pp_start_date), $border, 0, 'R');
             $pdf->setXY(Misc::AdjustXY(155, $adjust_x), Misc::AdjustXY(5, $adjust_y));
             $pdf->Cell(20, 5, TTDate::getDate('DATE', $pp_end_date), $border, 0, 'R');
             $pdf->setXY(Misc::AdjustXY(155, $adjust_x), Misc::AdjustXY(10, $adjust_y));
             $pdf->Cell(20, 5, TTDate::getDate('DATE', $pp_transaction_date), $border, 0, 'R');
             //Line
             $pdf->setLineWidth(1);
             $pdf->Line(Misc::AdjustXY(0, $adjust_x), Misc::AdjustXY(17, $adjust_y), Misc::AdjustXY(185, $adjust_y), Misc::AdjustXY(17, $adjust_y));
             $pdf->SetFont('', 'B', 14);
             $pdf->setXY(Misc::AdjustXY(0, $adjust_x), Misc::AdjustXY(19, $adjust_y));
             $pdf->Cell(175, 5, TTi18n::gettext('STATEMENT OF EARNINGS AND DEDUCTIONS'), $border, 0, 'C', 0);
             //Line
             $pdf->setLineWidth(1);
             $pdf->Line(Misc::AdjustXY(0, $adjust_x), Misc::AdjustXY(27, $adjust_y), Misc::AdjustXY(185, $adjust_y), Misc::AdjustXY(27, $adjust_y));
             $pdf->setLineWidth(0.25);
             //Get pay stub entries.
             $pself = new PayStubEntryListFactory();
             $pself->getByPayStubId($pay_stub_obj->getId());
             Debug::text('Pay Stub Entries: ' . $pself->getRecordCount(), __FILE__, __LINE__, __METHOD__, 10);
             $prev_type = NULL;
             $description_subscript_counter = 1;
             foreach ($pself as $pay_stub_entry) {
                 Debug::text('Pay Stub Entry Account ID: ' . $pay_stub_entry->getPayStubEntryNameId(), __FILE__, __LINE__, __METHOD__, 10);
                 $description_subscript = NULL;
                 $pay_stub_entry_name_obj = $psealf->getById($pay_stub_entry->getPayStubEntryNameId())->getCurrent();
                 //Use this to put the total for each type at the end of the array.
                 if ($prev_type == 40 or $pay_stub_entry_name_obj->getType() != 40) {
                     $type = $pay_stub_entry_name_obj->getType();
                 }
                 //Debug::text('Pay Stub Entry Name ID: '. $pay_stub_entry_name_obj->getId() .' Type ID: '. $pay_stub_entry_name_obj->getType() .' Type: '. $type, __FILE__, __LINE__, __METHOD__,10);
                 if ($pay_stub_entry->getDescription() !== NULL and $pay_stub_entry->getDescription() !== FALSE and strlen($pay_stub_entry->getDescription()) > 0) {
                     $pay_stub_entry_descriptions[] = array('subscript' => $description_subscript_counter, 'description' => $pay_stub_entry->getDescription());
//.........这里部分代码省略.........
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:101,代码来源:PayStubFactory.class.php

示例4: strlen

             $pdf->Cell(60, 5, $user_data['first_name'] . ' ' . $user_data['last_name'], $border, 0, 'C');
             $pdf->Ln();
             $pdf->Cell(140, 5, '', $border, 0, 'R');
             $pdf->Cell(60, 5, '_____________________________', $border, 0, 'C');
             $pdf->Ln();
             $pdf->Cell(140, 5, '', $border, 0, 'R');
             $pdf->Cell(60, 5, TTi18n::gettext('(print name)'), $border, 0, 'C');
             if ($user_data['verified_time_sheet_date'] != FALSE) {
                 $pdf->Ln();
                 $pdf->SetFont('', 'B', 10);
                 $pdf->Cell(200, 5, TTi18n::gettext('TimeSheet electronically signed by') . ' ' . $user_data['first_name'] . ' ' . $user_data['last_name'] . ' ' . TTi18n::gettext('on') . ' ' . TTDate::getDate('DATE+TIME', $user_data['verified_time_sheet_date']), $border, 0, 'C');
                 $pdf->SetFont('', '', 10);
             }
             //Add generated date/time at the bottom.
             $pdf->SetFont('', 'I', 8);
             $pdf->setXY(Misc::AdjustXY(0, $adjust_x), Misc::AdjustXY(245, $adjust_y));
             $pdf->Cell(200, 5, TTi18n::gettext('Generated:') . ' ' . TTDate::getDate('DATE+TIME', $pdf_created_date), $border, 0, 'C');
         }
         $output = $pdf->Output('', 'S');
     }
     if ($output !== FALSE and Debug::getVerbosity() < 11) {
         Misc::FileDownloadHeader('detailed_timesheet.pdf', 'application/pdf', strlen($output));
         echo $output;
         exit;
     } else {
         //Debug::Display();
         echo TTi18n::gettext('ERROR: Employee TimeSheet(s) not available!') . "<br>\n";
         exit;
     }
 } elseif ($action == 'export') {
     if (isset($rows) and isset($filter_columns)) {
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:TimesheetDetail.php

示例5: unset

                 }
             }
         }
         unset($lines_arr);
     }
 } elseif ($show_background == TRUE) {
     for ($i = 1; $i <= 6; $i++) {
         $pdf->AddPage();
         $pdf->useTemplate($tplidx[$i], 0, 0);
         if ($show_background == TRUE) {
             $pdf->SetFont('freeserif', 'B', 24);
             $pdf->setFillColor(255, 255, 255);
             if ($i == 1) {
                 $pdf->setXY(Misc::AdjustXY(152, $adjust_x), Misc::AdjustXY(28, $adjust_y));
             } elseif (in_array($i, array(2, 4, 5))) {
                 $pdf->setXY(Misc::AdjustXY(151, $adjust_x), Misc::AdjustXY(28, $adjust_y));
             }
             $pdf->Cell(10, 7, date('y', $filter_data['transaction_end_date']), $border, 0, 'C', 1);
             $pdf->SetFont('freeserif', '', 10);
         }
     }
 }
 //Finish off PDF
 $output = $pdf->Output('', 'S');
 if (Debug::getVerbosity() == 11) {
     Debug::Display();
 } else {
     Misc::FileDownloadHeader('f1099misc.pdf', 'application/pdf', strlen($output));
     echo $output;
 }
 exit;
开发者ID:J-P-Hanafin,项目名称:TimeTrex-1,代码行数:31,代码来源:Form1099Misc.php

示例6: getPayStub

 function getPayStub($pslf = NULL, $hide_employer_rows = TRUE)
 {
     if (!is_object($pslf) and $this->getId() != '') {
         $pslf = TTnew('PayStubListFactory');
         $pslf->getById($this->getId());
     }
     if (get_class($pslf) !== 'PayStubListFactory') {
         return FALSE;
     }
     $border = 0;
     if ($pslf->getRecordCount() > 0) {
         $pdf = new TTPDF('P', 'mm', 'Letter');
         $pdf->setMargins(0, 0);
         //$pdf->SetAutoPageBreak(TRUE, 30);
         $pdf->SetAutoPageBreak(FALSE);
         $i = 0;
         foreach ($pslf as $pay_stub_obj) {
             $psealf = TTnew('PayStubEntryAccountListFactory');
             //Debug::text($i .'. Pay Stub Transaction Date: '. $pay_stub_obj->getTransactionDate(), __FILE__, __LINE__, __METHOD__,10);
             //Get Pay Period information
             $pplf = TTnew('PayPeriodListFactory');
             $pay_period_obj = $pplf->getById($pay_stub_obj->getPayPeriod())->getCurrent();
             //Use Pay Stub dates, not Pay Period dates.
             $pp_start_date = $pay_stub_obj->getStartDate();
             $pp_end_date = $pay_stub_obj->getEndDate();
             $pp_transaction_date = $pay_stub_obj->getTransactionDate();
             //Get User information
             $ulf = TTnew('UserListFactory');
             $user_obj = $ulf->getById($pay_stub_obj->getUser())->getCurrent();
             //Get company information
             $clf = TTnew('CompanyListFactory');
             $company_obj = $clf->getById($user_obj->getCompany())->getCurrent();
             //Change locale to users own locale.
             TTi18n::setLanguage($user_obj->getUserPreferenceObject()->getLanguage());
             TTi18n::setCountry($user_obj->getCountry());
             TTi18n::setLocale();
             $pdf->SetFont(TTi18n::getPDFDefaultFont($user_obj->getUserPreferenceObject()->getLanguage()), '', 10);
             //
             // Pay Stub Header
             //
             $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
             $pdf->AddPage();
             $adjust_x = 20;
             $adjust_y = 10;
             //Logo
             $pdf->Image($company_obj->getLogoFileName(NULL, TRUE, FALSE, 'large'), Misc::AdjustXY(0, $adjust_x + 0), Misc::AdjustXY(1, $adjust_y + 0), $pdf->pixelsToUnits(167), $pdf->pixelsToUnits(42), '', '', '', FALSE, 300, '', FALSE, FALSE, 0, TRUE);
             //Company name/address
             $pdf->SetFont('', 'B', 14);
             $pdf->setXY(Misc::AdjustXY(50, $adjust_x), Misc::AdjustXY(0, $adjust_y));
             $pdf->Cell(75, 5, $company_obj->getName(), $border, 0, 'C', FALSE, '', 1);
             $pdf->SetFont('', '', 10);
             $pdf->setXY(Misc::AdjustXY(50, $adjust_x), Misc::AdjustXY(6, $adjust_y));
             $pdf->Cell(75, 5, $company_obj->getAddress1() . ' ' . $company_obj->getAddress2(), $border, 0, 'C', FALSE, '', 1);
             $pdf->setXY(Misc::AdjustXY(50, $adjust_x), Misc::AdjustXY(10, $adjust_y));
             $pdf->Cell(75, 5, $company_obj->getCity() . ', ' . $company_obj->getProvince() . ' ' . strtoupper($company_obj->getPostalCode()), $border, 0, 'C', FALSE, '', 1);
             //Pay Period info
             $pdf->SetFont('', '', 10);
             $pdf->setXY(Misc::AdjustXY(125, $adjust_x), Misc::AdjustXY(0, $adjust_y));
             $pdf->Cell(30, 5, TTi18n::gettext('Pay Start Date:') . ' ', $border, 0, 'R', FALSE, '', 1);
             $pdf->setXY(Misc::AdjustXY(125, $adjust_x), Misc::AdjustXY(5, $adjust_y));
             $pdf->Cell(30, 5, TTi18n::gettext('Pay End Date:') . ' ', $border, 0, 'R', FALSE, '', 1);
             $pdf->setXY(Misc::AdjustXY(125, $adjust_x), Misc::AdjustXY(10, $adjust_y));
             $pdf->Cell(30, 5, TTi18n::gettext('Payment Date:') . ' ', $border, 0, 'R', FALSE, '', 1);
             $pdf->SetFont('', 'B', 10);
             $pdf->setXY(Misc::AdjustXY(155, $adjust_x), Misc::AdjustXY(0, $adjust_y));
             $pdf->Cell(20, 5, TTDate::getDate('DATE', $pp_start_date), $border, 0, 'R', FALSE, '', 1);
             $pdf->setXY(Misc::AdjustXY(155, $adjust_x), Misc::AdjustXY(5, $adjust_y));
             $pdf->Cell(20, 5, TTDate::getDate('DATE', $pp_end_date), $border, 0, 'R', FALSE, '', 1);
             $pdf->setXY(Misc::AdjustXY(155, $adjust_x), Misc::AdjustXY(10, $adjust_y));
             $pdf->Cell(20, 5, TTDate::getDate('DATE', $pp_transaction_date), $border, 0, 'R', FALSE, '', 1);
             //Line
             $pdf->setLineWidth(1);
             $pdf->Line(Misc::AdjustXY(0, $adjust_x), Misc::AdjustXY(17, $adjust_y), Misc::AdjustXY(185, $adjust_y), Misc::AdjustXY(17, $adjust_y));
             $pdf->SetFont('', 'B', 14);
             $pdf->setXY(Misc::AdjustXY(0, $adjust_x), Misc::AdjustXY(19, $adjust_y));
             $pdf->Cell(175, 5, TTi18n::gettext('STATEMENT OF EARNINGS AND DEDUCTIONS'), $border, 0, 'C', FALSE, '', 1);
             //Line
             $pdf->setLineWidth(1);
             $pdf->Line(Misc::AdjustXY(0, $adjust_x), Misc::AdjustXY(27, $adjust_y), Misc::AdjustXY(185, $adjust_y), Misc::AdjustXY(27, $adjust_y));
             $pdf->setLineWidth(0.25);
             //Get pay stub entries.
             $pself = TTnew('PayStubEntryListFactory');
             $pself->getByPayStubId($pay_stub_obj->getId());
             Debug::text('Pay Stub Entries: ' . $pself->getRecordCount(), __FILE__, __LINE__, __METHOD__, 10);
             $max_widths = array('units' => 0, 'rate' => 0, 'amount' => 0, 'ytd_amount' => 0);
             $prev_type = NULL;
             $description_subscript_counter = 1;
             foreach ($pself as $pay_stub_entry) {
                 //Debug::text('Pay Stub Entry Account ID: '.$pay_stub_entry->getPayStubEntryNameId()  , __FILE__, __LINE__, __METHOD__,10);
                 $description_subscript = NULL;
                 $pay_stub_entry_name_obj = $psealf->getById($pay_stub_entry->getPayStubEntryNameId())->getCurrent();
                 //Use this to put the total for each type at the end of the array.
                 if ($prev_type == 40 or $pay_stub_entry_name_obj->getType() != 40) {
                     $type = $pay_stub_entry_name_obj->getType();
                 }
                 //Debug::text('Pay Stub Entry Name ID: '. $pay_stub_entry_name_obj->getId() .' Type ID: '. $pay_stub_entry_name_obj->getType() .' Type: '. $type, __FILE__, __LINE__, __METHOD__,10);
                 if ($pay_stub_entry->getDescription() !== NULL and $pay_stub_entry->getDescription() !== FALSE and strlen($pay_stub_entry->getDescription()) > 0 and ($type != 30 or $type == 30 and $hide_employer_rows == FALSE)) {
                     //Make sure PSA descriptions are not shown on employee pay stubs.
                     $pay_stub_entry_descriptions[] = array('subscript' => $description_subscript_counter, 'description' => $pay_stub_entry->getDescription());
                     $description_subscript = $description_subscript_counter;
//.........这里部分代码省略.........
开发者ID:alachaum,项目名称:timetrex,代码行数:101,代码来源:PayStubFactory.class.php


注:本文中的Misc::AdjustXY方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。