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


PHP Controller::actionDownload方法代码示例

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


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

示例1: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select a.grno,a.grdate,a.grheaderid,b.pono,c.fullname\r\n      from grheader a\r\n      left join poheader b on b.poheaderid = a.poheaderid\r\n      left join addressbook c on c.addressbookid = b.addressbookid ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.grheaderid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Nota Penerimaan Barang';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     foreach ($dataReader as $row) {
         $this->pdf->setFont('Arial', 'B', 8);
         $this->pdf->text(10, 30, 'No ');
         $this->pdf->text(50, 30, ': ' . $row['grno']);
         $this->pdf->text(10, 35, 'Date ');
         $this->pdf->text(50, 35, ': ' . $row['grdate']);
         $this->pdf->text(10, 40, 'PO No ');
         $this->pdf->text(50, 40, ': ' . $row['pono']);
         $this->pdf->text(10, 45, 'Vendor ');
         $this->pdf->text(50, 45, ': ' . $row['fullname']);
         $sql1 = "select b.productname, a.qty, c.uomcode,d.description\r\n        from grdetail a\r\n        left join product b on b.productid = a.productid\r\n        left join unitofmeasure c on c.unitofmeasureid = a.unitofmeasureid\r\n        left join sloc d on d.slocid = a.slocid\r\n        where grheaderid = " . $row['grheaderid'];
         $command1 = $this->connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $this->pdf->text(10, 55, 'Items');
         $this->pdf->SetY(60);
         $this->pdf->setaligns(array('C', 'C', 'C', 'C', 'C', 'C'));
         $this->pdf->setFont('Arial', 'B', 6);
         $this->pdf->setwidths(array(10, 110, 20, 20, 20, 40));
         $this->pdf->Row(array('No', 'Nama Barang', 'Qty', 'Unit', 'Gudang'));
         $this->pdf->setFont('Arial', '', 6);
         $this->pdf->setaligns(array('L', 'L', 'L', 'L', 'L', 'L'));
         $i = 0;
         foreach ($dataReader1 as $row1) {
             $i = $i + 1;
             $this->pdf->row(array($i, $row1['productname'], Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberqty"], $row1['qty']), $row1['uomcode'], $row1['description']));
         }
         $this->pdf->text(10, $this->pdf->gety() + 10, 'PT SATKOMINDO MEDIYASA');
         $this->pdf->text(50, $this->pdf->gety() + 10, 'PETUGAS GUDANG');
         $this->pdf->text(100, $this->pdf->gety() + 10, 'PENGIRIM');
         $this->pdf->text(150, $this->pdf->gety() + 10, 'PENERIMA');
         $this->pdf->text(10, $this->pdf->gety() + 20, '----------------------');
         $this->pdf->text(50, $this->pdf->gety() + 20, '----------------------');
         $this->pdf->text(100, $this->pdf->gety() + 20, '----------------------');
         $this->pdf->text(150, $this->pdf->gety() + 20, '----------------------');
         $this->pdf->AddPage('P');
     }
     // me-render ke browser
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:53,代码来源:ReportgrController.php

示例2: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select a.dano,a.dadate,a.headernote,a.deliveryadviceid\r\n      from deliveryadvice a ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.deliveryadviceid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Form Permintaan (Barang/Jasa)';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     foreach ($dataReader as $row) {
         $this->pdf->setFont('Arial', 'B', 8);
         $this->pdf->text(10, 30, 'No ');
         $this->pdf->text(50, 30, ': ' . $row['dano']);
         $this->pdf->text(10, 35, 'Date ');
         $this->pdf->text(50, 35, ': ' . $row['dadate']);
         $this->pdf->text(10, 40, 'Note ');
         $this->pdf->text(50, 40, ': ' . $row['headernote']);
         $sql1 = "select b.productname, a.qty, c.uomcode, a.itemtext\r\n        from deliveryadvicedetail a\r\n        left join product b on b.productid = a.productid\r\n        left join unitofmeasure c on c.unitofmeasureid = a.unitofmeasureid\r\n        where deliveryadviceid = " . $row['deliveryadviceid'];
         $command1 = $this->connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $this->pdf->text(10, 50, 'Items');
         $this->pdf->SetY(55);
         $this->pdf->setFont('Arial', 'B', 6);
         $this->pdf->setaligns(array('C', 'C', 'C', 'C', 'C'));
         $this->pdf->setwidths(array(10, 90, 25, 25, 40));
         $this->pdf->setFont('Arial', '', 6);
         $this->pdf->Row(array('No', 'Items', 'Qty', 'Unit', 'Remark'));
         $this->pdf->setaligns(array('L', 'L', 'L', 'L', 'L'));
         $i = 0;
         foreach ($dataReader1 as $row1) {
             $i = $i + 1;
             $this->pdf->row(array($i, $row1['productname'], Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberqty"], $row1['qty']), $row1['uomcode'], $row1['itemtext']));
         }
         $this->pdf->text(100, $this->pdf->gety() + 5, 'Jakarta, ' . $row['dadate']);
         $this->pdf->text(10, $this->pdf->gety() + 10, 'Approved By');
         $this->pdf->text(100, $this->pdf->gety() + 10, 'Proposed By');
         $this->pdf->text(10, $this->pdf->gety() + 20, '------------ ');
         $this->pdf->text(100, $this->pdf->gety() + 20, '------------');
         $this->pdf->AddPage('P');
     }
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:47,代码来源:ReportdaController.php

示例3: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Material Stock Overview List';
     $pdf->AddPage('L');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $header = array('No', 'ID', 'Material Name', 'Sloc', 'Qty', 'UOM', 'Prod Trans Type', 'Ref Source');
     $model = new Productstock('search');
     $dataprovider = $model->search();
     $dataprovider->pagination = false;
     $data = $dataprovider->getData();
     $cols = $dataprovider->getKeys();
     $dataku = array(count($data));
     //var_dump($dataku);
     $w = array(10, 15, 70, 30, 30, 30, 40, 30);
     $pdf->SetTableHeader();
     //Header
     for ($i = 0; $i < count($header); $i++) {
         $pdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);
     }
     $pdf->Ln();
     $pdf->SetTableData();
     //Data
     $fill = false;
     $i = 0;
     foreach ($data as $datas) {
         $i = $i + 1;
         $pdf->Cell($w[0], 6, $i, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[1], 6, $datas['productstockid'], 'LR', 0, 'L', $fill);
         $pdf->Cell($w[2], 6, Product::model()->findbypk($datas['productid'])->productname, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[3], 6, Sloc::model()->findbypk($datas['slocid'])->sloccode, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[4], 6, $datas['qty'], 'LR', 0, 'L', $fill);
         $pdf->Cell($w[5], 6, Unitofmeasure::model()->findbypk($datas['unitofmeasureid'])->uomcode, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[6], 6, Prodtranstype::model()->findbypk($datas['prodtranstypeid'])->description, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[7], 6, $datas['refsource'], 'LR', 0, 'L', $fill);
         $pdf->Ln();
         $fill = !$fill;
     }
     $pdf->Cell(array_sum($w), 0, '', 'T');
     // me-render ke browser
     $pdf->Output('productstock.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:46,代码来源:ProductstockController.php

示例4: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select a.*\r\n\t\t\t\tfrom translock a ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.translockid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Transaction Lock List';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     $this->pdf->setaligns(array('C', 'C', 'C', 'C'));
     $this->pdf->setwidths(array(40, 40, 40, 40));
     $this->pdf->Row(array('Menu Name', 'ID', 'Locked By', 'Locked Date'));
     $this->pdf->setaligns(array('L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $this->pdf->row(array($row1['menuname'], $row1['tableid'], $row1['lockedby'], $row1['lockeddate']));
     }
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:23,代码来源:TranslockController.php

示例5: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select a.*\r\n\t\t\t\tfrom translog a ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.translogid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Translog List';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     $this->pdf->setaligns(array('C', 'C', 'C', 'C', 'C', 'C'));
     $this->pdf->setwidths(array(40, 30, 30, 30, 30, 30));
     $this->pdf->Row(array('User Name', 'Model', 'User Action', 'Field Name', 'Field New Value', 'Field Old Value'));
     $this->pdf->setaligns(array('L', 'L', 'L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $this->pdf->row(array($row1['username'], $row1['model'], $row1['useraction'], $row1['fieldname'], $row1['fieldnewvalue'], $row1['fieldoldvalue']));
     }
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:23,代码来源:TranslogController.php

示例6: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select a.invoiceapid,a.fullname, a.oldnik, b.levelorgname, c.structurename,d.positionname,e.invoiceaptypename,\r\n        f.sexname,joindate,email,phoneno,alternateemail,hpno,a.addressbookid,a.accountno,a.taxno,g.maritalstatusname,\r\n        h.religionname,a.birthdate,i.cityname\r\n      from invoiceap a\r\n      left join levelorg b on b.levelorgid = a.levelorgid\r\n      left join orgstructure c on c.orgstructureid = a.orgstructureid\r\n      left join position d on d.positionid = a.positionid\r\n      left join invoiceaptype e on e.invoiceaptypeid = a.invoiceaptypeid\r\n      left join sex f on f.sexid = a.sexid\r\n      left join maritalstatus g on g.maritalstatusid = a.maritalstatusid\r\n      left join religion h on h.religionid = a.religionid\r\n      left join city i on i.cityid = a.birthcityid ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.invoiceapid = " . $_GET['id'];
     }
     $sql = $sql . " order by invoiceapid";
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Invoiceap List';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     foreach ($dataReader as $row) {
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . Yii::app()->request->baseUrl . '/images/invoiceap/photo-' . $row['oldnik'] . '.jpg')) {
             $this->pdf->Image($_SERVER['DOCUMENT_ROOT'] . Yii::app()->request->baseUrl . '/images/invoiceap/photo-' . $row['oldnik'] . '.jpg', 10, 30, 30);
         }
         $this->pdf->setFont('Arial', 'B', 10);
         $this->pdf->text(50, 30, 'Nama: ' . $row['fullname']);
         $this->pdf->setFont('Arial', '', 8);
         $this->pdf->text(50, 35, 'Posisi: ' . $row['positionname']);
         $this->pdf->text(50, 40, 'Struktur: ' . $row['structurename']);
         $this->pdf->text(50, 45, 'Golongan: ' . $row['levelorgname']);
         $this->pdf->text(50, 50, 'Tempat Tanggal Lahir: ' . $row['cityname'] . ', ' . date(Yii::app()->params['dateviewfromdb'], strtotime($row['birthdate'])));
         $this->pdf->text(50, 55, 'Jenis Kelamin: ' . $row['sexname']);
         $this->pdf->text(50, 60, 'Marital Status: ' . $row['maritalstatusname']);
         $this->pdf->text(50, 65, 'Agama: ' . $row['religionname']);
         $this->pdf->text(50, 70, 'Telp: ' . $row['phoneno']);
         $this->pdf->text(50, 75, 'No HP: ' . $row['hpno']);
         $this->pdf->text(50, 80, 'Email Utama: ' . $row['email']);
         $this->pdf->text(50, 85, 'Email ke-2: ' . $row['alternateemail']);
         $this->pdf->text(50, 90, 'No Rekening: ' . $row['accountno']);
         $this->pdf->text(50, 95, 'NPWP: ' . $row['taxno']);
         $sql1 = "select b.addresstypename, a.addressname, c.cityname, a.phoneno\r\n        from address a\r\n        left join addresstype b on b.addresstypeid = a.addresstypeid\r\n        left join city c on c.cityid = a.cityid\r\n        where addressbookid = " . $row['addressbookid'];
         $command1 = $this->connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $this->pdf->text(10, 100, 'Address List');
         $this->pdf->SetY(105);
         $this->pdf->setaligns(array('C', 'C', 'C', 'C'));
         $this->pdf->setwidths(array(50, 50, 50, 30));
         $this->pdf->Row(array('Address Type', 'Address', 'City', 'Phone No'));
         $this->pdf->setaligns(array('L', 'L', 'L', 'L'));
         foreach ($dataReader1 as $row1) {
             $this->pdf->row(array($row1['addresstypename'], $row1['addressname'], $row1['cityname'], $row1['phoneno']));
         }
         $sql1 = "select b.educationname, a.schoolname, a.schooldegree, c.cityname, a.yeargraduate\r\n        from invoiceapeducation a\r\n        left join education b on b.educationid = a.educationid\r\n        left join city c on c.cityid = a.cityid\r\n        where invoiceapid = " . $row['invoiceapid'];
         $command1 = $this->connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $this->pdf->text(10, $this->pdf->gety() + 10, 'Education List');
         $this->pdf->sety($this->pdf->gety() + 15);
         $this->pdf->setaligns(array('C', 'C', 'C', 'C', 'C'));
         $this->pdf->setwidths(array(50, 50, 30, 30, 30));
         $this->pdf->Row(array('Degree', 'School/Institut', 'Education Major', 'City', 'Year Graduate'));
         $this->pdf->setaligns(array('L', 'L', 'L', 'L', 'L'));
         foreach ($dataReader1 as $row1) {
             $this->pdf->row(array($row1['educationname'], $row1['schoolname'], $row1['schooldegree'], $row1['cityname'], $row1['yeargraduate']));
         }
         $sql1 = "select a.informalname,a.organizer,a.period\r\n        from invoiceapinformal a\r\n        where invoiceapid = " . $row['invoiceapid'] . " and iswo=0";
         $command1 = $this->connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $this->pdf->text(10, $this->pdf->gety() + 10, 'Informal List');
         $this->pdf->sety($this->pdf->gety() + 15);
         $this->pdf->setaligns(array('C', 'C', 'C', 'C'));
         $this->pdf->setwidths(array(60, 40, 50));
         $this->pdf->Row(array('Course / Training / Skill', 'Organizer', 'Period'));
         $this->pdf->setaligns(array('L', 'L', 'L', 'L'));
         foreach ($dataReader1 as $row1) {
             $this->pdf->row(array($row1['informalname'], $row1['organizer'], $row1['period']));
         }
         $sql1 = "select a.informalname,a.organizer,a.period,a.sponsoredby\r\n        from invoiceapinformal a\r\n        where invoiceapid = " . $row['invoiceapid'] . " and iswo=1";
         $command1 = $this->connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $this->pdf->text(10, $this->pdf->gety() + 10, 'Working Experience List');
         $this->pdf->sety($this->pdf->gety() + 15);
         $this->pdf->setaligns(array('C', 'C', 'C', 'C'));
         $this->pdf->setwidths(array(80, 30, 30, 50));
         $this->pdf->Row(array('Company', 'Golongan', 'Position', 'Period'));
         $this->pdf->setaligns(array('L', 'L', 'L', 'L'));
         foreach ($dataReader1 as $row1) {
             $this->pdf->row(array($row1['informalname'], $row1['sponsoredby'], $row1['organizer'], $row1['period']));
         }
         $sql1 = "select b.familyrelationname, a.familyname, c.cityname,\r\n        d.sexname, a.birthdate, e.educationname, f.occupationname\r\n        from invoiceapfamily a\r\n        left join familyrelation b on b.familyrelationid = a.familyrelationid\r\n        left join city c on c.cityid = a.cityid\r\n        left join sex d on d.sexid = a.sexid\r\n        left join education e on e.educationid = a.educationid\r\n        left join occupation f on f.occupationid = a.occupationid\r\n        where invoiceapid = " . $row['invoiceapid'];
         $command1 = $this->connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $this->pdf->text(10, $this->pdf->gety() + 10, 'Family Member');
         $this->pdf->sety($this->pdf->gety() + 15);
         $this->pdf->setaligns(array('C', 'C', 'C', 'C'));
         $this->pdf->setwidths(array(50, 40, 30, 40, 30, 30, 30));
         $this->pdf->Row(array('Family Relation', 'Family Name', 'Sex', 'Occupation'));
         $this->pdf->setaligns(array('L', 'L', 'L', 'L'));
         foreach ($dataReader1 as $row1) {
             $this->pdf->row(array($row1['familyrelationname'], $row1['familyname'], $row1['sexname'], $row1['occupationname']));
         }
         $sql1 = "select b.identitytypename, a.identityname\r\n        from invoiceapidentity a\r\n        left join identitytype b on b.identitytypeid = a.identitytypeid\r\n        where a.invoiceapid = " . $row['invoiceapid'];
         $command1 = $this->connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $this->pdf->text(10, $this->pdf->gety() + 10, 'Identity List');
         $this->pdf->sety($this->pdf->gety() + 15);
//.........这里部分代码省略.........
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:101,代码来源:InvoiceapController.php

示例7: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select period\r\n\t\t\t\tfrom accperiod a ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.accperiodid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Account Period List';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     $this->pdf->setaligns(array('C'));
     $this->pdf->setwidths(array(90));
     $this->pdf->Row(array('Account Period'));
     $this->pdf->setaligns(array('L'));
     foreach ($dataReader as $row1) {
         $this->pdf->row(array($row1['period']));
     }
     // me-render ke browser
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:AccperiodController.php

示例8: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "SELECT s.snrodid, a.description, s.curdd, s.curmm, s.curyy, s.curvalue, \r\n\t\ts.curcc, s.curpt, s.curpp\r\nFROM snrodet s\r\nleft join snro a on a.snroid = s.snroid ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.snrodid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'SNRO Detail List';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     $this->pdf->setaligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
     $this->pdf->setwidths(array(40, 20, 20, 20, 20, 20, 20, 20));
     $this->pdf->Row(array('SNRO', 'DD', 'MM', 'YY', 'CC', 'PT', 'PP', 'Value'));
     $this->pdf->setaligns(array('L', 'L', 'L', 'L', 'L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $this->pdf->row(array($row1['description'], $row1['curdd'], $row1['curmm'], $row1['curyy'], $row1['curcc'], $row1['curpt'], $row1['curpp'], $row1['curvalue']));
     }
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:23,代码来源:SnrodetController.php

示例9: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Unit of Measure List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.uomcode,a.description\r\n      from unitofmeasure a";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C'));
     $pdf->setwidths(array(50, 90));
     $pdf->Row(array('Unit of Measure', 'Description'));
     $pdf->setaligns(array('L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['uomcode'], $row1['description']));
     }
     // me-render ke browser
     $pdf->Output('unitofmeasure.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:UnitofmeasureController.php

示例10: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select SELECT a.accounttypeid,a.accounttypename,b.accounttypename as parentaccounttypename,a.recordstatus\r\nFROM accounttype a\r\nleft join accounttype b on b.accounttypeid = a.parentaccounttypeid ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.accounttypeid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Account Type List';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     $this->pdf->setaligns(array('C', 'C', 'C', 'C'));
     $this->pdf->setwidths(array(60, 60, 40, 40));
     $this->pdf->Row(array('Account Type', 'Parent Account Name'));
     $this->pdf->setaligns(array('L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $this->pdf->row(array($row1['accounttypename'], $row1['parentaccounttypename']));
     }
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:23,代码来源:AccounttypeController.php

示例11: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     Yii::import('application.extensions.fpdf.*');
     require_once "pdf.php";
     $pdf = new PDF();
     $pdf->title = 'Insurance List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $header = array('No', 'ID', 'Insurance Name');
     $dataprovider = Insurance::model()->searchwstatus();
     $dataprovider->pagination = false;
     $data = $dataprovider->getData();
     //var_dump(count($data));
     $w = array(10, 25, 70);
     $pdf->SetTableHeader();
     //Header
     for ($i = 0; $i < count($header); $i++) {
         $pdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);
     }
     $pdf->Ln();
     $pdf->SetTableData();
     //Data
     $fill = false;
     $i = 0;
     foreach ($data as $datas) {
         $i = $i + 1;
         $pdf->Cell($w[0], 6, $i, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[1], 6, $datas['addressbookid'], 'LR', 0, 'L', $fill);
         $pdf->Cell($w[2], 6, $datas['fullname'], 'LR', 0, 'L', $fill);
         $pdf->Ln();
         $fill = !$fill;
     }
     $pdf->Cell(array_sum($w), 0, '', 'T');
     // me-render ke browser
     $pdf->Output('insurance.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:40,代码来源:InsuranceController.php

示例12: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Purchasing Group List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $header = array('No', 'ID', 'Purchasing Organization', 'Purchasing Group Code', 'Description');
     $model = new Purchasinggroup('searchwstatus');
     $dataprovider = $model->searchwstatus();
     $dataprovider->pagination = false;
     $data = $dataprovider->getData();
     $cols = $dataprovider->getKeys();
     $dataku = array(count($data));
     //var_dump($dataku);
     $w = array(10, 15, 50, 40, 70);
     $pdf->SetTableHeader();
     //Header
     for ($i = 0; $i < count($header); $i++) {
         $pdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);
     }
     $pdf->Ln();
     $pdf->SetTableData();
     //Data
     $fill = false;
     $i = 0;
     foreach ($data as $datas) {
         $i = $i + 1;
         $pdf->Cell($w[0], 6, $i, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[1], 6, $datas['purchasinggroupid'], 'LR', 0, 'L', $fill);
         $pdf->Cell($w[2], 6, Purchasingorg::model()->findbypk($datas['purchasingorgid'])->purchasingorgcode, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[3], 6, $datas['purchasinggroupcode'], 'LR', 0, 'L', $fill);
         $pdf->Cell($w[4], 6, $datas['description'], 'LR', 0, 'L', $fill);
         $pdf->Ln();
         $fill = !$fill;
     }
     $pdf->Cell(array_sum($w), 0, '', 'T');
     // me-render ke browser
     $pdf->Output('purchasinggroup.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:43,代码来源:PurchasinggroupController.php

示例13: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select a.purchasingorgcode, a.description\r\n      from purchasingorg a ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.purchasingorgid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Purchasing Organization List';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     $this->pdf->setaligns(array('C', 'C'));
     $this->pdf->setwidths(array(50, 70));
     $this->pdf->Row(array('Purchasing Organization Code', 'Description'));
     $this->pdf->setaligns(array('L', 'L'));
     foreach ($dataReader as $row1) {
         $this->pdf->row(array($row1['purchasingorgcode'], $row1['description']));
     }
     // me-render ke browser
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:PurchasingorgController.php

示例14: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select b.menuname, a.menuobject\r\n\t\t\t\tfrom menuauth a \r\n\t\t\t\tleft join menuaccess b on b.menuaccessid = a.menuaccessid";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.menuauthid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Menu Object Authentication List';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     $this->pdf->setaligns(array('C', 'C', 'C', 'C'));
     $this->pdf->setwidths(array(40, 40, 40, 60));
     $this->pdf->Row(array('Menu Name', 'Menu Object'));
     $this->pdf->setaligns(array('L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $this->pdf->row(array($row1['menuname'], $row1['menuobject']));
     }
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:23,代码来源:MenuauthController.php

示例15: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $sql = "select a.catalogsysid,b.languagename,a.catalogname,a.catalogval,a.recordstatus\r\nfrom catalogsys a\r\nleft join language b on b.languageid=a.languageid ";
     if ($_GET['id'] !== '') {
         $sql = $sql . "where a.catalogsysid = " . $_GET['id'];
     }
     $command = $this->connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $this->pdf->title = 'Catalog Translation System List';
     $this->pdf->AddPage('P');
     $this->pdf->setFont('Arial', 'B', 12);
     // definisi font
     $this->pdf->setFont('Arial', 'B', 8);
     $this->pdf->setaligns(array('C', 'C', 'C', 'C'));
     $this->pdf->setwidths(array(40, 40, 90, 40));
     $this->pdf->Row(array('Language', 'Catalog Name', 'Catalog Value'));
     $this->pdf->setaligns(array('L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $this->pdf->row(array($row1['languagename'], $row1['catalogname'], $row1['catalogval']));
     }
     $this->pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:23,代码来源:CatalogsysController.php


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