Merge pull request 'Revoked logic of production mail report' (#1232) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #1232
This commit was merged in pull request #1232.
This commit is contained in:
@@ -57,14 +57,14 @@ class SendProductionReport extends Command
|
|||||||
|
|
||||||
// $startDate = now()->setTime(8, 0, 0);
|
// $startDate = now()->setTime(8, 0, 0);
|
||||||
// $endDate = now()->copy()->addDay()->setTime(8, 0, 0);
|
// $endDate = now()->copy()->addDay()->setTime(8, 0, 0);
|
||||||
// if (strtolower($scheduleType) == 'daily') {
|
|
||||||
// $startDate = now()->subDay()->setTime(8, 0, 0);
|
|
||||||
// $endDate = now()->setTime(8, 0, 0);
|
|
||||||
// }
|
|
||||||
if (strtolower($scheduleType) == 'daily') {
|
if (strtolower($scheduleType) == 'daily') {
|
||||||
$startDate = now()->subDays(2)->setTime(8, 0, 0);
|
$startDate = now()->subDay()->setTime(8, 0, 0);
|
||||||
$endDate = now()->subDay()->setTime(8, 0, 0);
|
$endDate = now()->setTime(8, 0, 0);
|
||||||
}
|
}
|
||||||
|
// if (strtolower($scheduleType) == 'daily') {
|
||||||
|
// $startDate = now()->subDays(2)->setTime(8, 0, 0);
|
||||||
|
// $endDate = now()->subDay()->setTime(8, 0, 0);
|
||||||
|
// }
|
||||||
else {
|
else {
|
||||||
$startDate = now()->setTime(8, 0, 0);
|
$startDate = now()->setTime(8, 0, 0);
|
||||||
$endDate = now()->copy()->addDay()->setTime(8, 0, 0);
|
$endDate = now()->copy()->addDay()->setTime(8, 0, 0);
|
||||||
|
|||||||
@@ -72,10 +72,8 @@ class ProductionMail extends Mailable
|
|||||||
$greeting = "Dear Sir/Madam,<br><br>Kindly find the attached production report status details for the 'Target Quantity' and 'Production Quantity' count,";
|
$greeting = "Dear Sir/Madam,<br><br>Kindly find the attached production report status details for the 'Target Quantity' and 'Production Quantity' count,";
|
||||||
|
|
||||||
if ($this->scheduleType == 'Daily') {
|
if ($this->scheduleType == 'Daily') {
|
||||||
// $fromDate = (new DateTime('yesterday 08:00'))->format('d/m/Y H:i').':000';
|
$fromDate = (new DateTime('yesterday 08:00'))->format('d/m/Y H:i').':000';
|
||||||
// $toDate = (new DateTime('today 07:59'))->format('d/m/Y H:i').':999';
|
$toDate = (new DateTime('today 07:59'))->format('d/m/Y H:i').':999';
|
||||||
$fromDate = (new DateTime('2 days ago 08:00'))->format('d/m/Y H:i') . ':000';
|
|
||||||
$toDate = (new DateTime('yesterday 07:59'))->format('d/m/Y H:i') . ':999';
|
|
||||||
$reportPeriod = "The following report presents results from: $fromDate to $toDate.";
|
$reportPeriod = "The following report presents results from: $fromDate to $toDate.";
|
||||||
$greeting .= $reportPeriod;
|
$greeting .= $reportPeriod;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user