diff --git a/custom_ui/api/db/estimates.py b/custom_ui/api/db/estimates.py index 80ed718..19e4815 100644 --- a/custom_ui/api/db/estimates.py +++ b/custom_ui/api/db/estimates.py @@ -534,7 +534,7 @@ def upsert_estimate(data): # ClientService.append_link(data.get("customer"), "quotations", "quotation", new_estimate.name) print("DEBUG: New estimate created with name:", new_estimate.name) dict = new_estimate.as_dict() - dict["items"] = [ItemService.get_full_dict(item.item_code) for item in new_estimate.items] + dict["items"] = [{**ItemService.get_full_dict(item.item_code), **item} for item in new_estimate.items] return build_success_response(dict) except Exception as e: print(f"DEBUG: Error in upsert_estimate: {str(e)}") diff --git a/custom_ui/api/db/invoices.py b/custom_ui/api/db/invoices.py index b024808..d073aea 100644 --- a/custom_ui/api/db/invoices.py +++ b/custom_ui/api/db/invoices.py @@ -1,6 +1,7 @@ import frappe, json from custom_ui.db_utils import process_query_conditions, build_datatable_dict, get_count_or_filters, build_success_response, build_error_response from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice +from custom_ui.services import SalesOrderService, EmailService # =============================================================================== # INVOICES API METHODS @@ -10,15 +11,40 @@ from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice @frappe.whitelist() def create_invoice_for_job(job_name): """Create the invoice from a sales order of a job.""" + print("DEBUG: create_invoice_for_job called with job_name:", job_name) try: - project = frappe.get_doc("Project", job_name) - sales_order = project.sales_order - invoice = make_sales_invoice(sales_order) - invoice.save() + sales_order = frappe.get_value("Project", job_name, "sales_order") + if not sales_order: + return build_error_response("No sales order found for this job.", 404) + invoice = SalesOrderService.create_sales_invoice_from_sales_order(sales_order) return build_success_response(invoice.as_dict()) except Exception as e: return build_error_response(str(e), 500) +@frappe.whitelist() +def submit_and_send_invoice(invoice_name): + """Submit the invoice and send email to customer.""" + print("DEBUG: submit_and_send_invoice called with invoice_name:", invoice_name) + try: + invoice_doc = frappe.get_doc("Sales Invoice", invoice_name) + if invoice_doc.docstatus == 0: + print("DEBUG: Submitting invoice:", invoice_name) + invoice_doc.submit() + else: + print("DEBUG: Invoice already submitted:", invoice_name) + # Send invoice email to customer + try: + print("DEBUG: Preparing to send invoice email for", invoice_name) + EmailService.send_invoice_email(invoice_name) + print("DEBUG: Invoice email sent successfully for", invoice_name) + frappe.set_value("Project", invoice_doc.project, "invoice_status", "Invoice Sent") + except Exception as e: + print(f"ERROR: Failed to send invoice email: {str(e)}") + # Don't raise the exception - we don't want to block the invoice submission + frappe.log_error(f"Failed to send invoice email for {invoice_name}: {str(e)}", "Invoice Email Error") + return build_success_response(invoice_doc.as_dict()) + except Exception as e: + return build_error_response(str(e), 500) @frappe.whitelist() def get_invoices_late_count(): diff --git a/custom_ui/api/public/payments.py b/custom_ui/api/public/payments.py index 19f796e..2f1e7b8 100644 --- a/custom_ui/api/public/payments.py +++ b/custom_ui/api/public/payments.py @@ -4,6 +4,7 @@ from datetime import datetime from frappe.utils.data import flt from custom_ui.services import DbService, StripeService, PaymentService from custom_ui.models import PaymentData +from werkzeug.wrappers import Response @frappe.whitelist(allow_guest=True) def half_down_stripe_payment(sales_order): @@ -36,7 +37,11 @@ def invoice_stripe_payment(sales_invoice): if si.docstatus != 1: frappe.throw("Sales Invoice must be submitted to proceed with payment.") if si.outstanding_amount <= 0: - frappe.throw("This invoice has already been paid.") + html = frappe.render_template("custom_ui/templates/invoices/already_paid.html", { + "invoice_number": si.name, + "company": frappe.get_doc("Company", si.company) + }) + return Response(html, content_type='text/html') stripe_session = StripeService.create_checkout_session( company=si.company, amount=si.outstanding_amount, diff --git a/custom_ui/events/estimate.py b/custom_ui/events/estimate.py index ab5e78d..951ba4c 100644 --- a/custom_ui/events/estimate.py +++ b/custom_ui/events/estimate.py @@ -75,9 +75,9 @@ def on_update_after_submit(doc, method): new_sales_order.customer_address = doc.customer_address # new_sales_order.custom_installation_address = doc.custom_installation_address new_sales_order.custom_job_address = doc.custom_job_address - new_sales_order.payment_schedule = [] + new_sales_order.set("payment_schedule", []) print("DEBUG: Setting payment schedule for Sales Order") - new_sales_order.set_payment_schedule() + # new_sales_order.set_payment_schedule() print("DEBUG: Inserting Sales Order:", new_sales_order.as_dict()) new_sales_order.delivery_date = new_sales_order.transaction_date # backup = new_sales_order.customer_address diff --git a/custom_ui/events/jobs.py b/custom_ui/events/jobs.py index b083756..2a15e60 100644 --- a/custom_ui/events/jobs.py +++ b/custom_ui/events/jobs.py @@ -31,6 +31,8 @@ def after_insert(doc, method): "project_template": doc.project_template }) doc.service_appointment = service_apt.name + if doc.requires_half_payment: + service_apt.ready_to_schedule = 0 doc.save(ignore_permissions=True) print("DEBUG: Created Service Appointment:", service_apt.name) except Exception as e: @@ -63,6 +65,9 @@ def before_insert(doc, method): def before_save(doc, method): print("DEBUG: Before Save Triggered for Project:", doc.name) print("DEBUG: Checking status: ", doc.status) + if doc.percent_complete == 100.0 and doc.invoice_status == "Not Ready": + print("DEBUG: Project is 100% complete and invoice status is Not Ready, setting invoice status to Ready to Invoice") + doc.invoice_status = "Ready to Invoice" if doc.expected_start_date and doc.expected_end_date: print("DEBUG: Project has expected start and end dates, marking as scheduled") doc.is_scheduled = 1 @@ -82,11 +87,18 @@ def before_save(doc, method): def after_save(doc, method): print("DEBUG: After Save Triggered for Project:", doc.name) - if doc.status == "Completed": - print("DEBUG: Project marked as Completed. Generating and sending final invoice.") - sales_order_status = frappe.get_value("Sales Order", doc.sales_order, "billing_status") - if sales_order_status == "Not Billed": - SalesOrderService.create_sales_invoice_from_sales_order(doc.sales_order) + if doc.ready_to_schedule and doc.service_appointment: + service_apt_ready_to_schedule = frappe.get_value("Service Address 2", doc.service_appointment, "ready_to_schedule") + if not service_apt_ready_to_schedule: + print("DEBUG: Project is ready to schedule, setting Service Appointment to ready to schedule.") + service_apt_doc = frappe.get_doc("Service Address 2", doc.service_appointment) + service_apt_doc.ready_to_schedule = 1 + service_apt_doc.save(ignore_permissions=True) + # if doc.status == "Completed": + + # sales_order_status = frappe.get_value("Sales Order", doc.sales_order, "billing_status") + # if sales_order_status == "Not Billed": + # SalesOrderService.create_sales_invoice_from_sales_order(doc.sales_order) if doc.ready_to_schedule: service_apt_ready_to_schedule = frappe.get_value("Service Address 2", doc.service_appointment, "ready_to_schedule") if not service_apt_ready_to_schedule: diff --git a/custom_ui/events/sales_invoice.py b/custom_ui/events/sales_invoice.py index 9e70a9b..56943a9 100644 --- a/custom_ui/events/sales_invoice.py +++ b/custom_ui/events/sales_invoice.py @@ -1,22 +1,23 @@ import frappe -from custom_ui.services.email_service import EmailService +from custom_ui.services import ProjectService def on_submit(doc, method): print("DEBUG: On Submit Triggered for Sales Invoice:", doc.name) - # Send invoice email to customer - try: - print("DEBUG: Preparing to send invoice email for", doc.name) - EmailService.send_invoice_email(doc.name) - print("DEBUG: Invoice email sent successfully for", doc.name) - frappe.set_value("Project", doc.project, "invoice_status", "Invoice Sent") - except Exception as e: - print(f"ERROR: Failed to send invoice email: {str(e)}") - # Don't raise the exception - we don't want to block the invoice submission - frappe.log_error(f"Failed to send invoice email for {doc.name}: {str(e)}", "Invoice Email Error") + # # Send invoice email to customer + # try: + # print("DEBUG: Preparing to send invoice email for", doc.name) + # EmailService.send_invoice_email(doc.name) + # print("DEBUG: Invoice email sent successfully for", doc.name) + # frappe.set_value("Project", doc.project, "invoice_status", "Invoice Sent") + # except Exception as e: + # print(f"ERROR: Failed to send invoice email: {str(e)}") + # # Don't raise the exception - we don't want to block the invoice submission + # frappe.log_error(f"Failed to send invoice email for {doc.name}: {str(e)}", "Invoice Email Error") def after_insert(doc, method): print("DEBUG: After Insert Triggered for Sales Invoice:", doc.name) # Additional logic can be added here if needed after invoice creation frappe.set_value("Project", doc.project, "invoice_status", "Invoice Created") + \ No newline at end of file diff --git a/custom_ui/events/sales_order.py b/custom_ui/events/sales_order.py index b638135..7041e8c 100644 --- a/custom_ui/events/sales_order.py +++ b/custom_ui/events/sales_order.py @@ -1,5 +1,5 @@ import frappe -from custom_ui.services import DbService, AddressService, ClientService +from custom_ui.services import DbService, AddressService, ClientService, EmailService def before_save(doc, method): @@ -76,7 +76,6 @@ def after_insert(doc, method): if doc.requires_half_payment: try: print("DEBUG: Sales Order requires half payment, preparing to send down payment email") - from custom_ui.services.email_service import EmailService # Use EmailService to send the down payment email EmailService.send_downpayment_email(doc.name) diff --git a/custom_ui/events/task.py b/custom_ui/events/task.py index 616fb97..bec89f9 100644 --- a/custom_ui/events/task.py +++ b/custom_ui/events/task.py @@ -4,6 +4,10 @@ from custom_ui.services import AddressService, ClientService, TaskService def before_insert(doc, method): """Set values before inserting a Task.""" print("DEBUG: Before Insert Triggered for Task") + if doc.type: + task_type_weight = frappe.get_value("Task Type", doc.type, "weight") or 0 + print(f"DEBUG: Setting Task weight to {task_type_weight} based on Task Type {doc.type}") + doc.task_weight = task_type_weight if doc.status == "Template": print("DEBUG: Task is a Template, skipping project linking") return @@ -52,11 +56,13 @@ def after_save(doc, method): if doc.project and doc.status == "Completed": print("DEBUG: Task is completed, checking if project has calculated 100% Progress.") project_doc = frappe.get_doc("Project", doc.project) - if project_doc.percent_complete == 100: + print("DEBUG: Current Project percent_complete:", project_doc.percent_complete) + if project_doc.percent_complete == 100.0: + print("DEBUG: Project percent_complete is 100%, checking if we need to update project status or invoice status.") project_update_required = False - if project_doc.status == "Completed" and project_doc.customCompletionDate is None: + if project_doc.status == "Completed" and project_doc.custom_completion_date is None: print("DEBUG: Project is marked as Completed but customCompletionDate is not set, updating customCompletionDate.") - project_doc.customCompletionDate = frappe.utils.nowdate() + project_doc.custom_completion_date = frappe.utils.nowdate() project_update_required = True if project_doc.invoice_status == "Not Ready": project_doc.invoice_status = "Ready to Invoice" diff --git a/custom_ui/fixtures/custom_field.json b/custom_ui/fixtures/custom_field.json index cce5c79..ec54fe9 100644 --- a/custom_ui/fixtures/custom_field.json +++ b/custom_ui/fixtures/custom_field.json @@ -2963,120 +2963,6 @@ "unique": 0, "width": null }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "On-Site Meeting", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "party_type", - "fieldtype": "Select", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "company", - "is_system_generated": 1, - "is_virtual": 0, - "label": "Party Type", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2026-01-13 03:06:47.189806", - "module": null, - "name": "On-Site Meeting-party_type", - "no_copy": 0, - "non_negative": 0, - "options": "Customer\nLead", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Customer", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "from_lead", - "fieldtype": "Link", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "customer_name", - "is_system_generated": 1, - "is_virtual": 0, - "label": "From Lead", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2026-01-13 04:14:35.978839", - "module": null, - "name": "Customer-from_lead", - "no_copy": 0, - "non_negative": 0, - "options": "Lead", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -3419,6 +3305,120 @@ "unique": 0, "width": null }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "On-Site Meeting", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "party_type", + "fieldtype": "Select", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "company", + "is_system_generated": 1, + "is_virtual": 0, + "label": "Party Type", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2026-01-13 03:06:47.189806", + "module": null, + "name": "On-Site Meeting-party_type", + "no_copy": 0, + "non_negative": 0, + "options": "Customer\nLead", + "permlevel": 0, + "placeholder": null, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Customer", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "from_lead", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "customer_name", + "is_system_generated": 1, + "is_virtual": 0, + "label": "From Lead", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2026-02-13 03:39:42.161305", + "module": null, + "name": "Customer-from_lead", + "no_copy": 0, + "non_negative": 0, + "options": "Lead", + "permlevel": 0, + "placeholder": null, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -8070,7 +8070,7 @@ "length": 0, "link_filters": null, "mandatory_depends_on": null, - "modified": "2026-02-12 02:52:42.307849", + "modified": "2026-02-12 04:10:06.712703", "module": null, "name": "Project-requires_half_payment", "no_copy": 0, @@ -8469,7 +8469,7 @@ "length": 0, "link_filters": null, "mandatory_depends_on": null, - "modified": "2026-02-12 02:52:42.394762", + "modified": "2026-02-12 04:10:06.808397", "module": null, "name": "Project-is_half_down_paid", "no_copy": 0, @@ -8754,7 +8754,7 @@ "length": 0, "link_filters": null, "mandatory_depends_on": null, - "modified": "2026-02-12 02:52:42.235665", + "modified": "2026-02-12 04:10:06.643135", "module": null, "name": "Project-is_scheduled", "no_copy": 0, @@ -10179,7 +10179,7 @@ "length": 0, "link_filters": null, "mandatory_depends_on": null, - "modified": "2026-02-12 02:52:41.808876", + "modified": "2026-02-12 04:10:06.196780", "module": null, "name": "Address-latitude", "no_copy": 0, @@ -10293,7 +10293,7 @@ "length": 0, "link_filters": null, "mandatory_depends_on": null, - "modified": "2026-02-12 02:52:41.924704", + "modified": "2026-02-12 04:10:06.320979", "module": null, "name": "Address-longitude", "no_copy": 0, @@ -13858,15 +13858,15 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "accept_payment", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "Web Form", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "payment_button_help", - "fieldtype": "Text", + "fieldname": "payments_cb", + "fieldtype": "Column Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -13877,16 +13877,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "payment_button_label", + "insert_after": "payment_button_help", "is_system_generated": 1, "is_virtual": 0, - "label": "Button Help", + "label": null, "length": 0, "link_filters": null, "mandatory_depends_on": null, - "modified": "2026-01-27 11:11:05.256345", + "modified": "2026-01-27 11:11:05.288776", "module": null, - "name": "Web Form-payment_button_help", + "name": "Web Form-payments_cb", "no_copy": 0, "non_negative": 0, "options": null, @@ -13907,63 +13907,6 @@ "unique": 0, "width": null }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": "accept_payment", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Web Form", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "currency", - "fieldtype": "Link", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "amount", - "is_system_generated": 1, - "is_virtual": 0, - "label": "Currency", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2026-01-27 11:11:05.420470", - "module": null, - "name": "Web Form-currency", - "no_copy": 0, - "non_negative": 0, - "options": "Currency", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -14021,120 +13964,6 @@ "unique": 0, "width": null }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": "0", - "depends_on": "accept_payment", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Web Form", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "amount_based_on_field", - "fieldtype": "Check", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "payments_cb", - "is_system_generated": 1, - "is_virtual": 0, - "label": "Amount Based On Field", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2026-01-27 11:11:05.321231", - "module": null, - "name": "Web Form-amount_based_on_field", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, - { - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Sales Order", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "exempt_from_sales_tax", - "fieldtype": "Check", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "insert_after": "taxes_and_charges", - "is_system_generated": 1, - "is_virtual": 0, - "label": "Is customer exempted from sales tax?", - "length": 0, - "link_filters": null, - "mandatory_depends_on": null, - "modified": "2024-04-03 13:53:07.674608", - "module": null, - "name": "Sales Order-exempt_from_sales_tax", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "show_dashboard": 0, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -14249,6 +14078,120 @@ "unique": 0, "width": null }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": "accept_payment", + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Web Form", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "currency", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "amount", + "is_system_generated": 1, + "is_virtual": 0, + "label": "Currency", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2026-01-27 11:11:05.420470", + "module": null, + "name": "Web Form-currency", + "no_copy": 0, + "non_negative": 0, + "options": "Currency", + "permlevel": 0, + "placeholder": null, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Sales Order", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "exempt_from_sales_tax", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "taxes_and_charges", + "is_system_generated": 1, + "is_virtual": 0, + "label": "Is customer exempted from sales tax?", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2024-04-03 13:53:07.674608", + "module": null, + "name": "Sales Order-exempt_from_sales_tax", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "placeholder": null, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -14306,6 +14249,63 @@ "unique": 0, "width": null }, + { + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": "0", + "depends_on": "accept_payment", + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Web Form", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "amount_based_on_field", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "payments_cb", + "is_system_generated": 1, + "is_virtual": 0, + "label": "Amount Based On Field", + "length": 0, + "link_filters": null, + "mandatory_depends_on": null, + "modified": "2026-01-27 11:11:05.321231", + "module": null, + "name": "Web Form-amount_based_on_field", + "no_copy": 0, + "non_negative": 0, + "options": null, + "permlevel": 0, + "placeholder": null, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 0, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "show_dashboard": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -14371,15 +14371,15 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": null, + "depends_on": "accept_payment", "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "Web Form", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "payments_cb", - "fieldtype": "Column Break", + "fieldname": "payment_button_help", + "fieldtype": "Text", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -14390,16 +14390,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "payment_button_help", + "insert_after": "payment_button_label", "is_system_generated": 1, "is_virtual": 0, - "label": null, + "label": "Button Help", "length": 0, "link_filters": null, "mandatory_depends_on": null, - "modified": "2026-01-27 11:11:05.288776", + "modified": "2026-01-27 11:11:05.256345", "module": null, - "name": "Web Form-payments_cb", + "name": "Web Form-payment_button_help", "no_copy": 0, "non_negative": 0, "options": null, diff --git a/custom_ui/fixtures/doctype.json b/custom_ui/fixtures/doctype.json index aebc0ca..cd8fc5c 100644 --- a/custom_ui/fixtures/doctype.json +++ b/custom_ui/fixtures/doctype.json @@ -1408,8 +1408,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:18.613369", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:40.880819", "module": "CRM", "name": "Properties", "naming_rule": "By fieldname", @@ -3186,8 +3186,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:18.718386", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:40.994568", "module": "CRM", "name": "SNW Jobs", "naming_rule": "Autoincrement", @@ -4109,8 +4109,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:18.804335", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.086711", "module": "Projects", "name": "Work Schedule", "naming_rule": "", @@ -9151,8 +9151,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:18.943495", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.230857", "module": "CRM", "name": "Follow Up Checklist", "naming_rule": "By fieldname", @@ -9457,8 +9457,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.004922", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.298365", "module": "CRM", "name": "Follow Check List Fields", "naming_rule": "By fieldname", @@ -10147,8 +10147,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.087770", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.385633", "module": "Brotherton SOP", "name": "SOP-Documentation", "naming_rule": "Set by user", @@ -10348,8 +10348,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.140222", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.440504", "module": "Desk", "name": "SOP Notes", "naming_rule": "", @@ -10694,8 +10694,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.200540", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.504306", "module": "Desk", "name": "Tutorials", "naming_rule": "By fieldname", @@ -11064,8 +11064,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.260557", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.569088", "module": "Desk", "name": "Brotherton Meetings Scheduler", "naming_rule": "", @@ -11242,8 +11242,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.310423", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.624817", "module": "Desk", "name": "Meeting Participants", "naming_rule": "", @@ -11588,8 +11588,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.378544", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.701733", "module": "Desk", "name": "Add-On Job Detail", "naming_rule": "By fieldname", @@ -11870,8 +11870,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.432142", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.757391", "module": "Desk", "name": "Crew Schedule Detail", "naming_rule": "", @@ -12152,8 +12152,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.492087", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.821553", "module": "Setup", "name": "City", "naming_rule": "By fieldname", @@ -14738,8 +14738,8 @@ "make_attachments_public": 1, "max_attachments": 5, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.619986", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:41.955003", "module": "Projects", "name": "Fencing Job Queue", "naming_rule": "Set by user", @@ -15630,8 +15630,8 @@ "make_attachments_public": 1, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.691090", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.025876", "module": "Setup", "name": "Irrigation District", "naming_rule": "By fieldname", @@ -15808,8 +15808,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.743828", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.079636", "module": "Setup", "name": "Linked Companies", "naming_rule": "", @@ -16154,8 +16154,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.798126", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.144742", "module": "Contacts", "name": "Address Contact Role", "naming_rule": "", @@ -17312,6 +17312,70 @@ "unique": 0, "width": null }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "documentation_url": null, + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "is_virtual": 0, + "label": "Amended From", + "length": 0, + "link_filters": null, + "make_attachment_public": 0, + "mandatory_depends_on": null, + "max_height": null, + "no_copy": 1, + "non_negative": 0, + "oldfieldname": null, + "oldfieldtype": null, + "options": "Backflow Test Form", + "parent": "Backflow Test Form", + "parentfield": "fields", + "parenttype": "DocType", + "permlevel": 0, + "placeholder": null, + "precision": null, + "print_hide": 1, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "show_dashboard": 0, + "show_on_timeline": 0, + "show_preview_popup": 0, + "sort_options": 0, + "translatable": 0, + "trigger": null, + "unique": 0, + "width": null + }, { "allow_bulk_edit": 0, "allow_in_quick_entry": 0, @@ -17396,8 +17460,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.874877", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.226325", "module": "Selling", "name": "Backflow Test Form", "naming_rule": "", @@ -18086,8 +18150,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:19.958038", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.311359", "module": "Selling", "name": "Pre-Built Routes", "naming_rule": "By \"Naming Series\" field", @@ -18607,8 +18671,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.014861", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.372256", "module": "Contacts", "name": "Assigned Address", "naming_rule": "By fieldname", @@ -20085,6 +20149,70 @@ "unique": 0, "width": null }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "documentation_url": null, + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "is_virtual": 0, + "label": "Amended From", + "length": 0, + "link_filters": null, + "make_attachment_public": 0, + "mandatory_depends_on": null, + "max_height": null, + "no_copy": 1, + "non_negative": 0, + "oldfieldname": null, + "oldfieldtype": null, + "options": "Locate Log", + "parent": "Locate Log", + "parentfield": "fields", + "parenttype": "DocType", + "permlevel": 0, + "placeholder": null, + "precision": null, + "print_hide": 1, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "show_dashboard": 0, + "show_on_timeline": 0, + "show_preview_popup": 0, + "sort_options": 0, + "translatable": 0, + "trigger": null, + "unique": 0, + "width": null + }, { "allow_bulk_edit": 0, "allow_in_quick_entry": 0, @@ -20183,8 +20311,8 @@ "make_attachments_public": 1, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.131438", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.491856", "module": "Projects", "name": "Locate Log", "naming_rule": "", @@ -21011,6 +21139,70 @@ "unique": 0, "width": null }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "default": null, + "depends_on": null, + "description": null, + "documentation_url": null, + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "is_virtual": 0, + "label": "Amended From", + "length": 0, + "link_filters": null, + "make_attachment_public": 0, + "mandatory_depends_on": null, + "max_height": null, + "no_copy": 1, + "non_negative": 0, + "oldfieldname": null, + "oldfieldtype": null, + "options": "Backflow test report form", + "parent": "Backflow test report form", + "parentfield": "fields", + "parenttype": "DocType", + "permlevel": 0, + "placeholder": null, + "precision": null, + "print_hide": 1, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 1, + "set_only_once": 0, + "show_dashboard": 0, + "show_on_timeline": 0, + "show_preview_popup": 0, + "sort_options": 0, + "translatable": 0, + "trigger": null, + "unique": 0, + "width": null + }, { "allow_bulk_edit": 0, "allow_in_quick_entry": 0, @@ -21095,8 +21287,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.202332", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.568937", "module": "Brotherton SOP", "name": "Backflow test report form", "naming_rule": "", @@ -21401,8 +21593,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.285948", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.642095", "module": "Accounts", "name": "QB Export Entry", "naming_rule": "Autoincrement", @@ -21939,8 +22131,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.355160", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.707781", "module": "Accounts", "name": "QB Export", "naming_rule": "Expression", @@ -22437,8 +22629,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.415292", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.767738", "module": "Desk", "name": "Custom Customer Address Link", "naming_rule": "", @@ -22783,8 +22975,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.481130", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.832467", "module": "Selling", "name": "On-Site Meeting", "naming_rule": "Expression", @@ -22961,8 +23153,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.534663", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.887577", "module": "Selling", "name": "Route Technician Assignment", "naming_rule": "", @@ -23115,8 +23307,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.599657", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:42.946763", "module": "Desk", "name": "Test Doctype", "naming_rule": "", @@ -23293,8 +23485,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.657274", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.000129", "module": "Custom", "name": "Lead Company Link", "naming_rule": "", @@ -23511,8 +23703,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.725794", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.058887", "module": "Custom UI", "name": "Customer Task Link", "naming_rule": "", @@ -23729,8 +23921,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.785885", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.115978", "module": "Custom UI", "name": "Address Task Link", "naming_rule": "", @@ -23883,8 +24075,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.844492", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.170199", "module": "Custom", "name": "Lead Companies Link", "naming_rule": "", @@ -24101,8 +24293,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.900007", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.224904", "module": "Custom", "name": "Address Project Link", "naming_rule": "", @@ -24319,8 +24511,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:20.954548", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.279437", "module": "Custom", "name": "Address Quotation Link", "naming_rule": "", @@ -24537,8 +24729,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.006908", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.337909", "module": "Custom", "name": "Address On-Site Meeting Link", "naming_rule": "", @@ -24755,8 +24947,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.062136", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.398422", "module": "Custom", "name": "Address Sales Order Link", "naming_rule": "", @@ -24909,8 +25101,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.117021", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.453952", "module": "Custom", "name": "Contact Address Link", "naming_rule": "", @@ -25063,8 +25255,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.169501", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.509901", "module": "Custom", "name": "Lead On-Site Meeting Link", "naming_rule": "", @@ -25665,8 +25857,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.238629", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.578582", "module": "Selling", "name": "Quotation Template", "naming_rule": "", @@ -26163,8 +26355,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.311130", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.653891", "module": "Selling", "name": "Quotation Template Item", "naming_rule": "", @@ -26317,8 +26509,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.361453", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.707399", "module": "Custom UI", "name": "Customer Company Link", "naming_rule": "", @@ -26471,8 +26663,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.412683", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.763790", "module": "Custom UI", "name": "Customer Address Link", "naming_rule": "", @@ -26625,8 +26817,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.463220", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.820909", "module": "Custom UI", "name": "Customer Contact Link", "naming_rule": "", @@ -26779,8 +26971,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.514415", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.873945", "module": "Custom", "name": "Address Contact Link", "naming_rule": "", @@ -26933,8 +27125,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.568276", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.930727", "module": "Custom", "name": "Customer On-Site Meeting Link", "naming_rule": "", @@ -27087,8 +27279,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.621714", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:43.985136", "module": "Custom", "name": "Customer Project Link", "naming_rule": "", @@ -27241,8 +27433,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.678283", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.042044", "module": "Custom", "name": "Customer Quotation Link", "naming_rule": "", @@ -27395,8 +27587,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.730090", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.099238", "module": "Custom", "name": "Customer Sales Order Link", "naming_rule": "", @@ -27549,8 +27741,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.785786", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.156145", "module": "Custom", "name": "Lead Address Link", "naming_rule": "", @@ -27703,8 +27895,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.841515", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.211774", "module": "Custom", "name": "Lead Contact Link", "naming_rule": "", @@ -27857,8 +28049,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.896611", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.264521", "module": "Custom", "name": "Lead Quotation Link", "naming_rule": "", @@ -28011,8 +28203,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:21.948578", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.318414", "module": "Custom", "name": "Address Company Link", "naming_rule": "", @@ -28050,1016 +28242,6 @@ "translated_doctype": 0, "website_search_field": null }, - { - "_assign": null, - "_comments": null, - "_last_update": null, - "_liked_by": null, - "_user_tags": null, - "actions": [], - "allow_auto_repeat": 0, - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 1, - "app": null, - "autoname": "format:SA-{MM}-{YYYY}-{####}", - "beta": 0, - "color": null, - "colour": null, - "custom": 1, - "default_email_template": null, - "default_print_format": null, - "default_view": null, - "description": null, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "documentation": null, - "editable_grid": 0, - "email_append_to": 0, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "expected_start_date", - "fieldtype": "Date", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Expected Start Date", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": null, - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "expected_end_date", - "fieldtype": "Date", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Expected End Date", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": null, - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "project_template", - "fieldtype": "Link", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Project Template", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": "Project Template", - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "project", - "fieldtype": "Link", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Project", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": "Project", - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "actual_start_date", - "fieldtype": "Date", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Actual Start Date", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": null, - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "actual_end_date", - "fieldtype": "Date", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Actual End Date", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": null, - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "expected_start_time", - "fieldtype": "Time", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Expected Start Time", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": null, - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "expected_end_time", - "fieldtype": "Time", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Expected End Time", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": null, - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "actual_end_time", - "fieldtype": "Time", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Actual End Time", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": null, - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "actual_start_time", - "fieldtype": "Time", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Actual Start Time", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": null, - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": "Open", - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "status", - "fieldtype": "Select", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Status", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": "Open\nScheduled\nStarted\nCompleted\nCanceled", - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "customer", - "fieldtype": "Link", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Customer", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": "Customer", - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "company", - "fieldtype": "Link", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Company", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": "Company", - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "collapsible_depends_on": null, - "columns": 0, - "default": null, - "depends_on": null, - "description": null, - "documentation_url": null, - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "service_address", - "fieldtype": "Link", - "hidden": 0, - "hide_border": 0, - "hide_days": 0, - "hide_seconds": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_preview": 0, - "in_standard_filter": 0, - "is_virtual": 0, - "label": "Service Address", - "length": 0, - "link_filters": null, - "make_attachment_public": 0, - "mandatory_depends_on": null, - "max_height": null, - "no_copy": 0, - "non_negative": 0, - "oldfieldname": null, - "oldfieldtype": null, - "options": "Address", - "parent": "Service Appointment", - "parentfield": "fields", - "parenttype": "DocType", - "permlevel": 0, - "placeholder": null, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": null, - "read_only": 0, - "read_only_depends_on": null, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "show_dashboard": 0, - "show_on_timeline": 0, - "show_preview_popup": 0, - "sort_options": 0, - "translatable": 0, - "trigger": null, - "unique": 0, - "width": null - } - ], - "force_re_route_to_default_view": 0, - "grid_page_length": 50, - "has_web_view": 0, - "hide_toolbar": 0, - "icon": null, - "image_field": null, - "in_create": 0, - "index_web_pages_for_search": 1, - "is_calendar_and_gantt": 0, - "is_published_field": null, - "is_submittable": 0, - "is_tree": 0, - "is_virtual": 0, - "issingle": 0, - "istable": 0, - "links": [], - "make_attachments_public": 0, - "max_attachments": 0, - "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:22.025288", - "module": "Custom UI", - "name": "Service Appointment", - "naming_rule": "Expression", - "nsm_parent_field": null, - "parent_node": null, - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "match": null, - "parent": "Service Appointment", - "parentfield": "permissions", - "parenttype": "DocType", - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "select": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "print_outline": null, - "protect_attached_files": 0, - "queue_in_background": 0, - "quick_entry": 0, - "read_only": 0, - "recipient_account_field": null, - "restrict_to_domain": null, - "route": null, - "row_format": "Dynamic", - "rows_threshold_for_grid_search": 20, - "search_fields": null, - "sender_field": null, - "sender_name_field": null, - "show_name_in_global_search": 0, - "show_preview_popup": 0, - "show_title_field_in_link": 0, - "smallicon": null, - "sort_field": "modified", - "sort_order": "DESC", - "states": [], - "subject": null, - "subject_field": null, - "tag_fields": null, - "timeline_field": null, - "title_field": null, - "track_changes": 0, - "track_seen": 0, - "track_views": 0, - "translated_doctype": 0, - "website_search_field": null - }, { "_assign": null, "_comments": null, @@ -30071,8 +29253,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:22.096777", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.468322", "module": "Custom UI", "name": "Bid Meeting Note Form Field", "naming_rule": "", @@ -30481,8 +29663,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:22.163748", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.535887", "module": "Custom UI", "name": "Bid Meeting Note Form", "naming_rule": "", @@ -31363,8 +30545,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:22.229947", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.603482", "module": "Custom UI", "name": "Bid Meeting Note Field", "naming_rule": "", @@ -31773,8 +30955,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:22.294959", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.670824", "module": "Custom UI", "name": "Bid Meeting Note", "naming_rule": "", @@ -31951,8 +31133,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:22.349227", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.732576", "module": "Custom UI", "name": "Project Task Link", "naming_rule": "", @@ -32105,8 +31287,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:22.408027", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.792626", "module": "Custom UI", "name": "Condition", "naming_rule": "", @@ -32411,8 +31593,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:22.464904", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-12 04:09:44.852328", "module": "Custom UI", "name": "Bid Meeting Note Field Quantity", "naming_rule": "", @@ -33525,8 +32707,8 @@ "make_attachments_public": 0, "max_attachments": 0, "menu_index": null, - "migration_hash": "aa71c1fc5b62bab1d5c86aefe4828463", - "modified": "2026-02-12 02:52:22.542255", + "migration_hash": "37e0ffe1a6860542179154e3e421cf56", + "modified": "2026-02-13 02:03:09.443227", "module": "Custom UI", "name": "Service Address 2", "naming_rule": "", diff --git a/custom_ui/fixtures/property_setter.json b/custom_ui/fixtures/property_setter.json index 3266a33..2d02baa 100644 --- a/custom_ui/fixtures/property_setter.json +++ b/custom_ui/fixtures/property_setter.json @@ -15199,38 +15199,6 @@ "row_name": null, "value": "[\"sb_01\", \"custom_column_break_g4zvy\", \"first_name\", \"custom_column_break_hpz5b\", \"middle_name\", \"custom_column_break_3pehb\", \"last_name\", \"email\", \"customer_type\", \"customer_name\", \"addresses\", \"contact_section\", \"links\", \"phone_nos\", \"email_ids\", \"custom_column_break_nfqbi\", \"is_primary_contact\", \"is_billing_contact\", \"custom_service_address\", \"user\", \"unsubscribed\", \"more_info\", \"custom_column_break_sn9hu\", \"full_name\", \"address\", \"company_name\", \"designation\", \"role\", \"department\", \"image\", \"sb_00\", \"custom_column_break_kmlkz\", \"email_id\", \"mobile_no\", \"phone\", \"status\", \"gender\", \"salutation\", \"contact_details\", \"cb_00\", \"custom_test_label\", \"google_contacts\", \"google_contacts_id\", \"sync_with_google_contacts\", \"cb00\", \"pulled_from_google_contacts\", \"custom_column_break_ejxjz\"]" }, - { - "default_value": null, - "doc_type": "Project", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocType", - "field_name": null, - "is_system_generated": 0, - "modified": "2026-01-26 10:42:06.682515", - "module": null, - "name": "Project-main-autoname", - "property": "autoname", - "property_type": "Data", - "row_name": null, - "value": "format:{project_template}-#-PRO-{#####}-{YYYY}" - }, - { - "default_value": null, - "doc_type": "Project", - "docstatus": 0, - "doctype": "Property Setter", - "doctype_or_field": "DocType", - "field_name": null, - "is_system_generated": 0, - "modified": "2026-01-26 10:42:06.862234", - "module": null, - "name": "Project-main-field_order", - "property": "field_order", - "property_type": "Data", - "row_name": null, - "value": "[\"custom_column_break_k7sgq\", \"custom_installation_address\", \"naming_series\", \"project_name\", \"job_address\", \"status\", \"custom_warranty_duration_days\", \"custom_warranty_expiration_date\", \"custom_warranty_information\", \"project_type\", \"percent_complete_method\", \"percent_complete\", \"column_break_5\", \"project_template\", \"expected_start_date\", \"expected_start_time\", \"expected_end_date\", \"expected_end_time\", \"is_scheduled\", \"invoice_status\", \"custom_completion_date\", \"priority\", \"custom_foreman\", \"custom_hidden_fields\", \"department\", \"service_appointment\", \"tasks\", \"is_active\", \"custom_address\", \"custom_section_break_lgkpd\", \"custom_workflow_related_custom_fields__landry\", \"custom_permit_status\", \"custom_utlity_locate_status\", \"custom_crew_scheduling\", \"customer_details\", \"customer\", \"column_break_14\", \"sales_order\", \"users_section\", \"users\", \"copied_from\", \"section_break0\", \"notes\", \"section_break_18\", \"actual_start_date\", \"actual_start_time\", \"actual_time\", \"column_break_20\", \"actual_end_date\", \"actual_end_time\", \"project_details\", \"estimated_costing\", \"total_costing_amount\", \"total_expense_claim\", \"total_purchase_cost\", \"company\", \"column_break_28\", \"total_sales_amount\", \"total_billable_amount\", \"total_billed_amount\", \"total_consumed_material_cost\", \"cost_center\", \"margin\", \"gross_margin\", \"column_break_37\", \"per_gross_margin\", \"monitor_progress\", \"collect_progress\", \"holiday_list\", \"frequency\", \"from_time\", \"to_time\", \"first_email\", \"second_email\", \"daily_time_to_send\", \"day_to_send\", \"weekly_time_to_send\", \"column_break_45\", \"subject\", \"message\"]" - }, { "default_value": null, "doc_type": "Sales Order", @@ -15262,5 +15230,37 @@ "property_type": "Data", "row_name": null, "value": "[\"gateway_name\", \"publishable_key\", \"custom_webhook_secret\", \"column_break_3\", \"secret_key\", \"custom_company\", \"custom_account\", \"section_break_5\", \"header_img\", \"column_break_7\", \"redirect_url\"]" + }, + { + "default_value": null, + "doc_type": "Project", + "docstatus": 0, + "doctype": "Property Setter", + "doctype_or_field": "DocType", + "field_name": null, + "is_system_generated": 0, + "modified": "2026-02-12 12:21:16.095851", + "module": null, + "name": "Project-main-autoname", + "property": "autoname", + "property_type": "Data", + "row_name": null, + "value": "format:{project_template}-{customer}-PRO-{#####}-{YYYY}" + }, + { + "default_value": null, + "doc_type": "Project", + "docstatus": 0, + "doctype": "Property Setter", + "doctype_or_field": "DocType", + "field_name": null, + "is_system_generated": 0, + "modified": "2026-02-12 12:21:16.160749", + "module": null, + "name": "Project-main-field_order", + "property": "field_order", + "property_type": "Data", + "row_name": null, + "value": "[\"custom_column_break_k7sgq\", \"custom_installation_address\", \"naming_series\", \"project_name\", \"job_address\", \"status\", \"custom_warranty_duration_days\", \"custom_warranty_expiration_date\", \"custom_warranty_information\", \"project_type\", \"percent_complete_method\", \"percent_complete\", \"column_break_5\", \"project_template\", \"expected_start_date\", \"expected_start_time\", \"expected_end_date\", \"expected_end_time\", \"requires_half_payment\", \"is_half_down_paid\", \"is_scheduled\", \"invoice_status\", \"custom_completion_date\", \"priority\", \"custom_foreman\", \"custom_hidden_fields\", \"department\", \"service_appointment\", \"tasks\", \"ready_to_schedule\", \"is_active\", \"custom_address\", \"custom_section_break_lgkpd\", \"custom_workflow_related_custom_fields__landry\", \"custom_permit_status\", \"custom_utlity_locate_status\", \"custom_crew_scheduling\", \"customer_details\", \"customer\", \"column_break_14\", \"sales_order\", \"users_section\", \"users\", \"copied_from\", \"section_break0\", \"notes\", \"section_break_18\", \"actual_start_date\", \"actual_start_time\", \"actual_time\", \"column_break_20\", \"actual_end_date\", \"actual_end_time\", \"project_details\", \"estimated_costing\", \"total_costing_amount\", \"total_expense_claim\", \"total_purchase_cost\", \"company\", \"column_break_28\", \"total_sales_amount\", \"total_billable_amount\", \"total_billed_amount\", \"total_consumed_material_cost\", \"cost_center\", \"margin\", \"gross_margin\", \"column_break_37\", \"per_gross_margin\", \"monitor_progress\", \"collect_progress\", \"holiday_list\", \"frequency\", \"from_time\", \"to_time\", \"first_email\", \"second_email\", \"daily_time_to_send\", \"day_to_send\", \"weekly_time_to_send\", \"column_break_45\", \"subject\", \"message\"]" } ] \ No newline at end of file diff --git a/custom_ui/fixtures/task.json b/custom_ui/fixtures/task.json index e9aa43c..391a3dc 100644 --- a/custom_ui/fixtures/task.json +++ b/custom_ui/fixtures/task.json @@ -59,7 +59,7 @@ "department": null, "depends_on": [], "depends_on_tasks": "", - "description": null, + "description": "Utility locate request prior to installation start.", "docstatus": 0, "doctype": "Task", "duration": 0, @@ -70,7 +70,7 @@ "is_milestone": 0, "is_template": 1, "issue": null, - "modified": "2025-04-24 14:57:03.402721", + "modified": "2026-02-12 12:31:42.805351", "name": "TASK-2025-00002", "old_parent": "", "parent_task": null, @@ -82,12 +82,12 @@ "start": 0, "status": "Template", "subject": "811/Locate call in", - "task_weight": 0.0, + "task_weight": 7.0, "template_task": null, "total_billing_amount": 0.0, "total_costing_amount": 0.0, "total_expense_claim": 0.0, - "type": "Admin" + "type": "811/Locate" }, { "act_end_date": null, @@ -284,7 +284,7 @@ "department": null, "depends_on": [], "depends_on_tasks": "", - "description": null, + "description": "Task tracking for the main service job.", "docstatus": 0, "doctype": "Task", "duration": 0, @@ -295,7 +295,7 @@ "is_milestone": 0, "is_template": 1, "issue": null, - "modified": "2025-05-10 05:06:24.653035", + "modified": "2026-02-12 12:32:42.996899", "name": "TASK-2025-00004", "old_parent": "", "parent_task": null, @@ -307,12 +307,12 @@ "start": 0, "status": "Template", "subject": "Primary Job", - "task_weight": 0.0, + "task_weight": 25.0, "template_task": null, "total_billing_amount": 0.0, "total_costing_amount": 0.0, "total_expense_claim": 0.0, - "type": "Labor" + "type": "Main Job" }, { "act_end_date": null, diff --git a/custom_ui/hooks.py b/custom_ui/hooks.py index 81e809e..2269bce 100644 --- a/custom_ui/hooks.py +++ b/custom_ui/hooks.py @@ -196,7 +196,7 @@ doc_events = { "before_insert": "custom_ui.events.task.before_insert", "after_insert": "custom_ui.events.task.after_insert", "before_save": "custom_ui.events.task.before_save", - "after_save": "custom_ui.events.task.after_save" + "on_update": "custom_ui.events.task.after_save" }, "Bid Meeting Note Form": { "after_insert": "custom_ui.events.general.attach_bid_note_form_to_project_template" @@ -210,7 +210,8 @@ doc_events = { "on_submit": "custom_ui.events.payments.on_submit" }, "Sales Invoice": { - "on_submit": "custom_ui.events.sales_invoice.on_submit" + "on_submit": "custom_ui.events.sales_invoice.on_submit", + "after_insert": "custom_ui.events.sales_invoice.after_insert" } } diff --git a/custom_ui/install.py b/custom_ui/install.py index 6f5abe7..9db4804 100644 --- a/custom_ui/install.py +++ b/custom_ui/install.py @@ -485,6 +485,12 @@ def add_custom_fields(): default=0, insert_after="custom_installation_address" ), + dict( + fieldname="remarks", + label="Remarks", + fieldtype="Small Text", + insert_after="grand_total" + ), dict( fieldname="custom_quotation_template", label="Quotation Template", diff --git a/custom_ui/services/sales_order_service.py b/custom_ui/services/sales_order_service.py index 39c863a..f6420c4 100644 --- a/custom_ui/services/sales_order_service.py +++ b/custom_ui/services/sales_order_service.py @@ -8,7 +8,8 @@ class SalesOrderService: def create_sales_invoice_from_sales_order(sales_order_name): try: sales_order_doc = frappe.get_doc("Sales Order", sales_order_name) - sales_invoice = make_sales_invoice(sales_order_doc.name) + sales_invoice = make_sales_invoice(sales_order_doc.name, ignore_permissions=True) + print("DEBUG: Sales Invoice created from Sales Order:", sales_invoice.name) sales_invoice.project = sales_order_doc.project sales_invoice.posting_date = today() sales_invoice.due_date = today() @@ -21,8 +22,9 @@ class SalesOrderService: sales_invoice.calculate_taxes_and_totals() sales_invoice.insert() - sales_invoice.submit() - return sales_invoice.name + print("DEBUG: Sales Invoice: ", sales_invoice.as_dict()) + # sales_invoice.submit() + return sales_invoice except Exception as e: print("ERROR creating Sales Invoice from Sales Order:", str(e)) return None \ No newline at end of file diff --git a/custom_ui/services/stripe_service.py b/custom_ui/services/stripe_service.py index 666a75b..8763260 100644 --- a/custom_ui/services/stripe_service.py +++ b/custom_ui/services/stripe_service.py @@ -56,14 +56,17 @@ class StripeService: Returns: stripe.checkout.Session object """ + print(f"DEBUG: Creating Stripe Checkout Session for company with details - Company: {company}, Amount: {amount}, Service: {service}, Order Num: {order_num}, Currency: {currency}, For Advance Payment: {for_advance_payment}, Sales Invoice: {sales_invoice}") stripe.api_key = StripeService.get_api_key(company) # Determine payment description if for_advance_payment: description = f"Advance payment for {company}{' - ' + service if service else ''}" else: + print("DEBUG: Creating description for full payment") description = f"Invoice payment for {company}{' - ' + service if service else ''}" if sales_invoice: + print(f"DEBUG: Sales Invoice provided for full payment: {sales_invoice}") description = f"Invoice {sales_invoice} - {company}" # Use custom line items if provided and not an advance payment, otherwise create default line item @@ -88,7 +91,7 @@ class StripeService: if for_advance_payment: metadata["sales_order"] = order_num else: - metadata["sales_invoice"] = sales_invoice or order_num + metadata["sales_invoice"] = sales_invoice if sales_invoice else order_num if sales_invoice: # Check if there's a related sales order invoice_doc = frappe.get_doc("Sales Invoice", sales_invoice) diff --git a/custom_ui/templates/invoices/already_paid.html b/custom_ui/templates/invoices/already_paid.html new file mode 100644 index 0000000..07f470e --- /dev/null +++ b/custom_ui/templates/invoices/already_paid.html @@ -0,0 +1,191 @@ + + +
+ + +