From 7b08238441bd6622b237fe528fd3a38ad0f33adf Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Sat, 19 Jul 2025 00:18:15 +0530 Subject: [PATCH 01/25] feature added for POS Token --- .../js/posapp/components/pos/Invoice.vue | 105 +++++++++++++++--- 1 file changed, 87 insertions(+), 18 deletions(-) diff --git a/posawesome/public/js/posapp/components/pos/Invoice.vue b/posawesome/public/js/posapp/components/pos/Invoice.vue index f77948da61..632d3a91d0 100644 --- a/posawesome/public/js/posapp/components/pos/Invoice.vue +++ b/posawesome/public/js/posapp/components/pos/Invoice.vue @@ -1115,14 +1115,90 @@ export default { evntBus.$emit("set_pos_coupons", []); this.posa_coupons = []; this.return_doc = ""; + const doc = this.get_invoice_doc(); - if (doc.name) { + + // Check if doc has name or items + if (doc.name || doc.items.length) { old_invoice = this.update_invoice(doc); - } else { - if (doc.items.length) { - old_invoice = this.update_invoice(doc); + + // ✅ Only show dialog if docstatus is 0 (Draft) + if (old_invoice && old_invoice.docstatus === 0) { + const token = old_invoice.name.slice(-5); + const posting_date = frappe.datetime.str_to_user(old_invoice.posting_date); + const posting_time = old_invoice.posting_time?.split('.')[0] || frappe.datetime.now_time(); + + const d = new frappe.ui.Dialog({ + title: 'Token', + fields: [ + { + fieldname: 'token', + fieldtype: 'HTML', + options: `
${token}
` + } + ], + primary_action_label: 'Print', + primary_action() { + const print_window = window.open('', '', 'height=600,width=400'); + + print_window.document.write(` + + + Token Print + + + +
+

Date: ${posting_date}

+

Time: ${posting_time}

+
+
${token}
+ + + `); + + print_window.document.close(); + print_window.focus(); + print_window.print(); + print_window.close(); + } + }); + + d.show(); } } + + // Continue resetting form if it's not a return if (!data.name && !data.is_return) { this.items = []; this.customer = this.pos_profile.customer; @@ -1144,31 +1220,26 @@ export default { this.update_items_details(this.items); this.posa_offers = data.posa_offers || []; this.items.forEach((item) => { - if (!item.posa_row_id) { - item.posa_row_id = this.makeid(20); - } - if (item.batch_no) { - this.set_batch_qty(item, item.batch_no); - } + if (!item.posa_row_id) item.posa_row_id = this.makeid(20); + if (item.batch_no) this.set_batch_qty(item, item.batch_no); }); this.customer = data.customer; this.posting_date = data.posting_date || frappe.datetime.nowdate(); this.discount_amount = data.discount_amount; - this.additional_discount_percentage = - data.additional_discount_percentage; + this.additional_discount_percentage = data.additional_discount_percentage; + this.items.forEach((item) => { if (item.serial_no) { item.serial_no_selected = []; const serial_list = item.serial_no.split("\n"); serial_list.forEach((element) => { - if (element.length) { - item.serial_no_selected.push(element); - } + if (element.length) item.serial_no_selected.push(element); }); item.serial_no_selected_count = item.serial_no_selected.length; } }); } + return old_invoice; }, @@ -1401,9 +1472,7 @@ export default { const vm = this; frappe.call({ method: "posawesome.posawesome.api.posapp.update_invoice", - args: { - data: doc, - }, + args: { data: doc }, async: false, callback: function (r) { if (r.message) { From 2d6d772e5437cd81a750a4c69f2011187271f433 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Fri, 25 Jul 2025 22:36:59 +0530 Subject: [PATCH 02/25] feature: Dialog will display only if have token is checked in POS profile --- posawesome/fixtures/custom_field.json | 823 ++-- posawesome/posawesome/custom/pos_profile.json | 3774 +++++++++++++++++ .../js/posapp/components/pos/Invoice.vue | 26 +- 3 files changed, 4201 insertions(+), 422 deletions(-) create mode 100644 posawesome/posawesome/custom/pos_profile.json diff --git a/posawesome/fixtures/custom_field.json b/posawesome/fixtures/custom_field.json index 2e00aea319..1f9f9465dd 100644 --- a/posawesome/fixtures/custom_field.json +++ b/posawesome/fixtures/custom_field.json @@ -431,60 +431,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": null, - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Customer", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "posa_discount", - "fieldtype": "Float", - "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": "lead_name", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Discount %", - "length": 0, - "mandatory_depends_on": null, - "modified": "2021-06-04 21:02:31.784347", - "module": null, - "name": "Customer-posa_discount", - "no_copy": 0, - "non_negative": 1, - "options": null, - "permlevel": 0, - "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, - "sort_options": 0, - "translatable": 0, - "unique": 0, - "width": null - }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -1187,6 +1133,60 @@ "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": null, + "description": null, + "docstatus": 0, + "doctype": "Custom Field", + "dt": "Customer", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_discount", + "fieldtype": "Float", + "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": "lead_name", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Discount %", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-04 21:02:31.784347", + "module": null, + "name": "Customer-posa_discount", + "no_copy": 0, + "non_negative": 1, + "options": null, + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -2051,64 +2051,11 @@ "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": "POS Profile", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "custom_allow_select_sales_order", - "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": "posa_allow_sales_order", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Allow Select Sales Order", - "length": 0, - "mandatory_depends_on": null, - "modified": "2023-11-13 12:16:27.784096", - "module": null, - "name": "POS Profile-custom_allow_select_sales_order", - "no_copy": 0, - "non_negative": 0, - "options": null, - "permlevel": 0, - "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, - "translatable": 0, - "unique": 0, - "width": null -}, { "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 1, + "collapsible": 0, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -2116,11 +2063,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Company", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_section", - "fieldtype": "Section Break", + "fieldname": "custom_allow_select_sales_order", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2131,15 +2078,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "total_monthly_sales", + "insert_after": "posa_allow_sales_order", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Code", + "label": "Allow Select Sales Order", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:04:22.290849", + "modified": "2023-11-13 12:16:27.784096", "module": null, - "name": "Company-posa_referral_section", + "name": "POS Profile-custom_allow_select_sales_order", "no_copy": 0, "non_negative": 0, "options": null, @@ -2162,7 +2109,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 0, + "collapsible": 1, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -2170,11 +2117,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Company", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_show_template_items", - "fieldtype": "Check", + "fieldname": "posa_referral_section", + "fieldtype": "Section Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2185,15 +2132,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_sales_order", + "insert_after": "total_monthly_sales", "is_system_generated": 0, "is_virtual": 0, - "label": "Show Template Items", + "label": "Referral Code", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-23 22:48:41.288938", + "modified": "2021-07-29 23:04:22.290849", "module": null, - "name": "POS Profile-posa_show_template_items", + "name": "Company-posa_referral_section", "no_copy": 0, "non_negative": 0, "options": null, @@ -2224,10 +2171,10 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Company", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_auto_referral", + "fieldname": "posa_show_template_items", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2239,15 +2186,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_referral_section", + "insert_after": "posa_allow_sales_order", "is_system_generated": 0, "is_virtual": 0, - "label": "Auto Create Referral For New Customers", + "label": "Show Template Items", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:07:08.681215", + "modified": "2021-06-23 22:48:41.288938", "module": null, - "name": "Company-posa_auto_referral", + "name": "POS Profile-posa_show_template_items", "no_copy": 0, "non_negative": 0, "options": null, @@ -2274,14 +2221,14 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "posa_show_template_items", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Company", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_hide_variants_items", + "fieldname": "posa_auto_referral", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2293,15 +2240,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_show_template_items", + "insert_after": "posa_referral_section", "is_system_generated": 0, "is_virtual": 0, - "label": "Hide Variants Items", + "label": "Auto Create Referral For New Customers", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-24 03:24:52.591942", + "modified": "2021-07-29 23:07:08.681215", "module": null, - "name": "POS Profile-posa_hide_variants_items", + "name": "Company-posa_auto_referral", "no_copy": 0, "non_negative": 0, "options": null, @@ -2324,19 +2271,19 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 1, + "collapsible": 0, "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": null, + "depends_on": "posa_show_template_items", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Order", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_additional_notes_section", - "fieldtype": "Section Break", + "fieldname": "posa_hide_variants_items", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2347,15 +2294,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "items", + "insert_after": "posa_show_template_items", "is_system_generated": 0, "is_virtual": 0, - "label": "Additional Notes", + "label": "Hide Variants Items", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-21 16:11:59.366893", + "modified": "2021-06-24 03:24:52.591942", "module": null, - "name": "Sales Order-posa_additional_notes_section", + "name": "POS Profile-posa_hide_variants_items", "no_copy": 0, "non_negative": 0, "options": null, @@ -2490,15 +2437,15 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": null, + "depends_on": "posa_auto_referral", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Order", + "dt": "Company", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_notes", - "fieldtype": "Small Text", + "fieldname": "posa_customer_offer", + "fieldtype": "Link", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2509,18 +2456,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_additional_notes_section", + "insert_after": "posa_column_break_22", "is_system_generated": 0, "is_virtual": 0, - "label": "Additional Notes", + "label": "Final Customer Offer", "length": 0, - "mandatory_depends_on": null, - "modified": "2021-06-21 16:11:59.829304", + "mandatory_depends_on": "posa_auto_referral", + "modified": "2021-07-29 23:11:04.891539", "module": null, - "name": "Sales Order-posa_notes", + "name": "Company-posa_customer_offer", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "POS Offer", "permlevel": 0, "precision": "", "print_hide": 0, @@ -2532,7 +2479,7 @@ "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 1, + "translatable": 0, "unique": 0, "width": null }, @@ -2543,16 +2490,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, - "depends_on": "posa_auto_referral", + "default": "0", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Company", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_customer_offer", - "fieldtype": "Link", + "fieldname": "posa_allow_customer_purchase_order", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2563,18 +2510,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_column_break_22", + "insert_after": "posa_fetch_coupon", "is_system_generated": 0, "is_virtual": 0, - "label": "Final Customer Offer", + "label": "Allow Customer Purchase Order", "length": 0, - "mandatory_depends_on": "posa_auto_referral", - "modified": "2021-07-29 23:11:04.891539", + "mandatory_depends_on": null, + "modified": "2021-12-16 16:27:32.300240", "module": null, - "name": "Company-posa_customer_offer", + "name": "POS Profile-posa_allow_customer_purchase_order", "no_copy": 0, "non_negative": 0, - "options": "POS Offer", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, @@ -2598,15 +2545,15 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": null, + "depends_on": "posa_auto_referral", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Customer", + "dt": "Company", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_birthday", - "fieldtype": "Date", + "fieldname": "posa_primary_offer", + "fieldtype": "Link", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2617,18 +2564,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "contact_html", + "insert_after": "posa_customer_offer", "is_system_generated": 0, "is_virtual": 0, - "label": "Birthday", + "label": "Primary Customer Offer", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-31 00:12:09.417519", + "modified": "2021-07-29 23:11:05.290809", "module": null, - "name": "Customer-posa_birthday", + "name": "Company-posa_primary_offer", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "POS Offer", "permlevel": 0, "precision": "", "print_hide": 0, @@ -2659,7 +2606,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_customer_purchase_order", + "fieldname": "posa_allow_print_last_invoice", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2671,15 +2618,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_fetch_coupon", + "insert_after": "posa_allow_customer_purchase_order", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Customer Purchase Order", + "label": "Allow Print Last Invoice", "length": 0, "mandatory_depends_on": null, - "modified": "2021-12-16 16:27:32.300240", + "modified": "2021-12-16 18:00:40.631156", "module": null, - "name": "POS Profile-posa_allow_customer_purchase_order", + "name": "POS Profile-posa_allow_print_last_invoice", "no_copy": 0, "non_negative": 0, "options": null, @@ -2705,7 +2652,7 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "", "depends_on": "posa_auto_referral", "description": null, "docstatus": 0, @@ -2713,7 +2660,7 @@ "dt": "Company", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_primary_offer", + "fieldname": "posa_referral_campaign", "fieldtype": "Link", "hidden": 0, "hide_border": 0, @@ -2725,18 +2672,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_customer_offer", + "insert_after": "posa_primary_offer", "is_system_generated": 0, "is_virtual": 0, - "label": "Primary Customer Offer", + "label": "Referral Campaign", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:11:05.290809", + "modified": "2021-07-29 23:11:05.723688", "module": null, - "name": "Company-posa_primary_offer", + "name": "Company-posa_referral_campaign", "no_copy": 0, "non_negative": 0, - "options": "POS Offer", + "options": "Campaign", "permlevel": 0, "precision": "", "print_hide": 0, @@ -2756,7 +2703,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 1, + "collapsible": 0, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -2764,11 +2711,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Customer", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_section", - "fieldtype": "Section Break", + "fieldname": "posa_display_additional_notes", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2779,15 +2726,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_birthday", + "insert_after": "posa_allow_print_last_invoice", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Code", + "label": "Display Additional Notes", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:23:04.910503", + "modified": "2021-12-19 16:54:32.986600", "module": null, - "name": "Customer-posa_referral_section", + "name": "POS Profile-posa_display_additional_notes", "no_copy": 0, "non_negative": 0, "options": null, @@ -2813,7 +2760,7 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", + "default": null, "depends_on": null, "description": null, "docstatus": 0, @@ -2821,7 +2768,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_print_last_invoice", + "fieldname": "posa_allow_write_off_change", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2833,15 +2780,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_customer_purchase_order", + "insert_after": "posa_display_additional_notes", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Print Last Invoice", + "label": "Allow Write Off Change", "length": 0, "mandatory_depends_on": null, - "modified": "2021-12-16 18:00:40.631156", + "modified": "2022-02-12 04:26:04.003374", "module": null, - "name": "POS Profile-posa_allow_print_last_invoice", + "name": "POS Profile-posa_allow_write_off_change", "no_copy": 0, "non_negative": 0, "options": null, @@ -2864,19 +2811,19 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 0, + "collapsible": 1, "collapsible_depends_on": null, "columns": 0, - "default": "", - "depends_on": "posa_auto_referral", + "default": null, + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Company", + "dt": "Sales Order", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_campaign", - "fieldtype": "Link", + "fieldname": "posa_additional_notes_section", + "fieldtype": "Section Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2887,18 +2834,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_primary_offer", + "insert_after": "items", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Campaign", + "label": "Additional Notes", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:11:05.723688", + "modified": "2021-06-21 16:11:59.366893", "module": null, - "name": "Company-posa_referral_campaign", + "name": "Sales Order-posa_additional_notes_section", "no_copy": 0, "non_negative": 0, - "options": "Campaign", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, @@ -2915,7 +2862,7 @@ "width": null }, { - "allow_in_quick_entry": 1, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -2926,11 +2873,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Customer", + "dt": "Sales Invoice Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_code", - "fieldtype": "Data", + "fieldname": "posa_offers", + "fieldtype": "Small Text", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2941,16 +2888,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_referral_section", + "insert_after": "pricing_rules", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Code", + "label": "POS Offers", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 22:42:57.772021", + "modified": "2021-06-07 01:51:16.390447", "module": null, - "name": "Customer-posa_referral_code", - "no_copy": 1, + "name": "Sales Invoice Item-posa_offers", + "no_copy": 0, "non_negative": 0, "options": null, "permlevel": 0, @@ -2958,7 +2905,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -2975,7 +2922,7 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "0", "depends_on": null, "description": null, "docstatus": 0, @@ -2983,7 +2930,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_display_additional_notes", + "fieldname": "posa_new_line", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2995,15 +2942,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_print_last_invoice", + "insert_after": "posa_allow_write_off_change", "is_system_generated": 0, "is_virtual": 0, - "label": "Display Additional Notes", + "label": "Allow add New Items on New Line", "length": 0, "mandatory_depends_on": null, - "modified": "2021-12-19 16:54:32.986600", + "modified": "2022-05-17 01:01:52.106645", "module": null, - "name": "POS Profile-posa_display_additional_notes", + "name": "POS Profile-posa_new_line", "no_copy": 0, "non_negative": 0, "options": null, @@ -3023,9 +2970,9 @@ "width": null }, { - "allow_in_quick_entry": 1, + "allow_in_quick_entry": 0, "allow_on_submit": 0, - "bold": 1, + "bold": 0, "collapsible": 0, "collapsible_depends_on": null, "columns": 0, @@ -3034,11 +2981,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Customer", + "dt": "Sales Order", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_company", - "fieldtype": "Link", + "fieldname": "posa_notes", + "fieldtype": "Small Text", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3049,18 +2996,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_referral_code", + "insert_after": "posa_additional_notes_section", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Company", + "label": "Additional Notes", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:24:11.207034", + "modified": "2021-06-21 16:11:59.829304", "module": null, - "name": "Customer-posa_referral_company", - "no_copy": 1, + "name": "Sales Order-posa_notes", + "no_copy": 0, "non_negative": 0, - "options": "Company", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, @@ -3072,7 +3019,7 @@ "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 0, + "translatable": 1, "unique": 0, "width": null }, @@ -3088,10 +3035,10 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Sales Invoice Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_write_off_change", + "fieldname": "posa_offer_applied", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3103,15 +3050,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_display_additional_notes", + "insert_after": "posa_offers", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Write Off Change", + "label": "Offer Applied", "length": 0, "mandatory_depends_on": null, - "modified": "2022-02-12 04:26:04.003374", + "modified": "2021-06-12 00:12:28.473489", "module": null, - "name": "POS Profile-posa_allow_write_off_change", + "name": "Sales Invoice Item-posa_offer_applied", "no_copy": 0, "non_negative": 0, "options": null, @@ -3120,7 +3067,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -3137,16 +3084,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "0", "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice Item", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_offers", - "fieldtype": "Small Text", + "fieldname": "posa_input_qty", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3157,15 +3104,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "pricing_rules", + "insert_after": "posa_new_line", "is_system_generated": 0, "is_virtual": 0, - "label": "POS Offers", + "label": "Use QTY Input", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-07 01:51:16.390447", + "modified": "2022-05-17 02:17:13.591004", "module": null, - "name": "Sales Invoice Item-posa_offers", + "name": "POS Profile-posa_input_qty", "no_copy": 0, "non_negative": 0, "options": null, @@ -3174,13 +3121,13 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 1, + "translatable": 0, "unique": 0, "width": null }, @@ -3191,15 +3138,15 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", + "default": null, "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Sales Invoice Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_new_line", + "fieldname": "posa_is_offer", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3208,18 +3155,18 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_write_off_change", + "insert_after": "posa_offer_applied", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow add New Items on New Line", + "label": "Is Offer", "length": 0, "mandatory_depends_on": null, - "modified": "2022-05-17 01:01:52.106645", + "modified": "2021-06-12 00:14:20.894553", "module": null, - "name": "POS Profile-posa_new_line", + "name": "Sales Invoice Item-posa_is_offer", "no_copy": 0, "non_negative": 0, "options": null, @@ -3228,7 +3175,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -3250,10 +3197,10 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice Item", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_offer_applied", + "fieldname": "posa_allow_print_draft_invoices", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3265,15 +3212,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_offers", + "insert_after": "posa_input_qty", "is_system_generated": 0, "is_virtual": 0, - "label": "Offer Applied", + "label": "Allow Print Draft Invoices", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-12 00:12:28.473489", + "modified": "2022-07-22 11:51:07.782265", "module": null, - "name": "Sales Invoice Item-posa_offer_applied", + "name": "POS Profile-posa_allow_print_draft_invoices", "no_copy": 0, "non_negative": 0, "options": null, @@ -3282,7 +3229,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -3299,16 +3246,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", - "depends_on": null, + "default": null, + "depends_on": "", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Sales Invoice Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_input_qty", - "fieldtype": "Check", + "fieldname": "posa_is_replace", + "fieldtype": "Data", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3319,15 +3266,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_new_line", + "insert_after": "posa_is_offer", "is_system_generated": 0, "is_virtual": 0, - "label": "Use QTY Input", + "label": "Is Offer Replace For item Row ID", "length": 0, "mandatory_depends_on": null, - "modified": "2022-05-17 02:17:13.591004", + "modified": "2021-06-17 18:10:36.233226", "module": null, - "name": "POS Profile-posa_input_qty", + "name": "Sales Invoice Item-posa_is_replace", "no_copy": 0, "non_negative": 0, "options": null, @@ -3336,13 +3283,13 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 0, + "translatable": 1, "unique": 0, "width": null }, @@ -3358,10 +3305,10 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice Item", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_is_offer", + "fieldname": "posa_use_delivery_charges", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3370,18 +3317,18 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_global_search": 0, - "in_list_view": 1, + "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_offer_applied", + "insert_after": "posa_allow_print_draft_invoices", "is_system_generated": 0, "is_virtual": 0, - "label": "Is Offer", + "label": "Use Delivery Charges", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-12 00:14:20.894553", + "modified": "2022-07-25 11:57:17.864203", "module": null, - "name": "Sales Invoice Item-posa_is_offer", + "name": "POS Profile-posa_use_delivery_charges", "no_copy": 0, "non_negative": 0, "options": null, @@ -3390,7 +3337,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -3415,7 +3362,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_print_draft_invoices", + "fieldname": "posa_auto_set_delivery_charges", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3427,15 +3374,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_input_qty", + "insert_after": "posa_use_delivery_charges", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Print Draft Invoices", + "label": "Auto Set Delivery Charges", "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-22 11:51:07.782265", + "modified": "2022-07-25 11:57:18.367414", "module": null, - "name": "POS Profile-posa_allow_print_draft_invoices", + "name": "POS Profile-posa_auto_set_delivery_charges", "no_copy": 0, "non_negative": 0, "options": null, @@ -3462,15 +3409,15 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice Item", + "dt": "Customer", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_is_replace", - "fieldtype": "Data", + "fieldname": "posa_birthday", + "fieldtype": "Date", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3481,15 +3428,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_is_offer", + "insert_after": "contact_html", "is_system_generated": 0, "is_virtual": 0, - "label": "Is Offer Replace For item Row ID", + "label": "Birthday", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-17 18:10:36.233226", + "modified": "2021-07-31 00:12:09.417519", "module": null, - "name": "Sales Invoice Item-posa_is_replace", + "name": "Customer-posa_birthday", "no_copy": 0, "non_negative": 0, "options": null, @@ -3498,13 +3445,13 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 1, + "translatable": 0, "unique": 0, "width": null }, @@ -3523,7 +3470,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_use_delivery_charges", + "fieldname": "posa_allow_duplicate_customer_names", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3535,15 +3482,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_print_draft_invoices", + "insert_after": "posa_auto_set_delivery_charges", "is_system_generated": 0, "is_virtual": 0, - "label": "Use Delivery Charges", + "label": "Allow Duplicate Customer Names", "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-25 11:57:17.864203", + "modified": "2023-06-05 15:55:21.190823", "module": null, - "name": "POS Profile-posa_use_delivery_charges", + "name": "POS Profile-posa_allow_duplicate_customer_names", "no_copy": 0, "non_negative": 0, "options": null, @@ -3566,7 +3513,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 0, + "collapsible": 1, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -3574,11 +3521,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Customer", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_auto_set_delivery_charges", - "fieldtype": "Check", + "fieldname": "posa_referral_section", + "fieldtype": "Section Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3589,15 +3536,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_use_delivery_charges", + "insert_after": "posa_birthday", "is_system_generated": 0, "is_virtual": 0, - "label": "Auto Set Delivery Charges", + "label": "Referral Code", "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-25 11:57:18.367414", + "modified": "2021-07-29 23:23:04.910503", "module": null, - "name": "POS Profile-posa_auto_set_delivery_charges", + "name": "Customer-posa_referral_section", "no_copy": 0, "non_negative": 0, "options": null, @@ -3620,7 +3567,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 0, + "collapsible": 1, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -3631,8 +3578,8 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_duplicate_customer_names", - "fieldtype": "Check", + "fieldname": "pos_awesome_payments", + "fieldtype": "Section Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3643,15 +3590,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_auto_set_delivery_charges", + "insert_after": "posa_allow_duplicate_customer_names", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Duplicate Customer Names", + "label": "POS Awesome Payments", "length": 0, "mandatory_depends_on": null, - "modified": "2023-06-05 15:55:21.190823", + "modified": "2023-06-11 23:25:42.983974", "module": null, - "name": "POS Profile-posa_allow_duplicate_customer_names", + "name": "POS Profile-pos_awesome_payments", "no_copy": 0, "non_negative": 0, "options": null, @@ -3671,10 +3618,10 @@ "width": null }, { - "allow_in_quick_entry": 0, + "allow_in_quick_entry": 1, "allow_on_submit": 0, "bold": 0, - "collapsible": 1, + "collapsible": 0, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -3682,11 +3629,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Customer", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "pos_awesome_payments", - "fieldtype": "Section Break", + "fieldname": "posa_referral_code", + "fieldtype": "Data", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3697,16 +3644,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_duplicate_customer_names", + "insert_after": "posa_referral_section", "is_system_generated": 0, "is_virtual": 0, - "label": "POS Awesome Payments", + "label": "Referral Code", "length": 0, "mandatory_depends_on": null, - "modified": "2023-06-11 23:25:42.983974", + "modified": "2021-07-29 22:42:57.772021", "module": null, - "name": "POS Profile-pos_awesome_payments", - "no_copy": 0, + "name": "Customer-posa_referral_code", + "no_copy": 1, "non_negative": 0, "options": null, "permlevel": 0, @@ -3720,7 +3667,7 @@ "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 0, + "translatable": 1, "unique": 0, "width": null }, @@ -3778,6 +3725,60 @@ "unique": 0, "width": null }, + { + "allow_in_quick_entry": 1, + "allow_on_submit": 0, + "bold": 1, + "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": "posa_referral_company", + "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": "posa_referral_code", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Referral Company", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-07-29 23:24:11.207034", + "module": null, + "name": "Customer-posa_referral_company", + "no_copy": 1, + "non_negative": 0, + "options": "Company", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -4217,16 +4218,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "1", "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice", - "fetch_from": "shipping_address_name.posa_delivery_charges", - "fetch_if_empty": 1, - "fieldname": "posa_delivery_charges", - "fieldtype": "Link", + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_tax_inclusive", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -4237,18 +4238,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "taxes_and_charges", + "insert_after": "posa_search_batch_no", "is_system_generated": 0, "is_virtual": 0, - "label": "Delivery Charges", + "label": "Tax Inclusive", "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-25 11:49:02.312879", + "modified": "2021-09-06 16:33:33.398280", "module": null, - "name": "Sales Invoice-posa_delivery_charges", + "name": "POS Profile-posa_tax_inclusive", "no_copy": 0, "non_negative": 0, - "options": "Delivery Charges", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, @@ -4271,7 +4272,7 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "1", + "default": null, "depends_on": null, "description": null, "docstatus": 0, @@ -4279,8 +4280,8 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_tax_inclusive", - "fieldtype": "Check", + "fieldname": "column_break_dqsba", + "fieldtype": "Column Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -4291,15 +4292,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_search_batch_no", + "insert_after": "posa_tax_inclusive", "is_system_generated": 0, "is_virtual": 0, - "label": "Tax Inclusive", + "label": null, "length": 0, "mandatory_depends_on": null, - "modified": "2021-09-06 16:33:33.398280", + "modified": "2023-04-24 14:44:48.969896", "module": null, - "name": "POS Profile-posa_tax_inclusive", + "name": "POS Profile-column_break_dqsba", "no_copy": 0, "non_negative": 0, "options": null, @@ -4325,17 +4326,17 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "1", "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_delivery_charges_rate", - "fieldtype": "Currency", - "hidden": 1, + "fieldname": "posa_local_storage", + "fieldtype": "Check", + "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -4345,24 +4346,24 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_delivery_charges", + "insert_after": "column_break_dqsba", "is_system_generated": 0, "is_virtual": 0, - "label": "Delivery Charges Rate", + "label": "Use Browser Local Storage", "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-25 11:49:04.797031", + "modified": "2020-11-13 22:14:13.683091", "module": null, - "name": "Sales Invoice-posa_delivery_charges_rate", + "name": "POS Profile-posa_local_storage", "no_copy": 0, "non_negative": 0, - "options": "currency", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -4379,16 +4380,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "0", "depends_on": null, - "description": null, + "description": "Use Redis cache on the server to speedup initial loads of POS Awesome ", "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "column_break_dqsba", - "fieldtype": "Column Break", + "fieldname": "posa_use_server_cache", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -4399,15 +4400,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_tax_inclusive", + "insert_after": "posa_local_storage", "is_system_generated": 0, "is_virtual": 0, - "label": null, + "label": "Use Server Cache", "length": 0, "mandatory_depends_on": null, - "modified": "2023-04-24 14:44:48.969896", + "modified": "2023-04-24 14:44:49.219453", "module": null, - "name": "POS Profile-column_break_dqsba", + "name": "POS Profile-posa_use_server_cache", "no_copy": 0, "non_negative": 0, "options": null, @@ -4433,16 +4434,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "1", + "default": null, "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "posa_local_storage", - "fieldtype": "Check", + "dt": "Sales Invoice", + "fetch_from": "shipping_address_name.posa_delivery_charges", + "fetch_if_empty": 1, + "fieldname": "posa_delivery_charges", + "fieldtype": "Link", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -4453,18 +4454,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "column_break_dqsba", + "insert_after": "taxes_and_charges", "is_system_generated": 0, "is_virtual": 0, - "label": "Use Browser Local Storage", + "label": "Delivery Charges", "length": 0, "mandatory_depends_on": null, - "modified": "2020-11-13 22:14:13.683091", + "modified": "2022-07-25 11:49:02.312879", "module": null, - "name": "POS Profile-posa_local_storage", + "name": "Sales Invoice-posa_delivery_charges", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "Delivery Charges", "permlevel": 0, "precision": "", "print_hide": 0, @@ -4487,16 +4488,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", - "depends_on": null, - "description": "Use Redis cache on the server to speedup initial loads of POS Awesome ", + "default": "30", + "depends_on": "posa_use_server_cache", + "description": "Cache the values for n minutes", "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_use_server_cache", - "fieldtype": "Check", + "fieldname": "posa_server_cache_duration", + "fieldtype": "Int", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -4507,17 +4508,17 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_local_storage", + "insert_after": "posa_use_server_cache", "is_system_generated": 0, "is_virtual": 0, - "label": "Use Server Cache", + "label": "Server Cache Duration", "length": 0, "mandatory_depends_on": null, - "modified": "2023-04-24 14:44:49.219453", + "modified": "2023-04-24 14:44:49.341660", "module": null, - "name": "POS Profile-posa_use_server_cache", + "name": "POS Profile-posa_server_cache_duration", "no_copy": 0, - "non_negative": 0, + "non_negative": 1, "options": null, "permlevel": 0, "precision": "", @@ -4541,17 +4542,17 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "30", - "depends_on": "posa_use_server_cache", - "description": "Cache the values for n minutes", + "default": null, + "depends_on": null, + "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Sales Invoice", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_server_cache_duration", - "fieldtype": "Int", - "hidden": 0, + "fieldname": "posa_delivery_charges_rate", + "fieldtype": "Currency", + "hidden": 1, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -4561,24 +4562,24 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_use_server_cache", + "insert_after": "posa_delivery_charges", "is_system_generated": 0, "is_virtual": 0, - "label": "Server Cache Duration", + "label": "Delivery Charges Rate", "length": 0, "mandatory_depends_on": null, - "modified": "2023-04-24 14:44:49.341660", + "modified": "2022-07-25 11:49:04.797031", "module": null, - "name": "POS Profile-posa_server_cache_duration", + "name": "Sales Invoice-posa_delivery_charges_rate", "no_copy": 0, - "non_negative": 1, - "options": null, + "non_negative": 0, + "options": "currency", "permlevel": 0, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, diff --git a/posawesome/posawesome/custom/pos_profile.json b/posawesome/posawesome/custom/pos_profile.json new file mode 100644 index 0000000000..14a860b8c5 --- /dev/null +++ b/posawesome/posawesome/custom/pos_profile.json @@ -0,0 +1,3774 @@ +{ + "custom_fields": [ + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:52.244436", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "column_break_anyol", + "fieldtype": "Column Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 65, + "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": "posa_server_cache_duration", + "is_system_generated": 0, + "is_virtual": 0, + "label": null, + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-05 16:59:17.793139", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-column_break_anyol", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:49.379086", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "column_break_dqsba", + "fieldtype": "Column Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 61, + "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": "posa_tax_inclusive", + "is_system_generated": 0, + "is_virtual": 0, + "label": null, + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-04-24 14:44:48.969896", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-column_break_dqsba", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:46.091004", + "default": null, + "depends_on": "", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "column_break_uolvm", + "fieldtype": "Column Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 52, + "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": "posa_use_pos_awesome_payments", + "is_system_generated": 0, + "is_virtual": 0, + "label": null, + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-11 23:29:44.857287", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-column_break_uolvm", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:33.941022", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_allow_select_sales_order", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 67, + "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": "posa_search_limit", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Select Sales Order", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-11-13 12:16:27.784096", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-custom_allow_select_sales_order", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 12:25:45.253652", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_have_token", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 5, + "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": "disabled", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Have Token!", + "length": 0, + "mandatory_depends_on": null, + "modified": "2025-07-23 12:25:45.253652", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-custom_have_token", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:32.883998", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "hide_expected_amount", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 34, + "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": "posa_allow_zero_rated_items", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Hide Expected Amount", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-12-15 16:57:46.117639", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-hide_expected_amount", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:44.661109", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "pos_awesome_payments", + "fieldtype": "Section Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 50, + "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": "posa_allow_duplicate_customer_names", + "is_system_generated": 0, + "is_virtual": 0, + "label": "POS Awesome Payments", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-11 23:25:42.983974", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-pos_awesome_payments", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:25.199235", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_change_posting_date", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 18, + "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": "posa_scale_barcode_start", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Change Posting Date", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-12-16 11:20:05.134781", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_change_posting_date", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:29.580465", + "default": "0", + "depends_on": "posa_allow_partial_payment", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_credit_sale", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 25, + "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": "posa_allow_partial_payment", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Credit Sale", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-09 23:06:59.852139", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_credit_sale", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:36.967999", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_customer_purchase_order", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 40, + "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": "posa_fetch_coupon", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Customer Purchase Order", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-12-16 16:27:32.300240", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_customer_purchase_order", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:22.800506", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_delete", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 12, + "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": "posa_cash_mode_of_payment", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Auto Delete Draft Invoice", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-09 16:01:30.649938", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_delete", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:43.948570", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_duplicate_customer_names", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 49, + "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": "posa_auto_set_delivery_charges", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Duplicate Customer Names", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-05 15:55:21.190823", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_duplicate_customer_names", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:46.453653", + "default": "1", + "depends_on": "posa_use_pos_awesome_payments", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_make_new_payments", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 53, + "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": "column_break_uolvm", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Make New Payments", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-11 23:28:20.478033", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_make_new_payments", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:47.178588", + "default": null, + "depends_on": "posa_use_pos_awesome_payments", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_mpesa_reconcile_payments", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 55, + "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": "posa_allow_reconcile_payments", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Mpesa Reconcile Payments", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-11 23:44:22.343030", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_mpesa_reconcile_payments", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:29.217578", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_partial_payment", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 24, + "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": "posa_display_items_in_stock", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Partial Payment", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-09 23:06:59.598463", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_partial_payment", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:42.156706", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_print_draft_invoices", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 46, + "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": "posa_input_qty", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Print Draft Invoices", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-07-22 11:51:07.782265", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_print_draft_invoices", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:37.722435", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_print_last_invoice", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 41, + "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": "posa_allow_customer_purchase_order", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Print Last Invoice", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-12-16 18:00:40.631156", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_print_last_invoice", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:46.814124", + "default": "1", + "depends_on": "posa_use_pos_awesome_payments", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_reconcile_payments", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 54, + "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": "posa_allow_make_new_payments", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Reconcile Payments", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-11 23:28:20.897560", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_reconcile_payments", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:29.931330", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_return", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 26, + "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": "posa_allow_credit_sale", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Return", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-28 01:56:22.038314", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_return", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:33.589187", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_sales_order", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 36, + "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": "posa_column_break_112", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Create Sales Order", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-22 03:02:27.784096", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_sales_order", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:47.900943", + "default": null, + "depends_on": null, + "description": "Send invoice to submit after printing", + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_submissions_in_background_job", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 57, + "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": "posa_pos_awesome_advance_settings", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Submissions in background job", + "length": 0, + "mandatory_depends_on": "0", + "modified": "2020-10-09 16:05:54.332880", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_submissions_in_background_job", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:23.689143", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_user_to_edit_additional_discount", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 14, + "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": "posa_allow_user_to_edit_rate", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow user to edit Additional Discount", + "length": 0, + "mandatory_depends_on": "0", + "modified": "2020-10-09 16:01:31.157157", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_user_to_edit_additional_discount", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:28.505175", + "default": null, + "depends_on": null, + "description": "", + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_user_to_edit_item_discount", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 22, + "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": "posa_col_1", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow User to Edit Item Discount", + "length": 0, + "mandatory_depends_on": "0", + "modified": "2020-10-09 16:01:31.410384", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_user_to_edit_item_discount", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:23.333002", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_user_to_edit_rate", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 13, + "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": "posa_allow_delete", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow user to edit Rate", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-09 16:01:30.936524", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_user_to_edit_rate", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:38.863436", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_write_off_change", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 43, + "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": "posa_display_additional_notes", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Write Off Change", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-02-12 04:26:04.003374", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_write_off_change", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:32.518572", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_allow_zero_rated_items", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 33, + "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": "posa_display_item_code", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow Zero Rated Items", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-07-20 15:09:09.652861", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_allow_zero_rated_items", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:30.294096", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_apply_customer_discount", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 27, + "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": "posa_allow_return", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Apply Customer Discount", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-04 21:38:33.316557", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_apply_customer_discount", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:31.786438", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_auto_set_batch", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 31, + "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": "posa_hide_closing_shift", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Auto Set Batch", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-20 20:25:37.627551", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_auto_set_batch", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:43.258329", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_auto_set_delivery_charges", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 48, + "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": "posa_use_delivery_charges", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Auto Set Delivery Charges", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-07-25 11:57:18.367414", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_auto_set_delivery_charges", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:22.435260", + "default": null, + "depends_on": null, + "description": "For POS Closing Shift Payment Reconciliation", + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_cash_mode_of_payment", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 11, + "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": "posa_pos_awesome_settings", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Cash Mode of Payment", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-03-06 00:29:24.240940", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_cash_mode_of_payment", + "no_copy": 0, + "non_negative": 0, + "options": "Mode of Payment", + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:28.142807", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_col_1", + "fieldtype": "Column Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 21, + "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": "posa_default_sales_order", + "is_system_generated": 0, + "is_virtual": 0, + "label": "", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-30 03:24:09.367037", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_col_1", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:33.241163", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_column_break_112", + "fieldtype": "Column Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 35, + "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": "hide_expected_amount", + "is_system_generated": 0, + "is_virtual": 0, + "label": "", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-23 22:48:40.886230", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_column_break_112", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:26.388590", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_default_card_view", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 19, + "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": "posa_allow_change_posting_date", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Default Card View", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-03-12 14:03:44.088542", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_default_card_view", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:27.427326", + "default": null, + "depends_on": "", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_default_sales_order", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 20, + "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": "posa_default_card_view", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Default Sales Order", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-03-12 14:37:41.556512", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_default_sales_order", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:38.498899", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_display_additional_notes", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 42, + "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": "posa_allow_print_last_invoice", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Display Additional Notes", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-12-19 16:54:32.986600", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_display_additional_notes", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:32.152269", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_display_item_code", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 32, + "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": "posa_auto_set_batch", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Display Item Code", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-05-17 02:45:24.071753", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_display_item_code", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:28.858337", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_display_items_in_stock", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 23, + "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": "posa_allow_user_to_edit_item_discount", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Hide Unavailable Items", + "length": 0, + "mandatory_depends_on": "", + "modified": "2020-10-09 16:01:31.663626", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_display_items_in_stock", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:36.200959", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_fetch_coupon", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 39, + "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": "posa_hide_variants_items", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Auto Fetch Coupon Gifts", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-07-29 22:58:10.372543", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_fetch_coupon", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:31.424553", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_hide_closing_shift", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 30, + "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": "use_customer_credit", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Hide Close Shift", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-04-15 01:14:57.247333", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_hide_closing_shift", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:35.430948", + "default": null, + "depends_on": "posa_show_template_items", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_hide_variants_items", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 38, + "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": "posa_show_template_items", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Hide Variants Items", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-24 03:24:52.591942", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_hide_variants_items", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:41.408393", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_input_qty", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 45, + "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": "posa_new_line", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Use QTY Input", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-05-17 02:17:13.591004", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_input_qty", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:49.744059", + "default": "1", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_local_storage", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 62, + "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": "column_break_dqsba", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Use Browser Local Storage", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-11-13 22:14:13.683091", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_local_storage", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:24.388852", + "default": "0", + "depends_on": "", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_max_discount_allowed", + "fieldtype": "Float", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 16, + "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": "posa_use_percentage_discount", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Max Discount Percentage Allowed ", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-26 05:11:52.101322", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_max_discount_allowed", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:40.175226", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_new_line", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 44, + "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": "posa_allow_write_off_change", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Allow add New Items on New Line", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-05-17 01:01:52.106645", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_new_line", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:47.539915", + "default": null, + "depends_on": "", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_pos_awesome_advance_settings", + "fieldtype": "Section Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 56, + "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": "posa_allow_mpesa_reconcile_payments", + "is_system_generated": 0, + "is_virtual": 0, + "label": "POS Awesome Advance Settings", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-11 15:13:10.899536", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_pos_awesome_advance_settings", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:22.077841", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_pos_awesome_settings", + "fieldtype": "Section Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 10, + "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_address", + "is_system_generated": 0, + "is_virtual": 0, + "label": "POS Awesome Settings", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-09 15:36:23.711921", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_pos_awesome_settings", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:24.742128", + "default": "221", + "depends_on": null, + "description": "It is best not to use more than four numbers", + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_scale_barcode_start", + "fieldtype": "Int", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 17, + "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": "posa_max_discount_allowed", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Scale Barcode Start With", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-10-30 03:54:32.270370", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_scale_barcode_start", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:48.648025", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_search_batch_no", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 59, + "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": "posa_search_serial_no", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Search by Batch Number", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-05 23:50:13.126933", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_search_batch_no", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:52.979280", + "default": "500", + "depends_on": "pose_use_limit_search", + "description": "Search Limit for Items\nFor best performance keep this under 1500", + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_search_limit", + "fieldtype": "Int", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 67, + "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": "pose_use_limit_search", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Search Limit Number", + "length": 0, + "mandatory_depends_on": "pose_use_limit_search", + "modified": "2023-06-05 16:59:18.717131", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_search_limit", + "no_copy": 0, + "non_negative": 1, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:48.282908", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_search_serial_no", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 58, + "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": "posa_allow_submissions_in_background_job", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Search by Serial Number", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-20 20:47:47.966800", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_search_serial_no", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:51.187434", + "default": "30", + "depends_on": "posa_use_server_cache", + "description": "Cache the values for n minutes", + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_server_cache_duration", + "fieldtype": "Int", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 64, + "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": "posa_use_server_cache", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Server Cache Duration", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-04-24 14:44:49.341660", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_server_cache_duration", + "no_copy": 0, + "non_negative": 1, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:34.690667", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_show_template_items", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 37, + "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": "posa_allow_sales_order", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Show Template Items", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-23 22:48:41.288938", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_show_template_items", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:49.016166", + "default": "1", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_tax_inclusive", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 60, + "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": "posa_search_batch_no", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Tax Inclusive", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-09-06 16:33:33.398280", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_tax_inclusive", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:42.887791", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_use_delivery_charges", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 47, + "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": "posa_allow_print_draft_invoices", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Use Delivery Charges", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-07-25 11:57:17.864203", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_use_delivery_charges", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:24.038508", + "default": "0", + "depends_on": "posa_allow_user_to_edit_additional_discount", + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_use_percentage_discount", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 15, + "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": "posa_allow_user_to_edit_additional_discount", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Use Percentage Discount", + "length": 0, + "mandatory_depends_on": "", + "modified": "2021-09-26 14:08:06.765185", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_use_percentage_discount", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:45.372170", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_use_pos_awesome_payments", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 51, + "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": "pos_awesome_payments", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Use POS Awesome Payments", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-11 23:25:43.339584", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_use_pos_awesome_payments", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:50.131712", + "default": "0", + "depends_on": null, + "description": "Use Redis cache on the server to speedup initial loads of POS Awesome ", + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_use_server_cache", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 63, + "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": "posa_local_storage", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Use Server Cache", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-04-24 14:44:49.219453", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-posa_use_server_cache", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:52.619373", + "default": null, + "depends_on": null, + "description": "Use Search Limit for Items", + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "pose_use_limit_search", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 66, + "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": "column_break_anyol", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Use Limit Search", + "length": 0, + "mandatory_depends_on": null, + "modified": "2023-06-05 16:59:18.429778", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-pose_use_limit_search", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:30.671369", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "use_cashback", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 28, + "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": "posa_apply_customer_discount", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Use Cashback", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-03-24 04:35:08.517136", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-use_cashback", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-07-23 14:31:31.053261", + "default": "0", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "use_customer_credit", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 29, + "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": "use_cashback", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Use Customer Credit", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-03-24 04:51:50.333452", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-use_customer_credit", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + } + ], + "custom_perms": [], + "doctype": "POS Profile", + "links": [ + { + "creation": "2013-05-24 12:15:51", + "custom": 0, + "docstatus": 0, + "group": "Opening & Closing", + "hidden": 0, + "idx": 3, + "is_child_table": 0, + "link_doctype": "POS Opening Entry", + "link_fieldname": "pos_profile", + "modified": "2025-05-26 22:40:29.344362", + "modified_by": "Administrator", + "name": "sh9l1l02sv", + "owner": "Administrator", + "parent": "POS Profile", + "parent_doctype": null, + "parentfield": "links", + "parenttype": "DocType", + "table_fieldname": null + }, + { + "creation": "2013-05-24 12:15:51", + "custom": 0, + "docstatus": 0, + "group": "Invoices", + "hidden": 0, + "idx": 1, + "is_child_table": 0, + "link_doctype": "Sales Invoice", + "link_fieldname": "pos_profile", + "modified": "2025-05-26 22:40:29.344362", + "modified_by": "Administrator", + "name": "sh9l3qh6dr", + "owner": "Administrator", + "parent": "POS Profile", + "parent_doctype": null, + "parentfield": "links", + "parenttype": "DocType", + "table_fieldname": null + }, + { + "creation": "2013-05-24 12:15:51", + "custom": 0, + "docstatus": 0, + "group": "Invoices", + "hidden": 0, + "idx": 2, + "is_child_table": 0, + "link_doctype": "POS Invoice", + "link_fieldname": "pos_profile", + "modified": "2025-05-26 22:40:29.344362", + "modified_by": "Administrator", + "name": "sh9l8ifri5", + "owner": "Administrator", + "parent": "POS Profile", + "parent_doctype": null, + "parentfield": "links", + "parenttype": "DocType", + "table_fieldname": null + }, + { + "creation": "2013-05-24 12:15:51", + "custom": 0, + "docstatus": 0, + "group": "Opening & Closing", + "hidden": 0, + "idx": 4, + "is_child_table": 0, + "link_doctype": "POS Closing Entry", + "link_fieldname": "pos_profile", + "modified": "2025-05-26 22:40:29.344362", + "modified_by": "Administrator", + "name": "sh9luofbjg", + "owner": "Administrator", + "parent": "POS Profile", + "parent_doctype": null, + "parentfield": "links", + "parenttype": "DocType", + "table_fieldname": null + } + ], + "property_setters": [ + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-07-23 14:55:10.037064", + "default_value": null, + "doc_type": "POS Profile", + "docstatus": 0, + "doctype_or_field": "DocType", + "field_name": null, + "idx": 0, + "is_system_generated": 0, + "modified": "2025-07-23 14:55:10.037064", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-main-field_order", + "owner": "Administrator", + "property": "field_order", + "property_type": "Data", + "row_name": null, + "value": "[\"company\", \"customer\", \"country\", \"disabled\", \"custom_have_token\", \"column_break_9\", \"warehouse\", \"campaign\", \"company_address\", \"posa_pos_awesome_settings\", \"posa_cash_mode_of_payment\", \"posa_allow_delete\", \"posa_allow_user_to_edit_rate\", \"posa_allow_user_to_edit_additional_discount\", \"posa_use_percentage_discount\", \"posa_max_discount_allowed\", \"posa_scale_barcode_start\", \"posa_allow_change_posting_date\", \"posa_default_card_view\", \"posa_default_sales_order\", \"posa_col_1\", \"posa_allow_user_to_edit_item_discount\", \"posa_display_items_in_stock\", \"posa_allow_partial_payment\", \"posa_allow_credit_sale\", \"posa_allow_return\", \"posa_apply_customer_discount\", \"use_cashback\", \"use_customer_credit\", \"posa_hide_closing_shift\", \"posa_auto_set_batch\", \"posa_display_item_code\", \"posa_allow_zero_rated_items\", \"hide_expected_amount\", \"posa_column_break_112\", \"posa_allow_sales_order\", \"posa_show_template_items\", \"posa_hide_variants_items\", \"posa_fetch_coupon\", \"posa_allow_customer_purchase_order\", \"posa_allow_print_last_invoice\", \"posa_display_additional_notes\", \"posa_allow_write_off_change\", \"posa_new_line\", \"posa_input_qty\", \"posa_allow_print_draft_invoices\", \"posa_use_delivery_charges\", \"posa_auto_set_delivery_charges\", \"posa_allow_duplicate_customer_names\", \"pos_awesome_payments\", \"posa_use_pos_awesome_payments\", \"column_break_uolvm\", \"posa_allow_make_new_payments\", \"posa_allow_reconcile_payments\", \"posa_allow_mpesa_reconcile_payments\", \"posa_pos_awesome_advance_settings\", \"posa_allow_submissions_in_background_job\", \"posa_search_serial_no\", \"posa_search_batch_no\", \"posa_tax_inclusive\", \"column_break_dqsba\", \"posa_local_storage\", \"posa_use_server_cache\", \"posa_server_cache_duration\", \"column_break_anyol\", \"pose_use_limit_search\", \"posa_search_limit\", \"custom_allow_select_sales_order\", \"section_break_15\", \"applicable_for_users\", \"section_break_11\", \"payments\", \"section_break_14\", \"hide_images\", \"hide_unavailable_items\", \"auto_add_item_to_cart\", \"validate_stock_on_save\", \"column_break_16\", \"update_stock\", \"ignore_pricing_rule\", \"allow_rate_change\", \"allow_discount_change\", \"section_break_23\", \"item_groups\", \"column_break_25\", \"customer_groups\", \"section_break_16\", \"print_format\", \"letter_head\", \"column_break0\", \"tc_name\", \"select_print_heading\", \"section_break_19\", \"selling_price_list\", \"currency\", \"write_off_account\", \"write_off_cost_center\", \"write_off_limit\", \"account_for_change_amount\", \"disable_rounded_total\", \"column_break_23\", \"income_account\", \"expense_account\", \"taxes_and_charges\", \"tax_category\", \"apply_discount_on\", \"accounting_dimensions_section\", \"cost_center\", \"dimension_col_break\"]" + } + ], + "sync_on_migrate": 1 +} \ No newline at end of file diff --git a/posawesome/public/js/posapp/components/pos/Invoice.vue b/posawesome/public/js/posapp/components/pos/Invoice.vue index 632d3a91d0..a043853ccc 100644 --- a/posawesome/public/js/posapp/components/pos/Invoice.vue +++ b/posawesome/public/js/posapp/components/pos/Invoice.vue @@ -1122,24 +1122,28 @@ export default { if (doc.name || doc.items.length) { old_invoice = this.update_invoice(doc); - // ✅ Only show dialog if docstatus is 0 (Draft) - if (old_invoice && old_invoice.docstatus === 0) { + if ( + old_invoice && + old_invoice.docstatus === 0 && + this.pos_profile.custom_have_token === 1 + ) { const token = old_invoice.name.slice(-5); const posting_date = frappe.datetime.str_to_user(old_invoice.posting_date); - const posting_time = old_invoice.posting_time?.split('.')[0] || frappe.datetime.now_time(); + const posting_time = + old_invoice.posting_time?.split(".")[0] || frappe.datetime.now_time(); const d = new frappe.ui.Dialog({ - title: 'Token', + title: "Token", fields: [ { - fieldname: 'token', - fieldtype: 'HTML', - options: `
${token}
` - } + fieldname: "token", + fieldtype: "HTML", + options: `
${token}
`, + }, ], - primary_action_label: 'Print', + primary_action_label: "Print", primary_action() { - const print_window = window.open('', '', 'height=600,width=400'); + const print_window = window.open("", "", "height=600,width=400"); print_window.document.write(` @@ -1191,7 +1195,7 @@ export default { print_window.focus(); print_window.print(); print_window.close(); - } + }, }); d.show(); From 0130afef9beb658d90f61952a0dca3703593a710 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Tue, 29 Jul 2025 22:10:49 +0530 Subject: [PATCH 03/25] fix:Item Wise Return --- posawesome/posawesome/api/posapp.py | 35 ++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/posawesome/posawesome/api/posapp.py b/posawesome/posawesome/api/posapp.py index d92dacafcc..9b086f3441 100644 --- a/posawesome/posawesome/api/posapp.py +++ b/posawesome/posawesome/api/posapp.py @@ -505,21 +505,50 @@ def update_invoice(data): invoice_doc.flags.ignore_permissions = True frappe.flags.ignore_account_permission = True + # Handle returns if invoice_doc.is_return and invoice_doc.return_against: - ref_doc = frappe.get_cached_doc(invoice_doc.doctype, invoice_doc.return_against) + ref_doc = frappe.get_doc("Sales Invoice", invoice_doc.return_against) + if not ref_doc.update_stock: invoice_doc.update_stock = 0 + if len(invoice_doc.payments) == 0: invoice_doc.payments = ref_doc.payments + invoice_doc.paid_amount = ( invoice_doc.rounded_total or invoice_doc.grand_total or invoice_doc.total ) + for payment in invoice_doc.payments: if payment.default: payment.amount = invoice_doc.paid_amount + + # ✅ Match return items with original invoice items + for return_item in invoice_doc.items: + match_found = False + for original_item in ref_doc.items: + if return_item.item_code == original_item.item_code: + return_item.sales_invoice = ref_doc.name + return_item.sales_invoice_item = original_item.name + return_item.rate = original_item.rate + return_item.uom = original_item.uom + return_item.income_account = original_item.income_account + return_item.cost_center = original_item.cost_center + return_item.warehouse = original_item.warehouse + match_found = True + break + if not match_found: + frappe.throw( + _("Row # {0}: Returned Item {1} does not exist in Sales Invoice {2}").format( + return_item.idx, return_item.item_code, ref_doc.name + ) + ) + + # Validate zero-rated items allow_zero_rated_items = frappe.get_cached_value( "POS Profile", invoice_doc.pos_profile, "posa_allow_zero_rated_items" ) + for item in invoice_doc.items: if not item.rate or item.rate == 0: if allow_zero_rated_items: @@ -531,8 +560,10 @@ def update_invoice(data): ) else: item.is_free_item = 0 + add_taxes_from_tax_template(item, invoice_doc) + # Tax inclusion flag if frappe.get_cached_value( "POS Profile", invoice_doc.pos_profile, "posa_tax_inclusive" ): @@ -540,6 +571,7 @@ def update_invoice(data): for tax in invoice_doc.taxes: tax.included_in_print_rate = 1 + # Set posting time if backdated today_date = getdate() if ( invoice_doc.get("posting_date") @@ -551,6 +583,7 @@ def update_invoice(data): return invoice_doc + @frappe.whitelist() def submit_invoice(invoice, data): data = json.loads(data) From abca43ad1a982eba67c908963238573f2f61ba10 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Thu, 31 Jul 2025 23:32:53 +0530 Subject: [PATCH 04/25] fix:ERPNext core validation (validate_pos) throws error for Paid + Write-off > Grand Total (even for returns) --- posawesome/hooks.py | 3 +++ posawesome/overrides/custom_sales_invoice.py | 13 ++++++++++ posawesome/posawesome/api/posapp.py | 27 ++++++++++++++------ 3 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 posawesome/overrides/custom_sales_invoice.py diff --git a/posawesome/hooks.py b/posawesome/hooks.py index 75158395d7..f5dcf41e2b 100644 --- a/posawesome/hooks.py +++ b/posawesome/hooks.py @@ -93,6 +93,9 @@ # --------------- # Hook on document methods and events +override_doctype_class = { + "Sales Invoice": "posawesome.overrides.custom_sales_invoice.SalesInvoice" +} doc_events = { "Sales Invoice": { "validate": "posawesome.posawesome.api.invoice.validate", diff --git a/posawesome/overrides/custom_sales_invoice.py b/posawesome/overrides/custom_sales_invoice.py new file mode 100644 index 0000000000..144d02a2f9 --- /dev/null +++ b/posawesome/overrides/custom_sales_invoice.py @@ -0,0 +1,13 @@ +from erpnext.accounts.doctype.sales_invoice.sales_invoice import SalesInvoice as BaseSalesInvoice +from frappe.utils import flt +from frappe import _ +import frappe + +class SalesInvoice(BaseSalesInvoice): + def validate_pos(self): + if self.is_return: + invoice_total = self.rounded_total or self.grand_total + if flt(self.paid_amount) + flt(self.write_off_amount) - abs(flt(invoice_total)) > 1.0 / ( + 10.0 ** (self.precision("grand_total") + 1.0) + ): + frappe.throw(_("Paid amount + Write Off Amount can not be greater than Grand Total")) diff --git a/posawesome/posawesome/api/posapp.py b/posawesome/posawesome/api/posapp.py index 9b086f3441..f38f3e7728 100644 --- a/posawesome/posawesome/api/posapp.py +++ b/posawesome/posawesome/api/posapp.py @@ -495,6 +495,7 @@ def update_invoice_from_order(data): @frappe.whitelist() def update_invoice(data): data = json.loads(data) + if data.get("name"): invoice_doc = frappe.get_doc("Sales Invoice", data.get("name")) invoice_doc.update(data) @@ -515,14 +516,6 @@ def update_invoice(data): if len(invoice_doc.payments) == 0: invoice_doc.payments = ref_doc.payments - invoice_doc.paid_amount = ( - invoice_doc.rounded_total or invoice_doc.grand_total or invoice_doc.total - ) - - for payment in invoice_doc.payments: - if payment.default: - payment.amount = invoice_doc.paid_amount - # ✅ Match return items with original invoice items for return_item in invoice_doc.items: match_found = False @@ -579,11 +572,29 @@ def update_invoice(data): ): invoice_doc.set_posting_time = 1 + # ✅ Enforce payment/reset again just before saving + if invoice_doc.is_return: + invoice_doc.paid_amount = 0.0 + invoice_doc.write_off_amount = 0.0 + for payment in invoice_doc.payments: + payment.amount = 0.0 + + # 🔍 Debug logs + print("====== RETURN INVOICE DEBUG ======") + print("is_return:", invoice_doc.is_return) + print("paid_amount:", invoice_doc.paid_amount) + print("write_off_amount:", invoice_doc.write_off_amount) + print("grand_total:", invoice_doc.grand_total) + print("total:", invoice_doc.total) + print("payments:", [p.amount for p in invoice_doc.payments]) + print("==================================") + invoice_doc.save() return invoice_doc + @frappe.whitelist() def submit_invoice(invoice, data): data = json.loads(data) From 5698004617d97fa13f5dd2cfd62d163cfdeb036b Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Sat, 2 Aug 2025 00:06:59 +0530 Subject: [PATCH 05/25] =?UTF-8?q?=1B[200~feat(return-invoice):=20exclude?= =?UTF-8?q?=20already=20returned=20items=20(qty=20=3D=200)=20from=20return?= =?UTF-8?q?=20submission?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- posawesome/overrides/custom_sales_invoice.py | 2 + posawesome/posawesome/api/posapp.py | 56 +++++++++++++++---- .../js/posapp/components/pos/Returns.vue | 12 +++- 3 files changed, 57 insertions(+), 13 deletions(-) diff --git a/posawesome/overrides/custom_sales_invoice.py b/posawesome/overrides/custom_sales_invoice.py index 144d02a2f9..f6ed62188a 100644 --- a/posawesome/overrides/custom_sales_invoice.py +++ b/posawesome/overrides/custom_sales_invoice.py @@ -1,3 +1,5 @@ +# Custom override of Sales Invoice to bypass POS validation error on returns +# ERPNext core validation (validate_pos) throws error for Paid + Write-off > Grand Total (even for returns) from erpnext.accounts.doctype.sales_invoice.sales_invoice import SalesInvoice as BaseSalesInvoice from frappe.utils import flt from frappe import _ diff --git a/posawesome/posawesome/api/posapp.py b/posawesome/posawesome/api/posapp.py index f38f3e7728..55c96067b9 100644 --- a/posawesome/posawesome/api/posapp.py +++ b/posawesome/posawesome/api/posapp.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import json import frappe +import copy from frappe.utils import nowdate, flt, cstr, getdate from frappe import _ from erpnext.accounts.doctype.sales_invoice.sales_invoice import get_bank_cash_account @@ -1264,20 +1265,55 @@ def search_invoices_for_return(invoice_name, company): "is_return": 0, }, fields=["name"], - limit_page_length=0, order_by="customer", ) + data = [] - is_returned = frappe.get_all( - "Sales Invoice", - filters={"return_against": invoice_name, "docstatus": 1}, - fields=["name"], - order_by="customer", - ) - if len(is_returned): - return data + for invoice in invoices_list: - data.append(frappe.get_doc("Sales Invoice", invoice["name"])) + original = frappe.get_doc("Sales Invoice", invoice["name"]) + + # Get all return invoices for this invoice + return_invoices = frappe.get_all( + "Sales Invoice", + filters={"return_against": original.name, "docstatus": 1}, + fields=["name"] + ) + + # Build map: item_code -> total returned qty + returned_qty_map = {} + for ret in return_invoices: + ret_doc = frappe.get_doc("Sales Invoice", ret.name) + for item in ret_doc.items: + returned_qty_map[item.item_code] = returned_qty_map.get(item.item_code, 0) + abs(item.qty) + + has_returnable_items = False + updated_items = [] + + for item in original.items: + returned_qty = returned_qty_map.get(item.item_code, 0) + remaining_qty = item.qty - returned_qty + + # Copy item + new_item = copy.deepcopy(item) + + if remaining_qty > 0: + # Mark item for return (negate qty & recalc amounts) + new_item.qty = -remaining_qty + new_item.stock_qty = -(item.stock_qty / item.qty) * remaining_qty if item.qty else 0 + new_item.amount = -(item.amount / item.qty) * remaining_qty if item.qty else 0 + has_returnable_items = True + else: + new_item.qty = 0 + new_item.stock_qty = 0 + new_item.amount = 0 + + updated_items.append(new_item) + + if has_returnable_items: + original.set("items", updated_items) + data.append(original) + return data diff --git a/posawesome/public/js/posapp/components/pos/Returns.vue b/posawesome/public/js/posapp/components/pos/Returns.vue index 5f0e1c5e63..df25723c69 100644 --- a/posawesome/public/js/posapp/components/pos/Returns.vue +++ b/posawesome/public/js/posapp/components/pos/Returns.vue @@ -135,22 +135,28 @@ export default { const return_doc = this.selected[0]; const invoice_doc = {}; const items = []; + return_doc.items.forEach((item) => { const new_item = { ...item }; - new_item.qty = item.qty * -1; - new_item.stock_qty = item.stock_qty * -1; - new_item.amount = item.amount * -1; + + new_item.qty = item.qty; + new_item.stock_qty = item.stock_qty; + new_item.amount = item.amount; + items.push(new_item); }); + invoice_doc.items = items; invoice_doc.is_return = 1; invoice_doc.return_against = return_doc.name; invoice_doc.customer = return_doc.customer; + const data = { invoice_doc, return_doc }; evntBus.$emit('load_return_invoice', data); this.invoicesDialog = false; } }, + }, created: function () { evntBus.$on('open_returns', (data) => { From e50bbd9ea3c4e0252c0fac6dfec6b4c6b24d6330 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Mon, 4 Aug 2025 23:48:38 +0530 Subject: [PATCH 06/25] feature:Selecting Mode of Payment while return --- posawesome/posawesome/api/posapp.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/posawesome/posawesome/api/posapp.py b/posawesome/posawesome/api/posapp.py index 55c96067b9..4c83759873 100644 --- a/posawesome/posawesome/api/posapp.py +++ b/posawesome/posawesome/api/posapp.py @@ -517,7 +517,6 @@ def update_invoice(data): if len(invoice_doc.payments) == 0: invoice_doc.payments = ref_doc.payments - # ✅ Match return items with original invoice items for return_item in invoice_doc.items: match_found = False for original_item in ref_doc.items: @@ -573,22 +572,17 @@ def update_invoice(data): ): invoice_doc.set_posting_time = 1 - # ✅ Enforce payment/reset again just before saving + # Enforce payment reset if invoice_doc.is_return: invoice_doc.paid_amount = 0.0 invoice_doc.write_off_amount = 0.0 for payment in invoice_doc.payments: payment.amount = 0.0 - # 🔍 Debug logs - print("====== RETURN INVOICE DEBUG ======") - print("is_return:", invoice_doc.is_return) - print("paid_amount:", invoice_doc.paid_amount) - print("write_off_amount:", invoice_doc.write_off_amount) - print("grand_total:", invoice_doc.grand_total) - print("total:", invoice_doc.total) - print("payments:", [p.amount for p in invoice_doc.payments]) - print("==================================") + # ✅ Show message (not throw) if no payment selected + has_payment = any(flt(p.amount) > 0 for p in invoice_doc.payments) + if not has_payment: + frappe.msgprint(_("Please select a Mode of Payment before submitting the document.")) invoice_doc.save() return invoice_doc @@ -596,6 +590,7 @@ def update_invoice(data): + @frappe.whitelist() def submit_invoice(invoice, data): data = json.loads(data) From ebbf4310c9b997de340ea4716fbec15412ad2466 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Tue, 5 Aug 2025 22:38:45 +0530 Subject: [PATCH 07/25] feature:Sales Person and Sales partner feature --- posawesome/api.py | 22 + posawesome/posawesome/api/posapp.py | 8 + .../posawesome/custom/sales_invoice.json | 1070 +++++++++++++++++ .../sales_commission_payment/__init__.py | 0 .../sales_commission_payment.js | 8 + .../sales_commission_payment.json | 64 + .../sales_commission_payment.py | 8 + .../test_sales_commission_payment.py | 9 + .../__init__.py | 0 .../sales_partner_commission_payment.js | 8 + .../sales_partner_commission_payment.json | 64 + .../sales_partner_commission_payment.py | 8 + .../test_sales_partner_commission_payment.py | 9 + .../js/posapp/components/pos/Payments.vue | 80 +- 14 files changed, 1357 insertions(+), 1 deletion(-) create mode 100644 posawesome/api.py create mode 100644 posawesome/posawesome/custom/sales_invoice.json create mode 100644 posawesome/posawesome/doctype/sales_commission_payment/__init__.py create mode 100644 posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.js create mode 100644 posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json create mode 100644 posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.py create mode 100644 posawesome/posawesome/doctype/sales_commission_payment/test_sales_commission_payment.py create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_payment/__init__.py create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.js create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.py create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_payment/test_sales_partner_commission_payment.py diff --git a/posawesome/api.py b/posawesome/api.py new file mode 100644 index 0000000000..5c90801234 --- /dev/null +++ b/posawesome/api.py @@ -0,0 +1,22 @@ +# posawesome/posawesome/api.py + +import frappe +from frappe import _ + +@frappe.whitelist() +def pay_commission(sales_invoice): + if not sales_invoice: + frappe.throw(_("Sales Invoice is required.")) + + # Update the commission_paid check field + frappe.db.set_value("Sales Invoice", sales_invoice, "custom_commisstion_paid", 1) + frappe.db.commit() + +@frappe.whitelist() +def pay_partner_commission(sales_invoice): + if not sales_invoice: + frappe.throw(_("Sales Invoice is required.")) + + # Update the commission_paid check field + frappe.db.set_value("Sales Invoice", sales_invoice, "custom_partner_commission_paid", 1) + frappe.db.commit() diff --git a/posawesome/posawesome/api/posapp.py b/posawesome/posawesome/api/posapp.py index 4c83759873..f3d7be53f0 100644 --- a/posawesome/posawesome/api/posapp.py +++ b/posawesome/posawesome/api/posapp.py @@ -451,6 +451,14 @@ def get_sales_person_names(): ) return sales_persons +@frappe.whitelist() +def get_sales_partner_names(): + sales_partners = frappe.get_list( + "Sales Partner", + fields=["name", "partner_name"], + limit_page_length=100000, + ) + return sales_partners def add_taxes_from_tax_template(item, parent_doc): accounts_settings = frappe.get_cached_doc("Accounts Settings") diff --git a/posawesome/posawesome/custom/sales_invoice.json b/posawesome/posawesome/custom/sales_invoice.json new file mode 100644 index 0000000000..4a2ec1c1e8 --- /dev/null +++ b/posawesome/posawesome/custom/sales_invoice.json @@ -0,0 +1,1070 @@ +{ + "custom_fields": [ + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 1, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-04 15:05:06.666421", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_commisstion_paid", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 221, + "ignore_user_permissions": 1, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 0, + "insert_after": "repost_required", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Commisstion Paid", + "length": 0, + "mandatory_depends_on": null, + "modified": "2025-08-04 15:05:06.666421", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-custom_commisstion_paid", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:31:16.642411", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_additional_notes_section", + "fieldtype": "Section Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 184, + "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": "against_income_account", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Additional Notes", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-21 15:22:41.138670", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_additional_notes_section", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:31:17.957229", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_column_break_111", + "fieldtype": "Column Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 186, + "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": "posa_notes", + "is_system_generated": 0, + "is_virtual": 0, + "label": "", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-21 15:34:20.311391", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_column_break_111", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:31:16.006207", + "default": "", + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_coupons", + "fieldtype": "Table", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 99, + "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": "posa_offers", + "is_system_generated": 0, + "is_virtual": 0, + "label": "POS Coupons Detail", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-07-25 01:18:29.588465", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_coupons", + "no_copy": 0, + "non_negative": 0, + "options": "POS Coupon Detail", + "owner": "Administrator", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:31:11.465114", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": "shipping_address_name.posa_delivery_charges", + "fetch_if_empty": 1, + "fieldname": "posa_delivery_charges", + "fieldtype": "Link", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 59, + "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": 0, + "is_virtual": 0, + "label": "Delivery Charges", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-07-25 11:49:02.312879", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_delivery_charges", + "no_copy": 0, + "non_negative": 0, + "options": "Delivery Charges", + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:31:12.472772", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_delivery_charges_rate", + "fieldtype": "Currency", + "hidden": 1, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 60, + "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": "posa_delivery_charges", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Delivery Charges Rate", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-07-25 11:49:04.797031", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_delivery_charges_rate", + "no_copy": 0, + "non_negative": 0, + "options": "currency", + "owner": "Administrator", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:31:18.631096", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_delivery_date", + "fieldtype": "Date", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 187, + "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": "posa_column_break_111", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Delivery Date", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-21 15:34:20.754955", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_delivery_date", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:30:47.403452", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_is_printed", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 18, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 1, + "insert_after": "posa_pos_opening_shift", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Printed", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-11-02 02:48:23.877227", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_is_printed", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:31:17.294341", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_notes", + "fieldtype": "Small Text", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 185, + "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": "posa_additional_notes_section", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Additional Notes", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-21 15:23:30.034080", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_notes", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 1, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:31:15.322943", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_offers", + "fieldtype": "Table", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 98, + "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": "pricing_rules", + "is_system_generated": 0, + "is_virtual": 0, + "label": "POS Offers Detail", + "length": 0, + "mandatory_depends_on": null, + "modified": "2021-06-07 01:47:11.410905", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_offers", + "no_copy": 0, + "non_negative": 0, + "options": "POS Offer Detail", + "owner": "Administrator", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-01 13:30:46.053475", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_pos_opening_shift", + "fieldtype": "Data", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 17, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_preview": 0, + "in_standard_filter": 1, + "insert_after": "pos_profile", + "is_system_generated": 0, + "is_virtual": 0, + "label": "POS Shift", + "length": 0, + "mandatory_depends_on": null, + "modified": "2020-09-27 03:15:11.844405", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_pos_opening_shift", + "no_copy": 1, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "print_width": null, + "read_only": 1, + "read_only_depends_on": null, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "sort_options": 0, + "translatable": 1, + "unique": 0, + "width": null + } + ], + "custom_perms": [], + "doctype": "Sales Invoice", + "links": [ + { + "creation": "2022-01-25 10:29:57.771398", + "custom": 0, + "docstatus": 0, + "group": "Reference", + "hidden": 0, + "idx": 1, + "is_child_table": 0, + "link_doctype": "POS Invoice", + "link_fieldname": "consolidated_invoice", + "modified": "2025-05-26 22:40:20.507907", + "modified_by": "Administrator", + "name": "sh6tck0ce4", + "owner": "Administrator", + "parent": "Sales Invoice", + "parent_doctype": null, + "parentfield": "links", + "parenttype": "DocType", + "table_fieldname": null + } + ], + "property_setters": [ + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-05-26 12:15:40.519677", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "additional_discount_account", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-05-26 12:15:40.519677", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-additional_discount_account-hidden", + "owner": "Administrator", + "property": "hidden", + "property_type": "Check", + "row_name": null, + "value": "1" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-05-26 12:15:40.527614", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "additional_discount_account", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-05-26 12:15:40.527614", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-additional_discount_account-mandatory_depends_on", + "owner": "Administrator", + "property": "mandatory_depends_on", + "property_type": "Code", + "row_name": null, + "value": "" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-07-30 13:51:56.704932", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "base_rounded_total", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-07-30 13:51:56.704932", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-base_rounded_total-hidden", + "owner": "Administrator", + "property": "hidden", + "property_type": "Check", + "row_name": null, + "value": "0" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-07-30 13:51:56.736390", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "base_rounded_total", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-07-30 13:51:56.736390", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-base_rounded_total-print_hide", + "owner": "Administrator", + "property": "print_hide", + "property_type": "Check", + "row_name": null, + "value": "1" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-07-30 13:51:56.835647", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "disable_rounded_total", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-07-30 13:51:56.835647", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-disable_rounded_total-default", + "owner": "Administrator", + "property": "default", + "property_type": "Text", + "row_name": null, + "value": "0" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-05-26 22:41:29.571469", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "due_date", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-05-26 22:41:29.571469", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-due_date-print_hide", + "owner": "Administrator", + "property": "print_hide", + "property_type": "Check", + "row_name": null, + "value": "0" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-07-30 13:51:57.855356", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "in_words", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-07-30 13:51:57.855356", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-in_words-hidden", + "owner": "Administrator", + "property": "hidden", + "property_type": "Check", + "row_name": null, + "value": "0" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-07-30 13:51:57.889513", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "in_words", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-07-30 13:51:57.889513", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-in_words-print_hide", + "owner": "Administrator", + "property": "print_hide", + "property_type": "Check", + "row_name": null, + "value": "0" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-08-04 15:29:20.710938", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocType", + "field_name": null, + "idx": 0, + "is_system_generated": 0, + "modified": "2025-08-04 15:29:20.710938", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-main-field_order", + "owner": "Administrator", + "property": "field_order", + "property_type": "Data", + "row_name": null, + "value": "[\"customer_section\", \"title\", \"naming_series\", \"customer\", \"customer_name\", \"tax_id\", \"company\", \"company_tax_id\", \"column_break1\", \"posting_date\", \"posting_time\", \"set_posting_time\", \"due_date\", \"column_break_14\", \"is_pos\", \"pos_profile\", \"posa_pos_opening_shift\", \"posa_is_printed\", \"is_consolidated\", \"is_return\", \"return_against\", \"update_outstanding_for_self\", \"update_billed_amount_in_sales_order\", \"update_billed_amount_in_delivery_note\", \"is_debit_note\", \"amended_from\", \"accounting_dimensions_section\", \"cost_center\", \"dimension_col_break\", \"project\", \"currency_and_price_list\", \"currency\", \"conversion_rate\", \"column_break2\", \"selling_price_list\", \"price_list_currency\", \"plc_conversion_rate\", \"ignore_pricing_rule\", \"items_section\", \"scan_barcode\", \"update_stock\", \"column_break_39\", \"set_warehouse\", \"set_target_warehouse\", \"section_break_42\", \"items\", \"section_break_30\", \"total_qty\", \"total_net_weight\", \"column_break_32\", \"base_total\", \"base_net_total\", \"column_break_52\", \"total\", \"net_total\", \"taxes_section\", \"tax_category\", \"taxes_and_charges\", \"posa_delivery_charges\", \"posa_delivery_charges_rate\", \"column_break_38\", \"shipping_rule\", \"column_break_55\", \"incoterm\", \"named_place\", \"section_break_40\", \"taxes\", \"section_break_43\", \"base_total_taxes_and_charges\", \"column_break_47\", \"total_taxes_and_charges\", \"totals\", \"base_grand_total\", \"base_rounding_adjustment\", \"base_rounded_total\", \"base_in_words\", \"column_break5\", \"grand_total\", \"rounding_adjustment\", \"use_company_roundoff_cost_center\", \"rounded_total\", \"in_words\", \"total_advance\", \"outstanding_amount\", \"disable_rounded_total\", \"section_break_49\", \"apply_discount_on\", \"base_discount_amount\", \"is_cash_or_non_trade_discount\", \"additional_discount_account\", \"column_break_51\", \"additional_discount_percentage\", \"discount_amount\", \"sec_tax_breakup\", \"other_charges_calculation\", \"pricing_rule_details\", \"pricing_rules\", \"posa_offers\", \"posa_coupons\", \"packing_list\", \"packed_items\", \"product_bundle_help\", \"time_sheet_list\", \"timesheets\", \"section_break_104\", \"total_billing_hours\", \"column_break_106\", \"total_billing_amount\", \"payments_tab\", \"payments_section\", \"cash_bank_account\", \"payments\", \"section_break_84\", \"base_paid_amount\", \"column_break_86\", \"paid_amount\", \"section_break_88\", \"base_change_amount\", \"column_break_90\", \"change_amount\", \"account_for_change_amount\", \"advances_section\", \"allocate_advances_automatically\", \"only_include_allocated_payments\", \"get_advances\", \"advances\", \"write_off_section\", \"write_off_amount\", \"base_write_off_amount\", \"write_off_outstanding_amount_automatically\", \"column_break_74\", \"write_off_account\", \"write_off_cost_center\", \"loyalty_points_redemption\", \"redeem_loyalty_points\", \"loyalty_points\", \"loyalty_amount\", \"column_break_77\", \"loyalty_program\", \"dont_create_loyalty_points\", \"loyalty_redemption_account\", \"loyalty_redemption_cost_center\", \"contact_and_address_tab\", \"address_and_contact\", \"customer_address\", \"address_display\", \"col_break4\", \"contact_person\", \"contact_display\", \"contact_mobile\", \"contact_email\", \"territory\", \"shipping_address_section\", \"shipping_address_name\", \"shipping_address\", \"shipping_addr_col_break\", \"dispatch_address_name\", \"dispatch_address\", \"company_address_section\", \"company_address\", \"company_address_display\", \"company_addr_col_break\", \"company_contact_person\", \"terms_tab\", \"payment_schedule_section\", \"ignore_default_payment_terms_template\", \"payment_terms_template\", \"payment_schedule\", \"terms_section_break\", \"tc_name\", \"terms\", \"more_info_tab\", \"customer_po_details\", \"po_no\", \"column_break_23\", \"po_date\", \"more_info\", \"debit_to\", \"party_account_currency\", \"is_opening\", \"column_break8\", \"unrealized_profit_loss_account\", \"against_income_account\", \"posa_additional_notes_section\", \"posa_notes\", \"posa_column_break_111\", \"posa_delivery_date\", \"sales_team_section_break\", \"sales_partner\", \"amount_eligible_for_commission\", \"column_break10\", \"commission_rate\", \"total_commission\", \"section_break2\", \"sales_team\", \"edit_printing_settings\", \"letter_head\", \"group_same_items\", \"column_break_84\", \"select_print_heading\", \"language\", \"subscription_section\", \"from_date\", \"auto_repeat\", \"column_break_140\", \"to_date\", \"update_auto_repeat_reference\", \"more_information\", \"status\", \"inter_company_invoice_reference\", \"campaign\", \"represents_company\", \"source\", \"customer_group\", \"col_break23\", \"is_internal_customer\", \"is_discounted\", \"remarks\", \"connections_tab\", \"repost_required\", \"custom_commisstion_paid\"]" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-05-26 22:41:29.576608", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "payment_schedule", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-05-26 22:41:29.576608", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-payment_schedule-print_hide", + "owner": "Administrator", + "property": "print_hide", + "property_type": "Check", + "row_name": null, + "value": "1" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-08-01 13:30:39.757266", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "posa_pos_opening_shift", + "idx": 0, + "is_system_generated": 0, + "modified": "2020-10-26 15:35:40.861492", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-posa_pos_opening_shift-no_copy", + "owner": "Administrator", + "property": "no_copy", + "property_type": "Check", + "row_name": null, + "value": "1" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-07-30 13:51:56.771070", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "rounded_total", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-07-30 13:51:56.771070", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-rounded_total-hidden", + "owner": "Administrator", + "property": "hidden", + "property_type": "Check", + "row_name": null, + "value": "0" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-07-30 13:51:56.804968", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "rounded_total", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-07-30 13:51:56.804968", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-rounded_total-print_hide", + "owner": "Administrator", + "property": "print_hide", + "property_type": "Check", + "row_name": null, + "value": "0" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-05-26 12:15:44.644311", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "scan_barcode", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-05-26 12:15:44.644311", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-scan_barcode-hidden", + "owner": "Administrator", + "property": "hidden", + "property_type": "Check", + "row_name": null, + "value": "0" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-05-26 12:15:40.443431", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "tax_id", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-05-26 12:15:40.443431", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-tax_id-hidden", + "owner": "Administrator", + "property": "hidden", + "property_type": "Check", + "row_name": null, + "value": "0" + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "creation": "2025-05-26 12:15:40.453339", + "default_value": null, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype_or_field": "DocField", + "field_name": "tax_id", + "idx": 0, + "is_system_generated": 1, + "modified": "2025-05-26 12:15:40.453339", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-tax_id-print_hide", + "owner": "Administrator", + "property": "print_hide", + "property_type": "Check", + "row_name": null, + "value": "0" + } + ], + "sync_on_migrate": 1 +} \ No newline at end of file diff --git a/posawesome/posawesome/doctype/sales_commission_payment/__init__.py b/posawesome/posawesome/doctype/sales_commission_payment/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.js b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.js new file mode 100644 index 0000000000..e2d35b3378 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.js @@ -0,0 +1,8 @@ +// Copyright (c) 2025, Youssef Restom and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Sales Commission Payment', { + // refresh: function(frm) { + + // } +}); diff --git a/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json new file mode 100644 index 0000000000..32b5c46279 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json @@ -0,0 +1,64 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2025-08-04 15:10:14.047579", + "default_view": "List", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "sales_person", + "commission", + "mode_of_payment", + "reference_sales_invoice" + ], + "fields": [ + { + "fieldname": "sales_person", + "fieldtype": "Link", + "label": "Sales Person", + "options": "Sales Person" + }, + { + "fieldname": "commission", + "fieldtype": "Currency", + "label": "Commission" + }, + { + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "label": "Mode Of Payment", + "options": "Mode of Payment" + }, + { + "fieldname": "reference_sales_invoice", + "fieldtype": "Link", + "label": "Reference Sales Invoice", + "options": "Sales Invoice" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2025-08-04 15:25:48.953724", + "modified_by": "Administrator", + "module": "POSAwesome", + "name": "Sales Commission Payment", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.py b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.py new file mode 100644 index 0000000000..33af8cdf70 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.py @@ -0,0 +1,8 @@ +# Copyright (c) 2025, Youssef Restom and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class SalesCommissionPayment(Document): + pass diff --git a/posawesome/posawesome/doctype/sales_commission_payment/test_sales_commission_payment.py b/posawesome/posawesome/doctype/sales_commission_payment/test_sales_commission_payment.py new file mode 100644 index 0000000000..0adf647d53 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_commission_payment/test_sales_commission_payment.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, Youssef Restom and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestSalesCommissionPayment(FrappeTestCase): + pass diff --git a/posawesome/posawesome/doctype/sales_partner_commission_payment/__init__.py b/posawesome/posawesome/doctype/sales_partner_commission_payment/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.js b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.js new file mode 100644 index 0000000000..49954666f1 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.js @@ -0,0 +1,8 @@ +// Copyright (c) 2025, Youssef Restom and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Sales Partner Commission Payment', { + // refresh: function(frm) { + + // } +}); diff --git a/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json new file mode 100644 index 0000000000..d26dbc392d --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json @@ -0,0 +1,64 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2025-08-05 11:49:17.435603", + "default_view": "List", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "sales_partner", + "commission", + "mode_of_payment", + "reference_sales_invoice" + ], + "fields": [ + { + "fieldname": "commission", + "fieldtype": "Currency", + "label": "Commission" + }, + { + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "label": "Mode Of Payment", + "options": "Mode of Payment" + }, + { + "fieldname": "reference_sales_invoice", + "fieldtype": "Link", + "label": "Reference Sales Invoice", + "options": "Sales Invoice" + }, + { + "fieldname": "sales_partner", + "fieldtype": "Link", + "label": "Sales Partner", + "options": "Sales Partner" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2025-08-05 12:03:47.980553", + "modified_by": "Administrator", + "module": "POSAwesome", + "name": "Sales Partner Commission Payment", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.py b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.py new file mode 100644 index 0000000000..8682155fd3 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.py @@ -0,0 +1,8 @@ +# Copyright (c) 2025, Youssef Restom and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class SalesPartnerCommissionPayment(Document): + pass diff --git a/posawesome/posawesome/doctype/sales_partner_commission_payment/test_sales_partner_commission_payment.py b/posawesome/posawesome/doctype/sales_partner_commission_payment/test_sales_partner_commission_payment.py new file mode 100644 index 0000000000..9ba2a9d4a3 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_payment/test_sales_partner_commission_payment.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, Youssef Restom and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestSalesPartnerCommissionPayment(FrappeTestCase): + pass diff --git a/posawesome/public/js/posapp/components/pos/Payments.vue b/posawesome/public/js/posapp/components/pos/Payments.vue index 3c83a7f156..fc8dd221c8 100644 --- a/posawesome/public/js/posapp/components/pos/Payments.vue +++ b/posawesome/public/js/posapp/components/pos/Payments.vue @@ -622,6 +622,45 @@ + + + + + + + + + + + + @@ -716,6 +755,8 @@ export default { addresses: [], sales_persons: [], sales_person: "", + sales_partner: null, + sales_partners: [], paid_change: 0, order_delivery_date: false, paid_change_rules: [], @@ -851,6 +892,7 @@ export default { this.redeem_customer_credit = false; this.is_cashback = true; this.sales_person = ""; + this.sales_partner = ""; evntBus.$emit("new_invoice", "false"); this.back_to_invoice(); @@ -1086,6 +1128,33 @@ export default { }, }); }, + get_sales_partner_names() { + const vm = this; + if ( + vm.pos_profile.posa_local_storage && + localStorage.sales_partners_storage + ) { + vm.sales_partners = JSON.parse( + localStorage.getItem("sales_partners_storage") + ); + } + frappe.call({ + method: "posawesome.posawesome.api.posapp.get_sales_partner_names", + callback: function (r) { + if (r.message) { + vm.sales_partners = r.message; + if (vm.pos_profile.posa_local_storage) { + localStorage.setItem("sales_partners_storage", ""); + localStorage.setItem( + "sales_partners_storage", + JSON.stringify(r.message) + ); + } + } + }, + }); + }, + salesPersonFilter(item, queryText, itemText) { const textOne = item.sales_person_name ? item.sales_person_name.toLowerCase() @@ -1363,6 +1432,7 @@ export default { this.loyalty_amount = 0; this.get_addresses(); this.get_sales_person_names(); + this.get_sales_partner_names(); }); evntBus.$on("register_pos_profile", (data) => { this.pos_profile = data.pos_profile; @@ -1471,6 +1541,14 @@ export default { this.invoice_doc.sales_team = []; } }, + sales_partner() { + if (this.sales_partner) { + this.invoice_doc.sales_partner = this.sales_partner + } + else { + this.invoice_doc.sales_partner = ""; + } + } }, }; - + \ No newline at end of file From 48fcb7b0f2672ffa4859ee170738261bb4baa240 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Tue, 5 Aug 2025 22:57:36 +0530 Subject: [PATCH 08/25] fix:Customizatio added --- .../posawesome/custom/sales_invoice.json | 99 +++++++++++++++---- 1 file changed, 80 insertions(+), 19 deletions(-) diff --git a/posawesome/posawesome/custom/sales_invoice.json b/posawesome/posawesome/custom/sales_invoice.json index 4a2ec1c1e8..3fa073c664 100644 --- a/posawesome/posawesome/custom/sales_invoice.json +++ b/posawesome/posawesome/custom/sales_invoice.json @@ -35,7 +35,7 @@ "insert_after": "repost_required", "is_system_generated": 0, "is_virtual": 0, - "label": "Commisstion Paid", + "label": "Commission Paid", "length": 0, "mandatory_depends_on": null, "modified": "2025-08-04 15:05:06.666421", @@ -61,6 +61,67 @@ "unique": 0, "width": null }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-05 12:00:55.100497", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "Sales Invoice", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_partner_commission_paid", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 221, + "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": "custom_commisstion_paid", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Partner Commission Paid", + "length": 0, + "mandatory_depends_on": null, + "modified": "2025-08-05 12:00:55.100497", + "modified_by": "Administrator", + "module": null, + "name": "Sales Invoice-custom_partner_commission_paid", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "_assign": null, "_comments": null, @@ -710,7 +771,7 @@ "field_name": "additional_discount_account", "idx": 0, "is_system_generated": 1, - "modified": "2025-05-26 12:15:40.519677", + "modified": "2025-08-04 15:34:19.012406", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-additional_discount_account-hidden", @@ -733,7 +794,7 @@ "field_name": "additional_discount_account", "idx": 0, "is_system_generated": 1, - "modified": "2025-05-26 12:15:40.527614", + "modified": "2025-08-04 15:34:19.022255", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-additional_discount_account-mandatory_depends_on", @@ -756,7 +817,7 @@ "field_name": "base_rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-07-30 13:51:56.704932", + "modified": "2025-08-04 15:34:19.031657", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-base_rounded_total-hidden", @@ -779,7 +840,7 @@ "field_name": "base_rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-07-30 13:51:56.736390", + "modified": "2025-08-04 15:34:19.040909", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-base_rounded_total-print_hide", @@ -802,7 +863,7 @@ "field_name": "disable_rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-07-30 13:51:56.835647", + "modified": "2025-08-04 15:34:19.050806", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-disable_rounded_total-default", @@ -825,7 +886,7 @@ "field_name": "due_date", "idx": 0, "is_system_generated": 1, - "modified": "2025-05-26 22:41:29.571469", + "modified": "2025-08-04 15:34:19.060259", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-due_date-print_hide", @@ -848,7 +909,7 @@ "field_name": "in_words", "idx": 0, "is_system_generated": 1, - "modified": "2025-07-30 13:51:57.855356", + "modified": "2025-08-04 15:34:19.069523", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-in_words-hidden", @@ -871,7 +932,7 @@ "field_name": "in_words", "idx": 0, "is_system_generated": 1, - "modified": "2025-07-30 13:51:57.889513", + "modified": "2025-08-04 15:34:19.078879", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-in_words-print_hide", @@ -886,7 +947,7 @@ "_comments": null, "_liked_by": null, "_user_tags": null, - "creation": "2025-08-04 15:29:20.710938", + "creation": "2025-08-05 12:00:54.678823", "default_value": null, "doc_type": "Sales Invoice", "docstatus": 0, @@ -894,7 +955,7 @@ "field_name": null, "idx": 0, "is_system_generated": 0, - "modified": "2025-08-04 15:29:20.710938", + "modified": "2025-08-05 12:00:54.678823", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-main-field_order", @@ -902,7 +963,7 @@ "property": "field_order", "property_type": "Data", "row_name": null, - "value": "[\"customer_section\", \"title\", \"naming_series\", \"customer\", \"customer_name\", \"tax_id\", \"company\", \"company_tax_id\", \"column_break1\", \"posting_date\", \"posting_time\", \"set_posting_time\", \"due_date\", \"column_break_14\", \"is_pos\", \"pos_profile\", \"posa_pos_opening_shift\", \"posa_is_printed\", \"is_consolidated\", \"is_return\", \"return_against\", \"update_outstanding_for_self\", \"update_billed_amount_in_sales_order\", \"update_billed_amount_in_delivery_note\", \"is_debit_note\", \"amended_from\", \"accounting_dimensions_section\", \"cost_center\", \"dimension_col_break\", \"project\", \"currency_and_price_list\", \"currency\", \"conversion_rate\", \"column_break2\", \"selling_price_list\", \"price_list_currency\", \"plc_conversion_rate\", \"ignore_pricing_rule\", \"items_section\", \"scan_barcode\", \"update_stock\", \"column_break_39\", \"set_warehouse\", \"set_target_warehouse\", \"section_break_42\", \"items\", \"section_break_30\", \"total_qty\", \"total_net_weight\", \"column_break_32\", \"base_total\", \"base_net_total\", \"column_break_52\", \"total\", \"net_total\", \"taxes_section\", \"tax_category\", \"taxes_and_charges\", \"posa_delivery_charges\", \"posa_delivery_charges_rate\", \"column_break_38\", \"shipping_rule\", \"column_break_55\", \"incoterm\", \"named_place\", \"section_break_40\", \"taxes\", \"section_break_43\", \"base_total_taxes_and_charges\", \"column_break_47\", \"total_taxes_and_charges\", \"totals\", \"base_grand_total\", \"base_rounding_adjustment\", \"base_rounded_total\", \"base_in_words\", \"column_break5\", \"grand_total\", \"rounding_adjustment\", \"use_company_roundoff_cost_center\", \"rounded_total\", \"in_words\", \"total_advance\", \"outstanding_amount\", \"disable_rounded_total\", \"section_break_49\", \"apply_discount_on\", \"base_discount_amount\", \"is_cash_or_non_trade_discount\", \"additional_discount_account\", \"column_break_51\", \"additional_discount_percentage\", \"discount_amount\", \"sec_tax_breakup\", \"other_charges_calculation\", \"pricing_rule_details\", \"pricing_rules\", \"posa_offers\", \"posa_coupons\", \"packing_list\", \"packed_items\", \"product_bundle_help\", \"time_sheet_list\", \"timesheets\", \"section_break_104\", \"total_billing_hours\", \"column_break_106\", \"total_billing_amount\", \"payments_tab\", \"payments_section\", \"cash_bank_account\", \"payments\", \"section_break_84\", \"base_paid_amount\", \"column_break_86\", \"paid_amount\", \"section_break_88\", \"base_change_amount\", \"column_break_90\", \"change_amount\", \"account_for_change_amount\", \"advances_section\", \"allocate_advances_automatically\", \"only_include_allocated_payments\", \"get_advances\", \"advances\", \"write_off_section\", \"write_off_amount\", \"base_write_off_amount\", \"write_off_outstanding_amount_automatically\", \"column_break_74\", \"write_off_account\", \"write_off_cost_center\", \"loyalty_points_redemption\", \"redeem_loyalty_points\", \"loyalty_points\", \"loyalty_amount\", \"column_break_77\", \"loyalty_program\", \"dont_create_loyalty_points\", \"loyalty_redemption_account\", \"loyalty_redemption_cost_center\", \"contact_and_address_tab\", \"address_and_contact\", \"customer_address\", \"address_display\", \"col_break4\", \"contact_person\", \"contact_display\", \"contact_mobile\", \"contact_email\", \"territory\", \"shipping_address_section\", \"shipping_address_name\", \"shipping_address\", \"shipping_addr_col_break\", \"dispatch_address_name\", \"dispatch_address\", \"company_address_section\", \"company_address\", \"company_address_display\", \"company_addr_col_break\", \"company_contact_person\", \"terms_tab\", \"payment_schedule_section\", \"ignore_default_payment_terms_template\", \"payment_terms_template\", \"payment_schedule\", \"terms_section_break\", \"tc_name\", \"terms\", \"more_info_tab\", \"customer_po_details\", \"po_no\", \"column_break_23\", \"po_date\", \"more_info\", \"debit_to\", \"party_account_currency\", \"is_opening\", \"column_break8\", \"unrealized_profit_loss_account\", \"against_income_account\", \"posa_additional_notes_section\", \"posa_notes\", \"posa_column_break_111\", \"posa_delivery_date\", \"sales_team_section_break\", \"sales_partner\", \"amount_eligible_for_commission\", \"column_break10\", \"commission_rate\", \"total_commission\", \"section_break2\", \"sales_team\", \"edit_printing_settings\", \"letter_head\", \"group_same_items\", \"column_break_84\", \"select_print_heading\", \"language\", \"subscription_section\", \"from_date\", \"auto_repeat\", \"column_break_140\", \"to_date\", \"update_auto_repeat_reference\", \"more_information\", \"status\", \"inter_company_invoice_reference\", \"campaign\", \"represents_company\", \"source\", \"customer_group\", \"col_break23\", \"is_internal_customer\", \"is_discounted\", \"remarks\", \"connections_tab\", \"repost_required\", \"custom_commisstion_paid\"]" + "value": "[\"customer_section\", \"title\", \"naming_series\", \"customer\", \"customer_name\", \"tax_id\", \"company\", \"company_tax_id\", \"column_break1\", \"posting_date\", \"posting_time\", \"set_posting_time\", \"due_date\", \"column_break_14\", \"is_pos\", \"pos_profile\", \"posa_pos_opening_shift\", \"posa_is_printed\", \"is_consolidated\", \"is_return\", \"return_against\", \"update_outstanding_for_self\", \"update_billed_amount_in_sales_order\", \"update_billed_amount_in_delivery_note\", \"is_debit_note\", \"amended_from\", \"accounting_dimensions_section\", \"cost_center\", \"dimension_col_break\", \"project\", \"currency_and_price_list\", \"currency\", \"conversion_rate\", \"column_break2\", \"selling_price_list\", \"price_list_currency\", \"plc_conversion_rate\", \"ignore_pricing_rule\", \"items_section\", \"scan_barcode\", \"update_stock\", \"column_break_39\", \"set_warehouse\", \"set_target_warehouse\", \"section_break_42\", \"items\", \"section_break_30\", \"total_qty\", \"total_net_weight\", \"column_break_32\", \"base_total\", \"base_net_total\", \"column_break_52\", \"total\", \"net_total\", \"taxes_section\", \"tax_category\", \"taxes_and_charges\", \"posa_delivery_charges\", \"posa_delivery_charges_rate\", \"column_break_38\", \"shipping_rule\", \"column_break_55\", \"incoterm\", \"named_place\", \"section_break_40\", \"taxes\", \"section_break_43\", \"base_total_taxes_and_charges\", \"column_break_47\", \"total_taxes_and_charges\", \"totals\", \"base_grand_total\", \"base_rounding_adjustment\", \"base_rounded_total\", \"base_in_words\", \"column_break5\", \"grand_total\", \"rounding_adjustment\", \"use_company_roundoff_cost_center\", \"rounded_total\", \"in_words\", \"total_advance\", \"outstanding_amount\", \"disable_rounded_total\", \"section_break_49\", \"apply_discount_on\", \"base_discount_amount\", \"is_cash_or_non_trade_discount\", \"additional_discount_account\", \"column_break_51\", \"additional_discount_percentage\", \"discount_amount\", \"sec_tax_breakup\", \"other_charges_calculation\", \"pricing_rule_details\", \"pricing_rules\", \"posa_offers\", \"posa_coupons\", \"packing_list\", \"packed_items\", \"product_bundle_help\", \"time_sheet_list\", \"timesheets\", \"section_break_104\", \"total_billing_hours\", \"column_break_106\", \"total_billing_amount\", \"payments_tab\", \"payments_section\", \"cash_bank_account\", \"payments\", \"section_break_84\", \"base_paid_amount\", \"column_break_86\", \"paid_amount\", \"section_break_88\", \"base_change_amount\", \"column_break_90\", \"change_amount\", \"account_for_change_amount\", \"advances_section\", \"allocate_advances_automatically\", \"only_include_allocated_payments\", \"get_advances\", \"advances\", \"write_off_section\", \"write_off_amount\", \"base_write_off_amount\", \"write_off_outstanding_amount_automatically\", \"column_break_74\", \"write_off_account\", \"write_off_cost_center\", \"loyalty_points_redemption\", \"redeem_loyalty_points\", \"loyalty_points\", \"loyalty_amount\", \"column_break_77\", \"loyalty_program\", \"dont_create_loyalty_points\", \"loyalty_redemption_account\", \"loyalty_redemption_cost_center\", \"contact_and_address_tab\", \"address_and_contact\", \"customer_address\", \"address_display\", \"col_break4\", \"contact_person\", \"contact_display\", \"contact_mobile\", \"contact_email\", \"territory\", \"shipping_address_section\", \"shipping_address_name\", \"shipping_address\", \"shipping_addr_col_break\", \"dispatch_address_name\", \"dispatch_address\", \"company_address_section\", \"company_address\", \"company_address_display\", \"company_addr_col_break\", \"company_contact_person\", \"terms_tab\", \"payment_schedule_section\", \"ignore_default_payment_terms_template\", \"payment_terms_template\", \"payment_schedule\", \"terms_section_break\", \"tc_name\", \"terms\", \"more_info_tab\", \"customer_po_details\", \"po_no\", \"column_break_23\", \"po_date\", \"more_info\", \"debit_to\", \"party_account_currency\", \"is_opening\", \"column_break8\", \"unrealized_profit_loss_account\", \"against_income_account\", \"posa_additional_notes_section\", \"posa_notes\", \"posa_column_break_111\", \"posa_delivery_date\", \"sales_team_section_break\", \"sales_partner\", \"amount_eligible_for_commission\", \"column_break10\", \"commission_rate\", \"total_commission\", \"section_break2\", \"sales_team\", \"edit_printing_settings\", \"letter_head\", \"group_same_items\", \"column_break_84\", \"select_print_heading\", \"language\", \"subscription_section\", \"from_date\", \"auto_repeat\", \"column_break_140\", \"to_date\", \"update_auto_repeat_reference\", \"more_information\", \"status\", \"inter_company_invoice_reference\", \"campaign\", \"represents_company\", \"source\", \"customer_group\", \"col_break23\", \"is_internal_customer\", \"is_discounted\", \"remarks\", \"connections_tab\", \"repost_required\", \"custom_commisstion_paid\", null]" }, { "_assign": null, @@ -917,7 +978,7 @@ "field_name": "payment_schedule", "idx": 0, "is_system_generated": 1, - "modified": "2025-05-26 22:41:29.576608", + "modified": "2025-08-04 15:34:19.098958", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-payment_schedule-print_hide", @@ -940,7 +1001,7 @@ "field_name": "posa_pos_opening_shift", "idx": 0, "is_system_generated": 0, - "modified": "2020-10-26 15:35:40.861492", + "modified": "2025-08-04 15:34:19.108245", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-posa_pos_opening_shift-no_copy", @@ -963,7 +1024,7 @@ "field_name": "rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-07-30 13:51:56.771070", + "modified": "2025-08-04 15:34:19.117587", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-rounded_total-hidden", @@ -986,7 +1047,7 @@ "field_name": "rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-07-30 13:51:56.804968", + "modified": "2025-08-04 15:34:19.127155", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-rounded_total-print_hide", @@ -1009,7 +1070,7 @@ "field_name": "scan_barcode", "idx": 0, "is_system_generated": 1, - "modified": "2025-05-26 12:15:44.644311", + "modified": "2025-08-04 15:34:19.136462", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-scan_barcode-hidden", @@ -1032,7 +1093,7 @@ "field_name": "tax_id", "idx": 0, "is_system_generated": 1, - "modified": "2025-05-26 12:15:40.443431", + "modified": "2025-08-04 15:34:19.145984", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-tax_id-hidden", @@ -1055,7 +1116,7 @@ "field_name": "tax_id", "idx": 0, "is_system_generated": 1, - "modified": "2025-05-26 12:15:40.453339", + "modified": "2025-08-04 15:34:19.155844", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-tax_id-print_hide", From 7612f4a347c058392a73b717e1b604c90e38079e Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Wed, 6 Aug 2025 22:29:22 +0530 Subject: [PATCH 09/25] feature: set series for Sales Commission and Sales Partner Commission Doctype --- posawesome/api.py | 2 +- .../posawesome/custom/sales_invoice.json | 44 +++++++++---------- .../sales_commission_payment.json | 7 ++- .../sales_partner_commission_payment.json | 7 ++- 4 files changed, 33 insertions(+), 27 deletions(-) diff --git a/posawesome/api.py b/posawesome/api.py index 5c90801234..7e2d95bd08 100644 --- a/posawesome/api.py +++ b/posawesome/api.py @@ -9,7 +9,7 @@ def pay_commission(sales_invoice): frappe.throw(_("Sales Invoice is required.")) # Update the commission_paid check field - frappe.db.set_value("Sales Invoice", sales_invoice, "custom_commisstion_paid", 1) + frappe.db.set_value("Sales Invoice", sales_invoice, "custom_commission_paid", 1) frappe.db.commit() @frappe.whitelist() diff --git a/posawesome/posawesome/custom/sales_invoice.json b/posawesome/posawesome/custom/sales_invoice.json index 3fa073c664..489edd18f9 100644 --- a/posawesome/posawesome/custom/sales_invoice.json +++ b/posawesome/posawesome/custom/sales_invoice.json @@ -19,7 +19,7 @@ "dt": "Sales Invoice", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "custom_commisstion_paid", + "fieldname": "custom_commission_paid", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -41,7 +41,7 @@ "modified": "2025-08-04 15:05:06.666421", "modified_by": "Administrator", "module": null, - "name": "Sales Invoice-custom_commisstion_paid", + "name": "Sales Invoice-custom_commission_paid", "no_copy": 0, "non_negative": 0, "options": null, @@ -86,14 +86,14 @@ "hide_border": 0, "hide_days": 0, "hide_seconds": 0, - "idx": 221, + "idx": 222, "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": "custom_commisstion_paid", + "insert_after": "custom_commission_paid", "is_system_generated": 0, "is_virtual": 0, "label": "Partner Commission Paid", @@ -771,7 +771,7 @@ "field_name": "additional_discount_account", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.012406", + "modified": "2025-08-06 11:39:26.642005", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-additional_discount_account-hidden", @@ -794,7 +794,7 @@ "field_name": "additional_discount_account", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.022255", + "modified": "2025-08-06 11:39:26.653426", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-additional_discount_account-mandatory_depends_on", @@ -817,7 +817,7 @@ "field_name": "base_rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.031657", + "modified": "2025-08-06 11:39:26.664101", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-base_rounded_total-hidden", @@ -840,7 +840,7 @@ "field_name": "base_rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.040909", + "modified": "2025-08-06 11:39:26.674433", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-base_rounded_total-print_hide", @@ -863,7 +863,7 @@ "field_name": "disable_rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.050806", + "modified": "2025-08-06 11:39:26.685719", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-disable_rounded_total-default", @@ -886,7 +886,7 @@ "field_name": "due_date", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.060259", + "modified": "2025-08-06 11:39:26.697257", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-due_date-print_hide", @@ -909,7 +909,7 @@ "field_name": "in_words", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.069523", + "modified": "2025-08-06 11:39:26.709785", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-in_words-hidden", @@ -932,7 +932,7 @@ "field_name": "in_words", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.078879", + "modified": "2025-08-06 11:39:26.721940", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-in_words-print_hide", @@ -947,7 +947,7 @@ "_comments": null, "_liked_by": null, "_user_tags": null, - "creation": "2025-08-05 12:00:54.678823", + "creation": "2025-08-06 11:55:01.016417", "default_value": null, "doc_type": "Sales Invoice", "docstatus": 0, @@ -955,7 +955,7 @@ "field_name": null, "idx": 0, "is_system_generated": 0, - "modified": "2025-08-05 12:00:54.678823", + "modified": "2025-08-06 11:55:01.016417", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-main-field_order", @@ -963,7 +963,7 @@ "property": "field_order", "property_type": "Data", "row_name": null, - "value": "[\"customer_section\", \"title\", \"naming_series\", \"customer\", \"customer_name\", \"tax_id\", \"company\", \"company_tax_id\", \"column_break1\", \"posting_date\", \"posting_time\", \"set_posting_time\", \"due_date\", \"column_break_14\", \"is_pos\", \"pos_profile\", \"posa_pos_opening_shift\", \"posa_is_printed\", \"is_consolidated\", \"is_return\", \"return_against\", \"update_outstanding_for_self\", \"update_billed_amount_in_sales_order\", \"update_billed_amount_in_delivery_note\", \"is_debit_note\", \"amended_from\", \"accounting_dimensions_section\", \"cost_center\", \"dimension_col_break\", \"project\", \"currency_and_price_list\", \"currency\", \"conversion_rate\", \"column_break2\", \"selling_price_list\", \"price_list_currency\", \"plc_conversion_rate\", \"ignore_pricing_rule\", \"items_section\", \"scan_barcode\", \"update_stock\", \"column_break_39\", \"set_warehouse\", \"set_target_warehouse\", \"section_break_42\", \"items\", \"section_break_30\", \"total_qty\", \"total_net_weight\", \"column_break_32\", \"base_total\", \"base_net_total\", \"column_break_52\", \"total\", \"net_total\", \"taxes_section\", \"tax_category\", \"taxes_and_charges\", \"posa_delivery_charges\", \"posa_delivery_charges_rate\", \"column_break_38\", \"shipping_rule\", \"column_break_55\", \"incoterm\", \"named_place\", \"section_break_40\", \"taxes\", \"section_break_43\", \"base_total_taxes_and_charges\", \"column_break_47\", \"total_taxes_and_charges\", \"totals\", \"base_grand_total\", \"base_rounding_adjustment\", \"base_rounded_total\", \"base_in_words\", \"column_break5\", \"grand_total\", \"rounding_adjustment\", \"use_company_roundoff_cost_center\", \"rounded_total\", \"in_words\", \"total_advance\", \"outstanding_amount\", \"disable_rounded_total\", \"section_break_49\", \"apply_discount_on\", \"base_discount_amount\", \"is_cash_or_non_trade_discount\", \"additional_discount_account\", \"column_break_51\", \"additional_discount_percentage\", \"discount_amount\", \"sec_tax_breakup\", \"other_charges_calculation\", \"pricing_rule_details\", \"pricing_rules\", \"posa_offers\", \"posa_coupons\", \"packing_list\", \"packed_items\", \"product_bundle_help\", \"time_sheet_list\", \"timesheets\", \"section_break_104\", \"total_billing_hours\", \"column_break_106\", \"total_billing_amount\", \"payments_tab\", \"payments_section\", \"cash_bank_account\", \"payments\", \"section_break_84\", \"base_paid_amount\", \"column_break_86\", \"paid_amount\", \"section_break_88\", \"base_change_amount\", \"column_break_90\", \"change_amount\", \"account_for_change_amount\", \"advances_section\", \"allocate_advances_automatically\", \"only_include_allocated_payments\", \"get_advances\", \"advances\", \"write_off_section\", \"write_off_amount\", \"base_write_off_amount\", \"write_off_outstanding_amount_automatically\", \"column_break_74\", \"write_off_account\", \"write_off_cost_center\", \"loyalty_points_redemption\", \"redeem_loyalty_points\", \"loyalty_points\", \"loyalty_amount\", \"column_break_77\", \"loyalty_program\", \"dont_create_loyalty_points\", \"loyalty_redemption_account\", \"loyalty_redemption_cost_center\", \"contact_and_address_tab\", \"address_and_contact\", \"customer_address\", \"address_display\", \"col_break4\", \"contact_person\", \"contact_display\", \"contact_mobile\", \"contact_email\", \"territory\", \"shipping_address_section\", \"shipping_address_name\", \"shipping_address\", \"shipping_addr_col_break\", \"dispatch_address_name\", \"dispatch_address\", \"company_address_section\", \"company_address\", \"company_address_display\", \"company_addr_col_break\", \"company_contact_person\", \"terms_tab\", \"payment_schedule_section\", \"ignore_default_payment_terms_template\", \"payment_terms_template\", \"payment_schedule\", \"terms_section_break\", \"tc_name\", \"terms\", \"more_info_tab\", \"customer_po_details\", \"po_no\", \"column_break_23\", \"po_date\", \"more_info\", \"debit_to\", \"party_account_currency\", \"is_opening\", \"column_break8\", \"unrealized_profit_loss_account\", \"against_income_account\", \"posa_additional_notes_section\", \"posa_notes\", \"posa_column_break_111\", \"posa_delivery_date\", \"sales_team_section_break\", \"sales_partner\", \"amount_eligible_for_commission\", \"column_break10\", \"commission_rate\", \"total_commission\", \"section_break2\", \"sales_team\", \"edit_printing_settings\", \"letter_head\", \"group_same_items\", \"column_break_84\", \"select_print_heading\", \"language\", \"subscription_section\", \"from_date\", \"auto_repeat\", \"column_break_140\", \"to_date\", \"update_auto_repeat_reference\", \"more_information\", \"status\", \"inter_company_invoice_reference\", \"campaign\", \"represents_company\", \"source\", \"customer_group\", \"col_break23\", \"is_internal_customer\", \"is_discounted\", \"remarks\", \"connections_tab\", \"repost_required\", \"custom_commisstion_paid\", null]" + "value": "[\"customer_section\", \"title\", \"naming_series\", \"customer\", \"customer_name\", \"tax_id\", \"company\", \"company_tax_id\", \"column_break1\", \"posting_date\", \"posting_time\", \"set_posting_time\", \"due_date\", \"column_break_14\", \"is_pos\", \"pos_profile\", \"posa_pos_opening_shift\", \"posa_is_printed\", \"is_consolidated\", \"is_return\", \"return_against\", \"update_outstanding_for_self\", \"update_billed_amount_in_sales_order\", \"update_billed_amount_in_delivery_note\", \"is_debit_note\", \"amended_from\", \"accounting_dimensions_section\", \"cost_center\", \"dimension_col_break\", \"project\", \"currency_and_price_list\", \"currency\", \"conversion_rate\", \"column_break2\", \"selling_price_list\", \"price_list_currency\", \"plc_conversion_rate\", \"ignore_pricing_rule\", \"items_section\", \"scan_barcode\", \"update_stock\", \"column_break_39\", \"set_warehouse\", \"set_target_warehouse\", \"section_break_42\", \"items\", \"section_break_30\", \"total_qty\", \"total_net_weight\", \"column_break_32\", \"base_total\", \"base_net_total\", \"column_break_52\", \"total\", \"net_total\", \"taxes_section\", \"tax_category\", \"taxes_and_charges\", \"posa_delivery_charges\", \"posa_delivery_charges_rate\", \"column_break_38\", \"shipping_rule\", \"column_break_55\", \"incoterm\", \"named_place\", \"section_break_40\", \"taxes\", \"section_break_43\", \"base_total_taxes_and_charges\", \"column_break_47\", \"total_taxes_and_charges\", \"totals\", \"base_grand_total\", \"base_rounding_adjustment\", \"base_rounded_total\", \"base_in_words\", \"column_break5\", \"grand_total\", \"rounding_adjustment\", \"use_company_roundoff_cost_center\", \"rounded_total\", \"in_words\", \"total_advance\", \"outstanding_amount\", \"disable_rounded_total\", \"section_break_49\", \"apply_discount_on\", \"base_discount_amount\", \"is_cash_or_non_trade_discount\", \"additional_discount_account\", \"column_break_51\", \"additional_discount_percentage\", \"discount_amount\", \"sec_tax_breakup\", \"other_charges_calculation\", \"pricing_rule_details\", \"pricing_rules\", \"posa_offers\", \"posa_coupons\", \"packing_list\", \"packed_items\", \"product_bundle_help\", \"time_sheet_list\", \"timesheets\", \"section_break_104\", \"total_billing_hours\", \"column_break_106\", \"total_billing_amount\", \"payments_tab\", \"payments_section\", \"cash_bank_account\", \"payments\", \"section_break_84\", \"base_paid_amount\", \"column_break_86\", \"paid_amount\", \"section_break_88\", \"base_change_amount\", \"column_break_90\", \"change_amount\", \"account_for_change_amount\", \"advances_section\", \"allocate_advances_automatically\", \"only_include_allocated_payments\", \"get_advances\", \"advances\", \"write_off_section\", \"write_off_amount\", \"base_write_off_amount\", \"write_off_outstanding_amount_automatically\", \"column_break_74\", \"write_off_account\", \"write_off_cost_center\", \"loyalty_points_redemption\", \"redeem_loyalty_points\", \"loyalty_points\", \"loyalty_amount\", \"column_break_77\", \"loyalty_program\", \"dont_create_loyalty_points\", \"loyalty_redemption_account\", \"loyalty_redemption_cost_center\", \"contact_and_address_tab\", \"address_and_contact\", \"customer_address\", \"address_display\", \"col_break4\", \"contact_person\", \"contact_display\", \"contact_mobile\", \"contact_email\", \"territory\", \"shipping_address_section\", \"shipping_address_name\", \"shipping_address\", \"shipping_addr_col_break\", \"dispatch_address_name\", \"dispatch_address\", \"company_address_section\", \"company_address\", \"company_address_display\", \"company_addr_col_break\", \"company_contact_person\", \"terms_tab\", \"payment_schedule_section\", \"ignore_default_payment_terms_template\", \"payment_terms_template\", \"payment_schedule\", \"terms_section_break\", \"tc_name\", \"terms\", \"more_info_tab\", \"customer_po_details\", \"po_no\", \"column_break_23\", \"po_date\", \"more_info\", \"debit_to\", \"party_account_currency\", \"is_opening\", \"column_break8\", \"unrealized_profit_loss_account\", \"against_income_account\", \"posa_additional_notes_section\", \"posa_notes\", \"posa_column_break_111\", \"posa_delivery_date\", \"sales_team_section_break\", \"sales_partner\", \"amount_eligible_for_commission\", \"column_break10\", \"commission_rate\", \"total_commission\", \"section_break2\", \"sales_team\", \"edit_printing_settings\", \"letter_head\", \"group_same_items\", \"column_break_84\", \"select_print_heading\", \"language\", \"subscription_section\", \"from_date\", \"auto_repeat\", \"column_break_140\", \"to_date\", \"update_auto_repeat_reference\", \"more_information\", \"status\", \"inter_company_invoice_reference\", \"campaign\", \"represents_company\", \"source\", \"customer_group\", \"col_break23\", \"is_internal_customer\", \"is_discounted\", \"remarks\", \"connections_tab\", \"repost_required\", \"custom_commission_paid\", \"custom_partner_commission_paid\"]" }, { "_assign": null, @@ -978,7 +978,7 @@ "field_name": "payment_schedule", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.098958", + "modified": "2025-08-06 11:39:26.743960", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-payment_schedule-print_hide", @@ -1001,7 +1001,7 @@ "field_name": "posa_pos_opening_shift", "idx": 0, "is_system_generated": 0, - "modified": "2025-08-04 15:34:19.108245", + "modified": "2025-08-06 11:39:26.754221", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-posa_pos_opening_shift-no_copy", @@ -1024,7 +1024,7 @@ "field_name": "rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.117587", + "modified": "2025-08-06 11:39:26.764418", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-rounded_total-hidden", @@ -1047,7 +1047,7 @@ "field_name": "rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.127155", + "modified": "2025-08-06 11:39:26.776066", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-rounded_total-print_hide", @@ -1070,7 +1070,7 @@ "field_name": "scan_barcode", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.136462", + "modified": "2025-08-06 11:39:26.786851", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-scan_barcode-hidden", @@ -1093,7 +1093,7 @@ "field_name": "tax_id", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.145984", + "modified": "2025-08-06 11:39:26.797736", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-tax_id-hidden", @@ -1116,7 +1116,7 @@ "field_name": "tax_id", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-04 15:34:19.155844", + "modified": "2025-08-06 11:39:26.809881", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-tax_id-print_hide", diff --git a/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json index 32b5c46279..3b89dad25f 100644 --- a/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json +++ b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json @@ -1,6 +1,7 @@ { "actions": [], "allow_rename": 1, + "autoname": "format:SCP-{DD}-{MM}-{YYYY}-{####}", "creation": "2025-08-04 15:10:14.047579", "default_view": "List", "doctype": "DocType", @@ -39,10 +40,11 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2025-08-04 15:25:48.953724", + "modified": "2025-08-06 11:35:30.451377", "modified_by": "Administrator", "module": "POSAwesome", "name": "Sales Commission Payment", + "naming_rule": "Expression", "owner": "Administrator", "permissions": [ { @@ -60,5 +62,6 @@ ], "sort_field": "modified", "sort_order": "DESC", - "states": [] + "states": [], + "track_changes": 1 } \ No newline at end of file diff --git a/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json index d26dbc392d..c6732e43bc 100644 --- a/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json +++ b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json @@ -1,6 +1,7 @@ { "actions": [], "allow_rename": 1, + "autoname": "format:SPCP-{DD}-{MM}-{YYYY}-{####}", "creation": "2025-08-05 11:49:17.435603", "default_view": "List", "doctype": "DocType", @@ -39,10 +40,11 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2025-08-05 12:03:47.980553", + "modified": "2025-08-06 11:34:27.692598", "modified_by": "Administrator", "module": "POSAwesome", "name": "Sales Partner Commission Payment", + "naming_rule": "Expression", "owner": "Administrator", "permissions": [ { @@ -60,5 +62,6 @@ ], "sort_field": "modified", "sort_order": "DESC", - "states": [] + "states": [], + "track_changes": 1 } \ No newline at end of file From e4b7e542081ddb9a81aa33d419440715b70b2c47 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Thu, 7 Aug 2025 00:16:55 +0530 Subject: [PATCH 10/25] fix:Both Doctype list view --- .../posawesome/custom/sales_invoice.json | 36 +++++++++---------- .../sales_commission_payment.json | 10 +++++- .../sales_partner_commission_payment.json | 10 +++++- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/posawesome/posawesome/custom/sales_invoice.json b/posawesome/posawesome/custom/sales_invoice.json index 489edd18f9..79471a2ffc 100644 --- a/posawesome/posawesome/custom/sales_invoice.json +++ b/posawesome/posawesome/custom/sales_invoice.json @@ -6,7 +6,7 @@ "_liked_by": null, "_user_tags": null, "allow_in_quick_entry": 0, - "allow_on_submit": 1, + "allow_on_submit": 0, "bold": 0, "collapsible": 0, "collapsible_depends_on": null, @@ -87,7 +87,7 @@ "hide_days": 0, "hide_seconds": 0, "idx": 222, - "ignore_user_permissions": 0, + "ignore_user_permissions": 1, "ignore_xss_filter": 0, "in_global_search": 0, "in_list_view": 0, @@ -771,7 +771,7 @@ "field_name": "additional_discount_account", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.642005", + "modified": "2025-08-06 13:33:08.955941", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-additional_discount_account-hidden", @@ -794,7 +794,7 @@ "field_name": "additional_discount_account", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.653426", + "modified": "2025-08-06 13:33:08.965976", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-additional_discount_account-mandatory_depends_on", @@ -817,7 +817,7 @@ "field_name": "base_rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.664101", + "modified": "2025-08-06 13:33:08.975708", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-base_rounded_total-hidden", @@ -840,7 +840,7 @@ "field_name": "base_rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.674433", + "modified": "2025-08-06 13:33:08.985611", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-base_rounded_total-print_hide", @@ -863,7 +863,7 @@ "field_name": "disable_rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.685719", + "modified": "2025-08-06 13:33:08.996658", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-disable_rounded_total-default", @@ -886,7 +886,7 @@ "field_name": "due_date", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.697257", + "modified": "2025-08-06 13:33:09.008772", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-due_date-print_hide", @@ -909,7 +909,7 @@ "field_name": "in_words", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.709785", + "modified": "2025-08-06 13:33:09.019014", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-in_words-hidden", @@ -932,7 +932,7 @@ "field_name": "in_words", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.721940", + "modified": "2025-08-06 13:33:09.029423", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-in_words-print_hide", @@ -955,7 +955,7 @@ "field_name": null, "idx": 0, "is_system_generated": 0, - "modified": "2025-08-06 11:55:01.016417", + "modified": "2025-08-06 13:33:09.039352", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-main-field_order", @@ -978,7 +978,7 @@ "field_name": "payment_schedule", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.743960", + "modified": "2025-08-06 13:33:09.049848", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-payment_schedule-print_hide", @@ -1001,7 +1001,7 @@ "field_name": "posa_pos_opening_shift", "idx": 0, "is_system_generated": 0, - "modified": "2025-08-06 11:39:26.754221", + "modified": "2025-08-06 13:33:09.059912", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-posa_pos_opening_shift-no_copy", @@ -1024,7 +1024,7 @@ "field_name": "rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.764418", + "modified": "2025-08-06 13:33:09.069416", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-rounded_total-hidden", @@ -1047,7 +1047,7 @@ "field_name": "rounded_total", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.776066", + "modified": "2025-08-06 13:33:09.079051", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-rounded_total-print_hide", @@ -1070,7 +1070,7 @@ "field_name": "scan_barcode", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.786851", + "modified": "2025-08-06 13:33:09.089164", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-scan_barcode-hidden", @@ -1093,7 +1093,7 @@ "field_name": "tax_id", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.797736", + "modified": "2025-08-06 13:33:09.098945", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-tax_id-hidden", @@ -1116,7 +1116,7 @@ "field_name": "tax_id", "idx": 0, "is_system_generated": 1, - "modified": "2025-08-06 11:39:26.809881", + "modified": "2025-08-06 13:33:09.108706", "modified_by": "Administrator", "module": null, "name": "Sales Invoice-tax_id-print_hide", diff --git a/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json index 3b89dad25f..78368f3e03 100644 --- a/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json +++ b/posawesome/posawesome/doctype/sales_commission_payment/sales_commission_payment.json @@ -17,30 +17,38 @@ { "fieldname": "sales_person", "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, "label": "Sales Person", "options": "Sales Person" }, { "fieldname": "commission", "fieldtype": "Currency", + "in_list_view": 1, + "in_standard_filter": 1, "label": "Commission" }, { "fieldname": "mode_of_payment", "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, "label": "Mode Of Payment", "options": "Mode of Payment" }, { "fieldname": "reference_sales_invoice", "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, "label": "Reference Sales Invoice", "options": "Sales Invoice" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2025-08-06 11:35:30.451377", + "modified": "2025-08-06 13:44:52.783032", "modified_by": "Administrator", "module": "POSAwesome", "name": "Sales Commission Payment", diff --git a/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json index c6732e43bc..e1cb5b3a73 100644 --- a/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json +++ b/posawesome/posawesome/doctype/sales_partner_commission_payment/sales_partner_commission_payment.json @@ -17,30 +17,38 @@ { "fieldname": "commission", "fieldtype": "Currency", + "in_list_view": 1, + "in_standard_filter": 1, "label": "Commission" }, { "fieldname": "mode_of_payment", "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, "label": "Mode Of Payment", "options": "Mode of Payment" }, { "fieldname": "reference_sales_invoice", "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, "label": "Reference Sales Invoice", "options": "Sales Invoice" }, { "fieldname": "sales_partner", "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, "label": "Sales Partner", "options": "Sales Partner" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2025-08-06 11:34:27.692598", + "modified": "2025-08-06 13:46:05.107131", "modified_by": "Administrator", "module": "POSAwesome", "name": "Sales Partner Commission Payment", From f284ac5031e2cb4a9d183ece84386b4323823a58 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Fri, 8 Aug 2025 00:10:42 +0530 Subject: [PATCH 11/25] feature: Sales Person Commission Bulk Payout funcitonality --- .../__init__.py | 0 .../sales_person_commission_bulk_pay_out.js | 8 + .../sales_person_commission_bulk_pay_out.json | 96 +++++++ .../sales_person_commission_bulk_pay_out.py | 21 ++ ...st_sales_person_commission_bulk_pay_out.py | 9 + .../__init__.py | 0 ..._person_commission_bulk_pay_out_items.json | 50 ++++ ...es_person_commission_bulk_pay_out_items.py | 8 + .../page/sales_person_commiss/__init__.py | 0 .../sales_person_commiss.js | 235 ++++++++++++++++++ .../sales_person_commiss.json | 19 ++ .../sales_person_commiss.py | 67 +++++ .../workspace/pos_awesome/pos_awesome.json | 2 +- .../templates/pages/sales_person_commiss.html | 5 + 14 files changed, 519 insertions(+), 1 deletion(-) create mode 100644 posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/__init__.py create mode 100644 posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.js create mode 100644 posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.json create mode 100644 posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.py create mode 100644 posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/test_sales_person_commission_bulk_pay_out.py create mode 100644 posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/__init__.py create mode 100644 posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/sales_person_commission_bulk_pay_out_items.json create mode 100644 posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/sales_person_commission_bulk_pay_out_items.py create mode 100644 posawesome/posawesome/page/sales_person_commiss/__init__.py create mode 100644 posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js create mode 100644 posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.json create mode 100644 posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.py create mode 100644 posawesome/templates/pages/sales_person_commiss.html diff --git a/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/__init__.py b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.js b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.js new file mode 100644 index 0000000000..5b2407a329 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.js @@ -0,0 +1,8 @@ +// Copyright (c) 2025, Youssef Restom and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Sales Person Commission Bulk Pay Out', { + // refresh: function(frm) { + + // } +}); diff --git a/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.json b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.json new file mode 100644 index 0000000000..ff426c1e89 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.json @@ -0,0 +1,96 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "format:SPR-BPO-{DD}-{MM}-{YYYY}-{####}", + "creation": "2025-08-07 09:30:38.565142", + "default_view": "List", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "sales_person", + "amended_from", + "column_break_3bewg", + "mode_of_payment", + "posting_datetime", + "section_break_15rbm", + "items", + "total_commission" + ], + "fields": [ + { + "fieldname": "sales_person", + "fieldtype": "Link", + "label": "Sales Person", + "options": "Sales Person" + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 1, + "label": "Amended From", + "no_copy": 1, + "options": "Sales Person Commission Bulk Pay Out", + "print_hide": 1, + "read_only": 1, + "search_index": 1 + }, + { + "fieldname": "posting_datetime", + "fieldtype": "Datetime", + "label": "Posting Date/Time" + }, + { + "fieldname": "column_break_3bewg", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_15rbm", + "fieldtype": "Section Break" + }, + { + "fieldname": "items", + "fieldtype": "Table", + "label": "Items", + "options": "Sales Person Commission Bulk Pay Out Items" + }, + { + "fieldname": "total_commission", + "fieldtype": "Currency", + "label": "Total Commission" + }, + { + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "label": "Mode Of Payment", + "options": "Mode of Payment" + } + ], + "index_web_pages_for_search": 1, + "is_submittable": 1, + "links": [], + "modified": "2025-08-07 13:32:24.346145", + "modified_by": "Administrator", + "module": "POSAwesome", + "name": "Sales Person Commission Bulk Pay Out", + "naming_rule": "Expression", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [], + "track_changes": 1 +} \ No newline at end of file diff --git a/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.py b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.py new file mode 100644 index 0000000000..b4fc3e76c6 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/sales_person_commission_bulk_pay_out.py @@ -0,0 +1,21 @@ +# Copyright (c) 2025, Youssef Restom and contributors +# For license information, please see license.txt + +import frappe +from frappe.model.document import Document +from frappe import _ + +class SalesPersonCommissionBulkPayOut(Document): + def before_submit(self): + if not self.mode_of_payment: + frappe.throw(_("Mode of Payment is required before submitting.")) + + def on_submit(self): + for row in self.items: + if row.reference_sales_invoice: + frappe.db.set_value( + "Sales Invoice", + row.reference_sales_invoice, + "custom_commission_paid", + 1 + ) diff --git a/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/test_sales_person_commission_bulk_pay_out.py b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/test_sales_person_commission_bulk_pay_out.py new file mode 100644 index 0000000000..1136c7a328 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out/test_sales_person_commission_bulk_pay_out.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, Youssef Restom and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestSalesPersonCommissionBulkPayOut(FrappeTestCase): + pass diff --git a/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/__init__.py b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/sales_person_commission_bulk_pay_out_items.json b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/sales_person_commission_bulk_pay_out_items.json new file mode 100644 index 0000000000..2d8d072aea --- /dev/null +++ b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/sales_person_commission_bulk_pay_out_items.json @@ -0,0 +1,50 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2025-08-07 09:33:32.021078", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "reference_sales_invoice", + "commission", + "mode_of_payment" + ], + "fields": [ + { + "fieldname": "reference_sales_invoice", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Reference Sales Invoice", + "options": "Sales Invoice" + }, + { + "fieldname": "commission", + "fieldtype": "Currency", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Commission" + }, + { + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Mode Of Payment", + "options": "Mode of Payment" + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2025-08-07 09:34:59.640054", + "modified_by": "Administrator", + "module": "POSAwesome", + "name": "Sales Person Commission Bulk Pay Out Items", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/sales_person_commission_bulk_pay_out_items.py b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/sales_person_commission_bulk_pay_out_items.py new file mode 100644 index 0000000000..646c9ec0b4 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_person_commission_bulk_pay_out_items/sales_person_commission_bulk_pay_out_items.py @@ -0,0 +1,8 @@ +# Copyright (c) 2025, Youssef Restom and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class SalesPersonCommissionBulkPayOutItems(Document): + pass diff --git a/posawesome/posawesome/page/sales_person_commiss/__init__.py b/posawesome/posawesome/page/sales_person_commiss/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js new file mode 100644 index 0000000000..3029c9d87b --- /dev/null +++ b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js @@ -0,0 +1,235 @@ +frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { + const page = frappe.ui.make_app_page({ + parent: wrapper, + title: 'Sales Person Commission', + single_column: true + }); + + $(page.body).addClass("page-layout-main-section"); + + // Add filters + const filters = [ + { + fieldname: "sales_person", + label: __("Sales Person"), + fieldtype: "Link", + options: "Sales Person", + reqd: 1, + }, + { + fieldname: "payment_status", + label: __("Payment Status"), + fieldtype: "Select", + options: ["Pending", "Paid"], + default: "Pending" + } + ]; + + const filter_group = $('
').appendTo(page.body); + filters.forEach((filter) => { + const field_wrapper = $('
').appendTo(filter_group); + const field = frappe.ui.form.make_control({ + df: filter, + parent: field_wrapper, + render_input: true + }); + field.refresh(); + page[filter.fieldname] = field; + }); + + // Set default value for Payment Status manually + setTimeout(() => { + if (page.payment_status) { + page.payment_status.set_value("Pending"); + } + }, 100); + + // Buttons + const button_group = $(` +
+
+ + +
+
+ `).appendTo(page.body); + + // Result container + const result_container = $('
').appendTo(page.body); + + let all_commission_data = []; + + // Load commission data + function load_commission_data(sales_person = "", payment_status = "Pending") { + result_container.empty().html('Loading...'); + frappe.call({ + method: "posawesome.posawesome.page.sales_person_commiss.sales_person_commiss.get_commission_data", + args: { + sales_person: sales_person, + payment_status: payment_status + }, + callback: function (r) { + if (r.message && r.message.length > 0) { + all_commission_data = r.message.map(row => ({ + ...row, + commission: typeof row.commission === "object" ? row.commission.parsedValue || row.commission.source : row.commission + })); + + result_container.empty(); + + const table = $(` + + + + + + + + + + + + +
Sr No. + + + Sales PersonCommissionMode of PaymentReference Sales Invoice
+ `).appendTo(result_container); + + const tbody = table.find("tbody"); + + all_commission_data.forEach((row, index) => { + const sr_no = index + 1; + const tr = $(''); + tr.append(`${sr_no}`); + tr.append(``); + tr.append(`${row.sales_person || ''}`); + tr.append(`${row.commission || ''}`); + tr.append(`${row.mode_of_payment || ''}`); + tr.append(`${row.reference_sales_invoice || ''}`); + tbody.append(tr); + }); + + // Handle "Select All" checkbox + $('#select_all_rows').on('change', function () { + const checked = $(this).is(':checked'); + $('.select-row').prop('checked', checked); + }); + + // Sync "Select All" if any individual checkbox is changed + result_container.on('change', '.select-row', function () { + const total = $('.select-row').length; + const checked = $('.select-row:checked').length; + $('#select_all_rows').prop('checked', total === checked); + }); + + // Bulk Payout Button (only if status is Pending) + if (payment_status === "Pending") { + const bulkButtonRow = $(` +
+ +
+ `); + result_container.append(bulkButtonRow); + + $('#bulk_payout_btn').on('click', function () { + const selectedIndexes = $('.select-row:checked').map(function () { + return $(this).data('index'); + }).get(); + + if (selectedIndexes.length === 0) { + frappe.msgprint(__('Please select at least one record to proceed with bulk payout.')); + return; + } + + const selectedData = selectedIndexes.map(index => all_commission_data[index]); + window.selected_commission_rows = selectedData; + + frappe.confirm( + __('Are you sure you want to create a Bulk Payout for the selected records?'), + function () { + frappe.call({ + method: "posawesome.posawesome.page.sales_person_commiss.sales_person_commiss.create_bulk_payout", + args: { + data: selectedData + }, + callback: function (r) { + if (r.message) { + const docname = r.message; + const link = frappe.utils.get_form_link('Sales Person Commission Bulk Pay Out', docname); + frappe.msgprint({ + title: __('Bulk Payout Created'), + indicator: 'green', + message: __('Sales Person Commission Bulk Pay Out created: {0}', [link]) + }); + } + } + }); + }, + function () { + frappe.msgprint(__('Bulk Payout creation was cancelled.')); + } + ); + }); + } + } else { + result_container.html(`
No Data Found
`); + } + } + }); + } + + // Search button + $('#search_btn').on('click', function () { + const sales_person = page.sales_person.get_value(); + const payment_status = page.payment_status.get_value(); + + if (!sales_person) { + frappe.msgprint({ + title: __('Missing Required Field'), + message: __('Please select a Sales Person to search.'), + indicator: 'red' + }); + return; + } + + load_commission_data(sales_person, payment_status); + }); + + // Clear button + $('#clear_btn').on('click', function () { + result_container.empty(); + all_commission_data = []; + window.selected_commission_rows = []; + page.sales_person.set_value(''); + page.payment_status.set_value("Pending"); + }); + + // Style override + $(``).appendTo("head"); +}; diff --git a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.json b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.json new file mode 100644 index 0000000000..3df46c29f5 --- /dev/null +++ b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.json @@ -0,0 +1,19 @@ +{ + "content": null, + "creation": "2025-08-06 13:54:18.871426", + "docstatus": 0, + "doctype": "Page", + "idx": 0, + "modified": "2025-08-06 13:54:18.871426", + "modified_by": "Administrator", + "module": "POSAwesome", + "name": "sales-person-commiss", + "owner": "Administrator", + "page_name": "sales-person-commiss", + "roles": [], + "script": null, + "standard": "Yes", + "style": null, + "system_page": 0, + "title": "Sales Person Commission" +} \ No newline at end of file diff --git a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.py b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.py new file mode 100644 index 0000000000..8490d5659e --- /dev/null +++ b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.py @@ -0,0 +1,67 @@ +import frappe +from frappe import _ +from frappe.utils import now_datetime, flt + + +@frappe.whitelist() +def get_commission_data(sales_person=None, payment_status="Pending"): + filters = {} + if sales_person: + filters["sales_person"] = sales_person + + data = frappe.get_all( + "Sales Commission Payment", + filters=filters, + fields=["name", "sales_person", "commission", "mode_of_payment", "reference_sales_invoice"], + order_by="creation desc" + ) + + # Filter by custom_commission_paid in linked Sales Invoice + filtered_data = [] + for row in data: + si = frappe.get_doc("Sales Invoice", row["reference_sales_invoice"]) + if (payment_status == "Pending" and not si.custom_commission_paid) or \ + (payment_status == "Paid" and si.custom_commission_paid): + row["commission"] = float(row["commission"]) + filtered_data.append(row) + + return filtered_data + + + + + +@frappe.whitelist() +def create_bulk_payout(data): + import json + if isinstance(data, str): + data = json.loads(data) + + if not data: + frappe.throw(_("No data received for bulk payout")) + + sales_person = data[0].get("sales_person") + total_commission = 0 + + doc = frappe.new_doc("Sales Person Commission Bulk Pay Out") + doc.sales_person = sales_person + doc.posting_datetime = now_datetime() + + for row in data: + commission = flt(row.get("commission") or 0) + total_commission += commission + + doc.append("items", { + "reference_sales_invoice": row.get("reference_sales_invoice"), + "commission": commission, + "mode_of_payment": row.get("mode_of_payment") + }) + + doc.total_commission = total_commission + doc.insert() + + # Generate clickable link (optional) + link = f'{doc.name}' + frappe.msgprint(_("Sales Person Commission Bulk Pay Out created: {0}").format(link)) + + return doc.name diff --git a/posawesome/posawesome/workspace/pos_awesome/pos_awesome.json b/posawesome/posawesome/workspace/pos_awesome/pos_awesome.json index 74cd9ca056..d46d9dfb3a 100644 --- a/posawesome/posawesome/workspace/pos_awesome/pos_awesome.json +++ b/posawesome/posawesome/workspace/pos_awesome/pos_awesome.json @@ -143,7 +143,7 @@ "type": "Link" } ], - "modified": "2023-06-07 17:35:14.887611", + "modified": "2025-08-07 12:39:36.214438", "modified_by": "Administrator", "module": "POSAwesome", "name": "POS Awesome", diff --git a/posawesome/templates/pages/sales_person_commiss.html b/posawesome/templates/pages/sales_person_commiss.html new file mode 100644 index 0000000000..0d15a81ffa --- /dev/null +++ b/posawesome/templates/pages/sales_person_commiss.html @@ -0,0 +1,5 @@ + +
+

Sales Person Commission Report

+
Loading...
+
From c736122f9f418c718a6e6e1e12cf23e9e2a17457 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Fri, 8 Aug 2025 01:11:19 +0530 Subject: [PATCH 12/25] feature:Sales Commission added on Workspace on role basis --- posawesome/fixtures/role.json | 15 ++++++ posawesome/hooks.py | 4 ++ .../sales_person_commiss.json | 8 +++- .../posawesome/workspace/pages/pages.json | 48 +++++++++++++++++++ 4 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 posawesome/fixtures/role.json create mode 100644 posawesome/posawesome/workspace/pages/pages.json diff --git a/posawesome/fixtures/role.json b/posawesome/fixtures/role.json new file mode 100644 index 0000000000..fd2f9edba3 --- /dev/null +++ b/posawesome/fixtures/role.json @@ -0,0 +1,15 @@ +[ + { + "desk_access": 1, + "disabled": 0, + "docstatus": 0, + "doctype": "Role", + "home_page": null, + "is_custom": 0, + "modified": "2025-08-07 14:25:18.465699", + "name": "Sales Commission", + "restrict_to_domain": null, + "role_name": "Sales Commission", + "two_factor_auth": 0 + } +] \ No newline at end of file diff --git a/posawesome/hooks.py b/posawesome/hooks.py index f5dcf41e2b..5ea15a48bd 100644 --- a/posawesome/hooks.py +++ b/posawesome/hooks.py @@ -268,4 +268,8 @@ "doctype": "Property Setter", "filters": [["name", "in", ("Sales Invoice-posa_pos_opening_shift-no_copy")]], }, + { + "doctype": "Role", + "filters": [["role_name", "=", "Sales Commission"]], + }, ] diff --git a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.json b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.json index 3df46c29f5..55101bf36e 100644 --- a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.json +++ b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.json @@ -4,13 +4,17 @@ "docstatus": 0, "doctype": "Page", "idx": 0, - "modified": "2025-08-06 13:54:18.871426", + "modified": "2025-08-07 14:25:40.719199", "modified_by": "Administrator", "module": "POSAwesome", "name": "sales-person-commiss", "owner": "Administrator", "page_name": "sales-person-commiss", - "roles": [], + "roles": [ + { + "role": "Sales Commission" + } + ], "script": null, "standard": "Yes", "style": null, diff --git a/posawesome/posawesome/workspace/pages/pages.json b/posawesome/posawesome/workspace/pages/pages.json new file mode 100644 index 0000000000..a0f20dfafc --- /dev/null +++ b/posawesome/posawesome/workspace/pages/pages.json @@ -0,0 +1,48 @@ +{ + "charts": [], + "content": "[{\"id\":\"lU9NipQWyV\",\"type\":\"header\",\"data\":{\"text\":\"Pages\",\"col\":12}},{\"id\":\"llDoOLlb48\",\"type\":\"card\",\"data\":{\"card_name\":\"Commission\",\"col\":4}}]", + "creation": "2025-08-07 12:42:45.893772", + "custom_blocks": [], + "docstatus": 0, + "doctype": "Workspace", + "for_user": "", + "hide_custom": 0, + "icon": "table_2", + "idx": 0, + "is_hidden": 0, + "label": "Pages", + "links": [ + { + "hidden": 0, + "is_query_report": 0, + "label": "Commission", + "link_count": 1, + "link_type": "DocType", + "onboard": 0, + "type": "Card Break" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Sales Person", + "link_count": 0, + "link_to": "sales-person-commiss", + "link_type": "Page", + "onboard": 0, + "type": "Link" + } + ], + "modified": "2025-08-07 14:20:43.830822", + "modified_by": "Administrator", + "module": "POSAwesome", + "name": "Pages", + "number_cards": [], + "owner": "Administrator", + "parent_page": "", + "public": 1, + "quick_lists": [], + "roles": [], + "sequence_id": 43.0, + "shortcuts": [], + "title": "Pages" +} \ No newline at end of file From 5e81dc760a8db6c8d48883b8bc5fd9a44b476c8c Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Sat, 9 Aug 2025 06:24:23 +0530 Subject: [PATCH 13/25] feature: two columns added in Page name BPO Name and BPO Date/Time --- .../sales_person_commiss.js | 87 ++++++++++++------- .../sales_person_commiss.py | 27 +++++- 2 files changed, 80 insertions(+), 34 deletions(-) diff --git a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js index 3029c9d87b..0182a490cd 100644 --- a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js +++ b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js @@ -74,56 +74,76 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { ...row, commission: typeof row.commission === "object" ? row.commission.parsedValue || row.commission.source : row.commission })); - + result_container.empty(); - + + // Build table header dynamically + let headerHTML = ` + + Sr No. + + + + + Sales Person + Commission + Mode of Payment + Reference Sales Invoice + `; + + if (payment_status === "Paid") { + headerHTML += ` + BPO Name + BPO Date/Time + `; + } + + headerHTML += ``; + const table = $(` - - - - - - - - + ${headerHTML}
Sr No. - - - Sales PersonCommissionMode of PaymentReference Sales Invoice
`).appendTo(result_container); - + const tbody = table.find("tbody"); - + all_commission_data.forEach((row, index) => { const sr_no = index + 1; - const tr = $(''); - tr.append(`${sr_no}`); - tr.append(``); - tr.append(`${row.sales_person || ''}`); - tr.append(`${row.commission || ''}`); - tr.append(`${row.mode_of_payment || ''}`); - tr.append(`${row.reference_sales_invoice || ''}`); - tbody.append(tr); + let trHTML = ` + ${sr_no} + + ${row.sales_person || ''} + ${row.commission || ''} + ${row.mode_of_payment || ''} + ${row.reference_sales_invoice || ''} + `; + + if (payment_status === "Paid") { + trHTML += ` + ${row.bpo_name || ''} + ${row.bpo_datetime || ''} + `; + } + + tbody.append(`${trHTML}`); }); - - // Handle "Select All" checkbox + + // Handle "Select All" $('#select_all_rows').on('change', function () { const checked = $(this).is(':checked'); $('.select-row').prop('checked', checked); }); - - // Sync "Select All" if any individual checkbox is changed + result_container.on('change', '.select-row', function () { const total = $('.select-row').length; const checked = $('.select-row:checked').length; $('#select_all_rows').prop('checked', total === checked); }); - - // Bulk Payout Button (only if status is Pending) + if (payment_status === "Pending") { const bulkButtonRow = $(`
@@ -133,20 +153,20 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) {
`); result_container.append(bulkButtonRow); - + $('#bulk_payout_btn').on('click', function () { const selectedIndexes = $('.select-row:checked').map(function () { return $(this).data('index'); }).get(); - + if (selectedIndexes.length === 0) { frappe.msgprint(__('Please select at least one record to proceed with bulk payout.')); return; } - + const selectedData = selectedIndexes.map(index => all_commission_data[index]); window.selected_commission_rows = selectedData; - + frappe.confirm( __('Are you sure you want to create a Bulk Payout for the selected records?'), function () { @@ -180,6 +200,7 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { } }); } + // Search button $('#search_btn').on('click', function () { diff --git a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.py b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.py index 8490d5659e..0ad2e721d1 100644 --- a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.py +++ b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.py @@ -16,13 +16,36 @@ def get_commission_data(sales_person=None, payment_status="Pending"): order_by="creation desc" ) - # Filter by custom_commission_paid in linked Sales Invoice filtered_data = [] for row in data: si = frappe.get_doc("Sales Invoice", row["reference_sales_invoice"]) if (payment_status == "Pending" and not si.custom_commission_paid) or \ (payment_status == "Paid" and si.custom_commission_paid): row["commission"] = float(row["commission"]) + + # For Paid, find the BPO record containing this invoice + if payment_status == "Paid": + # First find the parent BPO linked to this invoice + bpo = frappe.db.sql(""" + SELECT parent + FROM `tabSales Person Commission Bulk Pay Out Items` + WHERE reference_sales_invoice = %s + LIMIT 1 + """, row["reference_sales_invoice"], as_dict=True) + + if bpo: + row["bpo_name"] = bpo[0].parent + # Now fetch posting_datetime from the parent doctype + row["bpo_datetime"] = frappe.db.get_value( + "Sales Person Commission Bulk Pay Out", + bpo[0].parent, + "posting_datetime" + ) + else: + row["bpo_name"] = "" + row["bpo_datetime"] = "" + + filtered_data.append(row) return filtered_data @@ -31,6 +54,8 @@ def get_commission_data(sales_person=None, payment_status="Pending"): + + @frappe.whitelist() def create_bulk_payout(data): import json From 8fb63b2a1005b51315752ecc21ff1687ef69efd8 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Thu, 21 Aug 2025 00:32:31 +0530 Subject: [PATCH 14/25] feature:Sales Person Commission report for Admin --- posawesome/fixtures/custom_field.json | 872 +++++++++--------- posawesome/fixtures/property_setter.json | 2 +- posawesome/fixtures/role.json | 13 + posawesome/hooks.py | 6 +- .../sales_person_commiss.js | 8 +- 5 files changed, 460 insertions(+), 441 deletions(-) diff --git a/posawesome/fixtures/custom_field.json b/posawesome/fixtures/custom_field.json index 1f9f9465dd..f1467be2c6 100644 --- a/posawesome/fixtures/custom_field.json +++ b/posawesome/fixtures/custom_field.json @@ -384,16 +384,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "0", "depends_on": null, - "description": "For POS Closing Shift Payment Reconciliation", + "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Customer", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_cash_mode_of_payment", - "fieldtype": "Link", + "fieldname": "posa_discount", + "fieldtype": "Float", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -404,18 +404,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_pos_awesome_settings", + "insert_after": "lead_name", "is_system_generated": 0, "is_virtual": 0, - "label": "Cash Mode of Payment", + "label": "Discount %", "length": 0, "mandatory_depends_on": null, - "modified": "2021-03-06 00:29:24.240940", + "modified": "2021-06-04 21:02:31.784347", "module": null, - "name": "POS Profile-posa_cash_mode_of_payment", + "name": "Customer-posa_discount", "no_copy": 0, - "non_negative": 0, - "options": "Mode of Payment", + "non_negative": 1, + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, @@ -438,16 +438,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", + "default": null, "depends_on": null, - "description": null, + "description": "For POS Closing Shift Payment Reconciliation", "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_delete", - "fieldtype": "Check", + "fieldname": "posa_cash_mode_of_payment", + "fieldtype": "Link", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -458,18 +458,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_cash_mode_of_payment", + "insert_after": "posa_pos_awesome_settings", "is_system_generated": 0, "is_virtual": 0, - "label": "Auto Delete Draft Invoice", + "label": "Cash Mode of Payment", "length": 0, "mandatory_depends_on": null, - "modified": "2020-10-09 16:01:30.649938", + "modified": "2021-03-06 00:29:24.240940", "module": null, - "name": "POS Profile-posa_allow_delete", + "name": "POS Profile-posa_cash_mode_of_payment", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "Mode of Payment", "permlevel": 0, "precision": "", "print_hide": 0, @@ -554,7 +554,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_user_to_edit_rate", + "fieldname": "posa_allow_delete", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -566,15 +566,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_delete", + "insert_after": "posa_cash_mode_of_payment", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow user to edit Rate", + "label": "Auto Delete Draft Invoice", "length": 0, "mandatory_depends_on": null, - "modified": "2020-10-09 16:01:30.936524", + "modified": "2020-10-09 16:01:30.649938", "module": null, - "name": "POS Profile-posa_allow_user_to_edit_rate", + "name": "POS Profile-posa_allow_delete", "no_copy": 0, "non_negative": 0, "options": null, @@ -600,7 +600,7 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "0", "depends_on": null, "description": null, "docstatus": 0, @@ -608,7 +608,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_user_to_edit_additional_discount", + "fieldname": "posa_allow_user_to_edit_rate", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -620,15 +620,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_user_to_edit_rate", + "insert_after": "posa_allow_delete", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow user to edit Additional Discount", + "label": "Allow user to edit Rate", "length": 0, - "mandatory_depends_on": "0", - "modified": "2020-10-09 16:01:31.157157", + "mandatory_depends_on": null, + "modified": "2020-10-09 16:01:30.936524", "module": null, - "name": "POS Profile-posa_allow_user_to_edit_additional_discount", + "name": "POS Profile-posa_allow_user_to_edit_rate", "no_copy": 0, "non_negative": 0, "options": null, @@ -654,15 +654,15 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", - "depends_on": "posa_allow_user_to_edit_additional_discount", + "default": null, + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_use_percentage_discount", + "fieldname": "posa_allow_user_to_edit_additional_discount", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -674,15 +674,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_user_to_edit_additional_discount", + "insert_after": "posa_allow_user_to_edit_rate", "is_system_generated": 0, "is_virtual": 0, - "label": "Use Percentage Discount", + "label": "Allow user to edit Additional Discount", "length": 0, - "mandatory_depends_on": "", - "modified": "2021-09-26 14:08:06.765185", + "mandatory_depends_on": "0", + "modified": "2020-10-09 16:01:31.157157", "module": null, - "name": "POS Profile-posa_use_percentage_discount", + "name": "POS Profile-posa_allow_user_to_edit_additional_discount", "no_copy": 0, "non_negative": 0, "options": null, @@ -709,15 +709,15 @@ "collapsible_depends_on": null, "columns": 0, "default": "0", - "depends_on": "", + "depends_on": "posa_allow_user_to_edit_additional_discount", "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_max_discount_allowed", - "fieldtype": "Float", + "fieldname": "posa_use_percentage_discount", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -728,15 +728,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_use_percentage_discount", + "insert_after": "posa_allow_user_to_edit_additional_discount", "is_system_generated": 0, "is_virtual": 0, - "label": "Max Discount Percentage Allowed ", + "label": "Use Percentage Discount", "length": 0, - "mandatory_depends_on": null, - "modified": "2020-10-26 05:11:52.101322", + "mandatory_depends_on": "", + "modified": "2021-09-26 14:08:06.765185", "module": null, - "name": "POS Profile-posa_max_discount_allowed", + "name": "POS Profile-posa_use_percentage_discount", "no_copy": 0, "non_negative": 0, "options": null, @@ -762,16 +762,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "221", - "depends_on": null, - "description": "It is best not to use more than four numbers", + "default": "0", + "depends_on": "", + "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_scale_barcode_start", - "fieldtype": "Int", + "fieldname": "posa_max_discount_allowed", + "fieldtype": "Float", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -782,15 +782,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_max_discount_allowed", + "insert_after": "posa_use_percentage_discount", "is_system_generated": 0, "is_virtual": 0, - "label": "Scale Barcode Start With", + "label": "Max Discount Percentage Allowed ", "length": 0, "mandatory_depends_on": null, - "modified": "2020-10-30 03:54:32.270370", + "modified": "2020-10-26 05:11:52.101322", "module": null, - "name": "POS Profile-posa_scale_barcode_start", + "name": "POS Profile-posa_max_discount_allowed", "no_copy": 0, "non_negative": 0, "options": null, @@ -816,16 +816,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "221", "depends_on": null, - "description": null, + "description": "It is best not to use more than four numbers", "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_change_posting_date", - "fieldtype": "Check", + "fieldname": "posa_scale_barcode_start", + "fieldtype": "Int", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -836,15 +836,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_scale_barcode_start", + "insert_after": "posa_max_discount_allowed", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Change Posting Date", + "label": "Scale Barcode Start With", "length": 0, "mandatory_depends_on": null, - "modified": "2022-12-16 11:20:05.134781", + "modified": "2020-10-30 03:54:32.270370", "module": null, - "name": "POS Profile-posa_allow_change_posting_date", + "name": "POS Profile-posa_scale_barcode_start", "no_copy": 0, "non_negative": 0, "options": null, @@ -986,7 +986,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_default_card_view", + "fieldname": "posa_allow_change_posting_date", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -998,15 +998,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_change_posting_date", + "insert_after": "posa_scale_barcode_start", "is_system_generated": 0, "is_virtual": 0, - "label": "Default Card View", + "label": "Allow Change Posting Date", "length": 0, "mandatory_depends_on": null, - "modified": "2023-03-12 14:03:44.088542", + "modified": "2022-12-16 11:20:05.134781", "module": null, - "name": "POS Profile-posa_default_card_view", + "name": "POS Profile-posa_allow_change_posting_date", "no_copy": 0, "non_negative": 0, "options": null, @@ -1087,14 +1087,14 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_default_sales_order", + "fieldname": "posa_default_card_view", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -1106,15 +1106,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_default_card_view", + "insert_after": "posa_allow_change_posting_date", "is_system_generated": 0, "is_virtual": 0, - "label": "Default Sales Order", + "label": "Default Card View", "length": 0, "mandatory_depends_on": null, - "modified": "2023-03-12 14:37:41.556512", + "modified": "2023-03-12 14:03:44.088542", "module": null, - "name": "POS Profile-posa_default_sales_order", + "name": "POS Profile-posa_default_card_view", "no_copy": 0, "non_negative": 0, "options": null, @@ -1140,16 +1140,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", - "depends_on": null, + "default": null, + "depends_on": "", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Customer", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_discount", - "fieldtype": "Float", + "fieldname": "posa_default_sales_order", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -1160,17 +1160,17 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "lead_name", + "insert_after": "posa_default_card_view", "is_system_generated": 0, "is_virtual": 0, - "label": "Discount %", + "label": "Default Sales Order", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-04 21:02:31.784347", + "modified": "2023-03-12 14:37:41.556512", "module": null, - "name": "Customer-posa_discount", + "name": "POS Profile-posa_default_sales_order", "no_copy": 0, - "non_negative": 1, + "non_negative": 0, "options": null, "permlevel": 0, "precision": "", @@ -2001,7 +2001,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 0, + "collapsible": 1, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -2009,11 +2009,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Company", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_sales_order", - "fieldtype": "Check", + "fieldname": "posa_referral_section", + "fieldtype": "Section Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2024,15 +2024,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_column_break_112", + "insert_after": "total_monthly_sales", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Create Sales Order", + "label": "Referral Code", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-22 03:02:27.784096", + "modified": "2021-07-29 23:04:22.290849", "module": null, - "name": "POS Profile-posa_allow_sales_order", + "name": "Company-posa_referral_section", "no_copy": 0, "non_negative": 0, "options": null, @@ -2055,7 +2055,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 0, + "collapsible": 1, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -2063,11 +2063,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Sales Order", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "custom_allow_select_sales_order", - "fieldtype": "Check", + "fieldname": "posa_additional_notes_section", + "fieldtype": "Section Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2078,15 +2078,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_sales_order", + "insert_after": "items", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Select Sales Order", + "label": "Additional Notes", "length": 0, "mandatory_depends_on": null, - "modified": "2023-11-13 12:16:27.784096", + "modified": "2021-06-21 16:11:59.366893", "module": null, - "name": "POS Profile-custom_allow_select_sales_order", + "name": "Sales Order-posa_additional_notes_section", "no_copy": 0, "non_negative": 0, "options": null, @@ -2109,7 +2109,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 1, + "collapsible": 0, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -2117,11 +2117,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Company", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_section", - "fieldtype": "Section Break", + "fieldname": "posa_allow_sales_order", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2132,15 +2132,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "total_monthly_sales", + "insert_after": "posa_column_break_112", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Code", + "label": "Allow Create Sales Order", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:04:22.290849", + "modified": "2021-06-22 03:02:27.784096", "module": null, - "name": "Company-posa_referral_section", + "name": "POS Profile-posa_allow_sales_order", "no_copy": 0, "non_negative": 0, "options": null, @@ -2171,10 +2171,10 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Company", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_show_template_items", + "fieldname": "posa_auto_referral", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2186,15 +2186,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_sales_order", + "insert_after": "posa_referral_section", "is_system_generated": 0, "is_virtual": 0, - "label": "Show Template Items", + "label": "Auto Create Referral For New Customers", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-23 22:48:41.288938", + "modified": "2021-07-29 23:07:08.681215", "module": null, - "name": "POS Profile-posa_show_template_items", + "name": "Company-posa_auto_referral", "no_copy": 0, "non_negative": 0, "options": null, @@ -2225,11 +2225,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Company", + "dt": "Sales Order", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_auto_referral", - "fieldtype": "Check", + "fieldname": "posa_notes", + "fieldtype": "Small Text", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2240,15 +2240,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_referral_section", + "insert_after": "posa_additional_notes_section", "is_system_generated": 0, "is_virtual": 0, - "label": "Auto Create Referral For New Customers", + "label": "Additional Notes", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:07:08.681215", + "modified": "2021-06-21 16:11:59.829304", "module": null, - "name": "Company-posa_auto_referral", + "name": "Sales Order-posa_notes", "no_copy": 0, "non_negative": 0, "options": null, @@ -2263,7 +2263,7 @@ "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 0, + "translatable": 1, "unique": 0, "width": null }, @@ -2275,14 +2275,14 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "posa_show_template_items", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_hide_variants_items", + "fieldname": "posa_show_template_items", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2294,15 +2294,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_show_template_items", + "insert_after": "posa_allow_sales_order", "is_system_generated": 0, "is_virtual": 0, - "label": "Hide Variants Items", + "label": "Show Template Items", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-24 03:24:52.591942", + "modified": "2021-06-23 22:48:41.288938", "module": null, - "name": "POS Profile-posa_hide_variants_items", + "name": "POS Profile-posa_show_template_items", "no_copy": 0, "non_negative": 0, "options": null, @@ -2383,14 +2383,14 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": null, + "depends_on": "posa_show_template_items", "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_fetch_coupon", + "fieldname": "posa_hide_variants_items", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2402,15 +2402,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_hide_variants_items", + "insert_after": "posa_show_template_items", "is_system_generated": 0, "is_virtual": 0, - "label": "Auto Fetch Coupon Gifts", + "label": "Hide Variants Items", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 22:58:10.372543", + "modified": "2021-06-24 03:24:52.591942", "module": null, - "name": "POS Profile-posa_fetch_coupon", + "name": "POS Profile-posa_hide_variants_items", "no_copy": 0, "non_negative": 0, "options": null, @@ -2490,16 +2490,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", + "default": null, "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Customer", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_customer_purchase_order", - "fieldtype": "Check", + "fieldname": "posa_birthday", + "fieldtype": "Date", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2510,15 +2510,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_fetch_coupon", + "insert_after": "contact_html", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Customer Purchase Order", + "label": "Birthday", "length": 0, "mandatory_depends_on": null, - "modified": "2021-12-16 16:27:32.300240", + "modified": "2021-07-31 00:12:09.417519", "module": null, - "name": "POS Profile-posa_allow_customer_purchase_order", + "name": "Customer-posa_birthday", "no_copy": 0, "non_negative": 0, "options": null, @@ -2545,60 +2545,6 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": "posa_auto_referral", - "description": null, - "docstatus": 0, - "doctype": "Custom Field", - "dt": "Company", - "fetch_from": null, - "fetch_if_empty": 0, - "fieldname": "posa_primary_offer", - "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": "posa_customer_offer", - "is_system_generated": 0, - "is_virtual": 0, - "label": "Primary Customer Offer", - "length": 0, - "mandatory_depends_on": null, - "modified": "2021-07-29 23:11:05.290809", - "module": null, - "name": "Company-posa_primary_offer", - "no_copy": 0, - "non_negative": 0, - "options": "POS Offer", - "permlevel": 0, - "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, - "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": "0", "depends_on": null, "description": null, "docstatus": 0, @@ -2606,7 +2552,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_print_last_invoice", + "fieldname": "posa_fetch_coupon", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2618,15 +2564,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_customer_purchase_order", + "insert_after": "posa_hide_variants_items", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Print Last Invoice", + "label": "Auto Fetch Coupon Gifts", "length": 0, "mandatory_depends_on": null, - "modified": "2021-12-16 18:00:40.631156", + "modified": "2021-07-29 22:58:10.372543", "module": null, - "name": "POS Profile-posa_allow_print_last_invoice", + "name": "POS Profile-posa_fetch_coupon", "no_copy": 0, "non_negative": 0, "options": null, @@ -2652,7 +2598,7 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "", + "default": null, "depends_on": "posa_auto_referral", "description": null, "docstatus": 0, @@ -2660,7 +2606,7 @@ "dt": "Company", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_campaign", + "fieldname": "posa_primary_offer", "fieldtype": "Link", "hidden": 0, "hide_border": 0, @@ -2672,18 +2618,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_primary_offer", + "insert_after": "posa_customer_offer", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Campaign", + "label": "Primary Customer Offer", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:11:05.723688", + "modified": "2021-07-29 23:11:05.290809", "module": null, - "name": "Company-posa_referral_campaign", + "name": "Company-posa_primary_offer", "no_copy": 0, "non_negative": 0, - "options": "Campaign", + "options": "POS Offer", "permlevel": 0, "precision": "", "print_hide": 0, @@ -2703,7 +2649,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 0, + "collapsible": 1, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -2711,11 +2657,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Customer", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_display_additional_notes", - "fieldtype": "Check", + "fieldname": "posa_referral_section", + "fieldtype": "Section Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2726,15 +2672,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_print_last_invoice", + "insert_after": "posa_birthday", "is_system_generated": 0, "is_virtual": 0, - "label": "Display Additional Notes", + "label": "Referral Code", "length": 0, "mandatory_depends_on": null, - "modified": "2021-12-19 16:54:32.986600", + "modified": "2021-07-29 23:23:04.910503", "module": null, - "name": "POS Profile-posa_display_additional_notes", + "name": "Customer-posa_referral_section", "no_copy": 0, "non_negative": 0, "options": null, @@ -2760,7 +2706,7 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "0", "depends_on": null, "description": null, "docstatus": 0, @@ -2768,7 +2714,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_write_off_change", + "fieldname": "posa_allow_customer_purchase_order", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2780,15 +2726,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_display_additional_notes", + "insert_after": "posa_fetch_coupon", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Write Off Change", + "label": "Allow Customer Purchase Order", "length": 0, "mandatory_depends_on": null, - "modified": "2022-02-12 04:26:04.003374", + "modified": "2021-12-16 16:27:32.300240", "module": null, - "name": "POS Profile-posa_allow_write_off_change", + "name": "POS Profile-posa_allow_customer_purchase_order", "no_copy": 0, "non_negative": 0, "options": null, @@ -2811,19 +2757,19 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 1, + "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, - "depends_on": null, + "default": "", + "depends_on": "posa_auto_referral", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Order", + "dt": "Company", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_additional_notes_section", - "fieldtype": "Section Break", + "fieldname": "posa_referral_campaign", + "fieldtype": "Link", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2834,18 +2780,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "items", + "insert_after": "posa_primary_offer", "is_system_generated": 0, "is_virtual": 0, - "label": "Additional Notes", + "label": "Referral Campaign", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-21 16:11:59.366893", + "modified": "2021-07-29 23:11:05.723688", "module": null, - "name": "Sales Order-posa_additional_notes_section", + "name": "Company-posa_referral_campaign", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "Campaign", "permlevel": 0, "precision": "", "print_hide": 0, @@ -2862,7 +2808,7 @@ "width": null }, { - "allow_in_quick_entry": 0, + "allow_in_quick_entry": 1, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -2873,11 +2819,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice Item", + "dt": "Customer", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_offers", - "fieldtype": "Small Text", + "fieldname": "posa_referral_code", + "fieldtype": "Data", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2888,16 +2834,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "pricing_rules", + "insert_after": "posa_referral_section", "is_system_generated": 0, "is_virtual": 0, - "label": "POS Offers", + "label": "Referral Code", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-07 01:51:16.390447", + "modified": "2021-07-29 22:42:57.772021", "module": null, - "name": "Sales Invoice Item-posa_offers", - "no_copy": 0, + "name": "Customer-posa_referral_code", + "no_copy": 1, "non_negative": 0, "options": null, "permlevel": 0, @@ -2905,7 +2851,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -2930,7 +2876,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_new_line", + "fieldname": "posa_allow_print_last_invoice", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -2942,15 +2888,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_write_off_change", + "insert_after": "posa_allow_customer_purchase_order", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow add New Items on New Line", + "label": "Allow Print Last Invoice", "length": 0, "mandatory_depends_on": null, - "modified": "2022-05-17 01:01:52.106645", + "modified": "2021-12-16 18:00:40.631156", "module": null, - "name": "POS Profile-posa_new_line", + "name": "POS Profile-posa_allow_print_last_invoice", "no_copy": 0, "non_negative": 0, "options": null, @@ -2970,9 +2916,9 @@ "width": null }, { - "allow_in_quick_entry": 0, + "allow_in_quick_entry": 1, "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "collapsible_depends_on": null, "columns": 0, @@ -2981,11 +2927,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Order", + "dt": "Customer", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_notes", - "fieldtype": "Small Text", + "fieldname": "posa_referral_company", + "fieldtype": "Link", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -2996,18 +2942,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_additional_notes_section", + "insert_after": "posa_referral_code", "is_system_generated": 0, "is_virtual": 0, - "label": "Additional Notes", + "label": "Referral Company", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-21 16:11:59.829304", + "modified": "2021-07-29 23:24:11.207034", "module": null, - "name": "Sales Order-posa_notes", - "no_copy": 0, + "name": "Customer-posa_referral_company", + "no_copy": 1, "non_negative": 0, - "options": null, + "options": "Company", "permlevel": 0, "precision": "", "print_hide": 0, @@ -3019,7 +2965,7 @@ "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 1, + "translatable": 0, "unique": 0, "width": null }, @@ -3035,10 +2981,10 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice Item", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_offer_applied", + "fieldname": "posa_display_additional_notes", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3050,15 +2996,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_offers", + "insert_after": "posa_allow_print_last_invoice", "is_system_generated": 0, "is_virtual": 0, - "label": "Offer Applied", + "label": "Display Additional Notes", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-12 00:12:28.473489", + "modified": "2021-12-19 16:54:32.986600", "module": null, - "name": "Sales Invoice Item-posa_offer_applied", + "name": "POS Profile-posa_display_additional_notes", "no_copy": 0, "non_negative": 0, "options": null, @@ -3067,7 +3013,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -3084,16 +3030,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", + "default": null, "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Sales Invoice Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_input_qty", - "fieldtype": "Check", + "fieldname": "posa_offers", + "fieldtype": "Small Text", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3104,15 +3050,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_new_line", + "insert_after": "pricing_rules", "is_system_generated": 0, "is_virtual": 0, - "label": "Use QTY Input", + "label": "POS Offers", "length": 0, "mandatory_depends_on": null, - "modified": "2022-05-17 02:17:13.591004", + "modified": "2021-06-07 01:51:16.390447", "module": null, - "name": "POS Profile-posa_input_qty", + "name": "Sales Invoice Item-posa_offers", "no_copy": 0, "non_negative": 0, "options": null, @@ -3121,13 +3067,13 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 0, + "translatable": 1, "unique": 0, "width": null }, @@ -3143,10 +3089,10 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice Item", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_is_offer", + "fieldname": "posa_allow_write_off_change", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3155,18 +3101,18 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_global_search": 0, - "in_list_view": 1, + "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_offer_applied", + "insert_after": "posa_display_additional_notes", "is_system_generated": 0, "is_virtual": 0, - "label": "Is Offer", + "label": "Allow Write Off Change", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-12 00:14:20.894553", + "modified": "2022-02-12 04:26:04.003374", "module": null, - "name": "Sales Invoice Item-posa_is_offer", + "name": "POS Profile-posa_allow_write_off_change", "no_copy": 0, "non_negative": 0, "options": null, @@ -3175,7 +3121,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -3197,10 +3143,10 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Sales Invoice Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_print_draft_invoices", + "fieldname": "posa_offer_applied", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3212,15 +3158,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_input_qty", + "insert_after": "posa_offers", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Print Draft Invoices", + "label": "Offer Applied", "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-22 11:51:07.782265", + "modified": "2021-06-12 00:12:28.473489", "module": null, - "name": "POS Profile-posa_allow_print_draft_invoices", + "name": "Sales Invoice Item-posa_offer_applied", "no_copy": 0, "non_negative": 0, "options": null, @@ -3229,7 +3175,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -3246,16 +3192,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, - "depends_on": "", + "default": "0", + "depends_on": null, "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice Item", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_is_replace", - "fieldtype": "Data", + "fieldname": "posa_new_line", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3266,15 +3212,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_is_offer", + "insert_after": "posa_allow_write_off_change", "is_system_generated": 0, "is_virtual": 0, - "label": "Is Offer Replace For item Row ID", + "label": "Allow add New Items on New Line", "length": 0, "mandatory_depends_on": null, - "modified": "2021-06-17 18:10:36.233226", + "modified": "2022-05-17 01:01:52.106645", "module": null, - "name": "Sales Invoice Item-posa_is_replace", + "name": "POS Profile-posa_new_line", "no_copy": 0, "non_negative": 0, "options": null, @@ -3283,13 +3229,13 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 1, + "translatable": 0, "unique": 0, "width": null }, @@ -3305,10 +3251,10 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Sales Invoice Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_use_delivery_charges", + "fieldname": "posa_is_offer", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3317,18 +3263,18 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_print_draft_invoices", + "insert_after": "posa_offer_applied", "is_system_generated": 0, "is_virtual": 0, - "label": "Use Delivery Charges", + "label": "Is Offer", "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-25 11:57:17.864203", + "modified": "2021-06-12 00:14:20.894553", "module": null, - "name": "POS Profile-posa_use_delivery_charges", + "name": "Sales Invoice Item-posa_is_offer", "no_copy": 0, "non_negative": 0, "options": null, @@ -3337,7 +3283,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -3354,7 +3300,7 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "0", "depends_on": null, "description": null, "docstatus": 0, @@ -3362,7 +3308,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_auto_set_delivery_charges", + "fieldname": "posa_input_qty", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3374,15 +3320,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_use_delivery_charges", + "insert_after": "posa_new_line", "is_system_generated": 0, "is_virtual": 0, - "label": "Auto Set Delivery Charges", + "label": "Use QTY Input", "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-25 11:57:18.367414", + "modified": "2022-05-17 02:17:13.591004", "module": null, - "name": "POS Profile-posa_auto_set_delivery_charges", + "name": "POS Profile-posa_input_qty", "no_copy": 0, "non_negative": 0, "options": null, @@ -3409,15 +3355,15 @@ "collapsible_depends_on": null, "columns": 0, "default": null, - "depends_on": null, + "depends_on": "", "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Customer", + "dt": "Sales Invoice Item", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_birthday", - "fieldtype": "Date", + "fieldname": "posa_is_replace", + "fieldtype": "Data", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3428,15 +3374,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "contact_html", + "insert_after": "posa_is_offer", "is_system_generated": 0, "is_virtual": 0, - "label": "Birthday", + "label": "Is Offer Replace For item Row ID", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-31 00:12:09.417519", + "modified": "2021-06-17 18:10:36.233226", "module": null, - "name": "Customer-posa_birthday", + "name": "Sales Invoice Item-posa_is_replace", "no_copy": 0, "non_negative": 0, "options": null, @@ -3445,13 +3391,13 @@ "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 0, + "translatable": 1, "unique": 0, "width": null }, @@ -3470,7 +3416,7 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_allow_duplicate_customer_names", + "fieldname": "posa_allow_print_draft_invoices", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -3482,15 +3428,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_auto_set_delivery_charges", + "insert_after": "posa_input_qty", "is_system_generated": 0, "is_virtual": 0, - "label": "Allow Duplicate Customer Names", + "label": "Allow Print Draft Invoices", "length": 0, "mandatory_depends_on": null, - "modified": "2023-06-05 15:55:21.190823", + "modified": "2022-07-22 11:51:07.782265", "module": null, - "name": "POS Profile-posa_allow_duplicate_customer_names", + "name": "POS Profile-posa_allow_print_draft_invoices", "no_copy": 0, "non_negative": 0, "options": null, @@ -3513,7 +3459,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 1, + "collapsible": 0, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -3521,11 +3467,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Customer", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_section", - "fieldtype": "Section Break", + "fieldname": "posa_use_delivery_charges", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3536,15 +3482,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_birthday", + "insert_after": "posa_allow_print_draft_invoices", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Code", + "label": "Use Delivery Charges", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:23:04.910503", + "modified": "2022-07-25 11:57:17.864203", "module": null, - "name": "Customer-posa_referral_section", + "name": "POS Profile-posa_use_delivery_charges", "no_copy": 0, "non_negative": 0, "options": null, @@ -3567,7 +3513,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 1, + "collapsible": 0, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -3578,8 +3524,8 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "pos_awesome_payments", - "fieldtype": "Section Break", + "fieldname": "posa_auto_set_delivery_charges", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3590,15 +3536,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_allow_duplicate_customer_names", + "insert_after": "posa_use_delivery_charges", "is_system_generated": 0, "is_virtual": 0, - "label": "POS Awesome Payments", + "label": "Auto Set Delivery Charges", "length": 0, "mandatory_depends_on": null, - "modified": "2023-06-11 23:25:42.983974", + "modified": "2022-07-25 11:57:18.367414", "module": null, - "name": "POS Profile-pos_awesome_payments", + "name": "POS Profile-posa_auto_set_delivery_charges", "no_copy": 0, "non_negative": 0, "options": null, @@ -3618,7 +3564,7 @@ "width": null }, { - "allow_in_quick_entry": 1, + "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -3629,11 +3575,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Customer", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_code", - "fieldtype": "Data", + "fieldname": "posa_allow_duplicate_customer_names", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3644,16 +3590,16 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_referral_section", + "insert_after": "posa_auto_set_delivery_charges", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Code", + "label": "Allow Duplicate Customer Names", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 22:42:57.772021", + "modified": "2023-06-05 15:55:21.190823", "module": null, - "name": "Customer-posa_referral_code", - "no_copy": 1, + "name": "POS Profile-posa_allow_duplicate_customer_names", + "no_copy": 0, "non_negative": 0, "options": null, "permlevel": 0, @@ -3667,7 +3613,7 @@ "reqd": 0, "search_index": 0, "sort_options": 0, - "translatable": 1, + "translatable": 0, "unique": 0, "width": null }, @@ -3675,7 +3621,7 @@ "allow_in_quick_entry": 0, "allow_on_submit": 0, "bold": 0, - "collapsible": 0, + "collapsible": 1, "collapsible_depends_on": null, "columns": 0, "default": null, @@ -3686,8 +3632,8 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_use_pos_awesome_payments", - "fieldtype": "Check", + "fieldname": "pos_awesome_payments", + "fieldtype": "Section Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3698,15 +3644,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "pos_awesome_payments", + "insert_after": "posa_allow_duplicate_customer_names", "is_system_generated": 0, "is_virtual": 0, - "label": "Use POS Awesome Payments", + "label": "POS Awesome Payments", "length": 0, "mandatory_depends_on": null, - "modified": "2023-06-11 23:25:43.339584", + "modified": "2023-06-11 23:25:42.983974", "module": null, - "name": "POS Profile-posa_use_pos_awesome_payments", + "name": "POS Profile-pos_awesome_payments", "no_copy": 0, "non_negative": 0, "options": null, @@ -3726,9 +3672,9 @@ "width": null }, { - "allow_in_quick_entry": 1, + "allow_in_quick_entry": 0, "allow_on_submit": 0, - "bold": 1, + "bold": 0, "collapsible": 0, "collapsible_depends_on": null, "columns": 0, @@ -3737,11 +3683,11 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Customer", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_referral_company", - "fieldtype": "Link", + "fieldname": "posa_use_pos_awesome_payments", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -3752,18 +3698,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_referral_code", + "insert_after": "pos_awesome_payments", "is_system_generated": 0, "is_virtual": 0, - "label": "Referral Company", + "label": "Use POS Awesome Payments", "length": 0, "mandatory_depends_on": null, - "modified": "2021-07-29 23:24:11.207034", + "modified": "2023-06-11 23:25:43.339584", "module": null, - "name": "Customer-posa_referral_company", - "no_copy": 1, + "name": "POS Profile-posa_use_pos_awesome_payments", + "no_copy": 0, "non_negative": 0, - "options": "Company", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, @@ -4211,6 +4157,60 @@ "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 Invoice", + "fetch_from": "shipping_address_name.posa_delivery_charges", + "fetch_if_empty": 1, + "fieldname": "posa_delivery_charges", + "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": "taxes_and_charges", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Delivery Charges", + "length": 0, + "mandatory_depends_on": null, + "modified": "2022-07-25 11:49:02.312879", + "module": null, + "name": "Sales Invoice-posa_delivery_charges", + "no_copy": 0, + "non_negative": 0, + "options": "Delivery Charges", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "allow_in_quick_entry": 0, "allow_on_submit": 0, @@ -4277,12 +4277,12 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "POS Profile", + "dt": "Sales Invoice", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "column_break_dqsba", - "fieldtype": "Column Break", - "hidden": 0, + "fieldname": "posa_delivery_charges_rate", + "fieldtype": "Currency", + "hidden": 1, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -4292,24 +4292,24 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_tax_inclusive", + "insert_after": "posa_delivery_charges", "is_system_generated": 0, "is_virtual": 0, - "label": null, + "label": "Delivery Charges Rate", "length": 0, "mandatory_depends_on": null, - "modified": "2023-04-24 14:44:48.969896", + "modified": "2022-07-25 11:49:04.797031", "module": null, - "name": "POS Profile-column_break_dqsba", + "name": "Sales Invoice-posa_delivery_charges_rate", "no_copy": 0, "non_negative": 0, - "options": null, + "options": "currency", "permlevel": 0, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 0, + "read_only": 1, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -4326,7 +4326,7 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "1", + "default": null, "depends_on": null, "description": null, "docstatus": 0, @@ -4334,8 +4334,8 @@ "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_local_storage", - "fieldtype": "Check", + "fieldname": "column_break_dqsba", + "fieldtype": "Column Break", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -4346,15 +4346,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "column_break_dqsba", + "insert_after": "posa_tax_inclusive", "is_system_generated": 0, "is_virtual": 0, - "label": "Use Browser Local Storage", + "label": null, "length": 0, "mandatory_depends_on": null, - "modified": "2020-11-13 22:14:13.683091", + "modified": "2023-04-24 14:44:48.969896", "module": null, - "name": "POS Profile-posa_local_storage", + "name": "POS Profile-column_break_dqsba", "no_copy": 0, "non_negative": 0, "options": null, @@ -4380,15 +4380,15 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": "0", + "default": "1", "depends_on": null, - "description": "Use Redis cache on the server to speedup initial loads of POS Awesome ", + "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_use_server_cache", + "fieldname": "posa_local_storage", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -4400,15 +4400,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_local_storage", + "insert_after": "column_break_dqsba", "is_system_generated": 0, "is_virtual": 0, - "label": "Use Server Cache", + "label": "Use Browser Local Storage", "length": 0, "mandatory_depends_on": null, - "modified": "2023-04-24 14:44:49.219453", + "modified": "2020-11-13 22:14:13.683091", "module": null, - "name": "POS Profile-posa_use_server_cache", + "name": "POS Profile-posa_local_storage", "no_copy": 0, "non_negative": 0, "options": null, @@ -4434,16 +4434,16 @@ "collapsible": 0, "collapsible_depends_on": null, "columns": 0, - "default": null, + "default": "0", "depends_on": null, - "description": null, + "description": "Use Redis cache on the server to speedup initial loads of POS Awesome ", "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice", - "fetch_from": "shipping_address_name.posa_delivery_charges", - "fetch_if_empty": 1, - "fieldname": "posa_delivery_charges", - "fieldtype": "Link", + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "posa_use_server_cache", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -4454,18 +4454,18 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "taxes_and_charges", + "insert_after": "posa_local_storage", "is_system_generated": 0, "is_virtual": 0, - "label": "Delivery Charges", + "label": "Use Server Cache", "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-25 11:49:02.312879", + "modified": "2023-04-24 14:44:49.219453", "module": null, - "name": "Sales Invoice-posa_delivery_charges", + "name": "POS Profile-posa_use_server_cache", "no_copy": 0, "non_negative": 0, - "options": "Delivery Charges", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, @@ -4547,12 +4547,12 @@ "description": null, "docstatus": 0, "doctype": "Custom Field", - "dt": "Sales Invoice", + "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "posa_delivery_charges_rate", - "fieldtype": "Currency", - "hidden": 1, + "fieldname": "column_break_anyol", + "fieldtype": "Column Break", + "hidden": 0, "hide_border": 0, "hide_days": 0, "hide_seconds": 0, @@ -4562,24 +4562,24 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_delivery_charges", + "insert_after": "posa_server_cache_duration", "is_system_generated": 0, "is_virtual": 0, - "label": "Delivery Charges Rate", + "label": null, "length": 0, "mandatory_depends_on": null, - "modified": "2022-07-25 11:49:04.797031", + "modified": "2023-06-05 16:59:17.793139", "module": null, - "name": "Sales Invoice-posa_delivery_charges_rate", + "name": "POS Profile-column_break_anyol", "no_copy": 0, "non_negative": 0, - "options": "currency", + "options": null, "permlevel": 0, "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "print_width": null, - "read_only": 1, + "read_only": 0, "read_only_depends_on": null, "report_hide": 0, "reqd": 0, @@ -4598,14 +4598,14 @@ "columns": 0, "default": null, "depends_on": null, - "description": null, + "description": "Use Search Limit for Items", "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "column_break_anyol", - "fieldtype": "Column Break", + "fieldname": "pose_use_limit_search", + "fieldtype": "Check", "hidden": 0, "hide_border": 0, "hide_days": 0, @@ -4616,15 +4616,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "posa_server_cache_duration", + "insert_after": "column_break_anyol", "is_system_generated": 0, "is_virtual": 0, - "label": null, + "label": "Use Limit Search", "length": 0, "mandatory_depends_on": null, - "modified": "2023-06-05 16:59:17.793139", + "modified": "2023-06-05 16:59:18.429778", "module": null, - "name": "POS Profile-column_break_anyol", + "name": "POS Profile-pose_use_limit_search", "no_copy": 0, "non_negative": 0, "options": null, @@ -4652,13 +4652,13 @@ "columns": 0, "default": null, "depends_on": null, - "description": "Use Search Limit for Items", + "description": null, "docstatus": 0, "doctype": "Custom Field", "dt": "POS Profile", "fetch_from": null, "fetch_if_empty": 0, - "fieldname": "pose_use_limit_search", + "fieldname": "custom_allow_select_sales_order", "fieldtype": "Check", "hidden": 0, "hide_border": 0, @@ -4670,15 +4670,15 @@ "in_list_view": 0, "in_preview": 0, "in_standard_filter": 0, - "insert_after": "column_break_anyol", + "insert_after": "posa_search_limit", "is_system_generated": 0, "is_virtual": 0, - "label": "Use Limit Search", + "label": "Allow Select Sales Order", "length": 0, "mandatory_depends_on": null, - "modified": "2023-06-05 16:59:18.429778", + "modified": "2023-11-13 12:16:27.784096", "module": null, - "name": "POS Profile-pose_use_limit_search", + "name": "POS Profile-custom_allow_select_sales_order", "no_copy": 0, "non_negative": 0, "options": null, diff --git a/posawesome/fixtures/property_setter.json b/posawesome/fixtures/property_setter.json index 39fc1f0735..5ab434ae53 100644 --- a/posawesome/fixtures/property_setter.json +++ b/posawesome/fixtures/property_setter.json @@ -7,7 +7,7 @@ "doctype_or_field": "DocField", "field_name": "posa_pos_opening_shift", "is_system_generated": 0, - "modified": "2020-10-26 15:35:40.861492", + "modified": "2025-08-20 11:26:02.527469", "module": null, "name": "Sales Invoice-posa_pos_opening_shift-no_copy", "property": "no_copy", diff --git a/posawesome/fixtures/role.json b/posawesome/fixtures/role.json index fd2f9edba3..54e4bab6ef 100644 --- a/posawesome/fixtures/role.json +++ b/posawesome/fixtures/role.json @@ -1,4 +1,17 @@ [ + { + "desk_access": 1, + "disabled": 0, + "docstatus": 0, + "doctype": "Role", + "home_page": null, + "is_custom": 0, + "modified": "2025-08-20 11:14:28.247108", + "name": "Sales Commission Admin", + "restrict_to_domain": null, + "role_name": "Sales Commission Admin", + "two_factor_auth": 0 + }, { "desk_access": 1, "disabled": 0, diff --git a/posawesome/hooks.py b/posawesome/hooks.py index 5ea15a48bd..90779aaa75 100644 --- a/posawesome/hooks.py +++ b/posawesome/hooks.py @@ -269,7 +269,9 @@ "filters": [["name", "in", ("Sales Invoice-posa_pos_opening_shift-no_copy")]], }, { - "doctype": "Role", - "filters": [["role_name", "=", "Sales Commission"]], + "doctype": "Role", + "filters": [ + ["role_name", "in", ["Sales Commission", "Sales Commission Admin"]] + ], }, ] diff --git a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js index 0182a490cd..5f9aa0f484 100644 --- a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js +++ b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js @@ -7,6 +7,9 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { $(page.body).addClass("page-layout-main-section"); + // ✅ Check if user has Sales Commission Admin role + const is_admin = frappe.user_roles.includes("Sales Commission Admin"); + // Add filters const filters = [ { @@ -14,7 +17,7 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { label: __("Sales Person"), fieldtype: "Link", options: "Sales Person", - reqd: 1, + reqd: is_admin ? 0 : 1, // required only if NOT admin }, { fieldname: "payment_status", @@ -207,7 +210,8 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { const sales_person = page.sales_person.get_value(); const payment_status = page.payment_status.get_value(); - if (!sales_person) { + // ✅ Only enforce required if NOT admin + if (!is_admin && !sales_person) { frappe.msgprint({ title: __('Missing Required Field'), message: __('Please select a Sales Person to search.'), From 4cee8de7a14b2f207c1f17b8b290f55fea90aebc Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Mon, 25 Aug 2025 23:19:32 +0530 Subject: [PATCH 15/25] feature:Replicate Sales Person Functionality for Sales Partner --- .../__init__.py | 0 .../sales_partner_commission_bulk_pay_out.js | 8 + ...sales_partner_commission_bulk_pay_out.json | 105 +++++++ .../sales_partner_commission_bulk_pay_out.py | 22 ++ ...t_sales_partner_commission_bulk_pay_out.py | 9 + .../__init__.py | 0 ...partner_commission_bulk_pay_out_items.json | 51 ++++ ...s_partner_commission_bulk_pay_out_items.py | 8 + .../page/sales_partner_commis/__init__.py | 0 .../sales_partner_commis.js | 261 ++++++++++++++++++ .../sales_partner_commis.json | 23 ++ .../sales_partner_commis.py | 92 ++++++ .../posawesome/workspace/pages/pages.json | 14 +- 13 files changed, 591 insertions(+), 2 deletions(-) create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/__init__.py create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.js create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.json create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.py create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/test_sales_partner_commission_bulk_pay_out.py create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/__init__.py create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/sales_partner_commission_bulk_pay_out_items.json create mode 100644 posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/sales_partner_commission_bulk_pay_out_items.py create mode 100644 posawesome/posawesome/page/sales_partner_commis/__init__.py create mode 100644 posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.js create mode 100644 posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.json create mode 100644 posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.py diff --git a/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/__init__.py b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.js b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.js new file mode 100644 index 0000000000..f016b36e93 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.js @@ -0,0 +1,8 @@ +// Copyright (c) 2025, Youssef Restom and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Sales Partner Commission Bulk Pay Out', { + // refresh: function(frm) { + + // } +}); diff --git a/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.json b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.json new file mode 100644 index 0000000000..d53934db53 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.json @@ -0,0 +1,105 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "format:SPAR-BPO-{DD}-{MM}-{YYYY}-{####}", + "creation": "2025-08-21 11:28:05.247787", + "default_view": "List", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "sales_partner", + "column_break_3bewg", + "mode_of_payment", + "posting_datetime", + "section_break_15rbm", + "items", + "total_commission", + "amended_from" + ], + "fields": [ + { + "fieldname": "amended_from", + "fieldtype": "Link", + "label": "Amended From", + "no_copy": 1, + "options": "Sales Partner Commission Bulk Pay Out", + "print_hide": 1, + "read_only": 1, + "search_index": 1 + }, + { + "fieldname": "column_break_3bewg", + "fieldtype": "Column Break" + }, + { + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "label": "Mode Of Payment", + "options": "Mode of Payment" + }, + { + "fieldname": "posting_datetime", + "fieldtype": "Datetime", + "label": "Posting Date/Time" + }, + { + "fieldname": "section_break_15rbm", + "fieldtype": "Section Break" + }, + { + "fieldname": "items", + "fieldtype": "Table", + "label": "Items", + "options": "Sales Partner Commission Bulk Pay Out Items" + }, + { + "fieldname": "total_commission", + "fieldtype": "Currency", + "label": "Total Commission" + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "label": "Amended From", + "no_copy": 1, + "options": "Sales Partner Commission Bulk Pay Out", + "print_hide": 1, + "read_only": 1, + "search_index": 1 + }, + { + "fieldname": "sales_partner", + "fieldtype": "Link", + "label": "Sales Partner", + "options": "Sales Partner" + } + ], + "index_web_pages_for_search": 1, + "is_submittable": 1, + "links": [], + "modified": "2025-08-21 12:25:12.927539", + "modified_by": "Administrator", + "module": "POSAwesome", + "name": "Sales Partner Commission Bulk Pay Out", + "naming_rule": "Expression", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [], + "track_changes": 1 +} \ No newline at end of file diff --git a/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.py b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.py new file mode 100644 index 0000000000..35874ddce0 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/sales_partner_commission_bulk_pay_out.py @@ -0,0 +1,22 @@ +# Copyright (c) 2025, Youssef Restom and contributors +# For license information, please see license.txt + +# import frappe +import frappe +from frappe.model.document import Document +from frappe import _ + +class SalesPartnerCommissionBulkPayOut(Document): + def before_submit(self): + if not self.mode_of_payment: + frappe.throw(_("Mode of Payment is required before submitting.")) + + def on_submit(self): + for row in self.items: + if row.reference_sales_invoice: + frappe.db.set_value( + "Sales Invoice", + row.reference_sales_invoice, + "custom_partner_commission_paid", + 1 + ) \ No newline at end of file diff --git a/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/test_sales_partner_commission_bulk_pay_out.py b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/test_sales_partner_commission_bulk_pay_out.py new file mode 100644 index 0000000000..49f1e3ab19 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out/test_sales_partner_commission_bulk_pay_out.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, Youssef Restom and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestSalesPartnerCommissionBulkPayOut(FrappeTestCase): + pass diff --git a/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/__init__.py b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/sales_partner_commission_bulk_pay_out_items.json b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/sales_partner_commission_bulk_pay_out_items.json new file mode 100644 index 0000000000..b02da30e57 --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/sales_partner_commission_bulk_pay_out_items.json @@ -0,0 +1,51 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2025-08-21 11:26:29.193887", + "default_view": "List", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "reference_sales_invoice", + "commission", + "mode_of_payment" + ], + "fields": [ + { + "fieldname": "reference_sales_invoice", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Reference Sales Invoice", + "options": "Sales Invoice" + }, + { + "fieldname": "commission", + "fieldtype": "Currency", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Commission" + }, + { + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Mode Of Payment", + "options": "Mode of Payment" + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2025-08-21 11:26:29.193887", + "modified_by": "Administrator", + "module": "POSAwesome", + "name": "Sales Partner Commission Bulk Pay Out Items", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/sales_partner_commission_bulk_pay_out_items.py b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/sales_partner_commission_bulk_pay_out_items.py new file mode 100644 index 0000000000..23aa80de4e --- /dev/null +++ b/posawesome/posawesome/doctype/sales_partner_commission_bulk_pay_out_items/sales_partner_commission_bulk_pay_out_items.py @@ -0,0 +1,8 @@ +# Copyright (c) 2025, Youssef Restom and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + +class SalesPartnerCommissionBulkPayOutItems(Document): + pass \ No newline at end of file diff --git a/posawesome/posawesome/page/sales_partner_commis/__init__.py b/posawesome/posawesome/page/sales_partner_commis/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.js b/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.js new file mode 100644 index 0000000000..95c9d4af4b --- /dev/null +++ b/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.js @@ -0,0 +1,261 @@ + +frappe.pages['sales-partner-commis'].on_page_load = function (wrapper) { + const page = frappe.ui.make_app_page({ + parent: wrapper, + title: 'Sales Partner Commission', + single_column: true + }); + + $(page.body).addClass("page-layout-main-section"); + + // ✅ Check if user has Sales Commission Admin role + const is_admin = frappe.user_roles.includes("Sales Commission Admin"); + + // Add filters + const filters = [ + { + fieldname: "sales_partner", + label: __("Sales Partner"), + fieldtype: "Link", + options: "Sales Partner", + reqd: is_admin ? 0 : 1, // required only if NOT admin + }, + { + fieldname: "payment_status", + label: __("Payment Status"), + fieldtype: "Select", + options: ["Pending", "Paid"], + default: "Pending" + } + ]; + + const filter_group = $('
').appendTo(page.body); + filters.forEach((filter) => { + const field_wrapper = $('
').appendTo(filter_group); + const field = frappe.ui.form.make_control({ + df: filter, + parent: field_wrapper, + render_input: true + }); + field.refresh(); + page[filter.fieldname] = field; + }); + + // Set default value for Payment Status manually + setTimeout(() => { + if (page.payment_status) { + page.payment_status.set_value("Pending"); + } + }, 100); + + // Buttons + const button_group = $(` +
+
+ + +
+
+ `).appendTo(page.body); + + // Result container + const result_container = $('
').appendTo(page.body); + + let all_commission_data = []; + + // Load commission data + function load_commission_data(sales_partner = "", payment_status = "Pending") { + result_container.empty().html('Loading...'); + frappe.call({ + method: "posawesome.posawesome.page.sales_partner_commis.sales_partner_commis.get_commission_data", + args: { + sales_partner: sales_partner, + payment_status: payment_status + }, + callback: function (r) { + if (r.message && r.message.length > 0) { + all_commission_data = r.message.map(row => ({ + ...row, + commission: typeof row.commission === "object" ? row.commission.parsedValue || row.commission.source : row.commission + })); + + result_container.empty(); + + // Build table header dynamically + let headerHTML = ` + + Sr No. + + + + + Sales Partner + Commission + Mode of Payment + Reference Sales Invoice + `; + + if (payment_status === "Paid") { + headerHTML += ` + BPO Name + BPO Date/Time + `; + } + + headerHTML += ``; + + const table = $(` + + + ${headerHTML} + + +
+ `).appendTo(result_container); + + const tbody = table.find("tbody"); + + all_commission_data.forEach((row, index) => { + const sr_no = index + 1; + let trHTML = ` + ${sr_no} + + ${row.sales_partner || ''} + ${row.commission || ''} + ${row.mode_of_payment || ''} + ${row.reference_sales_invoice || ''} + `; + + if (payment_status === "Paid") { + trHTML += ` + ${row.bpo_name || ''} + ${row.bpo_datetime || ''} + `; + } + + tbody.append(`${trHTML}`); + }); + + // Handle "Select All" + $('#select_all_rows').on('change', function () { + const checked = $(this).is(':checked'); + $('.select-row').prop('checked', checked); + }); + + result_container.on('change', '.select-row', function () { + const total = $('.select-row').length; + const checked = $('.select-row:checked').length; + $('#select_all_rows').prop('checked', total === checked); + }); + + if (payment_status === "Pending") { + const bulkButtonRow = $(` +
+ +
+ `); + result_container.append(bulkButtonRow); + + $('#bulk_payout_btn').on('click', function () { + const selectedIndexes = $('.select-row:checked').map(function () { + return $(this).data('index'); + }).get(); + + if (selectedIndexes.length === 0) { + frappe.msgprint(__('Please select at least one record to proceed with bulk payout.')); + return; + } + + const selectedData = selectedIndexes.map(index => all_commission_data[index]); + window.selected_commission_rows = selectedData; + + frappe.confirm( + __('Are you sure you want to create a Bulk Payout for the selected records?'), + function () { + frappe.call({ + method: "posawesome.posawesome.page.sales_partner_commis.sales_partner_commis.create_bulk_payout", + args: { + data: selectedData + }, + callback: function (r) { + if (r.message) { + const docname = r.message; + const link = frappe.utils.get_form_link('Sales Partner Commission Bulk Pay Out', docname); + frappe.msgprint({ + title: __('Bulk Payout Created'), + indicator: 'green', + message: __('Sales Partner Commission Bulk Pay Out created: {0}', [link]) + }); + } + } + }); + }, + function () { + frappe.msgprint(__('Bulk Payout creation was cancelled.')); + } + ); + }); + } + } else { + result_container.html(`
No Data Found
`); + } + } + }); + } + + + // Search button + $('#search_btn').on('click', function () { + const sales_partner = page.sales_partner.get_value(); + const payment_status = page.payment_status.get_value(); + + // ✅ Only enforce required if NOT admin + if (!is_admin && !sales_partner) { + frappe.msgprint({ + title: __('Missing Required Field'), + message: __('Please select a Sales Partner to search.'), + indicator: 'red' + }); + return; + } + + load_commission_data(sales_partner, payment_status); + }); + + // Clear button + $('#clear_btn').on('click', function () { + result_container.empty(); + all_commission_data = []; + window.selected_commission_rows = []; + page.sales_partner.set_value(''); + page.payment_status.set_value("Pending"); + }); + + // Style override + $(``).appendTo("head"); +}; diff --git a/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.json b/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.json new file mode 100644 index 0000000000..245e3bbe4f --- /dev/null +++ b/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.json @@ -0,0 +1,23 @@ +{ + "content": null, + "creation": "2025-08-21 12:05:56.508918", + "docstatus": 0, + "doctype": "Page", + "idx": 0, + "modified": "2025-08-21 12:06:13.526660", + "modified_by": "Administrator", + "module": "POSAwesome", + "name": "sales-partner-commis", + "owner": "Administrator", + "page_name": "sales-partner-commis", + "roles": [ + { + "role": "Sales Commission" + } + ], + "script": null, + "standard": "Yes", + "style": null, + "system_page": 0, + "title": "Sales Partner Commission" +} \ No newline at end of file diff --git a/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.py b/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.py new file mode 100644 index 0000000000..36c6f0a176 --- /dev/null +++ b/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.py @@ -0,0 +1,92 @@ +import frappe +from frappe import _ +from frappe.utils import now_datetime, flt + + +@frappe.whitelist() +def get_commission_data(sales_partner=None, payment_status="Pending"): + filters = {} + if sales_partner: + filters["sales_partner"] = sales_partner + + data = frappe.get_all( + "Sales Partner Commission Payment", + filters=filters, + fields=["name", "sales_partner", "commission", "mode_of_payment", "reference_sales_invoice"], + order_by="creation desc" + ) + + filtered_data = [] + for row in data: + si = frappe.get_doc("Sales Invoice", row["reference_sales_invoice"]) + if (payment_status == "Pending" and not si.custom_partner_commission_paid) or \ + (payment_status == "Paid" and si.custom_partner_commission_paid): + row["commission"] = float(row["commission"]) + + # For Paid, find the BPO record containing this invoice + if payment_status == "Paid": + # First find the parent BPO linked to this invoice + bpo = frappe.db.sql(""" + SELECT parent + FROM `tabSales Partner Commission Bulk Pay Out Items` + WHERE reference_sales_invoice = %s + LIMIT 1 + """, row["reference_sales_invoice"], as_dict=True) + + if bpo: + row["bpo_name"] = bpo[0].parent + # Now fetch posting_datetime from the parent doctype + row["bpo_datetime"] = frappe.db.get_value( + "Sales Partner Commission Bulk Pay Out", + bpo[0].parent, + "posting_datetime" + ) + else: + row["bpo_name"] = "" + row["bpo_datetime"] = "" + + + filtered_data.append(row) + + return filtered_data + + + + + + + +@frappe.whitelist() +def create_bulk_payout(data): + import json + if isinstance(data, str): + data = json.loads(data) + + if not data: + frappe.throw(_("No data received for bulk payout")) + + sales_partner = data[0].get("sales_partner") + total_commission = 0 + + doc = frappe.new_doc("Sales Partner Commission Bulk Pay Out") + doc.sales_partner = sales_partner + doc.posting_datetime = now_datetime() + + for row in data: + commission = flt(row.get("commission") or 0) + total_commission += commission + + doc.append("items", { + "reference_sales_invoice": row.get("reference_sales_invoice"), + "commission": commission, + "mode_of_payment": row.get("mode_of_payment") + }) + + doc.total_commission = total_commission + doc.insert() + + # Generate clickable link (optional) + link = f'{doc.name}' + frappe.msgprint(_("Sales Partner Commission Bulk Pay Out created: {0}").format(link)) + + return doc.name diff --git a/posawesome/posawesome/workspace/pages/pages.json b/posawesome/posawesome/workspace/pages/pages.json index a0f20dfafc..1d80c01693 100644 --- a/posawesome/posawesome/workspace/pages/pages.json +++ b/posawesome/posawesome/workspace/pages/pages.json @@ -16,7 +16,7 @@ "hidden": 0, "is_query_report": 0, "label": "Commission", - "link_count": 1, + "link_count": 2, "link_type": "DocType", "onboard": 0, "type": "Card Break" @@ -30,9 +30,19 @@ "link_type": "Page", "onboard": 0, "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Sales Partner", + "link_count": 0, + "link_to": "sales-partner-commis", + "link_type": "Page", + "onboard": 0, + "type": "Link" } ], - "modified": "2025-08-07 14:20:43.830822", + "modified": "2025-08-25 12:17:42.048297", "modified_by": "Administrator", "module": "POSAwesome", "name": "Pages", From 1ed8f7fbc249905899057afc930f2975d9950c94 Mon Sep 17 00:00:00 2001 From: Cruze08 Date: Tue, 26 Aug 2025 22:04:17 +0530 Subject: [PATCH 16/25] feature:POS profile setting for Discount request and Commission added --- posawesome/posawesome/custom/pos_profile.json | 368 +++++++++++++++++- .../sales_partner_commis.js | 22 +- .../sales_person_commiss.js | 22 +- .../js/posapp/components/pos/Payments.vue | 124 +++--- 4 files changed, 450 insertions(+), 86 deletions(-) diff --git a/posawesome/posawesome/custom/pos_profile.json b/posawesome/posawesome/custom/pos_profile.json index 14a860b8c5..ef9ae3854a 100644 --- a/posawesome/posawesome/custom/pos_profile.json +++ b/posawesome/posawesome/custom/pos_profile.json @@ -244,6 +244,311 @@ "unique": 0, "width": null }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-25 13:56:36.793646", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_column_break_8gvoy", + "fieldtype": "Column Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 11, + "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": "custom_discount_enabled", + "is_system_generated": 0, + "is_virtual": 0, + "label": null, + "length": 0, + "mandatory_depends_on": null, + "modified": "2025-08-25 13:56:36.793646", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-custom_column_break_8gvoy", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-25 13:56:37.240191", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_commission_enabled", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 13, + "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": "custom_commission_request", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Commission enabled", + "length": 0, + "mandatory_depends_on": null, + "modified": "2025-08-25 13:56:37.240191", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-custom_commission_enabled", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-25 13:56:36.982857", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_commission_request", + "fieldtype": "Section Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 12, + "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": "custom_column_break_8gvoy", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Commission Request", + "length": 0, + "mandatory_depends_on": null, + "modified": "2025-08-25 13:56:36.982857", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-custom_commission_request", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-25 13:56:36.598414", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_discount_enabled", + "fieldtype": "Check", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 10, + "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": "custom_discount_request", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Discount enabled", + "length": 0, + "mandatory_depends_on": null, + "modified": "2025-08-25 13:56:36.598414", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-custom_discount_enabled", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-25 13:56:36.322250", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_discount_request", + "fieldtype": "Section Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 9, + "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": "campaign", + "is_system_generated": 0, + "is_virtual": 0, + "label": "Discount Request", + "length": 0, + "mandatory_depends_on": null, + "modified": "2025-08-25 13:56:36.322250", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-custom_discount_request", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "_assign": null, "_comments": null, @@ -305,6 +610,67 @@ "unique": 0, "width": null }, + { + "_assign": null, + "_comments": null, + "_liked_by": null, + "_user_tags": null, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": null, + "columns": 0, + "creation": "2025-08-25 13:59:50.219372", + "default": null, + "depends_on": null, + "description": null, + "docstatus": 0, + "dt": "POS Profile", + "fetch_from": null, + "fetch_if_empty": 0, + "fieldname": "custom_section_break_zlymw", + "fieldtype": "Section Break", + "hidden": 0, + "hide_border": 0, + "hide_days": 0, + "hide_seconds": 0, + "idx": 13, + "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": "custom_commission_enabled", + "is_system_generated": 0, + "is_virtual": 0, + "label": null, + "length": 0, + "mandatory_depends_on": null, + "modified": "2025-08-25 13:59:50.219372", + "modified_by": "Administrator", + "module": null, + "name": "POS Profile-custom_section_break_zlymw", + "no_copy": 0, + "non_negative": 0, + "options": null, + "owner": "Administrator", + "permlevel": 0, + "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, + "sort_options": 0, + "translatable": 0, + "unique": 0, + "width": null + }, { "_assign": null, "_comments": null, @@ -3759,7 +4125,7 @@ "field_name": null, "idx": 0, "is_system_generated": 0, - "modified": "2025-07-23 14:55:10.037064", + "modified": "2025-08-25 14:11:27.358989", "modified_by": "Administrator", "module": null, "name": "POS Profile-main-field_order", diff --git a/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.js b/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.js index 95c9d4af4b..ce48cccf44 100644 --- a/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.js +++ b/posawesome/posawesome/page/sales_partner_commis/sales_partner_commis.js @@ -52,14 +52,14 @@ frappe.pages['sales-partner-commis'].on_page_load = function (wrapper) { const button_group = $(`
- - + +
`).appendTo(page.body); // Result container - const result_container = $('
').appendTo(page.body); + const result_container = $('
').appendTo(page.body); let all_commission_data = []; @@ -86,8 +86,8 @@ frappe.pages['sales-partner-commis'].on_page_load = function (wrapper) { Sr No. - - + + Sales Partner Commission @@ -137,7 +137,7 @@ frappe.pages['sales-partner-commis'].on_page_load = function (wrapper) { }); // Handle "Select All" - $('#select_all_rows').on('change', function () { + $('#select_all_rows_spc').on('change', function () { const checked = $(this).is(':checked'); $('.select-row').prop('checked', checked); }); @@ -145,20 +145,20 @@ frappe.pages['sales-partner-commis'].on_page_load = function (wrapper) { result_container.on('change', '.select-row', function () { const total = $('.select-row').length; const checked = $('.select-row:checked').length; - $('#select_all_rows').prop('checked', total === checked); + $('#select_all_rows_spc').prop('checked', total === checked); }); if (payment_status === "Pending") { const bulkButtonRow = $(`
-
`); result_container.append(bulkButtonRow); - $('#bulk_payout_btn').on('click', function () { + $('#bulk_payout_btn_spc').on('click', function () { const selectedIndexes = $('.select-row:checked').map(function () { return $(this).data('index'); }).get(); @@ -207,7 +207,7 @@ frappe.pages['sales-partner-commis'].on_page_load = function (wrapper) { // Search button - $('#search_btn').on('click', function () { + $('#search_btn_spc').on('click', function () { const sales_partner = page.sales_partner.get_value(); const payment_status = page.payment_status.get_value(); @@ -225,7 +225,7 @@ frappe.pages['sales-partner-commis'].on_page_load = function (wrapper) { }); // Clear button - $('#clear_btn').on('click', function () { + $('#clear_btn_spc').on('click', function () { result_container.empty(); all_commission_data = []; window.selected_commission_rows = []; diff --git a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js index 5f9aa0f484..ecf59c73f7 100644 --- a/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js +++ b/posawesome/posawesome/page/sales_person_commiss/sales_person_commiss.js @@ -51,14 +51,14 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { const button_group = $(`
- - + +
`).appendTo(page.body); // Result container - const result_container = $('
').appendTo(page.body); + const result_container = $('
').appendTo(page.body); let all_commission_data = []; @@ -85,8 +85,8 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { Sr No. - - + + Sales Person Commission @@ -136,7 +136,7 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { }); // Handle "Select All" - $('#select_all_rows').on('change', function () { + $('#select_all_rows_sprc').on('change', function () { const checked = $(this).is(':checked'); $('.select-row').prop('checked', checked); }); @@ -144,20 +144,20 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { result_container.on('change', '.select-row', function () { const total = $('.select-row').length; const checked = $('.select-row:checked').length; - $('#select_all_rows').prop('checked', total === checked); + $('#select_all_rows_sprc').prop('checked', total === checked); }); if (payment_status === "Pending") { const bulkButtonRow = $(`
-
`); result_container.append(bulkButtonRow); - $('#bulk_payout_btn').on('click', function () { + $('#bulk_payout_btn_sprc').on('click', function () { const selectedIndexes = $('.select-row:checked').map(function () { return $(this).data('index'); }).get(); @@ -206,7 +206,7 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { // Search button - $('#search_btn').on('click', function () { + $('#search_btn_sprc').on('click', function () { const sales_person = page.sales_person.get_value(); const payment_status = page.payment_status.get_value(); @@ -224,7 +224,7 @@ frappe.pages['sales-person-commiss'].on_page_load = function (wrapper) { }); // Clear button - $('#clear_btn').on('click', function () { + $('#clear_btn_sprc').on('click', function () { result_container.empty(); all_commission_data = []; window.selected_commission_rows = []; diff --git a/posawesome/public/js/posapp/components/pos/Payments.vue b/posawesome/public/js/posapp/components/pos/Payments.vue index fc8dd221c8..8173fd6b33 100644 --- a/posawesome/public/js/posapp/components/pos/Payments.vue +++ b/posawesome/public/js/posapp/components/pos/Payments.vue @@ -586,27 +586,30 @@ - - - -