[fix] [minor] set warranty expiry date on serial no from delivery note

This commit is contained in:
Nabin Hait 2013-08-20 16:13:23 +05:30
parent ada70994dc
commit a7a919d721

View File

@ -4,7 +4,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import webnotes 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.bean import getlist
from webnotes.model.code import get_obj from webnotes.model.code import get_obj
from webnotes import msgprint, _ from webnotes import msgprint, _
@ -236,7 +236,7 @@ class DocType(SellingController):
sr.doc.customer = self.doc.customer sr.doc.customer = self.doc.customer
sr.doc.customer_name = self.doc.customer_name sr.doc.customer_name = self.doc.customer_name
if sr.doc.warranty_period: 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)) cint(sr.doc.warranty_period))
sr.doc.status = 'Delivered' sr.doc.status = 'Delivered'