[2] merge branch release/dyn-3974_full-price-nds
This commit is contained in:
parent
eb6f0ef949
commit
46c0b305b6
@ -4,8 +4,7 @@ export const id = 'create-kp';
|
|||||||
export const title = 'Создание КП';
|
export const title = 'Создание КП';
|
||||||
|
|
||||||
export const rows: FormTabRows = [
|
export const rows: FormTabRows = [
|
||||||
[['cbxPriceWithDiscount', 'cbxFullPriceWithDiscount', 'cbxQuotePriceWithFullVAT']],
|
[['cbxPriceWithDiscount', 'cbxFullPriceWithDiscount', 'cbxCostIncrease']],
|
||||||
[['cbxCostIncrease']],
|
|
||||||
[['cbxInsurance', 'cbxRegistrationQuote', 'cbxTechnicalCardQuote']],
|
[['cbxInsurance', 'cbxRegistrationQuote', 'cbxTechnicalCardQuote']],
|
||||||
[['cbxNSIB', 'cbxQuoteRedemptionGraph', 'cbxShowFinGAP']],
|
[['cbxNSIB', 'cbxQuoteRedemptionGraph', 'cbxShowFinGAP']],
|
||||||
[['tbxQuoteName', 'radioQuoteContactGender'], { gridTemplateColumns: ['1fr', '2fr 1fr'] }],
|
[['tbxQuoteName', 'radioQuoteContactGender'], { gridTemplateColumns: ['1fr', '2fr 1fr'] }],
|
||||||
|
|||||||
@ -10,4 +10,5 @@ export const rows: FormTabRows = [
|
|||||||
[['tbxImporterRewardPerc', 'tbxImporterRewardRub']],
|
[['tbxImporterRewardPerc', 'tbxImporterRewardRub']],
|
||||||
[['tbxBonusCoefficient', 'tbxComissionRub', 'tbxComissionPerc']],
|
[['tbxBonusCoefficient', 'tbxComissionRub', 'tbxComissionPerc']],
|
||||||
[['cbxSupplierFinancing', 'cbxPartialVAT', 'cbxFloatingRate']],
|
[['cbxSupplierFinancing', 'cbxPartialVAT', 'cbxFloatingRate']],
|
||||||
|
[['cbxQuotePriceWithFullVAT']],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import type { ProcessContext } from '../types';
|
import type { ProcessContext } from '../types';
|
||||||
|
import { disposableReaction } from '@/utils/mobx';
|
||||||
import { reaction } from 'mobx';
|
import { reaction } from 'mobx';
|
||||||
|
|
||||||
export function common({ store }: ProcessContext) {
|
export function common({ store }: ProcessContext) {
|
||||||
const { $calculation } = store;
|
const { $calculation, $process } = store;
|
||||||
|
|
||||||
reaction(
|
reaction(
|
||||||
() => $calculation.element('radioBalanceHolder').getValue(),
|
() => $calculation.element('radioBalanceHolder').getValue(),
|
||||||
@ -37,9 +38,21 @@ export function common({ store }: ProcessContext) {
|
|||||||
() => $calculation.element('cbxPartialVAT').getValue(),
|
() => $calculation.element('cbxPartialVAT').getValue(),
|
||||||
(partialVAT) => {
|
(partialVAT) => {
|
||||||
if (partialVAT === true) {
|
if (partialVAT === true) {
|
||||||
$calculation.element('cbxQuotePriceWithFullVAT').setValue(true).unblock();
|
$calculation.element('cbxQuotePriceWithFullVAT').unblock();
|
||||||
} else {
|
} else {
|
||||||
$calculation.element('cbxQuotePriceWithFullVAT').setValue(false).block();
|
$calculation.element('cbxQuotePriceWithFullVAT').block();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
disposableReaction(
|
||||||
|
() => $process.has('LoadKP'),
|
||||||
|
() => $calculation.element('cbxPartialVAT').getValue(),
|
||||||
|
(partialVAT) => {
|
||||||
|
if (partialVAT === true) {
|
||||||
|
$calculation.element('cbxQuotePriceWithFullVAT').setValue(true);
|
||||||
|
} else {
|
||||||
|
$calculation.element('cbxQuotePriceWithFullVAT').setValue(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user