You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transactions now have a reconciled flag for both the source and the
destination account named `reconciledSource` and `reconciledDestination`.
This is needed since transactions are reconciled per account, not
globally.
It is recommended for all clients to switch to the new field names. The
existing field `reconciled` is now deprecated and will be removed in
API v2.
Copy file name to clipboardExpand all lines: api/docs.go
+35-1Lines changed: 35 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2438,9 +2438,21 @@ const docTemplate = `{
2438
2438
},
2439
2439
{
2440
2440
"type": "boolean",
2441
-
"description": "Filter by reconcilication state",
2441
+
"description": "DEPRECATED. Filter by reconcilication state",
2442
2442
"name": "reconciled",
2443
2443
"in": "query"
2444
+
},
2445
+
{
2446
+
"type": "boolean",
2447
+
"description": "Reconcilication state in source account",
2448
+
"name": "reconciledSource",
2449
+
"in": "query"
2450
+
},
2451
+
{
2452
+
"type": "boolean",
2453
+
"description": "Reconcilication state in destination account",
2454
+
"name": "reconciledDestination",
2455
+
"in": "query"
2444
2456
}
2445
2457
],
2446
2458
"responses": {
@@ -3316,6 +3328,17 @@ const docTemplate = `{
3316
3328
"example": "Lunch"
3317
3329
},
3318
3330
"reconciled": {
3331
+
"description": "DEPRECATED. Do not use, this field does not work as intended. See https://github.com/envelope-zero/backend/issues/528. Use reconciledSource and reconciledDestination instead.",
3332
+
"type": "boolean",
3333
+
"default": false,
3334
+
"example": true
3335
+
},
3336
+
"reconciledDestination": {
3337
+
"type": "boolean",
3338
+
"default": false,
3339
+
"example": true
3340
+
},
3341
+
"reconciledSource": {
3319
3342
"type": "boolean",
3320
3343
"default": false,
3321
3344
"example": true
@@ -3768,6 +3791,17 @@ const docTemplate = `{
3768
3791
"example": "Lunch"
3769
3792
},
3770
3793
"reconciled": {
3794
+
"description": "DEPRECATED. Do not use, this field does not work as intended. See https://github.com/envelope-zero/backend/issues/528. Use reconciledSource and reconciledDestination instead.",
Copy file name to clipboardExpand all lines: api/swagger.json
+35-1Lines changed: 35 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2426,9 +2426,21 @@
2426
2426
},
2427
2427
{
2428
2428
"type": "boolean",
2429
-
"description": "Filter by reconcilication state",
2429
+
"description": "DEPRECATED. Filter by reconcilication state",
2430
2430
"name": "reconciled",
2431
2431
"in": "query"
2432
+
},
2433
+
{
2434
+
"type": "boolean",
2435
+
"description": "Reconcilication state in source account",
2436
+
"name": "reconciledSource",
2437
+
"in": "query"
2438
+
},
2439
+
{
2440
+
"type": "boolean",
2441
+
"description": "Reconcilication state in destination account",
2442
+
"name": "reconciledDestination",
2443
+
"in": "query"
2432
2444
}
2433
2445
],
2434
2446
"responses": {
@@ -3304,6 +3316,17 @@
3304
3316
"example": "Lunch"
3305
3317
},
3306
3318
"reconciled": {
3319
+
"description": "DEPRECATED. Do not use, this field does not work as intended. See https://github.com/envelope-zero/backend/issues/528. Use reconciledSource and reconciledDestination instead.",
3320
+
"type": "boolean",
3321
+
"default": false,
3322
+
"example": true
3323
+
},
3324
+
"reconciledDestination": {
3325
+
"type": "boolean",
3326
+
"default": false,
3327
+
"example": true
3328
+
},
3329
+
"reconciledSource": {
3307
3330
"type": "boolean",
3308
3331
"default": false,
3309
3332
"example": true
@@ -3756,6 +3779,17 @@
3756
3779
"example": "Lunch"
3757
3780
},
3758
3781
"reconciled": {
3782
+
"description": "DEPRECATED. Do not use, this field does not work as intended. See https://github.com/envelope-zero/backend/issues/528. Use reconciledSource and reconciledDestination instead.",
Reconciledbool`form:"reconciled"`// DEPRECATED. Do not use, this field does not work as intended. See https://github.com/envelope-zero/backend/issues/528. Use reconciledSource and reconciledDestination instead.
44
+
ReconciledSourcebool`form:"reconciledSource"`// Is the transaction reconciled in the source account?
45
+
ReconciledDestinationbool`form:"reconciledDestination"`// Is the transaction reconciled in the destination account?
db.Unscoped().Model(&Transaction{}).Select("Reconciled").Where("transactions.reconciled IS NULL").Update("Reconciled", false)
32
+
db.Unscoped().Model(&Transaction{}).Select("ReconciledSource").Where("transactions.reconciled_source IS NULL").Update("ReconciledSource", false)
33
+
db.Unscoped().Model(&Transaction{}).Select("ReconciledDestination").Where("transactions.reconciled_destination IS NULL").Update("ReconciledDestination", false)
Copy file name to clipboardExpand all lines: pkg/models/transaction.go
+12-9Lines changed: 12 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -20,15 +20,18 @@ type Transaction struct {
20
20
}
21
21
22
22
typeTransactionCreatestruct {
23
-
Date time.Time`json:"date" example:"1815-12-10T18:43:00.271152Z"`
24
-
Amount decimal.Decimal`json:"amount" gorm:"type:DECIMAL(20,8)" example:"14.03" minimum:"0.00000001" maximum:"999999999999.99999999" multipleOf:"0.00000001"`// The maximum value is "999999999999.99999999", swagger unfortunately rounds this.
AvailableFrom types.Month`json:"availableFrom" example:"2021-11-17:00:00:00Z"`// The date from which on the transaction amount is available for budgeting. Only used for income transactions. Defaults to the transaction date.
23
+
Date time.Time`json:"date" example:"1815-12-10T18:43:00.271152Z"`
24
+
Amount decimal.Decimal`json:"amount" gorm:"type:DECIMAL(20,8)" example:"14.03" minimum:"0.00000001" maximum:"999999999999.99999999" multipleOf:"0.00000001"`// The maximum value is "999999999999.99999999", swagger unfortunately rounds this.
Reconciledbool`json:"reconciled" example:"true" default:"false"`// DEPRECATED. Do not use, this field does not work as intended. See https://github.com/envelope-zero/backend/issues/528. Use reconciledSource and reconciledDestination instead.
AvailableFrom types.Month`json:"availableFrom" example:"2021-11-17:00:00:00Z"`// The date from which on the transaction amount is available for budgeting. Only used for income transactions. Defaults to the transaction date.
0 commit comments