Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/10/2010, 20:27
homerolalleva
 
Fecha de Ingreso: octubre-2010
Mensajes: 5
Antigüedad: 13 años, 7 meses
Puntos: 0
funcion para deyar un resultado estatico

Estoy utilizando un programa de facturación (BambooInvoice) para imprimir las facturas estoy utilizando la función que crea un pdf, este pdf lo he modificado para que me de los datos en las pociones que necesito para imprimir las facturas u cuadren justo.
El problema es que al incrementar los ítems de los productos baja el resultado, necesito dejar el resultado en una sola posición sin importar la cantidad de ítems

Soy nuevo en el foro espero me puedan ayudar

Este es el código:


------------------------------------------------------

<?php
/**
* This file is essentially a stripped down version of /views/invoices/view.php
* Any changes you make to that formatting, you may consider adding to this.
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $page_title;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
/**
* Invoice view styles notes
*
* This file NEEDS a locally located stylesheet to generate the appropriate formatting for
* transformation into a PDF. If you alter this file (and you are encouraged to do so) just
* keep in mind that all of your formatting must be located here. You might also find that
* there is limited or no support for a specific CSS style you want (ie: floating) and you'll
* need to work around with old-school tables. Sorry for that... ;)
*/

body {
margin: 0.5in;
}
h1, h2, h3, h4, h5, h6, li, blockquote, p, th, td {
font-family: Helvetica, Arial, Verdana, sans-serif; /*Trebuchet MS,*/
}
h1, h2, h3, h4 {
color: #5E88B6;
font-weight: normal;
}
h4, h5, h6 {
color: #5E88B6;
}
h2 {
margin: 0 auto auto auto;
font-size: x-large;
}
h2 span {
text-transform: uppercase;
}
li, blockquote, p, th, td {
font-size: 100%;
}
ul {
list-style: url(img/bullet.gif) none;
}
table {
width: 100%;
}
td p {
font-size: small;
margin: 0;
}
th {
color: #FFF;
text-align: left;
background-color:#ffffff;
}
.bamboo_invoice_bam {
color: #5E88B6;
font-weight: bold;
text-transform: capitalize;
}
.bamboo_invoice_inv {
font-weight: bold;
font-variant: small-caps;
color: #333;
}
#footer {
border-top: 0px solid #CCC;
text-align: right;
font-size: 6pt;
color: #999999;
}
#footer a {
color: #ffffff;
text-decoration: none;
}
table.stripe {
border-collapse: collapse;
page-break-after: auto;
}
table.stripe td {
border-bottom: 0pt solid black;
}
body,td,th {
font-size: 10px;
}
.Estilo1 {font-size: 9px}
.Estilo2 {font-size: 12px}
</style>
</head>
<body>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="946" table border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="18">&nbsp;</td>
<?php $fecha= explode(',',$date_invoice_issued);
$fecha1=explode(' ',$fecha[0]);
$dia=$fecha1[1];
$mes=$fecha1[0];
$anio=$fecha[1];?>
<td colspan="2"><div align="right"><?php echo $dia;?></div></td>
<td width="150"><div align="right"><?php echo $mes;?></div></td>
<td width="52">&nbsp;</td>
<td width="655"><?php echo $anio;?></td>
</tr>
<tr>
<td height="18">&nbsp;</td>
<td colspan="5"><?php echo $row->name;?></td>
</tr>
<tr>
<td width="70" height="18">&nbsp;</td>
<td colspan="3"><?php if ($row->address1 != '') {echo $row->address1;}?></td>
<td colspan="2"><?php if ($row->address2 != '') {echo '' . $row->address2;}?></td>
</tr>
<tr>
<td height="18">&nbsp;</td>
<td colspan="2"><?php echo($row->website);?></td>
<td><?php if ($row->postal_code != '') {echo ' ' . $row->postal_code;}?>
<?php if ($row->city != '' || $row->province != '' || $row->country != '' || $row->postal_code != '') {echo '<br />';}?></td>
<td colspan="2"><?php if ($row->city != '') {echo $row->city;}?></td>
</tr>
<tr>
<td height="18">&nbsp;</td>
<td width="48" valign="top">&nbsp;</td>
<td width="163" valign="top"><span class="Estilo2"><?php echo auto_typography($row->despacho);?>.</span></td>
<td valign="top">&nbsp;</td>
<td colspan="2"><span class="Estilo2"><?php echo auto_typography($row->oc);?>.</span></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="98%" class="invoice_items stripe">
<tr>
<th width="9%">&nbsp;</th>
<th width="58%">&nbsp;</th>
<th width="17%">&nbsp;</th>
<th width="16%">&nbsp;</th>
</tr>
<?php
$contador = 0;
foreach ($items->result() as $item):?>
<tr valign="top">
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr valign="top">
<td><p><?php echo str_replace('.00', '', $item->quantity);?></p></td>
<td><?php echo nl2br(str_replace(array('\n', '\r'), "\n", $item->work_description));?></td>
<td><p align="right"><?php echo $this->settings_model->get_setting('currency_symbol') . str_replace('.', $this->config->item('currency_decimal'), number_format($item->amount, 0, '', '.'));?>
<?php if ($item->taxable == 0){echo '(' . $this->lang->line('invoice_not_taxable') . ')';}?></p></td>
<td><p align="right"><?php echo $this->settings_model->get_setting('currency_symbol')
. number_format($item->quantity * $item->amount, 0, '', '.');?></p></td>
</tr>
<?php
$contador++;
endforeach;?>
</table>
<p>&nbsp;</p>
<table width="100%" border="0" class="invoice_items stripe">
<tr>
<td width="7%">&nbsp;</td>
<td valign="bottom"><span class="Estilo1">.<?php echo auto_typography($row->invoice_note);?>.</span></td>
</tr>
</table>
<p align="right">
<?php $texto= explode(': $',$total_no_tax);?>
<?php echo '$'.number_format($texto[1],0,'','.');?></p>
<p align="right">
<?php $texto1= explode(': $',$tax_info);?>
<?php echo '$'.number_format($texto1[1],0,'','.');?></p>
<p align="right">
<?php $texto2= explode(': $',$total_with_tax);?>
<?php echo '$'.number_format($texto2[1],0,'','.');?></p>
<div id="footer">
<p>&nbsp;</p>
</div>

</body>
</html>