From afaefa8a9d242b5b77d7ad3669b0ba3b2bb0a9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Pocrnji=C4=8D?= Date: Fri, 10 Oct 2025 19:00:29 +0200 Subject: [PATCH] chane to import --- app/Services/ImportProcessor.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Services/ImportProcessor.php b/app/Services/ImportProcessor.php index d5233db..b24d898 100644 --- a/app/Services/ImportProcessor.php +++ b/app/Services/ImportProcessor.php @@ -1346,7 +1346,12 @@ private function upsertAccount(Import $import, array $mapped, $mappings): array $applyInsert[$field] = $value; } if (in_array($mode, ['update', 'both'])) { - $applyUpdate[$field] = $value; + // Do not allow updating initial_amount when mapping is update-only + if ($field === 'initial_amount' && $mode === 'update') { + // skip: initial_amount can change only on insert, or when mapping mode is 'both' + } else { + $applyUpdate[$field] = $value; + } } }