Skip to content

Commit

Permalink
fix: use text editor for gst breakup table instead of long text
Browse files Browse the repository at this point in the history
(cherry picked from commit 3f84397)
  • Loading branch information
vorasmit authored and mergify[bot] committed Mar 21, 2024
1 parent 04565ae commit 2b2be36
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions india_compliance/gst_india/constants/custom_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
{
"fieldname": "gst_breakup_table",
"label": "GST Breakup Table",
"fieldtype": "Long Text",
"fieldtype": "Text Editor",
"insert_after": "section_gst_breakup",
"is_virtual": 1,
"read_only": 1,
Expand Down Expand Up @@ -258,7 +258,7 @@
{
"fieldname": "gst_breakup_table",
"label": "GST Breakup Table",
"fieldtype": "Long Text",
"fieldtype": "Text Editor",
"insert_after": "section_gst_breakup",
"is_virtual": 1,
"read_only": 1,
Expand Down
6 changes: 5 additions & 1 deletion india_compliance/gst_india/overrides/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ def set_gst_breakup(doc, method=None, print_settings=None):
):
return

doc.gst_breakup_table = frappe.render_template(
gst_breakup_html = frappe.render_template(
"templates/gst_breakup.html", dict(doc=doc)
)
if not gst_breakup_html:
return

doc.gst_breakup_table = gst_breakup_html.replace("\n", "").replace(" ", "")


def update_taxable_values(doc, valid_accounts):
Expand Down
2 changes: 1 addition & 1 deletion india_compliance/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ execute:import frappe; frappe.delete_doc_if_exists("DocType", "GSTIN")

[post_model_sync]
india_compliance.patches.v14.set_default_for_overridden_accounts_setting
execute:from india_compliance.gst_india.setup import create_custom_fields; create_custom_fields() #45
execute:from india_compliance.gst_india.setup import create_custom_fields; create_custom_fields() #46
execute:from india_compliance.gst_india.setup import create_property_setters; create_property_setters() #7
execute:from india_compliance.income_tax_india.setup import create_custom_fields; create_custom_fields() #1
india_compliance.patches.post_install.remove_old_fields #1
Expand Down
2 changes: 1 addition & 1 deletion india_compliance/templates/gst_breakup.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{% else %}
<td class="text-right">
{% if value.tax_rate or not value.tax_amount %}
({{ value.tax_rate }}%)
({{ value.tax_rate }}%)&nbsp;
{% endif %}

{% if doc.get('is_return') %}
Expand Down

0 comments on commit 2b2be36

Please sign in to comment.