Merge pull request #15873 from frappe/revert-15870-portal-fixes

Revert "Add overdue status for sales order"
This commit is contained in:
Shreya Shah 2018-10-31 18:20:56 +05:30 committed by GitHub
commit 9660d64146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ from __future__ import unicode_literals
import frappe
import json
import frappe.utils
from frappe.utils import cstr, flt, getdate, comma_and, cint, nowdate
from frappe.utils import cstr, flt, getdate, comma_and, cint
from frappe import _
from frappe.model.utils import get_fetch_values
from frappe.model.mapper import get_mapped_doc
@ -346,15 +346,7 @@ class SalesOrder(SellingController):
def set_indicator(self):
"""Set indicator for portal"""
if self.status == 'Closed':
self.indicator_color = "green"
self.indicator_title = _("Closed")
elif self.per_delivered < 100 and getdate(self.delivery_date) < getdate(nowdate()):
self.indicator_color = "red"
self.indicator_title = _("Overdue")
elif self.per_billed < 100 and self.per_delivered < 100:
if self.per_billed < 100 and self.per_delivered < 100:
self.indicator_color = "orange"
self.indicator_title = _("Not Paid and Not Delivered")