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

feat: currency exchange rating

Übergeordneter e672d2ee
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -214,3 +214,9 @@
.invoices-invoice-details .articles-sum td {
font-size: 14px !important;
}
.invoices-invoice-details .articles-sum-exchange-rate {
float: left;
font-size: 10px;
margin: 10px 10px 0 10px;
}
......@@ -45,10 +45,10 @@ class Invoice extends QUI\QDOM
// const PAYMENT_STATUS_STORNO = 3; // Alias for cancel
// const PAYMENT_STATUS_CREATE_CREDIT = 5;
const DUNNING_LEVEL_OPEN = 0; // No Dunning -> Keine Mahnung
const DUNNING_LEVEL_REMIND = 1; // Payment reminding -> Zahlungserinnerung
const DUNNING_LEVEL_DUNNING = 2; // Dunning -> Erste Mahnung
const DUNNING_LEVEL_DUNNING2 = 3; // Second dunning -> Zweite Mahnung
const DUNNING_LEVEL_OPEN = 0; // No Dunning -> Keine Mahnung
const DUNNING_LEVEL_REMIND = 1; // Payment reminding -> Zahlungserinnerung
const DUNNING_LEVEL_DUNNING = 2; // Dunning -> Erste Mahnung
const DUNNING_LEVEL_DUNNING2 = 3; // Second dunning -> Zweite Mahnung
const DUNNING_LEVEL_COLLECTION = 4; // Collection -> Inkasso
/**
......@@ -249,6 +249,23 @@ public function getArticles(): ArticleListUnique
$List = new ArticleListUnique($articles, $this->getCustomer());
$List->setLocale($this->getCustomer()->getLocale());
// accounting currency, if exists
$accountingCurrencyData = $this->getCustomDataEntry('accountingCurrencyData');
try {
if ($accountingCurrencyData) {
$List->setExchangeCurrency(
new QUI\ERP\Currency\Currency(
$accountingCurrencyData['accountingCurrency']
)
);
$List->setExchangeRate($accountingCurrencyData['rate']);
}
} catch (QUI\Exception $Exception) {
}
return $List;
}
......
......@@ -238,6 +238,26 @@ public function __construct($id, Handler $Handler)
if (\is_numeric($data['shipping_id'])) {
$this->shippingId = (int)$data['shipping_id'];
}
// accounting currency, if exists
$accountingCurrencyData = $this->getCustomDataEntry('accountingCurrencyData');
try {
if ($accountingCurrencyData) {
$this->Articles->setExchangeCurrency(
new QUI\ERP\Currency\Currency(
$accountingCurrencyData['accountingCurrency']
)
);
$this->Articles->setExchangeRate($accountingCurrencyData['rate']);
} elseif (QUI\ERP\Currency\Conf::accountingCurrencyEnabled()) {
$this->Articles->setExchangeCurrency(
QUI\ERP\Currency\Conf::getAccountingCurrency()
);
}
} catch (QUI\Exception $Exception) {
}
}
//region Getter
......
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