scheduleType = $scheduleType; $this->tableData = $tableData ?? []; $this->NotOkData = $NotOkData ?? []; } /** * Get the message envelope. */ public function envelope(): Envelope { return new Envelope( subject: 'Process Order Mail', ); } /** * Get the message content definition. */ public function content(): Content { $greeting = "Dear Sir/Madam,

Kindly find the attached process order report status details for the 'Order Quantity' and 'Received Quantity' count,"; if ($this->scheduleType == 'Daily') { $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'; $reportPeriod = "The following report presents results from: $fromDate to $toDate."; $greeting .= $reportPeriod; } return new Content( view: 'mail.process_order_report', with: [ 'company' => "CRI Digital Manufacturing Solutions", 'greeting' => $greeting, 'tableData' => $this->tableData, 'NotOkData' => $this->NotOkData, 'wishes' => "Thanks & Regards,
CRI Digital Manufacturing Solutions" ], ); } /** * Get the attachments for the message. * * @return array */ public function attachments(): array { return []; } }