[fix] [minor] set warranty expiry date on serial no from delivery note
This commit is contained in:
parent
ada70994dc
commit
a7a919d721
@ -4,7 +4,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import cstr, flt, cint
|
||||
from webnotes.utils import cstr, flt, cint, add_days
|
||||
from webnotes.model.bean import getlist
|
||||
from webnotes.model.code import get_obj
|
||||
from webnotes import msgprint, _
|
||||
@ -236,7 +236,7 @@ class DocType(SellingController):
|
||||
sr.doc.customer = self.doc.customer
|
||||
sr.doc.customer_name = self.doc.customer_name
|
||||
if sr.doc.warranty_period:
|
||||
sr.doc.warranty_expiry_date = add_days(cstr(self.doc.delivery_date),
|
||||
sr.doc.warranty_expiry_date = add_days(cstr(self.doc.posting_date),
|
||||
cint(sr.doc.warranty_period))
|
||||
sr.doc.status = 'Delivered'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user