From a95bb27c65ad3c57b71ec4ea0b2ef9872e665be4 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Wed, 20 Mar 2024 16:09:14 +0530 Subject: [PATCH] fix: use Text Editor for rendering tax breakup table (cherry picked from commit 1c639838736dee633c435ec728e4b7319cbd9748) # Conflicts: # erpnext/buying/doctype/purchase_order/purchase_order.json # erpnext/buying/doctype/supplier_quotation/supplier_quotation.json --- erpnext/accounts/doctype/pos_invoice/pos_invoice.json | 4 ++-- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 2 +- .../accounts/doctype/purchase_invoice/purchase_invoice.json | 4 ++-- .../accounts/doctype/purchase_invoice/purchase_invoice.py | 2 +- erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 6 +++--- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- erpnext/buying/doctype/purchase_order/purchase_order.json | 6 +++++- erpnext/buying/doctype/purchase_order/purchase_order.py | 3 ++- .../doctype/supplier_quotation/supplier_quotation.json | 6 +++++- .../buying/doctype/supplier_quotation/supplier_quotation.py | 2 +- erpnext/selling/doctype/quotation/quotation.json | 4 ++-- erpnext/selling/doctype/quotation/quotation.py | 2 +- erpnext/selling/doctype/sales_order/sales_order.json | 4 ++-- erpnext/selling/doctype/sales_order/sales_order.py | 4 +++- erpnext/stock/doctype/delivery_note/delivery_note.json | 4 ++-- erpnext/stock/doctype/delivery_note/delivery_note.py | 4 ++-- .../stock/doctype/purchase_receipt/purchase_receipt.json | 4 ++-- erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | 2 +- 18 files changed, 38 insertions(+), 27 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json index 955b66a1b81..d7b173667ec 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json @@ -775,7 +775,7 @@ }, { "fieldname": "other_charges_calculation", - "fieldtype": "Long Text", + "fieldtype": "Text Editor", "label": "Taxes and Charges Calculation", "no_copy": 1, "oldfieldtype": "HTML", @@ -1563,7 +1563,7 @@ "icon": "fa fa-file-text", "is_submittable": 1, "links": [], - "modified": "2023-11-20 12:27:12.848149", + "modified": "2024-03-20 16:00:34.268756", "modified_by": "Administrator", "module": "Accounts", "name": "POS Invoice", diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 9b0b3ecfab7..eb96cd12094 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -109,7 +109,7 @@ class POSInvoice(SalesInvoice): loyalty_redemption_cost_center: DF.Link | None naming_series: DF.Literal["ACC-PSINV-.YYYY.-"] net_total: DF.Currency - other_charges_calculation: DF.LongText | None + other_charges_calculation: DF.TextEditor | None outstanding_amount: DF.Currency packed_items: DF.Table[PackedItem] paid_amount: DF.Currency diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index d6e606f73b5..9e8bf78a2f1 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -760,7 +760,7 @@ }, { "fieldname": "other_charges_calculation", - "fieldtype": "Long Text", + "fieldtype": "Text Editor", "label": "Taxes and Charges Calculation", "no_copy": 1, "oldfieldtype": "HTML", @@ -1637,7 +1637,7 @@ "idx": 204, "is_submittable": 1, "links": [], - "modified": "2024-03-11 14:46:30.298184", + "modified": "2024-03-20 15:57:00.736868", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index ee3ec82ea89..2072217247d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -147,7 +147,7 @@ class PurchaseInvoice(BuyingController): net_total: DF.Currency on_hold: DF.Check only_include_allocated_payments: DF.Check - other_charges_calculation: DF.LongText | None + other_charges_calculation: DF.TextEditor | None outstanding_amount: DF.Currency paid_amount: DF.Currency party_account_currency: DF.Link | None diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 4f6e5ba9206..2792c18b862 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -944,7 +944,7 @@ }, { "fieldname": "other_charges_calculation", - "fieldtype": "Long Text", + "fieldtype": "Text Editor", "hide_days": 1, "hide_seconds": 1, "label": "Taxes and Charges Calculation", @@ -2184,7 +2184,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2024-03-15 16:44:17.778370", + "modified": "2024-03-20 16:02:52.237732", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", @@ -2239,4 +2239,4 @@ "title_field": "title", "track_changes": 1, "track_seen": 1 -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 02a61d1cd9c..e04685e43da 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -146,7 +146,7 @@ class SalesInvoice(SellingController): naming_series: DF.Literal["ACC-SINV-.YYYY.-", "ACC-SINV-RET-.YYYY.-"] net_total: DF.Currency only_include_allocated_payments: DF.Check - other_charges_calculation: DF.LongText | None + other_charges_calculation: DF.TextEditor | None outstanding_amount: DF.Currency packed_items: DF.Table[PackedItem] paid_amount: DF.Currency diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index f74df6630e9..b57a887d900 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -641,7 +641,7 @@ }, { "fieldname": "other_charges_calculation", - "fieldtype": "Long Text", + "fieldtype": "Text Editor", "label": "Taxes and Charges Calculation", "no_copy": 1, "oldfieldtype": "HTML", @@ -1275,7 +1275,11 @@ "idx": 105, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-10-01 20:58:07.851037", +======= + "modified": "2024-03-20 16:03:31.611808", +>>>>>>> 1c63983873 (fix: use Text Editor for rendering tax breakup table) "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order", diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 9ca20a9ba2f..09ff381feff 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -57,6 +57,7 @@ class PurchaseOrder(BuyingController): additional_discount_percentage: DF.Float address_display: DF.SmallText | None advance_paid: DF.Currency + advance_payment_status: DF.Literal["Not Initiated", "Initiated", "Partially Paid", "Fully Paid"] amended_from: DF.Link | None apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] apply_tds: DF.Check @@ -109,7 +110,7 @@ class PurchaseOrder(BuyingController): net_total: DF.Currency order_confirmation_date: DF.Date | None order_confirmation_no: DF.Data | None - other_charges_calculation: DF.LongText | None + other_charges_calculation: DF.TextEditor | None party_account_currency: DF.Link | None payment_schedule: DF.Table[PaymentSchedule] payment_terms_template: DF.Link | None diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json index d3c80cc49e7..2d2633feff5 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json @@ -462,7 +462,7 @@ }, { "fieldname": "other_charges_calculation", - "fieldtype": "Long Text", + "fieldtype": "Markdown Editor", "label": "Taxes and Charges Calculation", "no_copy": 1, "oldfieldtype": "HTML", @@ -928,7 +928,11 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-11-20 11:15:30.083077", +======= + "modified": "2024-03-20 16:03:59.069145", +>>>>>>> 1c63983873 (fix: use Text Editor for rendering tax breakup table) "modified_by": "Administrator", "module": "Buying", "name": "Supplier Quotation", diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py index e2b737ba6fe..b716f7f0427 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py @@ -71,7 +71,7 @@ class SupplierQuotation(BuyingController): naming_series: DF.Literal["PUR-SQTN-.YYYY.-"] net_total: DF.Currency opportunity: DF.Link | None - other_charges_calculation: DF.LongText | None + other_charges_calculation: DF.MarkdownEditor | None plc_conversion_rate: DF.Float price_list_currency: DF.Link | None pricing_rules: DF.Table[PricingRuleDetail] diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 8c816cf6e4e..982e7326775 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -557,7 +557,7 @@ }, { "fieldname": "other_charges_calculation", - "fieldtype": "Long Text", + "fieldtype": "Text Editor", "label": "Taxes and Charges Calculation", "no_copy": 1, "oldfieldtype": "HTML", @@ -1073,7 +1073,7 @@ "idx": 82, "is_submittable": 1, "links": [], - "modified": "2023-06-03 16:21:04.980033", + "modified": "2024-03-20 16:04:21.567847", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 5541cc711e7..4835c0c27d3 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -78,7 +78,7 @@ class Quotation(SellingController): opportunity: DF.Link | None order_lost_reason: DF.SmallText | None order_type: DF.Literal["", "Sales", "Maintenance", "Shopping Cart"] - other_charges_calculation: DF.LongText | None + other_charges_calculation: DF.TextEditor | None packed_items: DF.Table[PackedItem] party_name: DF.DynamicLink | None payment_schedule: DF.Table[PaymentSchedule] diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 01d047ceadb..1c144749074 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -776,7 +776,7 @@ }, { "fieldname": "other_charges_calculation", - "fieldtype": "Long Text", + "fieldtype": "Text Editor", "hide_days": 1, "hide_seconds": 1, "label": "Taxes and Charges Calculation", @@ -1644,7 +1644,7 @@ "idx": 105, "is_submittable": 1, "links": [], - "modified": "2023-10-18 12:41:54.813462", + "modified": "2024-03-20 16:04:43.627183", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index aafacdfa907..3c7215cae30 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -66,6 +66,7 @@ class SalesOrder(SellingController): additional_discount_percentage: DF.Float address_display: DF.SmallText | None advance_paid: DF.Currency + advance_payment_status: DF.Literal["Not Requested", "Requested", "Partially Paid", "Fully Paid"] amended_from: DF.Link | None amount_eligible_for_commission: DF.Currency apply_discount_on: DF.Literal["", "Grand Total", "Net Total"] @@ -122,7 +123,7 @@ class SalesOrder(SellingController): naming_series: DF.Literal["SAL-ORD-.YYYY.-"] net_total: DF.Currency order_type: DF.Literal["", "Sales", "Maintenance", "Shopping Cart"] - other_charges_calculation: DF.LongText | None + other_charges_calculation: DF.TextEditor | None packed_items: DF.Table[PackedItem] party_account_currency: DF.Link | None payment_schedule: DF.Table[PaymentSchedule] @@ -155,6 +156,7 @@ class SalesOrder(SellingController): "", "Draft", "On Hold", + "To Pay", "To Deliver and Bill", "To Bill", "To Deliver", diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index d07a825331d..87c333370b2 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -680,7 +680,7 @@ }, { "fieldname": "other_charges_calculation", - "fieldtype": "Long Text", + "fieldtype": "Text Editor", "label": "Taxes and Charges Calculation", "no_copy": 1, "oldfieldtype": "HTML", @@ -1397,7 +1397,7 @@ "idx": 146, "is_submittable": 1, "links": [], - "modified": "2024-03-05 11:58:47.784349", + "modified": "2024-03-20 16:05:02.854990", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 4c2c023b6ae..fb19d0ec20b 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -76,7 +76,7 @@ class DeliveryNote(SellingController): ignore_pricing_rule: DF.Check in_words: DF.Data | None incoterm: DF.Link | None - installation_status: DF.Literal + installation_status: DF.Literal[None] instructions: DF.Text | None inter_company_reference: DF.Link | None is_internal_customer: DF.Check @@ -90,7 +90,7 @@ class DeliveryNote(SellingController): named_place: DF.Data | None naming_series: DF.Literal["MAT-DN-.YYYY.-", "MAT-DN-RET-.YYYY.-"] net_total: DF.Currency - other_charges_calculation: DF.LongText | None + other_charges_calculation: DF.TextEditor | None packed_items: DF.Table[PackedItem] per_billed: DF.Percent per_installed: DF.Percent diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index a1810221219..b926e9826eb 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -651,7 +651,7 @@ }, { "fieldname": "other_charges_calculation", - "fieldtype": "Long Text", + "fieldtype": "Text Editor", "label": "Taxes and Charges Calculation", "no_copy": 1, "oldfieldtype": "HTML", @@ -1252,7 +1252,7 @@ "idx": 261, "is_submittable": 1, "links": [], - "modified": "2023-12-18 17:26:41.279663", + "modified": "2024-03-20 16:05:31.713453", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt", diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index e249cf386fa..ed43d553713 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -86,7 +86,7 @@ class PurchaseReceipt(BuyingController): named_place: DF.Data | None naming_series: DF.Literal["MAT-PRE-.YYYY.-", "MAT-PR-RET-.YYYY.-"] net_total: DF.Currency - other_charges_calculation: DF.LongText | None + other_charges_calculation: DF.TextEditor | None per_billed: DF.Percent per_returned: DF.Percent plc_conversion_rate: DF.Float