Merge branch 'develop' into base
commit
191770ebf1
|
|
@ -14,7 +14,6 @@ class StockTotalController extends AdminController
|
||||||
|
|
||||||
protected function grid()
|
protected function grid()
|
||||||
{
|
{
|
||||||
// return Grid::make(ProductSku::with(['productSku.category', 'stockLogs']), function (Grid $grid) {
|
|
||||||
$request = request();
|
$request = request();
|
||||||
if (!$request->filled('date.start')) {
|
if (!$request->filled('date.start')) {
|
||||||
$request->offsetSet('date.start', now()->startOfMonth()->format('Y-m-d'));
|
$request->offsetSet('date.start', now()->startOfMonth()->format('Y-m-d'));
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ class StoreTockRepository extends Repository
|
||||||
$start = Carbon::createFromFormat('Y-m-d', $start)->startOfDay();
|
$start = Carbon::createFromFormat('Y-m-d', $start)->startOfDay();
|
||||||
$q->where('created_at', '<=', $start);
|
$q->where('created_at', '<=', $start);
|
||||||
}
|
}
|
||||||
$q->orderBy('created_at', 'desc')->limit(1);
|
$q->orderBy('created_at', 'desc');
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue