From e98ab7a2f4f069660e3d78a0c14f3b6fb4d92ce6 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 21 Aug 2013 16:56:12 +0530 Subject: [PATCH] [fix] [minor] fixes in updating warranty period of serial no --- controllers/selling_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/selling_controller.py b/controllers/selling_controller.py index db2d6212e6..320ad2f8eb 100644 --- a/controllers/selling_controller.py +++ b/controllers/selling_controller.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import webnotes -from webnotes.utils import cint, flt, comma_or, _round +from webnotes.utils import cint, flt, comma_or, _round, add_days from setup.utils import get_company_currency from selling.utils import get_item_details from webnotes import msgprint, _ @@ -291,7 +291,7 @@ class SellingController(StockController): 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'