We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2657093 commit 1092859Copy full SHA for 1092859
1 file changed
templates/fatture/body.php
@@ -150,6 +150,19 @@
150
</td>
151
<td>'.nl2br((string) $r['descrizione']);
152
153
+ // Aggiungi riferimento alla fattura di acquisto originale per le autofatture
154
+ if (!empty($documento['ref_documento']) && $documento['is_fattura_conto_terzi']) {
155
+ $fattura_origine = Modules\Fatture\Fattura::find($documento['ref_documento']);
156
+ if ($fattura_origine) {
157
+ $riferimento_autofattura = $fattura_origine->getReference();
158
+ if (!empty($riferimento_autofattura)) {
159
+ echo '
160
+ <br><small>Rif. '.$riferimento_autofattura.'</small>';
161
+ $autofill->count($riferimento_autofattura, true);
162
+ }
163
164
165
+
166
if ($riga->isArticolo()) {
167
echo '<small><br>'.$riga->codice.'</small>';
168
$autofill->count($riga->codice, true);
0 commit comments