Skip to content
GitLab
Erkunden
Anmelden
Registrieren
Primärnavigation
Suchen oder aufrufen …
Projekt
Orders - Bestellungen
Verwalten
Aktivität
Mitglieder
Labels
Planen
Tickets
Ticketübersichten
Meilensteine
Wiki
Code
Merge Requests
Repository
Branch
Commits
Tags
Repository-Diagramm
Revisionen vergleichen
Code-Schnipsel
Build
Pipelines
Aufgaben
Pipeline-Zeitpläne
Artefakte
Bereitstellung
Releases
Modell-Registry
Betreiben
Umgebungen
Überwachen
Vorfälle
Service-Desk
Analysieren
Wertschöpfungskettenanalyse
Mitwirkenden-Analyse
CI/CD-Analyse
Repository-Analysen
Modellexperimente
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
Orders - Bestellungen
Commits
0791dcdf
Bestätigt
Commit
0791dcdf
erstellt
1 year ago
von
Henning Leutz
Dateien durchsuchen
Optionen
Downloads
Patches
Einfaches Diff
fix: consider multiple currencies and user currency
Übergeordneter
71361fc6
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests
!18
Next
,
!17
fix: consider multiple currencies and user currency
Pipeline-
Nr. 4751
bestanden
1 year ago
Phase: test
Änderungen
1
Pipelines
1
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
1 geänderte Datei
src/QUI/ERP/Order/Basket/BasketOrder.php
+22
-19
22 Ergänzungen, 19 Löschungen
src/QUI/ERP/Order/Basket/BasketOrder.php
wird angezeigt
mit
22 Ergänzungen
und
19 Löschungen
src/QUI/ERP/Order/Basket/BasketOrder.php
+
22
−
19
Zeige Datei @
0791dcdf
...
...
@@ -121,12 +121,12 @@ protected function readOrder()
$this
->
Order
=
QUI\ERP\Order\Handler
::
getInstance
()
->
getOrderByHash
(
$this
->
hash
);
$this
->
Order
->
refresh
();
$data
=
$this
->
Order
->
getArticles
()
->
toArray
();
$data
=
$this
->
Order
->
getArticles
()
->
toArray
();
$priceFactors
=
$this
->
Order
->
getArticles
()
->
getPriceFactors
()
->
toArray
();
$articles
=
$data
[
'articles'
];
$this
->
List
=
new
ProductList
();
$this
->
List
=
new
ProductList
();
$this
->
List
->
duplicate
=
true
;
$this
->
List
->
setOrder
(
$this
->
Order
);
...
...
@@ -192,8 +192,8 @@ public function getProducts()
public
function
addProduct
(
Product
$Product
)
{
$Package
=
QUI
::
getPackage
(
'quiqqer/order'
);
$Config
=
$Package
->
getConfig
();
$merge
=
boolval
(
$Config
->
getValue
(
'orderProcess'
,
'mergeSameProducts'
));
$Config
=
$Package
->
getConfig
();
$merge
=
boolval
(
$Config
->
getValue
(
'orderProcess'
,
'mergeSameProducts'
));
if
(
!
$merge
)
{
$this
->
List
->
addProduct
(
$Product
);
...
...
@@ -206,7 +206,7 @@ public function addProduct(Product $Product)
}
$Products
=
$this
->
List
->
getProducts
();
$Products
=
$this
->
List
->
getProducts
();
$foundProduct
=
false
;
foreach
(
$Products
as
$P
)
{
...
...
@@ -215,8 +215,8 @@ public function addProduct(Product $Product)
if
(
$p1
==
$p2
)
{
$foundProduct
=
true
;
$quantity
=
$P
->
getQuantity
();
$quantity
=
$quantity
+
$Product
->
getQuantity
();
$quantity
=
$P
->
getQuantity
();
$quantity
=
$quantity
+
$Product
->
getQuantity
();
$P
->
setQuantity
(
$quantity
);
break
;
...
...
@@ -270,8 +270,8 @@ public function import(array $products = [])
}
$Package
=
QUI
::
getPackage
(
'quiqqer/order'
);
$Config
=
$Package
->
getConfig
();
$merge
=
boolval
(
$Config
->
getValue
(
'orderProcess'
,
'mergeSameProducts'
));
$Config
=
$Package
->
getConfig
();
$merge
=
boolval
(
$Config
->
getValue
(
'orderProcess'
,
'mergeSameProducts'
));
if
(
$merge
)
{
$products
=
OrderProductUtils
::
getMergedProductList
(
$products
);
...
...
@@ -341,7 +341,7 @@ public function toArray(): array
{
$Products
=
$this
->
getProducts
();
$products
=
$Products
->
getProducts
();
$result
=
[];
$result
=
[];
/* @var $Product Product */
foreach
(
$products
as
$Product
)
{
...
...
@@ -361,9 +361,9 @@ public function toArray(): array
}
$attributes
=
[
'id'
=>
$Product
->
getId
(),
'id'
=>
$Product
->
getId
(),
'quantity'
=>
$Product
->
getQuantity
(),
'fields'
=>
$fields
'fields'
=>
$fields
];
$result
[]
=
$attributes
;
...
...
@@ -385,9 +385,9 @@ public function toArray(): array
return
[
'id'
=>
$this
->
getId
(),
'orderHash'
=>
$this
->
getOrder
()
->
getHash
(),
'products'
=>
$result
,
'id'
=>
$this
->
getId
(),
'orderHash'
=>
$this
->
getOrder
()
->
getHash
(),
'products'
=>
$result
,
'priceFactors'
=>
$Products
->
getPriceFactors
()
->
toArray
(),
'calculations'
=>
$calculations
];
...
...
@@ -456,13 +456,16 @@ public function updateOrder()
}
$Articles
=
$this
->
Order
->
getArticles
();
$OrderCurrency
=
$this
->
Order
->
getCurrency
();
$PriceFactors
=
$this
->
List
->
getPriceFactors
();
$PriceFactors
->
setCurrency
(
$OrderCurrency
);
$
this
->
Order
->
getArticles
()
->
importPriceFactors
(
$PriceFactors
->
toErpPriceFactorList
()
);
$
Articles
->
setCurrency
(
$OrderCurrency
);
$Articles
->
importPriceFactors
(
$PriceFactors
->
toErpPriceFactorList
()
);
$Articles
->
recalculate
(
);
$this
->
Order
->
getArticles
()
->
recalculate
();
$this
->
Order
->
save
();
}
...
...
Dieser Diff ist reduziert.
Zum Erweitern klicken.
Vorschau
0%
Lade
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