تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
6303 أدوات العرض

Hello, everyone ...

Has anyone defined Payment Terms to generate "Due Dates" according to the following:

Current month + 30 days?

Current month + 45 days?

Current month + 60 days?

meaning "Mr Customer, your invoice will not become overdue until 30/45/60 days after the end of this month"

 

I have been able to generate current month plus next month which is quite similar to the first instance and also current month plus the next two months (more or less the last of the above) but this is not quite what Accounting needs. 

 

Or maybe you are aware of a module that takes care of these odd calculation methods.

 

Thank you in advance

Lp

الصورة الرمزية
إهمال
أفضل إجابة

Luis, you override method compute() in class account_payment_term() in module account. You change steps next_date calculations in lines:

            if amt:
                next_date = (datetime.strptime(date_ref, '%Y-%m-%d') + relativedelta(days=line.days))
                if line.days2 < 0:
                    next_first_date = next_date + relativedelta(day=1,months=1) #Getting 1st of next month
                    next_date = next_first_date + relativedelta(days=line.days2)
                if line.days2 > 0:
                    next_date += relativedelta(day=line.days2, months=1)

 

 

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مارس 15
3691
1
نوفمبر 23
1877
1
نوفمبر 22
4252
2
سبتمبر 21
3339
2
يناير 24
14826