$signo = '-'; } else { $signo = ''; } //echo '<br>'.$myrow['precioVenta']*$myrow['cantidad']; $pdf->Cell(0, 0, $signo . '$ ' . number_format($myrow['precioVenta'] * $myrow['cantidad'], 2), 0, 0, R); //************cierra pruebas $pdf->Ln(2); //salto de linea //$pdf->Ln(1); //salto de linea } //cierra while $TOTAL = $cargos[0] + $ivaCargos[0] - ($abonos[0] + $ivaAbonos[0]); $centavos = strstr($TOTAL, '.'); $centavos = substr($centavos, '1'); $resultado = numerotexto($TOTAL); $totalCaracteres = strlen($centavos); if ($totalCaracteres == '1') { $centavos = $centavos . '0'; } if (!$centavos) { $centavos = '00'; } $formula = 'pesos ' . $centavos . '/100 M.N.'; $formula = trim($formula); $Y = 120; //linea de abajo if ($registros < 9) { $pdf->Line(2, 117, 199, 117); //**********************************************SIGNATURE****** if ($myrow311['seguro']) {
//************cierra pruebas $pdf->Ln(2); //salto de linea //$pdf->Ln(1); //salto de linea } //cierra while $TOTAL=$cargos[0]+$ivaCargos[0]; $sandra=$TOTAL-$totalDescuento[0]-$totalBeneficencia[0]-$totalCortesia[0]; $centavos=strstr($sandra,'.'); $centavos=substr($centavos,'1'); //********** $resultado= numerotexto($sandra); $totalCaracteres=strlen($centavos); if($totalCaracteres=='1'){ $centavos=$centavos.'0'; } if(!$centavos){ $centavos='00'; } $formula= 'pesos '.$centavos.'/100 M.N.'; $formula=trim($formula); $Y=120; //linea de abajo
$descripcion = 'Tipo de Pago: ' . $myrow['tipoPago']; } } } $pdf->SetX('7'); $pdf->SetFont('Arial', '', 10); $pdf->Cell(0, 0, $myrow['descripcionArticulo'], 0, 0, L); //************cierra pruebas $pdf->Ln(2); //salto de linea //$pdf->Ln(1); //salto de linea } //cierra while $centavos = strstr($TOTAL[0], '.'); $centavos = substr($centavos, '1'); $resultado = numerotexto($TOTAL[0]); $totalCaracteres = strlen($centavos); if ($totalCaracteres == '1') { $centavos = $centavos . '0'; } if (!$centavos) { $centavos = '00'; } $formula = 'pesos ' . $centavos . '/100 M.N.'; $formula = trim($formula); $Y = 120; //linea de abajo $pdf->Line(2, 115, 200, 115); $pdf->SetFont('Arial', '', 10); $pdf->SetY($Y); $pdf->Cell(0, 0, "Subtotal: " . "\$" . number_format($TOTAL[0], 2), 0, 0, R);
$result40 = mysql_db_query($basedatos, $sSQL40); $myrow40 = mysql_fetch_array($result40); $sSQL40a = "\r\n SELECT\r\ndescripcion\r\nFROM\r\nalmacenes\r\nWHERE\r\nalmacen='" . $myrow['almacenDestino'] . "'\r\n\r\n"; $result40a = mysql_db_query($basedatos, $sSQL40a); $myrow40a = mysql_fetch_array($result40a); $pdf->SetX('7'); $pdf->Cell(0, 0, $myrow40['descripcion'], 0, 0, L); $pdf->Ln(5); //salto de linea } $pdf->Ln(2); //salto de linea //$pdf->Ln(1); //salto de linea $centavos = strstr($TOTAL[0], '.'); $centavos = substr($centavos, '1'); $resultado = numerotexto($TOTAL[0] + $sumaIVA[0]); $totalCaracteres = strlen($centavos); if ($totalCaracteres == '1') { $centavos = $centavos . '0'; } if (!$centavos) { $centavos = '00'; } $formula = 'pesos ' . $centavos . '/100 M.N.'; $formula = trim($formula); $Y = 120; //linea de abajo $pdf->Line(2, 115, 200, 115); $pdf->SetFont('Arial', '', 10); $pdf->SetY($Y); $pdf->Cell(0, 0, "Subtotal: " . "\$" . number_format($TOTAL[0], 2), 0, 0, R);