mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-30 13:34:28 +02:00
Do not import prices with zero price as pricedetails during partkeepr import
These are useless placeholders by partkeepr
This commit is contained in:
parent
be1e17b3be
commit
301ecf6c95
1 changed files with 3 additions and 3 deletions
|
@ -255,7 +255,7 @@ class PKPartImporter
|
|||
} elseif (!empty($partdistributor['orderNumber']) && !empty($partdistributor['sku'])) {
|
||||
$spn = $partdistributor['orderNumber'] . ' (' . $partdistributor['sku'] . ')';
|
||||
} else {
|
||||
$spn = 'PartKeepr Import';
|
||||
$spn = '';
|
||||
}
|
||||
|
||||
$orderdetail = $this->em->getRepository(Orderdetail::class)->findOneBy([
|
||||
|
@ -273,8 +273,8 @@ class PKPartImporter
|
|||
$this->em->persist($orderdetail);
|
||||
}
|
||||
|
||||
//Add the price information to the orderdetail
|
||||
if (!empty($partdistributor['price'])) {
|
||||
//Add the price information to the orderdetail (only if the price is not zero, as this was a placeholder in PartKeepr)
|
||||
if (!empty($partdistributor['price']) && !BigDecimal::of($partdistributor['price'])->isZero()) {
|
||||
$pricedetail = new Pricedetail();
|
||||
$orderdetail->addPricedetail($pricedetail);
|
||||
//Partkeepr stores the price per item, we need to convert it to the price per packaging unit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue