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

refactor: invoice#66

Übergeordneter e010b367
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -760,8 +760,8 @@ public static function calculatePayments($ToCalculate)
if ($ToCalculate instanceof QUI\ERP\Order\AbstractOrder
&& $ToCalculate->getAttribute('paid_status') === QUI\ERP\Constants::PAYMENT_STATUS_PLAN) {
// Leave everything as it is because a subscription plan order can never be set to "paid"
} elseif ($ToCalculate->getAttribute('paid_status') === Handler::TYPE_INVOICE_REVERSAL
|| $ToCalculate->getAttribute('paid_status') === Handler::TYPE_INVOICE_CANCEL
} elseif ($ToCalculate->getAttribute('paid_status') === QUI\ERP\Constants::TYPE_INVOICE_REVERSAL
|| $ToCalculate->getAttribute('paid_status') === QUI\ERP\Constants::TYPE_INVOICE_CANCEL
) {
// Leave everything as it is
} elseif ((float)$ToCalculate->getAttribute('toPay') == 0) {
......
......@@ -17,4 +17,41 @@ class Constants
const PAYMENT_STATUS_CANCELED = 5;
const PAYMENT_STATUS_DEBIT = 11;
const PAYMENT_STATUS_PLAN = 12;
/**
* @var int
*/
const TYPE_INVOICE = 1;
/**
* @var int
*/
const TYPE_INVOICE_TEMPORARY = 2;
/**
* Gutschrift / Credit note
* @var int
*/
const TYPE_INVOICE_CREDIT_NOTE = 3;
// Storno types
/**
* Reversal, storno, cancellation
*/
const TYPE_INVOICE_REVERSAL = 4;
/**
* Alias for reversal
* @var int
*/
const TYPE_INVOICE_STORNO = 4;
/**
* Status für alte stornierte Rechnung
*
* @var int
*/
const TYPE_INVOICE_CANCEL = 5;
}
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