feat: refs #8298 update price calculation logic and add packagesDiscountFactor column to client table
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
53c604762a
commit
125b7730e7
|
@ -236,11 +236,7 @@ BEGIN
|
||||||
ic.cm3delivery
|
ic.cm3delivery
|
||||||
* (
|
* (
|
||||||
(
|
(
|
||||||
zo.price
|
zo.priceOptimum + (( zo.price - zo.priceOptimum) * 2 * ( 1 - c.packagesDiscountFactor))
|
||||||
- (
|
|
||||||
(zo.price - zo.priceOptimum)
|
|
||||||
* c.packagesDiscountFactor
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
- IFNULL(zo.bonus, 0)
|
- IFNULL(zo.bonus, 0)
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
ALTER TABLE `vn`.`client`
|
ALTER TABLE `vn`.`client`
|
||||||
ADD COLUMN `packagesDiscountFactor` DECIMAL(4,3) NOT NULL DEFAULT 1.000
|
ADD COLUMN `packagesDiscountFactor` DECIMAL(4,3) NOT NULL DEFAULT 1.000
|
||||||
COMMENT 'Factor (1-0) que pondera el precio final entre priceOptimum (mejor) y price (peor)';
|
COMMENT 'Porcentaje de ajuste entre el numero de bultos medio del cliente, y el número medio óptimo para las zonas en las que compra';
|
||||||
|
|
Loading…
Reference in New Issue