Only trigger running balance when amount actually changes.

This commit is contained in:
James Cole
2025-05-31 07:22:42 +02:00
parent 3344d2e5f3
commit d465b51da8
14 changed files with 188 additions and 155 deletions

View File

@@ -29,7 +29,7 @@ export default class Get {
* @returns {Promise<AxiosResponse<any>>}
*/
list(params) {
return api.get('/api/v2/budgets', {params: params});
return api.get('/api/v1/budgets', {params: params});
}
}

View File

@@ -490,8 +490,10 @@ let transactions = function () {
// addedSplit, is called from the HTML
// for source account
const renderAccount = function (item, b, c) {
return item.title + '<br><small class="text-muted">' + i18next.t('firefly.account_type_' + item.meta.type) + '</small>';
console.log('render account');
return item.name_with_balance + '<br><small class="text-muted">' + i18next.t('firefly.account_type_' + item.type) + '</small>';
};
console.log('here we are in');
addAutocomplete({
selector: 'input.ac-source',
serverUrl: urls.account,

View File

@@ -38,7 +38,7 @@ export function addAutocomplete(options) {
'X-CSRF-TOKEN': document.head.querySelector('meta[name="csrf-token"]').content
}
},
queryParam: 'filter[query]',
queryParam: 'query',
hiddenInput: true,
// preventBrowserAutocomplete: true,
highlightTyped: true,
@@ -48,6 +48,7 @@ export function addAutocomplete(options) {
params.serverParams['filter[account_types]'] = options.account_types;
}
if (typeof options.onRenderItem !== 'undefined' && null !== options.onRenderItem) {
console.log('overrule onRenderItem.');
params.onRenderItem = options.onRenderItem;
}
if (options.valueField) {