From bdca50707a49375d1c950ddd1361a83d0af15053 Mon Sep 17 00:00:00 2001 From: Matteo Date: Tue, 9 Mar 2021 18:36:28 +0100 Subject: [PATCH] Fix pagamento default in creazione documento --- modules/fatture/actions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/fatture/actions.php b/modules/fatture/actions.php index 8154e6ac3..edf3291f8 100755 --- a/modules/fatture/actions.php +++ b/modules/fatture/actions.php @@ -690,7 +690,12 @@ switch (post('op')) { $fattura = Fattura::build($documento->anagrafica, $tipo, post('data'), post('id_segment')); - $fattura->idpagamento = $documento->idpagamento; + if(!empty($documento->idpagamento)){ + $fattura->idpagamento = $documento->idpagamento; + }else{ + $fattura->idpagamento = setting('Tipo di pagamento predefinito'); + } + $fattura->idsede_destinazione = $documento->idsede; $fattura->id_ritenuta_contributi = post('id_ritenuta_contributi') ?: null;