Subversion Repositories SmartDukaan

Rev

Rev 12722 | Rev 13401 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12722 Rev 12790
Line 601... Line 601...
601
    counter.ownerName = tCounter.ownerName
601
    counter.ownerName = tCounter.ownerName
602
    counter.createdOn = datetime.datetime.now()
602
    counter.createdOn = datetime.datetime.now()
603
    counter.email = tCounter.email
603
    counter.email = tCounter.email
604
    counter.mobile = tCounter.mobile
604
    counter.mobile = tCounter.mobile
605
    counter.addressId = address.id
605
    counter.addressId = address.id
-
 
606
    counter.dob = tCounter.dob
606
    counter.tin = tCounter.tin 
607
    counter.tin = tCounter.tin 
607
    query = Counter.query.filter(Counter.code.like(CounterStateMap[address.state] + '%')).order_by(Counter.id.desc())
608
    query = Counter.query.filter(Counter.code.like(CounterStateMap[address.state] + '%')).order_by(Counter.id.desc())
608
    lastStateCounter = query.first()
609
    lastStateCounter = query.first()
609
    if lastStateCounter:
610
    if lastStateCounter:
610
        counter.code = CounterStateMap[address.state] + str(int(lastStateCounter.code[2:])+1).zfill(6)
611
        counter.code = CounterStateMap[address.state] + str(int(lastStateCounter.code[2:])+1).zfill(6)