politeia icon indicating copy to clipboard operation
politeia copied to clipboard

[cms] Only 5 months of same-domain invoices are visible, not 6

Open xaur opened this issue 4 years ago • 3 comments

It is October and I see invoices from May till September. That is 5 months into the past, not 6 as was intended.

xaur avatar Oct 21 '20 20:10 xaur

Are you talking about invoice review by domain?

alexlyp avatar Dec 18 '20 15:12 alexlyp

@alexlyp right, I'm talking about not-mine invoices at Domain Invoices page (/invoices).

Actually there are two ways to look at it. We have the month for which the invoice is billing, and then we have the date when it was submitted. Invoice month and its submission month can be quite different, e.g. in December you can submit for October if you missed the deadline.

I'm not 100% sure which of these two dates must determine visibility but leaning towards submission date. But I think it doesnt work as expected in both ways.

The oldest invoices I see today, Dec 18, were submitted early Aug and bill for Jul.

  • if the visibility is "invoices submitted between now and now-6 months", then I should be seeing invoices submitted in the range [Jun 18, Dec 18]. But that is not the case, the oldest I see are early Aug, i.e. nothing from July.
  • if the visibility is "invoices billing for last 6 months", then I should see invoices for months [11, 10, 09, 08, 07, 06]. But again the oldest ones I see bill for month 07.

xaur avatar Dec 18 '20 19:12 xaur

If we go with basing visibility off the submission date, I suggest to actually take invoice's last updated date and not the date of initial submission. This is because some can be edited long after initial submission. If the invoice was "active" in the past 6 months, I think I should see it even if it is from older. If we do it this way, the visibility rule can be expressed quite simply: "show all kinds of activity for the last 6 months".

xaur avatar Dec 18 '20 19:12 xaur