I have a small Django project that is a simple billing system.
There is one function, "def bill()" that is run by a cron job every night that handles the billing for the system. Here's how it should work:
1. Each Subscription object has a "price" field and a "day_month_year" (dmy for short) --
2. There are fixed transactions that are in the Transaction model. This could be a fixed transaction of $1 that will only happen once.
3. There are residual or "recurring" Transactions in the Transaction table, they need to billed once every period (dmy).
The code works, but the logic is a bit off and charges customers a few dollars more or less than it should.
I am attaching the code for review; the relevent code is inside "[url removed, login to view]()" -- thanks!
2 freelancere byder i gennemsnit $65 for dette job
Accept my bid and we can keep the good stuff happening. I'll keep your customers happy by always charging them less, so they keep coming for more. This will prove as a formidable business plan. Thanks