Skip to content

Commit 7b23953

Browse files
committed
fix: rimosse spese di incasso automatiche per fatture non in bozza
1 parent 4ce5169 commit 7b23953

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/fatture/src/Fattura.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ public function replicate(?array $except = null)
854854

855855
public function manageRigaSpeseIncasso()
856856
{
857-
if ($this->tipo->dir == 'uscita') {
857+
if ($this->tipo->dir == 'uscita' || $this->stato->descrizione != 'Bozza') {
858858
return null;
859859
}
860860

@@ -881,7 +881,7 @@ public function manageRigaSpeseIncasso()
881881
}
882882

883883
$prezzo_unitario = $this->pagamento->importo_fisso_incasso;
884-
if ($this->pagamento->importo_percentuale_incasso && ($this->totale - $riga->totale)) {
884+
if ($this->pagamento->importo_percentuale_incasso && ($this->totale - $riga->totale) && !$this->isAutofattura()) {
885885
$prezzo_unitario += ($this->totale - $riga->totale) * $this->pagamento->importo_percentuale_incasso / 100;
886886
}
887887

0 commit comments

Comments
 (0)