1,234 reputation
312
bio website
location
age 30
visits member for 2 years, 9 months
seen Jun 5 '13 at 14:10

Jan
21
comment Handling invoices with timestamps
This is a case of recurring invoices. So instead of isinvoiced, we would keep an integer field that increments every time an invoice is made. So if a customer has subscribed on 1st JAN 2012 and his billing cycle is monthly, then after 3 months he must have been invoiced thrice and our count should show 3. If it shows a lesser count, then it must be invoiced. When a customer, changes his billing cycle, then the product timestamp must be changed. An ideal solution would be to create a table of invoices to keep references. Hope you would have done it, else older invoices can't be tracked
Jan
21
comment Handling invoices with timestamps
It shouldn't be reset unless the invoice is canceled. Why should it be invoiced at the next due date? Its already invoiced and it stands due for payment. There must only be one invoice for one product
Jan
21
comment Handling invoices with timestamps
@Fabian Not exactly. The cron would fail in the following scenario: Assume the cron isn't run for 10 days then the timestamp wouldn't be in the future since the latest time would be greater than the timestamp and invoices wouldn't be generated. It may seem to be rather unlikely but in if invoices are to be generated only 2 days in advance, then there is every chance this could happen.
Jan
21
answered Handling invoices with timestamps
Jan
21
comment Frankly, do you prefer Cowboy coding?
Really refreshing
Jan
20
comment Handling invoices with timestamps
@Fabian Is this a real world project and if it is, I would give you an update tomorrow
Jan
20
comment Handling invoices with timestamps
@Fabian May I know where the product quantity is stored. Is it always going to be one?
Jan
19
comment Introduce the work of a software developer to school children using a social network
@Chris Do the platform need to be exactly facebook? Can you brief more on the actual requirement.
Jan
18
comment Introduce the work of a software developer to school children using a social network
We would be better off as the PR guy.
Jan
18
comment Introduce the work of a software developer to school children using a social network
IMHO, my ideas really look bleak. Would try to post something better
Jan
18
answered Introduce the work of a software developer to school children using a social network
Jan
18
revised How should repetitive calendar tasks be stored in the database?
Improved on recurring tasks
Jan
18
revised How should repetitive calendar tasks be stored in the database?
added 50 characters in body
Jan
18
answered How should repetitive calendar tasks be stored in the database?
Jan
18
comment Is there a design pattern that would apply to discount models?
My intuition suggests this could be what he is looking for in the context of the question
Jan
18
comment Is there a design pattern that would apply to discount models?
Also if someone purchases 2 units of Product X, one Product Y, and one Product Z, would be get both 10% and an extra product X?
Jan
18
comment Is there a design pattern that would apply to discount models?
@Kanini Is this a real-world problem? In such a case is this system in real-time or deferred-time? Are these rules presented as a rule-engine or database values? Is the search for discounts hierarchical based on priority? Strategy pattern would work in most of the cases but your rules must be factored out to make it work
Jan
18
comment What is a Ph.D. good for in the software industry?
+1 for there is no correlation between programming ability and the level of formal education in the computer science field
Jan
17
comment Prerequisites for developing an application with Unicode support
But all applications aren't built on Python and I actually use Python most of the time
Jan
17
comment Prerequisites for developing an application with Unicode support
Can this be split into multiple questions