Skip to content

Commit fe504f2

Browse files
committed
fix: importazione fattura di acquisto
1 parent 718e0bb commit fe504f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/fatture/src/Gestori/Scadenze.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ protected function registraScadenzeTradizionali($is_pagato = false)
181181
$netto = $this->fattura->isNota() ? -$netto : $netto;
182182

183183
// Calcolo delle rate
184-
$rate = $this->fattura->pagamento->calcola($netto, $this->fattura->data, $this->fattura->idanagrafica);
184+
$rate = ($this->fattura->pagamento ?: \Modules\Pagamenti\Pagamento::where('id', $this->fattura->idpagamento)->first())->calcola($netto, $this->fattura->data, $this->fattura->idanagrafica);
185185
$direzione = $this->fattura->tipo->dir;
186186

187187
foreach ($rate as $rata) {

0 commit comments

Comments
 (0)