DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Pseudocode For Inserting Repeating Invoices

04.11.2006
| 3625 views |
  • submit to reddit
        This is far closer to a suggested solution than actual usable code.

For all in Template
        i = int((date()-Template.lastbilldate)/Frequency.everyxdays)
        while i > 0
                Addbill(Template.templateID)
        end
End

Function Addbill(int Template.templateID)
        Insert into Bill(Amount.AmountID, Date(), "Membership Fees", Template.memberID
End