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

Merge branch 'next-2.x' into 'main'

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

See merge request !144
Übergeordnete 45aebf45 19e61388
Keine zugehörigen Branchen gefunden
Tags 2.7.22
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. 15301 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