Finished Invoice Email Delivery
This commit is contained in:
@@ -16,10 +16,5 @@ $me = new User(1);
|
||||
define("INTERNAL_USER_ID", $me->id);
|
||||
define("INTERNAL_USER_USERNAME", $me->username);
|
||||
|
||||
$invoice = InvoiceModel::getFirst(["invoice_number" => "RN2024-X026813"]);
|
||||
var_dump($invoice);
|
||||
$invoice->sendByEmail("jantscher@xinon.at");
|
||||
exit;
|
||||
|
||||
$ic = new InvoiceController();
|
||||
$ic->_sendEmailInvoices();
|
||||
@@ -18,12 +18,12 @@ $me = new User(1);
|
||||
foreach(InvoiceModel::getAll() as $invoice) {
|
||||
$pdf = $invoice->pdf;
|
||||
|
||||
if(!$pdf || !$pdf->id || !$pdf->file_id) {
|
||||
if(!$pdf || !$pdf->name) {
|
||||
echo $invoice->invoice_number." missing pdf file link\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!file_exists($pdf->file->getFullPath())) {
|
||||
if(!file_exists($pdf->getFullPath())) {
|
||||
echo $invoice->invoice_number." PDF (".$pdf->file->getFullPath().") file does not exist\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user