This question has been flagged
3257 Views

Hello

I am asking to find out how to change the Journal sequence year from posting date to the transaction date.

Example: My fiscal year ends December 31st. If I have a transaction date December 15, 2013 but I'm posting it on March 3rd 2014 The Journal number has 2014 in it. It should be 2013.

I need this to be modified in the scripts and not just through the sequence settings

How should I modify the ir_sequence.py script :

def _interpolation_dict(self):

    t = time.localtime() # Actually, the server is always in UTC.
    return {
        'year': time.strftime('%Y', t),
        'month': time.strftime('%m', t),
        'day': time.strftime('%d', t),
        'y': time.strftime('%y', t),
        'doy': time.strftime('%j', t),
        'woy': time.strftime('%W', t),
        'weekday': time.strftime('%w', t),
        'h24': time.strftime('%H', t),
        'h12': time.strftime('%I', t),
        'min': time.strftime('%M', t),
        'sec': time.strftime('%S', t),
    }

Can I change " t = time.localtime() # Actually, the server is always in UTC." to t = transaction date somehow

Please any help will be appreciated

Avatar
Discard