mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
Return status in listview for return entry
This commit is contained in:
@@ -4,9 +4,11 @@
|
|||||||
// render
|
// render
|
||||||
frappe.listview_settings['Purchase Invoice'] = {
|
frappe.listview_settings['Purchase Invoice'] = {
|
||||||
add_fields: ["supplier", "supplier_name", "base_grand_total", "outstanding_amount", "due_date", "company",
|
add_fields: ["supplier", "supplier_name", "base_grand_total", "outstanding_amount", "due_date", "company",
|
||||||
"currency"],
|
"currency", "is_return"],
|
||||||
get_indicator: function(doc) {
|
get_indicator: function(doc) {
|
||||||
if(flt(doc.outstanding_amount) > 0 && doc.docstatus==1) {
|
if(cint(doc.is_return)==1) {
|
||||||
|
return [__("Return"), "darkgrey", "is_return,=,1"];
|
||||||
|
} else if(flt(doc.outstanding_amount) > 0 && doc.docstatus==1) {
|
||||||
if(frappe.datetime.get_diff(doc.due_date) < 0) {
|
if(frappe.datetime.get_diff(doc.due_date) < 0) {
|
||||||
return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<,Today"];
|
return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<,Today"];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
// render
|
// render
|
||||||
frappe.listview_settings['Sales Invoice'] = {
|
frappe.listview_settings['Sales Invoice'] = {
|
||||||
add_fields: ["customer", "customer_name", "base_grand_total", "outstanding_amount", "due_date", "company",
|
add_fields: ["customer", "customer_name", "base_grand_total", "outstanding_amount", "due_date", "company",
|
||||||
"currency"],
|
"currency", "is_return"],
|
||||||
get_indicator: function(doc) {
|
get_indicator: function(doc) {
|
||||||
if(flt(doc.outstanding_amount)==0) {
|
if(cint(doc.is_return)==1) {
|
||||||
|
return [__("Return"), "darkgrey", "is_return,=,1"];
|
||||||
|
} else if(flt(doc.outstanding_amount)==0) {
|
||||||
return [__("Paid"), "green", "outstanding_amount,=,0"]
|
return [__("Paid"), "green", "outstanding_amount,=,0"]
|
||||||
} else if (flt(doc.outstanding_amount) > 0 && doc.due_date > frappe.datetime.get_today()) {
|
} else if (flt(doc.outstanding_amount) > 0 && doc.due_date > frappe.datetime.get_today()) {
|
||||||
return [__("Unpaid"), "orange", "outstanding_amount,>,0|due_date,>,Today"]
|
return [__("Unpaid"), "orange", "outstanding_amount,>,0|due_date,>,Today"]
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
frappe.listview_settings['Delivery Note'] = {
|
frappe.listview_settings['Delivery Note'] = {
|
||||||
add_fields: ["customer", "customer_name", "base_grand_total", "per_installed",
|
add_fields: ["customer", "customer_name", "base_grand_total", "per_installed",
|
||||||
"transporter_name", "grand_total"]
|
"transporter_name", "grand_total", "is_return"],
|
||||||
|
get_indicator: function(doc) {
|
||||||
|
if(cint(doc.is_return)==1) {
|
||||||
|
return [__("Return"), "darkgrey", "is_return,=,1"];
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
frappe.listview_settings['Purchase Receipt'] = {
|
frappe.listview_settings['Purchase Receipt'] = {
|
||||||
add_fields: ["supplier", "supplier_name", "base_grand_total", "is_subcontracted",
|
add_fields: ["supplier", "supplier_name", "base_grand_total", "is_subcontracted",
|
||||||
"transporter_name"]
|
"transporter_name", "is_return"],
|
||||||
|
get_indicator: function(doc) {
|
||||||
|
if(cint(doc.is_return)==1) {
|
||||||
|
return [__("Return"), "darkgrey", "is_return,=,1"];
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user