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


PHP DataSource::getDataset方法代码示例

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


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

示例1: writeDetalles

 function writeDetalles(DataSource $dataSource, TCPDF $pdf, $tipo)
 {
     $blackAll = array('LTRB' => array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
     $widthMarginLeft = 1;
     $width1 = 20;
     $width2 = 85;
     $pdf->Ln();
     $pdf->SetFontSize(7.5);
     $pdf->SetFont('', 'B');
     $height = 5;
     $pdf->SetFillColor(255, 255, 255, true);
     $pdf->setTextColor(0, 0, 0);
     if ($tipo == 'adjudicado') {
         $pdf->Cell($width2 - $width1 * 2, $height, 'Item', $blackAll, 0, 'l', true, '', 1, false, 'T', 'C');
     } else {
         $pdf->Cell($width2, $height, 'Item', $blackAll, 0, 'l', true, '', 1, false, 'T', 'C');
     }
     $pdf->Cell($width1, $height, 'Cantidad Ref.', $blackAll, 0, 'L', true, '', 1, false, 'T', 'C');
     if ($tipo != 'borrador') {
         $pdf->Cell($width1, $height, 'Precio Unitario Ref.', $blackAll, 0, 'C', true, '', 1, false, 'T', 'C');
     }
     $pdf->Cell($width1, $height, 'Cantidad Ofert.', $blackAll, 0, 'L', true, '', 1, false, 'T', 'C');
     $pdf->Cell($width1, $height, 'Precio Unitario Ofert.', $blackAll, 0, 'C', true, '', 1, false, 'T', 'C');
     $pdf->Cell($width1, $height, 'Total Ofert.', $blackAll, 0, 'C', true, '', 1, false, 'T', 'C');
     if ($tipo == 'adjudicado') {
         $pdf->Cell($width1, $height, 'Cantidad Adj.', $blackAll, 0, 'l', true, '', 1, false, 'T', 'C');
         $pdf->Cell($width1, $height, 'Total', $blackAll, 0, 'l', true, '', 1, false, 'T', 'C');
     }
     $pdf->Ln();
     $pdf->SetFontSize(6.5);
     foreach ($dataSource->getDataset() as $row) {
         $pdf->SetFont('', '');
         $xAntesMultiCell = $pdf->getX();
         $yAntesMultiCell = $pdf->getY();
         //$totalItem
         if ($tipo == 'borrador') {
             $pdf->MultiCell($width2, $height, $row['desc_solicitud_det'] . "\r\n" . '  - ' . $row['descripcion_sol'], 1, 'L', false, 1);
             $yDespuesMultiCell = $pdf->getY();
             $height = $yDespuesMultiCell - $yAntesMultiCell;
             $pdf->setXY($xAntesMultiCell + $width2, $yAntesMultiCell);
             $pdf->Cell($width1, $height, $row['cantidad_sol'], 1, 0, 'R', false, '', 1, false, 'T', 'C');
             $pdf->Cell($width1, $height, '', 1, 0, 'R', false, '', 1, false, 'T', 'C');
             $pdf->Cell($width1, $height, '', 1, 0, 'R', false, '', 1, false, 'T', 'C');
             $pdf->Cell($width1, $height, '', 1, 0, 'R', false, '', 1, false, 'T', 'C');
         } else {
             if ($tipo == 'cotizado') {
                 $pdf->MultiCell($width2, $height, $row['desc_solicitud_det'] . "\r\n" . '  - ' . $row['descripcion_sol'], 1, 'L', false, 1);
                 $yDespuesMultiCell = $pdf->getY();
                 $height = $yDespuesMultiCell - $yAntesMultiCell;
                 $pdf->setXY($xAntesMultiCell + $width2, $yAntesMultiCell);
                 $pdf->Cell($width1, $height, $row['cantidad_sol'], 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $pdf->Cell($width1, $height, number_format($row['precio_unitario_sol'], 2), 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $pdf->Cell($width1, $height, $row['cantidad_coti'], 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $pdf->Cell($width1, $height, number_format($row['precio_unitario'], 2), 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $totalItem = number_format($row['cantidad_coti'] * $row['precio_unitario'], 2);
                 $pdf->Cell($width1, $height, $totalItem, 1, 0, 'R', false, '', 1, false, 'T', 'C');
             } else {
                 $pdf->MultiCell($width2 - $width1 * 2, $height, $row['desc_solicitud_det'] . "\r\n" . '  - ' . $row['descripcion_sol'], 1, 'L', false, 1);
                 $yDespuesMultiCell = $pdf->getY();
                 $height = $yDespuesMultiCell - $yAntesMultiCell;
                 $pdf->setXY($xAntesMultiCell + $width2 - $width1 * 2, $yAntesMultiCell);
                 $pdf->Cell($width1, $height, $row['cantidad_sol'], 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $pdf->Cell($width1, $height, number_format($row['precio_unitario_sol'], 2), 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $pdf->Cell($width1, $height, $row['cantidad_coti'], 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $pdf->Cell($width1, $height, number_format($row['precio_unitario'], 2), 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $totalItem = number_format($row['cantidad_coti'] * $row['precio_unitario'], 2);
                 $pdf->Cell($width1, $height, $totalItem, 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $pdf->Cell($width1, $height, $row['cantidad_adju'], 1, 0, 'R', false, '', 1, false, 'T', 'C');
                 $totalAdj = number_format($row['cantidad_adju'] * $row['precio_unitario'], 2);
                 $pdf->Cell($width1, $height, $totalAdj, 1, 0, 'R', false, '', 1, false, 'T', 'C');
             }
         }
         $pdf->Ln();
     }
 }
开发者ID:rensi4rn,项目名称:ADQUI_BOA,代码行数:75,代码来源:RCotizacion.php

示例2: writeDetalles

 function writeDetalles(DataSource $dataSource, TCPDF $pdf, $tipo)
 {
     $blackAll = array('LTRB' => array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
     $widthMarginLeft = 1;
     $width1 = 20;
     $width2 = 130;
     $pdf->Ln();
     $pdf->SetFontSize(7.5);
     $pdf->SetFont('', 'B');
     $height = 5;
     $pdf->SetFillColor(255, 255, 255, true);
     $pdf->setTextColor(0, 0, 0);
     $pdf->Cell($width1 - 5, $height, 'Cantidad', $blackAll, 0, 'L', true, '', 1, false, 'T', 'C');
     if ($tipo == 'Bien') {
         $pdf->Cell($width2, $height, 'Item', $blackAll, 0, 'l', true, '', 1, false, 'T', 'C');
     } else {
         if ($tipo == 'Bien - Servicio') {
             $pdf->Cell($width2, $height, 'Compra-Servicio', $blackAll, 0, 'l', true, '', 1, false, 'T', 'C');
         } else {
             $pdf->Cell($width2, $height, 'Servicio', $blackAll, 0, 'l', true, '', 1, false, 'T', 'C');
         }
     }
     $pdf->Cell($width1, $height, 'Precio Unitario', $blackAll, 0, 'C', true, '', 1, false, 'T', 'C');
     $pdf->Cell($width1, $height, 'Total Bs.', $blackAll, 0, 'C', true, '', 1, false, 'T', 'C');
     $pdf->Ln();
     $pdf->SetFontSize(6.5);
     $totalOrdenCompra = 0.0;
     foreach ($dataSource->getDataset() as $row) {
         $pdf->SetFont('', '');
         //$totalItem
         $pdf->Cell($width1 - 5, $height, $row['cantidad_adju'], 1, 0, 'L', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width2, $height, $row['desc_solicitud_det'], 1, 0, 'L', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width1, $height, number_format($row['precio_unitario'], 2), 1, 0, 'R', false, '', 1, false, 'T', 'C');
         $totalItem = $row['cantidad_adju'] * $row['precio_unitario'];
         $pdf->Cell($width1, $height, number_format($totalItem, 2), 1, 0, 'R', false, '', 1, false, 'T', 'C');
         $pdf->Ln();
         //var_dump($totalItem+$totalOrdenCompra);
         $totalOrdenCompra = $totalOrdenCompra + $totalItem;
         //var_dump($totalOrdenCompra);
         $obj = new Numbers_Words_es_AR();
         $numero = explode('.', number_format($totalItem, 2));
         $pdf->Cell($width2 + $width1 + $width1 / 2 + $width1 / 4, $height, 'SON: ' . strtoupper(trim($obj->toWords(str_replace(',', '', $numero[0])))) . ' ' . $numero[1] . '/' . '100 ' . strtoupper($this->getDataSource()->getParameter('moneda')), 1, 0, 'L', false, '', 1, false, 'T', 'C');
     }
     $pdf->Cell($width1, $height, number_format($totalOrdenCompra, 2), 1, 0, 'R', false, '', 1, false, 'T', 'C');
     $pdf->Ln();
 }
开发者ID:rensi4rn,项目名称:ADQUI_BOA,代码行数:46,代码来源:ROrdenCompra.php

示例3: writeDetalles

 function writeDetalles(DataSource $dataSource, TCPDF $pdf)
 {
     $blackAll = array('LTRB' => array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
     $blackSide = array('LR' => array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
     $blackBottom = array('B' => array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
     $blackTop = array('T' => array('width' => 0.3, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));
     $widthMarginLeft = 1;
     $width1 = 15;
     $width2 = 25;
     $width3 = 20;
     $pdf->SetFontSize(7.5);
     $pdf->SetFont('', 'B');
     $height = 5;
     $pdf->Ln();
     foreach ($dataSource->getDataset() as $row) {
         $pdf->setFont('', 'B');
         $pdf->Cell($width2, $height, 'Código Partida', 0, 0, 'L', false, '', 0, false, 'T', 'C');
         $pdf->Cell($width2, $height, 'Nombre Partida', 0, 0, 'L', false, '', 0, false, 'T', 'C');
         $pdf->Cell($width2 * 3 + 10, $height, 'Centro de Costo', 0, 0, 'L', false, '', 0, false, 'T', 'C');
         $pdf->Cell($width2, $height, '', 0, 0, 'R', false, '', 0, false, 'T', 'C');
         $pdf->Cell($width2, $height, 'Disponibilidad', 0, 0, 'R', false, '', 0, false, 'T', 'C');
         $pdf->Ln();
         $pdf->setFont('', '');
         $pdf->Cell($width2, $height, $row['groupeddata'][0]['codigo_partida'], 0, 0, 'L', false, '', 0, false, 'T', 'C');
         $pdf->Cell($width2, $height, $row['groupeddata'][0]['nombre_partida'], 0, 0, 'L', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width2 * 3 + 10, $height, $row['groupeddata'][0]['desc_centro_costo'], 0, 0, 'L', false, '', 1, false, 'T', 'C');
         $xRef = $pdf->getX();
         $yRef = $pdf->getY();
         $pdf->Cell($width2, $height, $row['totalRef'], 0, 0, 'R', false, '', 0, false, 'T', 'C');
         if ($row['disponible'] == true) {
             $pdf->setTextColor(0, 0, 0);
             $pdf->Cell($width2, $height, 'DISPONIBLE', 0, 0, 'R', false, '', 0, false, 'T', 'C');
         } else {
             $pdf->setTextColor(255, 0, 0);
             $pdf->Cell($width2, $height, 'NO DISPONIBLE', 0, 0, 'R', false, '', 0, false, 'T', 'C');
         }
         $pdf->setTextColor(0, 0, 0);
         //$pdf->Cell($width2, $height, ($row['disponible']==true)?'DISPONIBLE':'NO DISPONIBLE', 0, 0, 'R', false, '', 0, false, 'T', 'C');
         $pdf->Ln();
         $pdf->setFont('', 'B');
         $pdf->Cell($width2 + $width1, $height, 'Concepto Gasto', $blackAll, 0, 'L', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width2 + 25, $height, 'Descripcion', $blackAll, 0, 'L', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width1, $height, 'Cantidad', $blackAll, 0, 'L', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width3, $height, 'Precio Unitario', $blackAll, 0, 'R', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width3, $height, 'Precio Total', $blackAll, 0, 'R', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width3, $height, 'Precio Ges. Act.', $blackAll, 0, 'R', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width3, $height, 'Precio Ges. Sig.', $blackAll, 0, 'R', false, '', 1, false, 'T', 'C');
         $pdf->Ln();
         $totalRef = 0;
         $totalGa = 0;
         $totalSg = 0;
         $xEnd = 0;
         $yEnd = 0;
         foreach ($row['groupeddata'] as $solicitudDetalle) {
             $pdf->setFont('', '');
             $pdf->Cell($width2 + $width1, $height, $solicitudDetalle['desc_concepto_ingas'], $blackSide, 0, 'L', false, '', 1, false, 'T', 'C');
             $pdf->Cell($width2 + 25, $height, $solicitudDetalle['descripcion'], $blackSide, 0, 'L', false, '', 1, false, 'T', 'C');
             $pdf->Cell($width1, $height, $solicitudDetalle['cantidad'], $blackSide, 0, 'R', false, '', 1, false, 'T', 'C');
             $pdf->Cell($width3, $height, number_format($solicitudDetalle['precio_unitario'], 2), $blackSide, 0, 'R', false, '', 1, false, 'T', 'C');
             $pdf->Cell($width3, $height, number_format($solicitudDetalle['precio_total'], 2), $blackSide, 0, 'R', false, '', 1, false, 'T', 'C');
             $pdf->Cell($width3, $height, number_format($solicitudDetalle['precio_ga'], 2), $blackSide, 0, 'R', false, '', 1, false, 'T', 'C');
             $pdf->Cell($width3, $height, number_format($solicitudDetalle['precio_sg'], 2), $blackSide, 0, 'R', false, '', 1, false, 'T', 'C');
             $totalRef = $totalRef + $solicitudDetalle['precio_total'];
             $totalGa = $totalGa + $solicitudDetalle['precio_ga'];
             $totalSg = $totalSg + $solicitudDetalle['precio_sg'];
             $pdf->Ln();
             $xEnd = $pdf->getX();
             $yEnd = $pdf->getY();
         }
         //$pdf->setXY($xRef,$yRef);
         //$pdf->Cell($width2, $height, $totalRef, 0, 0, 'R', false, '', 0, false, 'T', 'C');
         $pdf->setXY($xEnd, $yEnd);
         $pdf->Cell(185, $height, '', $blackTop, 1, 'L', false, '', 0, false, 'T', 'C');
         $pdf->setXY($xEnd, $yEnd);
         $pdf->Cell($width1 * 2 + $width2 * 2 + $width3 + 25, $height, '', '0', 0, 'R', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width3, $height, number_format($totalRef, 2), $blackAll, 0, 'R', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width3, $height, number_format($totalGa, 2), $blackAll, 0, 'R', false, '', 1, false, 'T', 'C');
         $pdf->Cell($width3, $height, number_format($totalSg, 2), $blackAll, 0, 'R', false, '', 1, false, 'T', 'C');
         $pdf->Ln($height * 2);
     }
 }
开发者ID:rensi4rn,项目名称:ADQUI_BOA,代码行数:81,代码来源:RSolicitudCompra.php


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