Add customer product fixed price overrides
This commit is contained in:
@@ -1733,9 +1733,9 @@ class InvoicingPeriodRoute
|
||||
$department_price_cache[$department_id][$product_id] = (int)$product_cache[$product_id]->getDepartmentPrice($department_id);
|
||||
}
|
||||
if (!array_key_exists($product_id, $discount_cache)) {
|
||||
$discount_cache[$product_id] = $user->getCustomPrice($product_id, false);
|
||||
$discount_cache[$product_id] = $user->applyProductCustomerPricing($product_id, (int)$department_price_cache[$department_id][$product_id], false);
|
||||
}
|
||||
$post_discount = (int)round($department_price_cache[$department_id][$product_id] * (1 - ($discount_cache[$product_id] / 100))) * $quantity;
|
||||
$post_discount = (int)$discount_cache[$product_id] * $quantity;
|
||||
$transaction_original_prices[$order_id] = (int)(($transaction_original_prices[$order_id] ?? 0) + $post_discount);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user