| Server IP : 162.214.74.102 / Your IP : 216.73.217.80 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/public_html/lrsys_apps/leve/application/lib/invoices/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<title><?php echo $_L['INVOICE']; ?> <?php echo $d['id']; ?></title>
<link rel="apple-touch-icon" sizes="57x57" href="<?php echo APP_URL; ?>/application/storage/icon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="<?php echo APP_URL.'/'; ?>application/storage/icon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="<?php echo APP_URL.'/'; ?>application/storage/icon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="<?php echo APP_URL.'/'; ?>application/storage/icon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="<?php echo APP_URL.'/'; ?>application/storage/icon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="<?php echo APP_URL.'/'; ?>application/storage/icon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="<?php echo APP_URL.'/'; ?>application/storage/icon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="<?php echo APP_URL.'/'; ?>application/storage/icon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo APP_URL.'/'; ?>application/storage/icon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="<?php echo APP_URL.'/'; ?>application/storage/icon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo APP_URL.'/'; ?>application/storage/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="<?php echo APP_URL.'/'; ?>application/storage/icon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="<?php echo APP_URL.'/'; ?>application/storage/icon/favicon-16x16.png">
<link rel="manifest" href="<?php echo APP_URL.'/'; ?>application/storage/icon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="<?php echo APP_URL.'/'; ?>application/storage/icon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<style>
* { margin: 0; padding: 0; }
body {
font: 14px/1.4 Helvetica, Arial, sans-serif;
}
#page-wrap { width: 800px; margin: 0 auto; }
textarea { border: 0; font: 14px Helvetica, Arial, sans-serif; overflow: hidden; resize: none; }
table { border-collapse: collapse; }
table td, table th { border: 1px solid black; padding: 5px; }
#header { height: 15px; width: 100%; margin: 20px 0; background: #222; text-align: center; color: white; font: bold 15px Helvetica, Sans-Serif; text-decoration: uppercase; letter-spacing: 20px; padding: 8px 0px; }
#address { width: 250px; height: 150px; float: left; }
#customer { overflow: hidden; }
#logo { text-align: right; float: right; position: relative; margin-top: 25px; border: 1px solid #fff; max-width: 540px; overflow: hidden; }
#customer-title { font-size: 20px; font-weight: bold; float: left; }
#meta { margin-top: 1px; width: 100%; float: right; }
#meta td { text-align: right; }
#meta td.meta-head { text-align: left; background: #eee; }
#meta td textarea { width: 100%; height: 20px; text-align: right; }
#items { clear: both; width: 100%; margin: 30px 0 0 0; border: 1px solid black; }
#items th { background: #eee; }
#items textarea { width: 80px; height: 50px; }
#items tr.item-row td { vertical-align: top; }
#items td.description { width: 300px; }
#items td.item-name { width: 175px; }
#items td.description textarea, #items td.item-name textarea { width: 100%; }
#items td.total-line { border-right: 0; text-align: right; }
#items td.total-value { border-left: 0; padding: 10px; }
#items td.total-value textarea { height: 20px; background: none; }
#items td.balance { background: #eee; }
#items td.blank { border: 0; }
#terms { text-align: center; margin: 20px 0 0 0; }
#terms h5 { text-transform: uppercase; font: 13px Helvetica, Sans-Serif; letter-spacing: 10px; border-bottom: 1px solid black; padding: 0 0 8px 0; margin: 0 0 8px 0; }
#terms textarea { width: 100%; text-align: center;}
.delete-wpr { position: relative; }
.delete { display: block; color: #000; text-decoration: none; position: absolute; background: #EEEEEE; font-weight: bold; padding: 0px 3px; border: 1px solid; top: -6px; left: -22px; font-family: Verdana; font-size: 12px; }
/* Extra CSS for Print Button*/
.button {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
overflow: hidden;
margin-top: 20px;
padding: 12px 12px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: all 60ms ease-in-out;
transition: all 60ms ease-in-out;
text-align: center;
white-space: nowrap;
text-decoration: none !important;
color: #fff;
border: 0 none;
border-radius: 4px;
font-size: 14px;
font-weight: 500;
line-height: 1.3;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-flex: 0;
-webkit-flex: 0 0 160px;
-ms-flex: 0 0 160px;
flex: 0 0 160px;
}
.button:hover {
-webkit-transition: all 60ms ease;
transition: all 60ms ease;
opacity: .85;
}
.button:active {
-webkit-transition: all 60ms ease;
transition: all 60ms ease;
opacity: .75;
}
.button:focus {
outline: 1px dotted #959595;
outline-offset: -4px;
}
.button.-regular {
color: #202129;
background-color: #edeeee;
}
.button.-regular:hover {
color: #202129;
background-color: #e1e2e2;
opacity: 1;
}
.button.-regular:active {
background-color: #d5d6d6;
opacity: 1;
}
.button.-dark {
color: #FFFFFF;
background: #333030;
}
.button.-dark:focus {
outline: 1px dotted white;
outline-offset: -4px;
}
@media print
{
.no-print, .no-print *
{
display: none !important;
}
}
.nota-promissoria{
padding: 20px 0px;
margin-top: 20px;
border-top: 1px dashed #000;
}
.nota-promissoria .right{
text-align: right;
margin-bottom: 20px;
}
.nota-promissoria .np-content{
line-height: 25px;
}
.nota-promissoria .np-logo{
float: left;
margin-right: 10px;
}
.nota-promissoria .np-valor{
font-size: 25px;
font-weight: bold;
margin-bottom: 15px;
}
</style>
</head>
<body>
<div id="page-wrap">
<table width="100%">
<tr>
<td style="border: 0; text-align: left" width="62%">
<img id="image" src="<?php echo APP_URL; ?>/application/storage/system/logo.png" alt="logo" />
<br><br>
<span style="font-size: 18px; color: #2f4f4f"><strong><?php echo $_L['INVOICE']; ?> # <?php
if($d['cn'] != ''){
$dispid = $d['cn'];
}
else{
$dispid = $d['id'];
}
echo $d['invoicenum'].$dispid;
?></strong></span>
</td>
<td style="border: 0; text-align: right" width="62%"><div id="logo">
<?php echo $config['caddress']; ?>
</div></td>
</tr>
</table>
<hr>
<br>
<div style="clear:both"></div>
<div id="customer">
<table id="meta">
<tr>
<td rowspan="5" style="border: 1px solid white; border-right: 1px solid black; text-align: left; vertical-align: top;" width="30%">
<strong><?php echo $_L['Invoiced To']; ?></strong> <br>
<?php if($a['company'] != '') {
?>
<?php echo $a['company']; ?> <br>
<?php echo $_L['ATTN']; ?>: <?php echo $a['account']; ?> <br>
<?php
}
else{
?>
<?php echo $a['account']; ?> <br>
<?php
}
?>
<?php echo $account_address['address']." - ".$account_address['number']." - ".$account_address['complement']; ?> <br>
<?php echo $stateContact['uf_state']; ?> - <?php echo $cityContact['city_name'];?><br/>
<?php echo $account_address['zip'] ?> <br>
<?php echo $a['country']; ?> <br>
<?php
if(($a['phone']) != ''){
echo 'Phone: '. $a['phone']. ' <br>';
}
if(($a['email']) != ''){
echo 'Email: '. $a['email']. ' <br>';
}
foreach ($cf as $cfs){
echo $cfs['fieldname'].': '. get_custom_field_value($cfs['id'],$a['id']). ' <br>';
}
?>
</td>
<td rowspan="5" style="border: 1px solid white; border-right: 1px solid black; text-align: left; vertical-align: top;" width="40%">
<strong><?php echo $_L['Delivery address']; ?></strong> <br>
<?php echo $d['shipping_street']?><br>
<?php echo $d['shipping_zip']?> <br/>
<?php echo $d['shipping_city']?> - <?php echo $d['shipping_state']?> <br>
<?php echo $d['shipping_country']?>
</td>
<td class="meta-head"><?php echo $_L['INVOICE']; ?> #</td>
<td><?php echo $d['invoicenum'].$dispid; ?></td>
</tr>
<?php if($print_value){ ?>
<tr>
<td class="meta-head"><?php echo $_L['Status']; ?></td>
<td><?php
echo ib_lan_get_line($d['status']);
?>
</td>
</tr>
<?php } ?>
<tr>
<td class="meta-head"><?php echo $_L['Invoice Date']; ?></td>
<td><?php echo date($config['df'], strtotime($d['date'])); ?></td>
</tr>
<tr>
<td class="meta-head"><?php echo $_L['Due Date']; ?></td>
<td><?php echo date($config['df'], strtotime($d['duedate'])); ?></td>
</tr>
<?php if($print_value){ ?>
<tr>
<td class="meta-head"><?php echo $_L['Amount Due']; ?></td>
<td><div class="due"><?php echo ib_money_format($i_due,$config,$d['currency_symbol']) ?></div></td>
</tr>
<?php } ?>
</table>
</div>
<table id="items">
<tr>
<th width="65%"><?php echo $_L['Item']; ?></th>
<?php if ($print_value){?>
<th align="right"><?php echo $_L['Price']; ?></th>
<?php } ?>
<th align="right"><?php echo $_L['Qty']; ?></th>
<?php if ($print_value) {?>
<th align="right"><?php echo $_L['Total']; ?></th>
<?php } ?>
</tr>
<?php
foreach ($items as $item){
$str_aux = ' <tr class="item-row">
<td class="description">'.$item['description'].'</td>';
if($print_value)
{
$str_aux .= '<td align="right">'.ib_money_format($item['amount'],$config,$d['currency_symbol']).'</td>';
}
$str_aux .= '<td align="right">'.$item['qty'].'</td>';
if($print_value)
{
$str_aux .= '<td align="right"><span class="price">'.ib_money_format($item['total'],$config,$d['currency_symbol']).'</span></td>';
}
$str_aux .= '</tr>';
echo $str_aux;
}
?>
<?php
// Verifico quantas linhas tem a fatura
$count_line = 3;
if($d['credit'] != '0.00'){
$count_line = $count_line + 2;
}
if($d['tax'] != '0.00'){
$count_line = $count_line + 1;
}
if($d['discount'] != '0.00'){
$count_line = $count_line + 1;
}
?>
<?php if($print_value) { ?>
<tr>
<td class="blank" rowspan="<?php echo $count_line;?>">
<?php
if($d['notes'] != ''){
?>
<b><?php echo mb_strtoupper($_L['Details']); ?>:</b><br>
<?php echo $d['notes']; ?>
<?php
}
?>
</td>
<td colspan="2" class="total-line"><?php echo $_L['Sub Total']; ?></td>
<td class="total-value"><div id="subtotal"><?php echo ib_money_format($d['subtotal'],$config,$d['currency_symbol']); ?></div></td>
</tr>
<?php
if(($d['discount']) != '0.00'){
?>
<tr>
<td colspan="2" class="total-line"><?php echo $_L['Discount']; ?>
<?php
if($d['discount_type'] == 'p'){
echo '('.$d['discount_value'].')%';
}
?>
</td>
<td class="total-value"><div id="subtotal"><?php echo ib_money_format($d['discount'],$config,$d['currency_symbol']); ?></div></td>
</tr>
<?php
}
?>
<?php
if (($d['tax']) != '0.00'){
?>
<tr>
<td colspan="2" class="total-line"><?php echo $_L['TAX']; ?></td>
<td class="total-value"><div id="total"><?php echo ib_money_format($d['tax'],$config,$d['currency_symbol']); ?></div></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2" class="total-line"><?php echo $_L['Freight']; ?></td>
<td class="total-value"><div id="total"><?php echo ib_money_format($d['freight'],$config,$d['currency_symbol']); ?></div></td>
</tr>
<?php
if($d['credit'] != '0.00'){
?>
<tr>
<td colspan="2" class="total-line"><?php echo $_L['Invoice Total']; ?></td>
<td class="total-value"><div class="due"><?php echo ib_money_format($d['total'],$config,$d['currency_symbol']); ?></div></td>
</tr>
<tr>
<td colspan="2" class="total-line"><?php echo $_L['Total Paid']; ?></td>
<td class="total-value"><div class="due"><?php echo ib_money_format($d['credit'],$config,$d['currency_symbol']); ?></div></td>
</tr>
<tr>
<td colspan="2" class="total-line balance"><?php echo $_L['Amount Due']; ?></td>
<td class="total-value balance"><div class="due"><?php echo ib_money_format($i_due,$config,$d['currency_symbol']) ?></div></td>
</tr>
<?php
}
else{
?>
<tr>
<td colspan="2" class="total-line balance"><?php echo $_L['Grand Total']; ?></td>
<td class="total-value balance"><div class="due"><?php echo ib_money_format($d['total'],$config,$d['currency_symbol']); ?></div></td>
</tr>
<?php
}
?>
<?php } ?>
</table>
<!-- related transactions -->
<?php
if ($trs_c != '' && $print_value){
?>
<br>
<h4><?php echo $_L['Related Transactions']; ?>: </h4>
<table id="related_transactions" style="width: 100%">
<tr>
<th align="left" width="20%"><?php echo $_L['Date']; ?></th>
<th align="left"><?php echo $_L['Account']; ?></th>
<th width="50%" align="left"><?php echo $_L['Description']; ?></th>
<th align="right"><?php echo $_L['Amount']; ?></th>
</tr>
<?php
foreach ($trs as $tr){
echo ' <tr class="item-row">
<td align="left">'.date( $config['df'], strtotime($tr['date'])).'</td>
<td align="left">'.$tr['account'].'</td>
<td align="left">'.$tr['description'].'</td>
<td align="right"><span class="price">'.ib_money_format($tr['amount'],$config,$d['currency_symbol']).'</span></td>
</tr>';
}
?>
</table>
<?php
}
?>
<!-- end related transactions -->
<?php
$pmethod = ORM::for_table('sys_pmethods')->find_one($d->paymentmethod);
if($pmethod->id == 6)
{
?>
<div class="nota-promissoria">
<div class="np-logo"><img src="<?php echo APP_URL.'/'; ?>application/lib/invoices/images/logo-republica-nota-promissoria.jpg"></div>
<div class="right">Vencimento: <?php echo date($config['df'], strtotime($d['duedate'])); ?></div>
<div class="np-valor">
<span>nº <?php echo $d['invoicenum'].$dispid; ?></span>
<span style="float: right;"><?php echo ib_money_format($d['total'],$config,$d['currency_symbol']); ?></span>
</div>
<div class="np-content">
<p>Aos ______________________________________________________
pagar(ei) por esta única via de <b>NOTA PROMISSÓRIA</b>, à
__________________________________________________________________
ou à sua ordem, a quantia de ____________________________________________________________________________________
em moedas corrente deste país.
</p>
<span style="float: right;">Data da Emissão: <?php echo date($config['df'], strtotime($d['date'])); ?></span>
<p>
Pagavel em <?php echo $cityContact['city_name'];?>-<?php echo $stateContact['uf_state']; ?>.
</p>
<p>Emitente: <?php echo $a['account']; ?></p>
<p>Endereço: <?php echo $account_address['address']." - ".$account_address['number']." - ".$account_address['complement']; ?>.
<br><?php echo $stateContact['uf_state']; ?> - <?php echo $cityContact['city_name'];?>. <?php echo $account_address['zip'] ?> <br>
</p>
<span style="float: right;text-align: center;">_____________________________________<br>Cliente </span>
</div>
</div>
<?php } ?>
<button class='button -dark center no-print' style="margin-top: 50px;" onClick="window.print();">Imprimir</button>
</div>
</body>
</html>