update console

This commit is contained in:
pbao9
2025-07-29 10:24:14 +07:00
parent 980c9468fc
commit e8656c5655
27 changed files with 888 additions and 877 deletions
@@ -103,7 +103,7 @@ class InvoiceRepository extends BaseRepository implements InvoiceRepositoryInter
public function get_billing_day(int|string $day = ''){
return $this->model->whereDate('created_at',$day)->get()->sum('total');
}
public function findWithRelationships(int $id = 0, array $relationships = [], array $withCount = [], array $withSum = [])
public function findWithRelationships(string $ordernum = '', array $relationships = [], array $withCount = [], array $withSum = [])
{
$model = $this->model;
if (count($relationships) > 0) {
@@ -148,6 +148,6 @@ class InvoiceRepository extends BaseRepository implements InvoiceRepositoryInter
}
}
return $model->find($id);
return $model->where('order_num', $ordernum)->first();
}
}