Skip to content
Code-Schnipsel Gruppen Projekte
Commit 5f7995f6 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: datetime of class DateTime constructor expects string, (int|false) given

Übergeordneter 171bc030
No related branches found
No related tags found
2 Merge Requests!87Next 2.x,!80Update 'next-3.x' with latest changes from 'main'
Pipeline #13624 mit Warnungen bestanden mit Phase
in 2 Minuten und 22 Sekunden
......@@ -858,13 +858,20 @@ public static function getElectronicInvoice(
}
// payment stuff
$timeForPayment = null;
try {
$timeForPayment = $Invoice->getAttribute('time_for_payment');
$timeForPayment = strtotime($timeForPayment);
$timeForPayment = new DateTime($timeForPayment);
if ($timeForPayment) {
$timeForPayment = new DateTime($timeForPayment);
}
if (!($timeForPayment instanceof DateTime)) {
$timeForPayment = null;
}
} catch (\Exception) {
$timeForPayment = null;
}
$document->addDocumentPaymentTerm(
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren