chore: clean up sales invoice form
diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.json b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.json
index 18d430f..a9b91e0 100644
--- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.json
+++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.json
@@ -6,6 +6,7 @@
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
+ "period_details_section",
"period_start_date",
"period_end_date",
"column_break_3",
@@ -65,7 +66,8 @@
},
{
"fieldname": "section_break_5",
- "fieldtype": "Section Break"
+ "fieldtype": "Section Break",
+ "label": "User Details"
},
{
"fieldname": "company",
@@ -121,7 +123,7 @@
"collapsible_depends_on": "eval:doc.docstatus==0",
"fieldname": "section_break_13",
"fieldtype": "Section Break",
- "label": "Details"
+ "label": "Totals"
},
{
"default": "0",
@@ -196,6 +198,11 @@
"options": "Draft\nSubmitted\nQueued\nCancelled",
"print_hide": 1,
"read_only": 1
+ },
+ {
+ "fieldname": "period_details_section",
+ "fieldtype": "Section Break",
+ "label": "Period Details"
}
],
"is_submittable": 1,
@@ -205,7 +212,7 @@
"link_fieldname": "pos_closing_entry"
}
],
- "modified": "2021-01-12 12:21:05.388650",
+ "modified": "2021-02-01 13:47:20.722104",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Closing Entry",
diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json
index 5bc57b4..7459c11 100644
--- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json
+++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json
@@ -13,11 +13,11 @@
"customer",
"customer_name",
"tax_id",
- "is_pos",
"pos_profile",
- "offline_pos_name",
- "is_return",
"consolidated_invoice",
+ "is_pos",
+ "is_return",
+ "update_billed_amount_in_sales_order",
"column_break1",
"company",
"posting_date",
@@ -25,10 +25,7 @@
"set_posting_time",
"due_date",
"amended_from",
- "returns",
"return_against",
- "column_break_21",
- "update_billed_amount_in_sales_order",
"accounting_dimensions_section",
"project",
"dimension_col_break",
@@ -183,8 +180,7 @@
"column_break_140",
"auto_repeat",
"update_auto_repeat_reference",
- "against_income_account",
- "pos_total_qty"
+ "against_income_account"
],
"fields": [
{
@@ -266,14 +262,6 @@
"print_hide": 1
},
{
- "fieldname": "offline_pos_name",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "Offline POS Name",
- "print_hide": 1,
- "read_only": 1
- },
- {
"allow_on_submit": 1,
"default": "0",
"fieldname": "is_return",
@@ -350,25 +338,15 @@
},
{
"depends_on": "return_against",
- "fieldname": "returns",
- "fieldtype": "Section Break",
- "label": "Returns"
- },
- {
- "depends_on": "return_against",
"fieldname": "return_against",
"fieldtype": "Link",
- "label": "Return Against POS Invoice",
+ "label": "Return Against",
"no_copy": 1,
"options": "POS Invoice",
"print_hide": 1,
"read_only": 1
},
{
- "fieldname": "column_break_21",
- "fieldtype": "Column Break"
- },
- {
"default": "0",
"depends_on": "eval: doc.is_return && doc.return_against",
"fieldname": "update_billed_amount_in_sales_order",
@@ -587,19 +565,21 @@
},
{
"fieldname": "sec_warehouse",
- "fieldtype": "Section Break"
+ "fieldtype": "Section Break",
+ "label": "Warehouse"
},
{
"depends_on": "update_stock",
"fieldname": "set_warehouse",
"fieldtype": "Link",
- "label": "Set Source Warehouse",
+ "label": "Source Warehouse",
"options": "Warehouse",
"print_hide": 1
},
{
"fieldname": "items_section",
"fieldtype": "Section Break",
+ "label": "Items",
"oldfieldtype": "Section Break",
"options": "fa fa-shopping-cart"
},
@@ -1501,7 +1481,7 @@
"allow_on_submit": 1,
"fieldname": "sales_team",
"fieldtype": "Table",
- "label": "Sales Team1",
+ "label": "Sales Team",
"oldfieldname": "sales_team",
"oldfieldtype": "Table",
"options": "Sales Team",
@@ -1561,15 +1541,6 @@
"report_hide": 1
},
{
- "fieldname": "pos_total_qty",
- "fieldtype": "Float",
- "hidden": 1,
- "label": "Total Qty",
- "print_hide": 1,
- "print_hide_if_no_value": 1,
- "read_only": 1
- },
- {
"allow_on_submit": 1,
"fieldname": "consolidated_invoice",
"fieldtype": "Link",
@@ -1581,7 +1552,7 @@
"icon": "fa fa-file-text",
"is_submittable": 1,
"links": [],
- "modified": "2020-10-30 13:56:51.056083",
+ "modified": "2021-02-01 15:03:33.800707",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Invoice",
@@ -1626,7 +1597,6 @@
"role": "All"
}
],
- "quick_entry": 1,
"search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount",
"show_name_in_global_search": 1,
"sort_field": "modified",
diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json
index 4b69f6e..8afa0ab 100644
--- a/erpnext/accounts/doctype/pos_profile/pos_profile.json
+++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json
@@ -6,11 +6,10 @@
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
- "disabled",
- "section_break_2",
- "customer",
"company",
+ "customer",
"country",
+ "disabled",
"column_break_9",
"warehouse",
"campaign",
@@ -62,10 +61,6 @@
"label": "Disabled"
},
{
- "fieldname": "section_break_2",
- "fieldtype": "Section Break"
- },
- {
"fieldname": "customer",
"fieldtype": "Link",
"label": "Customer",
@@ -348,9 +343,9 @@
"label": "Allow User to Edit Discount"
},
{
- "collapsible": 1,
"fieldname": "section_break_23",
- "fieldtype": "Section Break"
+ "fieldtype": "Section Break",
+ "label": "Filters"
},
{
"fieldname": "column_break_25",
@@ -360,8 +355,29 @@
"icon": "icon-cog",
"idx": 1,
"index_web_pages_for_search": 1,
- "links": [],
- "modified": "2021-01-06 14:42:41.713864",
+ "links": [
+ {
+ "group": "Invoices",
+ "link_doctype": "Sales Invoice",
+ "link_fieldname": "pos_profile"
+ },
+ {
+ "group": "Invoices",
+ "link_doctype": "POS Invoice",
+ "link_fieldname": "pos_profile"
+ },
+ {
+ "group": "Opening & Closing",
+ "link_doctype": "POS Opening Entry",
+ "link_fieldname": "pos_profile"
+ },
+ {
+ "group": "Opening & Closing",
+ "link_doctype": "POS Closing Entry",
+ "link_fieldname": "pos_profile"
+ }
+ ],
+ "modified": "2021-02-01 13:52:51.081311",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile",
diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile_dashboard.py b/erpnext/accounts/doctype/pos_profile/pos_profile_dashboard.py
deleted file mode 100644
index 2e4632a..0000000
--- a/erpnext/accounts/doctype/pos_profile/pos_profile_dashboard.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from __future__ import unicode_literals
-
-from frappe import _
-
-
-def get_data():
- return {
- 'fieldname': 'pos_profile',
- 'transactions': [
- {
- 'items': ['Sales Invoice', 'POS Closing Entry', 'POS Opening Entry']
- }
- ]
- }
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 018bc7e..720a917 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -12,11 +12,11 @@
"customer",
"customer_name",
"tax_id",
+ "pos_profile",
"is_pos",
"is_consolidated",
- "pos_profile",
- "offline_pos_name",
"is_return",
+ "update_billed_amount_in_sales_order",
"column_break1",
"company",
"company_tax_id",
@@ -24,11 +24,8 @@
"posting_time",
"set_posting_time",
"due_date",
- "amended_from",
- "returns",
"return_against",
- "column_break_21",
- "update_billed_amount_in_sales_order",
+ "amended_from",
"accounting_dimensions_section",
"project",
"dimension_col_break",
@@ -188,8 +185,7 @@
"column_break_140",
"auto_repeat",
"update_auto_repeat_reference",
- "against_income_account",
- "pos_total_qty"
+ "against_income_account"
],
"fields": [
{
@@ -297,16 +293,6 @@
"print_hide": 1
},
{
- "fieldname": "offline_pos_name",
- "fieldtype": "Data",
- "hidden": 1,
- "hide_days": 1,
- "hide_seconds": 1,
- "label": "Offline POS Name",
- "print_hide": 1,
- "read_only": 1
- },
- {
"default": "0",
"fieldname": "is_return",
"fieldtype": "Check",
@@ -406,19 +392,11 @@
},
{
"depends_on": "return_against",
- "fieldname": "returns",
- "fieldtype": "Section Break",
- "hide_days": 1,
- "hide_seconds": 1,
- "label": "Returns"
- },
- {
- "depends_on": "return_against",
"fieldname": "return_against",
"fieldtype": "Link",
"hide_days": 1,
"hide_seconds": 1,
- "label": "Return Against Sales Invoice",
+ "label": "Return Against",
"no_copy": 1,
"options": "Sales Invoice",
"print_hide": 1,
@@ -426,12 +404,6 @@
"search_index": 1
},
{
- "fieldname": "column_break_21",
- "fieldtype": "Column Break",
- "hide_days": 1,
- "hide_seconds": 1
- },
- {
"default": "0",
"depends_on": "eval: doc.is_return && doc.return_against",
"fieldname": "update_billed_amount_in_sales_order",
@@ -678,7 +650,8 @@
"fieldname": "sec_warehouse",
"fieldtype": "Section Break",
"hide_days": 1,
- "hide_seconds": 1
+ "hide_seconds": 1,
+ "label": "Warehouse"
},
{
"depends_on": "update_stock",
@@ -686,7 +659,7 @@
"fieldtype": "Link",
"hide_days": 1,
"hide_seconds": 1,
- "label": "Set Source Warehouse",
+ "label": "Source Warehouse",
"options": "Warehouse",
"print_hide": 1
},
@@ -695,6 +668,7 @@
"fieldtype": "Section Break",
"hide_days": 1,
"hide_seconds": 1,
+ "label": "Items",
"oldfieldtype": "Section Break",
"options": "fa fa-shopping-cart"
},
@@ -1905,17 +1879,6 @@
"report_hide": 1
},
{
- "fieldname": "pos_total_qty",
- "fieldtype": "Float",
- "hidden": 1,
- "hide_days": 1,
- "hide_seconds": 1,
- "label": "Total Qty",
- "print_hide": 1,
- "print_hide_if_no_value": 1,
- "read_only": 1
- },
- {
"collapsible": 1,
"fieldname": "accounting_dimensions_section",
"fieldtype": "Section Break",
@@ -1995,7 +1958,7 @@
"link_fieldname": "consolidated_invoice"
}
],
- "modified": "2021-01-12 12:16:15.192520",
+ "modified": "2021-02-01 15:42:26.261540",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index fd744a7..77ba06e 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -239,9 +239,6 @@
self.doc.round_floats_in(self.doc, ["total", "base_total", "net_total", "base_net_total"])
- if self.doc.doctype == 'Sales Invoice' and self.doc.is_pos:
- self.doc.pos_total_qty = self.doc.total_qty
-
def calculate_taxes(self):
self.doc.rounding_adjustment = 0
# maintain actual tax rate based on idx
diff --git a/erpnext/patches/v13_0/update_pos_closing_entry_in_merge_log.py b/erpnext/patches/v13_0/update_pos_closing_entry_in_merge_log.py
index 42bca7c..262e38d 100644
--- a/erpnext/patches/v13_0/update_pos_closing_entry_in_merge_log.py
+++ b/erpnext/patches/v13_0/update_pos_closing_entry_in_merge_log.py
@@ -15,7 +15,7 @@
log.pos_closing_entry = (
SELECT clo_ref.parent FROM `tabPOS Invoice Reference` clo_ref
WHERE clo_ref.pos_invoice = log_ref.pos_invoice
- AND clo_ref.parenttype = 'POS Closing Entry'
+ AND clo_ref.parenttype = 'POS Closing Entry' LIMIT 1
)
WHERE
log_ref.parent = log.name
diff --git a/erpnext/regional/italy/setup.py b/erpnext/regional/italy/setup.py
index 6ab7341..217d623 100644
--- a/erpnext/regional/italy/setup.py
+++ b/erpnext/regional/italy/setup.py
@@ -127,7 +127,7 @@
options="\n".join(map(lambda x: frappe.safe_decode(x, encoding='utf-8'), vat_collectability_options)),
fetch_from="company.vat_collectability"),
dict(fieldname='sb_e_invoicing_reference', label='E-Invoicing',
- fieldtype='Section Break', insert_after='pos_total_qty', print_hide=1),
+ fieldtype='Section Break', insert_after='against_income_account', print_hide=1),
dict(fieldname='company_tax_id', label='Company Tax ID',
fieldtype='Data', insert_after='sb_e_invoicing_reference', print_hide=1, read_only=1,
fetch_from="company.tax_id"),