php - Generate PDF file -
i have code , want know how include mpdf function generate pdf file.
<?php $date = strtotime("this year"); $ano = date("y",$date); ?> </b> </center><br> <br> <?php $balanco = "select * receitas mes=8 , ano='$ano'"; $ligar = mysqli_query($con, $balanco); if(mysqli_num_rows($ligar)> 0){ echo "<center><h2><b><font color='green'>receitas</b></h2></font></center>"; echo "<table class='table'>"; echo "<tr>"; echo "<th>id</th>"; echo "<th>descriÇÃo</th>"; echo "<th>quant</th>"; echo "<th>valor</th>"; echo "<th>total</th>"; echo "<th>caixa</th>"; echo "<th>data</th>"; echo "<th>hora</th>"; echo "</tr>"; while($row = mysqli_fetch_array($ligar)){ echo "<tr>"; echo "<td>" .$row['id']."</td>"; echo "<td>" .$row['descricao']."</td>"; echo "<td>" .$row['quantidade']."</td>"; echo "<td>" .$row['valor']."</td>"; echo "<td>" .$row['quantidade'] * $row['valor']."</td>"; echo "<td>".$row['nome']."</td>"; echo "<td>".$row['dia']."/".$row['mes']."</td>"; echo "<td>".$row['hora']."</td></tr>"; } echo "<tr><td colspan='7' bgcolor='silver'><b>subtotal</b></td> <td bgcolor='silver' colspan='2'>" . number_format("$stock_total.",2,",",".") ."</td></tr>"; echo "</table>"; } ?> <hr> <?php $bala_desp = "select * despesas mes=8 , ano='$ano'"; $lugar = mysqli_query($con, $bala_desp); if(mysqli_num_rows($lugar) > 0){ echo "<center><b><h2><font color='red'>despesas</b></h2></font></center>"; echo "<table class='table'>"; echo "<tr>"; echo "<th>id</th>"; echo "<th>descriÇÃo</th>"; echo "<th>quant</th>"; echo "<th>valor</th>"; echo "<th>total</th>"; echo "<th>caixa</th>"; echo "<th>data</th>"; echo "<th>hora</th>"; echo "</tr>"; while($row = mysqli_fetch_array($lugar)){ echo "<tr>"; echo "<td>" .$row['id']."</td>"; echo "<td>" .$row['descricao_d']."</td>"; echo "<td>" .$row['quantidade']."</td>"; echo "<td>" .$row['valor']."</td>"; echo "<td>" .$row['quantidade'] * $row['valor'] . "</td>"; echo "<td>".$row['nome']."</td>"; echo "<td>".$row['dia']."/".$row['mes']."</td>"; echo "<td>".$row['hora']."</td></tr>"; } echo "<tr><td colspan='7' bgcolor='silver'><b>subtotal</b></td> <td bgcolor='silver' colspan='2'>" . number_format("$stock_total_rec.",2,",",".") ."</td></tr>"; echo "</table>"; } ?> will me? need finish project, print bills, reports , more.
Comments
Post a Comment