Only update linked posting amounts if changing the first posting
This commit is contained in:
parent
7416d270de
commit
86c5371d32
@ -223,8 +223,10 @@
|
||||
}
|
||||
|
||||
function changeAmount(el) {
|
||||
// Update linked postings if there are only 2 and the first is edited
|
||||
// This allows changing the second posting independently by editing it (e.g. mixing commodities of equivalent total value)
|
||||
let amountInputs = document.querySelectorAll('#edit-transaction-form input[name="amount"]');
|
||||
if (amountInputs.length === 2) {
|
||||
if (amountInputs.length === 2 && el === amountInputs[0]) {
|
||||
for (inp of amountInputs) {
|
||||
if (inp !== el) {
|
||||
// Update other input with amount
|
||||
|
Loading…
Reference in New Issue
Block a user