fixed trade by quantity
This commit is contained in:
@@ -400,6 +400,10 @@ class Controller extends BaseController
|
||||
return false;
|
||||
}
|
||||
|
||||
if (self::usesQuantityTrade($product)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (self::isWeightBasedProductUnit($product['unit'] ?? null)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user