Skip to content

Commit

Permalink
fix bug in currencies
Browse files Browse the repository at this point in the history
  • Loading branch information
deinelieblings committed Jul 11, 2024
1 parent 41bf65f commit 1280dd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion models/taking.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,16 @@ func TakingPipelineTicker() *vmdb.Pipeline {
}

func (i *TakingCreate) TakingDatabase() *TakingDatabase {
currency := "EUR"
if len(i.NewSource) > 0 {
currency = i.NewSource[0].Money.Currency
}
return &TakingDatabase{
ID: uuid.NewString(),
Name: i.Name,
CrewID: i.CrewID,
Type: "manually",
Currency: i.NewSource[0].Money.Currency,
Currency: currency,
DateOfTaking: i.DateOfTaking,
Comment: i.Comment,
Modified: vmod.NewModified(),
Expand Down

0 comments on commit 1280dd0

Please sign in to comment.