fixed trade by quantity

This commit is contained in:
2026-06-23 14:04:27 +03:30
parent bd36b74dad
commit adeb5d7c9d
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -400,6 +400,10 @@ class Controller extends BaseController
return false;
}
if (self::usesQuantityTrade($product)) {
return false;
}
if (self::isWeightBasedProductUnit($product['unit'] ?? null)) {
return false;
}
+5
View File
@@ -532,11 +532,16 @@ class AssetSummaryService
'direct_price' => $product->direct_price ?? null,
'group_type' => $product->group_type ?? null,
'amount' => $product->amount ?? null,
'trade_by_quantity' => $product->trade_by_quantity ?? null,
];
}
private function productUnitWeightLabel(Product $product): ?string
{
if (!$this->isCountBasedProduct($product)) {
return null;
}
if (!Controller::hasProductUnitWeight($this->productPayload($product))) {
return null;
}