Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't account for currency or the previous value of the currency #48

Open
github-actions bot opened this issue Nov 5, 2023 · 0 comments
Open
Labels

Comments

@github-actions
Copy link

github-actions bot commented Nov 5, 2023

https://api.github.com/morning4coffe-dev/project-sbs/blob/221473be04beb37fe032f6412da20f043c79e9ed/ProjectSBS/ProjectSBS/Presentation/Components/ItemViewModel.cs#L56

        }
    }

    public decimal TotalPrice
    {
        get
        {
            if (Item?.Billing is not { } billing)
            {
                return 0M;
            }

            var dates = _billingService.GetLastPayments(billing.InitialDate, billing.PeriodType, billing.RecurEvery);

            //TODO Doesn't account for currency or the previous value of the currency
            var price = Enumerable.Count(dates) * billing.BasePrice;
            return price;
        }
    }

    public List<DateOnly> GetFuturePayments(int numberOfPayments = 12)
    {
        if (Item?.Billing is not { } billing)
        {
@github-actions github-actions bot added the todo label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants