fix: CSV-экспорт Estimate игнорировал аплифт, всегда x1.3

Фронтенд не отправлял значение поля "Аплифт к estimate" в запрос
экспорта, из-за чего бэкенд всегда падал на дефолт 1.3. Кроме того,
applyDDPMarkup применял один и тот же коэффициент к Estimate, Склад
и Конкуренты — теперь Склад/Конкуренты всегда x1.3, а Estimate — по
пользовательскому аплифту.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-08-10 18:41:29 +03:00
co-authored by Claude Sonnet 5
parent 34cee5f874
commit b087b7eb58
2 changed files with 11 additions and 5 deletions
+2
View File
@@ -5028,6 +5028,7 @@ async function exportPricingCSV(table) {
const basis = table === 'sale' ? 'ddp' : 'fob';
const manualInputId = table === 'sale' ? 'pricing-custom-price-sale' : 'pricing-custom-price-buy';
const manualPrice = parseDecimalInput(document.getElementById(manualInputId)?.value || '');
const saleUplift = table === 'sale' ? parseDecimalInput(document.getElementById('pricing-uplift-sale')?.value || '') : 0;
try {
const resp = await fetch(`/api/configs/${configUUID}/export/pricing`, {
method: 'POST',
@@ -5039,6 +5040,7 @@ async function exportPricingCSV(table) {
include_stock: true,
include_competitor: true,
basis: basis,
sale_markup: saleUplift > 0 ? saleUplift : null,
manual_price: manualPrice > 0 ? manualPrice : null,
}),
});