<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>La Cofradía Digital &#187; Perl</title>
	<atom:link href="http://cofradia.org/category/programacion/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://cofradia.org</link>
	<description>Hermandad informática</description>
	<lastBuildDate>Wed, 08 Feb 2012 02:15:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Plática sobre facturación electrónica en Campus Party 2011</title>
		<link>http://cofradia.org/2011/07/22/platica-sobre-facturacion-electronica-en-campus-party-2011/</link>
		<comments>http://cofradia.org/2011/07/22/platica-sobre-facturacion-electronica-en-campus-party-2011/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 16:52:15 +0000</pubDate>
		<dc:creator>El Pop</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programacion]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=6396</guid>
		<description><![CDATA[El día de ayer, Mauricio Baeza y un servidor, impartimos una plática titulada &#8220;Facturación electrónica para programadores y mortales&#8221;. Les dejo la liga a la presentación, así como las ligas relacionadas: http://www.youtube.com/watch?v=XnXV1ZGgW04 La presentación en PDF y algunas ligas de interes: How-To de facturación electrónica para unixeros (generación de sellos) How-To de facturación electrónica (verificación [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2011/07/22/platica-sobre-facturacion-electronica-en-campus-party-2011/"></g:plusone></div><p>El día de ayer, Mauricio Baeza y un servidor, impartimos una plática titulada &#8220;Facturación electrónica para programadores y mortales&#8221;. Les dejo la liga a la presentación, así como las ligas relacionadas:</p>
<p><a href="http://www.youtube.com/watch?v=XnXV1ZGgW04">http://www.youtube.com/watch?v=XnXV1ZGgW04</a></p>
<p>La <A HREF="http://cofradia.org/down/factura_electronica.pdf">presentación en PDF</A> y algunas ligas de interes:<br />
<span id="more-6396"></span><br />
<UL><br />
<LI><A HREF="http://cofradia.org/2010/12/18/how-to-de-facturacion-electronica-para-unixeros-generacion-de-sellos/">How-To de facturación electrónica para unixeros (generación de sellos)</A></LI><br />
<LI><A HREF="http://cofradia.org/2010/12/29/how-to-de-facturacion-electronica-verificacion-de-facturas/">How-To de facturación electrónica (verificación de facturas)</A></LI><br />
<LI><A HREF="http://cofradia.org/2011/03/27/convirtiendo-facturas-electronicas-del-xml-a-pdf/">Convirtiendo facturas electrónicas del XML a PDF</A></LI><br />
<LI><A HREF="http://cofradia.org/2011/01/04/error-en-xslt-del-sat-provoca-errores-en-la-generacionvalidacion-de-factura-electronica/">Error en XSLT del SAT provoca errores en la generación/validación de factura electrónica</A></LI><br />
<LI><A HREF="http://cofradia.org/2011/07/11/castrosidades-del-sat-para-la-factura-electronica-ahora-necesitas-bom/">Castrosidades del SAT para la factura electrónica: Ahora necesitas BOM</A></LI><br />
<LI><A HREF="http://cofradia.org/2010/12/23/codigo-de-barras-de-2d-qr-quick-response/">Código de barras de 2D QR (Quick Response)</A></LI><br />
</UL></p>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2011/07/22/platica-sobre-facturacion-electronica-en-campus-party-2011/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oferta de trabajo para programadores</title>
		<link>http://cofradia.org/2011/07/21/oferta-de-trabajo-para-programadores/</link>
		<comments>http://cofradia.org/2011/07/21/oferta-de-trabajo-para-programadores/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 19:35:27 +0000</pubDate>
		<dc:creator>Nayanasaxsa</dc:creator>
				<category><![CDATA[*BSD]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Clasificados]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Negocios]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programacion]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Redes sociales]]></category>
		<category><![CDATA[Sistemas Operativos]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=6382</guid>
		<description><![CDATA[Oferta de trabajo para programadores de aplicaciones requisitos: programar en cualquier lenguaje, interesado en desarrollo e innovación de aplicaciones en todo tipo de arquitectura windows, linux, dispositivos moviles, &#8230; Oferta económica base de cálculo por tiempo completo (10am-7pm): $ 9,000 sin titulo con estudios al 100% $ 12,000 con titulo con menos de 2 años de antigüedad A [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2011/07/21/oferta-de-trabajo-para-programadores/"></g:plusone></div><div><strong>Oferta de trabajo para programadores de aplicaciones</strong></div>
<div><span style="text-decoration: underline"><em>requisitos: </em></span>programar en cualquier lenguaje, interesado en desarrollo e innovación<br />
de aplicaciones en todo tipo de arquitectura windows, linux, dispositivos moviles, &#8230;</div>
<div><span style="text-decoration: underline"><em>Oferta económica base de cálculo por tiempo completo (10am-7pm):</em></span></div>
<div>$ 9,000 sin titulo con estudios al 100%</div>
<div>$ 12,000 con titulo con menos de 2 años de antigüedad</div>
<div>A negociar con otras <strong>características superiores</strong>.</div>
<div>También se ofrece una <strong>posibilidad de beca</strong> para aquellos estudiantes que aún no terminan pero que deseen realizar prácticas.</div>
<p>Personas interesadas, favor de mandar CV a: nayanasaxsa@gmail.com</p>
<div>¡Saludos!</div>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2011/07/21/oferta-de-trabajo-para-programadores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Castrosidades del SAT para la factura electrónica: Ahora necesitas BOM</title>
		<link>http://cofradia.org/2011/07/11/castrosidades-del-sat-para-la-factura-electronica-ahora-necesitas-bom/</link>
		<comments>http://cofradia.org/2011/07/11/castrosidades-del-sat-para-la-factura-electronica-ahora-necesitas-bom/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 23:55:14 +0000</pubDate>
		<dc:creator>El Pop</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programacion]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=6276</guid>
		<description><![CDATA[Pues ahora el programa validador del SAT (un applet de Java) para factura electrónica, invalida los archivos que emites y los que has emitido ya que busca que los archivos de XML tengan un BOM (Byte order mark) que especifica que el archivo está en UTF-8 y así pueda procesarlo. Pero no entren en pánico, [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2011/07/11/castrosidades-del-sat-para-la-factura-electronica-ahora-necesitas-bom/"></g:plusone></div><p>Pues ahora el programa <A HREF="https://www.consulta.sat.gob.mx/SICOFI_WEB/ModuloECFD_Plus/ValidadorComprobantes/Validador.asp">validador del SAT</A> (un applet de Java) para factura electrónica, invalida los archivos que emites y los que has emitido ya que busca que los archivos de XML tengan un <A HREF="http://en.wikipedia.org/wiki/Byte-order_mark">BOM</A> (Byte order mark) que especifica que el archivo está en UTF-8 y así pueda procesarlo.</p>
<p>Pero no entren en pánico, la solución es sencilla (BOM.pl):</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
<span style="color: #666666; font-style: italic;">#===================================================================#</span>
<span style="color: #666666; font-style: italic;"># Program =&gt; BOM.pl (In Perl 5.0)                     version 0.0.1 #</span>
<span style="color: #666666; font-style: italic;">#===================================================================#</span>
<span style="color: #666666; font-style: italic;"># Autor         =&gt; Fernando &quot;El Pop&quot; Romo        (pop@cofradia.org) #</span>
<span style="color: #666666; font-style: italic;"># Creation date =&gt; 11/jul/2011                                      #</span>
<span style="color: #666666; font-style: italic;">#-------------------------------------------------------------------#</span>
<span style="color: #666666; font-style: italic;"># Info =&gt; This program take a XML file and put a Byte order mark to #</span>
<span style="color: #666666; font-style: italic;">#         indicate UTF-8 is the encode of the data                  #</span>
<span style="color: #666666; font-style: italic;">#-------------------------------------------------------------------#</span>
<span style="color: #666666; font-style: italic;">#                    (c) 2011 - Fernando Romo                       #</span>
<span style="color: #666666; font-style: italic;">#-------------------------------------------------------------------#</span>
<span style="color: #666666; font-style: italic;">#              Release under the GNU/GPL License v3.0               #</span>
<span style="color: #666666; font-style: italic;">#===================================================================#</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> UTF8BOM<span style="color: #339933;">;</span>
&nbsp;
UTF8BOM<span style="color: #339933;">-&gt;</span><span style="color: #006600;">insert_into_file</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;BOM en UTF8 $ARGV[0]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Con este script en Perl usando el módulo de CPAN <A HREF="http://search.cpan.org/~lyokato/UTF8BOM-1.02/lib/UTF8BOM.pm">UTF8BOM</A> solucionamos el problema. No necesitan re-hacer la factura solo hacer lo siguiente:</p>
<blockquote><p>
$ ./BOM.pl Fac_INC101109Q36_A0054_MCM960926B49_20110711.xml<br />
BOM en UTF8 Fac_INC101109Q36_A0054_MCM960926B49_20110711.xml
</p></blockquote>
<p>Adicionalmente podemos usar un script en bash para corregir todas las facturas electrónicas en XML que esten en un directorio:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">for</span> a <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span>.xml
<span style="color: #000000; font-weight: bold;">do</span>
  .<span style="color: #000000; font-weight: bold;">/</span>BOM.pl <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$a</span><span style="color: #000000; font-weight: bold;">`</span> 
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>y ya esta <img src='http://cofradia.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2011/07/11/castrosidades-del-sat-para-la-factura-electronica-ahora-necesitas-bom/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Hack para el AirPlay en Perl</title>
		<link>http://cofradia.org/2011/04/11/hack-para-el-airplay-en-perl/</link>
		<comments>http://cofradia.org/2011/04/11/hack-para-el-airplay-en-perl/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 22:34:57 +0000</pubDate>
		<dc:creator>El Pop</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programacion]]></category>
		<category><![CDATA[Tips técnicos]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=5445</guid>
		<description><![CDATA[En la página de mafipulation.org leo la liberación del ShairPort 0.03. Este es un programa en Perl que permite emular el protocolo de AirPlay de Apple en cualquier computadora.]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2011/04/11/hack-para-el-airplay-en-perl/"></g:plusone></div><p>En la página de mafipulation.org leo la liberación del <A HREF="http://mafipulation.org/blagoblig/2011/04/08#shairport">ShairPort 0.03</A>. Este es un programa en Perl que permite emular el protocolo de AirPlay de Apple en cualquier computadora.</p>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2011/04/11/hack-para-el-airplay-en-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convirtiendo facturas electrónicas del XML a PDF</title>
		<link>http://cofradia.org/2011/03/27/convirtiendo-facturas-electronicas-del-xml-a-pdf/</link>
		<comments>http://cofradia.org/2011/03/27/convirtiendo-facturas-electronicas-del-xml-a-pdf/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 00:49:22 +0000</pubDate>
		<dc:creator>El Pop</dc:creator>
				<category><![CDATA[Paranoia Fan Club]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programacion]]></category>
		<category><![CDATA[Tips técnicos]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=5344</guid>
		<description><![CDATA[Pues hemos mencionado la generación de sellos para las facturas electrónicas del SAT, su validación y ahora vamos a dar cierre al ciclo de la emisión, con lo que se le conoce como la representación impresa del comprobante fiscal digital. Me dí a la tarea de hacer un pequeño script en Perl que convierte el [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2011/03/27/convirtiendo-facturas-electronicas-del-xml-a-pdf/"></g:plusone></div><p>Pues hemos mencionado la <A HREF="http://cofradia.org/2010/12/18/how-to-de-facturacion-electronica-para-unixeros-generacion-de-sellos/">generación de sellos</A> para las facturas electrónicas del SAT, su <A HREF="http://cofradia.org/2010/12/29/how-to-de-facturacion-electronica-verificacion-de-facturas/">validación</A> y ahora vamos a dar cierre al ciclo de la emisión, con lo que se le conoce como la representación impresa del comprobante fiscal digital.</p>
<p>Me dí a la tarea de hacer un pequeño script en Perl que convierte el XML de la factura electrónica a su versión en PDF, tomando en cuenta que yo lo hago por Medios Propios (versión 2.0).<br />
<span id="more-5344"></span><br />
Este utiliza varios módulos para Perl de <A HREF="http://cpan.org">CPAN</A>:<br />
<UL><br />
<LI><A HREF="http://search.cpan.org/~larslund/PDF-Reuse-0.35/Reuse.pm">PDF::Reuse</A> para la manipulación de PDF&#8217;s</LI><br />
<LI><A HREF="http://search.cpan.org/~jrey/Lingua-ES-Numeros-0.08/lib/Lingua/ES/Numeros.pm">Lingua::ES::Numeros</A> para convertir números a leyenda en letra</LI><br />
<LI><A HREF="http://search.cpan.org/~grantm/XML-Simple-2.18/lib/XML/Simple.pm">XML::Simple</A> para la manipulación del XML de la factura electrónica</LI><br />
<LI><A HREF="http://search.cpan.org/~schubiger/Text-Wrap-Smart-0.6/lib/Text/Wrap/Smart.pm">Text::Wrap::Smart</A> para poner bonito el texto</LI><br />
</UL></p>
<p>Para instalar estos módulos sigan la <A HREF="http://www.cpan.org/modules/INSTALL.html">guía de instalación</A> de CPAN.</p>
<p>Es necesario para el manejo de la cadena original tener instalado el <A HREF="http://xmlsoft.org/XSLT/xsltproc2.html">xsltproc</A> y el archivo descriptor de xslt del SAT para usarlo: <A HREF="http://www.sat.gob.mx/sitio_internet/cfd/2/cadenaoriginal_2_0/cadenaoriginal_2_0.xslt">cadenaoriginal_2_0.xslt</A> (liga al ftp del SAT).</p>
<p>Mis ejemplos los pueden bajar <A HREF="http://cofradia.org/down/CFD_PDF.tar.gz">aquí</A> (archivo CFD_PDF.tar.gz, mide 285 Kb).</p>
<p>El programa usa un machote de PDF previamente hecho con alguna herramienta o procesador de texto. En mi caso use un programa para Mac llamado <A HREF="http://www.omnigroup.com/products/omnigraffle/">Omnigraffle</A> y generé un template (factura.pdf). </p>
<p>Tomé un logo de prueba y lo dejé en formato jpeg (logo.jpg) y deje un ejemplo de un XML de factura electrónica para transformalo a PDF (Fac_Sample.xml).</p>
<p>El programa es este (que esta contenido en el archivo de ejemplos mencionados anteriormente):</p>
<p><b>CFD_to_PDF.pl</b></p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
<span style="color: #666666; font-style: italic;">#===================================================================#</span>
<span style="color: #666666; font-style: italic;"># Program =&gt; CFD_to_PDF.pl (In Perl 5.0)              version 0.0.1 #</span>
<span style="color: #666666; font-style: italic;">#===================================================================#</span>
<span style="color: #666666; font-style: italic;"># Autor         =&gt; Fernando &quot;El Pop&quot; Romo        (pop@cofradia.org) #</span>
<span style="color: #666666; font-style: italic;"># Creation date =&gt; 06/feb/2011                                      #</span>
<span style="color: #666666; font-style: italic;">#-------------------------------------------------------------------#</span>
<span style="color: #666666; font-style: italic;"># Info =&gt; This program take a CFD file in xml format and convert to #</span>
<span style="color: #666666; font-style: italic;">#         PDF using a template                                      #</span>
<span style="color: #666666; font-style: italic;">#-------------------------------------------------------------------#</span>
<span style="color: #666666; font-style: italic;">#                    (c) 2011 - Fernando Romo                       #</span>
<span style="color: #666666; font-style: italic;">#-------------------------------------------------------------------#</span>
<span style="color: #666666; font-style: italic;">#              Release under the GNU/GPL License v3.0               #</span>
<span style="color: #666666; font-style: italic;">#===================================================================#</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Load Modules</span>
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> PDF<span style="color: #339933;">::</span><span style="color: #006600;">Reuse</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Lingua<span style="color: #339933;">::</span><span style="color: #006600;">ES</span><span style="color: #339933;">::</span><span style="color: #006600;">Numeros</span> <span style="color: #ff0000;">&quot;:constants&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> XML<span style="color: #339933;">::</span><span style="color: #006600;">Simple</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Text<span style="color: #339933;">::</span><span style="color: #006600;">Wrap</span><span style="color: #339933;">::</span><span style="color: #006600;">Smart</span> <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span>wrap_smart<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$Fac</span> <span style="color: #339933;">=</span> XMLin<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$file</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/.xml$//g</span><span style="color: #339933;">;</span>
&nbsp;
prFile <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#123;</span> Name         <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;$file.pdf&quot;</span><span style="color: #339933;">,</span>
           HideToolbar  <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>          <span style="color: #666666; font-style: italic;"># 1 or 0</span>
           HideMenubar  <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>          <span style="color: #666666; font-style: italic;"># 1 or 0</span>
           HideWindowUI <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>          <span style="color: #666666; font-style: italic;"># 1 or 0</span>
           FitWindow    <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>          <span style="color: #666666; font-style: italic;"># 1 or 0</span>
           CenterWindow <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span>   <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;"># 1 or 0</span>
&nbsp;
prForm <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#123;</span> file     <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'factura.pdf'</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;"># template file</span>
           page     <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>             <span style="color: #666666; font-style: italic;"># page number (of imported template)</span>
           adjust   <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>             <span style="color: #666666; font-style: italic;"># try to fill the media box</span>
           effect   <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>             <span style="color: #666666; font-style: italic;"># action to be taken</span>
           tolerant <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>             <span style="color: #666666; font-style: italic;"># continue even with an invalid form</span>
           x        <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">13</span><span style="color: #339933;">,</span>           <span style="color: #666666; font-style: italic;"># $x points from the left</span>
           <span style="color: #000066;">y</span>        <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">,</span>            <span style="color: #666666; font-style: italic;"># $y points from the bottom</span>
           rotate   <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>             <span style="color: #666666; font-style: italic;"># rotate </span>
           size     <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>             <span style="color: #666666; font-style: italic;"># multiply everything by $size</span>
           xsize    <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>             <span style="color: #666666; font-style: italic;"># multiply horizontally by $xsize</span>
           ysize    <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>        <span style="color: #666666; font-style: italic;"># multiply vertically by $ysize</span>
&nbsp;
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># ejemplo insertando Logo</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$intName</span> <span style="color: #339933;">=</span> prJpeg<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;logo.jpg&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">300</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">104</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$str</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;q<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #0000ff;">$str</span>   <span style="color: #339933;">.=</span> <span style="color: #ff0000;">&quot;110 0 0 38 430 773 cm<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #0000ff;">$str</span>   <span style="color: #339933;">.=</span> <span style="color: #ff0000;">&quot;/$intName Do<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #0000ff;">$str</span>   <span style="color: #339933;">.=</span> <span style="color: #ff0000;">&quot;Q<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
prAdd<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$str</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Moneda</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$Sufijo</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'PESOS'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$Moneda</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'M.N.'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Moneda<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Moneda<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">'MXN'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #0000ff;">$Sufijo</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'PESOS'</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$Moneda</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'M.N.'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #0000ff;">$Moneda</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Moneda}&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$Sufijo</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">''</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> Escape_UTF8 <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@out</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@out</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #009966; font-style: italic;">s/á/\x{e1}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/é/\x{e9}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/í/\x{ed}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/ó/\x{f3}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/ú/\x{fa}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/Á/\x{c1}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/É/\x{c9}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/Í/\x{cd}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/Ó/\x{d3}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/Ú/\x{da}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/ñ/\x{f1}/g</span><span style="color: #339933;">;</span>
        <span style="color: #009966; font-style: italic;">s/Ñ/\x{d1}/g</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066;">return</span> <span style="color: #000066;">wantarray</span> <span style="color: #339933;">?</span> <span style="color: #0000ff;">@out</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">$out</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> Wrap_Text <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ref_string</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$col</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$width</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$font_size</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$space</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$split</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@text</span> <span style="color: #339933;">=</span> wrap_smart<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_string</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span> no_split <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$split</span><span style="color: #339933;">,</span> max_msg_size <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$width</span><span style="color: #339933;">,</span><span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    prFontSize <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$font_size</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$linea</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@text</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        prText<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$col</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$linea</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">-</span> <span style="color: #0000ff;">$space</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066;">return</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">$space</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> Dinero <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$number</span> <span style="color: #339933;">=</span> <span style="color: #000066;">sprintf</span> <span style="color: #ff0000;">&quot;%.2f&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066;">shift</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
    <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">while</span> <span style="color: #0000ff;">$number</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^(-?\d+)(\d\d\d)/$1,$2/</span><span style="color: #339933;">;</span>
    <span style="color: #0000ff;">$number</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^(-?)/$1\$/</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">return</span> <span style="color: #0000ff;">$number</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> Cantidad <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$number</span> <span style="color: #339933;">=</span> <span style="color: #000066;">sprintf</span> <span style="color: #ff0000;">&quot;%.2f&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066;">shift</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
    <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">while</span> <span style="color: #0000ff;">$number</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/^(-?\d+)(\d\d\d)/$1,$2/</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">return</span> <span style="color: #0000ff;">$number</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> Parte <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ref_parte</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">%Pedimentos</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@SinPedimento</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$parte_aux</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'N.S.: '</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">ref</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_parte</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">'ARRAY'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$$ref_parte</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span> <span style="color: #0000ff;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #0000ff;">$Pedimentos</span><span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>numero<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>aduana<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> 
                    <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>aduana<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
                <span style="color: #0000ff;">$Pedimentos</span><span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>numero<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>fecha<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span>
                    <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>fecha<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
                <span style="color: #000066;">push</span> <span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$Pedimentos</span><span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>numero<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>serie<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                    <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>noIdentificacion<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span> 
            <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066;">push</span> <span style="color: #0000ff;">@SinPedimento</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>noIdentificacion<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$numero</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">sort</span> <span style="color: #000066;">keys</span> <span style="color: #0000ff;">%Pedimentos</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #0000ff;">$parte_aux</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'N.S.: '</span><span style="color: #339933;">;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Wrap_Text<span style="color: #009900;">&#40;</span>\<span style="color: #ff0000;">&quot;Pedimento: $numero, Aduana: $Pedimentos{$numero}{aduana}, Fecha: $Pedimentos{$numero}{fecha}&quot;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">85</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">70</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">6</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$x</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$x</span> <span style="color: #339933;">&lt;=</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$Pedimentos</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$numero</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>serie<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span> <span style="color: #0000ff;">$x</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #0000ff;">$parte_aux</span> <span style="color: #339933;">.=</span> <span style="color: #ff0000;">&quot;$Pedimentos{$numero}{serie}[$x], &quot;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #0000ff;">$parte_aux</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/, $//</span><span style="color: #339933;">;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Wrap_Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\$parte_aux</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">85</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">70</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">6</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$#SinPedimento</span> <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #0000ff;">$parte_aux</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'N.S.: '</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$serie</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">sort</span> <span style="color: #0000ff;">@SinPedimento</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #0000ff;">$parte_aux</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">$serie</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">', '</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #0000ff;">$parte_aux</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/, $//</span><span style="color: #339933;">;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Wrap_Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\$parte_aux</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">85</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">70</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">6</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$aduana_aux</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'Pedimento: '</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>numero<span style="color: #009900;">&#125;</span> <span style="color: #339933;">.</span>
                             <span style="color: #ff0000;">', Aduana: '</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>aduana<span style="color: #009900;">&#125;</span> <span style="color: #339933;">.</span>
                             <span style="color: #ff0000;">', fecha: '</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>InformacionAduanera<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>fecha<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Wrap_Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\$aduana_aux</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">85</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">70</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">6</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$parte_aux</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">$$ref_parte</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>noIdentificacion<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Wrap_Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\$parte_aux</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">85</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">70</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">6</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000066;">return</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> Concepto <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ref_concepto</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">ref</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_concepto</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">'ARRAY'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$$ref_concepto</span> <span style="color: #009900;">&#125;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span> <span style="color: #0000ff;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">18</span><span style="color: #339933;">,</span>  <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>noIdentificacion<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">375</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> Cantidad<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>cantidad<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">477</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> Dinero<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>valorUnitario<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot; $Moneda&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">580</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> Dinero<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>importe<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot; $Moneda&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Wrap_Text<span style="color: #009900;">&#40;</span>\<span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>descripcion<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">85</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">55</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Parte<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Parte<span style="color: #009900;">&#40;</span>\<span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Parte<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$row</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">18</span><span style="color: #339933;">,</span>  <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>noIdentificacion<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">375</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> Cantidad<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>cantidad<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">477</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> Dinero<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>valorUnitario<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot; $Moneda&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">580</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span> Dinero<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>importe<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot; $Moneda&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Wrap_Text<span style="color: #009900;">&#40;</span>\<span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>descripcion<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">85</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$row</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">55</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Parte<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Parte<span style="color: #009900;">&#40;</span>\<span style="color: #0000ff;">$$ref_concepto</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Parte<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$row</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066;">return</span> <span style="color: #0000ff;">$row</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Datos del CSD</span>
&nbsp;
prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">140</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">790</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{noCertificado}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">140</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">778</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{noAprobacion}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">300</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">778</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{anoAprobacion}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">140</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">766</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{tipoDeComprobante}&quot;</span><span style="color: #339933;">,,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">275</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">766</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{fecha}&quot;</span><span style="color: #339933;">,,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">140</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">754</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{formaDePago}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">140</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">736</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{serie}-$Fac-&gt;{folio}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Emisor</span>
&nbsp;
prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica-Bold'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">768</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Emisor}{nombre}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">756</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Emisor}{DomicilioFiscal}{calle} $Fac-&gt;{Emisor}{DomicilioFiscal}{noExterior} $Fac-&gt;{Emisor}{DomicilioFiscal}{noInterior}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">746</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;Col. $Fac-&gt;{Emisor}{DomicilioFiscal}{colonia} C.P. $Fac-&gt;{Emisor}{DomicilioFiscal}{codigoPostal}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">736</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Emisor}{DomicilioFiscal}{municipio}, $Fac-&gt;{Emisor}{DomicilioFiscal}{estado}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">726</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Emisor}{DomicilioFiscal}{localidad}, $Fac-&gt;{Emisor}{DomicilioFiscal}{pais}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">684</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;R.F.C.:&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica-Bold'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">437</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">684</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Emisor}{rfc}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Lugar de emision</span>
&nbsp;
prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">650</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Emisor}{ExpedidoEn}{calle} $Fac-&gt;{Emisor}{ExpedidoEn}{noExterior} $Fac-&gt;{Emisor}{ExpedidoEn}{noInterior}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">640</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Emisor}{ExpedidoEn}{colonia}, C.P. $Fac-&gt;{Emisor}{ExpedidoEn}{codigoPostal}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">630</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Emisor}{ExpedidoEn}{municipio}, $Fac-&gt;{Emisor}{ExpedidoEn}{estado}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">402</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">620</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Emisor}{ExpedidoEn}{localidad}, $Fac-&gt;{Emisor}{ExpedidoEn}{pais}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Facturado A</span>
&nbsp;
prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica-Bold'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">690</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Receptor}{nombre}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">678</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Receptor}{Domicilio}{calle} $Fac-&gt;{Receptor}{Domicilio}{noExterior} $Fac-&gt;{Receptor}{Domicilio}{noInterior}&quot;</span> <span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">666</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Receptor}{Domicilio}{colonia}, C.P. $Fac-&gt;{Receptor}{Domicilio}{codigoPostal}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">654</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Receptor}{Domicilio}{municipio}, $Fac-&gt;{Receptor}{Domicilio}{localidad}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">642</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Receptor}{Domicilio}{estado}, $Fac-&gt;{Receptor}{Domicilio}{pais}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">620</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;R.F.C.:&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica-Bold'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">56</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">620</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$Fac-&gt;{Receptor}{rfc}&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'left'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># partidas</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$row</span> <span style="color: #339933;">=</span> Concepto<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Conceptos<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>Concepto<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">575</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Addenda</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Addenda<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>Incuvox<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>Note<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica-Oblique'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$nota</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'Nota: '</span> <span style="color: #339933;">.</span>  <span style="color: #0000ff;">$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Addenda<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>Incuvox<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>Note<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    Wrap_Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\$nota</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">85</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$row</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">80</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Numero en letras</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$pesos</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$centavos</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #000066;">split</span><span style="color: #009900;">&#40;</span> <span style="color: #009966; font-style: italic;">/\./</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>total<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$pesos</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">unless</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$pesos</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$centavos</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">unless</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$centavos</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$obj</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Lingua<span style="color: #339933;">::</span><span style="color: #006600;">ES</span><span style="color: #339933;">::</span><span style="color: #006600;">Numeros</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'MAYUSCULAS'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> ACENTOS <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$letrero</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">cardinal</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$pesos</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot; $Sufijo &quot;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot;$centavos/100 $Moneda<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
Wrap_Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\$letrero</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">65</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">334</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">70</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Totales</span>
&nbsp;
prFontSize <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">580</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">334</span><span style="color: #339933;">,</span> Dinero<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>descuento<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot; $Moneda&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">580</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">323</span><span style="color: #339933;">,</span> Dinero<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>subTotal<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot; $Moneda&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">458</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">312</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'16'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">580</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">312</span><span style="color: #339933;">,</span> Dinero<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>Impuestos<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#123;</span>totalImpuestosTrasladados<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot; $Moneda&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica-Bold'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prText<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">580</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">301</span><span style="color: #339933;">,</span> Dinero<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>total<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot; $Moneda&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'right'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Helvetica'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Cadena Original</span>
&nbsp;
prFont<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Courier'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$cadena</span> <span style="color: #339933;">=</span> Escape_UTF8<span style="color: #009900;">&#40;</span><span style="color: #000066;">qx</span><span style="color: #009900;">&#40;</span>xsltproc <span style="color: #339933;">~/</span>SAT<span style="color: #339933;">/</span>xslt<span style="color: #339933;">/</span>cadenaoriginal_2_0<span style="color: #339933;">.</span>xslt <span style="color: #0000ff;">$file</span><span style="color: #339933;">.</span>xml<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Wrap_Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\$cadena</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">20</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">269</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">155</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">6</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Sello</span>
&nbsp;
Wrap_Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">\$Fac</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>sello<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">75</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">124</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">130</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
prEnd<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Para utilizarlo (instalando mis scripts y las dependencias de CPAN previamente) solo tendran que hacer esto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>CFD_to_PDF.pl Fac_Sample.xml</pre></div></div>

<p>El XML que procesamos para este ejemplo:</p>
<p><b>Fac_Sample.xml</b></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span></span>
<span style="color: #009900;">      <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Comprobante</span></span>
<span style="color: #009900;">    <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.sat.gob.mx/cfd/2&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://www.sat.gob.mx/cfd/2</span>
<span style="color: #009900;">                        http://www.sat.gob.mx/sitio_internet/cfd/2/cfdv2.xsd</span>
<span style="color: #009900;">                        http://incuvox.com/cfd/incuvox.xsd&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.0&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">serie</span>=<span style="color: #ff0000;">&quot;AA&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">folio</span>=<span style="color: #ff0000;">&quot;1619&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">fecha</span>=<span style="color: #ff0000;">&quot;2011-03-27T18:20:36&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">sello</span>=<span style="color: #ff0000;">&quot;rVoq96VkMeQ6gt993DnVuaWiAXwjNSeJKT27gJ8pOuC/tHo9SzvB6t0zM0hj03ivHC/gWvC2kK9nQ5JxCiJ96f08pyGP00jSD4z0/LCplTxb3nASc7/gDV5L42RW0drh7dtV2UWMfrrZE7Xfj9l38kigH5+cvo8/V8IiJLBKmLc=&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">noAprobacion</span>=<span style="color: #ff0000;">&quot;263844&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">anoAprobacion</span>=<span style="color: #ff0000;">&quot;2010&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">tipoDeComprobante</span>=<span style="color: #ff0000;">&quot;ingreso&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">formaDePago</span>=<span style="color: #ff0000;">&quot;Contado en una sola exibición&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">noCertificado</span>=<span style="color: #ff0000;">&quot;00001000000102302081&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">certificado</span>=<span style="color: #ff0000;">&quot;</span>
<span style="color: #009900;">MIIE/TCCA+WgAwIBAgIUMzAwMDEwMDAwMDAxMDAwMDA4MDcwDQYJKoZIhvcNAQEFBQAwggFvMRgwFgYDVQQDDA9BLkMuIGRlIHBydWViYXMxLzAtBgNVBAoMJlNlcnZpY2lvIGRlIEFkbWluaXN0cmFjacOzbiBUcmlidXRhcmlhMTgwNgYDVQQLDC9BZG1pbmlzdHJhY2nDs24gZGUgU2VndXJpZGFkIGRlIGxhIEluZm9ybWFjacOzbjEpMCcGCSqGSIb3DQEJARYaYXNpc25ldEBwcnVlYmFzLnNhdC5nb2IubXgxJjAkBgNVBAkMHUF2LiBIaWRhbGdvIDc3LCBDb2wuIEd1ZXJyZXJvMQ4wDAYDVQQRDAUwNjMwMDELMAkGA1UEBhMCTVgxGTAXBgNVBAgMEERpc3RyaXRvIEZlZGVyYWwxEjAQBgNVBAcMCUNveW9hY8OhbjEVMBMGA1UELRMMU0FUOTcwNzAxTk4zMTIwMAYJKoZIhvcNAQkCDCNSZXNwb25zYWJsZTogSMOpY3RvciBPcm5lbGFzIEFyY2lnYTAeFw0xMDA3MzAxNjU4NDZaFw0xMjA3MjkxNjU4NDZaMIGWMRIwEAYDVQQDDAlNYXRyaXogU0ExEjAQBgNVBCkMCU1hdHJpeiBTQTESMBAGA1UECgwJTWF0cml6IFNBMSUwIwYDVQQtExxBQUEwMTAxMDFBQUEgLyBBQUFBMDEwMTAxQUFBMR4wHAYDVQQFExUgLyBBQUFBMDEwMTAxSERGUlhYMDExETAPBgNVBAsMCFVuaWRhZCA4MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVvLjg4dC8rIWzeRV6v+ZxYTpzgiK11bHLeYRYF8Pho+1fTeRn7oOUdGfYSUEsqXV8s99F+rdJeA9Ma9iAt5zYBW+qkWlr8NDkkxQyMiOv8oEoJiXFsNWekAhnniyFoPn9pbA1FVBfBsaIe82HKi+Vq0Nd0QKh28afj2f6yhwZnwIDAQABo4HqMIHnMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgbAMB0GA1UdDgQWBBSXXSAB98HZaYvKFyKXq5u8z4SG+zAuBgNVHR8EJzAlMCOgIaAfhh1odHRwOi8vcGtpLnNhdC5nb2IubXgvc2F0LmNybDAzBggrBgEFBQcBAQQnMCUwIwYIKwYBBQUHMAGGF2h0dHA6Ly9vY3NwLnNhdC5nb2IubXgvMB8GA1UdIwQYMBaAFOtZfQQimlONnnEaoFiWKfU54KDFMBAGA1UdIAQJMAcwBQYDKgMEMBMGA1UdJQQMMAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4IBAQAlyBvfqLEsWYW11levSQLbsvCpaWmIqtbhfM65Ly+b3848+S3WF9qZJLbH6NkViGUKy9WtTOwegicPSY/dihx1ZDOplARutbrscpLGqwfKsg/qh7ppK7CwqZv5rvrjnaflI8KDV9b+2hsyI0oGY9kVnZb0GgpNZMAKvUmvqXq5Z4ehoNWJmvixV7MgnX/heCZEcKZbR1pIoropUgiR5M8TUF9SUQlPPyRHgNA/v6vNwwZT+JYa62x65IrguUgLCg3DJgo4hk4zADM81Irn3jiTLBZcF2LTQageqxYxSj8MCWz7vGoB8Kv70CLY+Xin/IscCmZ2ohbG636sFNi6so4T&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">subTotal</span>=<span style="color: #ff0000;">&quot;1450.50&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">descuento</span>=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">Moneda</span>=<span style="color: #ff0000;">&quot;USD&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">TipoCambio</span>=<span style="color: #ff0000;">&quot;12.13&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">total</span>=<span style="color: #ff0000;">&quot;1682.58&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Emisor</span> <span style="color: #000066;">rfc</span>=<span style="color: #ff0000;">&quot;COS101109Q36&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">nombre</span>=<span style="color: #ff0000;">&quot;Cofradia Software, S.A. de C.V.&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DomicilioFiscal</span> <span style="color: #000066;">calle</span>=<span style="color: #ff0000;">&quot;Av. División del Norte&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">noExterior</span>=<span style="color: #ff0000;">&quot;1354&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">noInterior</span>=<span style="color: #ff0000;">&quot;202&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">colonia</span>=<span style="color: #ff0000;">&quot;Letrán-Valle&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">localidad</span>=<span style="color: #ff0000;">&quot;Distrito Federal&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">referencia</span>=<span style="color: #ff0000;">&quot;Esquina con Miguel Laurent&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">municipio</span>=<span style="color: #ff0000;">&quot;Benito Juárez&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">estado</span>=<span style="color: #ff0000;">&quot;Distrito Federal&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">pais</span>=<span style="color: #ff0000;">&quot;México&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">codigoPostal</span>=<span style="color: #ff0000;">&quot;03650&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ExpedidoEn</span> <span style="color: #000066;">calle</span>=<span style="color: #ff0000;">&quot;Av. División del Norte&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">noExterior</span>=<span style="color: #ff0000;">&quot;1354&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">noInterior</span>=<span style="color: #ff0000;">&quot;202&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">colonia</span>=<span style="color: #ff0000;">&quot;Letrán-Valle&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">localidad</span>=<span style="color: #ff0000;">&quot;Distrito Federal&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">municipio</span>=<span style="color: #ff0000;">&quot;Benito Juárez&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">estado</span>=<span style="color: #ff0000;">&quot;Distrito Federal&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">pais</span>=<span style="color: #ff0000;">&quot;México&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">codigoPostal</span>=<span style="color: #ff0000;">&quot;03650&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Emisor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Receptor</span> <span style="color: #000066;">rfc</span>=<span style="color: #ff0000;">&quot;JCC960111P76&quot;</span></span>
<span style="color: #009900;">              <span style="color: #000066;">nombre</span>=<span style="color: #ff0000;">&quot;Juan Camanei Company, S.A. de C.V.&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Domicilio</span> <span style="color: #000066;">calle</span>=<span style="color: #ff0000;">&quot;Av. Insurgentes Sur&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">noExterior</span>=<span style="color: #ff0000;">&quot;1600&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">noInterior</span>=<span style="color: #ff0000;">&quot;301&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">colonia</span>=<span style="color: #ff0000;">&quot;Guadalupe Inn&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">localidad</span>=<span style="color: #ff0000;">&quot;Distrito Federal&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">municipio</span>=<span style="color: #ff0000;">&quot;Álvaro Obregón&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">estado</span>=<span style="color: #ff0000;">&quot;Distrito Federal&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">pais</span>=<span style="color: #ff0000;">&quot;México&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">codigoPostal</span>=<span style="color: #ff0000;">&quot;01020&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Receptor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Conceptos<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Concepto</span> <span style="color: #000066;">cantidad</span>=<span style="color: #ff0000;">&quot;10&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">unidad</span>=<span style="color: #ff0000;">&quot;Hora&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">noIdentificacion</span>=<span style="color: #ff0000;">&quot;SPREDV&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">descripcion</span>=<span style="color: #ff0000;">&quot;hora de servicios profesionales en análisis de Redes y VoIP&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">valorUnitario</span>=<span style="color: #ff0000;">&quot;120.00&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">importe</span>=<span style="color: #ff0000;">&quot;1200.00&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span> 
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Concepto</span> <span style="color: #000066;">cantidad</span>=<span style="color: #ff0000;">&quot;3&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">unidad</span>=<span style="color: #ff0000;">&quot;pz&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">noIdentificacion</span>=<span style="color: #ff0000;">&quot;6731i&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">descripcion</span>=<span style="color: #ff0000;">&quot;TELEFONO AASTRA MOD. 6731i SIP&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">valorUnitario</span>=<span style="color: #ff0000;">&quot;83.50&quot;</span></span>
<span style="color: #009900;">                  <span style="color: #000066;">importe</span>=<span style="color: #ff0000;">&quot;250.50&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Parte</span> <span style="color: #000066;">cantidad</span>=<span style="color: #ff0000;">&quot;1.00&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">noIdentificacion</span>=<span style="color: #ff0000;">&quot;0D10361C9D&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">descripcion</span>=<span style="color: #ff0000;">&quot;TELEFONO AASTRA MOD. 6731i SIP&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;InformacionAduanera</span> <span style="color: #000066;">numero</span>=<span style="color: #ff0000;">&quot;37780005637&quot;</span></span>
<span style="color: #009900;">                                              <span style="color: #000066;">fecha</span>=<span style="color: #ff0000;">&quot;2010-11-05&quot;</span></span>
<span style="color: #009900;">                                              <span style="color: #000066;">aduana</span>=<span style="color: #ff0000;">&quot;LAREDO&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/InformacionAduanera<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Parte<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Parte</span> <span style="color: #000066;">cantidad</span>=<span style="color: #ff0000;">&quot;1.00&quot;</span> </span>
<span style="color: #009900;">                         <span style="color: #000066;">noIdentificacion</span>=<span style="color: #ff0000;">&quot;0D10361C91&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">descripcion</span>=<span style="color: #ff0000;">&quot;TELEFONO AASTRA MOD. 6731i SIP&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;InformacionAduanera</span> <span style="color: #000066;">numero</span>=<span style="color: #ff0000;">&quot;37780005637&quot;</span> </span>
<span style="color: #009900;">                                              <span style="color: #000066;">fecha</span>=<span style="color: #ff0000;">&quot;2010-11-05&quot;</span></span>
<span style="color: #009900;">                                              <span style="color: #000066;">aduana</span>=<span style="color: #ff0000;">&quot;LAREDO&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/InformacionAduanera<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Parte<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Parte</span> <span style="color: #000066;">cantidad</span>=<span style="color: #ff0000;">&quot;1.00&quot;</span> </span>
<span style="color: #009900;">                         <span style="color: #000066;">noIdentificacion</span>=<span style="color: #ff0000;">&quot;0D10361CAF&quot;</span></span>
<span style="color: #009900;">                         <span style="color: #000066;">descripcion</span>=<span style="color: #ff0000;">&quot;TELEFONO AASTRA MOD. 6731i SIP&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;InformacionAduanera</span> <span style="color: #000066;">numero</span>=<span style="color: #ff0000;">&quot;37780005699&quot;</span> </span>
<span style="color: #009900;">                                              <span style="color: #000066;">fecha</span>=<span style="color: #ff0000;">&quot;2010-11-08&quot;</span></span>
<span style="color: #009900;">                                              <span style="color: #000066;">aduana</span>=<span style="color: #ff0000;">&quot;LAREDO&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                         <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/InformacionAduanera<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Parte<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Concepto<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Conceptos<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Impuestos</span> <span style="color: #000066;">totalImpuestosTrasladados</span>=<span style="color: #ff0000;">&quot;232.08&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
               <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Traslados<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Traslado</span> <span style="color: #000066;">impuesto</span>=<span style="color: #ff0000;">&quot;IVA&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">tasa</span>=<span style="color: #ff0000;">&quot;16.00&quot;</span></span>
<span style="color: #009900;">                             <span style="color: #000066;">importe</span>=<span style="color: #ff0000;">&quot;232.08&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
               <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Traslados<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Impuestos<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Addenda<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Incuvox</span> <span style="color: #000066;">Note</span>=<span style="color: #ff0000;">&quot;Servicios solicitadas por la gente que quiere hacer facturas&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Addenda<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Comprobante<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>y el resultado queda así:</p>
<p><a href="http://cofradia.org/wp-content/uploads/2011/03/Fac_Sample.pdf"><img src="http://cofradia.org/wp-content/uploads/2011/03/pdf_de_CFD-229x300.png" alt="" title="pdf_de_CFD" width="229" height="300" class="alignnone size-medium wp-image-5352" /></a></p>
<p>Queda al lector ajustar su PDF de template y la salida deseada.</p>
<p>Autor: Fernando “El Pop” Romo (pop at cofradia.org), twitter @El_Pop</p>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2011/03/27/convirtiendo-facturas-electronicas-del-xml-a-pdf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Educar para explotar</title>
		<link>http://cofradia.org/2011/03/08/educar-para-explotar/</link>
		<comments>http://cofradia.org/2011/03/08/educar-para-explotar/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 15:39:57 +0000</pubDate>
		<dc:creator>El Pop</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[Bases de Datos]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Convocatorias]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Programacion]]></category>
		<category><![CDATA[Sistemas Operativos]]></category>
		<category><![CDATA[software libre]]></category>
		<category><![CDATA[VoIP]]></category>
		<category><![CDATA[WTF]]></category>
		<category><![CDATA[¿Qué hacer en mi tiempo libre?]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=4965</guid>
		<description><![CDATA[Puede que suene un tanto cínico, pero esto lo pongo como una reflexión y una invitación para crear nuevos cuadros de gente que le interese temas de tecnología. A manera de reflexión y vivencia, nuestra empresa se ha dedicado en los últimos 6 años al desarrollo de plataformas de Call center usando Asterisk, Freeswitch y [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2011/03/08/educar-para-explotar/"></g:plusone></div><p>Puede que suene un tanto cínico, pero esto lo pongo como una reflexión y una invitación para crear nuevos cuadros de gente que le interese temas de tecnología.</p>
<p>A manera de reflexión y vivencia, nuestra empresa se ha dedicado en los últimos 6 años al desarrollo de plataformas de Call center usando Asterisk, Freeswitch y otras herramientas, en lo cual hemos formado un equipo de gente bien preparada y certificada, pero con el paso del tiempo, esta busca nuevos retos.</p>
<p>La gente necesita mas ingreso, eso lo entendemos y estamos contentos de apoyar en su crecimiento, ellos nos abrirán nuevos negocios a futuro.</p>
<p>Por lo cual estamos emprendiendo algo que creo puede ser llamativo:<br />
<span id="more-4965"></span><br />
<strong>Educar para explotar</strong></p>
<p>Les pongo a manera de FAQ en que consiste:</p>
<p><OL><br />
<LI>¿En que consiste esta idea?<BR/><br />
El programa busca gente que quiera aprender de tecnologías de VoIP, Redes y desarrollo de Software</LI><br />
<LI>¿A quien va dirijido?<BR/><br />
A cualquier persona que quiera aprender a crear software bajo plataformas de Open Source<br />
</LI><br />
<LI>¿Que gano en esto?<BR/><br />
Solo conocimiento, si vemos que destacan los orientaremos a proyectos que pueden dejar un ingreso</LI><br />
<LI>¿Que necesito para entrarle?<BR/><br />
Saber algo de Linux y que no les tiemble la mano para compilar código</LI><br />
<LI>¿Cuando empieza esto?<BR/><br />
prentendemos ser flexibles pero tentativo a finales de marzo</LI><br />
<LI>¿Tiene un costo?<BR/><br />
Estamos viendo la viabilidad de que sea gratuito, pero pensamos en una cuota de recuperación que será usada para café, cerveza y pizzas <img src='http://cofradia.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </LI><br />
<LI>¿Que aprendo al final?<BR/><br />
A programar en Perl, C, a usar frameworks de desarrollo, a usar PostgreSQL, Asterisk, Apache y varios componentes de Open Source</LI><br />
<LI>¿Hasta que nivel llegaré?<BR/><br />
Esto depende de cada uno, pero queremos al menos que las personas interesadas puedan tener el nivel para presentar al menos una certificación de Asterisk como el <A HREF="http://www.digium.com/en/training/certifications/dcap.php">DCap</A> (Digium-Certified Asterisk Professional)</LI><br />
<LI>¿Y ustedes que ganan?<BR/><br />
Muchas cosas: Conocer gente nueva, buscar nuevos talentos, obtener fuerza laboral para posibles proyectos y crear una comunidad de gente comprometida con tecnologías abiertas.</LI><br />
<LI>¿A quien contacto para entarle?<BR/><br />
manda tu mail a esclavos@cofradia.org, con tus datos generales (nombre, teléfono, escolaridad, Twitter, Facebook, etc.)</LI><br />
<LI>¿Que mas necesito?<BR/><br />
Pues el tiempo y la entereza de aprender a la espartana, no seremos paternalistas, los humillaremos hasta la ignominia (como el Dr. House) pero podemos decirles que aprenderan mucho.</LI><br />
<LI>¿En donde será esto?<br />
<BR/>Pues inicialmente en la ciudad de México (DeFectuoso para los cuates), en zona sur y centro.</LI><br />
<LI>¿Solo es para tu empresa?<BR/><br />
No, estamos buscando hacer un esfuerzo conjunto con mas empresas orientadas al desarrollo de Open Source que buscan talento al igual que nosotros</LI><br />
<LI>¿Por qué le llaman así?<BR/><br />
Pues vemos que la única manera de explotar el talento de la gente es formandolo, por lo cual el slogan se vuelve adecuado para esto.</LI><br />
</OL></p>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2011/03/08/educar-para-explotar/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Código de barras de 2D QR (Quick Response)</title>
		<link>http://cofradia.org/2010/12/23/codigo-de-barras-de-2d-qr-quick-response/</link>
		<comments>http://cofradia.org/2010/12/23/codigo-de-barras-de-2d-qr-quick-response/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 07:25:39 +0000</pubDate>
		<dc:creator>El Pop</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programacion]]></category>
		<category><![CDATA[Tips técnicos]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=4420</guid>
		<description><![CDATA[Pues siguiendo la investigación de la mentada factura electrónica del SAT, me encuentro que hay un requerimiento para las facturas impresas de usar un código de Barras Bi-dimensional con un formato QR (Quick Response). Esto para poner información en la factura del RFC que emite y recibe la misma, así que me dí a la [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2010/12/23/codigo-de-barras-de-2d-qr-quick-response/"></g:plusone></div><p><a href="http://cofradia.org/wp-content/uploads/2010/12/demo_qr_code.png"><img src="http://cofradia.org/wp-content/uploads/2010/12/demo_qr_code.png" alt="" title="demo_qr_code" width="140" height="140" class="alignleft size-full wp-image-4421" /></a></p>
<p>Pues siguiendo la investigación de la mentada factura electrónica del SAT, me encuentro que hay un requerimiento para las facturas impresas de usar un código de Barras Bi-dimensional con un formato <A HREF="http://en.wikipedia.org/wiki/QR_Code">QR</A> (Quick Response).</p>
<p>Esto para poner información en la factura del RFC que emite y recibe la misma, así que me dí a la tarea de buscar como hacerlo&#8230;</p>
<p><span id="more-4420"></span></p>
<p>Pues yo que soy amante de Perl, encontré en <A HREF="http://www.cpan.org/">CPAN</A> una librería llamada <A HREF="http://search.cpan.org/~kurihara/Imager-QRCode-0.031/lib/Imager/QRCode.pm">Imager::QrCode</A> que hace la talacha.</p>
<p>Esta depende (y debe estar instalada) del módulo <A HREF="http://search.cpan.org/~tonyc/Imager-0.79/Imager.pm">Imager</A>.</p>
<p>Aunque deben instalar previamente la librería de <A HREF="http://www.libpng.org/pub/png/libpng.html">libpng</A> (en su versión <A HREF="http://sourceforge.net/projects/libpng/files/libpng12/1.2.44/">1.2</A>, aunque ya esta la rama 1.4) y la librería <A HREF="http://fukuchi.org/works/qrencode/index.en.html">libqrencode</A> (versión 3.1.1 o mayor). En Mac OS X necesite tener la última versión de <A HREF="http://pkg-config.freedesktop.org/wiki/">pkg-config</A></p>
<p>Ya con estos pre-requisitos hacemos un programa sencillo en Perl que genera lo que queramos:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
<span style="color: #000000; font-weight: bold;">use</span> Imager<span style="color: #339933;">::</span><span style="color: #006600;">QRCode</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$qrcode</span> <span style="color: #339933;">=</span> Imager<span style="color: #339933;">::</span><span style="color: #006600;">QRCode</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span>
    size          <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span>
    margin        <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
    version       <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
    level         <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'M'</span><span style="color: #339933;">,</span>
    casesensitive <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
    lightcolor    <span style="color: #339933;">=&gt;</span> Imager<span style="color: #339933;">::</span><span style="color: #006600;">Color</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    darkcolor     <span style="color: #339933;">=&gt;</span> Imager<span style="color: #339933;">::</span><span style="color: #006600;">Color</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$img</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$qrcode</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">plot</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;Las hormigas en Francia siempre se visten con elegancia&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$img</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">write</span><span style="color: #009900;">&#40;</span>file <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;2d_qr_demo.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$img</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$qrcode</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">plot</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;?re=ROAF641217K94&amp;rr=INC101109Q36&amp;tt=1234567890.123456&amp;id=ad662d33-6934-459c-a128-BDf0393f0f44&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$img</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">write</span><span style="color: #009900;">&#40;</span>file <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">&quot;timbre_Fiscal_SAT.png&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<div id="attachment_4427" class="wp-caption alignnone" style="width: 182px"><a href="http://cofradia.org/wp-content/uploads/2010/12/timbre_Fiscal_SAT.png"><img src="http://cofradia.org/wp-content/uploads/2010/12/timbre_Fiscal_SAT.png" alt="" title="timbre_Fiscal_SAT" width="172" height="172" class="size-full wp-image-4427" /></a><p class="wp-caption-text">Timbre Fiscal para el SAT</p></div>
<p>Y listo <img src='http://cofradia.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2010/12/23/codigo-de-barras-de-2d-qr-quick-response/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Facebook Hacker Cup 2011</title>
		<link>http://cofradia.org/2010/12/15/facebook-hacker-cup-2011/</link>
		<comments>http://cofradia.org/2010/12/15/facebook-hacker-cup-2011/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 04:49:41 +0000</pubDate>
		<dc:creator>El Pop</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Convocatorias]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programacion]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=4282</guid>
		<description><![CDATA[Facebook convoca al Hacker Cup 2011, es una competencia internacional. Las inscripciones se abrirán el día 20 de diciembre del 2010. Se harán varias rondas por internet y los 25 semi-finalistas concursarán en Palo Alto California por las rondas finales. Facebook pagará el viaje y estancia de los finalistas y dará un premio de $5,000 [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2010/12/15/facebook-hacker-cup-2011/"></g:plusone></div><p><a href="http://cofradia.org/wp-content/uploads/2010/12/hackercup.jpg"><img src="http://cofradia.org/wp-content/uploads/2010/12/hackercup.jpg" alt="" title="hackercup" width="200" height="267" class="alignleft size-full wp-image-4283" /></a></p>
<p>
Facebook convoca al <A HREF="http://www.facebook.com/hackercup">Hacker Cup 2011</A>, es una competencia internacional.
</p>
<p>
Las inscripciones se abrirán el día 20 de diciembre del 2010. Se harán varias rondas por internet y los 25 semi-finalistas concursarán en Palo Alto California  por las rondas finales. Facebook pagará el viaje y estancia de los finalistas y dará un premio de $5,000 USD al ganador.
</p>
<p>
Los detalles <A HREF="http://www.facebook.com/hackercup#!/note.php?note_id=467531498919&#038;id=9445547199">aquí</A>.</p>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2010/12/15/facebook-hacker-cup-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programador de Perl en Guadalajara</title>
		<link>http://cofradia.org/2010/10/06/programador-de-perl-en-guadalajara/</link>
		<comments>http://cofradia.org/2010/10/06/programador-de-perl-en-guadalajara/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 23:46:23 +0000</pubDate>
		<dc:creator>carlos.alberto</dc:creator>
				<category><![CDATA[Clasificados]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programacion]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=3974</guid>
		<description><![CDATA[Hola, Tengo un proyecto web en Perl para el cual necesito ayuda de un desarrollador, si alguien está disponible en Guadalajara, podría por favor comunicarse conmigo respondiendo a este post? Gracias Ing. Carlos Alberto Kassab Consultor]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2010/10/06/programador-de-perl-en-guadalajara/"></g:plusone></div><p>Hola,</p>
<p>Tengo un proyecto web en Perl para el cual necesito ayuda de un desarrollador, si alguien está disponible en Guadalajara, podría por favor comunicarse conmigo respondiendo a este post?</p>
<p>Gracias</p>
<p>Ing. Carlos Alberto Kassab</p>
<p>Consultor</p>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2010/10/06/programador-de-perl-en-guadalajara/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Técnicas para portar código de Perl a Python</title>
		<link>http://cofradia.org/2010/09/10/tecnicas-para-portar-codigo-de-perl-a-python/</link>
		<comments>http://cofradia.org/2010/09/10/tecnicas-para-portar-codigo-de-perl-a-python/#comments</comments>
		<pubDate>Sat, 11 Sep 2010 03:09:48 +0000</pubDate>
		<dc:creator>solrac</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programacion]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tips técnicos]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Redhat SUSE]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cofradia.org/?p=3777</guid>
		<description><![CDATA[Nos mandan un artículo sobre como portar programas escritos en Perl a Python: Python programmers shouldn&#8217;t get too smug. While many people agree that Python is designed in a way that makes it a highly readable language, there can still be problems with legacy, untested Python code too. Porting legacy Perl to Python can be [...]]]></description>
			<content:encoded><![CDATA[<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://cofradia.org/2010/09/10/tecnicas-para-portar-codigo-de-perl-a-python/"></g:plusone></div><p>Nos mandan un artículo sobre como portar programas escritos en Perl a Python:</p>
<blockquote><p>
Python programmers shouldn&#8217;t get too smug. While many people agree that Python is designed in a way that makes it a highly readable language, there can still be problems with legacy, untested Python code too. Porting legacy Perl to Python can be a daunting task. In this article, learn some of the theory behind <a href="http://www.ibm.com/developerworks/opensource/library/l-perl-2-python/index.html?cmp=dw&amp;cpb=dwlin&amp;ct=dwgra&amp;cr=lnxw03&amp;ccy=us&amp;csr=Perl2Python">dealing with legacy code</a>, including what not to do.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://cofradia.org/2010/09/10/tecnicas-para-portar-codigo-de-perl-a-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

