[minor] removed Link/DocType in Payment Period Based on Invoice Date
This commit is contained in:
parent
b7f2066250
commit
ba9dbb1b09
@ -10,7 +10,7 @@ from frappe.utils import flt
|
|||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters = {}
|
if not filters: filters = {}
|
||||||
validate_filters(filters)
|
validate_filters(filters)
|
||||||
|
|
||||||
columns = get_columns(filters)
|
columns = get_columns(filters)
|
||||||
entries = get_entries(filters)
|
entries = get_entries(filters)
|
||||||
invoice_posting_date_map = get_invoice_posting_date_map(filters)
|
invoice_posting_date_map = get_invoice_posting_date_map(filters)
|
||||||
@ -37,7 +37,7 @@ def execute(filters=None):
|
|||||||
data.append(row)
|
data.append(row)
|
||||||
|
|
||||||
return columns, data
|
return columns, data
|
||||||
|
|
||||||
def validate_filters(filters):
|
def validate_filters(filters):
|
||||||
if (filters.get("payment_type") == "Incoming" and filters.get("party_type") == "Supplier") or \
|
if (filters.get("payment_type") == "Incoming" and filters.get("party_type") == "Supplier") or \
|
||||||
(filters.get("payment_type") == "Outgoing" and filters.get("party_type") == "Customer"):
|
(filters.get("payment_type") == "Outgoing" and filters.get("party_type") == "Customer"):
|
||||||
@ -45,9 +45,9 @@ def validate_filters(filters):
|
|||||||
.format(filters.payment_type, filters.party_type))
|
.format(filters.payment_type, filters.party_type))
|
||||||
|
|
||||||
def get_columns(filters):
|
def get_columns(filters):
|
||||||
return [_("Journal Entry") + ":Link/Journal Entry:140",
|
return [_("Journal Entry") + ":Link/Journal Entry:140",
|
||||||
_("Party Type") + ":Link/DocType:100", _("Party") + ":Dynamic Link/Party Type:140",
|
_("Party Type") + "::100", _("Party") + ":Dynamic Link/Party Type:140",
|
||||||
_("Posting Date") + ":Date:100",
|
_("Posting Date") + ":Date:100",
|
||||||
_("Against Invoice") + (":Link/Purchase Invoice:130" if filters.get("payment_type") == "Outgoing" else ":Link/Sales Invoice:130"),
|
_("Against Invoice") + (":Link/Purchase Invoice:130" if filters.get("payment_type") == "Outgoing" else ":Link/Sales Invoice:130"),
|
||||||
_("Against Invoice Posting Date") + ":Date:130", _("Debit") + ":Currency:120", _("Credit") + ":Currency:120",
|
_("Against Invoice Posting Date") + ":Date:130", _("Debit") + ":Currency:120", _("Credit") + ":Currency:120",
|
||||||
_("Reference No") + "::100", _("Reference Date") + ":Date:100", _("Remarks") + "::150", _("Age") +":Int:40",
|
_("Reference No") + "::100", _("Reference Date") + ":Date:100", _("Remarks") + "::150", _("Age") +":Int:40",
|
||||||
@ -62,7 +62,7 @@ def get_conditions(filters):
|
|||||||
filters["party_type"] = "Supplier"
|
filters["party_type"] = "Supplier"
|
||||||
else:
|
else:
|
||||||
filters["party_type"] = "Customer"
|
filters["party_type"] = "Customer"
|
||||||
|
|
||||||
if filters.get("party_type"):
|
if filters.get("party_type"):
|
||||||
conditions.append("jvd.party_type=%(party_type)s")
|
conditions.append("jvd.party_type=%(party_type)s")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user