Compare commits
2 Commits
6871fe8796
...
711438d79f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
711438d79f | ||
|
|
fb6474ab88 |
|
|
@ -1656,6 +1656,10 @@ private function upsertAccount(Import $import, array $mapped, $mappings, bool $h
|
||||||
if (in_array($field, ['balance_amount', 'initial_amount'], true) && is_string($value)) {
|
if (in_array($field, ['balance_amount', 'initial_amount'], true) && is_string($value)) {
|
||||||
$value = $this->normalizeDecimal($value);
|
$value = $this->normalizeDecimal($value);
|
||||||
}
|
}
|
||||||
|
// Convert empty string to 0 for amount fields
|
||||||
|
if (in_array($field, ['balance_amount', 'initial_amount'], true) && ($value === '' || $value === null)) {
|
||||||
|
$value = 0;
|
||||||
|
}
|
||||||
$mode = $map->apply_mode ?? 'both';
|
$mode = $map->apply_mode ?? 'both';
|
||||||
if ($mode === 'keyref') {
|
if ($mode === 'keyref') {
|
||||||
// treat as insert-only field (lookup + create), never update
|
// treat as insert-only field (lookup + create), never update
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user