Hi

I am writing a simple billing application for our business.

We are into about six services and the calculations and parameters of each
service is very different that I need to create six tables for each
business.

The models are like follows


class client(models.Model):
   ......

class bill_service1(models.Models)
  -----
  client = models.ForeignKey(client)

class bill_service2(models.Model ):
   ....
   ......

  client = models.ForeignKey(client)


All this is fine. I can create view pages that will render the Bills as
clean HTML and have it displayed in the browser.


My problem is I need to create generate a sequence of bill numbers for every
bill cut, irrespective of the business it must be in a sequential order. For
example bill no 101 can be one pertaining to business_1, 102 business_2
103 a different business etc. The bills are cut daily and the order of bill
numbers correspond to the order in which bills are cut.

If I create a class called bill_no and with an autofield and a date. How can
I link the bill_no class to the bills so that I am able to generate unique
bill numbers for each table.

I am using MySQL as database.

Please advise


Ramdas S

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to