diff --git a/ui/src/pages/ProductionProductCostingHasCostDetail.vue b/ui/src/pages/ProductionProductCostingHasCostDetail.vue index 05136db..f0b2530 100644 --- a/ui/src/pages/ProductionProductCostingHasCostDetail.vue +++ b/ui/src/pages/ProductionProductCostingHasCostDetail.vue @@ -2830,6 +2830,18 @@ function recalculateAllDetailRows () { } function resolveRowTRYTutar (row) { + const quantity = resolveNumericRowQuantity(row) + const inputPrice = resolveNumericRowInputPrice(row) + const inputCurrency = resolveInputCurrency(row) + const liveAmount = resolveTRYUnitPriceByInput( + inputPrice, + inputCurrency, + resolveExchangeRateValue('USD'), + resolveExchangeRateValue('EUR'), + resolveExchangeRateValue('GBP') + ) * quantity + + if (Number.isFinite(liveAmount) && inputPrice > 0) return liveAmount return parseMoneyInput(row?.lTutar) } @@ -2842,14 +2854,26 @@ function resolveRowGBPTutar (row) { } function resolveRowUSDTutar (row) { + const quantity = resolveNumericRowQuantity(row) + const inputPrice = resolveNumericRowInputPrice(row) + const inputCurrency = resolveInputCurrency(row) + const liveAmount = resolveUSDUnitPriceByInput( + inputPrice, + inputCurrency, + resolveExchangeRateValue('USD'), + resolveExchangeRateValue('EUR'), + resolveExchangeRateValue('GBP') + ) * quantity + + if (Number.isFinite(liveAmount) && inputPrice > 0) return liveAmount + const rawUSDAmount = row?.usdTutar if (rawUSDAmount !== undefined && rawUSDAmount !== null && String(rawUSDAmount).trim() !== '') { return parseMoneyInput(rawUSDAmount) } - const miktar = resolveNumericRowQuantity(row) const dovizFiyati = parseMoneyInput(row?.lDovizFiyati) - const calc = miktar * dovizFiyati + const calc = quantity * dovizFiyati return Number.isFinite(calc) ? calc : 0 } @@ -3460,6 +3484,11 @@ async function fetchBulkItemPrices () { error: String(e?.message || e || '') }) } + // Bulk price and previous-cost autofill paths can update many rows at once. + // Recalculate once more as a whole so group sub-header totals react immediately. + recalculateAllDetailRows() + schedulePersistLocalDraft() + triggerUIUpdate() } catch (err) { $q.notify({ type: 'negative',