Skip to content

Commit

Permalink
Update CHANGELOG.md and small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAxelander committed May 25, 2024
1 parent 3c36c64 commit 025ec09
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Edit Bucket Dialog shows now a calculated next applying target date for Bucket type `Expense every X Months` and `Save X until Y date` [#201](https://github.com/TheAxelander/OpenBudgeteer/issues/201)
* File content preview on Import Page no longer wraps, instead it uses horizontal scrolling [#227](https://github.com/TheAxelander/OpenBudgeteer/issues/227)
* Migrated reports from ChartJs.Blazor to Blazor-ApexCharts
* Bucket Movements will be now stored with the current date instead on first of the month [#240](https://github.com/TheAxelander/OpenBudgeteer/issues/240) Thanks [Lucaber](https://github.com/Lucaber)

## 1.8.3 (2024-05-20)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ public interface IBucketService : IBaseService<Bucket>
public Bucket Update(Bucket bucket, BucketVersion bucketVersion, DateTime yearMonth);*/
//public Bucket Close(Bucket entity, DateTime yearMonth);
public void Close(Guid id, DateTime yearMonth);
public BucketMovement CreateMovement(Guid bucketId, decimal amount, DateTime yearMonth);
public BucketMovement CreateMovement(Guid bucketId, decimal amount, DateTime movementDate);
}
4 changes: 2 additions & 2 deletions OpenBudgeteer.Core.Data.Services/BucketService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public override void Delete(Guid id)
}
}

public BucketMovement CreateMovement(Guid bucketId, decimal amount, DateTime yearMonth)
public BucketMovement CreateMovement(Guid bucketId, decimal amount, DateTime movementDate)
{
try
{
Expand All @@ -440,7 +440,7 @@ public BucketMovement CreateMovement(Guid bucketId, decimal amount, DateTime yea
Id = Guid.Empty,
BucketId = bucketId,
Amount = amount,
MovementDate = yearMonth
MovementDate = movementDate
};
var result = repository.Create(newBucketMovement);
if (result == 0) throw new Exception($"Unable to create {typeof(BucketMovement)} in database");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,8 @@ public ViewModelOperationResult HandleInOutInput()
try
{
var date = DateTime.Now;
if (_currentYearMonth.Year != date.Year || _currentYearMonth.Month != date.Month) {
if (_currentYearMonth.Year != date.Year || _currentYearMonth.Month != date.Month)
{
var day = (date > _currentYearMonth) ? DateTime.DaysInMonth(_currentYearMonth.Year, _currentYearMonth.Month) : 1;
date = new DateTime(_currentYearMonth.Year, _currentYearMonth.Month, day);
}
Expand Down

0 comments on commit 025ec09

Please sign in to comment.