Skip to content
GitLab
Erkunden
Anmelden
Registrieren
Primärnavigation
Suchen oder aufrufen …
Projekt
erp
Verwalten
Aktivität
Mitglieder
Labels
Planen
Tickets
20
Ticketübersichten
Meilensteine
Wiki
Code
Merge Requests
0
Repository
Branch
Commits
Tags
Repository-Diagramm
Revisionen vergleichen
Build
Pipelines
Aufgaben
Pipeline-Zeitpläne
Artefakte
Bereitstellung
Releases
Betreiben
Umgebungen
Überwachen
Vorfälle
Service-Desk
Analysieren
Wertschöpfungskettenanalyse
Mitwirkenden-Analyse
CI/CD-Analyse
Repository-Analysen
Hilfe
Hilfe
Support
GitLab-Dokumentation
GitLab-Pläne vergleichen
Community-Forum
Zu GitLab beitragen
Feedback geben
Tastenkürzel
?
Code-Schnipsel
Gruppen
Projekte
Show more breadcrumbs
QUIQQER
erp
Commits
1ef1b778
Commit
1ef1b778
erstellt
vor 2 Jahren
von
Patrick Müller
Dateien durchsuchen
Optionen
Downloads
Einfaches Diff
Merge branch 'dev' of dev.quiqqer.com:quiqqer/erp into dev
Übergeordnete
f3cce944
6cbb7309
No related branches found
Branches enthält Commit
No related tags found
Tags enthält Commit
Keine zugehörigen Merge Requests gefunden
Änderungen
1
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
1 geänderte Datei
src/QUI/ERP/Accounting/Calc.php
+16
-12
16 Ergänzungen, 12 Löschungen
src/QUI/ERP/Accounting/Calc.php
wird angezeigt
mit
16 Ergänzungen
und
12 Löschungen
src/QUI/ERP/Accounting/Calc.php
+
16
−
12
Zeige Datei @
1ef1b778
...
...
@@ -93,9 +93,9 @@ class Calc
/**
* Special transaction attributes for currency exchange
*/
const
TRANSACTION_ATTR_TARGET_CURRENCY
=
'tx_target_currency'
;
const
TRANSACTION_ATTR_TARGET_CURRENCY
=
'tx_target_currency'
;
const
TRANSACTION_ATTR_TARGET_CURRENCY_EXCHANGE_RATE
=
'tx_target_currency_exchange_rate'
;
const
TRANSACTION_ATTR_SHOP_CURRENCY_EXCHANGE_RATE
=
'tx_shop_currency_exchange_rate'
;
const
TRANSACTION_ATTR_SHOP_CURRENCY_EXCHANGE_RATE
=
'tx_shop_currency_exchange_rate'
;
/**
* @var UserInterface
...
...
@@ -580,7 +580,7 @@ public function calcArticlePrice(Article $Article, $callback = false)
];
QUI\ERP\Debug
::
getInstance
()
->
log
(
'Kalkulierter Artikel Preis '
.
$Article
->
getId
(),
'Kalkulierter Artikel Preis '
.
$Article
->
getId
(),
'quiqqer/erp'
);
...
...
@@ -731,7 +731,7 @@ public static function calculatePayments($ToCalculate): array
{
if
(
self
::
isAllowedForCalculation
(
$ToCalculate
)
===
false
)
{
QUI\ERP\Debug
::
getInstance
()
->
log
(
'Calc->calculatePayments(); Object is not allowed to calculate '
.
get_class
(
$ToCalculate
)
'Calc->calculatePayments(); Object is not allowed to calculate '
.
get_class
(
$ToCalculate
)
);
throw
new
QUI\ERP\Exception
(
'Object is not allowed to calculate'
);
...
...
@@ -796,12 +796,12 @@ public static function calculatePayments($ToCalculate): array
$total
=
$calculations
[
'sum'
];
QUI\ERP\Debug
::
getInstance
()
->
log
(
'Calc->calculatePayments(); total: '
.
$total
'Calc->calculatePayments(); total: '
.
$total
);
$isValidTimeStamp
=
function
(
$timestamp
)
{
try
{
new
DateTime
(
'@'
.
$timestamp
);
new
DateTime
(
'@'
.
$timestamp
);
}
catch
(
Exception
$e
)
{
return
false
;
}
...
...
@@ -854,9 +854,9 @@ public static function calculatePayments($ToCalculate): array
QUI\System\Log
::
addWarning
(
\sprintf
(
'The currency of transaction "%s" for calculation of object %s (%s) is "%s" and differs'
.
' from the currency of the calculation object ("%s"). But the transaction does not'
.
' contain an exchange rate from "%s" to "%s". Thus, the exchange rate that is currently'
.
' live in the system is used for converting from "%s" to "%s".'
,
.
' from the currency of the calculation object ("%s"). But the transaction does not'
.
' contain an exchange rate from "%s" to "%s". Thus, the exchange rate that is currently'
.
' live in the system is used for converting from "%s" to "%s".'
,
$Transaction
->
getTxId
(),
$ToCalculate
->
getId
(),
\get_class
(
$ToCalculate
),
...
...
@@ -938,8 +938,8 @@ public static function calculatePayments($ToCalculate): array
&&
$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'
)
===
QUI\ERP\Constants
::
TYPE_INVOICE_REVERSAL
||
$ToCalculate
->
getAttribute
(
'paid_status'
)
===
QUI\ERP\Constants
::
TYPE_INVOICE_CANCEL
||
$ToCalculate
->
getAttribute
(
'paid_status'
)
===
QUI\ERP\Constants
::
PAYMENT_STATUS_DEBIT
||
$ToCalculate
->
getAttribute
(
'paid_status'
)
===
QUI\ERP\Constants
::
TYPE_INVOICE_CANCEL
||
$ToCalculate
->
getAttribute
(
'paid_status'
)
===
QUI\ERP\Constants
::
PAYMENT_STATUS_DEBIT
)
{
// Leave everything as it is
}
elseif
((
float
)
$ToCalculate
->
getAttribute
(
'toPay'
)
==
0
)
{
...
...
@@ -947,7 +947,7 @@ public static function calculatePayments($ToCalculate): array
}
elseif
(
$ToCalculate
->
getAttribute
(
'paid'
)
==
0
)
{
$ToCalculate
->
setAttribute
(
'paid_status'
,
QUI\ERP\Constants
::
PAYMENT_STATUS_OPEN
);
}
elseif
(
$ToCalculate
->
getAttribute
(
'toPay'
)
&&
$calculations
[
'sum'
]
!=
$ToCalculate
->
getAttribute
(
'paid'
)
&&
$calculations
[
'sum'
]
!=
$ToCalculate
->
getAttribute
(
'paid'
)
)
{
$ToCalculate
->
setAttribute
(
'paid_status'
,
QUI\ERP\Constants
::
PAYMENT_STATUS_PART
);
}
...
...
@@ -1079,6 +1079,10 @@ public static function calculateTotal(array $invoiceList, $Currency = null): arr
$invNettoPaid
=
$invPaid
-
$invVatPaid
;
$invNettoToPay
=
$invNettoTotal
-
$invNettoPaid
;
if
(
$invToPay
===
0.0
)
{
$invNettoToPay
=
0
;
}
// complete + addition
$vatPaid
=
$vatPaid
+
$invVatPaid
;
$bruttoTotal
=
$bruttoTotal
+
$invBruttoSum
;
...
...
This diff is collapsed.
Zum Erweitern klicken.
Vorschau
0%
Wiederholen
oder
Neue Datei anhängen
.
Abbrechen
You are about to add
0
people
to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Kommentar speichern
Abbrechen
Bitte
registrieren
oder
Anmelden
zum Kommentieren