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
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
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-Nr. 15299 mit Warnungen bestanden
...@@ -1695,6 +1695,15 @@ public function addTransaction(Transaction $Transaction): void ...@@ -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(); $this->calculatePayments();
QUI::getEvents()->fireEvent( QUI::getEvents()->fireEvent(
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren