mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
stopdate for subs
This commit is contained in:
@@ -90,7 +90,11 @@ func (as *WalletService) GetHeader(am *models.Auth, embed string, walletId strin
|
||||
|
||||
for _, sub := range *subscriptions {
|
||||
startDate := sub.StartDate
|
||||
for startDate.Before(firstOfMonthAfterNext) {
|
||||
stopDate := firstOfMonthAfterNext
|
||||
if sub.HasEnd {
|
||||
stopDate = sub.EndDate
|
||||
}
|
||||
for startDate.Before(stopDate) {
|
||||
trans := sub.ToTrans()
|
||||
trans.TransactionDate = startDate
|
||||
addWhere(&wallets, sub.WalletID, *trans)
|
||||
|
||||
Reference in New Issue
Block a user