Fix calcolo ritenuta contributi

This commit is contained in:
MatteoPistorello 2022-06-15 18:07:08 +02:00
parent ed8c48c24b
commit 122936c7fa
1 changed files with 2 additions and 2 deletions

View File

@ -299,7 +299,7 @@ abstract class Document extends Model implements ReferenceInterface, DocumentInt
public function getScontoFinale()
{
if (!empty($this->sconto_finale_percentuale)) {
$netto = $this->totale - $this->ritenuta_acconto - $this->ritenuta_contributi;
$netto = $this->totale - $this->ritenuta_acconto - $this->totale_ritenuta_contributi;
if ($this->split_payment) {
$netto = $netto - $this->iva;
}
@ -319,7 +319,7 @@ abstract class Document extends Model implements ReferenceInterface, DocumentInt
*/
public function getNettoAttribute()
{
$netto = $this->totale - $this->ritenuta_acconto - $this->ritenuta_contributi;
$netto = $this->totale - $this->ritenuta_acconto - $this->totale_ritenuta_contributi;
if ($this->split_payment) {
$netto = $netto - $this->iva;
}