[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 rows: FormTabRows = [
|
||||
[['cbxPriceWithDiscount', 'cbxFullPriceWithDiscount', 'cbxQuotePriceWithFullVAT']],
|
||||
[['cbxCostIncrease']],
|
||||
[['cbxPriceWithDiscount', 'cbxFullPriceWithDiscount', 'cbxCostIncrease']],
|
||||
[['cbxInsurance', 'cbxRegistrationQuote', 'cbxTechnicalCardQuote']],
|
||||
[['cbxNSIB', 'cbxQuoteRedemptionGraph', 'cbxShowFinGAP']],
|
||||
[['tbxQuoteName', 'radioQuoteContactGender'], { gridTemplateColumns: ['1fr', '2fr 1fr'] }],
|
||||
|
||||
@ -10,4 +10,5 @@ export const rows: FormTabRows = [
|
||||
[['tbxImporterRewardPerc', 'tbxImporterRewardRub']],
|
||||
[['tbxBonusCoefficient', 'tbxComissionRub', 'tbxComissionPerc']],
|
||||
[['cbxSupplierFinancing', 'cbxPartialVAT', 'cbxFloatingRate']],
|
||||
[['cbxQuotePriceWithFullVAT']],
|
||||
];
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import type { ProcessContext } from '../types';
|
||||
import { disposableReaction } from '@/utils/mobx';
|
||||
import { reaction } from 'mobx';
|
||||
|
||||
export function common({ store }: ProcessContext) {
|
||||
const { $calculation } = store;
|
||||
const { $calculation, $process } = store;
|
||||
|
||||
reaction(
|
||||
() => $calculation.element('radioBalanceHolder').getValue(),
|
||||
@ -37,9 +38,21 @@ export function common({ store }: ProcessContext) {
|
||||
() => $calculation.element('cbxPartialVAT').getValue(),
|
||||
(partialVAT) => {
|
||||
if (partialVAT === true) {
|
||||
$calculation.element('cbxQuotePriceWithFullVAT').setValue(true).unblock();
|
||||
$calculation.element('cbxQuotePriceWithFullVAT').unblock();
|
||||
} 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