Buongiorno a tutti
sono cortesemente a chiedervi lumi e consigli su come implementare un formula in questo foglio html.
Non ho la più pallida idea del linguaggio con il quale è scritto, quindi potrebbe essere nella sezione non proprio corretta.
Questo codice genera un report in un programma di contabilità, ma è stato scritto "dimenticando" un pezzo, e più precisamente il calcolo degli interessi!!
Modificando con un editor html la parte visuale, ho inserito la riga di descrizione, dove poi devo calcolare gli interessi da sommare alla ria successiva alla cifra da versare che si trova qui <
td style="text-align: right; font-weight: bold;">{{liquidazione_totale_imposta_come_debito}} </td>
Liquidazione totale imposta viene preso da un database MySQL, al quale non ho accesso, quindi nella riga "Interessi Iva Trimestrale", dovrei dividere per 100 la variabile sopra, per sommarla nella riga successiva alla stessa variabile presa dal Db.
Allego il codice completa della pagina, con la speranza di non aver sbagliato sessione, e di riuscire a sistemare questo report.
Ovvio che appena possibile, questo software verrà dismesso…
Grazie mille
Luke
<html moznomarginboxes mozdisallowselectionprint>
<head>
<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<style>
@media print {
@page { margin: 0.5cm; }
}
body {
/*font-family: 'PT Sans', sans-serif; */
font-family: 'Courier New', sans-serif;
font-size: 12px;
}
@media screen {
body {
font-size: 12px;
}
}
@media print {
body {
font-size: 11px;
}
.pagebreak {
page-break-after: always;
}
}
body {
width: 99%;
margin-left: auto;
margin-right: auto;
}
@media screen {
body {
max-width: 1200px;
}
}
@media print {
body {
}
}
h1 {
font-size: 18px;
}
h2 {
font-size: 16px;
}
h3 {
font-size: 14px;
}
.dettaglio_documenti {
/*display: none;*/
}
@media screen {
table {
font-size: 12px !important;
}
}
@media print {
table {
font-size: 11px !important;
}
}
table {
color:#222;
/*text-shadow: 1px 1px 0px #fff;*/
background:#FFF;
margin:10px;
border:#ccc 1px solid;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
-moz-box-shadow: 0 1px 2px #d1d1d1;
-webkit-box-shadow: 0 1px 2px #d1d1d1;
box-shadow: 0 1px 2px #d1d1d1;
}
table th {
padding:5px 5px 5px 5px;
border-top:1px solid #fafafa;
border-bottom:1px solid #e0e0e0;
background: #ededed;
background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb));
background: -moz-linear-gradient(top, #ededed, #ebebeb);
}
table th:first-child {
text-align: left;
padding-left:5px;
}
table tr:first-child th:first-child {
-moz-border-radius-topleft:3px;
-webkit-border-top-left-radius:3px;
border-top-left-radius:3px;
}
table tr:first-child th:last-child {
-moz-border-radius-topright:3px;
-webkit-border-top-right-radius:3px;
border-top-right-radius:3px;
}
table tr {
text-align: center;
padding-left:5px;
}
table td:first-child {
text-align: left;
padding-left:5px;
border-left: 0;
}
table td {
text-align: left;
padding: 3px;
border-top: 1px solid #ffffff;
border-bottom:1px solid #e0e0e0;
border-left: 1px solid #e0e0e0;
/*
background: #fafafa;
background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));
background: -moz-linear-gradient(top, #fbfbfb, #fafafa);
*/
}
table tr.even td {
background: #f6f6f6;
background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f6f6f6));
background: -moz-linear-gradient(top, #f8f8f8, #f6f6f6);
}
table tr:last-child td {
border-bottom:0;
}
table tr:last-child td:first-child {
-moz-border-radius-bottomleft:3px;
-webkit-border-bottom-left-radius:3px;
border-bottom-left-radius:3px;
}
table tr:last-child td:last-child {
-moz-border-radius-bottomright:3px;
-webkit-border-bottom-right-radius:3px;
border-bottom-right-radius:3px;
}
table { page-break-inside:auto }
tr { page-break-inside:avoid; page-break-after:avoid }
.columnsContainer {
max-width: 1200px;
}
.leftColumn {
margin-right: 10px;
}
@media screen {
.leftColumn,
.rightColumn {
display: inline-block;
vertical-align: top;
width: 49%;
max-width: 600px;
}
.centerColumn {
width: 99%;
max-width: 1200px;
}
}
@media print {
.leftColumn,
.rightColumn {
display: inline-block;
vertical-align: top;
width: 49%;
max-width: 400px;
}
.centerColumn {
width: 99%;
max-width: 1000px;
}
}
.pagebreak { page-break-before: always; } /* page-break-after works, as well */
</style>
</head>
<body>
<h2>Registro IVA {{tipo}}</h2>
<h3>Periodo dal {{dal-ita}} al {{al-ita}}</h3>
{{#altri_filtri}}
<small>{{altri_filtri}}</small>
{{/altri_filtri}}
<hr style="height: 1px; border: none; border-bottom: 1px dotted gray">
<div class="columnsContainer">
<div class="centerColumn">
<h3>Fatture di acquisto</h3>
<table cellspacing='0' width="98%" style="margin-top:0px;">
<thead>
<tr>
<th width="10%">Tipo Doc.</th>
<th width="10%">Numero</th>
<th width="10%">Data</th>
<th width="10%">Numero Doc. Est.</th>
<th width="10%">Data Doc. Est.</th>
<th width="60%" style="text-align: left;">Fornitore</th>
<th width="10%" style="text-align: right;">Cod.IVA</th>
<th width="20%" style="text-align: right;">Imponibile</th>
<th width="20%" style="text-align: right;">Imposta</th>
<th width="20%" style="text-align: right;">Imposta detraibile</th>
<th width="20%" style="text-align: right;">Imposta indetraibile</th>
</tr>
</thead>
{{#fatture_acquisto}}
<tr>
<td style="{{style_cella}}">{{tipo_doc}}</td>
<td style="{{style_cella}}">{{serie}}{{numero}}</td>
<td style="{{style_cella}}">{{data}}</td>
<td style="{{style_cella}}">{{serie_doc}}{{numero_doc} }</td>
<td style="{{style_cella}}">{{data_doc}}</td>
<td style="{{style_cella}}">{{ragione_sociale}}</td>
<td style="{{style_cella}}">{{codice_iva}}</td>
<td style="text-align: right; {{style_cella}}">{{imponibile_f}}</td>
<td style="text-align: right; {{style_cella}}">{{iva_f}}</td>
<td style="text-align: right; {{style_cella}}">{{iva_detraibile_f}}</td>
<td style="text-align: right; {{style_cella}}">{{iva_indetraibile_f}}</td>
</tr>
{{/fatture_acquisto}}
</table>
<h3>Totali Fatture di acquisto</h3>
<table cellspacing='0' width="98%" style="margin-top:0px;">
<thead>
<tr>
<th width="60%">Codice IVA</th>
<th width="10%">Imponibile</th>
<th width="10%">Imposta</th>
<th width="10%">Imposta detraibile</th>
<th width="10%">Imposta indetraibile</th>
</tr>
</thead>
{{#totali_fatture_acquisto}}
<tr>
<td style="{{style_cella}}">{{codice_iva}}</td>
<td style="text-align: right; {{style_cella}}">{{tot_imponibile_f}}</td>
<td style="text-align: right; {{style_cella}}">{{tot_iva_f}}</td>
<td style="text-align: right; {{style_cella}}">{{tot_iva_detraibile_f}}</td>
<td style="text-align: right; {{style_cella}}">{{tot_iva_indetraibile_f}}</td>
</tr>
{{/totali_fatture_acquisto}}
<tr>
<td style="text-align: right; font-weight: bold;">Totale</td>
<td style="text-align: right; font-weight: bold;">{{totali_fatture_acquisto_tot2_imponibile}} </td>
<td style="text-align: right; font-weight: bold;">{{totali_fatture_acquisto_tot2_iva}}</td>
<td style="text-align: right; font-weight: bold;">{{totali_fatture_acquisto_tot2_det}}</td>
<td style="text-align: right; font-weight: bold;">{{totali_fatture_acquisto_tot2_ind}}</td>
</tr>
</table>
<hr style="height: 1px; border: none; border-bottom: 1px dotted gray">
<div class="pagebreak"></div>
<h3>Fatture di vendita</h3>
<table cellspacing='0' width="98%" style="margin-top:0px;">
<thead>
<tr>
<th width="10%">Tipo Doc.</th>
<th width="10%">Numero Doc.</th>
<th width="10%">Data Doc.</th>
<th width="60%" style="text-align: left;">Cliente</th>
<th width="10%" style="text-align: right;">Cod.IVA</th>
<th width="20%" style="text-align: right;">Imponibile</th>
<th width="20%" style="text-align: right;">Imposta</th>
</tr>
</thead>
{{#fatture_vendita}}
<tr>
<td style="{{style_cella}}">{{tipo_doc}}</td>
<td style="{{style_cella}}">{{serie}}{{numero}}</td>
<td style="{{style_cella}}">{{data}}</td>
<td style="{{style_cella}}">{{ragione_sociale}}</td>
<td style="{{style_cella}}">{{codice_iva}}</td>
<td style="text-align: right; {{style_cella}}">{{imponibile_f}}</td>
<td style="text-align: right; {{style_cella}}">{{iva_f}}</td>
</tr>
{{/fatture_vendita}}
</table>
<h3>Totali Fatture di vendita</h3>
<table cellspacing='0' width="98%" style="margin-top:0px;">
<thead>
<tr>
<th width="60%">Codice IVA</th>
<th width="10%">Imponibile</th>
<th width="10%">Imposta</th>
</tr>
</thead>
{{#totali_fatture_vendita}}
<tr>
<td style="{{style_cella}}">{{codice_iva}}</td>
<td style="text-align: right; {{style_cella}}">{{tot_imponibile_f}}</td>
<td style="text-align: right; {{style_cella}}">{{tot_iva_f}}</td>
</tr>
{{/totali_fatture_vendita}}
<tr>
<td style="text-align: right; font-weight: bold;">Totale</td>
<td style="text-align: right; font-weight: bold;">{{totali_fatture_vendita_tot2_imponibile}}</td>
<td style="text-align: right; font-weight: bold;">{{totali_fatture_vendita_tot2_iva}}</td>
</tr>
</table>
<hr style="height: 1px; border: none; border-bottom: 1px dotted gray">
<div class="pagebreak"></div>
<h3>Riepilogo liquidazione</h3>
<table cellspacing='0' width="98%" style="margin-top:0px;">
<thead>
<tr>
<th width="60%"></th>
<th width="10%">Iva a debito</th>
<th width="10%">Iva a credito</th>
</tr>
</thead>
<tr>
<td style="text-align: left;">Iva vendite</td>
<td style="text-align: right;">{{liquidazione_iva_vendite}}</td>
<td style="text-align: right;"></td>
</tr>
{{#liquidazione_iva_vendite_iva_split}}
<tr>
<td style="text-align: left;">Iva vendite - Split Payment<br><small>Iva versata dall'Ente pubblico stesso ai sensi dell'art. 17-ter DPR 633/72</small></td>
<td style="text-align: right;">{{liquidazione_iva_vendite_iva_split}}</td>
<td style="text-align: right;"></td>
</tr>
{{/liquidazione_iva_vendite_iva_split}}
<tr>
<td style="text-align: left;">Iva acquisti</td>
<td style="text-align: right;"></td>
<td style="text-align: right;">{{liquidazione_iva_acquisti}}</td>
</tr>
<tr>
<td style="text-align: left; font-weight: bold;">{{liquidazione_come}}</td>
<td style="text-align: right; font-weight: bold;">{{liquidazione_come_debito}}</td>
<td style="text-align: right; font-weight: bold;">{{liquidazione_come_credito}}</td>
</tr>
<tr>
<td style="text-align: left; font-weight: bold;">{{liquidazione_come_credito_prec}}</td>
<td style="text-align: right; font-weight: bold;"></td>
<td style="text-align: right; font-weight: bold;">{{liquidazione_come_credito_prec_credito}}</td>
</tr>
<tr>
<td style="text-align: left; font-weight: bold;">
Interessi IVA Trimestrale
</td>
<td style="text-align: right; font-weight: bold;">{{liquidazione_totale_imposta_come_debito}} </td>
<td style="text-align: right; font-weight: bold;"> </td>
<td style="text-align: right; font-weight: bold;"> </td>
</tr>
<tr>
<td style="text-align: left; font-weight: bold;">{{liquidazione_totale_imposta_come}}</td>
<td style="text-align: right; font-weight: bold;">{{liquidazione_totale_imposta_come_debito}} </td>
<td style="text-align: right; font-weight: bold;">{{liquidazione_totale_imposta_come_credito} }</td>
</tr>
</table>
</div>
</div>
</body>
</html>