Skip to content

Commit 6fad996

Browse files
fix: minori gestione marca da bollo e spese di incasso
1 parent 111aef9 commit 6fad996

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

modules/fatture/src/Fattura.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ public function save(array $options = [])
588588

589589
parent::save($options);
590590

591-
$this->id_riga_bollo = $this->gestoreBollo->manageRigaMarcaDaBollo();
592591
$this->id_riga_spese_incasso = $this->manageRigaSpeseIncasso();
592+
$this->id_riga_bollo = $this->gestoreBollo->manageRigaMarcaDaBollo();
593593

594594
// Generazione numero fattura se non presente (Bozza -> Emessa)
595595
if ((($id_stato_precedente == $id_stato_bozza && $id_stato_attuale == $id_stato_emessa) or (!$is_fiscale)) && empty($this->numero_esterno)) {
@@ -737,6 +737,10 @@ public function replicate(?array $except = null)
737737

738738
public function manageRigaSpeseIncasso()
739739
{
740+
if ($this->tipo->dir == 'uscita') {
741+
return null;
742+
}
743+
740744
$riga = $this->rigaSpeseIncasso;
741745
$first_riga_fattura = $this->getRighe()->where('id', '!=', $riga->id)->where('is_descrizione', '0')->first();
742746

0 commit comments

Comments
 (0)