Fix calcolo margine con imponibile scontato

This commit is contained in:
loviuz 2019-12-24 12:36:47 +01:00
parent d14dfddb29
commit 0529aaaf0d
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ abstract class Row extends Description
*/ */
public function getMargineAttribute() public function getMargineAttribute()
{ {
return $this->imponibile - $this->spesa; return $this->totale_imponibile - $this->spesa;
} }
/** /**

View File

@ -129,7 +129,7 @@ abstract class Document extends Model
*/ */
public function getMarginePercentualeAttribute() public function getMarginePercentualeAttribute()
{ {
return (1 - ($this->spesa / $this->imponibile)) * 100; return (1 - ($this->spesa / ($this->totale_imponibile))) * 100;
} }
public function delete() public function delete()