diff --git a/include/src/Components/Row.php b/include/src/Components/Row.php index 263d90877..bac75696d 100644 --- a/include/src/Components/Row.php +++ b/include/src/Components/Row.php @@ -73,7 +73,7 @@ abstract class Row extends Description */ public function getMargineAttribute() { - return $this->imponibile - $this->spesa; + return $this->totale_imponibile - $this->spesa; } /** diff --git a/include/src/Document.php b/include/src/Document.php index f93a57808..b54e92c0e 100644 --- a/include/src/Document.php +++ b/include/src/Document.php @@ -129,7 +129,7 @@ abstract class Document extends Model */ public function getMarginePercentualeAttribute() { - return (1 - ($this->spesa / $this->imponibile)) * 100; + return (1 - ($this->spesa / ($this->totale_imponibile))) * 100; } public function delete()