fixes on auth customers

This commit is contained in:
ludo
2024-03-11 18:48:25 +01:00
parent 296dc4fde2
commit e92f38f6c3
2 changed files with 4 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Datatables\Shop;
use App\Datatables\ParentDataTable as DataTable;
use App\Models\Shop\Invoice;
use App\Repositories\Shop\Customers;
use App\Repositories\Shop\InvoicePayments;
use App\Repositories\Shop\Invoices;
use Illuminate\Support\Facades\Auth;
@@ -28,7 +29,7 @@ class CustomerInvoicesDataTable extends DataTable
public function query(Invoice $model)
{
$customerId = Auth::id();
$customerId = Customers::getId();
$model = $model->byCustomer($customerId)->with(['address']);
return $this->buildQuery($model);