From 1f9a84f1652ca70c39fbee70687d9946eaaf0192 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 20 Sep 2019 12:18:23 +0530 Subject: [PATCH 01/11] fix: removed mandatory property for address field in quick entry --- erpnext/public/js/utils/customer_quick_entry.js | 10 ++++------ erpnext/selling/doctype/customer/customer.py | 10 ++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/erpnext/public/js/utils/customer_quick_entry.js b/erpnext/public/js/utils/customer_quick_entry.js index ac9a7828cb..ebe6cd98f8 100644 --- a/erpnext/public/js/utils/customer_quick_entry.js +++ b/erpnext/public/js/utils/customer_quick_entry.js @@ -2,6 +2,7 @@ frappe.provide('frappe.ui.form'); frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({ init: function(doctype, after_insert) { + this.skip_redirect_on_error = true; this._super(doctype, after_insert); }, @@ -37,8 +38,7 @@ frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({ { label: __("Address Line 1"), fieldname: "address_line1", - fieldtype: "Data", - reqd: 1 + fieldtype: "Data" }, { label: __("Address Line 2"), @@ -56,8 +56,7 @@ frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({ { label: __("City"), fieldname: "city", - fieldtype: "Data", - reqd: 1, + fieldtype: "Data" }, { label: __("State"), @@ -68,8 +67,7 @@ frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({ label: __("Country"), fieldname: "country", fieldtype: "Link", - options: "Country", - reqd: 1 + options: "Country" }, { label: __("Customer POS Id"), diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 4ca5af51a4..d49b9a9062 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -357,6 +357,16 @@ def make_contact(args, is_primary_contact=1): return contact def make_address(args, is_primary_address=1): + reqd_fields = [] + for field in ['city', 'country']: + if not args.get(field): + reqd_fields.append( '
  • ' + field.title() + '
  • ') + + if reqd_fields: + msg = _("Following fields are mandatory to create address:") + frappe.throw("{0}

    ".format(msg, '\n'.join(reqd_fields)), + title = _("Missing Values Required")) + address = frappe.get_doc({ 'doctype': 'Address', 'address_title': args.get('name'), From a44e8afe71d44a626226cb8f586e3c6d64d590d4 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Fri, 20 Sep 2019 18:19:47 +0530 Subject: [PATCH 02/11] feat: add bank account in payroll entry (#19021) * fix(journal-entry): change fieldname from bank account no to bank account * fix: add payroll entry in bank dashboard * fix: fetch account from bank account * fix: minor changes * patch: check for bank account no column before updating * fix: use rename field function --- .../bank_account/bank_account_dashboard.py | 3 +-- .../doctype/journal_entry/journal_entry.js | 2 +- .../journal_entry_account.json | 16 +++++++-------- .../doctype/payroll_entry/payroll_entry.json | 20 +++++++++++++------ .../hr/doctype/payroll_entry/payroll_entry.py | 5 +++-- erpnext/patches.txt | 3 ++- ..._account_field_in_journal_entry_account.py | 17 ++++++++++++++++ 7 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 erpnext/patches/v12_0/rename_bank_account_field_in_journal_entry_account.py diff --git a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py index 3d149eb334..a959cea98f 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py +++ b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py @@ -9,12 +9,11 @@ def get_data(): 'non_standard_fieldnames': { 'Customer': 'default_bank_account', 'Supplier': 'default_bank_account', - 'Journal Entry': 'bank_account_no' }, 'transactions': [ { 'label': _('Payments'), - 'items': ['Payment Entry', 'Payment Request', 'Payment Order'] + 'items': ['Payment Entry', 'Payment Request', 'Payment Order', 'Payroll Entry'] }, { 'label': _('Party'), diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 3dbf4d40eb..5d88bfaad1 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -7,7 +7,7 @@ frappe.provide("erpnext.journal_entry"); frappe.ui.form.on("Journal Entry", { setup: function(frm) { - frm.add_fetch("bank_account_no", "account", "account"); + frm.add_fetch("bank_account", "account", "account"); }, refresh: function(frm) { diff --git a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json index 8728950286..c846ba2240 100644 --- a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json +++ b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json @@ -10,7 +10,7 @@ "account_type", "balance", "col_break1", - "bank_account_no", + "bank_account", "party_type", "party", "party_balance", @@ -89,12 +89,6 @@ "fieldname": "col_break1", "fieldtype": "Column Break" }, - { - "fieldname": "bank_account_no", - "fieldtype": "Link", - "label": "Bank Account No", - "options": "Bank Account" - }, { "fieldname": "party_type", "fieldtype": "Link", @@ -266,11 +260,17 @@ { "fieldname": "dimension_col_break", "fieldtype": "Column Break" + }, + { + "fieldname": "bank_account", + "fieldtype": "Link", + "label": "Bank Account", + "options": "Bank Account" } ], "idx": 1, "istable": 1, - "modified": "2019-07-16 17:12:08.238334", + "modified": "2019-09-12 12:16:17.588399", "modified_by": "Administrator", "module": "Accounts", "name": "Journal Entry Account", diff --git a/erpnext/hr/doctype/payroll_entry/payroll_entry.json b/erpnext/hr/doctype/payroll_entry/payroll_entry.json index 5ae537452a..9356f3e7b3 100644 --- a/erpnext/hr/doctype/payroll_entry/payroll_entry.json +++ b/erpnext/hr/doctype/payroll_entry/payroll_entry.json @@ -37,8 +37,9 @@ "cost_center", "account", "payment_account", - "section_break2", "amended_from", + "column_break_33", + "bank_account", "salary_slips_created", "salary_slips_submitted" ], @@ -206,15 +207,12 @@ { "allow_on_submit": 1, "description": "Select Payment Account to make Bank Entry", + "fetch_from": "bank_account.account", "fieldname": "payment_account", "fieldtype": "Link", "label": "Payment Account", "options": "Account" }, - { - "fieldname": "section_break2", - "fieldtype": "Section Break" - }, { "fieldname": "amended_from", "fieldtype": "Link", @@ -248,11 +246,21 @@ { "fieldname": "dimension_col_break", "fieldtype": "Column Break" + }, + { + "fieldname": "bank_account", + "fieldtype": "Link", + "label": "Bank Account", + "options": "Bank Account" + }, + { + "fieldname": "column_break_33", + "fieldtype": "Column Break" } ], "icon": "fa fa-cog", "is_submittable": 1, - "modified": "2019-05-25 22:47:49.977955", + "modified": "2019-09-12 15:46:31.436381", "modified_by": "Administrator", "module": "HR", "name": "Payroll Entry", diff --git a/erpnext/hr/doctype/payroll_entry/payroll_entry.py b/erpnext/hr/doctype/payroll_entry/payroll_entry.py index 97cfc84159..2de01e6394 100644 --- a/erpnext/hr/doctype/payroll_entry/payroll_entry.py +++ b/erpnext/hr/doctype/payroll_entry/payroll_entry.py @@ -39,7 +39,7 @@ class PayrollEntry(Document): and for which salary structure exists """ cond = self.get_filter_condition() - cond += self.get_joining_releiving_condition() + cond += self.get_joining_relieving_condition() condition = '' if self.payroll_frequency: @@ -93,7 +93,7 @@ class PayrollEntry(Document): return cond - def get_joining_releiving_condition(self): + def get_joining_relieving_condition(self): cond = """ and ifnull(t1.date_of_joining, '0000-00-00') <= '%(end_date)s' and ifnull(t1.relieving_date, '2199-12-31') >= '%(start_date)s' @@ -341,6 +341,7 @@ class PayrollEntry(Document): journal_entry.set("accounts", [ { "account": self.payment_account, + "bank_account": self.bank_account, "credit_in_account_currency": payment_amount }, { diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 8b3da8e951..a001d168be 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -635,4 +635,5 @@ erpnext.patches.v12_0.remove_bank_remittance_custom_fields erpnext.patches.v12_0.generate_leave_ledger_entries erpnext.patches.v12_0.move_credit_limit_to_customer_credit_limit erpnext.patches.v12_0.add_variant_of_in_item_attribute_table -erpnext.patches.v12_0.create_default_energy_point_rules +erpnext.patches.v12_0.rename_bank_account_field_in_journal_entry_account +erpnext.patches.v12_0.create_default_energy_point_rules \ No newline at end of file diff --git a/erpnext/patches/v12_0/rename_bank_account_field_in_journal_entry_account.py b/erpnext/patches/v12_0/rename_bank_account_field_in_journal_entry_account.py new file mode 100644 index 0000000000..4230cb88f4 --- /dev/null +++ b/erpnext/patches/v12_0/rename_bank_account_field_in_journal_entry_account.py @@ -0,0 +1,17 @@ +# Copyright (c) 2019, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.utils.rename_field import rename_field + +def execute(): + ''' Change the fieldname from bank_account_no to bank_account ''' + if not frappe.get_meta("Journal Entry Account").has_field("bank_account"): + frappe.reload_doc("Accounts", "doctype", "Journal Entry Account") + update_journal_entry_account_fieldname() + +def update_journal_entry_account_fieldname(): + ''' maps data from old field to the new field ''' + if frappe.db.has_column('Journal Entry Account', 'bank_account_no'): + rename_field("Journal Entry Account", "bank_account_no", "bank_account") \ No newline at end of file From 462d9cb3314ad1909dc83f51e56632393ff0b110 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Fri, 20 Sep 2019 18:30:22 +0530 Subject: [PATCH 03/11] feat: "Purchase Order items to be Received or Billed" report (#19091) * feat: Init "Purchase Order items to be received or billed" report * fix: Rename report * fix: Column name --- .../__init__.py | 0 ..._order_items_to_be_received_or_billed.json | 35 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 erpnext/stock/report/purchase_order_items_to_be_received_or_billed/__init__.py create mode 100644 erpnext/stock/report/purchase_order_items_to_be_received_or_billed/purchase_order_items_to_be_received_or_billed.json diff --git a/erpnext/stock/report/purchase_order_items_to_be_received_or_billed/__init__.py b/erpnext/stock/report/purchase_order_items_to_be_received_or_billed/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/stock/report/purchase_order_items_to_be_received_or_billed/purchase_order_items_to_be_received_or_billed.json b/erpnext/stock/report/purchase_order_items_to_be_received_or_billed/purchase_order_items_to_be_received_or_billed.json new file mode 100644 index 0000000000..dca4db48db --- /dev/null +++ b/erpnext/stock/report/purchase_order_items_to_be_received_or_billed/purchase_order_items_to_be_received_or_billed.json @@ -0,0 +1,35 @@ +{ + "add_total_row": 0, + "creation": "2019-09-16 14:10:33.102865", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "letter_head": "sapcon-old", + "modified": "2019-09-20 15:19:55.710578", + "modified_by": "Administrator", + "module": "Stock", + "name": "Purchase Order Items To Be Received or Billed", + "owner": "Administrator", + "prepared_report": 0, + "query": "SELECT\n\t`poi_pri`.`purchase_order` as \"Purchase Order:Link/Purchase Order:120\",\n\t`poi_pri`.`status` as \"Status:Data:120\",\n\t`poi_pri`.`transaction_date` as \"Date:Date:100\",\n\t`poi_pri`.`schedule_date` as \"Reqd by Date:Date:110\",\n\t`poi_pri`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`poi_pri`.`supplier_name` as \"Supplier Name::150\",\n\t`poi_pri`.`item_code` as \"Item Code:Link/Item:120\",\n\t`poi_pri`.`qty` as \"Qty:Float:100\",\n\t`poi_pri`.`base_amount` as \"Base Amount:Currency:100\",\n\t`poi_pri`.`received_qty` as \"Received Qty:Float:100\",\n\t`poi_pri`.`received_amount` as \"Received Qty Amount:Currency:100\",\n\t`poi_pri`.`qty_to_receive` as \"Qty to Receive:Float:100\",\n\t`poi_pri`.`amount_to_be_received` as \"Amount to Receive:Currency:100\",\n\t`poi_pri`.`billed_amount` as \"Billed Amount:Currency:100\",\n\t`poi_pri`.`amount_to_be_billed` as \"Amount To Be Billed:Currency:100\",\n\tSUM(`pii`.`qty`) AS \"Billed Qty:Float:100\",\n\t`poi_pri`.qty - SUM(`pii`.`qty`) AS \"Qty To Be Billed:Float:100\",\n\t`poi_pri`.`warehouse` as \"Warehouse:Link/Warehouse:150\",\n\t`poi_pri`.`item_name` as \"Item Name::150\",\n\t`poi_pri`.`description` as \"Description::200\",\n\t`poi_pri`.`brand` as \"Brand::100\",\n\t`poi_pri`.`project` as \"Project\",\n\t`poi_pri`.`company` as \"Company:Link/Company:\"\nFROM\n\t(SELECT\n\t\t`po`.`name` AS 'purchase_order',\n\t\t`po`.`status`,\n\t\t`po`.`company`,\n\t\t`poi`.`warehouse`,\n\t\t`poi`.`brand`,\n\t\t`poi`.`description`,\n\t\t`po`.`transaction_date`,\n\t\t`poi`.`schedule_date`,\n\t\t`po`.`supplier`,\n\t\t`po`.`supplier_name`,\n\t\t`poi`.`project`,\n\t\t`poi`.`item_code`,\n\t\t`poi`.`item_name`,\n\t\t`poi`.`qty`,\n\t\t`poi`.`base_amount`,\n\t\t`poi`.`received_qty`,\n\t\t(`poi`.billed_amt * ifnull(`po`.conversion_rate, 1)) as billed_amount,\n\t\t(`poi`.base_amount - (`poi`.billed_amt * ifnull(`po`.conversion_rate, 1))) as amount_to_be_billed,\n\t\t`poi`.`qty` - IFNULL(`poi`.`received_qty`, 0) AS 'qty_to_receive',\n\t\t(`poi`.`qty` - IFNULL(`poi`.`received_qty`, 0)) * `poi`.`rate` AS 'amount_to_be_received',\n\t\tSUM(`pri`.`amount`) AS 'received_amount',\n\t\t`poi`.`name` AS 'poi_name',\n\t\t`pri`.`name` AS 'pri_name'\n\tFROM\n\t\t`tabPurchase Order` po\n\t\tLEFT JOIN `tabPurchase Order Item` poi\n\t\tON `poi`.`parent` = `po`.`name`\n\t\tLEFT JOIN `tabPurchase Receipt Item` pri\n\t\tON `pri`.`purchase_order_item` = `poi`.`name`\n\t\t\tAND `pri`.`docstatus`=1\n\tWHERE\n\t\t`po`.`status` not in ('Stopped', 'Closed')\n\t\tAND `po`.`docstatus` = 1\n\t\tAND IFNULL(`poi`.`received_qty`, 0) < IFNULL(`poi`.`qty`, 0)\n\tGROUP BY `poi`.`name`\n\tORDER BY `po`.`transaction_date` ASC\n\t) poi_pri\n\tLEFT JOIN `tabPurchase Invoice Item` pii\n\tON `pii`.`po_detail` = `poi_pri`.`poi_name`\n\t\tAND `pii`.`docstatus`=1\nGROUP BY `poi_pri`.`poi_name`", + "ref_doctype": "Purchase Order", + "report_name": "Purchase Order Items To Be Received or Billed1", + "report_type": "Query Report", + "roles": [ + { + "role": "Purchase Manager" + }, + { + "role": "Purchase User" + }, + { + "role": "Stock User" + }, + { + "role": "Stock Manager" + } + ] +} \ No newline at end of file From 2c60f6419e6db5ad113a276a60bff085ca4d80f1 Mon Sep 17 00:00:00 2001 From: Anurag Mishra <32095923+Anurag810@users.noreply.github.com> Date: Fri, 20 Sep 2019 23:00:09 +0530 Subject: [PATCH 04/11] feat: missmatching amount in GST Sales report and itemised sales report (#19116) --- .../item_wise_sales_register/item_wise_sales_register.py | 2 +- erpnext/accounts/report/sales_register/sales_register.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index e8b19b4024..9da89ff2c9 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -17,7 +17,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]}) columns = get_columns(additional_table_columns) - company_currency = erpnext.get_company_currency(filters.get('company')) + company_currency = frappe.get_cached_value('Company', filters.get("company"), "default_currency") item_list = get_items(filters, additional_query_columns) if item_list: diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py index d08056f6f9..2b32fa9378 100644 --- a/erpnext/accounts/report/sales_register/sales_register.py +++ b/erpnext/accounts/report/sales_register/sales_register.py @@ -68,7 +68,8 @@ def _execute(filters, additional_table_columns=None, additional_query_columns=No total_tax = 0 for tax_acc in tax_accounts: if tax_acc not in income_accounts: - tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc)) + tax_amount_precision = get_field_precision(frappe.get_meta("Sales Taxes and Charges").get_field("tax_amount"), currency=company_currency) or 2 + tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc), tax_amount_precision) total_tax += tax_amount row.append(tax_amount) From 8dd4699f102afc911b79d601ce5e10d7323e344b Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 23 Sep 2019 15:03:52 +0530 Subject: [PATCH 05/11] feat: Allow to make landed cost voucher against the asset item (#19121) --- .../landed_cost_voucher.py | 9 +++- .../purchase_receipt/purchase_receipt.py | 47 +++++++++++++++++-- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py index 2e1636ab43..d001a91f2f 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py +++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py @@ -15,12 +15,17 @@ class LandedCostVoucher(Document): for pr in self.get("purchase_receipts"): if pr.receipt_document_type and pr.receipt_document: pr_items = frappe.db.sql("""select pr_item.item_code, pr_item.description, - pr_item.qty, pr_item.base_rate, pr_item.base_amount, pr_item.name, pr_item.cost_center + pr_item.qty, pr_item.base_rate, pr_item.base_amount, pr_item.name, + pr_item.cost_center, pr_item.asset from `tab{doctype} Item` pr_item where parent = %s - and exists(select name from tabItem where name = pr_item.item_code and is_stock_item = 1) + and exists(select name from tabItem + where name = pr_item.item_code and (is_stock_item = 1 or is_fixed_asset=1)) """.format(doctype=pr.receipt_document_type), pr.receipt_document, as_dict=True) for d in pr_items: + if d.asset and frappe.db.get_value("Asset", d.asset, 'docstatus') == 1: + continue + item = self.append("items") item.item_code = d.item_code item.description = d.description diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index df28becd95..0c8e9a0aa8 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -15,6 +15,7 @@ from frappe.desk.notifications import clear_doctype_notifications from frappe.model.mapper import get_mapped_doc from erpnext.buying.utils import check_on_hold_or_closed_status from erpnext.assets.doctype.asset.asset import get_asset_account, is_cwip_accounting_disabled +from erpnext.assets.doctype.asset_category.asset_category import get_asset_category_account from six import iteritems form_grid_templates = { @@ -278,8 +279,7 @@ class PurchaseReceipt(BuyingController): d.rejected_warehouse not in warehouse_with_no_account: warehouse_with_no_account.append(d.warehouse) - if not is_cwip_accounting_disabled(): - self.get_asset_gl_entry(gl_entries) + self.get_asset_gl_entry(gl_entries, expenses_included_in_valuation) # Cost center-wise amount breakup for other charges included for valuation valuation_tax = {} for tax in self.get("taxes"): @@ -333,15 +333,24 @@ class PurchaseReceipt(BuyingController): return process_gl_map(gl_entries) - def get_asset_gl_entry(self, gl_entries): + def get_asset_gl_entry(self, gl_entries, expenses_included_in_valuation=None): + arbnb_account, cwip_account = None, None + + cwip_disabled = is_cwip_accounting_disabled() + + if not expenses_included_in_valuation: + expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation") + for d in self.get("items"): - if d.is_fixed_asset: + if d.is_fixed_asset and not (arbnb_account and cwip_account): arbnb_account = self.get_company_default("asset_received_but_not_billed") # CWIP entry cwip_account = get_asset_account("capital_work_in_progress_account", d.asset, company = self.company) + if d.is_fixed_asset and not cwip_disabled: + asset_amount = flt(d.net_amount) + flt(d.item_tax_amount/self.conversion_rate) base_asset_amount = flt(d.base_net_amount + d.item_tax_amount) @@ -368,6 +377,36 @@ class PurchaseReceipt(BuyingController): if asset_rbnb_currency == self.company_currency else asset_amount) }, item=d)) + if d.is_fixed_asset and flt(d.landed_cost_voucher_amount): + asset_account = (get_asset_category_account(d.asset, 'fixed_asset_account', + company = self.company) if cwip_disabled else cwip_account) + + gl_entries.append(self.get_gl_dict({ + "account": expenses_included_in_valuation, + "against": asset_account, + "cost_center": d.cost_center, + "remarks": self.get("remarks") or _("Accounting Entry for Stock"), + "credit": flt(d.landed_cost_voucher_amount), + "project": d.project + }, item=d)) + + gl_entries.append(self.get_gl_dict({ + "account": asset_account, + "against": expenses_included_in_valuation, + "cost_center": d.cost_center, + "remarks": self.get("remarks") or _("Accounting Entry for Stock"), + "debit": flt(d.landed_cost_voucher_amount), + "project": d.project + }, item=d)) + + if d.asset: + doc = frappe.get_doc("Asset", d.asset) + frappe.db.set_value("Asset", d.asset, "gross_purchase_amount", + doc.gross_purchase_amount + flt(d.landed_cost_voucher_amount)) + + frappe.db.set_value("Asset", d.asset, "purchase_receipt_amount", + doc.purchase_receipt_amount + flt(d.landed_cost_voucher_amount)) + return gl_entries def update_status(self, status): From 5dcf2c669f9d7d37af2c00db331be2bb91595b60 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Tue, 24 Sep 2019 09:53:06 +0530 Subject: [PATCH 06/11] chore: remove unlinked letter head references (#19138) --- .../supplier_ledger_summary/supplier_ledger_summary.json | 5 ++--- .../tds_computation_summary/tds_computation_summary.json | 3 +-- .../report/tds_payable_monthly/tds_payable_monthly.json | 3 +-- .../crm/report/campaign_efficiency/campaign_efficiency.json | 3 +-- .../report/lead_conversion_time/lead_conversion_time.json | 3 +-- .../final_assessment_grades/final_assessment_grades.json | 3 +-- erpnext/hr/report/bank_remittance/bank_remittance.json | 3 +-- .../employee_leave_balance_summary.json | 3 +-- .../report/bom_variance_report/bom_variance_report.json | 3 +-- .../hsn_wise_summary_of_outward_supplies.json | 3 +-- .../customer_wise_item_price/customer_wise_item_price.json | 3 +-- .../sales_partner_commission_summary.json | 3 +-- .../sales_partner_target_variance_based_on_item_group.json | 3 +-- .../sales_partner_transaction_summary.json | 3 +-- .../sales_person_target_variance_based_on_item_group.json | 3 +-- .../territory_target_variance_based_on_item_group.json | 3 +-- .../purchase_order_items_to_be_received_or_billed.json | 3 +-- 17 files changed, 18 insertions(+), 35 deletions(-) diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json index eb3b4123e2..8538d8f66a 100644 --- a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json +++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.json @@ -5,9 +5,8 @@ "docstatus": 0, "doctype": "Report", "idx": 0, - "is_standard": "Yes", - "letter_head": "Capital Traders", - "modified": "2018-12-12 05:10:02.987274", + "is_standard": "Yes", + "modified": "2019-02-12 05:10:02.987274", "modified_by": "Administrator", "module": "Accounts", "name": "Supplier Ledger Summary", diff --git a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.json b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.json index 6082ed2e95..dfc4b18e07 100644 --- a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.json +++ b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.json @@ -6,8 +6,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", - "modified": "2018-08-21 11:25:00.551823", + "modified": "2018-09-21 11:25:00.551823", "modified_by": "Administrator", "module": "Accounts", "name": "TDS Computation Summary", diff --git a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.json b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.json index 6a83272ae8..0490119ad4 100644 --- a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.json +++ b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.json @@ -6,8 +6,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", - "modified": "2018-08-21 11:33:40.804532", + "modified": "2019-09-24 13:46:16.473711", "modified_by": "Administrator", "module": "Accounts", "name": "TDS Payable Monthly", diff --git a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.json b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.json index 986d9f3518..445b3d9611 100644 --- a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.json +++ b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "", - "modified": "2017-04-17 00:20:27.248275", + "modified": "2019-04-17 00:20:27.248275", "modified_by": "Administrator", "module": "CRM", "name": "Campaign Efficiency", diff --git a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.json b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.json index 353f2c3179..31423c6fd4 100644 --- a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.json +++ b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.json @@ -6,8 +6,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "", - "modified": "2018-09-17 14:40:52.035394", + "modified": "2019-09-19 14:40:52.035394", "modified_by": "Administrator", "module": "CRM", "name": "Lead Conversion Time", diff --git a/erpnext/education/report/final_assessment_grades/final_assessment_grades.json b/erpnext/education/report/final_assessment_grades/final_assessment_grades.json index e748efa8a4..4d444b46ce 100644 --- a/erpnext/education/report/final_assessment_grades/final_assessment_grades.json +++ b/erpnext/education/report/final_assessment_grades/final_assessment_grades.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Shishuvan Secondary School", - "modified": "2018-02-08 15:11:35.339434", + "modified": "2019-02-08 15:11:35.339434", "modified_by": "Administrator", "module": "Education", "name": "Final Assessment Grades", diff --git a/erpnext/hr/report/bank_remittance/bank_remittance.json b/erpnext/hr/report/bank_remittance/bank_remittance.json index 5a6228e398..b8aa4e98d2 100644 --- a/erpnext/hr/report/bank_remittance/bank_remittance.json +++ b/erpnext/hr/report/bank_remittance/bank_remittance.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", - "modified": "2019-03-26 16:57:52.558895", + "modified": "2019-04-26 16:57:52.558895", "modified_by": "Administrator", "module": "HR", "name": "Bank Remittance", diff --git a/erpnext/hr/report/employee_leave_balance_summary/employee_leave_balance_summary.json b/erpnext/hr/report/employee_leave_balance_summary/employee_leave_balance_summary.json index 60fe1ae25c..1c22ecef1a 100644 --- a/erpnext/hr/report/employee_leave_balance_summary/employee_leave_balance_summary.json +++ b/erpnext/hr/report/employee_leave_balance_summary/employee_leave_balance_summary.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "sapcon-old", - "modified": "2019-09-05 11:18:06.209397", + "modified": "2019-09-06 11:18:06.209397", "modified_by": "Administrator", "module": "HR", "name": "Employee Leave Balance Summary", diff --git a/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.json b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.json index 91ed11e698..282a93e2dc 100644 --- a/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.json +++ b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.json @@ -6,8 +6,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", - "modified": "2018-05-28 16:22:24.040106", + "modified": "2018-06-28 16:22:24.040106", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Variance Report", diff --git a/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.json b/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.json index 0cafdc89fe..124a720134 100644 --- a/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.json +++ b/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.json @@ -6,8 +6,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Standard", - "modified": "2018-04-26 12:59:38.603649", + "modified": "2019-04-26 12:59:38.603649", "modified_by": "Administrator", "module": "Regional", "name": "HSN-wise-summary of outward supplies", diff --git a/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.json b/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.json index 998ba94a8b..5a1224f11a 100644 --- a/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.json +++ b/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Delta9", - "modified": "2019-06-12 03:25:36.263179", + "modified": "2019-06-14 03:25:36.263179", "modified_by": "Administrator", "module": "Selling", "name": "Customer-wise Item Price", diff --git a/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.json b/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.json index 79b82b974d..a2231b8e85 100644 --- a/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.json +++ b/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", - "modified": "2019-03-15 15:22:15.012318", + "modified": "2019-04-15 15:22:15.012318", "modified_by": "Administrator", "module": "Selling", "name": "Sales Partner Commission Summary", diff --git a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.json b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.json index 1cc7e961d3..35a15ab565 100644 --- a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.json +++ b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", - "modified": "2019-03-25 18:22:37.323995", + "modified": "2019-04-25 18:22:37.323995", "modified_by": "Administrator", "module": "Selling", "name": "Sales Partner Target Variance based on Item Group", diff --git a/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.json b/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.json index b518b42be3..8ca546f831 100644 --- a/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.json +++ b/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", - "modified": "2019-03-25 18:15:09.920739", + "modified": "2019-04-25 18:15:09.920739", "modified_by": "Administrator", "module": "Selling", "name": "Sales Partner Transaction Summary", diff --git a/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.json b/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.json index 84cd27eb34..073c57552a 100644 --- a/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.json +++ b/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", - "modified": "2019-03-25 22:16:49.040998", + "modified": "2019-04-25 22:16:49.040998", "modified_by": "Administrator", "module": "Selling", "name": "Sales Person Target Variance Based On Item Group", diff --git a/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.json b/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.json index d3b05ba57d..211abc663b 100644 --- a/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.json +++ b/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "Gadgets International", - "modified": "2019-03-25 22:20:59.033199", + "modified": "2019-04-25 22:20:59.033199", "modified_by": "Administrator", "module": "Selling", "name": "Territory Target Variance Based On Item Group", diff --git a/erpnext/stock/report/purchase_order_items_to_be_received_or_billed/purchase_order_items_to_be_received_or_billed.json b/erpnext/stock/report/purchase_order_items_to_be_received_or_billed/purchase_order_items_to_be_received_or_billed.json index dca4db48db..caf7eb8863 100644 --- a/erpnext/stock/report/purchase_order_items_to_be_received_or_billed/purchase_order_items_to_be_received_or_billed.json +++ b/erpnext/stock/report/purchase_order_items_to_be_received_or_billed/purchase_order_items_to_be_received_or_billed.json @@ -7,8 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "letter_head": "sapcon-old", - "modified": "2019-09-20 15:19:55.710578", + "modified": "2019-09-21 15:19:55.710578", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Order Items To Be Received or Billed", From 5a61880e6a23768e7b970e9562c3c164753131a6 Mon Sep 17 00:00:00 2001 From: Anurag Mishra <32095923+Anurag810@users.noreply.github.com> Date: Tue, 24 Sep 2019 09:54:54 +0530 Subject: [PATCH 07/11] fix: provided delete permission (#19143) --- .../healthcare/doctype/patient/patient.json | 1249 ++--------------- 1 file changed, 90 insertions(+), 1159 deletions(-) diff --git a/erpnext/healthcare/doctype/patient/patient.json b/erpnext/healthcare/doctype/patient/patient.json index c195f4ddc7..1de4205ec2 100644 --- a/erpnext/healthcare/doctype/patient/patient.json +++ b/erpnext/healthcare/doctype/patient/patient.json @@ -1,1397 +1,353 @@ { "allow_copy": 1, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 1, "autoname": "naming_series:", "beta": 1, "creation": "2017-01-23 14:03:49.084370", - "custom": 0, "description": "Patient", - "docstatus": 0, "doctype": "DocType", "document_type": "Document", - "editable_grid": 0, "engine": "InnoDB", + "field_order": [ + "basic_info", + "inpatient_status", + "inpatient_record", + "naming_series", + "patient_name", + "sex", + "blood_group", + "dob", + "age_html", + "status", + "image", + "column_break_14", + "customer", + "report_preference", + "mobile", + "email", + "phone", + "disabled", + "sb_relation", + "patient_relation", + "allergy_medical_and_surgical_history", + "allergies", + "medication", + "column_break_20", + "medical_history", + "surgical_history", + "personal_and_social_history", + "occupation", + "column_break_25", + "marital_status", + "risk_factors", + "tobacco_past_use", + "tobacco_current_use", + "alcohol_past_use", + "alcohol_current_use", + "column_break_32", + "surrounding_factors", + "other_risk_factors", + "more_info", + "patient_details", + "ac_sb", + "default_currency" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "basic_info", "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Patient Demographics", - "length": 0, - "no_copy": 0, "oldfieldtype": "Section Break", - "options": "fa fa-user", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "options": "fa fa-user" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "inpatient_status", "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Inpatient Status", - "length": 0, - "no_copy": 0, "options": "\nAdmission Scheduled\nAdmitted\nDischarge Scheduled", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "read_only": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "inpatient_record", "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Inpatient Record", - "length": 0, - "no_copy": 0, "options": "Inpatient Record", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "read_only": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", "fieldname": "naming_series", "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Patient ID", - "length": 0, - "no_copy": 0, "options": "HLC-PAT-.YYYY.-", - "permlevel": 0, - "precision": "", "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "report_hide": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, "bold": 1, - "collapsible": 0, - "columns": 0, "fieldname": "patient_name", "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, "in_filter": 1, - "in_global_search": 0, - "in_list_view": 0, "in_standard_filter": 1, "label": "Full Name", - "length": 0, "no_copy": 1, "oldfieldtype": "Data", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "search_index": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "sex", "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Gender", - "length": 0, - "no_copy": 0, "options": "\nMale\nFemale\nOther", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "reqd": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, "bold": 1, - "collapsible": 0, - "columns": 0, "fieldname": "blood_group", "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Blood Group", - "length": 0, - "no_copy": 0, - "options": "\nA Positive\nA Negative\nAB Positive\nAB Negative\nB Positive\nB Negative\nO Positive\nO Negative", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "options": "\nA Positive\nA Negative\nAB Positive\nAB Negative\nB Positive\nB Negative\nO Positive\nO Negative" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, "bold": 1, - "collapsible": 0, - "columns": 0, "fieldname": "dob", "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Date of birth", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Date of birth" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "age_html", "fieldtype": "HTML", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Age", - "length": 0, "no_copy": 1, - "permlevel": 0, - "precision": "", "print_hide": 1, - "print_hide_if_no_value": 0, "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "report_hide": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "default": "Active", "fieldname": "status", "fieldtype": "Select", "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Status", - "length": 0, "no_copy": 1, "options": "Active\nDormant\nOpen", - "permlevel": 0, - "precision": "", "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "report_hide": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "image", "fieldtype": "Attach Image", "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Image", - "length": 0, "no_copy": 1, - "permlevel": 0, - "precision": "", "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, "width": "50%" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "column_break_14", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "fieldtype": "Column Break" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "customer", "fieldtype": "Link", - "hidden": 0, "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Customer", - "length": 0, - "no_copy": 0, "options": "Customer", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 1, - "translatable": 0, - "unique": 0 + "set_only_once": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "report_preference", "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Report Preference", - "length": 0, - "no_copy": 0, - "options": "\nEmail\nPrint", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "options": "\nEmail\nPrint" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, "bold": 1, - "collapsible": 0, - "columns": 0, "fieldname": "mobile", "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, - "label": "Mobile", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Mobile" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, "bold": 1, - "collapsible": 0, - "columns": 0, "fieldname": "email", "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, "in_list_view": 1, "in_standard_filter": 1, "label": "Email", - "length": 0, - "no_copy": 0, - "options": "Email", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "options": "Email" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "phone", "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, "in_filter": 1, - "in_global_search": 0, "in_list_view": 1, - "in_standard_filter": 0, - "label": "Phone", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Phone" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "default": "0", "fieldname": "disabled", "fieldtype": "Check", "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Disabled", - "length": 0, "no_copy": 1, - "permlevel": 0, - "precision": "", "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "report_hide": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, "collapsible": 1, - "columns": 0, "fieldname": "sb_relation", "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Patient Relation", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Patient Relation" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "patient_relation", "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Patient Relation", - "length": 0, - "no_copy": 0, - "options": "Patient Relation", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "options": "Patient Relation" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, "collapsible": 1, - "columns": 0, "fieldname": "allergy_medical_and_surgical_history", "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Allergies, Medical and Surgical History", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Allergies, Medical and Surgical History" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "allergies", "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Allergies", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "no_copy": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "medication", "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Medication", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Medication" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "column_break_20", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "fieldtype": "Column Break" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "medical_history", "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Medical History", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Medical History" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "surgical_history", "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Surgical History", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Surgical History" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, "collapsible": 1, - "columns": 0, "fieldname": "personal_and_social_history", "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Personal and Social History", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Personal and Social History" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "occupation", "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, "in_standard_filter": 1, - "label": "Occupation", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Occupation" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "column_break_25", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "fieldtype": "Column Break" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "marital_status", "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Marital Status", - "length": 0, - "no_copy": 0, - "options": "\nSingle\nMarried\nDivorced\nWidow", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "options": "\nSingle\nMarried\nDivorced\nWidow" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, "collapsible": 1, - "columns": 0, "fieldname": "risk_factors", "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Risk Factors", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Risk Factors" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "tobacco_past_use", "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Tobacco Past Use", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Tobacco Past Use" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "tobacco_current_use", "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Tobacco Current Use", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Tobacco Current Use" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "alcohol_past_use", "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Alcohol Past Use", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Alcohol Past Use" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "alcohol_current_use", "fieldtype": "Data", - "hidden": 0, "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Alcohol Current Use", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Alcohol Current Use" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "column_break_32", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "fieldtype": "Column Break" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "surrounding_factors", "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Occupational Hazards and Environmental Factors", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Occupational Hazards and Environmental Factors" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "other_risk_factors", "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Other Risk Factors", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Other Risk Factors" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, "collapsible": 1, "collapsible_depends_on": "patient_details", - "columns": 0, "fieldname": "more_info", "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "More Information", - "length": 0, - "no_copy": 0, "oldfieldtype": "Section Break", - "options": "fa fa-file-text", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "options": "fa fa-file-text" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "description": "Additional information regarding the patient", "fieldname": "patient_details", "fieldtype": "Text", - "hidden": 0, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Patient Details", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Patient Details" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, "collapsible": 1, - "columns": 0, "fieldname": "ac_sb", "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Account Details", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "label": "Account Details" }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, "fieldname": "default_currency", "fieldtype": "Link", "hidden": 1, - "ignore_user_permissions": 0, "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, "label": "Default Currency", - "length": 0, - "no_copy": 0, "options": "Currency", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "print_hide": 1 } ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, "icon": "fa fa-user", - "idx": 0, "image_field": "image", - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, "max_attachments": 50, - "modified": "2018-11-23 12:11:14.336657", + "modified": "2019-09-23 16:01:39.811633", "modified_by": "Administrator", "module": "Healthcare", "name": "Patient", @@ -1399,73 +355,48 @@ "owner": "Administrator", "permissions": [ { - "amend": 0, - "cancel": 0, "create": 1, - "delete": 0, + "delete": 1, "email": 1, "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, "print": 1, "read": 1, "report": 1, "role": "Physician", - "set_user_permissions": 0, "share": 1, - "submit": 0, "write": 1 }, { - "amend": 0, - "cancel": 0, "create": 1, - "delete": 0, + "delete": 1, "email": 1, "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, "print": 1, "read": 1, "report": 1, "role": "Laboratory User", - "set_user_permissions": 0, "share": 1, - "submit": 0, "write": 1 }, { - "amend": 0, - "cancel": 0, "create": 1, - "delete": 0, + "delete": 1, "email": 1, "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, "print": 1, "read": 1, "report": 1, "role": "Nursing User", - "set_user_permissions": 0, "share": 1, - "submit": 0, "write": 1 } ], "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, "restrict_to_domain": "Healthcare", "search_fields": "patient_name,mobile,email,phone", "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "ASC", "title_field": "patient_name", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 + "track_changes": 1 } \ No newline at end of file From fdad33309bfebb7fd4cfdac0bb25f9d1a8c114be Mon Sep 17 00:00:00 2001 From: Himanshu Date: Tue, 24 Sep 2019 10:03:34 +0530 Subject: [PATCH 08/11] fix: get correct warehouse for product bundle (#19130) --- erpnext/stock/doctype/packed_item/packed_item.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py index 2fd651612c..a09a3a8376 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -20,7 +20,7 @@ def get_product_bundle_items(item_code): def get_packing_item_details(item, company): return frappe.db.sql(""" - select i.item_name, i.description, i.stock_uom, id.default_warehouse + select i.item_name, i.is_stock_item, i.description, i.stock_uom, id.default_warehouse from `tabItem` i LEFT JOIN `tabItem Default` id ON id.parent=i.name and id.company=%s where i.name = %s""", (company, item), as_dict = 1)[0] @@ -30,7 +30,7 @@ def get_bin_qty(item, warehouse): where item_code = %s and warehouse = %s""", (item, warehouse), as_dict = 1) return det and det[0] or frappe._dict() -def update_packing_list_item(doc, packing_item_code, qty, main_item_row, description): +def update_packing_list_item(doc, packing_item_code, qty, main_item_row, description): item = get_packing_item_details(packing_item_code, doc.company) # check if exists @@ -53,7 +53,7 @@ def update_packing_list_item(doc, packing_item_code, qty, main_item_row, descrip if description and not pi.description: pi.description = description if not pi.warehouse: - pi.warehouse = (main_item_row.warehouse if ((doc.get('is_pos') + pi.warehouse = (main_item_row.warehouse if ((doc.get('is_pos') or item.is_stock_item \ or not item.default_warehouse) and main_item_row.warehouse) else item.default_warehouse) if not pi.batch_no: @@ -108,8 +108,8 @@ def get_items_from_product_bundle(args): "qty": flt(args["quantity"]) * flt(item.qty) }) items.append(get_item_details(args)) - + return items - + def on_doctype_update(): frappe.db.add_index("Packed Item", ["item_code", "warehouse"]) From 2e7419d78f365daf2466af1e3dec0c08b968cc5d Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Tue, 24 Sep 2019 10:05:42 +0530 Subject: [PATCH 09/11] fix: Do not validate warehouse in case of Repack (#19050) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 0c440e61d5..b810e3594c 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -254,7 +254,7 @@ class StockEntry(StockController): target_mandatory = ["Material Receipt", "Material Transfer", "Send to Subcontractor", "Material Transfer for Manufacture", "Send to Warehouse", "Receive at Warehouse"] - validate_for_manufacture_repack = any([d.bom_no for d in self.get("items")]) + validate_for_manufacture = any([d.bom_no for d in self.get("items")]) if self.purpose in source_mandatory and self.purpose not in target_mandatory: self.to_warehouse = None @@ -285,8 +285,8 @@ class StockEntry(StockController): else: frappe.throw(_("Target warehouse is mandatory for row {0}").format(d.idx)) - if self.purpose in ["Manufacture", "Repack"]: - if validate_for_manufacture_repack: + if self.purpose == "Manufacture": + if validate_for_manufacture: if d.bom_no: d.s_warehouse = None From d9e9d562f8b522d33550a8c103ee596abf3648ef Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Tue, 24 Sep 2019 11:44:52 +0530 Subject: [PATCH 10/11] fix: Travis (develop) (#19140) * fix: Travis * fix: Syntax Error --- erpnext/accounts/party.py | 6 ++---- erpnext/buying/doctype/supplier/test_supplier.py | 3 +-- erpnext/exceptions.py | 1 - erpnext/selling/doctype/customer/test_customer.py | 4 ++-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 59936d5116..20f8737f54 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -12,7 +12,7 @@ from frappe.utils import (add_days, getdate, formatdate, date_diff, from frappe.contacts.doctype.address.address import (get_address_display, get_default_address, get_company_address) from frappe.contacts.doctype.contact.contact import get_contact_details, get_default_contact -from erpnext.exceptions import PartyFrozen, PartyDisabled, InvalidAccountCurrency +from erpnext.exceptions import PartyFrozen, InvalidAccountCurrency from erpnext.accounts.utils import get_fiscal_year from erpnext import get_company_currency @@ -446,9 +446,7 @@ def validate_party_frozen_disabled(party_type, party_name): if party_type and party_name: if party_type in ("Customer", "Supplier"): party = frappe.get_cached_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True) - if party.disabled: - frappe.throw(_("{0} {1} is disabled").format(party_type, party_name), PartyDisabled) - elif party.get("is_frozen"): + if party.get("is_frozen"): frozen_accounts_modifier = frappe.db.get_single_value( 'Accounts Settings', 'frozen_accounts_modifier') if not frozen_accounts_modifier in frappe.get_roles(): frappe.throw(_("{0} {1} is frozen").format(party_type, party_name), PartyFrozen) diff --git a/erpnext/buying/doctype/supplier/test_supplier.py b/erpnext/buying/doctype/supplier/test_supplier.py index a377ec90f8..227a3dfee8 100644 --- a/erpnext/buying/doctype/supplier/test_supplier.py +++ b/erpnext/buying/doctype/supplier/test_supplier.py @@ -5,7 +5,6 @@ from __future__ import unicode_literals import frappe, unittest from erpnext.accounts.party import get_due_date -from erpnext.exceptions import PartyDisabled from frappe.test_runner import make_test_records test_dependencies = ['Payment Term', 'Payment Terms Template'] @@ -71,7 +70,7 @@ class TestSupplier(unittest.TestCase): po = create_purchase_order(do_not_save=True) - self.assertRaises(PartyDisabled, po.save) + self.assertRaises(frappe.ValidationError, po.save) frappe.db.set_value("Supplier", "_Test Supplier", "disabled", 0) diff --git a/erpnext/exceptions.py b/erpnext/exceptions.py index d92af5d722..fb3a5cb55d 100644 --- a/erpnext/exceptions.py +++ b/erpnext/exceptions.py @@ -5,4 +5,3 @@ import frappe class PartyFrozen(frappe.ValidationError): pass class InvalidAccountCurrency(frappe.ValidationError): pass class InvalidCurrency(frappe.ValidationError): pass -class PartyDisabled(frappe.ValidationError):pass diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py index 87fdaa366f..42c7d99e41 100644 --- a/erpnext/selling/doctype/customer/test_customer.py +++ b/erpnext/selling/doctype/customer/test_customer.py @@ -8,7 +8,7 @@ import unittest from erpnext.accounts.party import get_due_date from frappe.test_runner import make_test_records -from erpnext.exceptions import PartyFrozen, PartyDisabled +from erpnext.exceptions import PartyFrozen from frappe.utils import flt from erpnext.selling.doctype.customer.customer import get_credit_limit, get_customer_outstanding from erpnext.tests.utils import create_test_contact_and_address @@ -178,7 +178,7 @@ class TestCustomer(unittest.TestCase): so = make_sales_order(do_not_save=True) - self.assertRaises(PartyDisabled, so.save) + self.assertRaises(frappe.ValidationError, so.save) frappe.db.set_value("Customer", "_Test Customer", "disabled", 0) From 946f68f7f0af96b0ef119755d33120372e6b01fe Mon Sep 17 00:00:00 2001 From: Sahil Khan Date: Tue, 24 Sep 2019 18:36:53 +0550 Subject: [PATCH 11/11] bumped to version 12.1.5 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index ff08a726b3..ce9731e6ba 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '12.1.4' +__version__ = '12.1.5' def get_default_company(user=None): '''Get default company for user'''