Commented scheduler run commands
This commit is contained in:
@@ -6,60 +6,60 @@ use App\Models\Plant;
|
|||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
return redirect('/admin');
|
return redirect('/admin');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Route::get('/test_mail', function () {
|
// Route::get('/scheduler', function() {
|
||||||
// // $tableData = InvoiceValidation::select('id as no', 'plant_id as plant', 'invoice_number as TotalInvoice')
|
// Artisan::call('schedule:run');
|
||||||
// // ->orderBy('plant', 'asc')
|
// });
|
||||||
// // ->get()
|
|
||||||
// // ->unique('invoice')
|
|
||||||
// // ->values()
|
|
||||||
// // ->toArray();
|
|
||||||
|
|
||||||
// $plants = InvoiceValidation::select('plant_id')->distinct()->pluck('plant_id');
|
|
||||||
|
|
||||||
// $tableData = [];
|
// Route::get('/test_mail', function () {
|
||||||
// $no = 1;
|
|
||||||
|
|
||||||
// foreach ($plants as $plantId) {
|
|
||||||
|
|
||||||
// $plant = Plant::find($plantId);
|
// $plants = InvoiceValidation::select('plant_id')->distinct()->pluck('plant_id');
|
||||||
|
|
||||||
// $plantName = $plant ? $plant->name : $plantId;
|
// $tableData = [];
|
||||||
|
// $no = 1;
|
||||||
|
|
||||||
// $totalInvoice = InvoiceValidation::where('plant_id', $plantId)
|
// foreach ($plants as $plantId) {
|
||||||
// ->distinct('invoice_number')
|
|
||||||
// ->count('invoice_number');
|
|
||||||
|
|
||||||
// $startDate = now()->setTime(8, 0, 0);
|
// $plant = Plant::find($plantId);
|
||||||
// $endDate = now()->copy()->addDay()->setTime(8, 0, 0);
|
|
||||||
|
|
||||||
// $scannedInvoice = InvoiceValidation::select('invoice_number')
|
// $plantName = $plant ? $plant->name : $plantId;
|
||||||
// ->where('plant_id', $plantId)
|
|
||||||
// ->whereNull('quantity')
|
|
||||||
// ->whereBetween('updated_at', [$startDate, $endDate])
|
|
||||||
// ->groupBy('invoice_number')
|
|
||||||
// ->havingRaw("COUNT(*) = SUM(CASE WHEN scanned_status = 'Scanned' THEN 1 ELSE 0 END)")
|
|
||||||
// ->count();
|
|
||||||
|
|
||||||
// $tableData[] = [
|
// $totalInvoice = InvoiceValidation::where('plant_id', $plantId)
|
||||||
// 'no' => $no++,
|
// ->distinct('invoice_number')
|
||||||
// 'plant' => $plantName,
|
// ->count('invoice_number');
|
||||||
// 'totalInvoice' => $totalInvoice,
|
|
||||||
// 'scannedInvoice' => $scannedInvoice,
|
|
||||||
// ];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Mail::to('jothikumar.padmanaban@cripumps.com')->send(
|
// $startDate = now()->setTime(8, 0, 0);
|
||||||
// new test($tableData)
|
// $endDate = now()->copy()->addDay()->setTime(8, 0, 0);
|
||||||
// );
|
|
||||||
// // Mail::to([
|
|
||||||
// // 'jothikumar.padmanaban@cripumps.com',
|
|
||||||
// // 'tamilselvan.selvaraj@cripumps.com',
|
|
||||||
// // 'dineshkumar.kaliyappan@cripumps.com'
|
|
||||||
// // ])->send(new test($tableData));
|
|
||||||
|
|
||||||
// return "Mail sent!";
|
// $scannedInvoice = InvoiceValidation::select('invoice_number')
|
||||||
// });
|
// ->where('plant_id', $plantId)
|
||||||
|
// ->whereNull('quantity')
|
||||||
|
// ->whereBetween('updated_at', [$startDate, $endDate])
|
||||||
|
// ->groupBy('invoice_number')
|
||||||
|
// ->havingRaw("COUNT(*) = SUM(CASE WHEN scanned_status = 'Scanned' THEN 1 ELSE 0 END)")
|
||||||
|
// ->count();
|
||||||
|
|
||||||
|
// $tableData[] = [
|
||||||
|
// 'no' => $no++,
|
||||||
|
// 'plant' => $plantName,
|
||||||
|
// 'totalInvoice' => $totalInvoice,
|
||||||
|
// 'scannedInvoice' => $scannedInvoice,
|
||||||
|
// ];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Mail::to('jothikumar.padmanaban@cripumps.com')->send(
|
||||||
|
// new test($tableData)
|
||||||
|
// );
|
||||||
|
// // Mail::to([
|
||||||
|
// // 'jothikumar.padmanaban@cripumps.com',
|
||||||
|
// // 'tamilselvan.selvaraj@cripumps.com',
|
||||||
|
// // 'dineshkumar.kaliyappan@cripumps.com'
|
||||||
|
// // ])->send(new test($tableData));
|
||||||
|
|
||||||
|
// return "Mail sent!";
|
||||||
|
// });
|
||||||
|
|||||||
Reference in New Issue
Block a user