chore: change column order

(cherry picked from commit 7ecc0d5a04b6c8cd8b97256d8c0e4bdb12494d5d)
This commit is contained in:
Gursheen Anand 2023-10-19 16:44:08 +05:30 committed by Mergify
parent 7abe5d9905
commit aa19055899

View File

@ -158,14 +158,14 @@ def get_gle_map(documents):
def get_columns(filters): def get_columns(filters):
pan = "pan" if frappe.db.has_column(filters.party_type, "pan") else "tax_id" pan = "pan" if frappe.db.has_column(filters.party_type, "pan") else "tax_id"
columns = [ columns = [
{"label": _(frappe.unscrub(pan)), "fieldname": pan, "fieldtype": "Data", "width": 60},
{ {
"label": _(filters.get("party_type")), "label": _("Section Code"),
"fieldname": "party", "options": "Tax Withholding Category",
"fieldtype": "Dynamic Link", "fieldname": "section_code",
"options": "party_type", "fieldtype": "Link",
"width": 180, "width": 90,
}, },
{"label": _(frappe.unscrub(pan)), "fieldname": pan, "fieldtype": "Data", "width": 60},
] ]
if filters.naming_series == "Naming Series": if filters.naming_series == "Naming Series":
@ -180,51 +180,38 @@ def get_columns(filters):
columns.extend( columns.extend(
[ [
{
"label": _("Date of Transaction"),
"fieldname": "transaction_date",
"fieldtype": "Date",
"width": 100,
},
{
"label": _("Section Code"),
"options": "Tax Withholding Category",
"fieldname": "section_code",
"fieldtype": "Link",
"width": 90,
},
{"label": _("Entity Type"), "fieldname": "entity_type", "fieldtype": "Data", "width": 100}, {"label": _("Entity Type"), "fieldname": "entity_type", "fieldtype": "Data", "width": 100},
{
"label": _("Total Amount"),
"fieldname": "total_amount",
"fieldtype": "Float",
"width": 90,
},
{ {
"label": _("TDS Rate %") if filters.get("party_type") == "Supplier" else _("TCS Rate %"), "label": _("TDS Rate %") if filters.get("party_type") == "Supplier" else _("TCS Rate %"),
"fieldname": "rate", "fieldname": "rate",
"fieldtype": "Percent", "fieldtype": "Percent",
"width": 90, "width": 60,
}, },
{ {
"label": _("Tax Amount"), "label": _("Total Amount"),
"fieldname": "tax_amount", "fieldname": "total_amount",
"fieldtype": "Float", "fieldtype": "Float",
"width": 90, "width": 120,
},
{
"label": _("Grand Total"),
"fieldname": "grand_total",
"fieldtype": "Float",
"width": 90,
}, },
{ {
"label": _("Base Total"), "label": _("Base Total"),
"fieldname": "base_total", "fieldname": "base_total",
"fieldtype": "Float", "fieldtype": "Float",
"width": 90, "width": 120,
}, },
{"label": _("Transaction Type"), "fieldname": "transaction_type", "width": 100}, {
"label": _("Tax Amount"),
"fieldname": "tax_amount",
"fieldtype": "Float",
"width": 120,
},
{
"label": _("Grand Total"),
"fieldname": "grand_total",
"fieldtype": "Float",
"width": 120,
},
{"label": _("Transaction Type"), "fieldname": "transaction_type", "width": 130},
{ {
"label": _("Reference No."), "label": _("Reference No."),
"fieldname": "ref_no", "fieldname": "ref_no",
@ -232,6 +219,12 @@ def get_columns(filters):
"options": "transaction_type", "options": "transaction_type",
"width": 180, "width": 180,
}, },
{
"label": _("Date of Transaction"),
"fieldname": "transaction_date",
"fieldtype": "Date",
"width": 100,
},
] ]
) )