Skip to content
Code-Schnipsel Gruppen Projekte
Commit 19e61388 erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

fix: allow new transactions to change the paid_status of an erroneous order

Übergeordneter a1ecb443
No related branches found
No related tags found
2 Merge Requests!145Update 'next-3.x' with latest changes from 'main',!144fix: allow new transactions to change the paid_status of an erroneous order
Pipeline #15299 mit Warnungen bestanden mit Phase
in 3 Minuten und 18 Sekunden
......@@ -1695,6 +1695,15 @@ public function addTransaction(Transaction $Transaction): void
]
);
/*
* If the paid status was erroneous and a new transaction is added to the order,
* we have to change the status to open because otherwise the payment status
* would not be set to "successful" by the calculation service.
*/
if ($this->getAttribute('paid_status') === QUI\ERP\Constants::PAYMENT_STATUS_ERROR) {
$this->setAttribute('paid_status', QUI\ERP\Constants::PAYMENT_STATUS_OPEN);
}
$this->calculatePayments();
QUI::getEvents()->fireEvent(
......
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