|
@@ -1068,7 +1068,7 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
|
|
|
|
|
public function reNewBatches3()
|
|
public function reNewBatches3()
|
|
|
{
|
|
{
|
|
|
- $batches = Batch::query()->where('id', 6384)->get('code');
|
|
|
|
|
|
|
+ $batches = Batch::query()->where('id','>', 73620)->get('code');
|
|
|
$batchCodes = $batches->map(function ($batch) {
|
|
$batchCodes = $batches->map(function ($batch) {
|
|
|
return $batch['code'];
|
|
return $batch['code'];
|
|
|
})->toArray();
|
|
})->toArray();
|
|
@@ -1094,8 +1094,8 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
// dd($logs);
|
|
// dd($logs);
|
|
|
foreach ($batchCodes as $code) {
|
|
foreach ($batchCodes as $code) {
|
|
|
// $request=Cache::get('temp'.$code)['description'];
|
|
// $request=Cache::get('temp'.$code)['description'];
|
|
|
- $request = Log::query()->select('description')->where('CREATED_AT', '>', '2020-12-16')
|
|
|
|
|
- ->where('type', "issued_newBatch")
|
|
|
|
|
|
|
+ $request = Log::query()->select('description')->where('CREATED_AT', '>', '2021-01-22')
|
|
|
|
|
+ ->where('method', "issued_newBatch")
|
|
|
->where('description', 'like', "%{$code}%")
|
|
->where('description', 'like', "%{$code}%")
|
|
|
->first();
|
|
->first();
|
|
|
if ($request) {
|
|
if ($request) {
|