3. в проверки на мин.и макс.стоимость при ПБП также добавить что из Стоимости надо вычитать скидку производителя, но добавлять доп.оборудование (аналогично как при расчете мин. и макс.стоимости)
This commit is contained in:
parent
d9eb74ff17
commit
908e04675c
@ -99,15 +99,22 @@ const reactionEffects: IReactionEffect[] = [
|
||||
supplierDiscountRub,
|
||||
leaseObjectPriceWthtVAT,
|
||||
recalcWithRevision,
|
||||
addEquipmentPrice,
|
||||
} = calculationStore.values;
|
||||
|
||||
//@ts-ignore
|
||||
const price = calculationStore.plPriceRub();
|
||||
|
||||
//@ts-ignore
|
||||
const importProgramSum = calculationStore.importProgramSum();
|
||||
|
||||
return [
|
||||
supplierDiscountRub,
|
||||
price,
|
||||
leaseObjectPriceWthtVAT,
|
||||
recalcWithRevision,
|
||||
addEquipmentPrice,
|
||||
importProgramSum,
|
||||
];
|
||||
},
|
||||
effect: ([
|
||||
@ -115,6 +122,8 @@ const reactionEffects: IReactionEffect[] = [
|
||||
price,
|
||||
leaseObjectPriceWthtVAT,
|
||||
recalcWithRevision,
|
||||
addEquipmentPrice,
|
||||
importProgramSum,
|
||||
]) => {
|
||||
if (!recalcWithRevision) {
|
||||
calculationStore.setValidation('tbxLeaseObjectPrice', undefined);
|
||||
@ -128,7 +137,8 @@ const reactionEffects: IReactionEffect[] = [
|
||||
const maxCondition1 =
|
||||
quote?.evo_max_price_change &&
|
||||
!product?.evo_sale_without_nds &&
|
||||
price - supplierDiscountRub > quote.evo_max_price_change;
|
||||
price - supplierDiscountRub + addEquipmentPrice - importProgramSum >
|
||||
quote.evo_max_price_change;
|
||||
|
||||
const maxCondition2 =
|
||||
quote?.evo_max_price_change &&
|
||||
@ -140,7 +150,8 @@ const reactionEffects: IReactionEffect[] = [
|
||||
const minCondition1 =
|
||||
quote?.evo_min_change_price &&
|
||||
!product?.evo_sale_without_nds &&
|
||||
price - supplierDiscountRub < quote.evo_min_change_price;
|
||||
price - supplierDiscountRub + addEquipmentPrice - importProgramSum <
|
||||
quote.evo_min_change_price;
|
||||
|
||||
const minCondition2 =
|
||||
quote?.evo_min_change_price &&
|
||||
|
||||
Reference in New Issue
Block a user