Create invoice form part 1.

This commit is contained in:
Peter Papp
2021-04-30 17:53:19 +02:00
parent 5167ae520e
commit 3c3e82758d
51 changed files with 1890 additions and 763 deletions
+2 -3
View File
@@ -1,5 +1,4 @@
<?php
namespace App\Traits;
use App\Models\Oasis\Client;
@@ -27,11 +26,11 @@ trait Oasis
public function regularInvoices()
{
return $this->hasMany(Invoice::class)->whereInvoiceType('regular-invoice');
return $this->hasMany(Invoice::class)->whereInvoiceType('regular-invoice')->orderByDesc('created_at');
}
public function advanceInvoices()
{
return $this->hasMany(Invoice::class)->whereInvoiceType('advance-invoice');
return $this->hasMany(Invoice::class)->whereInvoiceType('advance-invoice')->orderByDesc('created_at');
}
}