Fix invoice generation and other minor cosmetic items

This commit is contained in:
Deon George
2022-03-05 11:05:35 +11:00
parent 6dab5bded8
commit 62f587d7e6
6 changed files with 14 additions and 27 deletions

View File

@@ -91,6 +91,11 @@ class Account extends Model implements IDs
return $active ? $query->active() : $query;
}
public function site()
{
return $this->belongsTo(Site::class);
}
public function taxes()
{
return $this->hasMany(Tax::class,'country_id','country_id');

View File

@@ -8,6 +8,4 @@ class Rtm extends Model
{
protected $table = 'ab_rtm';
public $timestamps = FALSE;
}

View File

@@ -618,7 +618,7 @@ class Service extends Model implements IDs
// Two Yearly
case 5:
if (!$this->product->price_recur_strict)
if (! $this->product->price_recur_strict)
$date = $this->getInvoiceNextAttribute()->addYear(2)->subDay();
else {
$date = $this->getInvoiceNextAttribute()->addYear(2)->subDay()->endOfYear();