コード例 #1
0
        $fac->Cell(0, 0, 'IVA');
        $fac->setXY(150, 258);
        $fac->Cell(0, 0, 'TOTAL');
        $fac->SetFont('Arial', '', 7);
        $fac->setXY(170, 246);
        $fac->Cell(0, 0, $row['MONTO']);
        $fac->setXY(170, 250);
        $fac->Cell(0, 0, $row['DESCUENTO']);
        $fac->setXY(170, 254);
        $fac->Cell(0, 0, $row['IVA']);
        $fac->setXY(170, 258);
        $fac->Cell(0, 0, $row['TOTAL']);
        $fac->SetFont('Arial', '', 8);
    }
    $numletra = new CNumeroaLetra();
    $numletra->setNumero($num);
    $cant_letra = $numletra->letra();
    $fac->SetFont('Arial', '', 8);
    $fac->setXY(10, 246);
    $fac->Cell(105, 0, 'Importe en letras');
    $fac->setXY(10, 250);
    $fac->Cell(105, 0, $cant_letra);
    $fac->setXY(10, 254);
    $fac->Cell(105, 0, 'Tipo de pago: Efectivo');
    $fac->setXY(10, 258);
    $fac->Cell(105, 0, 'Forma de pago: Pago en unsa sola exhibición');
}
//DETALLE
if (!empty($factura)) {
    $tt = 75;
    $fac->SetFont('Arial', '', 7);
コード例 #2
0
    $mes = $row['mes'];
    $anio = $row['anio'];
    $monto = $row['MONTO'];
    $iva = $row['IVA'];
    $id_cuenta = $row['CUENTA'];
    $descripcion = $row['DESCRIPCION'];
    $cuenta = $row['CUENTA2'];
    $banco = $row['CUENTA_ID'];
    $movimiento = $row['MOVIMIENTO_ID'];
    $tipo_cambio = $row['MONEDA'];
    $numletra = new CNumeroaLetra();
    if ($tipo_cambio == "USD") {
        $numletra->setMoneda("DOLARES");
        $numletra->setSufijo("U.S.D.***)");
    }
    $numletra->setNumero($monto);
    $num_letra = $numletra->letra();
}
$meses = array(1 => 'Enero', 2 => 'Febrero', 3 => 'Marzo', 4 => 'Abril', 5 => 'Mayo', 6 => 'Junio', 7 => 'Julio', 8 => 'Agosto', 9 => 'Septiembre', 10 => 'Octubre', 11 => 'Noviembre', 12 => 'Diciembre');
$mes = $meses[$mes];
$fecha_cheque = $dia . ' ' . $mes . ' ' . $anio;
$ban = mysql_query('select DESCRIPCION from ban_c_cuentas where CUENTA_ID=' . $banco);
while ($row2 = mysql_fetch_array($ban)) {
    $banc = $row2['DESCRIPCION'];
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
コード例 #3
0
    $paridad = formato_moneda($row['PARIDAD'], 2);
    $tipo_cambio = $row['MONEDA'];
    $atencion = $row['ATENCION_A'];
    $departamento = $row['DEPARTAMENTO'];
    $subtotal = $row['MONTO'];
    $descuento = $row['DESCUENTO'];
    $iva = $row['IVA'];
    $total = $row['TOTAL'];
    $observa = utf8_encode($row['COMENTARIOS']);
}
$numletra = new CNumeroaLetra();
if ($tipo_cambio == "USD") {
    $numletra->setMoneda("DOLARES");
    $numletra->setSufijo("U.S.D.***)");
}
$numletra->setNumero($total);
$cant_letra = $numletra->letra();
$subtotal = formato_moneda($subtotal, 2);
$descuento = formato_moneda($descuento, 2);
$iva = formato_moneda($iva, 2);
$total = formato_moneda($total, 2);
//------------------------------------------------------------------------------------------------
$cabezera = '
<table width="760" border="0" cellspacing="5" cellpadding="5" align="center">
    <tr>
        <td width="465" valign=""><!--<img src="../images/' . CONFIG("EMP_LOGO") . '" width="230">--></td>
        <td width="250" valign="bottom" align="right">
          <table width="250" border="0" cellspacing="0" cellpadding="0" align="right">
                <tr>
                    <td width="16" valign="top" style=""></td>
                    <td style="" height="19">&nbsp;</td>
コード例 #4
0
 private static function printProducts(&$pdf, $productos)
 {
     $opciones_tabla = array();
     $opciones_tabla['showLines'] = 0;
     $opciones_tabla['showHeadings'] = 0;
     $opciones_tabla['shaded'] = 0;
     $opciones_tabla['fontSize'] = 8;
     $opciones_tabla['xOrientation'] = 'right';
     $opciones_tabla['xPos'] = self::puntos_cm(7.5);
     $opciones_tabla['width'] = self::puntos_cm(11);
     $opciones_tabla['textCol'] = array(0, 0, 0);
     $opciones_tabla['titleFontSize'] = 12;
     $opciones_tabla['rowGap'] = 3;
     $opciones_tabla['colGap'] = 3;
     $opciones_tabla['xPos'] = self::puntos_cm(14.2);
     $opciones_tabla['showLines'] = 0;
     $opciones_tabla['shaded'] = 2;
     $opciones_tabla['shadeCol'] = array(1, 1, 1);
     $opciones_tabla['shadeCol2'] = array(0.8984375, 0.95703125, 0.99609375);
     /* *************************
      * PRODUCTOS
      * ************************* */
     $elementos = array(array('cantidad' => 'Cantidad', 'descripcion' => 'Descripcion                                                                                                     ', 'precio' => 'Precio', 'importe' => 'Importe'));
     $subtotal = 0;
     $total = 0;
     $impuesto = 0;
     foreach ($productos as $p) {
         if ($p instanceof VentaProducto) {
             $prodDao = ProductoDAO::getByPK($p->getIdProducto());
             if (!is_null($prodDao)) {
                 $prod['cantidad'] = $p->getCantidad();
                 if (!is_null($p->getIdUnidad())) {
                     $unidad = UnidadMedidaDAO::getByPK($p->getIdUnidad());
                     if (!is_null($unidad)) {
                         $prod['cantidad'] .= " " . $unidad->getAbreviacion();
                     }
                 }
                 $prod['descripcion'] = $prodDao->getNombreProducto();
                 $prod['precio'] = FormatMoney($p->getPrecio(), DONT_USE_HTML);
                 $prod['importe'] = FormatMoney($p->getPrecio() * $p->getCantidad(), DONT_USE_HTML);
                 $subtotal += $p->getPrecio() * $p->getCantidad();
                 $total = $subtotal;
                 array_push($elementos, $prod);
             } else {
                 Logger::error("El producto que se intentaba imprimir ya no existe !!");
             }
         } else {
             if ($p instanceof VentaOrden) {
                 $ordenDao = OrdenDeServicioDAO::getByPK($p->getIdOrdenDeServicio());
                 $serv = ServicioDAO::getByPK($ordenDao->getIdServicio());
                 $prod['cantidad'] = "-";
                 $prod['descripcion'] = $serv->getNombreServicio();
                 $prod['precio'] = FormatMoney($p->getPrecio(), DONT_USE_HTML);
                 $prod['importe'] = FormatMoney($p->getPrecio(), DONT_USE_HTML);
                 $subtotal += $p->getPrecio();
                 $total = $subtotal;
                 array_push($elementos, $prod);
             } else {
                 if ($p instanceof Venta) {
                     array_push($elementos, array("cantidad" => "", "descripcion" => "", "precio" => "Subtotal", "importe" => FormatMoney($p->getSubtotal(), DONT_USE_HTML)));
                     array_push($elementos, array("cantidad" => "", "descripcion" => "", "precio" => "Descuento", "importe" => FormatMoney($p->getDescuento(), DONT_USE_HTML)));
                     array_push($elementos, array("cantidad" => "", "descripcion" => "", "precio" => "IVA", "importe" => FormatMoney($p->getImpuesto(), DONT_USE_HTML)));
                     array_push($elementos, array("cantidad" => "", "descripcion" => "", "precio" => "Total", "importe" => FormatMoney($p->getTotal(), DONT_USE_HTML)));
                     $letra = new CNumeroaLetra();
                     $letra->setNumero($p->getTotal());
                     array_push($elementos, array("cantidad" => "", "descripcion" => $letra->letra(), "precio" => "", "importe" => ""));
                 }
             }
         }
     }
     $pdf->ezSetY(self::puntos_cm(18.6));
     $opciones_tabla['xPos'] = self::puntos_cm(2);
     $opciones_tabla['width'] = self::puntos_cm(16.2);
     $pdf->ezTable($elementos, "", "", $opciones_tabla);
 }