Extend incoming for better usage.

This commit is contained in:
2025-02-07 14:21:59 +01:00
parent 643e68e9a7
commit aaefe7dc51
6 changed files with 147 additions and 16 deletions

View File

@@ -22,6 +22,19 @@ class Incomingtax extends Model
'currency',
];
/**
* The attributes that are appended with attribute getters.
*
* @var string[]
*/
protected $appends = [
'gross',
];
public function getGrossAttribute() {
return number_format($this->taxable_amount + $this->amount, 2);
}
/**
* Get the incoming invoice this tax belongs to.
*/