File: php/CtaCobro.php

Recommend this page to a friend!
  Classes of Luis Gabriel Hernandez Valderrama  >  PHP Billing System Reports  >  php/CtaCobro.php  >  Download  
File: php/CtaCobro.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Billing System Reports
Display and email customer billing reports
Author: By
Last change:
Date: 9 months ago
Size: 10,095 bytes
 

Contents

Download
<?php
function ctaCobro($fch, $cte, $nit, $vlt, $vln, $cto, $rta){
$file = fopen($rta, "w");
/*$fch = $_GET['f'];
$cte = $_GET['c'];
$nit = $_GET['n'];
$vlt = $_GET['vt'];
$vln = $_GET['vn'];
$cto = $_GET['cn'];*/
fwrite($file, 'header("Content-type: application/vnd.ms-word");');
fwrite($file, 'header("Content-Disposition: attachment;Filename=ctacobro.doc")');
fwrite($file, '<html>' . PHP_EOL);
fwrite($file, '<head>' . PHP_EOL);
fwrite($file, '<meta content="text/html; charset=UTF-8" http-equiv="content-type">' . PHP_EOL);
fwrite($file, '<style type="text/css">' . PHP_EOL);
fwrite($file, '@import url("https://themes.googleusercontent.com/fonts/css?kit=fpjTOVmNbO4Lz34iLyptLUXza5VhXqVC6o75Eld_V98");' . PHP_EOL);
fwrite($file, 'ol{margin:0;padding:0}' . PHP_EOL);
fwrite($file, 'table td,table th{padding:0}' . PHP_EOL);
fwrite($file, '.c17{color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:12pt;font-family:"Arial";font-style:normal}' . PHP_EOL);
fwrite($file, '.c3{color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:11pt;font-family:"Calibri";font-style:normal}' . PHP_EOL);
fwrite($file, '.c11{color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:10pt;font-family:"Arial";font-style:normal}' . PHP_EOL);
fwrite($file, '.c8{-webkit-text-decoration-skip:none;color:#0000ff;font-weight:400;text-decoration:underline;text-decoration-skip-ink:none;font-size:12pt;font-family:"Arial"}' . PHP_EOL);
fwrite($file, '.c16{color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:12pt;font-family:"Times New Roman";font-style:normal}' . PHP_EOL);
fwrite($file, '.c5{color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:8pt;font-family:"Arial";font-style:normal}' . PHP_EOL);
fwrite($file, '.c6{color:#000000;font-weight:700;text-decoration:none;vertical-align:baseline;font-size:12pt;font-family:"Arial";font-style:normal}' . PHP_EOL);
fwrite($file, '.c2{padding-top:0pt;padding-bottom:0pt;line-height:1.0;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, '.c1{padding-top:0pt;padding-bottom:0pt;line-height:1.1500000000000001;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, '.c0{padding-top:0pt;padding-bottom:0pt;line-height:1.1500000000000001;orphans:2;widows:2;text-align:center}' . PHP_EOL);
fwrite($file, '.c7{padding-top:0pt;padding-bottom:0pt;line-height:1.0;orphans:2;widows:2;text-align:center}' . PHP_EOL);
fwrite($file, '.c13{padding-top:0pt;padding-bottom:10pt;line-height:1.1500000000000001;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, '.c19{background-color:#ffffff;max-width:441.9pt;padding:70.8pt 85pt 70.8pt 85pt}' . PHP_EOL);
fwrite($file, '.c10{font-size:12pt;font-family:"Arial";font-weight:700}' . PHP_EOL);
fwrite($file, '.c15{font-size:8pt;font-family:"Arial";font-weight:400}' . PHP_EOL);
fwrite($file, '.c12{margin-left:36pt;text-indent:-36pt}' . PHP_EOL);
fwrite($file, '.c18{color:inherit;text-decoration:inherit}' . PHP_EOL);
fwrite($file, '.c4{text-indent:-14.2pt}' . PHP_EOL);
fwrite($file, '.c14{page-break-after:avoid}' . PHP_EOL);
fwrite($file, '.c9{height:11pt}' . PHP_EOL);
fwrite($file, '.title{padding-top:0pt;color:#000000;font-size:10pt;padding-bottom:0pt;font-family:"Arial";line-height:1.0;page-break-after:avoid;orphans:2;widows:2;text-align:center}' . PHP_EOL);
fwrite($file, '.subtitle{padding-top:18pt;color:#666666;font-size:24pt;padding-bottom:4pt;font-family:"Georgia";line-height:1.1500000000000001;page-break-after:avoid;font-style:italic;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, 'li{color:#000000;font-size:11pt;font-family:"Calibri"}' . PHP_EOL);
fwrite($file, 'p{margin:0;color:#000000;font-size:11pt;font-family:"Calibri"}' . PHP_EOL);
fwrite($file, 'h1{padding-top:24pt;color:#000000;font-weight:700;font-size:24pt;padding-bottom:6pt;font-family:"Calibri";line-height:1.1500000000000001;page-break-after:avoid;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, 'h2{padding-top:18pt;color:#000000;font-weight:700;font-size:18pt;padding-bottom:4pt;font-family:"Calibri";line-height:1.1500000000000001;page-break-after:avoid;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, 'h3{padding-top:14pt;color:#000000;font-weight:700;font-size:14pt;padding-bottom:4pt;font-family:"Calibri";line-height:1.1500000000000001;page-break-after:avoid;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, 'h4{padding-top:12pt;color:#000000;font-weight:700;font-size:12pt;padding-bottom:2pt;font-family:"Calibri";line-height:1.1500000000000001;page-break-after:avoid;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, 'h5{padding-top:11pt;color:#000000;font-weight:700;font-size:11pt;padding-bottom:2pt;font-family:"Calibri";line-height:1.1500000000000001;page-break-after:avoid;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, 'h6{padding-top:10pt;color:#000000;font-weight:700;font-size:10pt;padding-bottom:2pt;font-family:"Calibri";line-height:1.1500000000000001;page-break-after:avoid;orphans:2;widows:2;text-align:left}' . PHP_EOL);
fwrite($file, '</style>' . PHP_EOL);
fwrite($file, '</head>' . PHP_EOL);
fwrite($file, '<body class="c19">' . PHP_EOL);
fwrite($file, '<p class="c2 c12" style="text-align: center">' . PHP_EOL);
fwrite($file, '<img alt="" src="https://i.imgur.com/0LCr0dk.png" style="width: 246.00px; height: 84.40px; margin-left: -0.00px; margin-top: -0.00px; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px);" title=""></p>' . PHP_EOL);
fwrite($file, '<p class="c2 c9"><span class="c3"></span></p>' . PHP_EOL);
fwrite($file, '<p class="c2 c9"><span class="c3"></span></p>' . PHP_EOL);
fwrite($file, '<p class="c0 c9"><span class="c5"></span></p>' . PHP_EOL);
fwrite($file, '<p class="c0 c9"><span class="c5"></span></p>' . PHP_EOL);
fwrite($file, '<p class="c0 c9"><span class="c5"></span></p>' . PHP_EOL);
fwrite($file, '<br><p class="c0"><span class="c15">NOMBRE QUIEN FACTURA</span></p>' . PHP_EOL);
fwrite($file, '<p class="c0"><span class="c15">IDENTIFICACION</span></p>' . PHP_EOL);
fwrite($file, '<p class="c0"><span class="c15">R&eacute;gimen simplificado</span></p>' . PHP_EOL);
fwrite($file, '<p class="c2 c9"><span class="c3"></span></p>' . PHP_EOL);
fwrite($file, '<br><p class="c13"><span class="c16">Santiago de Cali, '.$fch.'</span></p>' . PHP_EOL);
fwrite($file, '<p class="c13"><span class="c10">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>' . PHP_EOL);
fwrite($file, '<p class="c7"><span class="c6">CUENTA DE COBRO</span></p><hr><br>' . PHP_EOL);
fwrite($file, '<p class="c7 c9"><span class="c6"></span></p>' . PHP_EOL);
fwrite($file, '<p class="c7 c9"><span class="c11"></span></p>' . PHP_EOL);
fwrite($file, '<p class="c7 c14 title" id="h.gjdgxs"><span class="c11">'.utf8_encode($cte).'</span></p>' . PHP_EOL);
fwrite($file, '<p class="c7"><span class="c11">(NIT.: '.$nit.')</span></p>' . PHP_EOL);
fwrite($file, '<p class="c7"><span class="c11">&nbsp;</span></p>' . PHP_EOL);
fwrite($file, '<p class="c7"><span class="c11">DEBE A:</span></p>' . PHP_EOL);
fwrite($file, '<p class="c7"><span class="c11">&nbsp;</span></p>' . PHP_EOL);
fwrite($file, '<p class="c7"><span class="c11">NOMBRE QUIEN FACTURA</span></p>' . PHP_EOL);
fwrite($file, '<p class="c7"><span class="c11">(C.C. IDENTIFICACION)</span></p>' . PHP_EOL);
fwrite($file, '<p class="c7"><span class="c11">&nbsp;</span></p>' . PHP_EOL);
fwrite($file, '<p class="c1"><span class="c11">La suma de '.$vlt.' pesos m/cte. ($ '.$vln.') por concepto de:</span></p>' . PHP_EOL);
fwrite($file, '<p class="c1"><span class="c11">'.utf8_encode($cto).'</span></p>' . PHP_EOL);
fwrite($file, '<p class="c1"><span class="c11">&nbsp;</span></p>' . PHP_EOL);
fwrite($file, '<p class="c1"><span class="c11">&nbsp;</span></p><hr>' . PHP_EOL);
fwrite($file, '<p class="c1"><span class="c6">&nbsp;</span></p>' . PHP_EOL);
fwrite($file, '<p class="c1"><span class="c6">Cualquier duda, solicitud o sugerencia, no dude en comunicarse con nosotros.</span></p>' . PHP_EOL);
fwrite($file, '<p class="c2 c9"><span class="c11"></span></p>' . PHP_EOL);
fwrite($file, '<p class="c2 c9"><span class="c3"></span></p>' . PHP_EOL);
fwrite($file, '<p class="c2"><span class="c17">Atentamente,</span></p>' . PHP_EOL);
fwrite($file, '<p class="c2 c4"><span style="overflow: hidden; display: inline-block; margin: 0.00px 0.00px; border: 0.00px solid #FFFFFF; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px); width: 368.67px; height: 102.13px;">' . PHP_EOL);
fwrite($file, '<img alt="" src="aquí remplazar por link imagen firma documento" style="width: 368.67px; height: 102.13px; margin-left: -0.00px; margin-top: -0.00px; transform: rotate(0.00rad) translateZ(0px); -webkit-transform: rotate(0.00rad) translateZ(0px);" title="">' . PHP_EOL);
fwrite($file, '</span></p>' . PHP_EOL);
fwrite($file, '<p class="c2"><span class="c10">Experto en computadores y marketing on line.</span></p>' . PHP_EOL);
fwrite($file, '<p class="c2" id="h.30j0zll"><span class="c11">Cel.: 315 438 39 99</span></p>' . PHP_EOL);
fwrite($file, '<p class="c2"><span class="c11">CompuLG</span></p>' . PHP_EOL);
fwrite($file, '<p class="c2"><span class="c11">Cr. 25 18A 46</span></p>' . PHP_EOL);
fwrite($file, '<p class="c2"><span class="c8">' . PHP_EOL);
fwrite($file, '<a class="c18" href="mailto:servicios@compulg.site">' . PHP_EOL);
fwrite($file, 'servicios@compulg.site</a>' . PHP_EOL);
fwrite($file, '</span></p>' . PHP_EOL);
fwrite($file, '<p class="c2"><span>' . PHP_EOL);
fwrite($file, 'Conoce nuestro Portafolio en: &nbsp;</span><span class="c8">' . PHP_EOL);
fwrite($file, '<a class="c18" href="https://sites.google.com/view/presentacin-compulg/inicio">' . PHP_EOL);
fwrite($file, 'www.compulg.site</a>' . PHP_EOL);
fwrite($file, '</span></p>' . PHP_EOL);
fwrite($file, '</body>' . PHP_EOL);
fclose($file);
}
?>


For more information send a message to info at phpclasses dot org.