added amount due to email templates
This commit is contained in:
@ -298,6 +298,18 @@ class Document extends Model
|
||||
return round($paid, $precision);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the not paid amount.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAmountDueAttribute()
|
||||
{
|
||||
$precision = config('money.' . $this->currency_code . '.precision');
|
||||
|
||||
return round($this->amount - $this->paid, $precision);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the status label.
|
||||
*
|
||||
|
Reference in New Issue
Block a user