fixed some issues and added label and, or capability

This commit is contained in:
davmar
2026-09-10 22:45:25 +02:00
parent b4d367f056
commit 6cc0de8945
14 changed files with 217 additions and 39 deletions
+6
View File
@@ -534,6 +534,7 @@ class PbSyncService {
},
'budgetAverageMonths': r.getIntValue('budget_average_months', 3),
'labelIds': _jsonStringList(r.get<dynamic>('label_ids')),
'labelMatch': r.getStringValue('label_match'),
'flow': r.getStringValue('flow'),
'amountRange': rangeRaw is Map
? Map<String, dynamic>.from(rangeRaw)
@@ -1259,6 +1260,7 @@ class PbSyncService {
'budget_fixed_amount': w.budgetFixedAmount,
'budget_average_months': w.budgetAverageMonths,
'label_ids': w.labelIds,
'label_match': w.labelMatch.name,
'flow': w.flow.name,
'amount_range': {
if (w.amountRange.exact != null) 'exact': w.amountRange.exact,
@@ -1402,6 +1404,10 @@ class PbSyncService {
remote.getIntValue('budget_average_months', 3) ==
w.budgetAverageMonths &&
_sameIdList(remoteIds, w.labelIds) &&
(remote.getStringValue('label_match').isEmpty
? 'and'
: remote.getStringValue('label_match')) ==
w.labelMatch.name &&
remote.getStringValue('flow') == w.flow.name &&
asDouble(rangeMap['exact']) == w.amountRange.exact &&
asDouble(rangeMap['min']) == w.amountRange.min &&