Skip to content
Code-Schnipsel Gruppen Projekte

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

Zusammengeführt Patrick Müller schlägt vor, next-2.x in main zu mergen.
1 Datei
+ 9
0
Änderungen vergleichen
  • Nebeneinander
  • In der Reihe
@@ -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(