diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 859146bbcd..69749c93af 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -2,6 +2,13 @@ set -e +# Check for merge conflicts before proceeding +python -m compileall -f "${GITHUB_WORKSPACE}" +if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}" + then echo "Found merge conflicts" + exit 1 +fi + cd ~ || exit sudo apt-get install redis-server libcups2-dev diff --git a/.github/try-on-f-cloud-button.svg b/.github/try-on-f-cloud-button.svg index fe0bb2c52d..270092722e 100644 --- a/.github/try-on-f-cloud-button.svg +++ b/.github/try-on-f-cloud-button.svg @@ -1,4 +1,4 @@ - + diff --git a/README.md b/README.md index c26660c5a2..cea3472447 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@
- + + +

ERPNext

ERP made simple

@@ -32,40 +34,39 @@ ERPNext as a monolith includes the following areas for managing businesses: 1. [Customize ERPNext](https://erpnext.com/docs/user/manual/en/customize-erpnext) 1. [And More](https://erpnext.com/docs/user/manual/en/) -ERPNext requires MariaDB. - ERPNext is built on the [Frappe Framework](https://github.com/frappe/frappe), a full-stack web app framework built with Python & JavaScript. -- [User Guide](https://erpnext.com/docs/user) -- [Discussion Forum](https://discuss.erpnext.com/) +## Installation ---- - -
- +
+ + + Try in PWD +
+> Login for the PWD site: (username: Administrator, password: admin) + ### Containerized Installation Use docker to deploy ERPNext in production or for development of [Frappe](https://github.com/frappe/frappe) apps. See https://github.com/frappe/frappe_docker for more details. -### Full Install +### Manual Install The Easy Way: our install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench for more details. New passwords will be created for the ERPNext "Administrator" user, the MariaDB root user, and the frappe user (the script displays the passwords and saves them to ~/frappe_passwords.txt). ---- -## License +## Learning and community -GNU/General Public License (see [license.txt](license.txt)) +1. [Frappe School](https://frappe.school) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community. +2. [Official documentation](https://docs.erpnext.com/) - Extensive documentation for ERPNext. +3. [Discussion Forum](https://discuss.erpnext.com/) - Engage with community of ERPNext users and service providers. +4. [Telegram Group](https://t.me/erpnexthelp) - Get instant help from huge community of users. -The ERPNext code is licensed as GNU General Public License (v3) and the Documentation is licensed as Creative Commons (CC-BY-SA-3.0) and the copyright is owned by Frappe Technologies Pvt Ltd (Frappe) and Contributors. - ---- ## Contributing @@ -73,49 +74,14 @@ The ERPNext code is licensed as GNU General Public License (v3) and the Document 1. [Report Security Vulnerabilities](https://erpnext.com/security) 1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Contribution-Guidelines) 1. [Translations](https://translate.erpnext.com) -1. [Chart of Accounts](https://charts.erpnext.com) ---- -## Learning +## License -1. [Frappe School](https://frappe.school) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community. +GNU/General Public License (see [license.txt](license.txt)) ---- +The ERPNext code is licensed as GNU General Public License (v3) and the Documentation is licensed as Creative Commons (CC-BY-SA-3.0) and the copyright is owned by Frappe Technologies Pvt Ltd (Frappe) and Contributors. -## Logo and Trademark +## Logo and Trademark Policy -The brand name ERPNext and the logo are trademarks of Frappe Technologies Pvt. Ltd. - -### Introduction - -Frappe Technologies Pvt. Ltd. (Frappe) owns and oversees the trademarks for the ERPNext name and logos. We have developed this trademark usage policy with the following goals in mind: - -- We’d like to make it easy for anyone to use the ERPNext name or logo for community-oriented efforts that help spread and improve ERPNext. -- We’d like to make it clear how ERPNext-related businesses and projects can (and cannot) use the ERPNext name and logo. -- We’d like to make it hard for anyone to use the ERPNext name and logo to unfairly profit from, trick or confuse people who are looking for official ERPNext resources. - -### Frappe Trademark Usage Policy - -Permission from Frappe is required to use the ERPNext name or logo as part of any project, product, service, domain or company name. - -We will grant permission to use the ERPNext name and logo for projects that meet the following criteria: - -- The primary purpose of your project is to promote the spread and improvement of the ERPNext software. -- Your project is non-commercial in nature (it can make money to cover its costs or contribute to non-profit entities, but it cannot be run as a for-profit project or business). -Your project neither promotes nor is associated with entities that currently fail to comply with the GPL license under which ERPNext is distributed. -- If your project meets these criteria, you will be permitted to use the ERPNext name and logo to promote your project in any way you see fit with one exception: Please do not use ERPNext as part of a domain name. - -Use of the ERPNext name and logo is additionally allowed in the following situations: - -All other ERPNext-related businesses or projects can use the ERPNext name and logo to refer to and explain their services, but they cannot use them as part of a product, project, service, domain, or company name and they cannot use them in any way that suggests an affiliation with or endorsement by ERPNext or Frappe Technologies or the ERPNext open source project. For example, a consulting company can describe its business as “123 Web Services, offering ERPNext consulting for small businesses,” but cannot call its business “The ERPNext Consulting Company.” - -Similarly, it’s OK to use the ERPNext logo as part of a page that describes your products or services, but it is not OK to use it as part of your company or product logo or branding itself. Under no circumstances is it permitted to use ERPNext as part of a top-level domain name. - -We do not allow the use of the trademark in advertising, including AdSense/AdWords. - -Please note that it is not the goal of this policy to limit commercial activity around ERPNext. We encourage ERPNext-based businesses, and we would love to see hundreds of them. - -When in doubt about your use of the ERPNext name or logo, please contact Frappe Technologies for clarification. - -(inspired by WordPress) +Please read our [Logo and Trademark Policy](TRADEMARK_POLICY.md). diff --git a/TRADEMARK_POLICY.md b/TRADEMARK_POLICY.md new file mode 100644 index 0000000000..244c74778e --- /dev/null +++ b/TRADEMARK_POLICY.md @@ -0,0 +1,36 @@ +## Logo and Trademark Policy + +The brand name ERPNext and the logo are trademarks of Frappe Technologies Pvt. Ltd. + +### Introduction + +Frappe Technologies Pvt. Ltd. (Frappe) owns and oversees the trademarks for the ERPNext name and logos. We have developed this trademark usage policy with the following goals in mind: + +- We’d like to make it easy for anyone to use the ERPNext name or logo for community-oriented efforts that help spread and improve ERPNext. +- We’d like to make it clear how ERPNext-related businesses and projects can (and cannot) use the ERPNext name and logo. +- We’d like to make it hard for anyone to use the ERPNext name and logo to unfairly profit from, trick or confuse people who are looking for official ERPNext resources. + +### Frappe Trademark Usage Policy + +Permission from Frappe is required to use the ERPNext name or logo as part of any project, product, service, domain or company name. + +We will grant permission to use the ERPNext name and logo for projects that meet the following criteria: + +- The primary purpose of your project is to promote the spread and improvement of the ERPNext software. +- Your project is non-commercial in nature (it can make money to cover its costs or contribute to non-profit entities, but it cannot be run as a for-profit project or business). +Your project neither promotes nor is associated with entities that currently fail to comply with the GPL license under which ERPNext is distributed. +- If your project meets these criteria, you will be permitted to use the ERPNext name and logo to promote your project in any way you see fit with one exception: Please do not use ERPNext as part of a domain name. + +Use of the ERPNext name and logo is additionally allowed in the following situations: + +All other ERPNext-related businesses or projects can use the ERPNext name and logo to refer to and explain their services, but they cannot use them as part of a product, project, service, domain, or company name and they cannot use them in any way that suggests an affiliation with or endorsement by ERPNext or Frappe Technologies or the ERPNext open source project. For example, a consulting company can describe its business as “123 Web Services, offering ERPNext consulting for small businesses,” but cannot call its business “The ERPNext Consulting Company.” + +Similarly, it’s OK to use the ERPNext logo as part of a page that describes your products or services, but it is not OK to use it as part of your company or product logo or branding itself. Under no circumstances is it permitted to use ERPNext as part of a top-level domain name. + +We do not allow the use of the trademark in advertising, including AdSense/AdWords. + +Please note that it is not the goal of this policy to limit commercial activity around ERPNext. We encourage ERPNext-based businesses, and we would love to see hundreds of them. + +When in doubt about your use of the ERPNext name or logo, please contact Frappe Technologies for clarification. + +(inspired by WordPress) diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index a8776fa344..f319003876 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -539,19 +539,11 @@ def make_gl_entries( frappe.db.commit() except Exception as e: if frappe.flags.in_test: - traceback = frappe.get_traceback() - frappe.log_error( - title=_("Error while processing deferred accounting for Invoice {0}").format(doc.name), - message=traceback, - ) + doc.log_error(f"Error while processing deferred accounting for Invoice {doc.name}") raise e else: frappe.db.rollback() - traceback = frappe.get_traceback() - frappe.log_error( - title=_("Error while processing deferred accounting for Invoice {0}").format(doc.name), - message=traceback, - ) + doc.log_error(f"Error while processing deferred accounting for Invoice {doc.name}") frappe.flags.deferred_accounting_error = True @@ -632,12 +624,7 @@ def book_revenue_via_journal_entry( frappe.db.commit() except Exception: frappe.db.rollback() - traceback = frappe.get_traceback() - frappe.log_error( - title=_("Error while processing deferred accounting for Invoice {0}").format(doc.name), - message=traceback, - ) - + doc.log_error(f"Error while processing deferred accounting for Invoice {doc.name}") frappe.flags.deferred_accounting_error = True diff --git a/erpnext/accounts/doctype/bank_account/bank_account.json b/erpnext/accounts/doctype/bank_account/bank_account.json index de67ab1ce5..41d79479ca 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.json +++ b/erpnext/accounts/doctype/bank_account/bank_account.json @@ -27,7 +27,6 @@ "bank_account_no", "address_and_contact", "address_html", - "website", "column_break_13", "contact_html", "integration_details_section", @@ -156,11 +155,6 @@ "fieldtype": "HTML", "label": "Address HTML" }, - { - "fieldname": "website", - "fieldtype": "Data", - "label": "Website" - }, { "fieldname": "column_break_13", "fieldtype": "Column Break" @@ -208,7 +202,7 @@ } ], "links": [], - "modified": "2020-10-23 16:48:06.303658", + "modified": "2022-05-04 15:49:42.620630", "modified_by": "Administrator", "module": "Accounts", "name": "Bank Account", @@ -243,5 +237,6 @@ "search_fields": "bank,account", "sort_field": "modified", "sort_order": "DESC", + "states": [], "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py index 0f617b5dda..98ba399a35 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py @@ -118,6 +118,7 @@ class BankClearance(Document): ) .where(loan_repayment.docstatus == 1) .where(loan_repayment.clearance_date.isnull()) + .where(loan_repayment.repay_from_salary == 0) .where(loan_repayment.posting_date >= self.from_date) .where(loan_repayment.posting_date <= self.to_date) .where(loan_repayment.payment_account.isin([self.bank_account, self.account])) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index 4c25d7ccbe..0efe086d94 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -467,6 +467,7 @@ def get_lr_matching_query(bank_account, amount_condition, filters): loan_repayment.posting_date, ) .where(loan_repayment.docstatus == 1) + .where(loan_repayment.repay_from_salary == 0) .where(loan_repayment.clearance_date.isnull()) .where(loan_repayment.payment_account == bank_account) ) diff --git a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py index 3540f0b0e0..3f5c064f4b 100644 --- a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py +++ b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py @@ -136,7 +136,7 @@ def start_import( except Exception: frappe.db.rollback() data_import.db_set("status", "Error") - frappe.log_error(title=data_import.name) + data_import.log_error("Bank Statement Import failed") finally: frappe.flags.in_import = False diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py index 9f2731de55..372c53d499 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py @@ -56,7 +56,7 @@ def create_bank_entries(columns, data, bank_account): bank_transaction.submit() success += 1 except Exception: - frappe.log_error(frappe.get_traceback()) + bank_transaction.log_error("Bank entry creation failed") errors += 1 return {"success": success, "errors": errors} diff --git a/erpnext/accounts/doctype/ledger_merge/ledger_merge.py b/erpnext/accounts/doctype/ledger_merge/ledger_merge.py index c1e2975fbc..18e5a1ac85 100644 --- a/erpnext/accounts/doctype/ledger_merge/ledger_merge.py +++ b/erpnext/accounts/doctype/ledger_merge/ledger_merge.py @@ -62,7 +62,7 @@ def start_merge(docname): ) except Exception: frappe.db.rollback() - frappe.log_error(title=ledger_merge.name) + ledger_merge.log_error("Ledger merge failed") finally: if successful_merges == total: ledger_merge.db_set("status", "Success") diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py index 9d4d76b8f6..99377421c5 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py @@ -2,9 +2,6 @@ # For license information, please see license.txt -import traceback -from json import dumps - import frappe from frappe import _, scrub from frappe.model.document import Document @@ -114,10 +111,13 @@ class OpeningInvoiceCreationTool(Document): ) or {} ) + + default_currency = frappe.db.get_value(row.party_type, row.party, "default_currency") + if company_details: invoice.update( { - "currency": company_details.get("default_currency"), + "currency": default_currency or company_details.get("default_currency"), "letter_head": company_details.get("default_letter_head"), } ) @@ -244,11 +244,7 @@ def start_import(invoices): except Exception: errors += 1 frappe.db.rollback() - message = "\n".join( - ["Data:", dumps(d, default=str, indent=4), "--" * 50, "\nException:", traceback.format_exc()] - ) - frappe.log_error(title="Error while creating Opening Invoice", message=message) - frappe.db.commit() + doc.log_error("Opening invoice creation failed") if errors: frappe.msgprint( _("You had {} errors while creating opening invoices. Check {} for more details").format( diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 403e2bdfe7..d7fae6d2a3 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -112,8 +112,6 @@ frappe.ui.form.on('Payment Entry', { var doctypes = ["Purchase Order", "Purchase Invoice", "Journal Entry"]; } else if (frm.doc.party_type == "Employee") { var doctypes = ["Expense Claim", "Journal Entry"]; - } else if (frm.doc.party_type == "Student") { - var doctypes = ["Fees"]; } else { var doctypes = ["Journal Entry"]; } @@ -755,8 +753,7 @@ frappe.ui.form.on('Payment Entry', { if( (frm.doc.payment_type=="Receive" && frm.doc.party_type=="Customer") || (frm.doc.payment_type=="Pay" && frm.doc.party_type=="Supplier") || - (frm.doc.payment_type=="Pay" && frm.doc.party_type=="Employee") || - (frm.doc.payment_type=="Receive" && frm.doc.party_type=="Student") + (frm.doc.payment_type=="Pay" && frm.doc.party_type=="Employee") ) { if(total_positive_outstanding > total_negative_outstanding) if (!frm.doc.paid_amount) @@ -798,8 +795,7 @@ frappe.ui.form.on('Payment Entry', { if ( (frm.doc.payment_type=="Receive" && frm.doc.party_type=="Customer") || (frm.doc.payment_type=="Pay" && frm.doc.party_type=="Supplier") || - (frm.doc.payment_type=="Pay" && frm.doc.party_type=="Employee") || - (frm.doc.payment_type=="Receive" && frm.doc.party_type=="Student") + (frm.doc.payment_type=="Pay" && frm.doc.party_type=="Employee") ) { if(total_positive_outstanding_including_order > paid_amount) { var remaining_outstanding = total_positive_outstanding_including_order - paid_amount; diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index e6a554c00a..7257e6d75f 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -183,9 +183,7 @@ class PaymentEntry(AccountsController): if not self.party: frappe.throw(_("Party is mandatory")) - _party_name = ( - "title" if self.party_type in ("Student", "Shareholder") else self.party_type.lower() + "_name" - ) + _party_name = "title" if self.party_type == "Shareholder" else self.party_type.lower() + "_name" self.party_name = frappe.db.get_value(self.party_type, self.party, _party_name) if self.party: @@ -298,9 +296,7 @@ class PaymentEntry(AccountsController): frappe.throw(_("{0} is mandatory").format(self.meta.get_label(field))) def validate_reference_documents(self): - if self.party_type == "Student": - valid_reference_doctypes = "Fees" - elif self.party_type == "Customer": + if self.party_type == "Customer": valid_reference_doctypes = ("Sales Order", "Sales Invoice", "Journal Entry", "Dunning") elif self.party_type == "Supplier": valid_reference_doctypes = ("Purchase Order", "Purchase Invoice", "Journal Entry") @@ -338,8 +334,6 @@ class PaymentEntry(AccountsController): ref_party_account = ( get_party_account_based_on_invoice_discounting(d.reference_name) or ref_doc.debit_to ) - elif self.party_type == "Student": - ref_party_account = ref_doc.receivable_account elif self.party_type == "Supplier": ref_party_account = ref_doc.credit_to elif self.party_type == "Employee": @@ -1259,20 +1253,19 @@ def get_outstanding_reference_documents(args): # Get all SO / PO which are not fully billed or against which full advance not paid orders_to_be_billed = [] - if args.get("party_type") != "Student": - orders_to_be_billed = get_orders_to_be_billed( - args.get("posting_date"), - args.get("party_type"), - args.get("party"), - args.get("company"), - party_account_currency, - company_currency, - filters=args, - ) + orders_to_be_billed = get_orders_to_be_billed( + args.get("posting_date"), + args.get("party_type"), + args.get("party"), + args.get("company"), + party_account_currency, + company_currency, + filters=args, + ) # Get negative outstanding sales /purchase invoices negative_outstanding_invoices = [] - if args.get("party_type") not in ["Student", "Employee"] and not args.get("voucher_no"): + if args.get("party_type") != "Employee" and not args.get("voucher_no"): negative_outstanding_invoices = get_negative_outstanding_invoices( args.get("party_type"), args.get("party"), @@ -1496,9 +1489,7 @@ def get_party_details(company, party_type, party, date, cost_center=None): account_currency = get_account_currency(party_account) account_balance = get_balance_on(party_account, date, cost_center=cost_center) - _party_name = ( - "title" if party_type in ("Student", "Shareholder") else party_type.lower() + "_name" - ) + _party_name = "title" if party_type == "Shareholder" else party_type.lower() + "_name" party_name = frappe.db.get_value(party_type, party, _party_name) party_balance = get_balance_on(party_type=party_type, party=party, cost_center=cost_center) if party_type in ["Customer", "Supplier"]: @@ -1560,7 +1551,7 @@ def get_company_defaults(company): def get_outstanding_on_journal_entry(name): res = frappe.db.sql( "SELECT " - 'CASE WHEN party_type IN ("Customer", "Student") ' + 'CASE WHEN party_type IN ("Customer") ' "THEN ifnull(sum(debit_in_account_currency - credit_in_account_currency), 0) " "ELSE ifnull(sum(credit_in_account_currency - debit_in_account_currency), 0) " "END as outstanding_amount " @@ -1917,8 +1908,6 @@ def set_party_type(dt): party_type = "Supplier" elif dt in ("Expense Claim", "Employee Advance", "Gratuity"): party_type = "Employee" - elif dt == "Fees": - party_type = "Student" return party_type diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js index ad5a84094e..0b334ae076 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js @@ -38,6 +38,15 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo ] }; }); + + this.frm.set_query("cost_center", () => { + return { + "filters": { + "company": this.frm.doc.company, + "is_group": 0 + } + } + }); } refresh() { diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json index eb0c20f92d..18d3485085 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json @@ -24,6 +24,7 @@ "invoice_limit", "payment_limit", "bank_cash_account", + "cost_center", "sec_break1", "invoices", "column_break_15", @@ -178,13 +179,19 @@ { "fieldname": "column_break_11", "fieldtype": "Column Break" + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" } ], "hide_toolbar": 1, "icon": "icon-resize-horizontal", "issingle": 1, "links": [], - "modified": "2021-10-04 20:27:11.114194", + "modified": "2022-04-29 15:37:10.246831", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Reconciliation", @@ -209,5 +216,6 @@ ], "sort_field": "modified", "sort_order": "DESC", + "states": [], "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index b596df9224..e5b942fb6e 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -332,6 +332,9 @@ class PaymentReconciliation(Document): def get_conditions(self, get_invoices=False, get_payments=False, get_return_invoices=False): condition = " and company = '{0}' ".format(self.company) + if self.get("cost_center") and (get_invoices or get_payments or get_return_invoices): + condition = " and cost_center = '{0}' ".format(self.cost_center) + if get_invoices: condition += ( " and posting_date >= {0}".format(frappe.db.escape(self.from_invoice_date)) diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 2271f48a2b..d2374b77a6 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -1,9 +1,96 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -# import frappe import unittest +import frappe +from frappe.utils import add_days, getdate + +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice + class TestPaymentReconciliation(unittest.TestCase): - pass + @classmethod + def setUpClass(cls): + make_customer() + make_invoice_and_payment() + + def test_payment_reconciliation(self): + payment_reco = frappe.get_doc("Payment Reconciliation") + payment_reco.company = "_Test Company" + payment_reco.party_type = "Customer" + payment_reco.party = "_Test Payment Reco Customer" + payment_reco.receivable_payable_account = "Debtors - _TC" + payment_reco.from_invoice_date = add_days(getdate(), -1) + payment_reco.to_invoice_date = getdate() + payment_reco.from_payment_date = add_days(getdate(), -1) + payment_reco.to_payment_date = getdate() + payment_reco.maximum_invoice_amount = 1000 + payment_reco.maximum_payment_amount = 1000 + payment_reco.invoice_limit = 10 + payment_reco.payment_limit = 10 + payment_reco.bank_cash_account = "_Test Bank - _TC" + payment_reco.cost_center = "_Test Cost Center - _TC" + payment_reco.get_unreconciled_entries() + + self.assertEqual(len(payment_reco.get("invoices")), 1) + self.assertEqual(len(payment_reco.get("payments")), 1) + + payment_entry = payment_reco.get("payments")[0].reference_name + invoice = payment_reco.get("invoices")[0].invoice_number + + payment_reco.allocate_entries( + { + "payments": [payment_reco.get("payments")[0].as_dict()], + "invoices": [payment_reco.get("invoices")[0].as_dict()], + } + ) + payment_reco.reconcile() + + payment_entry_doc = frappe.get_doc("Payment Entry", payment_entry) + self.assertEqual(payment_entry_doc.get("references")[0].reference_name, invoice) + + +def make_customer(): + if not frappe.db.get_value("Customer", "_Test Payment Reco Customer"): + frappe.get_doc( + { + "doctype": "Customer", + "customer_name": "_Test Payment Reco Customer", + "customer_type": "Individual", + "customer_group": "_Test Customer Group", + "territory": "_Test Territory", + } + ).insert() + + +def make_invoice_and_payment(): + si = create_sales_invoice( + customer="_Test Payment Reco Customer", qty=1, rate=690, do_not_save=True + ) + si.cost_center = "_Test Cost Center - _TC" + si.save() + si.submit() + + pe = frappe.get_doc( + { + "doctype": "Payment Entry", + "payment_type": "Receive", + "party_type": "Customer", + "party": "_Test Payment Reco Customer", + "company": "_Test Company", + "paid_from_account_currency": "INR", + "paid_to_account_currency": "INR", + "source_exchange_rate": 1, + "target_exchange_rate": 1, + "reference_no": "1", + "reference_date": getdate(), + "received_amount": 690, + "paid_amount": 690, + "paid_from": "Debtors - _TC", + "paid_to": "_Test Bank - _TC", + "cost_center": "_Test Cost Center - _TC", + } + ) + pe.insert() + pe.submit() diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 0f7c13f3bb..e30289a62c 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -824,29 +824,6 @@ frappe.ui.form.on('Sales Invoice', { } }, - // Healthcare - patient: function(frm) { - if (frappe.boot.active_domains.includes("Healthcare")){ - if(frm.doc.patient){ - frappe.call({ - method: "frappe.client.get_value", - args:{ - doctype: "Patient", - filters: { - "name": frm.doc.patient - }, - fieldname: "customer" - }, - callback:function(r) { - if(r && r.message.customer){ - frm.set_value("customer", r.message.customer); - } - } - }); - } - } - }, - project: function(frm) { if (frm.doc.project) { frm.events.add_timesheet_data(frm, { @@ -976,25 +953,6 @@ frappe.ui.form.on('Sales Invoice', { if (frm.doc.is_debit_note) { frm.set_df_property('return_against', 'label', __('Adjustment Against')); } - - if (frappe.boot.active_domains.includes("Healthcare")) { - frm.set_df_property("patient", "hidden", 0); - frm.set_df_property("patient_name", "hidden", 0); - frm.set_df_property("ref_practitioner", "hidden", 0); - if (cint(frm.doc.docstatus==0) && cur_frm.page.current_view_name!=="pos" && !frm.doc.is_return) { - frm.add_custom_button(__('Healthcare Services'), function() { - get_healthcare_services_to_invoice(frm); - },__("Get Items From")); - frm.add_custom_button(__('Prescriptions'), function() { - get_drugs_to_invoice(frm); - },__("Get Items From")); - } - } - else { - frm.set_df_property("patient", "hidden", 1); - frm.set_df_property("patient_name", "hidden", 1); - frm.set_df_property("ref_practitioner", "hidden", 1); - } }, create_invoice_discounting: function(frm) { diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py index b83d6a575e..c0005f78cf 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py @@ -12,7 +12,10 @@ def get_data(): "Sales Invoice": "return_against", "Auto Repeat": "reference_document", }, - "internal_links": {"Sales Order": ["items", "sales_order"]}, + "internal_links": { + "Sales Order": ["items", "sales_order"], + "Timesheet": ["timesheets", "time_sheet"], + }, "transactions": [ { "label": _("Payment"), diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index f6dd86afa2..2243b191da 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -722,9 +722,7 @@ def process(data): frappe.db.commit() except frappe.ValidationError: frappe.db.rollback() - frappe.db.begin() - frappe.log_error(frappe.get_traceback()) - frappe.db.commit() + subscription.log_error("Subscription failed") @frappe.whitelist() diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index 2ac1fea5af..f3ccc868c4 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -203,7 +203,7 @@ def get_loan_entries(filters): posting_date = (loan_doc.posting_date).as_("posting_date") account = loan_doc.payment_account - entries = ( + query = ( frappe.qb.from_(loan_doc) .select( ConstantColumn(doctype).as_("payment_document"), @@ -217,9 +217,12 @@ def get_loan_entries(filters): .where(account == filters.get("account")) .where(posting_date <= getdate(filters.get("report_date"))) .where(ifnull(loan_doc.clearance_date, "4000-01-01") > getdate(filters.get("report_date"))) - .run(as_dict=1) ) + if doctype == "Loan Repayment": + query.where(loan_doc.repay_from_salary == 0) + + entries = query.run(as_dict=1) loan_docs.extend(entries) return loan_docs diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 636d624506..865cf14622 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -133,7 +133,7 @@ def set_account_currency(filters): else: account_currency = ( None - if filters.party_type in ["Employee", "Student", "Shareholder", "Member"] + if filters.party_type in ["Employee", "Shareholder", "Member"] else frappe.db.get_value(filters.party_type, filters.party[0], "default_currency") ) @@ -435,7 +435,13 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map): gle_map[group_by_value].entries.append(gle) elif group_by_voucher_consolidated: - keylist = [gle.get("voucher_type"), gle.get("voucher_no"), gle.get("account")] + keylist = [ + gle.get("voucher_type"), + gle.get("voucher_no"), + gle.get("account"), + gle.get("party_type"), + gle.get("party"), + ] if filters.get("include_dimensions"): for dim in accounting_dimensions: keylist.append(gle.get(dim)) diff --git a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py index 869f6aaf94..5fcfdff6f1 100644 --- a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py +++ b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py @@ -23,8 +23,6 @@ def execute(filters=None): def get_data(filters, show_party_name): if filters.get("party_type") in ("Customer", "Supplier", "Employee", "Member"): party_name_field = "{0}_name".format(frappe.scrub(filters.get("party_type"))) - elif filters.get("party_type") == "Student": - party_name_field = "first_name" elif filters.get("party_type") == "Shareholder": party_name_field = "title" else: diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index 9a1f9d1995..b365a836cd 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -23,6 +23,10 @@ "order_confirmation_no", "order_confirmation_date", "amended_from", + "accounting_dimensions_section", + "cost_center", + "dimension_col_break", + "project", "drop_ship", "customer", "customer_name", @@ -1137,16 +1141,39 @@ "fieldtype": "Link", "label": "Tax Withholding Category", "options": "Tax Withholding Category" + }, + { + "collapsible": 1, + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions " + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" + }, + { + "fieldname": "project", + "fieldtype": "Link", + "label": "Project", + "options": "Project" } ], "icon": "fa fa-file-text", "idx": 105, "is_submittable": 1, "links": [], - "modified": "2021-09-28 13:10:47.955401", + "modified": "2022-04-26 12:16:38.694276", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { @@ -1193,6 +1220,7 @@ "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", + "states": [], "timeline_field": "supplier", "title_field": "supplier_name", "track_changes": 1 diff --git a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js index 7a8d08dd22..fd73b870c5 100644 --- a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js +++ b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js @@ -114,11 +114,11 @@ frappe.query_reports["Supplier Quotation Comparison"] = { onload: (report) => { // Create a button for setting the default supplier report.page.add_inner_button(__("Select Default Supplier"), () => { - let reporter = frappe.query_reports["Quoted Item Comparison"]; + let reporter = frappe.query_reports["Supplier Quotation Comparison"]; //Always make a new one so that the latest values get updated reporter.make_default_supplier_dialog(report); - }, 'Tools'); + }, __("Tools")); }, make_default_supplier_dialog: (report) => { @@ -126,7 +126,7 @@ frappe.query_reports["Supplier Quotation Comparison"] = { if(!report.data) return; let filters = report.get_values(); - let item_code = filters.item; + let item_code = filters.item_code; // Get a list of the suppliers (with a blank as well) for the user to select let suppliers = $.map(report.data, (row, idx)=>{ return row.supplier_name }) @@ -152,7 +152,7 @@ frappe.query_reports["Supplier Quotation Comparison"] = { ] }); - dialog.set_primary_action("Set Default Supplier", () => { + dialog.set_primary_action(__("Set Default Supplier"), () => { let values = dialog.get_values(); if(values) { // Set the default_supplier field of the appropriate Item to the selected supplier diff --git a/erpnext/config/education.py b/erpnext/config/education.py deleted file mode 100644 index c37cf2b196..0000000000 --- a/erpnext/config/education.py +++ /dev/null @@ -1,192 +0,0 @@ -from frappe import _ - - -def get_data(): - return [ - { - "label": _("Student"), - "items": [ - { - "type": "doctype", - "name": "Student", - "onboard": 1, - }, - {"type": "doctype", "name": "Guardian"}, - {"type": "doctype", "name": "Student Log"}, - {"type": "doctype", "name": "Student Group"}, - ], - }, - { - "label": _("Admission"), - "items": [ - {"type": "doctype", "name": "Student Applicant"}, - {"type": "doctype", "name": "Web Academy Applicant"}, - {"type": "doctype", "name": "Student Admission"}, - {"type": "doctype", "name": "Program Enrollment"}, - ], - }, - { - "label": _("Attendance"), - "items": [ - {"type": "doctype", "name": "Student Attendance"}, - {"type": "doctype", "name": "Student Leave Application"}, - { - "type": "report", - "is_query_report": True, - "name": "Absent Student Report", - "doctype": "Student Attendance", - }, - { - "type": "report", - "is_query_report": True, - "name": "Student Batch-Wise Attendance", - "doctype": "Student Attendance", - }, - ], - }, - { - "label": _("Tools"), - "items": [ - {"type": "doctype", "name": "Student Attendance Tool"}, - {"type": "doctype", "name": "Assessment Result Tool"}, - {"type": "doctype", "name": "Student Group Creation Tool"}, - {"type": "doctype", "name": "Program Enrollment Tool"}, - {"type": "doctype", "name": "Course Scheduling Tool"}, - ], - }, - { - "label": _("Assessment"), - "items": [ - {"type": "doctype", "name": "Assessment Plan"}, - { - "type": "doctype", - "name": "Assessment Group", - "link": "Tree/Assessment Group", - }, - {"type": "doctype", "name": "Assessment Result"}, - {"type": "doctype", "name": "Assessment Criteria"}, - ], - }, - { - "label": _("Assessment Reports"), - "items": [ - { - "type": "report", - "is_query_report": True, - "name": "Course wise Assessment Report", - "doctype": "Assessment Result", - }, - { - "type": "report", - "is_query_report": True, - "name": "Final Assessment Grades", - "doctype": "Assessment Result", - }, - { - "type": "report", - "is_query_report": True, - "name": "Assessment Plan Status", - "doctype": "Assessment Plan", - }, - {"type": "doctype", "name": "Student Report Generation Tool"}, - ], - }, - { - "label": _("Fees"), - "items": [ - {"type": "doctype", "name": "Fees"}, - {"type": "doctype", "name": "Fee Schedule"}, - {"type": "doctype", "name": "Fee Structure"}, - {"type": "doctype", "name": "Fee Category"}, - ], - }, - { - "label": _("Schedule"), - "items": [ - {"type": "doctype", "name": "Course Schedule", "route": "/app/List/Course Schedule/Calendar"}, - {"type": "doctype", "name": "Course Scheduling Tool"}, - ], - }, - { - "label": _("Masters"), - "items": [ - { - "type": "doctype", - "name": "Program", - }, - { - "type": "doctype", - "name": "Course", - "onboard": 1, - }, - { - "type": "doctype", - "name": "Topic", - }, - { - "type": "doctype", - "name": "Instructor", - "onboard": 1, - }, - { - "type": "doctype", - "name": "Room", - "onboard": 1, - }, - ], - }, - { - "label": _("Content Masters"), - "items": [ - {"type": "doctype", "name": "Article"}, - {"type": "doctype", "name": "Video"}, - {"type": "doctype", "name": "Quiz"}, - ], - }, - { - "label": _("LMS Activity"), - "items": [ - {"type": "doctype", "name": "Course Enrollment"}, - {"type": "doctype", "name": "Course Activity"}, - {"type": "doctype", "name": "Quiz Activity"}, - ], - }, - { - "label": _("Settings"), - "items": [ - {"type": "doctype", "name": "Student Category"}, - {"type": "doctype", "name": "Student Batch Name"}, - { - "type": "doctype", - "name": "Grading Scale", - "onboard": 1, - }, - {"type": "doctype", "name": "Academic Term"}, - {"type": "doctype", "name": "Academic Year"}, - {"type": "doctype", "name": "Education Settings"}, - ], - }, - { - "label": _("Other Reports"), - "items": [ - { - "type": "report", - "is_query_report": True, - "name": "Student and Guardian Contact Details", - "doctype": "Program Enrollment", - }, - { - "type": "report", - "is_query_report": True, - "name": "Student Monthly Attendance Sheet", - "doctype": "Student Attendance", - }, - { - "type": "report", - "name": "Student Fee Collection", - "doctype": "Fees", - "is_query_report": True, - }, - ], - }, - ] diff --git a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py index b4657a2e36..64b3a017b4 100644 --- a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py +++ b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py @@ -72,7 +72,7 @@ class LinkedInSettings(Document): if media_id: return self.post_text(text, title, media_id=media_id) else: - frappe.log_error("Failed to upload media.", "LinkedIn Upload Error") + self.log_error("LinkedIn: Failed to upload media") def upload_image(self, media): media = get_file_path(media) diff --git a/erpnext/crm/doctype/social_media_post/social_media_post.py b/erpnext/crm/doctype/social_media_post/social_media_post.py index 2fd003e463..55db29a627 100644 --- a/erpnext/crm/doctype/social_media_post/social_media_post.py +++ b/erpnext/crm/doctype/social_media_post/social_media_post.py @@ -70,8 +70,7 @@ class SocialMediaPost(Document): except Exception: self.db_set("post_status", "Error") - title = _("Error while POSTING {0}").format(self.name) - frappe.log_error(message=frappe.get_traceback(), title=title) + self.log_error("Social posting failed") def process_scheduled_social_media_posts(): diff --git a/erpnext/domains/education.py b/erpnext/domains/education.py deleted file mode 100644 index 23b8258baf..0000000000 --- a/erpnext/domains/education.py +++ /dev/null @@ -1,19 +0,0 @@ -data = { - "desktop_icons": [ - "Student", - "Program", - "Course", - "Student Group", - "Instructor", - "Fees", - "Task", - "ToDo", - "Education", - "Student Attendance Tool", - "Student Applicant", - ], - "default_portal_role": "Student", - "restricted_roles": ["Student", "Instructor", "Academics User", "Education Manager"], - "modules": ["Education"], - "on_setup": "erpnext.education.setup.setup_education", -} diff --git a/erpnext/e_commerce/api.py b/erpnext/e_commerce/api.py index 179829c2b7..bfada0faa7 100644 --- a/erpnext/e_commerce/api.py +++ b/erpnext/e_commerce/api.py @@ -56,8 +56,7 @@ def get_product_filter_data(query_args=None): attribute_filters, field_filters, search_term=search, start=start, item_group=item_group ) except Exception: - traceback = frappe.get_traceback() - frappe.log_error(traceback, frappe._("Product Engine Error")) + frappe.log_error("Product query with filter failed") return {"exc": "Something went wrong!"} # discount filter data diff --git a/erpnext/e_commerce/redisearch_utils.py b/erpnext/e_commerce/redisearch_utils.py index f2dd796f2c..61b4b9ee1f 100644 --- a/erpnext/e_commerce/redisearch_utils.py +++ b/erpnext/e_commerce/redisearch_utils.py @@ -245,8 +245,7 @@ def get_fields_indexed(): def raise_redisearch_error(): "Create an Error Log and raise error." - traceback = frappe.get_traceback() - log = frappe.log_error(traceback, frappe._("Redisearch Error")) + log = frappe.log_error("Redisearch Error") log_link = frappe.utils.get_link_to_form("Error Log", log.name) frappe.throw( diff --git a/erpnext/education/__init__.py b/erpnext/education/__init__.py deleted file mode 100644 index f6f84b3730..0000000000 --- a/erpnext/education/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -import frappe -from frappe import _ - - -class StudentNotInGroupError(frappe.ValidationError): - pass - - -def validate_student_belongs_to_group(student, student_group): - groups = frappe.db.get_all("Student Group Student", ["parent"], dict(student=student, active=1)) - if not student_group in [d.parent for d in groups]: - frappe.throw( - _("Student {0} does not belong to group {1}").format( - frappe.bold(student), frappe.bold(student_group) - ), - StudentNotInGroupError, - ) diff --git a/erpnext/education/api.py b/erpnext/education/api.py deleted file mode 100644 index 8fd1725b2d..0000000000 --- a/erpnext/education/api.py +++ /dev/null @@ -1,444 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import json - -import frappe -from frappe import _ -from frappe.email.doctype.email_group.email_group import add_subscribers -from frappe.model.mapper import get_mapped_doc -from frappe.utils import cstr, flt, getdate - - -def get_course(program): - """Return list of courses for a particular program - :param program: Program - """ - courses = frappe.db.sql( - """select course, course_name from `tabProgram Course` where parent=%s""", (program), as_dict=1 - ) - return courses - - -@frappe.whitelist() -def enroll_student(source_name): - """Creates a Student Record and returns a Program Enrollment. - - :param source_name: Student Applicant. - """ - frappe.publish_realtime("enroll_student_progress", {"progress": [1, 4]}, user=frappe.session.user) - student = get_mapped_doc( - "Student Applicant", - source_name, - {"Student Applicant": {"doctype": "Student", "field_map": {"name": "student_applicant"}}}, - ignore_permissions=True, - ) - student.save() - - student_applicant = frappe.db.get_value( - "Student Applicant", source_name, ["student_category", "program"], as_dict=True - ) - program_enrollment = frappe.new_doc("Program Enrollment") - program_enrollment.student = student.name - program_enrollment.student_category = student_applicant.student_category - program_enrollment.student_name = student.title - program_enrollment.program = student_applicant.program - frappe.publish_realtime("enroll_student_progress", {"progress": [2, 4]}, user=frappe.session.user) - return program_enrollment - - -@frappe.whitelist() -def check_attendance_records_exist(course_schedule=None, student_group=None, date=None): - """Check if Attendance Records are made against the specified Course Schedule or Student Group for given date. - - :param course_schedule: Course Schedule. - :param student_group: Student Group. - :param date: Date. - """ - if course_schedule: - return frappe.get_list("Student Attendance", filters={"course_schedule": course_schedule}) - else: - return frappe.get_list( - "Student Attendance", filters={"student_group": student_group, "date": date} - ) - - -@frappe.whitelist() -def mark_attendance( - students_present, students_absent, course_schedule=None, student_group=None, date=None -): - """Creates Multiple Attendance Records. - - :param students_present: Students Present JSON. - :param students_absent: Students Absent JSON. - :param course_schedule: Course Schedule. - :param student_group: Student Group. - :param date: Date. - """ - - if student_group: - academic_year = frappe.db.get_value("Student Group", student_group, "academic_year") - if academic_year: - year_start_date, year_end_date = frappe.db.get_value( - "Academic Year", academic_year, ["year_start_date", "year_end_date"] - ) - if getdate(date) < getdate(year_start_date) or getdate(date) > getdate(year_end_date): - frappe.throw( - _("Attendance cannot be marked outside of Academic Year {0}").format(academic_year) - ) - - present = json.loads(students_present) - absent = json.loads(students_absent) - - for d in present: - make_attendance_records( - d["student"], d["student_name"], "Present", course_schedule, student_group, date - ) - - for d in absent: - make_attendance_records( - d["student"], d["student_name"], "Absent", course_schedule, student_group, date - ) - - frappe.db.commit() - frappe.msgprint(_("Attendance has been marked successfully.")) - - -def make_attendance_records( - student, student_name, status, course_schedule=None, student_group=None, date=None -): - """Creates/Update Attendance Record. - - :param student: Student. - :param student_name: Student Name. - :param course_schedule: Course Schedule. - :param status: Status (Present/Absent) - """ - student_attendance = frappe.get_doc( - { - "doctype": "Student Attendance", - "student": student, - "course_schedule": course_schedule, - "student_group": student_group, - "date": date, - } - ) - if not student_attendance: - student_attendance = frappe.new_doc("Student Attendance") - student_attendance.student = student - student_attendance.student_name = student_name - student_attendance.course_schedule = course_schedule - student_attendance.student_group = student_group - student_attendance.date = date - student_attendance.status = status - student_attendance.save() - student_attendance.submit() - - -@frappe.whitelist() -def get_student_guardians(student): - """Returns List of Guardians of a Student. - - :param student: Student. - """ - guardians = frappe.get_all("Student Guardian", fields=["guardian"], filters={"parent": student}) - return guardians - - -@frappe.whitelist() -def get_student_group_students(student_group, include_inactive=0): - """Returns List of student, student_name in Student Group. - - :param student_group: Student Group. - """ - if include_inactive: - students = frappe.get_all( - "Student Group Student", - fields=["student", "student_name"], - filters={"parent": student_group}, - order_by="group_roll_number", - ) - else: - students = frappe.get_all( - "Student Group Student", - fields=["student", "student_name"], - filters={"parent": student_group, "active": 1}, - order_by="group_roll_number", - ) - return students - - -@frappe.whitelist() -def get_fee_structure(program, academic_term=None): - """Returns Fee Structure. - - :param program: Program. - :param academic_term: Academic Term. - """ - fee_structure = frappe.db.get_values( - "Fee Structure", {"program": program, "academic_term": academic_term}, "name", as_dict=True - ) - return fee_structure[0].name if fee_structure else None - - -@frappe.whitelist() -def get_fee_components(fee_structure): - """Returns Fee Components. - - :param fee_structure: Fee Structure. - """ - if fee_structure: - fs = frappe.get_all( - "Fee Component", - fields=["fees_category", "description", "amount"], - filters={"parent": fee_structure}, - order_by="idx", - ) - return fs - - -@frappe.whitelist() -def get_fee_schedule(program, student_category=None): - """Returns Fee Schedule. - - :param program: Program. - :param student_category: Student Category - """ - fs = frappe.get_all( - "Program Fee", - fields=["academic_term", "fee_structure", "due_date", "amount"], - filters={"parent": program, "student_category": student_category}, - order_by="idx", - ) - return fs - - -@frappe.whitelist() -def collect_fees(fees, amt): - paid_amount = flt(amt) + flt(frappe.db.get_value("Fees", fees, "paid_amount")) - total_amount = flt(frappe.db.get_value("Fees", fees, "total_amount")) - frappe.db.set_value("Fees", fees, "paid_amount", paid_amount) - frappe.db.set_value("Fees", fees, "outstanding_amount", (total_amount - paid_amount)) - return paid_amount - - -@frappe.whitelist() -def get_course_schedule_events(start, end, filters=None): - """Returns events for Course Schedule Calendar view rendering. - - :param start: Start date-time. - :param end: End date-time. - :param filters: Filters (JSON). - """ - from frappe.desk.calendar import get_event_conditions - - conditions = get_event_conditions("Course Schedule", filters) - - data = frappe.db.sql( - """select name, course, color, - timestamp(schedule_date, from_time) as from_time, - timestamp(schedule_date, to_time) as to_time, - room, student_group, 0 as 'allDay' - from `tabCourse Schedule` - where ( schedule_date between %(start)s and %(end)s ) - {conditions}""".format( - conditions=conditions - ), - {"start": start, "end": end}, - as_dict=True, - update={"allDay": 0}, - ) - - return data - - -@frappe.whitelist() -def get_assessment_criteria(course): - """Returns Assessmemt Criteria and their Weightage from Course Master. - - :param Course: Course - """ - return frappe.get_all( - "Course Assessment Criteria", - fields=["assessment_criteria", "weightage"], - filters={"parent": course}, - order_by="idx", - ) - - -@frappe.whitelist() -def get_assessment_students(assessment_plan, student_group): - student_list = get_student_group_students(student_group) - for i, student in enumerate(student_list): - result = get_result(student.student, assessment_plan) - if result: - student_result = {} - for d in result.details: - student_result.update({d.assessment_criteria: [cstr(d.score), d.grade]}) - student_result.update( - {"total_score": [cstr(result.total_score), result.grade], "comment": result.comment} - ) - student.update( - {"assessment_details": student_result, "docstatus": result.docstatus, "name": result.name} - ) - else: - student.update({"assessment_details": None}) - return student_list - - -@frappe.whitelist() -def get_assessment_details(assessment_plan): - """Returns Assessment Criteria and Maximum Score from Assessment Plan Master. - - :param Assessment Plan: Assessment Plan - """ - return frappe.get_all( - "Assessment Plan Criteria", - fields=["assessment_criteria", "maximum_score", "docstatus"], - filters={"parent": assessment_plan}, - order_by="idx", - ) - - -@frappe.whitelist() -def get_result(student, assessment_plan): - """Returns Submitted Result of given student for specified Assessment Plan - - :param Student: Student - :param Assessment Plan: Assessment Plan - """ - results = frappe.get_all( - "Assessment Result", - filters={"student": student, "assessment_plan": assessment_plan, "docstatus": ("!=", 2)}, - ) - if results: - return frappe.get_doc("Assessment Result", results[0]) - else: - return None - - -@frappe.whitelist() -def get_grade(grading_scale, percentage): - """Returns Grade based on the Grading Scale and Score. - - :param Grading Scale: Grading Scale - :param Percentage: Score Percentage Percentage - """ - grading_scale_intervals = {} - if not hasattr(frappe.local, "grading_scale"): - grading_scale = frappe.get_all( - "Grading Scale Interval", fields=["grade_code", "threshold"], filters={"parent": grading_scale} - ) - frappe.local.grading_scale = grading_scale - for d in frappe.local.grading_scale: - grading_scale_intervals.update({d.threshold: d.grade_code}) - intervals = sorted(grading_scale_intervals.keys(), key=float, reverse=True) - for interval in intervals: - if flt(percentage) >= interval: - grade = grading_scale_intervals.get(interval) - break - else: - grade = "" - return grade - - -@frappe.whitelist() -def mark_assessment_result(assessment_plan, scores): - student_score = json.loads(scores) - assessment_details = [] - for criteria in student_score.get("assessment_details"): - assessment_details.append( - {"assessment_criteria": criteria, "score": flt(student_score["assessment_details"][criteria])} - ) - assessment_result = get_assessment_result_doc(student_score["student"], assessment_plan) - assessment_result.update( - { - "student": student_score.get("student"), - "assessment_plan": assessment_plan, - "comment": student_score.get("comment"), - "total_score": student_score.get("total_score"), - "details": assessment_details, - } - ) - assessment_result.save() - details = {} - for d in assessment_result.details: - details.update({d.assessment_criteria: d.grade}) - assessment_result_dict = { - "name": assessment_result.name, - "student": assessment_result.student, - "total_score": assessment_result.total_score, - "grade": assessment_result.grade, - "details": details, - } - return assessment_result_dict - - -@frappe.whitelist() -def submit_assessment_results(assessment_plan, student_group): - total_result = 0 - student_list = get_student_group_students(student_group) - for i, student in enumerate(student_list): - doc = get_result(student.student, assessment_plan) - if doc and doc.docstatus == 0: - total_result += 1 - doc.submit() - return total_result - - -def get_assessment_result_doc(student, assessment_plan): - assessment_result = frappe.get_all( - "Assessment Result", - filters={"student": student, "assessment_plan": assessment_plan, "docstatus": ("!=", 2)}, - ) - if assessment_result: - doc = frappe.get_doc("Assessment Result", assessment_result[0]) - if doc.docstatus == 0: - return doc - elif doc.docstatus == 1: - frappe.msgprint(_("Result already Submitted")) - return None - else: - return frappe.new_doc("Assessment Result") - - -@frappe.whitelist() -def update_email_group(doctype, name): - if not frappe.db.exists("Email Group", name): - email_group = frappe.new_doc("Email Group") - email_group.title = name - email_group.save() - email_list = [] - students = [] - if doctype == "Student Group": - students = get_student_group_students(name) - for stud in students: - for guard in get_student_guardians(stud.student): - email = frappe.db.get_value("Guardian", guard.guardian, "email_address") - if email: - email_list.append(email) - add_subscribers(name, email_list) - - -@frappe.whitelist() -def get_current_enrollment(student, academic_year=None): - current_academic_year = academic_year or frappe.defaults.get_defaults().academic_year - program_enrollment_list = frappe.db.sql( - """ - select - name as program_enrollment, student_name, program, student_batch_name as student_batch, - student_category, academic_term, academic_year - from - `tabProgram Enrollment` - where - student = %s and academic_year = %s - order by creation""", - (student, current_academic_year), - as_dict=1, - ) - - if program_enrollment_list: - return program_enrollment_list[0] - else: - return None diff --git a/erpnext/education/dashboard_chart/course_wise_enrollment/course_wise_enrollment.json b/erpnext/education/dashboard_chart/course_wise_enrollment/course_wise_enrollment.json deleted file mode 100644 index 9c5f784648..0000000000 --- a/erpnext/education/dashboard_chart/course_wise_enrollment/course_wise_enrollment.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "based_on": "", - "chart_name": "Course wise Enrollment", - "chart_type": "Group By", - "creation": "2020-07-23 18:24:38.214220", - "docstatus": 0, - "doctype": "Dashboard Chart", - "document_type": "Course Enrollment", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Course Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false]]", - "group_by_based_on": "course", - "group_by_type": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "last_synced_on": "2020-07-27 17:50:32.490587", - "modified": "2020-07-27 17:54:09.829206", - "modified_by": "Administrator", - "module": "Education", - "name": "Course wise Enrollment", - "number_of_groups": 0, - "owner": "Administrator", - "source": "", - "time_interval": "Yearly", - "timeseries": 0, - "timespan": "Last Year", - "type": "Percentage", - "use_report_chart": 0, - "value_based_on": "", - "y_axis": [] -} \ No newline at end of file diff --git a/erpnext/education/dashboard_chart/course_wise_student_count/course_wise_student_count.json b/erpnext/education/dashboard_chart/course_wise_student_count/course_wise_student_count.json deleted file mode 100644 index 5441518def..0000000000 --- a/erpnext/education/dashboard_chart/course_wise_student_count/course_wise_student_count.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "based_on": "", - "chart_name": "Course wise Student Count", - "chart_type": "Group By", - "creation": "2020-07-27 17:24:39.136163", - "docstatus": 0, - "doctype": "Dashboard Chart", - "document_type": "Course Enrollment", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Course Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false]]", - "group_by_based_on": "course", - "group_by_type": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "last_synced_on": "2020-07-27 17:24:56.184236", - "modified": "2020-07-27 17:25:46.232846", - "modified_by": "Administrator", - "module": "Education", - "name": "Course wise Student Count", - "number_of_groups": 0, - "owner": "Administrator", - "source": "", - "time_interval": "Yearly", - "timeseries": 0, - "timespan": "Last Year", - "type": "Donut", - "use_report_chart": 0, - "value_based_on": "", - "y_axis": [] -} \ No newline at end of file diff --git a/erpnext/education/dashboard_chart/instructor_gender_diversity_ratio/instructor_gender_diversity_ratio.json b/erpnext/education/dashboard_chart/instructor_gender_diversity_ratio/instructor_gender_diversity_ratio.json deleted file mode 100644 index b7ee509b92..0000000000 --- a/erpnext/education/dashboard_chart/instructor_gender_diversity_ratio/instructor_gender_diversity_ratio.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "based_on": "", - "chart_name": "Instructor Gender Diversity Ratio", - "chart_type": "Group By", - "creation": "2020-07-23 18:35:02.544019", - "docstatus": 0, - "doctype": "Dashboard Chart", - "document_type": "Instructor", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Instructor\",\"status\",\"=\",\"Active\",false]]", - "group_by_based_on": "gender", - "group_by_type": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "last_synced_on": "2020-07-27 17:50:32.783820", - "modified": "2020-07-27 17:55:41.595260", - "modified_by": "Administrator", - "module": "Education", - "name": "Instructor Gender Diversity Ratio", - "number_of_groups": 0, - "owner": "Administrator", - "source": "", - "time_interval": "Yearly", - "timeseries": 0, - "timespan": "Last Year", - "type": "Donut", - "use_report_chart": 0, - "value_based_on": "", - "y_axis": [] -} \ No newline at end of file diff --git a/erpnext/education/dashboard_chart/program_enrollments/program_enrollments.json b/erpnext/education/dashboard_chart/program_enrollments/program_enrollments.json deleted file mode 100644 index 2a4a4a3e0c..0000000000 --- a/erpnext/education/dashboard_chart/program_enrollments/program_enrollments.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "based_on": "enrollment_date", - "chart_name": "Program Enrollments", - "chart_type": "Count", - "creation": "2020-07-23 18:27:53.641616", - "docstatus": 0, - "doctype": "Dashboard Chart", - "document_type": "Program Enrollment", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Program Enrollment\",\"docstatus\",\"=\",\"1\",false]]", - "group_by_type": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "last_synced_on": "2020-07-27 17:50:32.203069", - "modified": "2020-07-27 17:51:59.022909", - "modified_by": "Administrator", - "module": "Education", - "name": "Program Enrollments", - "number_of_groups": 0, - "owner": "Administrator", - "source": "", - "time_interval": "Daily", - "timeseries": 1, - "timespan": "Last Month", - "type": "Line", - "use_report_chart": 0, - "value_based_on": "", - "y_axis": [] -} \ No newline at end of file diff --git a/erpnext/education/dashboard_chart/program_wise_enrollment/program_wise_enrollment.json b/erpnext/education/dashboard_chart/program_wise_enrollment/program_wise_enrollment.json deleted file mode 100644 index 2ba138e332..0000000000 --- a/erpnext/education/dashboard_chart/program_wise_enrollment/program_wise_enrollment.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "based_on": "", - "chart_name": "Program wise Enrollment", - "chart_type": "Group By", - "creation": "2020-07-23 18:23:45.192748", - "docstatus": 0, - "doctype": "Dashboard Chart", - "document_type": "Program Enrollment", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Program Enrollment\",\"docstatus\",\"=\",\"1\",false],[\"Program Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false]]", - "group_by_based_on": "program", - "group_by_type": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "last_synced_on": "2020-07-27 17:50:32.629321", - "modified": "2020-07-27 17:53:36.269098", - "modified_by": "Administrator", - "module": "Education", - "name": "Program wise Enrollment", - "number_of_groups": 0, - "owner": "Administrator", - "source": "", - "time_interval": "Yearly", - "timeseries": 0, - "timespan": "Last Year", - "type": "Percentage", - "use_report_chart": 0, - "value_based_on": "", - "y_axis": [] -} \ No newline at end of file diff --git a/erpnext/education/dashboard_chart/program_wise_fee_collection/program_wise_fee_collection.json b/erpnext/education/dashboard_chart/program_wise_fee_collection/program_wise_fee_collection.json deleted file mode 100644 index 38c1b6d7f3..0000000000 --- a/erpnext/education/dashboard_chart/program_wise_fee_collection/program_wise_fee_collection.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "chart_name": "Program wise Fee Collection", - "chart_type": "Report", - "creation": "2020-08-05 16:19:53.398335", - "custom_options": "", - "docstatus": 0, - "doctype": "Dashboard Chart", - "dynamic_filters_json": "{\"from_date\":\"frappe.datetime.add_months(frappe.datetime.get_today(), -1)\",\"to_date\":\"frappe.datetime.nowdate()\"}", - "filters_json": "{}", - "group_by_type": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "modified": "2020-08-05 16:20:47.436847", - "modified_by": "Administrator", - "module": "Education", - "name": "Program wise Fee Collection", - "number_of_groups": 0, - "owner": "Administrator", - "report_name": "Program wise Fee Collection", - "time_interval": "Yearly", - "timeseries": 0, - "timespan": "Last Year", - "type": "Bar", - "use_report_chart": 1, - "x_field": "", - "y_axis": [] -} \ No newline at end of file diff --git a/erpnext/education/dashboard_chart/student_category_wise_program_enrollments/student_category_wise_program_enrollments.json b/erpnext/education/dashboard_chart/student_category_wise_program_enrollments/student_category_wise_program_enrollments.json deleted file mode 100644 index 88871457ec..0000000000 --- a/erpnext/education/dashboard_chart/student_category_wise_program_enrollments/student_category_wise_program_enrollments.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "based_on": "", - "chart_name": "Student Category wise Program Enrollments", - "chart_type": "Group By", - "creation": "2020-07-27 17:37:47.116446", - "docstatus": 0, - "doctype": "Dashboard Chart", - "document_type": "Program Enrollment", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Program Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false],[\"Program Enrollment\",\"docstatus\",\"=\",\"1\",false]]", - "group_by_based_on": "student_category", - "group_by_type": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "last_synced_on": "2020-07-27 17:46:54.901911", - "modified": "2020-07-27 17:47:21.370866", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Category wise Program Enrollments", - "number_of_groups": 0, - "owner": "Administrator", - "source": "", - "time_interval": "Yearly", - "timeseries": 0, - "timespan": "Last Year", - "type": "Donut", - "use_report_chart": 0, - "value_based_on": "", - "y_axis": [] -} \ No newline at end of file diff --git a/erpnext/education/dashboard_chart/student_gender_diversity_ratio/student_gender_diversity_ratio.json b/erpnext/education/dashboard_chart/student_gender_diversity_ratio/student_gender_diversity_ratio.json deleted file mode 100644 index ce602d29ee..0000000000 --- a/erpnext/education/dashboard_chart/student_gender_diversity_ratio/student_gender_diversity_ratio.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "based_on": "", - "chart_name": "Student Gender Diversity Ratio", - "chart_type": "Group By", - "creation": "2020-07-23 18:12:15.972123", - "docstatus": 0, - "doctype": "Dashboard Chart", - "document_type": "Student", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Student\",\"enabled\",\"=\",1,false]]", - "group_by_based_on": "gender", - "group_by_type": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "modified": "2020-07-23 18:12:21.606772", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Gender Diversity Ratio", - "number_of_groups": 0, - "owner": "Administrator", - "source": "", - "time_interval": "Yearly", - "timeseries": 0, - "timespan": "Last Year", - "type": "Donut", - "use_report_chart": 0, - "value_based_on": "", - "y_axis": [] -} \ No newline at end of file diff --git a/erpnext/education/doctype/__init__.py b/erpnext/education/doctype/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/academic_term/__init__.py b/erpnext/education/doctype/academic_term/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/academic_term/academic_term.js b/erpnext/education/doctype/academic_term/academic_term.js deleted file mode 100644 index 26d66f0b2b..0000000000 --- a/erpnext/education/doctype/academic_term/academic_term.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Academic Term', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/academic_term/academic_term.json b/erpnext/education/doctype/academic_term/academic_term.json deleted file mode 100644 index 06c5b1acfc..0000000000 --- a/erpnext/education/doctype/academic_term/academic_term.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:title", - "beta": 0, - "creation": "2015-09-08 17:19:19.158228", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 0, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_year", - "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": 1, - "label": "Academic Year", - "length": 0, - "no_copy": 0, - "options": "Academic Year", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "term_name", - "fieldtype": "Data", - "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": "Term Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "term_start_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Term Start Date", - "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": 1, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "term_end_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Term End Date", - "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": 1, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "title", - "fieldtype": "Data", - "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": "Title", - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2017-11-10 19:05:58.567627", - "modified_by": "Administrator", - "module": "Education", - "name": "Academic Term", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "name", - "sort_order": "DESC", - "title_field": "title", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/academic_term/academic_term.py b/erpnext/education/doctype/academic_term/academic_term.py deleted file mode 100644 index b44fe99a30..0000000000 --- a/erpnext/education/doctype/academic_term/academic_term.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import getdate - - -class AcademicTerm(Document): - def autoname(self): - self.name = self.academic_year + " ({})".format(self.term_name) if self.term_name else "" - - def validate(self): - # Check if entry with same academic_year and the term_name already exists - validate_duplication(self) - self.title = self.academic_year + " ({})".format(self.term_name) if self.term_name else "" - - # Check that start of academic year is earlier than end of academic year - if ( - self.term_start_date - and self.term_end_date - and getdate(self.term_start_date) > getdate(self.term_end_date) - ): - frappe.throw( - _( - "The Term End Date cannot be earlier than the Term Start Date. Please correct the dates and try again." - ) - ) - - # Check that the start of the term is not before the start of the academic year - # and end of term is not after the end of the academic year""" - - year = frappe.get_doc("Academic Year", self.academic_year) - if ( - self.term_start_date - and getdate(year.year_start_date) - and (getdate(self.term_start_date) < getdate(year.year_start_date)) - ): - frappe.throw( - _( - "The Term Start Date cannot be earlier than the Year Start Date of the Academic Year to which the term is linked (Academic Year {}). Please correct the dates and try again." - ).format(self.academic_year) - ) - - if ( - self.term_end_date - and getdate(year.year_end_date) - and (getdate(self.term_end_date) > getdate(year.year_end_date)) - ): - frappe.throw( - _( - "The Term End Date cannot be later than the Year End Date of the Academic Year to which the term is linked (Academic Year {}). Please correct the dates and try again." - ).format(self.academic_year) - ) - - -def validate_duplication(self): - term = frappe.db.sql( - """select name from `tabAcademic Term` where academic_year= %s and term_name= %s - and docstatus<2 and name != %s""", - (self.academic_year, self.term_name, self.name), - ) - if term: - frappe.throw( - _( - "An academic term with this 'Academic Year' {0} and 'Term Name' {1} already exists. Please modify these entries and try again." - ).format(self.academic_year, self.term_name) - ) diff --git a/erpnext/education/doctype/academic_term/academic_term_dashboard.py b/erpnext/education/doctype/academic_term/academic_term_dashboard.py deleted file mode 100644 index 348c04d3f6..0000000000 --- a/erpnext/education/doctype/academic_term/academic_term_dashboard.py +++ /dev/null @@ -1,13 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "fieldname": "academic_term", - "transactions": [ - {"label": _("Student"), "items": ["Student Applicant", "Student Group", "Student Log"]}, - {"label": _("Fee"), "items": ["Fees", "Fee Schedule", "Fee Structure"]}, - {"label": _("Program"), "items": ["Program Enrollment"]}, - {"label": _("Assessment"), "items": ["Assessment Plan", "Assessment Result"]}, - ], - } diff --git a/erpnext/education/doctype/academic_term/test_academic_term.py b/erpnext/education/doctype/academic_term/test_academic_term.py deleted file mode 100644 index b4516b3a42..0000000000 --- a/erpnext/education/doctype/academic_term/test_academic_term.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Academic Term') - - -class TestAcademicTerm(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/academic_term/test_records.json b/erpnext/education/doctype/academic_term/test_records.json deleted file mode 100644 index 6bd365561f..0000000000 --- a/erpnext/education/doctype/academic_term/test_records.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "doctype": "Academic Term", - "academic_year": "2014-2015", - "term_name": "_Test Academic Term" - }, - { - "doctype": "Academic Term", - "academic_year": "2014-2015", - "term_name": "_Test Academic Term 1" - }, - { - "doctype": "Academic Term", - "academic_year": "2014-2015", - "term_name": "_Test Academic Term 2" - }, - { - "doctype": "Academic Term", - "academic_year": "2017-2018", - "term_name": "_Test AT1" - }, - { - "doctype": "Academic Term", - "academic_year": "2017-2018", - "term_name": "_Test AT2" - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/academic_year/__init__.py b/erpnext/education/doctype/academic_year/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/academic_year/academic_year.js b/erpnext/education/doctype/academic_year/academic_year.js deleted file mode 100644 index 20e25281ff..0000000000 --- a/erpnext/education/doctype/academic_year/academic_year.js +++ /dev/null @@ -1,2 +0,0 @@ -frappe.ui.form.on("Academic Year", { -}); diff --git a/erpnext/education/doctype/academic_year/academic_year.json b/erpnext/education/doctype/academic_year/academic_year.json deleted file mode 100644 index 5df89a7682..0000000000 --- a/erpnext/education/doctype/academic_year/academic_year.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "field:academic_year_name", - "beta": 0, - "creation": "2015-09-07 12:49:51.303026", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 0, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_year_name", - "fieldtype": "Data", - "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": "Academic Year Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "year_start_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Year Start Date", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "year_end_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Year End Date", - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2017-11-10 19:06:08.123090", - "modified_by": "Administrator", - "module": "Education", - "name": "Academic Year", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/academic_year/academic_year.py b/erpnext/education/doctype/academic_year/academic_year.py deleted file mode 100644 index 2a0438b775..0000000000 --- a/erpnext/education/doctype/academic_year/academic_year.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document - - -class AcademicYear(Document): - def validate(self): - # Check that start of academic year is earlier than end of academic year - if self.year_start_date and self.year_end_date and self.year_start_date > self.year_end_date: - frappe.throw( - _( - "The Year End Date cannot be earlier than the Year Start Date. Please correct the dates and try again." - ) - ) diff --git a/erpnext/education/doctype/academic_year/academic_year_dashboard.py b/erpnext/education/doctype/academic_year/academic_year_dashboard.py deleted file mode 100644 index c69c97017a..0000000000 --- a/erpnext/education/doctype/academic_year/academic_year_dashboard.py +++ /dev/null @@ -1,16 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "fieldname": "academic_year", - "transactions": [ - { - "label": _("Student"), - "items": ["Student Admission", "Student Applicant", "Student Group", "Student Log"], - }, - {"label": _("Fee"), "items": ["Fees", "Fee Schedule", "Fee Structure"]}, - {"label": _("Academic Term and Program"), "items": ["Academic Term", "Program Enrollment"]}, - {"label": _("Assessment"), "items": ["Assessment Plan", "Assessment Result"]}, - ], - } diff --git a/erpnext/education/doctype/academic_year/test_academic_year.py b/erpnext/education/doctype/academic_year/test_academic_year.py deleted file mode 100644 index e51cd0e235..0000000000 --- a/erpnext/education/doctype/academic_year/test_academic_year.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Academic Year') - - -class TestAcademicYear(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/academic_year/test_records.json b/erpnext/education/doctype/academic_year/test_records.json deleted file mode 100644 index 5eb5e2e360..0000000000 --- a/erpnext/education/doctype/academic_year/test_records.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "doctype": "Academic Year", - "academic_year_name": "2014-2015" - }, - { - "doctype": "Academic Year", - "academic_year_name": "2015-2016" - }, - { - "doctype": "Academic Year", - "academic_year_name": "2016-2017" - }, - { - "doctype": "Academic Year", - "academic_year_name": "2017-2018" - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/article/__init__.py b/erpnext/education/doctype/article/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/article/article.js b/erpnext/education/doctype/article/article.js deleted file mode 100644 index 85b387f621..0000000000 --- a/erpnext/education/doctype/article/article.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Article', { - refresh: function(frm) { - if (!frm.doc.__islocal) { - frm.add_custom_button(__('Add to Topics'), function() { - frm.trigger('add_article_to_topics'); - }, __('Action')); - } - }, - - add_article_to_topics: function(frm) { - get_topics_without_article(frm.doc.name).then(r => { - if (r.message.length) { - frappe.prompt([ - { - fieldname: 'topics', - label: __('Topics'), - fieldtype: 'MultiSelectPills', - get_data: function() { - return r.message; - } - } - ], - function(data) { - frappe.call({ - method: 'erpnext.education.doctype.topic.topic.add_content_to_topics', - args: { - 'content_type': 'Article', - 'content': frm.doc.name, - 'topics': data.topics, - }, - callback: function(r) { - if (!r.exc) { - frm.reload_doc(); - } - }, - freeze: true, - freeze_message: __('...Adding Article to Topics') - }); - }, __('Add Article to Topics'), __('Add')); - } else { - frappe.msgprint(__('This article is already added to the existing topics')); - } - }); - } -}); - -let get_topics_without_article = function(article) { - return frappe.call({ - type: 'GET', - method: 'erpnext.education.doctype.article.article.get_topics_without_article', - args: {'article': article} - }); -}; diff --git a/erpnext/education/doctype/article/article.json b/erpnext/education/doctype/article/article.json deleted file mode 100644 index 2fad5af8d3..0000000000 --- a/erpnext/education/doctype/article/article.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:title", - "creation": "2018-10-17 05:45:38.471670", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "title", - "author", - "content", - "publish_date" - ], - "fields": [ - { - "fieldname": "title", - "fieldtype": "Data", - "label": "Title", - "unique": 1 - }, - { - "fieldname": "author", - "fieldtype": "Data", - "label": "Author" - }, - { - "fieldname": "content", - "fieldtype": "Text Editor", - "label": "Content" - }, - { - "fieldname": "publish_date", - "fieldtype": "Date", - "label": "Publish Date" - } - ], - "modified": "2019-06-12 12:36:58.740340", - "modified_by": "Administrator", - "module": "Education", - "name": "Article", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "share": 1, - "write": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "LMS User", - "share": 1 - } - ], - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/article/article.py b/erpnext/education/doctype/article/article.py deleted file mode 100644 index 12b6618e73..0000000000 --- a/erpnext/education/doctype/article/article.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe.model.document import Document - - -class Article(Document): - def get_article(self): - pass - - -@frappe.whitelist() -def get_topics_without_article(article): - data = [] - for entry in frappe.db.get_all("Topic"): - topic = frappe.get_doc("Topic", entry.name) - topic_contents = [tc.content for tc in topic.topic_content] - if not topic_contents or article not in topic_contents: - data.append(topic.name) - return data diff --git a/erpnext/education/doctype/article/test_article.py b/erpnext/education/doctype/article/test_article.py deleted file mode 100644 index 2ea5c82a8b..0000000000 --- a/erpnext/education/doctype/article/test_article.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestArticle(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/assessment_criteria/__init__.py b/erpnext/education/doctype/assessment_criteria/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/assessment_criteria/assessment_criteria.js b/erpnext/education/doctype/assessment_criteria/assessment_criteria.js deleted file mode 100644 index 44b9ca3d23..0000000000 --- a/erpnext/education/doctype/assessment_criteria/assessment_criteria.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Assessment Criteria', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/assessment_criteria/assessment_criteria.json b/erpnext/education/doctype/assessment_criteria/assessment_criteria.json deleted file mode 100644 index 9e228fd368..0000000000 --- a/erpnext/education/doctype/assessment_criteria/assessment_criteria.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "field:assessment_criteria", - "beta": 0, - "creation": "2016-12-14 16:40:15.144115", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "assessment_criteria", - "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": 0, - "label": "Assessment Criteria", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fieldname": "assessment_criteria_group", - "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": "Assessment Criteria Group", - "length": 0, - "no_copy": 0, - "options": "Assessment Criteria Group", - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2017-11-10 19:08:11.311304", - "modified_by": "Administrator", - "module": "Education", - "name": "Assessment Criteria", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/assessment_criteria/assessment_criteria.py b/erpnext/education/doctype/assessment_criteria/assessment_criteria.py deleted file mode 100644 index ef9692a8eb..0000000000 --- a/erpnext/education/doctype/assessment_criteria/assessment_criteria.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document - -STD_CRITERIA = ["total", "total score", "total grade", "maximum score", "score", "grade"] - - -class AssessmentCriteria(Document): - def validate(self): - if self.assessment_criteria.lower() in STD_CRITERIA: - frappe.throw(_("Can't create standard criteria. Please rename the criteria")) diff --git a/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.py b/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.py deleted file mode 100644 index 90ff575445..0000000000 --- a/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Assessment Criteria') - - -class TestAssessmentCriteria(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/assessment_criteria/test_records.json b/erpnext/education/doctype/assessment_criteria/test_records.json deleted file mode 100644 index 7af63b39f7..0000000000 --- a/erpnext/education/doctype/assessment_criteria/test_records.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "assessment_criteria": "_Test Assessment Criteria" - }, - { - "assessment_criteria": "_Test Assessment Criteria 1" - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/assessment_criteria_group/__init__.py b/erpnext/education/doctype/assessment_criteria_group/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.js b/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.js deleted file mode 100644 index 89358d210f..0000000000 --- a/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Assessment Criteria Group', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.json b/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.json deleted file mode 100644 index 5765b4b3f7..0000000000 --- a/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:assessment_criteria_group", - "beta": 0, - "creation": "2017-01-27 15:17:38.855910", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "assessment_criteria_group", - "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": 0, - "label": "Assessment Criteria Group", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2017-11-10 19:11:45.334917", - "modified_by": "Administrator", - "module": "Education", - "name": "Assessment Criteria Group", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.py b/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.py deleted file mode 100644 index d284db595c..0000000000 --- a/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class AssessmentCriteriaGroup(Document): - pass diff --git a/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.py b/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.py deleted file mode 100644 index b52aef8381..0000000000 --- a/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Assessment Criteria Group') - - -class TestAssessmentCriteriaGroup(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/assessment_group/__init__.py b/erpnext/education/doctype/assessment_group/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/assessment_group/assessment_group.js b/erpnext/education/doctype/assessment_group/assessment_group.js deleted file mode 100644 index 6be51023ab..0000000000 --- a/erpnext/education/doctype/assessment_group/assessment_group.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Assessment Group', { - onload: function(frm) { - frm.list_route = "Tree/Assessment Group"; - } -}); diff --git a/erpnext/education/doctype/assessment_group/assessment_group.json b/erpnext/education/doctype/assessment_group/assessment_group.json deleted file mode 100644 index a8ffaf43f0..0000000000 --- a/erpnext/education/doctype/assessment_group/assessment_group.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:assessment_group_name", - "creation": "2016-08-04 04:42:48.319388", - "doctype": "DocType", - "editable_grid": 1, - "field_order": [ - "assessment_group_name", - "is_group", - "section_break_2", - "parent_assessment_group", - "lft", - "rgt", - "old_parent" - ], - "fields": [ - { - "fieldname": "assessment_group_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Assessment Group Name", - "reqd": 1, - "unique": 1 - }, - { - "default": "0", - "fieldname": "is_group", - "fieldtype": "Check", - "label": "Is Group" - }, - { - "fieldname": "section_break_2", - "fieldtype": "Section Break", - "hidden": 1 - }, - { - "fieldname": "parent_assessment_group", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Parent Assessment Group", - "options": "Assessment Group", - "reqd": 1 - }, - { - "fieldname": "lft", - "fieldtype": "Int", - "label": "lft" - }, - { - "fieldname": "rgt", - "fieldtype": "Int", - "label": "rgt" - }, - { - "fieldname": "old_parent", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "old_parent", - "options": "Assessment Group" - } - ], - "is_tree": 1, - "links": [], - "modified": "2020-03-18 18:01:14.710416", - "modified_by": "Administrator", - "module": "Education", - "name": "Assessment Group", - "nsm_parent_field": "parent_assessment_group", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/education/doctype/assessment_group/assessment_group.py b/erpnext/education/doctype/assessment_group/assessment_group.py deleted file mode 100644 index d606ffb41a..0000000000 --- a/erpnext/education/doctype/assessment_group/assessment_group.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class AssessmentGroup(Document): - pass diff --git a/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py b/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py deleted file mode 100644 index 7c75100b70..0000000000 --- a/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from frappe import _ - - -def get_data(): - return { - "fieldname": "assessment_group", - "transactions": [{"label": _("Assessment"), "items": ["Assessment Plan", "Assessment Result"]}], - } diff --git a/erpnext/education/doctype/assessment_group/assessment_group_tree.js b/erpnext/education/doctype/assessment_group/assessment_group_tree.js deleted file mode 100644 index e0dfaa31fd..0000000000 --- a/erpnext/education/doctype/assessment_group/assessment_group_tree.js +++ /dev/null @@ -1,3 +0,0 @@ -frappe.treeview_settings["Assessment Group"] = { - -} diff --git a/erpnext/education/doctype/assessment_group/test_assessment_group.py b/erpnext/education/doctype/assessment_group/test_assessment_group.py deleted file mode 100644 index 6f05caae94..0000000000 --- a/erpnext/education/doctype/assessment_group/test_assessment_group.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Assessment Group') - - -class TestAssessmentGroup(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/assessment_plan/__init__.py b/erpnext/education/doctype/assessment_plan/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/assessment_plan/assessment_plan.js b/erpnext/education/doctype/assessment_plan/assessment_plan.js deleted file mode 100644 index cf545c41af..0000000000 --- a/erpnext/education/doctype/assessment_plan/assessment_plan.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - - -frappe.ui.form.on('Assessment Plan', { - onload: function(frm) { - frm.set_query('assessment_group', function(doc, cdt, cdn) { - return{ - filters: { - 'is_group': 0 - } - }; - }); - frm.set_query('grading_scale', function(){ - return { - filters: { - docstatus: 1 - } - }; - }); - }, - - refresh: function(frm) { - if (frm.doc.docstatus == 1) { - frm.add_custom_button(__('Assessment Result Tool'), function() { - frappe.route_options = { - assessment_plan: frm.doc.name, - student_group: frm.doc.student_group - } - frappe.set_route('Form', 'Assessment Result Tool'); - }, __('Tools')); - } - - frm.set_query('course', function() { - return { - query: 'erpnext.education.doctype.program_enrollment.program_enrollment.get_program_courses', - filters: { - 'program': frm.doc.program - } - }; - }); - - frm.set_query('academic_term', function() { - return { - filters: { - 'academic_year': frm.doc.academic_year - } - }; - }); - }, - - course: function(frm) { - if (frm.doc.course && frm.doc.maximum_assessment_score) { - frappe.call({ - method: 'erpnext.education.api.get_assessment_criteria', - args: { - course: frm.doc.course - }, - callback: function(r) { - if (r.message) { - frm.doc.assessment_criteria = []; - $.each(r.message, function(i, d) { - var row = frappe.model.add_child(frm.doc, 'Assessment Plan Criteria', 'assessment_criteria'); - row.assessment_criteria = d.assessment_criteria; - row.maximum_score = d.weightage / 100 * frm.doc.maximum_assessment_score; - }); - } - refresh_field('assessment_criteria'); - - } - }); - } - }, - - maximum_assessment_score: function(frm) { - frm.trigger('course'); - } -}); diff --git a/erpnext/education/doctype/assessment_plan/assessment_plan.json b/erpnext/education/doctype/assessment_plan/assessment_plan.json deleted file mode 100644 index 5066fdf391..0000000000 --- a/erpnext/education/doctype/assessment_plan/assessment_plan.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "autoname": "EDU-ASP-.YYYY.-.#####", - "creation": "2015-11-12 16:34:34.658092", - "doctype": "DocType", - "document_type": "Setup", - "engine": "InnoDB", - "field_order": [ - "student_group", - "assessment_name", - "assessment_group", - "grading_scale", - "column_break_2", - "program", - "course", - "academic_year", - "academic_term", - "section_break_5", - "schedule_date", - "room", - "examiner", - "examiner_name", - "column_break_4", - "from_time", - "to_time", - "supervisor", - "supervisor_name", - "section_break_20", - "maximum_assessment_score", - "assessment_criteria", - "amended_from" - ], - "fields": [ - { - "fieldname": "student_group", - "fieldtype": "Link", - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Student Group", - "options": "Student Group", - "reqd": 1 - }, - { - "fieldname": "assessment_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Assessment Name" - }, - { - "fieldname": "assessment_group", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Assessment Group", - "options": "Assessment Group", - "reqd": 1 - }, - { - "fetch_from": "course.default_grading_scale", - "fetch_if_empty": 1, - "fieldname": "grading_scale", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Grading Scale", - "options": "Grading Scale", - "reqd": 1 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "fetch_from": "student_group.course", - "fetch_if_empty": 1, - "fieldname": "course", - "fieldtype": "Link", - "in_global_search": 1, - "in_standard_filter": 1, - "label": "Course", - "options": "Course", - "reqd": 1 - }, - { - "fetch_from": "student_group.program", - "fieldname": "program", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Program", - "options": "Program" - }, - { - "fetch_from": "student_group.academic_year", - "fieldname": "academic_year", - "fieldtype": "Link", - "label": "Academic Year", - "options": "Academic Year" - }, - { - "fetch_from": "student_group.academic_term", - "fieldname": "academic_term", - "fieldtype": "Link", - "label": "Academic Term", - "options": "Academic Term" - }, - { - "fieldname": "section_break_5", - "fieldtype": "Section Break", - "label": "Schedule" - }, - { - "default": "Today", - "fieldname": "schedule_date", - "fieldtype": "Date", - "in_list_view": 1, - "label": "Schedule Date", - "no_copy": 1, - "reqd": 1 - }, - { - "fieldname": "room", - "fieldtype": "Link", - "label": "Room", - "options": "Room" - }, - { - "fieldname": "examiner", - "fieldtype": "Link", - "label": "Examiner", - "options": "Instructor" - }, - { - "fetch_from": "examiner.instructor_name", - "fieldname": "examiner_name", - "fieldtype": "Data", - "label": "Examiner Name", - "read_only": 1 - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fieldname": "from_time", - "fieldtype": "Time", - "label": "From Time", - "no_copy": 1, - "reqd": 1 - }, - { - "fieldname": "to_time", - "fieldtype": "Time", - "label": "To Time", - "no_copy": 1, - "reqd": 1 - }, - { - "fieldname": "supervisor", - "fieldtype": "Link", - "label": "Supervisor", - "options": "Instructor" - }, - { - "fetch_from": "supervisor.instructor_name", - "fieldname": "supervisor_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Supervisor Name", - "read_only": 1 - }, - { - "fieldname": "section_break_20", - "fieldtype": "Section Break", - "label": "Evaluate" - }, - { - "fieldname": "maximum_assessment_score", - "fieldtype": "Float", - "label": "Maximum Assessment Score", - "reqd": 1 - }, - { - "fieldname": "assessment_criteria", - "fieldtype": "Table", - "label": "Assessment Criteria", - "options": "Assessment Plan Criteria", - "reqd": 1 - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Assessment Plan", - "print_hide": 1, - "read_only": 1 - } - ], - "is_submittable": 1, - "links": [], - "modified": "2020-10-23 15:55:35.076251", - "modified_by": "Administrator", - "module": "Education", - "name": "Assessment Plan", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "assessment_name" -} \ No newline at end of file diff --git a/erpnext/education/doctype/assessment_plan/assessment_plan.py b/erpnext/education/doctype/assessment_plan/assessment_plan.py deleted file mode 100644 index e1265b4208..0000000000 --- a/erpnext/education/doctype/assessment_plan/assessment_plan.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document - - -class AssessmentPlan(Document): - def validate(self): - self.validate_overlap() - self.validate_max_score() - self.validate_assessment_criteria() - - def validate_overlap(self): - """Validates overlap for Student Group, Instructor, Room""" - - from erpnext.education.utils import validate_overlap_for - - # Validate overlapping course schedules. - if self.student_group: - validate_overlap_for(self, "Course Schedule", "student_group") - - validate_overlap_for(self, "Course Schedule", "instructor") - validate_overlap_for(self, "Course Schedule", "room") - - # validate overlapping assessment schedules. - if self.student_group: - validate_overlap_for(self, "Assessment Plan", "student_group") - - validate_overlap_for(self, "Assessment Plan", "room") - validate_overlap_for(self, "Assessment Plan", "supervisor", self.supervisor) - - def validate_max_score(self): - max_score = 0 - for d in self.assessment_criteria: - max_score += d.maximum_score - if self.maximum_assessment_score != max_score: - frappe.throw( - _("Sum of Scores of Assessment Criteria needs to be {0}.").format( - self.maximum_assessment_score - ) - ) - - def validate_assessment_criteria(self): - assessment_criteria_list = frappe.db.sql_list( - """ select apc.assessment_criteria - from `tabAssessment Plan` ap , `tabAssessment Plan Criteria` apc - where ap.name = apc.parent and ap.course=%s and ap.student_group=%s and ap.assessment_group=%s - and ap.name != %s and ap.docstatus=1""", - (self.course, self.student_group, self.assessment_group, self.name), - ) - for d in self.assessment_criteria: - if d.assessment_criteria in assessment_criteria_list: - frappe.throw( - _("You have already assessed for the assessment criteria {}.").format( - frappe.bold(d.assessment_criteria) - ) - ) diff --git a/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py b/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py deleted file mode 100644 index f9c583a80f..0000000000 --- a/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from frappe import _ - - -def get_data(): - return { - "fieldname": "assessment_plan", - "transactions": [{"label": _("Assessment"), "items": ["Assessment Result"]}], - "reports": [{"label": _("Report"), "items": ["Assessment Plan Status"]}], - } diff --git a/erpnext/education/doctype/assessment_plan/test_assessment_plan.py b/erpnext/education/doctype/assessment_plan/test_assessment_plan.py deleted file mode 100644 index e294c50ce4..0000000000 --- a/erpnext/education/doctype/assessment_plan/test_assessment_plan.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Assessment Plan') - - -class TestAssessmentPlan(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/assessment_plan_criteria/__init__.py b/erpnext/education/doctype/assessment_plan_criteria/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.json b/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.json deleted file mode 100644 index d9ad0cb952..0000000000 --- a/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "", - "beta": 0, - "creation": "2016-12-14 17:20:27.738226", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "assessment_criteria", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Assessment Criteria", - "length": 0, - "no_copy": 0, - "options": "Assessment Criteria", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "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, - "label": "", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "maximum_score", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Maximum Score", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-10 19:10:50.560006", - "modified_by": "Administrator", - "module": "Education", - "name": "Assessment Plan Criteria", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.py b/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.py deleted file mode 100644 index 2cd17d6b95..0000000000 --- a/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class AssessmentPlanCriteria(Document): - pass diff --git a/erpnext/education/doctype/assessment_result/__init__.py b/erpnext/education/doctype/assessment_result/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/assessment_result/assessment_result.js b/erpnext/education/doctype/assessment_result/assessment_result.js deleted file mode 100644 index b6d28817b5..0000000000 --- a/erpnext/education/doctype/assessment_result/assessment_result.js +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Assessment Result', { - refresh: function(frm) { - if (!frm.doc.__islocal) { - frm.trigger('setup_chart'); - } - - frm.get_field('details').grid.cannot_add_rows = true; - - frm.set_query('course', function() { - return { - query: 'erpnext.education.doctype.program_enrollment.program_enrollment.get_program_courses', - filters: { - 'program': frm.doc.program - } - }; - }); - - frm.set_query('academic_term', function() { - return { - filters: { - 'academic_year': frm.doc.academic_year - } - }; - }); - }, - - onload: function(frm) { - frm.set_query('assessment_plan', function() { - return { - filters: { - docstatus: 1 - } - }; - }); - }, - - assessment_plan: function(frm) { - if (frm.doc.assessment_plan) { - frappe.call({ - method: 'erpnext.education.api.get_assessment_details', - args: { - assessment_plan: frm.doc.assessment_plan - }, - callback: function(r) { - if (r.message) { - frappe.model.clear_table(frm.doc, 'details'); - $.each(r.message, function(i, d) { - var row = frm.add_child('details'); - row.assessment_criteria = d.assessment_criteria; - row.maximum_score = d.maximum_score; - }); - frm.refresh_field('details'); - } - } - }); - } - }, - - setup_chart: function(frm) { - let labels = []; - let maximum_scores = []; - let scores = []; - $.each(frm.doc.details, function(_i, e) { - labels.push(e.assessment_criteria); - maximum_scores.push(e.maximum_score); - scores.push(e.score); - }); - - if (labels.length && maximum_scores.length && scores.length) { - frm.dashboard.chart_area.empty().removeClass('hidden'); - new frappe.Chart('.form-graph', { - title: 'Assessment Results', - data: { - labels: labels, - datasets: [ - { - name: 'Maximum Score', - chartType: 'bar', - values: maximum_scores, - }, - { - name: 'Score Obtained', - chartType: 'bar', - values: scores, - } - ] - }, - colors: ['#4CA746', '#98D85B'], - type: 'bar' - }); - } - } -}); - -frappe.ui.form.on('Assessment Result Detail', { - score: function(frm, cdt, cdn) { - var d = locals[cdt][cdn]; - - if (!d.maximum_score || !frm.doc.grading_scale) { - d.score = ''; - frappe.throw(__('Please fill in all the details to generate Assessment Result.')); - } - - if (d.score > d.maximum_score) { - frappe.throw(__('Score cannot be greater than Maximum Score')); - } - else { - frappe.call({ - method: 'erpnext.education.api.get_grade', - args: { - grading_scale: frm.doc.grading_scale, - percentage: ((d.score/d.maximum_score) * 100) - }, - callback: function(r) { - if (r.message) { - frappe.model.set_value(cdt, cdn, 'grade', r.message); - } - } - }); - } - } -}); diff --git a/erpnext/education/doctype/assessment_result/assessment_result.json b/erpnext/education/doctype/assessment_result/assessment_result.json deleted file mode 100644 index 7a893aabb8..0000000000 --- a/erpnext/education/doctype/assessment_result/assessment_result.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "autoname": "EDU-RES-.YYYY.-.#####", - "creation": "2015-11-13 17:18:06.468332", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "assessment_plan", - "program", - "course", - "academic_year", - "academic_term", - "column_break_3", - "student", - "student_name", - "student_group", - "assessment_group", - "grading_scale", - "section_break_5", - "details", - "section_break_8", - "maximum_score", - "column_break_11", - "total_score", - "grade", - "section_break_13", - "comment", - "amended_from" - ], - "fields": [ - { - "fieldname": "assessment_plan", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Assessment Plan", - "options": "Assessment Plan", - "reqd": 1 - }, - { - "fetch_from": "assessment_plan.program", - "fieldname": "program", - "fieldtype": "Link", - "label": "Program", - "options": "Program" - }, - { - "fetch_from": "assessment_plan.course", - "fieldname": "course", - "fieldtype": "Link", - "label": "Course", - "options": "Course" - }, - { - "fetch_from": "assessment_plan.academic_year", - "fieldname": "academic_year", - "fieldtype": "Link", - "label": "Academic Year", - "options": "Academic Year" - }, - { - "fetch_from": "assessment_plan.academic_term", - "fieldname": "academic_term", - "fieldtype": "Link", - "label": "Academic Term", - "options": "Academic Term" - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "student", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Student", - "options": "Student", - "reqd": 1 - }, - { - "fetch_from": "student.title", - "fieldname": "student_name", - "fieldtype": "Data", - "in_global_search": 1, - "in_list_view": 1, - "label": "Student Name", - "read_only": 1 - }, - { - "fetch_from": "assessment_plan.student_group", - "fieldname": "student_group", - "fieldtype": "Link", - "label": "Student Group", - "options": "Student Group" - }, - { - "fetch_from": "assessment_plan.assessment_group", - "fieldname": "assessment_group", - "fieldtype": "Link", - "label": "Assessment Group", - "options": "Assessment Group" - }, - { - "fetch_from": "assessment_plan.grading_scale", - "fieldname": "grading_scale", - "fieldtype": "Link", - "label": "Grading Scale", - "options": "Grading Scale", - "read_only": 1 - }, - { - "fieldname": "section_break_5", - "fieldtype": "Section Break", - "label": "Result" - }, - { - "fieldname": "details", - "fieldtype": "Table", - "label": "Details", - "options": "Assessment Result Detail", - "reqd": 1 - }, - { - "fieldname": "section_break_8", - "fieldtype": "Section Break" - }, - { - "fetch_from": "assessment_plan.maximum_assessment_score", - "fieldname": "maximum_score", - "fieldtype": "Float", - "label": "Maximum Score", - "read_only": 1 - }, - { - "fetch_from": "assessment_plan.maximum_assessment_score", - "fieldname": "column_break_11", - "fieldtype": "Column Break" - }, - { - "fieldname": "total_score", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Total Score", - "read_only": 1 - }, - { - "fieldname": "grade", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Grade", - "read_only": 1 - }, - { - "fieldname": "section_break_13", - "fieldtype": "Section Break", - "label": "Summary" - }, - { - "fieldname": "comment", - "fieldtype": "Small Text", - "label": "Comment" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Assessment Result", - "print_hide": 1, - "read_only": 1 - } - ], - "is_submittable": 1, - "links": [], - "modified": "2020-08-03 11:47:54.119486", - "modified_by": "Administrator", - "module": "Education", - "name": "Assessment Result", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "student_name" -} \ No newline at end of file diff --git a/erpnext/education/doctype/assessment_result/assessment_result.py b/erpnext/education/doctype/assessment_result/assessment_result.py deleted file mode 100644 index 1d485c139e..0000000000 --- a/erpnext/education/doctype/assessment_result/assessment_result.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import flt -from frappe.utils.csvutils import getlink - -import erpnext.education -from erpnext.education.api import get_assessment_details, get_grade - - -class AssessmentResult(Document): - def validate(self): - erpnext.education.validate_student_belongs_to_group(self.student, self.student_group) - self.validate_maximum_score() - self.validate_grade() - self.validate_duplicate() - - def validate_maximum_score(self): - assessment_details = get_assessment_details(self.assessment_plan) - max_scores = {} - for d in assessment_details: - max_scores.update({d.assessment_criteria: d.maximum_score}) - - for d in self.details: - d.maximum_score = max_scores.get(d.assessment_criteria) - if d.score > d.maximum_score: - frappe.throw(_("Score cannot be greater than Maximum Score")) - - def validate_grade(self): - self.total_score = 0.0 - for d in self.details: - d.grade = get_grade(self.grading_scale, (flt(d.score) / d.maximum_score) * 100) - self.total_score += d.score - self.grade = get_grade(self.grading_scale, (self.total_score / self.maximum_score) * 100) - - def validate_duplicate(self): - assessment_result = frappe.get_list( - "Assessment Result", - filters={ - "name": ("not in", [self.name]), - "student": self.student, - "assessment_plan": self.assessment_plan, - "docstatus": ("!=", 2), - }, - ) - if assessment_result: - frappe.throw( - _("Assessment Result record {0} already exists.").format( - getlink("Assessment Result", assessment_result[0].name) - ) - ) diff --git a/erpnext/education/doctype/assessment_result/assessment_result_dashboard.py b/erpnext/education/doctype/assessment_result/assessment_result_dashboard.py deleted file mode 100644 index 5501f9221a..0000000000 --- a/erpnext/education/doctype/assessment_result/assessment_result_dashboard.py +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from frappe import _ - - -def get_data(): - return { - "reports": [ - {"label": _("Reports"), "items": ["Final Assessment Grades", "Course wise Assessment Report"]} - ] - } diff --git a/erpnext/education/doctype/assessment_result/test_assessment_result.py b/erpnext/education/doctype/assessment_result/test_assessment_result.py deleted file mode 100644 index 4872f48eda..0000000000 --- a/erpnext/education/doctype/assessment_result/test_assessment_result.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -from erpnext.education.api import get_grade - -# test_records = frappe.get_test_records('Assessment Result') - - -class TestAssessmentResult(unittest.TestCase): - def test_grade(self): - grade = get_grade("_Test Grading Scale", 80) - self.assertEqual("A", grade) - - grade = get_grade("_Test Grading Scale", 70) - self.assertEqual("B", grade) diff --git a/erpnext/education/doctype/assessment_result_detail/__init__.py b/erpnext/education/doctype/assessment_result_detail/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.json b/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.json deleted file mode 100644 index 450f41cbbb..0000000000 --- a/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "actions": [], - "creation": "2016-12-14 17:44:35.583123", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "assessment_criteria", - "maximum_score", - "column_break_2", - "score", - "grade" - ], - "fields": [ - { - "columns": 4, - "fieldname": "assessment_criteria", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Assessment Criteria", - "options": "Assessment Criteria", - "read_only": 1, - "reqd": 1 - }, - { - "columns": 2, - "fieldname": "maximum_score", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Maximum Score", - "read_only": 1 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "columns": 2, - "fieldname": "score", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Score", - "reqd": 1 - }, - { - "columns": 2, - "fieldname": "grade", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Grade", - "read_only": 1 - } - ], - "istable": 1, - "links": [], - "modified": "2020-07-31 13:27:17.699022", - "modified_by": "Administrator", - "module": "Education", - "name": "Assessment Result Detail", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.py b/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.py deleted file mode 100644 index 5ef11297eb..0000000000 --- a/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class AssessmentResultDetail(Document): - pass diff --git a/erpnext/education/doctype/assessment_result_tool/__init__.py b/erpnext/education/doctype/assessment_result_tool/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.js b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.js deleted file mode 100644 index 053f0c2f1b..0000000000 --- a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.js +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - - -frappe.ui.form.on('Assessment Result Tool', { - setup: function(frm) { - frm.add_fetch("assessment_plan", "student_group", "student_group"); - }, - - refresh: function(frm) { - if (frappe.route_options) { - frm.set_value("student_group", frappe.route_options.student_group); - frm.set_value("assessment_plan", frappe.route_options.assessment_plan); - frappe.route_options = null; - } else { - frm.trigger("assessment_plan"); - } - frm.disable_save(); - frm.page.clear_indicator(); - }, - - assessment_plan: function(frm) { - frm.doc.show_submit = false; - if(frm.doc.assessment_plan) { - if (!frm.doc.student_group) - return - frappe.call({ - method: "erpnext.education.api.get_assessment_students", - args: { - "assessment_plan": frm.doc.assessment_plan, - "student_group": frm.doc.student_group - }, - callback: function(r) { - if (r.message) { - frm.doc.students = r.message; - frm.events.render_table(frm); - for (let value of r.message) { - if (!value.docstatus) { - frm.doc.show_submit = true; - break; - } - } - frm.events.submit_result(frm); - } - } - }); - } - }, - - render_table: function(frm) { - $(frm.fields_dict.result_html.wrapper).empty(); - let assessment_plan = frm.doc.assessment_plan; - frappe.call({ - method: "erpnext.education.api.get_assessment_details", - args: { - assessment_plan: assessment_plan - }, - callback: function(r) { - frm.events.get_marks(frm, r.message); - } - }); - }, - - get_marks: function(frm, criteria_list) { - let max_total_score = 0; - criteria_list.forEach(function(c) { - max_total_score += c.maximum_score - }); - var result_table = $(frappe.render_template('assessment_result_tool', { - frm: frm, - students: frm.doc.students, - criteria: criteria_list, - max_total_score: max_total_score - })); - result_table.appendTo(frm.fields_dict.result_html.wrapper); - - result_table.on('change', 'input', function(e) { - let $input = $(e.target); - let student = $input.data().student; - let max_score = $input.data().maxScore; - let value = $input.val(); - if(value < 0) { - $input.val(0); - } else if(value > max_score) { - $input.val(max_score); - } - let total_score = 0; - let student_scores = {}; - student_scores["assessment_details"] = {} - result_table.find(`input[data-student=${student}].student-result-data`) - .each(function(el, input) { - let $input = $(input); - let criteria = $input.data().criteria; - let value = parseFloat($input.val()); - if (!Number.isNaN(value)) { - student_scores["assessment_details"][criteria] = value; - } - total_score += value; - }); - if(!Number.isNaN(total_score)) { - result_table.find(`span[data-student=${student}].total-score`).html(total_score); - } - if (Object.keys(student_scores["assessment_details"]).length === criteria_list.length) { - student_scores["student"] = student; - student_scores["total_score"] = total_score; - result_table.find(`[data-student=${student}].result-comment`) - .each(function(el, input){ - student_scores["comment"] = $(input).val(); - }); - frappe.call({ - method: "erpnext.education.api.mark_assessment_result", - args: { - "assessment_plan": frm.doc.assessment_plan, - "scores": student_scores - }, - callback: function(r) { - let assessment_result = r.message; - if (!frm.doc.show_submit) { - frm.doc.show_submit = true; - frm.events.submit_result; - } - for (var criteria of Object.keys(assessment_result.details)) { - result_table.find(`[data-criteria=${criteria}][data-student=${assessment_result - .student}].student-result-grade`).each(function(e1, input) { - $(input).html(assessment_result.details[criteria]); - }); - } - result_table.find(`span[data-student=${assessment_result.student}].total-score-grade`).html(assessment_result.grade); - let link_span = result_table.find(`span[data-student=${assessment_result.student}].total-result-link`); - $(link_span).css("display", "block"); - $(link_span).find("a").attr("href", "/app/assessment-result/"+assessment_result.name); - } - }); - } - }); - }, - - submit_result: function(frm) { - if (frm.doc.show_submit) { - frm.page.set_primary_action(__("Submit"), function() { - frappe.call({ - method: "erpnext.education.api.submit_assessment_results", - args: { - "assessment_plan": frm.doc.assessment_plan, - "student_group": frm.doc.student_group - }, - callback: function(r) { - if (r.message) { - frappe.msgprint(__("{0} Result submittted", [r.message])); - } else { - frappe.msgprint(__("No Result to submit")); - } - frm.events.assessment_plan(frm); - } - }); - }); - } - else { - frm.page.clear_primary_action(); - } - } -}); diff --git a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.json b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.json deleted file mode 100644 index ddef100ff5..0000000000 --- a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "allow_copy": 1, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-01-05 12:27:48.951036", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "fieldname": "assessment_plan", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Assessment Plan", - "length": 0, - "no_copy": 0, - "options": "Assessment Plan", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_group", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Student Group", - "length": 0, - "no_copy": 0, - "options": "Student Group", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "assessment_plan", - "fieldname": "section_break_5", - "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, - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "result_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": "Result HTML", - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 1, - "hide_toolbar": 1, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "max_attachments": 0, - "modified": "2017-12-27 09:36:37.155890", - "modified_by": "Administrator", - "module": "Education", - "name": "Assessment Result Tool", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Academics User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Instructor", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.py b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.py deleted file mode 100644 index 4b953bec15..0000000000 --- a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class AssessmentResultTool(Document): - pass diff --git a/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.py b/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.py deleted file mode 100644 index 49e0be08f0..0000000000 --- a/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestAssessmentResultTool(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/content_activity/__init__.py b/erpnext/education/doctype/content_activity/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/content_activity/content_activity.json b/erpnext/education/doctype/content_activity/content_activity.json deleted file mode 100644 index b4c95dad9c..0000000000 --- a/erpnext/education/doctype/content_activity/content_activity.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-10-16 03:55:53.283893", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "content", - "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": "Content", - "length": 0, - "no_copy": 0, - "options": "Content", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "content.content_type", - "fieldname": "content_type", - "fieldtype": "Data", - "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": "Content Type", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "last_activity", - "fieldtype": "Datetime", - "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": "Last Activity ", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-10-16 03:55:58.202436", - "modified_by": "Administrator", - "module": "Education", - "name": "Content Activity", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/content_activity/content_activity.py b/erpnext/education/doctype/content_activity/content_activity.py deleted file mode 100644 index f30cb87a9e..0000000000 --- a/erpnext/education/doctype/content_activity/content_activity.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class ContentActivity(Document): - pass diff --git a/erpnext/education/doctype/content_question/__init__.py b/erpnext/education/doctype/content_question/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/content_question/content_question.js b/erpnext/education/doctype/content_question/content_question.js deleted file mode 100644 index 7615f5efcf..0000000000 --- a/erpnext/education/doctype/content_question/content_question.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Content Question', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/content_question/content_question.json b/erpnext/education/doctype/content_question/content_question.json deleted file mode 100644 index d390e8ef70..0000000000 --- a/erpnext/education/doctype/content_question/content_question.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-10-15 14:35:40.728454", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "question_link", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Question Link", - "length": 0, - "no_copy": 0, - "options": "Question", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-10-15 14:41:31.729083", - "modified_by": "Administrator", - "module": "Education", - "name": "Content Question", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/content_question/content_question.py b/erpnext/education/doctype/content_question/content_question.py deleted file mode 100644 index f52f0c85d3..0000000000 --- a/erpnext/education/doctype/content_question/content_question.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class ContentQuestion(Document): - pass diff --git a/erpnext/education/doctype/content_question/test_content_question.py b/erpnext/education/doctype/content_question/test_content_question.py deleted file mode 100644 index 63a5a96700..0000000000 --- a/erpnext/education/doctype/content_question/test_content_question.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestContentQuestion(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/course/__init__.py b/erpnext/education/doctype/course/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/course/course.js b/erpnext/education/doctype/course/course.js deleted file mode 100644 index bd8d62c8d2..0000000000 --- a/erpnext/education/doctype/course/course.js +++ /dev/null @@ -1,79 +0,0 @@ -frappe.ui.form.on('Course', { - refresh: function(frm) { - if (!cur_frm.doc.__islocal) { - frm.add_custom_button(__('Add to Programs'), function() { - frm.trigger('add_course_to_programs') - }, __('Action')); - } - - frm.set_query('default_grading_scale', function(){ - return { - filters: { - docstatus: 1 - } - } - }); - }, - - add_course_to_programs: function(frm) { - get_programs_without_course(frm.doc.name).then(r => { - if (r.message.length) { - frappe.prompt([ - { - fieldname: 'programs', - label: __('Programs'), - fieldtype: 'MultiSelectPills', - get_data: function() { - return r.message; - } - }, - { - fieldtype: 'Check', - label: __('Is Mandatory'), - fieldname: 'mandatory', - } - ], - function(data) { - frappe.call({ - method: 'erpnext.education.doctype.course.course.add_course_to_programs', - args: { - 'course': frm.doc.name, - 'programs': data.programs, - 'mandatory': data.mandatory - }, - callback: function(r) { - if (!r.exc) { - frm.reload_doc(); - } - }, - freeze: true, - freeze_message: __('...Adding Course to Programs') - }) - }, __('Add Course to Programs'), __('Add')); - } else { - frappe.msgprint(__('This course is already added to the existing programs')); - } - }); - } -}); - -frappe.ui.form.on('Course Topic', { - topics_add: function(frm){ - frm.fields_dict['topics'].grid.get_field('topic').get_query = function(doc){ - var topics_list = []; - if(!doc.__islocal) topics_list.push(doc.name); - $.each(doc.topics, function(idx, val){ - if (val.topic) topics_list.push(val.topic); - }); - return { filters: [['Topic', 'name', 'not in', topics_list]] }; - }; - } -}); - -let get_programs_without_course = function(course) { - return frappe.call({ - type: 'GET', - method: 'erpnext.education.doctype.course.course.get_programs_without_course', - args: {'course': course} - }); -} diff --git a/erpnext/education/doctype/course/course.json b/erpnext/education/doctype/course/course.json deleted file mode 100644 index da10db1857..0000000000 --- a/erpnext/education/doctype/course/course.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:course_name", - "creation": "2015-09-07 12:39:55.181893", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "course_name", - "department", - "section_break_6", - "topics", - "description", - "hero_image", - "assessment", - "default_grading_scale", - "assessment_criteria" - ], - "fields": [ - { - "fieldname": "course_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Course Name", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "department", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Department", - "options": "Department" - }, - { - "fieldname": "section_break_6", - "fieldtype": "Section Break", - "label": "Portal Settings" - }, - { - "fieldname": "topics", - "fieldtype": "Table", - "label": "Topics", - "options": "Course Topic" - }, - { - "fieldname": "hero_image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Hero Image" - }, - { - "fieldname": "assessment", - "fieldtype": "Section Break", - "label": "Assessment" - }, - { - "fieldname": "default_grading_scale", - "fieldtype": "Link", - "label": "Default Grading Scale", - "options": "Grading Scale" - }, - { - "fieldname": "assessment_criteria", - "fieldtype": "Table", - "label": "Assessment Criteria", - "options": "Course Assessment Criteria" - }, - { - "fieldname": "description", - "fieldtype": "Small Text", - "label": "Description" - } - ], - "image_field": "hero_image", - "modified": "2020-03-29 12:50:27.677589", - "modified_by": "Administrator", - "module": "Education", - "name": "Course", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Administrator", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Education Manager", - "share": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "search_fields": "course_name", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/education/doctype/course/course.py b/erpnext/education/doctype/course/course.py deleted file mode 100644 index baf72e8cb7..0000000000 --- a/erpnext/education/doctype/course/course.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import json - -import frappe -from frappe import _ -from frappe.model.document import Document - - -class Course(Document): - def validate(self): - self.validate_assessment_criteria() - - def validate_assessment_criteria(self): - if self.assessment_criteria: - total_weightage = 0 - for criteria in self.assessment_criteria: - total_weightage += criteria.weightage or 0 - if total_weightage != 100: - frappe.throw(_("Total Weightage of all Assessment Criteria must be 100%")) - - def get_topics(self): - topic_data = [] - for topic in self.topics: - topic_doc = frappe.get_doc("Topic", topic.topic) - if topic_doc.topic_content: - topic_data.append(topic_doc) - return topic_data - - -@frappe.whitelist() -def add_course_to_programs(course, programs, mandatory=False): - programs = json.loads(programs) - for entry in programs: - program = frappe.get_doc("Program", entry) - program.append("courses", {"course": course, "course_name": course, "mandatory": mandatory}) - program.flags.ignore_mandatory = True - program.save() - frappe.db.commit() - frappe.msgprint( - _("Course {0} has been added to all the selected programs successfully.").format( - frappe.bold(course) - ), - title=_("Programs updated"), - indicator="green", - ) - - -@frappe.whitelist() -def get_programs_without_course(course): - data = [] - for entry in frappe.db.get_all("Program"): - program = frappe.get_doc("Program", entry.name) - courses = [c.course for c in program.courses] - if not courses or course not in courses: - data.append(program.name) - return data diff --git a/erpnext/education/doctype/course/course_dashboard.py b/erpnext/education/doctype/course/course_dashboard.py deleted file mode 100644 index 6ba4475079..0000000000 --- a/erpnext/education/doctype/course/course_dashboard.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from frappe import _ - - -def get_data(): - return { - "fieldname": "course", - "transactions": [ - { - "label": _("Program and Course"), - "items": ["Program", "Course Enrollment", "Course Schedule"], - }, - {"label": _("Student"), "items": ["Student Group"]}, - {"label": _("Assessment"), "items": ["Assessment Plan", "Assessment Result"]}, - ], - } diff --git a/erpnext/education/doctype/course/test_course.py b/erpnext/education/doctype/course/test_course.py deleted file mode 100644 index caddefef3e..0000000000 --- a/erpnext/education/doctype/course/test_course.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -import frappe - -from erpnext.education.doctype.topic.test_topic import make_topic, make_topic_and_linked_content - -# test_records = frappe.get_test_records('Course') - - -class TestCourse(unittest.TestCase): - def setUp(self): - make_topic_and_linked_content("_Test Topic 1", [{"type": "Article", "name": "_Test Article 1"}]) - make_topic_and_linked_content("_Test Topic 2", [{"type": "Article", "name": "_Test Article 2"}]) - make_course_and_linked_topic("_Test Course 1", ["_Test Topic 1", "_Test Topic 2"]) - - def test_get_topics(self): - course = frappe.get_doc("Course", "_Test Course 1") - topics = course.get_topics() - self.assertEqual(topics[0].name, "_Test Topic 1") - self.assertEqual(topics[1].name, "_Test Topic 2") - frappe.db.rollback() - - -def make_course(name): - try: - course = frappe.get_doc("Course", name) - except frappe.DoesNotExistError: - course = frappe.get_doc({"doctype": "Course", "course_name": name, "course_code": name}).insert() - return course.name - - -def make_course_and_linked_topic(course_name, topic_name_list): - try: - course = frappe.get_doc("Course", course_name) - except frappe.DoesNotExistError: - make_course(course_name) - course = frappe.get_doc("Course", course_name) - topic_list = [make_topic(topic_name) for topic_name in topic_name_list] - for topic in topic_list: - course.append("topics", {"topic": topic}) - course.save() - return course diff --git a/erpnext/education/doctype/course/test_records.json b/erpnext/education/doctype/course/test_records.json deleted file mode 100644 index 1e7467aed2..0000000000 --- a/erpnext/education/doctype/course/test_records.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "course_name": "TC100", - "course_abbreviation": "TC" - }, - { - "course_name": "TC101", - "course_abbreviation": "TC1" - }, - { - "course_name": "TC102", - "course_abbreviation": "TC2" - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/course_activity/__init__.py b/erpnext/education/doctype/course_activity/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/course_activity/course_activity.js b/erpnext/education/doctype/course_activity/course_activity.js deleted file mode 100644 index 5115fc415e..0000000000 --- a/erpnext/education/doctype/course_activity/course_activity.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Course Activity', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/course_activity/course_activity.json b/erpnext/education/doctype/course_activity/course_activity.json deleted file mode 100644 index 3e23c90da0..0000000000 --- a/erpnext/education/doctype/course_activity/course_activity.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "format:EDU-CA-{YYYY}-{#####}", - "beta": 1, - "creation": "2018-10-01 17:35:54.391413", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "enrollment", - "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": "Course Enrollment", - "length": 0, - "no_copy": 0, - "options": "Course Enrollment", - "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": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "enrollment.course", - "fieldname": "course", - "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": "Course", - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "enrollment.student", - "fieldname": "student", - "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": "Student", - "length": 0, - "no_copy": 0, - "options": "", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "content_type", - "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": "Content Type", - "length": 0, - "no_copy": 0, - "options": "\nArticle\nVideo", - "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": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "content", - "fieldtype": "Dynamic Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Content", - "length": 0, - "no_copy": 0, - "options": "content_type", - "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": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "activity_date", - "fieldtype": "Datetime", - "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": "Activity Date", - "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": 1, - "search_index": 0, - "set_only_once": 1, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-12-06 11:53:08.006123", - "modified_by": "Administrator", - "module": "Education", - "name": "Course Activity", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "export": 1, - "if_owner": 1, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "LMS User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 0 - }, - { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 0 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} diff --git a/erpnext/education/doctype/course_activity/course_activity.py b/erpnext/education/doctype/course_activity/course_activity.py deleted file mode 100644 index 784260d07c..0000000000 --- a/erpnext/education/doctype/course_activity/course_activity.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document - - -class CourseActivity(Document): - def validate(self): - self.check_if_enrolled() - - def check_if_enrolled(self): - if frappe.db.exists("Course Enrollment", self.enrollment): - return True - else: - frappe.throw(_("Course Enrollment {0} does not exists").format(self.enrollment)) diff --git a/erpnext/education/doctype/course_activity/test_course_activity.py b/erpnext/education/doctype/course_activity/test_course_activity.py deleted file mode 100644 index 677b60a845..0000000000 --- a/erpnext/education/doctype/course_activity/test_course_activity.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -import frappe - - -class TestCourseActivity(unittest.TestCase): - pass - - -def make_course_activity(enrollment, content_type, content): - activity = frappe.get_all( - "Course Activity", - filters={"enrollment": enrollment, "content_type": content_type, "content": content}, - ) - try: - activity = frappe.get_doc("Course Activity", activity[0]["name"]) - except (IndexError, frappe.DoesNotExistError): - activity = frappe.get_doc( - { - "doctype": "Course Activity", - "enrollment": enrollment, - "content_type": content_type, - "content": content, - "activity_date": frappe.utils.datetime.datetime.now(), - } - ).insert() - return activity diff --git a/erpnext/education/doctype/course_assessment_criteria/__init__.py b/erpnext/education/doctype/course_assessment_criteria/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.json b/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.json deleted file mode 100644 index 2d8c0b3441..0000000000 --- a/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "", - "beta": 0, - "creation": "2016-12-14 16:46:46.786353", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "assessment_criteria", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Assessment Criteria", - "length": 0, - "no_copy": 0, - "options": "Assessment Criteria", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "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, - "label": "", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "weightage", - "fieldtype": "Percent", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Weightage", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-10 19:10:44.710837", - "modified_by": "Administrator", - "module": "Education", - "name": "Course Assessment Criteria", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.py b/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.py deleted file mode 100644 index 4223741f03..0000000000 --- a/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class CourseAssessmentCriteria(Document): - pass diff --git a/erpnext/education/doctype/course_content/__init__.py b/erpnext/education/doctype/course_content/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/course_content/course_content.js b/erpnext/education/doctype/course_content/course_content.js deleted file mode 100644 index b9faf99aaf..0000000000 --- a/erpnext/education/doctype/course_content/course_content.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Course Content', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/course_content/course_content.json b/erpnext/education/doctype/course_content/course_content.json deleted file mode 100644 index 378e56005f..0000000000 --- a/erpnext/education/doctype/course_content/course_content.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-10-01 13:04:09.313771", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "", - "fieldname": "content_type", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Content Type", - "length": 0, - "no_copy": 0, - "options": "\nArticle\nVideo\nQuiz", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "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, - "label": "", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "content", - "fieldtype": "Dynamic Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Content", - "length": 0, - "no_copy": 0, - "options": "content_type", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-10-17 07:36:04.029818", - "modified_by": "Administrator", - "module": "Education", - "name": "Course Content", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/course_content/course_content.py b/erpnext/education/doctype/course_content/course_content.py deleted file mode 100644 index abc370ecbe..0000000000 --- a/erpnext/education/doctype/course_content/course_content.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class CourseContent(Document): - pass diff --git a/erpnext/education/doctype/course_content/test_course_content.py b/erpnext/education/doctype/course_content/test_course_content.py deleted file mode 100644 index 49f042e865..0000000000 --- a/erpnext/education/doctype/course_content/test_course_content.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestCourseContent(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/course_enrollment/__init__.py b/erpnext/education/doctype/course_enrollment/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/course_enrollment/course_enrollment.js b/erpnext/education/doctype/course_enrollment/course_enrollment.js deleted file mode 100644 index b5d3cc56e5..0000000000 --- a/erpnext/education/doctype/course_enrollment/course_enrollment.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Course Enrollment', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/course_enrollment/course_enrollment.json b/erpnext/education/doctype/course_enrollment/course_enrollment.json deleted file mode 100644 index 6286ec1e66..0000000000 --- a/erpnext/education/doctype/course_enrollment/course_enrollment.json +++ /dev/null @@ -1,233 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "format:EDU-CE-{YYYY}-{#####}", - "beta": 1, - "creation": "2018-10-15 15:35:39.375161", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "program_enrollment", - "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": "Program Enrollment", - "length": 0, - "no_copy": 0, - "options": "Program Enrollment", - "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": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student", - "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": 1, - "label": "Student", - "length": 0, - "no_copy": 0, - "options": "Student", - "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": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "course", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Course", - "length": 0, - "no_copy": 0, - "options": "Course", - "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": 1, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "enrollment_date", - "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": "Enrollment Date", - "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": 1, - "search_index": 0, - "set_only_once": 1, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-11-25 18:59:01.742377", - "modified_by": "Administrator", - "module": "Education", - "name": "Course Enrollment", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "LMS User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 0 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/course_enrollment/course_enrollment.py b/erpnext/education/doctype/course_enrollment/course_enrollment.py deleted file mode 100644 index 18639b1178..0000000000 --- a/erpnext/education/doctype/course_enrollment/course_enrollment.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from functools import reduce - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import get_link_to_form - - -class CourseEnrollment(Document): - def validate(self): - self.validate_duplication() - - def get_progress(self, student): - """ - Returns Progress of given student for a particular course enrollment - - :param self: Course Enrollment Object - :param student: Student Object - """ - course = frappe.get_doc("Course", self.course) - topics = course.get_topics() - progress = [] - for topic in topics: - progress.append(student.get_topic_progress(self.name, topic)) - if progress: - return reduce(lambda x, y: x + y, progress) # Flatten out the List - else: - return [] - - def validate_duplication(self): - enrollment = frappe.db.exists( - "Course Enrollment", - { - "student": self.student, - "course": self.course, - "program_enrollment": self.program_enrollment, - "name": ("!=", self.name), - }, - ) - if enrollment: - frappe.throw( - _("Student is already enrolled via Course Enrollment {0}").format( - get_link_to_form("Course Enrollment", enrollment) - ), - title=_("Duplicate Entry"), - ) - - def add_quiz_activity(self, quiz_name, quiz_response, answers, score, status, time_taken): - result = {k: ("Correct" if v else "Wrong") for k, v in answers.items()} - result_data = [] - for key in answers: - item = {} - item["question"] = key - item["quiz_result"] = result[key] - try: - if not quiz_response[key]: - item["selected_option"] = "Unattempted" - elif isinstance(quiz_response[key], list): - item["selected_option"] = ", ".join( - frappe.get_value("Options", res, "option") for res in quiz_response[key] - ) - else: - item["selected_option"] = frappe.get_value("Options", quiz_response[key], "option") - except KeyError: - item["selected_option"] = "Unattempted" - result_data.append(item) - - quiz_activity = frappe.get_doc( - { - "doctype": "Quiz Activity", - "enrollment": self.name, - "quiz": quiz_name, - "activity_date": frappe.utils.datetime.datetime.now(), - "result": result_data, - "score": score, - "status": status, - "time_taken": time_taken, - } - ).insert(ignore_permissions=True) - - def add_activity(self, content_type, content): - activity = check_activity_exists(self.name, content_type, content) - if activity: - return activity - else: - activity = frappe.get_doc( - { - "doctype": "Course Activity", - "enrollment": self.name, - "content_type": content_type, - "content": content, - "activity_date": frappe.utils.datetime.datetime.now(), - } - ) - - activity.insert(ignore_permissions=True) - return activity.name - - -def check_activity_exists(enrollment, content_type, content): - activity = frappe.get_all( - "Course Activity", - filters={"enrollment": enrollment, "content_type": content_type, "content": content}, - ) - if activity: - return activity[0].name - else: - return None diff --git a/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py b/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py deleted file mode 100644 index 31a90fd5ad..0000000000 --- a/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from frappe import _ - - -def get_data(): - return { - "fieldname": "enrollment", - "transactions": [{"label": _("Activity"), "items": ["Course Activity", "Quiz Activity"]}], - } diff --git a/erpnext/education/doctype/course_enrollment/test_course_enrollment.py b/erpnext/education/doctype/course_enrollment/test_course_enrollment.py deleted file mode 100644 index 6862e058f0..0000000000 --- a/erpnext/education/doctype/course_enrollment/test_course_enrollment.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -import frappe - -from erpnext.education.doctype.course_activity.test_course_activity import make_course_activity -from erpnext.education.doctype.program.test_program import setup_program -from erpnext.education.doctype.student.test_student import create_student, get_student - - -class TestCourseEnrollment(unittest.TestCase): - def setUp(self): - setup_program() - student = create_student( - {"first_name": "_Test First", "last_name": "_Test Last", "email": "_test_student_1@example.com"} - ) - program_enrollment = student.enroll_in_program("_Test Program") - course_enrollment = frappe.db.get_value( - "Course Enrollment", - { - "course": "_Test Course 1", - "student": student.name, - "program_enrollment": program_enrollment.name, - }, - "name", - ) - make_course_activity(course_enrollment, "Article", "_Test Article 1-1") - - def test_get_progress(self): - student = get_student("_test_student_1@example.com") - program_enrollment_name = frappe.get_list( - "Program Enrollment", filters={"student": student.name, "Program": "_Test Program"} - )[0].name - course_enrollment_name = frappe.get_list( - "Course Enrollment", - filters={ - "student": student.name, - "course": "_Test Course 1", - "program_enrollment": program_enrollment_name, - }, - )[0].name - course_enrollment = frappe.get_doc("Course Enrollment", course_enrollment_name) - progress = course_enrollment.get_progress(student) - finished = {"content": "_Test Article 1-1", "content_type": "Article", "is_complete": True} - self.assertTrue(finished in progress) - frappe.db.rollback() - - def tearDown(self): - for entry in frappe.db.get_all("Course Enrollment"): - frappe.delete_doc("Course Enrollment", entry.name) - - for entry in frappe.db.get_all("Program Enrollment"): - doc = frappe.get_doc("Program Enrollment", entry.name) - doc.cancel() - doc.delete() diff --git a/erpnext/education/doctype/course_schedule/__init__.py b/erpnext/education/doctype/course_schedule/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/course_schedule/course_schedule.js b/erpnext/education/doctype/course_schedule/course_schedule.js deleted file mode 100644 index 366bbd8b0d..0000000000 --- a/erpnext/education/doctype/course_schedule/course_schedule.js +++ /dev/null @@ -1,16 +0,0 @@ -frappe.provide("education"); - -cur_frm.add_fetch("student_group", "course", "course") -frappe.ui.form.on("Course Schedule", { - refresh: function(frm) { - if (!frm.doc.__islocal) { - frm.add_custom_button(__("Mark Attendance"), function() { - frappe.route_options = { - based_on: "Course Schedule", - course_schedule: frm.doc.name - } - frappe.set_route("Form", "Student Attendance Tool"); - }).addClass("btn-primary"); - } - } -}); diff --git a/erpnext/education/doctype/course_schedule/course_schedule.json b/erpnext/education/doctype/course_schedule/course_schedule.json deleted file mode 100644 index 38d9b508f0..0000000000 --- a/erpnext/education/doctype/course_schedule/course_schedule.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2015-09-09 16:34:04.960369", - "doctype": "DocType", - "document_type": "Document", - "engine": "InnoDB", - "field_order": [ - "student_group", - "instructor", - "instructor_name", - "column_break_2", - "naming_series", - "course", - "color", - "section_break_6", - "schedule_date", - "room", - "column_break_9", - "from_time", - "to_time", - "title" - ], - "fields": [ - { - "fieldname": "student_group", - "fieldtype": "Link", - "in_global_search": 1, - "in_standard_filter": 1, - "label": "Student Group", - "options": "Student Group", - "reqd": 1 - }, - { - "fieldname": "instructor", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Instructor", - "options": "Instructor", - "reqd": 1 - }, - { - "fetch_from": "instructor.instructor_name", - "fieldname": "instructor_name", - "fieldtype": "Read Only", - "in_global_search": 1, - "label": "Instructor Name", - "read_only": 1 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Naming Series", - "options": "EDU-CSH-.YYYY.-", - "set_only_once": 1 - }, - { - "fieldname": "course", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Course", - "options": "Course", - "reqd": 1 - }, - { - "fieldname": "color", - "fieldtype": "Color", - "label": "Color", - "print_hide": 1 - }, - { - "fieldname": "section_break_6", - "fieldtype": "Section Break" - }, - { - "default": "Today", - "fieldname": "schedule_date", - "fieldtype": "Date", - "label": "Schedule Date" - }, - { - "fieldname": "room", - "fieldtype": "Link", - "label": "Room", - "options": "Room", - "reqd": 1 - }, - { - "fieldname": "column_break_9", - "fieldtype": "Column Break" - }, - { - "fieldname": "from_time", - "fieldtype": "Time", - "in_list_view": 1, - "label": "From Time", - "reqd": 1 - }, - { - "fieldname": "to_time", - "fieldtype": "Time", - "in_list_view": 1, - "label": "To Time", - "reqd": 1 - }, - { - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "label": "Title" - } - ], - "links": [], - "modified": "2021-11-24 11:57:08.164449", - "modified_by": "Administrator", - "module": "Education", - "name": "Course Schedule", - "naming_rule": "By \"Naming Series\" field", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "sort_field": "schedule_date", - "sort_order": "DESC", - "title_field": "title" -} \ No newline at end of file diff --git a/erpnext/education/doctype/course_schedule/course_schedule.py b/erpnext/education/doctype/course_schedule/course_schedule.py deleted file mode 100644 index d2b31f4e05..0000000000 --- a/erpnext/education/doctype/course_schedule/course_schedule.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -from datetime import datetime - -import frappe -from frappe import _ -from frappe.model.document import Document - - -class CourseSchedule(Document): - def validate(self): - self.instructor_name = frappe.db.get_value("Instructor", self.instructor, "instructor_name") - self.set_title() - self.validate_course() - self.validate_date() - self.validate_overlap() - - def set_title(self): - """Set document Title""" - self.title = ( - self.course + " by " + (self.instructor_name if self.instructor_name else self.instructor) - ) - - def validate_course(self): - group_based_on, course = frappe.db.get_value( - "Student Group", self.student_group, ["group_based_on", "course"] - ) - if group_based_on == "Course": - self.course = course - - def validate_date(self): - """Validates if from_time is greater than to_time""" - if self.from_time > self.to_time: - frappe.throw(_("From Time cannot be greater than To Time.")) - - """Handles specicfic case to update schedule date in calendar """ - if isinstance(self.from_time, str): - try: - datetime_obj = datetime.strptime(self.from_time, "%Y-%m-%d %H:%M:%S") - self.schedule_date = datetime_obj - except ValueError: - pass - - def validate_overlap(self): - """Validates overlap for Student Group, Instructor, Room""" - - from erpnext.education.utils import validate_overlap_for - - # Validate overlapping course schedules. - if self.student_group: - validate_overlap_for(self, "Course Schedule", "student_group") - - validate_overlap_for(self, "Course Schedule", "instructor") - validate_overlap_for(self, "Course Schedule", "room") - - # validate overlapping assessment schedules. - if self.student_group: - validate_overlap_for(self, "Assessment Plan", "student_group") - - validate_overlap_for(self, "Assessment Plan", "room") - validate_overlap_for(self, "Assessment Plan", "supervisor", self.instructor) diff --git a/erpnext/education/doctype/course_schedule/course_schedule_calendar.js b/erpnext/education/doctype/course_schedule/course_schedule_calendar.js deleted file mode 100644 index cacd539b22..0000000000 --- a/erpnext/education/doctype/course_schedule/course_schedule_calendar.js +++ /dev/null @@ -1,38 +0,0 @@ -frappe.views.calendar["Course Schedule"] = { - field_map: { - "start": "from_time", - "end": "to_time", - "id": "name", - "title": "course", - "allDay": "allDay", - }, - gantt: false, - order_by: "schedule_date", - filters: [ - { - "fieldtype": "Link", - "fieldname": "student_group", - "options": "Student Group", - "label": __("Student Group") - }, - { - "fieldtype": "Link", - "fieldname": "course", - "options": "Course", - "label": __("Course") - }, - { - "fieldtype": "Link", - "fieldname": "instructor", - "options": "Instructor", - "label": __("Instructor") - }, - { - "fieldtype": "Link", - "fieldname": "room", - "options": "Room", - "label": __("Room") - } - ], - get_events_method: "erpnext.education.api.get_course_schedule_events" -} diff --git a/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py b/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py deleted file mode 100644 index 76a3f04805..0000000000 --- a/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from frappe import _ - - -def get_data(): - return { - "fieldname": "course_schedule", - "transactions": [{"label": _("Attendance"), "items": ["Student Attendance"]}], - } diff --git a/erpnext/education/doctype/course_schedule/test_course_schedule.py b/erpnext/education/doctype/course_schedule/test_course_schedule.py deleted file mode 100644 index ac094645ba..0000000000 --- a/erpnext/education/doctype/course_schedule/test_course_schedule.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import datetime -import unittest - -import frappe -from frappe.utils import to_timedelta, today -from frappe.utils.data import add_to_date - -from erpnext.education.utils import OverlapError - -# test_records = frappe.get_test_records('Course Schedule') - - -class TestCourseSchedule(unittest.TestCase): - def test_student_group_conflict(self): - cs1 = make_course_schedule_test_record(simulate=True) - - cs2 = make_course_schedule_test_record( - schedule_date=cs1.schedule_date, - from_time=cs1.from_time, - to_time=cs1.to_time, - instructor="_Test Instructor 2", - room=frappe.get_all("Room")[1].name, - do_not_save=1, - ) - self.assertRaises(OverlapError, cs2.save) - - def test_instructor_conflict(self): - cs1 = make_course_schedule_test_record(simulate=True) - - cs2 = make_course_schedule_test_record( - from_time=cs1.from_time, - to_time=cs1.to_time, - student_group="Course-TC101-2014-2015 (_Test Academic Term)", - room=frappe.get_all("Room")[1].name, - do_not_save=1, - ) - self.assertRaises(OverlapError, cs2.save) - - def test_room_conflict(self): - cs1 = make_course_schedule_test_record(simulate=True) - - cs2 = make_course_schedule_test_record( - from_time=cs1.from_time, - to_time=cs1.to_time, - student_group="Course-TC101-2014-2015 (_Test Academic Term)", - instructor="_Test Instructor 2", - do_not_save=1, - ) - self.assertRaises(OverlapError, cs2.save) - - def test_no_conflict(self): - cs1 = make_course_schedule_test_record(simulate=True) - - make_course_schedule_test_record( - from_time=cs1.from_time, - to_time=cs1.to_time, - student_group="Course-TC102-2014-2015 (_Test Academic Term)", - instructor="_Test Instructor 2", - room=frappe.get_all("Room")[1].name, - ) - - def test_update_schedule_date(self): - doc = make_course_schedule_test_record(schedule_date=add_to_date(today(), days=1)) - doc.schedule_date = add_to_date(doc.schedule_date, days=1) - doc.save() - - -def make_course_schedule_test_record(**args): - args = frappe._dict(args) - - course_schedule = frappe.new_doc("Course Schedule") - course_schedule.student_group = ( - args.student_group or "Course-TC101-2014-2015 (_Test Academic Term)" - ) - course_schedule.course = args.course or "TC101" - course_schedule.instructor = args.instructor or "_Test Instructor" - course_schedule.room = args.room or frappe.get_all("Room")[0].name - - course_schedule.schedule_date = args.schedule_date or today() - course_schedule.from_time = args.from_time or to_timedelta("01:00:00") - course_schedule.to_time = args.to_time or course_schedule.from_time + datetime.timedelta(hours=1) - - if not args.do_not_save: - if args.simulate: - while True: - try: - course_schedule.save() - break - except OverlapError: - course_schedule.from_time = course_schedule.from_time + datetime.timedelta(minutes=10) - course_schedule.to_time = course_schedule.from_time + datetime.timedelta(hours=1) - else: - course_schedule.save() - - return course_schedule diff --git a/erpnext/education/doctype/course_scheduling_tool/__init__.py b/erpnext/education/doctype/course_scheduling_tool/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js deleted file mode 100644 index 7b0e4ab47c..0000000000 --- a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - - -frappe.ui.form.on('Course Scheduling Tool', { - setup(frm) { - frm.add_fetch('student_group', 'program', 'program'); - frm.add_fetch('student_group', 'course', 'course'); - frm.add_fetch('student_group', 'academic_year', 'academic_year'); - frm.add_fetch('student_group', 'academic_term', 'academic_term'); - }, - refresh(frm) { - frm.disable_save(); - frm.page.set_primary_action(__('Schedule Course'), () => { - frm.call('schedule_course') - .then(r => { - if (!r.message) { - frappe.throw(__('There were errors creating Course Schedule')); - } - const { course_schedules } = r.message; - if (course_schedules) { - const course_schedules_html = course_schedules.map(c => ` - - ${c.name} - ${c.schedule_date} - - `).join(''); - - const html = ` - - - - - ${course_schedules_html} - -
${__('Following course schedules were created')}
${__("Course")}${__("Date")}
- `; - - frappe.msgprint(html); - } - }); - }); - } -}); diff --git a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.json b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.json deleted file mode 100644 index 13dfe38eea..0000000000 --- a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "actions": [], - "allow_copy": 1, - "creation": "2015-09-23 15:37:38.108475", - "doctype": "DocType", - "document_type": "Setup", - "engine": "InnoDB", - "field_order": [ - "student_group", - "course", - "program", - "column_break_3", - "academic_year", - "academic_term", - "section_break_6", - "instructor", - "instructor_name", - "column_break_9", - "room", - "section_break_7", - "course_start_date", - "course_end_date", - "day", - "reschedule", - "column_break_15", - "from_time", - "to_time" - ], - "fields": [ - { - "fieldname": "student_group", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Student Group", - "options": "Student Group", - "reqd": 1 - }, - { - "fieldname": "course", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Course", - "options": "Course", - "reqd": 1 - }, - { - "fieldname": "program", - "fieldtype": "Link", - "label": "Program", - "options": "Program", - "read_only": 1 - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "academic_year", - "fieldtype": "Link", - "label": "Academic Year", - "options": "Academic Year", - "read_only": 1 - }, - { - "fieldname": "academic_term", - "fieldtype": "Link", - "label": "Academic Term", - "options": "Academic Term", - "read_only": 1 - }, - { - "fieldname": "section_break_6", - "fieldtype": "Section Break" - }, - { - "fieldname": "instructor", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Instructor", - "options": "Instructor", - "reqd": 1 - }, - { - "fetch_from": "instructor.instructor_name", - "fieldname": "instructor_name", - "fieldtype": "Read Only", - "label": "Instructor Name", - "read_only": 1 - }, - { - "fieldname": "column_break_9", - "fieldtype": "Column Break" - }, - { - "fieldname": "room", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Room", - "options": "Room", - "reqd": 1 - }, - { - "fieldname": "section_break_7", - "fieldtype": "Section Break" - }, - { - "fieldname": "from_time", - "fieldtype": "Time", - "label": "From Time", - "reqd": 1 - }, - { - "fieldname": "course_start_date", - "fieldtype": "Date", - "label": "Course Start Date", - "reqd": 1 - }, - { - "fieldname": "day", - "fieldtype": "Select", - "label": "Day", - "options": "\nMonday\nTuesday\nWednesday\nThursday\nFriday\nSaturday\nSunday", - "reqd": 1 - }, - { - "default": "0", - "fieldname": "reschedule", - "fieldtype": "Check", - "label": "Reschedule" - }, - { - "fieldname": "column_break_15", - "fieldtype": "Column Break" - }, - { - "fieldname": "to_time", - "fieldtype": "Time", - "label": "To TIme", - "reqd": 1 - }, - { - "fieldname": "course_end_date", - "fieldtype": "Date", - "label": "Course End Date", - "reqd": 1 - } - ], - "hide_toolbar": 1, - "issingle": 1, - "links": [], - "modified": "2021-11-11 09:33:18.874445", - "modified_by": "Administrator", - "module": "Education", - "name": "Course Scheduling Tool", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "read": 1, - "role": "Academics User", - "write": 1 - } - ], - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.py b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.py deleted file mode 100644 index b3072c20b6..0000000000 --- a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.py +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import calendar - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import add_days, getdate - -from erpnext.education.utils import OverlapError - - -class CourseSchedulingTool(Document): - @frappe.whitelist() - def schedule_course(self): - """Creates course schedules as per specified parameters""" - - course_schedules = [] - course_schedules_errors = [] - rescheduled = [] - reschedule_errors = [] - - self.validate_mandatory() - self.validate_date() - self.instructor_name = frappe.db.get_value("Instructor", self.instructor, "instructor_name") - - group_based_on, course = frappe.db.get_value( - "Student Group", self.student_group, ["group_based_on", "course"] - ) - - if group_based_on == "Course": - self.course = course - - if self.reschedule: - rescheduled, reschedule_errors = self.delete_course_schedule(rescheduled, reschedule_errors) - - date = self.course_start_date - while date < self.course_end_date: - if self.day == calendar.day_name[getdate(date).weekday()]: - course_schedule = self.make_course_schedule(date) - try: - course_schedule.save() - except OverlapError: - course_schedules_errors.append(date) - else: - course_schedules.append(course_schedule) - - date = add_days(date, 7) - else: - date = add_days(date, 1) - - return dict( - course_schedules=course_schedules, - course_schedules_errors=course_schedules_errors, - rescheduled=rescheduled, - reschedule_errors=reschedule_errors, - ) - - def validate_mandatory(self): - """Validates all mandatory fields""" - - fields = [ - "course", - "room", - "instructor", - "from_time", - "to_time", - "course_start_date", - "course_end_date", - "day", - ] - for d in fields: - if not self.get(d): - frappe.throw(_("{0} is mandatory").format(self.meta.get_label(d))) - - def validate_date(self): - """Validates if Course Start Date is greater than Course End Date""" - if self.course_start_date > self.course_end_date: - frappe.throw(_("Course Start Date cannot be greater than Course End Date.")) - - def delete_course_schedule(self, rescheduled, reschedule_errors): - """Delete all course schedule within the Date range and specified filters""" - - schedules = frappe.get_list( - "Course Schedule", - fields=["name", "schedule_date"], - filters=[ - ["student_group", "=", self.student_group], - ["course", "=", self.course], - ["schedule_date", ">=", self.course_start_date], - ["schedule_date", "<=", self.course_end_date], - ], - ) - - for d in schedules: - try: - if self.day == calendar.day_name[getdate(d.schedule_date).weekday()]: - frappe.delete_doc("Course Schedule", d.name) - rescheduled.append(d.name) - except Exception: - reschedule_errors.append(d.name) - return rescheduled, reschedule_errors - - def make_course_schedule(self, date): - """Makes a new Course Schedule. - :param date: Date on which Course Schedule will be created.""" - - course_schedule = frappe.new_doc("Course Schedule") - course_schedule.student_group = self.student_group - course_schedule.course = self.course - course_schedule.instructor = self.instructor - course_schedule.instructor_name = self.instructor_name - course_schedule.room = self.room - course_schedule.schedule_date = date - course_schedule.from_time = self.from_time - course_schedule.to_time = self.to_time - return course_schedule diff --git a/erpnext/education/doctype/course_scheduling_tool/test_course_scheduling_tool.py b/erpnext/education/doctype/course_scheduling_tool/test_course_scheduling_tool.py deleted file mode 100644 index 559214bc92..0000000000 --- a/erpnext/education/doctype/course_scheduling_tool/test_course_scheduling_tool.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestCourseSchedulingTool(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/course_topic/__init__.py b/erpnext/education/doctype/course_topic/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/course_topic/course_topic.js b/erpnext/education/doctype/course_topic/course_topic.js deleted file mode 100644 index 7d03ba32ff..0000000000 --- a/erpnext/education/doctype/course_topic/course_topic.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Course Topic', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/course_topic/course_topic.json b/erpnext/education/doctype/course_topic/course_topic.json deleted file mode 100644 index 3fcddc169e..0000000000 --- a/erpnext/education/doctype/course_topic/course_topic.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-12-12 11:51:25.952740", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "topic", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Topic", - "length": 0, - "no_copy": 0, - "options": "Topic", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "topic.topic_name", - "fieldname": "topic_name", - "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": 0, - "label": "Topic Name", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-12-12 13:01:58.960425", - "modified_by": "Administrator", - "module": "Education", - "name": "Course Topic", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/course_topic/course_topic.py b/erpnext/education/doctype/course_topic/course_topic.py deleted file mode 100644 index 3c1cabf795..0000000000 --- a/erpnext/education/doctype/course_topic/course_topic.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class CourseTopic(Document): - pass diff --git a/erpnext/education/doctype/course_topic/test_course_topic.py b/erpnext/education/doctype/course_topic/test_course_topic.py deleted file mode 100644 index a4d370c83d..0000000000 --- a/erpnext/education/doctype/course_topic/test_course_topic.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestCourseTopic(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/education_settings/__init__.py b/erpnext/education/doctype/education_settings/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/education_settings/education_settings.js b/erpnext/education/doctype/education_settings/education_settings.js deleted file mode 100644 index 764d8b4a7f..0000000000 --- a/erpnext/education/doctype/education_settings/education_settings.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Education Settings', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/education_settings/education_settings.json b/erpnext/education/doctype/education_settings/education_settings.json deleted file mode 100644 index 0e548dbf77..0000000000 --- a/erpnext/education/doctype/education_settings/education_settings.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "actions": [], - "creation": "2017-04-05 13:33:04.519313", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "current_academic_year", - "current_academic_term", - "attendance_freeze_date", - "column_break_4", - "validate_batch", - "validate_course", - "academic_term_reqd", - "user_creation_skip", - "section_break_7", - "instructor_created_by", - "web_academy_settings_section", - "enable_lms", - "portal_title", - "description" - ], - "fields": [ - { - "fieldname": "current_academic_year", - "fieldtype": "Link", - "label": "Current Academic Year", - "options": "Academic Year" - }, - { - "fieldname": "current_academic_term", - "fieldtype": "Link", - "label": "Current Academic Term", - "options": "Academic Term" - }, - { - "fieldname": "attendance_freeze_date", - "fieldtype": "Date", - "label": "Attendance Freeze Date" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "default": "0", - "description": "For Batch based Student Group, the Student Batch will be validated for every Student from the Program Enrollment.", - "fieldname": "validate_batch", - "fieldtype": "Check", - "label": "Validate Batch for Students in Student Group" - }, - { - "default": "0", - "description": "For Course based Student Group, the Course will be validated for every Student from the enrolled Courses in Program Enrollment.", - "fieldname": "validate_course", - "fieldtype": "Check", - "label": "Validate Enrolled Course for Students in Student Group" - }, - { - "default": "0", - "description": "If enabled, field Academic Term will be Mandatory in Program Enrollment Tool.", - "fieldname": "academic_term_reqd", - "fieldtype": "Check", - "label": "Make Academic Term Mandatory" - }, - { - "fieldname": "section_break_7", - "fieldtype": "Section Break" - }, - { - "default": "Full Name", - "fieldname": "instructor_created_by", - "fieldtype": "Select", - "label": "Instructor Records to be created by", - "options": "Full Name\nNaming Series\nEmployee Number" - }, - { - "fieldname": "web_academy_settings_section", - "fieldtype": "Section Break", - "label": "Learning Management System Settings" - }, - { - "depends_on": "eval: doc.enable_lms", - "fieldname": "portal_title", - "fieldtype": "Data", - "label": "Learning Management System Title" - }, - { - "depends_on": "eval: doc.enable_lms", - "fieldname": "description", - "fieldtype": "Small Text", - "label": "Description" - }, - { - "default": "0", - "fieldname": "enable_lms", - "fieldtype": "Check", - "label": "Enable Learning Management System" - }, - { - "default": "0", - "description": "By default, a new User is created for every new Student. If enabled, no new User will be created when a new Student is created.", - "fieldname": "user_creation_skip", - "fieldtype": "Check", - "label": "Skip User creation for new Student" - } - ], - "issingle": 1, - "links": [], - "modified": "2020-05-07 19:18:10.639356", - "modified_by": "Administrator", - "module": "Education", - "name": "Education Settings", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "role": "System Manager", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "role": "Education Manager", - "share": 1, - "write": 1 - }, - { - "email": 1, - "print": 1, - "read": 1, - "role": "Guest", - "share": 1 - } - ], - "quick_entry": 1, - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/education_settings/education_settings.py b/erpnext/education/doctype/education_settings/education_settings.py deleted file mode 100644 index 295aa3a4cb..0000000000 --- a/erpnext/education/doctype/education_settings/education_settings.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -import frappe.defaults -from frappe.model.document import Document - -education_keydict = { - # "key in defaults": "key in Global Defaults" - "academic_year": "current_academic_year", - "academic_term": "current_academic_term", - "validate_batch": "validate_batch", - "validate_course": "validate_course", -} - - -class EducationSettings(Document): - def on_update(self): - """update defaults""" - for key in education_keydict: - frappe.db.set_default(key, self.get(education_keydict[key], "")) - - # clear cache - frappe.clear_cache() - - def get_defaults(self): - return frappe.defaults.get_defaults() - - def validate(self): - from frappe.custom.doctype.property_setter.property_setter import make_property_setter - - if self.get("instructor_created_by") == "Naming Series": - make_property_setter( - "Instructor", "naming_series", "hidden", 0, "Check", validate_fields_for_doctype=False - ) - else: - make_property_setter( - "Instructor", "naming_series", "hidden", 1, "Check", validate_fields_for_doctype=False - ) - - -def update_website_context(context): - context["lms_enabled"] = frappe.get_cached_doc("Education Settings").enable_lms diff --git a/erpnext/education/doctype/education_settings/test_education_settings.py b/erpnext/education/doctype/education_settings/test_education_settings.py deleted file mode 100644 index 223e8386b3..0000000000 --- a/erpnext/education/doctype/education_settings/test_education_settings.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestEducationSettings(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/fee_category/__init__.py b/erpnext/education/doctype/fee_category/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/fee_category/fee_category.js b/erpnext/education/doctype/fee_category/fee_category.js deleted file mode 100644 index 96fd9158c7..0000000000 --- a/erpnext/education/doctype/fee_category/fee_category.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Fee Category', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/fee_category/fee_category.json b/erpnext/education/doctype/fee_category/fee_category.json deleted file mode 100644 index c1bfa8e836..0000000000 --- a/erpnext/education/doctype/fee_category/fee_category.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:category_name", - "beta": 0, - "creation": "2015-09-16 13:01:10.448734", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 0, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "category_name", - "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": 0, - "label": "Name", - "length": 0, - "no_copy": 0, - "oldfieldname": "earning_name", - "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": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "description", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Description", - "length": 0, - "no_copy": 0, - "oldfieldname": "description", - "oldfieldtype": "Small 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, - "unique": 0, - "width": "300px" - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "fa fa-flag", - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "menu_index": 0, - "modified": "2017-11-10 18:56:33.824534", - "modified_by": "Administrator", - "module": "Education", - "name": "Fee Category", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "search_fields": "description", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/fee_category/fee_category.py b/erpnext/education/doctype/fee_category/fee_category.py deleted file mode 100644 index 1faa0c5e95..0000000000 --- a/erpnext/education/doctype/fee_category/fee_category.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class FeeCategory(Document): - pass diff --git a/erpnext/education/doctype/fee_category/test_fee_category.py b/erpnext/education/doctype/fee_category/test_fee_category.py deleted file mode 100644 index 93565a9f92..0000000000 --- a/erpnext/education/doctype/fee_category/test_fee_category.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Fee Category') - - -class TestFeeCategory(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/fee_category/test_records.json b/erpnext/education/doctype/fee_category/test_records.json deleted file mode 100644 index 598c1ed75b..0000000000 --- a/erpnext/education/doctype/fee_category/test_records.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "category_name": "Admission Fee" - }, - { - "category_name": "Tuition Fee" - }, - { - "category_name": "Transportation Fee" - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/fee_component/__init__.py b/erpnext/education/doctype/fee_component/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/fee_component/fee_component.json b/erpnext/education/doctype/fee_component/fee_component.json deleted file mode 100644 index f6e13c48b2..0000000000 --- a/erpnext/education/doctype/fee_component/fee_component.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 1, - "autoname": "", - "beta": 0, - "creation": "2015-09-16 13:07:27.675453", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 1, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "fees_category", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Fees Category", - "length": 0, - "no_copy": 0, - "oldfieldname": "earning_name", - "oldfieldtype": "Data", - "options": "Fee Category", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "description", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Description", - "length": 0, - "no_copy": 0, - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Amount", - "length": 0, - "no_copy": 0, - "oldfieldname": "description", - "oldfieldtype": "Small Text", - "options": "", - "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, - "unique": 0, - "width": "300px" - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "fa fa-flag", - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-10 18:58:10.254407", - "modified_by": "Administrator", - "module": "Education", - "name": "Fee Component", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/fee_component/fee_component.py b/erpnext/education/doctype/fee_component/fee_component.py deleted file mode 100644 index c5cf7d9331..0000000000 --- a/erpnext/education/doctype/fee_component/fee_component.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class FeeComponent(Document): - pass diff --git a/erpnext/education/doctype/fee_schedule/__init__.py b/erpnext/education/doctype/fee_schedule/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule.js b/erpnext/education/doctype/fee_schedule/fee_schedule.js deleted file mode 100644 index 97691a5b62..0000000000 --- a/erpnext/education/doctype/fee_schedule/fee_schedule.js +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.provide("erpnext.accounts.dimensions"); -frappe.ui.form.on('Fee Schedule', { - setup: function(frm) { - frm.add_fetch('fee_structure', 'receivable_account', 'receivable_account'); - frm.add_fetch('fee_structure', 'income_account', 'income_account'); - frm.add_fetch('fee_structure', 'cost_center', 'cost_center'); - }, - - company: function(frm) { - erpnext.accounts.dimensions.update_dimension(frm, frm.doctype); - }, - - onload: function(frm) { - frm.set_query('receivable_account', function(doc) { - return { - filters: { - 'account_type': 'Receivable', - 'is_group': 0, - 'company': doc.company - } - }; - }); - - frm.set_query('income_account', function(doc) { - return { - filters: { - 'account_type': 'Income Account', - 'is_group': 0, - 'company': doc.company - } - }; - }); - - frm.set_query('student_group', 'student_groups', function() { - return { - 'program': frm.doc.program, - 'academic_term': frm.doc.academic_term, - 'academic_year': frm.doc.academic_year, - 'disabled': 0 - }; - }); - - frappe.realtime.on('fee_schedule_progress', function(data) { - if (data.reload && data.reload === 1) { - frm.reload_doc(); - } - if (data.progress) { - let progress_bar = $(cur_frm.dashboard.progress_area.body).find('.progress-bar'); - if (progress_bar) { - $(progress_bar).removeClass('progress-bar-danger').addClass('progress-bar-success progress-bar-striped'); - $(progress_bar).css('width', data.progress+'%'); - } - } - }); - - erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype); - }, - - refresh: function(frm) { - if (!frm.doc.__islocal && frm.doc.__onload && frm.doc.__onload.dashboard_info && - frm.doc.fee_creation_status === 'Successful') { - var info = frm.doc.__onload.dashboard_info; - frm.dashboard.add_indicator(__('Total Collected: {0}', [format_currency(info.total_paid, - info.currency)]), 'blue'); - frm.dashboard.add_indicator(__('Total Outstanding: {0}', [format_currency(info.total_unpaid, - info.currency)]), info.total_unpaid ? 'orange' : 'green'); - } - if (frm.doc.fee_creation_status === 'In Process') { - frm.dashboard.add_progress('Fee Creation Status', '0'); - } - if (frm.doc.docstatus === 1 && !frm.doc.fee_creation_status || frm.doc.fee_creation_status === 'Failed') { - frm.add_custom_button(__('Create Fees'), function() { - frappe.call({ - method: 'create_fees', - doc: frm.doc, - callback: function() { - frm.refresh(); - } - }); - }).addClass('btn-primary');; - } - if (frm.doc.fee_creation_status === 'Successful') { - frm.add_custom_button(__('View Fees Records'), function() { - frappe.route_options = { - fee_schedule: frm.doc.name - }; - frappe.set_route('List', 'Fees'); - }); - } - - }, - - fee_structure: function(frm) { - if (frm.doc.fee_structure) { - frappe.call({ - method: 'erpnext.education.doctype.fee_schedule.fee_schedule.get_fee_structure', - args: { - 'target_doc': frm.doc.name, - 'source_name': frm.doc.fee_structure - }, - callback: function(r) { - var doc = frappe.model.sync(r.message); - frappe.set_route('Form', doc[0].doctype, doc[0].name); - } - }); - } - } -}); - -frappe.ui.form.on('Fee Schedule Student Group', { - student_group: function(frm, cdt, cdn) { - var row = locals[cdt][cdn]; - if (row.student_group && frm.doc.academic_year) { - frappe.call({ - method: 'erpnext.education.doctype.fee_schedule.fee_schedule.get_total_students', - args: { - 'student_group': row.student_group, - 'academic_year': frm.doc.academic_year, - 'academic_term': frm.doc.academic_term, - 'student_category': frm.doc.student_category - }, - callback: function(r) { - if (!r.exc) { - frappe.model.set_value(cdt, cdn, 'total_students', r.message); - } - } - }); - } - } -}) diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule.json b/erpnext/education/doctype/fee_schedule/fee_schedule.json deleted file mode 100644 index 23b3212db2..0000000000 --- a/erpnext/education/doctype/fee_schedule/fee_schedule.json +++ /dev/null @@ -1,327 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2017-07-18 15:21:21.527136", - "doctype": "DocType", - "document_type": "Document", - "engine": "InnoDB", - "field_order": [ - "fee_structure", - "posting_date", - "due_date", - "naming_series", - "fee_creation_status", - "send_email", - "column_break_4", - "student_category", - "program", - "academic_year", - "academic_term", - "section_break_10", - "currency", - "student_groups", - "section_break_14", - "components", - "section_break_16", - "column_break_18", - "total_amount", - "grand_total", - "grand_total_in_words", - "edit_printing_settings", - "letter_head", - "column_break_32", - "select_print_heading", - "account", - "receivable_account", - "income_account", - "column_break_39", - "company", - "amended_from", - "accounting_dimensions_section", - "cost_center", - "dimension_col_break", - "section_break_31", - "error_log" - ], - "fields": [ - { - "fieldname": "fee_structure", - "fieldtype": "Link", - "in_global_search": 1, - "in_list_view": 1, - "label": "Fee Structure", - "options": "Fee Structure", - "reqd": 1 - }, - { - "fieldname": "due_date", - "fieldtype": "Date", - "label": "Due Date", - "reqd": 1 - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Naming Series", - "no_copy": 1, - "options": "EDU-FSH-.YYYY.-" - }, - { - "fieldname": "fee_creation_status", - "fieldtype": "Select", - "label": "Fee Creation Status", - "no_copy": 1, - "options": "\nIn Process\nFailed\nSuccessful", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "0", - "fieldname": "send_email", - "fieldtype": "Check", - "label": "Send Payment Request Email" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fieldname": "student_category", - "fieldtype": "Link", - "label": "Student Category", - "options": "Student Category", - "read_only": 1 - }, - { - "fieldname": "program", - "fieldtype": "Link", - "label": "Program", - "options": "Program", - "read_only": 1 - }, - { - "fieldname": "academic_year", - "fieldtype": "Link", - "label": "Academic Year", - "options": "Academic Year", - "reqd": 1 - }, - { - "fieldname": "academic_term", - "fieldtype": "Link", - "label": "Academic Term", - "options": "Academic Term" - }, - { - "fieldname": "section_break_10", - "fieldtype": "Section Break" - }, - { - "fieldname": "currency", - "fieldtype": "Link", - "hidden": 1, - "label": "Currency", - "options": "Currency", - "read_only": 1 - }, - { - "fieldname": "student_groups", - "fieldtype": "Table", - "options": "Fee Schedule Student Group", - "reqd": 1 - }, - { - "fieldname": "section_break_14", - "fieldtype": "Section Break", - "label": "Fee Breakup for each student", - "read_only": 1 - }, - { - "fieldname": "components", - "fieldtype": "Table", - "options": "Fee Component", - "read_only": 1 - }, - { - "fieldname": "section_break_16", - "fieldtype": "Section Break" - }, - { - "fieldname": "column_break_18", - "fieldtype": "Column Break" - }, - { - "default": "0", - "fieldname": "total_amount", - "fieldtype": "Currency", - "label": "Total Amount per Student", - "read_only": 1 - }, - { - "fieldname": "grand_total", - "fieldtype": "Currency", - "label": "Grand Total", - "read_only": 1 - }, - { - "fieldname": "grand_total_in_words", - "fieldtype": "Data", - "label": "In Words", - "length": 240, - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "edit_printing_settings", - "fieldtype": "Section Break", - "label": "Printing Settings" - }, - { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Link", - "label": "Letter Head", - "options": "Letter Head", - "print_hide": 1 - }, - { - "fieldname": "column_break_32", - "fieldtype": "Column Break" - }, - { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "label": "Print Heading", - "no_copy": 1, - "options": "Print Heading", - "print_hide": 1, - "report_hide": 1 - }, - { - "collapsible": 1, - "fieldname": "account", - "fieldtype": "Section Break", - "label": "Accounting" - }, - { - "fieldname": "receivable_account", - "fieldtype": "Link", - "label": "Receivable Account", - "options": "Account" - }, - { - "fieldname": "income_account", - "fieldtype": "Link", - "label": "Income Account", - "options": "Account" - }, - { - "fieldname": "column_break_39", - "fieldtype": "Column Break" - }, - { - "fieldname": "cost_center", - "fieldtype": "Link", - "label": "Cost Center", - "options": "Cost Center" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "label": "Institution", - "options": "Company" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Fee Schedule", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "depends_on": "error_log", - "fieldname": "section_break_31", - "fieldtype": "Section Break", - "label": "Error Log" - }, - { - "fieldname": "error_log", - "fieldtype": "Read Only", - "label": "Error Log" - }, - { - "fieldname": "accounting_dimensions_section", - "fieldtype": "Section Break", - "label": "Accounting Dimensions" - }, - { - "fieldname": "dimension_col_break", - "fieldtype": "Column Break" - }, - { - "default": "Today", - "fieldname": "posting_date", - "fieldtype": "Date", - "label": "Posting Date", - "reqd": 1 - } - ], - "is_submittable": 1, - "links": [], - "modified": "2020-07-18 05:11:49.905457", - "modified_by": "Administrator", - "module": "Education", - "name": "Fee Schedule", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "import": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule.py b/erpnext/education/doctype/fee_schedule/fee_schedule.py deleted file mode 100644 index 9ae5582f21..0000000000 --- a/erpnext/education/doctype/fee_schedule/fee_schedule.py +++ /dev/null @@ -1,173 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.model.mapper import get_mapped_doc -from frappe.utils import cint, cstr, flt, money_in_words -from frappe.utils.background_jobs import enqueue - -import erpnext - - -class FeeSchedule(Document): - def onload(self): - info = self.get_dashboard_info() - self.set_onload("dashboard_info", info) - - def get_dashboard_info(self): - info = { - "total_paid": 0, - "total_unpaid": 0, - "currency": erpnext.get_company_currency(self.company), - } - - fees_amount = frappe.db.sql( - """select sum(grand_total), sum(outstanding_amount) from tabFees - where fee_schedule=%s and docstatus=1""", - (self.name), - ) - - if fees_amount: - info["total_paid"] = flt(fees_amount[0][0]) - flt(fees_amount[0][1]) - info["total_unpaid"] = flt(fees_amount[0][1]) - - return info - - def validate(self): - self.calculate_total_and_program() - - def calculate_total_and_program(self): - no_of_students = 0 - for d in self.student_groups: - # if not d.total_students: - d.total_students = get_total_students( - d.student_group, self.academic_year, self.academic_term, self.student_category - ) - no_of_students += cint(d.total_students) - - # validate the program of fee structure and student groups - student_group_program = frappe.db.get_value("Student Group", d.student_group, "program") - if self.program and student_group_program and self.program != student_group_program: - frappe.msgprint( - _("Program in the Fee Structure and Student Group {0} are different.").format(d.student_group) - ) - self.grand_total = no_of_students * self.total_amount - self.grand_total_in_words = money_in_words(self.grand_total) - - @frappe.whitelist() - def create_fees(self): - self.db_set("fee_creation_status", "In Process") - frappe.publish_realtime( - "fee_schedule_progress", {"progress": "0", "reload": 1}, user=frappe.session.user - ) - - total_records = sum([int(d.total_students) for d in self.student_groups]) - if total_records > 10: - frappe.msgprint( - _( - """Fee records will be created in the background. - In case of any error the error message will be updated in the Schedule.""" - ) - ) - enqueue( - generate_fee, queue="default", timeout=6000, event="generate_fee", fee_schedule=self.name - ) - else: - generate_fee(self.name) - - -def generate_fee(fee_schedule): - doc = frappe.get_doc("Fee Schedule", fee_schedule) - error = False - total_records = sum([int(d.total_students) for d in doc.student_groups]) - created_records = 0 - - if not total_records: - frappe.throw(_("Please setup Students under Student Groups")) - - for d in doc.student_groups: - students = get_students( - d.student_group, doc.academic_year, doc.academic_term, doc.student_category - ) - for student in students: - try: - fees_doc = get_mapped_doc( - "Fee Schedule", - fee_schedule, - {"Fee Schedule": {"doctype": "Fees", "field_map": {"name": "Fee Schedule"}}}, - ) - fees_doc.posting_date = doc.posting_date - fees_doc.student = student.student - fees_doc.student_name = student.student_name - fees_doc.program = student.program - fees_doc.student_batch = student.student_batch_name - fees_doc.send_payment_request = doc.send_email - fees_doc.save() - fees_doc.submit() - created_records += 1 - frappe.publish_realtime( - "fee_schedule_progress", - {"progress": str(int(created_records * 100 / total_records))}, - user=frappe.session.user, - ) - - except Exception as e: - error = True - err_msg = frappe.local.message_log and "\n\n".join(frappe.local.message_log) or cstr(e) - - if error: - frappe.db.rollback() - frappe.db.set_value("Fee Schedule", fee_schedule, "fee_creation_status", "Failed") - frappe.db.set_value("Fee Schedule", fee_schedule, "error_log", err_msg) - - else: - frappe.db.set_value("Fee Schedule", fee_schedule, "fee_creation_status", "Successful") - frappe.db.set_value("Fee Schedule", fee_schedule, "error_log", None) - - frappe.publish_realtime( - "fee_schedule_progress", {"progress": "100", "reload": 1}, user=frappe.session.user - ) - - -def get_students(student_group, academic_year, academic_term=None, student_category=None): - conditions = "" - if student_category: - conditions = " and pe.student_category={}".format(frappe.db.escape(student_category)) - if academic_term: - conditions = " and pe.academic_term={}".format(frappe.db.escape(academic_term)) - - students = frappe.db.sql( - """ - select pe.student, pe.student_name, pe.program, pe.student_batch_name - from `tabStudent Group Student` sgs, `tabProgram Enrollment` pe - where - pe.student = sgs.student and pe.academic_year = %s - and sgs.parent = %s and sgs.active = 1 - {conditions} - """.format( - conditions=conditions - ), - (academic_year, student_group), - as_dict=1, - ) - return students - - -@frappe.whitelist() -def get_total_students(student_group, academic_year, academic_term=None, student_category=None): - total_students = get_students(student_group, academic_year, academic_term, student_category) - return len(total_students) - - -@frappe.whitelist() -def get_fee_structure(source_name, target_doc=None): - fee_request = get_mapped_doc( - "Fee Structure", - source_name, - {"Fee Structure": {"doctype": "Fee Schedule"}}, - ignore_permissions=True, - ) - return fee_request diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py b/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py deleted file mode 100644 index 4b99d27f29..0000000000 --- a/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - - -def get_data(): - return {"fieldname": "fee_schedule", "transactions": [{"items": ["Fees"]}]} diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule_list.js b/erpnext/education/doctype/fee_schedule/fee_schedule_list.js deleted file mode 100644 index 3039c51d78..0000000000 --- a/erpnext/education/doctype/fee_schedule/fee_schedule_list.js +++ /dev/null @@ -1,14 +0,0 @@ -frappe.listview_settings['Fee Schedule'] = { - add_fields: ["fee_creation_status", "due_date", "grand_total"], - get_indicator: function(doc) { - if (doc.fee_creation_status=="Successful") { - return [__("Fee Created"), "blue", "fee_creation_status,=,Successful"]; - } else if(doc.fee_creation_status == "In Process") { - return [__("Creating Fees"), "orange", "fee_creation_status,=,In Process"]; - } else if(doc.fee_creation_status == "Failed") { - return [__("Fee Creation Failed"), "red", "fee_creation_status,=,Failed"]; - } else { - return [__("Fee Creation Pending"), "green", "fee_creation_status,=,"]; - } - } -}; diff --git a/erpnext/education/doctype/fee_schedule/test_fee_schedule.py b/erpnext/education/doctype/fee_schedule/test_fee_schedule.py deleted file mode 100644 index c291aed310..0000000000 --- a/erpnext/education/doctype/fee_schedule/test_fee_schedule.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestFeeSchedule(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/fee_schedule_program/__init__.py b/erpnext/education/doctype/fee_schedule_program/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.json b/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.json deleted file mode 100644 index f644dc21fb..0000000000 --- a/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-03-23 17:46:55.712169", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "program", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Program", - "length": 0, - "no_copy": 0, - "options": "Program", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_batch", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Student Batch", - "length": 0, - "no_copy": 0, - "options": "Student Batch Name", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "total_students", - "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": 0, - "label": "Total Students", - "length": 0, - "no_copy": 0, - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-11-04 03:37:57.763134", - "modified_by": "Administrator", - "module": "Education", - "name": "Fee Schedule Program", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.py b/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.py deleted file mode 100644 index ad7af3a3ab..0000000000 --- a/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class FeeScheduleProgram(Document): - pass diff --git a/erpnext/education/doctype/fee_schedule_student_group/__init__.py b/erpnext/education/doctype/fee_schedule_student_group/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.json b/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.json deleted file mode 100644 index d4e0acbce0..0000000000 --- a/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-03-23 17:55:52.476822", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_group", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Student Group", - "length": 0, - "no_copy": 0, - "options": "Student Group", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "total_students", - "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": 0, - "label": "Total Students", - "length": 0, - "no_copy": 0, - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-11-04 03:38:06.535706", - "modified_by": "Administrator", - "module": "Education", - "name": "Fee Schedule Student Group", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.py b/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.py deleted file mode 100644 index 24e5404177..0000000000 --- a/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class FeeScheduleStudentGroup(Document): - pass diff --git a/erpnext/education/doctype/fee_structure/__init__.py b/erpnext/education/doctype/fee_structure/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/fee_structure/fee_structure.js b/erpnext/education/doctype/fee_structure/fee_structure.js deleted file mode 100644 index d9ab99f818..0000000000 --- a/erpnext/education/doctype/fee_structure/fee_structure.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.provide("erpnext.accounts.dimensions"); - -frappe.ui.form.on('Fee Structure', { - setup: function(frm) { - frm.add_fetch('company', 'default_receivable_account', 'receivable_account'); - frm.add_fetch('company', 'default_income_account', 'income_account'); - frm.add_fetch('company', 'cost_center', 'cost_center'); - }, - - company: function(frm) { - erpnext.accounts.dimensions.update_dimension(frm, frm.doctype); - }, - - onload: function(frm) { - frm.set_query('academic_term', function() { - return { - 'filters': { - 'academic_year': frm.doc.academic_year - } - }; - }); - - frm.set_query('receivable_account', function(doc) { - return { - filters: { - 'account_type': 'Receivable', - 'is_group': 0, - 'company': doc.company - } - }; - }); - frm.set_query('income_account', function(doc) { - return { - filters: { - 'account_type': 'Income Account', - 'is_group': 0, - 'company': doc.company - } - }; - }); - - erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype); - }, - - refresh: function(frm) { - if (frm.doc.docstatus === 1) { - frm.add_custom_button(__('Create Fee Schedule'), function() { - frm.events.make_fee_schedule(frm); - }).addClass('btn-primary'); - } - }, - - make_fee_schedule: function(frm) { - frappe.model.open_mapped_doc({ - method: 'erpnext.education.doctype.fee_structure.fee_structure.make_fee_schedule', - frm: frm - }); - } -}); - -frappe.ui.form.on('Fee Component', { - amount: function(frm) { - var total_amount = 0; - for (var i=0;i 0) { - frm.add_custom_button(__('Accounting Ledger'), function() { - frappe.route_options = { - voucher_no: frm.doc.name, - from_date: frm.doc.posting_date, - to_date: moment(frm.doc.modified).format('YYYY-MM-DD'), - company: frm.doc.company, - group_by: '', - show_cancelled_entries: frm.doc.docstatus === 2 - }; - frappe.set_route("query-report", "General Ledger"); - }, __("View")); - frm.add_custom_button(__("Payments"), function() { - frappe.set_route("List", "Payment Entry", {"Payment Entry Reference.reference_name": frm.doc.name}); - }, __("View")); - } - if(frm.doc.docstatus===1 && frm.doc.outstanding_amount>0) { - frm.add_custom_button(__("Payment Request"), function() { - frm.events.make_payment_request(frm); - }, __('Create')); - frm.page.set_inner_btn_group_as_primary(__('Create')); - } - if(frm.doc.docstatus===1 && frm.doc.outstanding_amount!=0) { - frm.add_custom_button(__("Payment"), function() { - frm.events.make_payment_entry(frm); - }, __('Create')); - frm.page.set_inner_btn_group_as_primary(__('Create')); - } - }, - - student: function(frm) { - if (frm.doc.student) { - frappe.call({ - method:"erpnext.education.api.get_current_enrollment", - args: { - "student": frm.doc.student, - "academic_year": frm.doc.academic_year - }, - callback: function(r) { - if(r){ - $.each(r.message, function(i, d) { - frm.set_value(i,d); - }); - } - } - }); - } - }, - - make_payment_request: function(frm) { - if (!frm.doc.student_email) { - frappe.msgprint(__("Please set the Email ID for the Student to send the Payment Request")); - } else { - frappe.call({ - method:"erpnext.accounts.doctype.payment_request.payment_request.make_payment_request", - args: { - "dt": frm.doc.doctype, - "dn": frm.doc.name, - "party_type": "Student", - "party": frm.doc.student, - "recipient_id": frm.doc.student_email - }, - callback: function(r) { - if(!r.exc){ - var doc = frappe.model.sync(r.message); - frappe.set_route("Form", doc[0].doctype, doc[0].name); - } - } - }); - } - }, - - make_payment_entry: function(frm) { - return frappe.call({ - method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry", - args: { - "dt": frm.doc.doctype, - "dn": frm.doc.name - }, - callback: function(r) { - var doc = frappe.model.sync(r.message); - frappe.set_route("Form", doc[0].doctype, doc[0].name); - } - }); - }, - - set_posting_time: function(frm) { - frm.refresh(); - }, - - academic_term: function() { - frappe.ui.form.trigger("Fees", "program"); - }, - - fee_structure: function(frm) { - frm.set_value("components" ,""); - if (frm.doc.fee_structure) { - frappe.call({ - method: "erpnext.education.api.get_fee_components", - args: { - "fee_structure": frm.doc.fee_structure - }, - callback: function(r) { - if (r.message) { - $.each(r.message, function(i, d) { - var row = frappe.model.add_child(frm.doc, "Fee Component", "components"); - row.fees_category = d.fees_category; - row.description = d.description; - row.amount = d.amount; - }); - } - refresh_field("components"); - frm.trigger("calculate_total_amount"); - } - }); - } - }, - - calculate_total_amount: function(frm) { - var grand_total = 0; - for(var i=0;i 0: - self.indicator_color = "orange" - self.indicator_title = _("Unpaid") - else: - self.indicator_color = "green" - self.indicator_title = _("Paid") - - def validate(self): - self.calculate_total() - self.set_missing_accounts_and_fields() - - def set_missing_accounts_and_fields(self): - if not self.company: - self.company = frappe.defaults.get_defaults().company - if not self.currency: - self.currency = erpnext.get_company_currency(self.company) - if not (self.receivable_account and self.income_account and self.cost_center): - accounts_details = frappe.get_all( - "Company", - fields=["default_receivable_account", "default_income_account", "cost_center"], - filters={"name": self.company}, - )[0] - if not self.receivable_account: - self.receivable_account = accounts_details.default_receivable_account - if not self.income_account: - self.income_account = accounts_details.default_income_account - if not self.cost_center: - self.cost_center = accounts_details.cost_center - if not self.student_email: - self.student_email = self.get_student_emails() - - def get_student_emails(self): - student_emails = frappe.db.sql_list( - """ - select g.email_address - from `tabGuardian` g, `tabStudent Guardian` sg - where g.name = sg.guardian and sg.parent = %s and sg.parenttype = 'Student' - and ifnull(g.email_address, '')!='' - """, - self.student, - ) - - student_email_id = frappe.db.get_value("Student", self.student, "student_email_id") - if student_email_id: - student_emails.append(student_email_id) - if student_emails: - return ", ".join(list(set(student_emails))) - else: - return None - - def calculate_total(self): - """Calculates total amount.""" - self.grand_total = 0 - for d in self.components: - self.grand_total += d.amount - self.outstanding_amount = self.grand_total - self.grand_total_in_words = money_in_words(self.grand_total) - - def on_submit(self): - - self.make_gl_entries() - - if self.send_payment_request and self.student_email: - pr = make_payment_request( - party_type="Student", - party=self.student, - dt="Fees", - dn=self.name, - recipient_id=self.student_email, - submit_doc=True, - use_dummy_message=True, - ) - frappe.msgprint(_("Payment request {0} created").format(getlink("Payment Request", pr.name))) - - def on_cancel(self): - self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry") - make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name) - # frappe.db.set(self, 'status', 'Cancelled') - - def make_gl_entries(self): - if not self.grand_total: - return - student_gl_entries = self.get_gl_dict( - { - "account": self.receivable_account, - "party_type": "Student", - "party": self.student, - "against": self.income_account, - "debit": self.grand_total, - "debit_in_account_currency": self.grand_total, - "against_voucher": self.name, - "against_voucher_type": self.doctype, - }, - item=self, - ) - - fee_gl_entry = self.get_gl_dict( - { - "account": self.income_account, - "against": self.student, - "credit": self.grand_total, - "credit_in_account_currency": self.grand_total, - "cost_center": self.cost_center, - }, - item=self, - ) - - from erpnext.accounts.general_ledger import make_gl_entries - - make_gl_entries( - [student_gl_entries, fee_gl_entry], - cancel=(self.docstatus == 2), - update_outstanding="Yes", - merge_entries=False, - ) - - -def get_fee_list(doctype, txt, filters, limit_start, limit_page_length=20, order_by="modified"): - user = frappe.session.user - student = frappe.db.sql("select name from `tabStudent` where student_email_id= %s", user) - if student: - return frappe.db.sql( - """ - select name, program, due_date, grand_total - outstanding_amount as paid_amount, - outstanding_amount, grand_total, currency - from `tabFees` - where student= %s and docstatus=1 - order by due_date asc limit {0} , {1}""".format( - limit_start, limit_page_length - ), - student, - as_dict=True, - ) - - -def get_list_context(context=None): - return { - "show_sidebar": True, - "show_search": True, - "no_breadcrumbs": True, - "title": _("Fees"), - "get_list": get_fee_list, - "row_template": "templates/includes/fee/fee_row.html", - } diff --git a/erpnext/education/doctype/fees/fees_list.js b/erpnext/education/doctype/fees/fees_list.js deleted file mode 100644 index ee8e1e382e..0000000000 --- a/erpnext/education/doctype/fees/fees_list.js +++ /dev/null @@ -1,12 +0,0 @@ -frappe.listview_settings['Fees'] = { - add_fields: ["grand_total", "outstanding_amount", "due_date"], - get_indicator: function(doc) { - if(flt(doc.outstanding_amount)==0) { - return [__("Paid"), "green", "outstanding_amount,=,0"]; - } else if (flt(doc.outstanding_amount) > 0 && doc.due_date >= frappe.datetime.get_today()) { - return [__("Unpaid"), "orange", "outstanding_amount,>,0|due_date,>,Today"]; - } else if (flt(doc.outstanding_amount) > 0 && doc.due_date < frappe.datetime.get_today()) { - return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<=,Today"]; - } - } -}; diff --git a/erpnext/education/doctype/fees/test_fees.py b/erpnext/education/doctype/fees/test_fees.py deleted file mode 100644 index f0f7e67d2b..0000000000 --- a/erpnext/education/doctype/fees/test_fees.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -import frappe -from frappe.utils import nowdate -from frappe.utils.make_random import get_random - -from erpnext.education.doctype.program.test_program import make_program_and_linked_courses - -test_dependencies = ["Company"] - - -class TestFees(unittest.TestCase): - def test_fees(self): - student = get_random("Student") - program = make_program_and_linked_courses( - "_Test Program 1", ["_Test Course 1", "_Test Course 2"] - ) - fee = frappe.new_doc("Fees") - fee.posting_date = nowdate() - fee.due_date = nowdate() - fee.student = student - fee.receivable_account = "_Test Receivable - _TC" - fee.income_account = "Sales - _TC" - fee.cost_center = "_Test Cost Center - _TC" - fee.company = "_Test Company" - fee.program = program.name - - fee.extend( - "components", - [ - {"fees_category": "Tuition Fee", "amount": 40000}, - {"fees_category": "Transportation Fee", "amount": 10000}, - ], - ) - fee.save() - fee.submit() - - gl_entries = frappe.db.sql( - """ - select account, posting_date, party_type, party, cost_center, fiscal_year, voucher_type, - voucher_no, against_voucher_type, against_voucher, cost_center, company, credit, debit - from `tabGL Entry` where voucher_type=%s and voucher_no=%s""", - ("Fees", fee.name), - as_dict=True, - ) - - if gl_entries[0].account == "_Test Receivable - _TC": - self.assertEqual(gl_entries[0].debit, 50000) - self.assertEqual(gl_entries[0].credit, 0) - self.assertEqual(gl_entries[1].debit, 0) - self.assertEqual(gl_entries[1].credit, 50000) - else: - self.assertEqual(gl_entries[0].credit, 50000) - self.assertEqual(gl_entries[0].debit, 0) - self.assertEqual(gl_entries[1].credit, 0) - self.assertEqual(gl_entries[1].debit, 50000) diff --git a/erpnext/education/doctype/grading_scale/__init__.py b/erpnext/education/doctype/grading_scale/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/grading_scale/grading_scale.js b/erpnext/education/doctype/grading_scale/grading_scale.js deleted file mode 100644 index 622388c0b1..0000000000 --- a/erpnext/education/doctype/grading_scale/grading_scale.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Grading Scale', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/grading_scale/grading_scale.json b/erpnext/education/doctype/grading_scale/grading_scale.json deleted file mode 100644 index fb1e2c7f4e..0000000000 --- a/erpnext/education/doctype/grading_scale/grading_scale.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 1, - "autoname": "field:grading_scale_name", - "beta": 0, - "creation": "2016-08-26 03:06:53.922972", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "grading_scale_name", - "fieldtype": "Data", - "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": "Grading Scale Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 1 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "grading_intervals_section", - "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": "Grading Scale Intervals", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "intervals", - "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": "Intervals", - "length": 0, - "no_copy": 0, - "options": "Grading Scale Interval", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amended_from", - "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": "Amended From", - "length": 0, - "no_copy": 1, - "options": "Grading Scale", - "permlevel": 0, - "print_hide": 1, - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "description", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Description", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 1, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-08-30 00:34:03.368432", - "modified_by": "Administrator", - "module": "Education", - "name": "Grading Scale", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 1, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/grading_scale/grading_scale.py b/erpnext/education/doctype/grading_scale/grading_scale.py deleted file mode 100644 index c4bd1589b2..0000000000 --- a/erpnext/education/doctype/grading_scale/grading_scale.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import cint - - -class GradingScale(Document): - def validate(self): - thresholds = [] - for d in self.intervals: - if d.threshold in thresholds: - frappe.throw(_("Treshold {0}% appears more than once").format(d.threshold)) - else: - thresholds.append(cint(d.threshold)) - if 0 not in thresholds: - frappe.throw(_("Please define grade for Threshold 0%")) diff --git a/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py b/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py deleted file mode 100644 index 6995666d52..0000000000 --- a/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py +++ /dev/null @@ -1,12 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "fieldname": "grading_scale", - "non_standard_fieldnames": {"Course": "default_grading_scale"}, - "transactions": [ - {"label": _("Course"), "items": ["Course"]}, - {"label": _("Assessment"), "items": ["Assessment Plan", "Assessment Result"]}, - ], - } diff --git a/erpnext/education/doctype/grading_scale/test_grading_scale.py b/erpnext/education/doctype/grading_scale/test_grading_scale.py deleted file mode 100644 index 09a092cc2a..0000000000 --- a/erpnext/education/doctype/grading_scale/test_grading_scale.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Grading Scale') - - -class TestGradingScale(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/grading_scale/test_records.json b/erpnext/education/doctype/grading_scale/test_records.json deleted file mode 100644 index 72b69547ac..0000000000 --- a/erpnext/education/doctype/grading_scale/test_records.json +++ /dev/null @@ -1,19 +0,0 @@ -[ - { - "grading_scale_name": "_Test Grading Scale", - "intervals": [ - { - "grade_code": "A", - "threshold": 75 - }, - { - "grade_code": "B", - "threshold": 50 - }, - { - "grade_code": "C", - "threshold": 0 - } - ] - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/grading_scale_interval/__init__.py b/erpnext/education/doctype/grading_scale_interval/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.json b/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.json deleted file mode 100644 index 5574e1da54..0000000000 --- a/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-08-26 03:11:09.591049", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "grade_code", - "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": 0, - "label": "Grade Code", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "threshold", - "fieldtype": "Percent", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Threshold", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "1", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "grade_description", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Grade Description", - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-10 19:08:48.083084", - "modified_by": "Administrator", - "module": "Education", - "name": "Grading Scale Interval", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.py b/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.py deleted file mode 100644 index b4101bdcc2..0000000000 --- a/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class GradingScaleInterval(Document): - pass diff --git a/erpnext/education/doctype/guardian/__init__.py b/erpnext/education/doctype/guardian/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/guardian/guardian.js b/erpnext/education/doctype/guardian/guardian.js deleted file mode 100644 index b7c2f0af31..0000000000 --- a/erpnext/education/doctype/guardian/guardian.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Guardian', { - refresh: function(frm) { - if(!frm.doc.user && !frm.is_new()) { - frm.add_custom_button(__("Invite as User"), function() { - return frappe.call({ - method: "erpnext.education.doctype.guardian.guardian.invite_guardian", - args: { - guardian: frm.doc.name - }, - callback: function(r) { - frm.set_value("user", r.message); - } - }); - }); - } - } -}); diff --git a/erpnext/education/doctype/guardian/guardian.json b/erpnext/education/doctype/guardian/guardian.json deleted file mode 100644 index 7b8168ed41..0000000000 --- a/erpnext/education/doctype/guardian/guardian.json +++ /dev/null @@ -1,580 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "autoname": "EDU-GRD-.YYYY.-.#####", - "beta": 0, - "creation": "2016-07-21 15:32:51.163292", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "guardian_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Guardian Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "email_address", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Email Address", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "mobile_number", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Mobile Number", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "alternate_number", - "fieldtype": "Data", - "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": "Alternate Number", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "date_of_birth", - "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": 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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "user", - "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": "User Id", - "length": 0, - "no_copy": 0, - "options": "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_3", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "education", - "fieldtype": "Data", - "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": "Education", - "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 - }, - { - "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": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "designation", - "fieldtype": "Data", - "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": "Designation", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "work_address", - "fieldtype": "Text", - "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": "Work Address", - "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 - }, - { - "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": 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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_13", - "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": "Guardian Of ", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "students", - "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": "Students", - "length": 0, - "no_copy": 0, - "options": "Guardian Student", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_8", - "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": "Guardian Interests", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "interests", - "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": "Interests", - "length": 0, - "no_copy": 0, - "options": "Guardian Interest", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_field": "image", - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-08-21 16:15:54.050317", - "modified_by": "Administrator", - "module": "Education", - "name": "Guardian", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "guardian_name", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/guardian/guardian.py b/erpnext/education/doctype/guardian/guardian.py deleted file mode 100644 index a456e08d2f..0000000000 --- a/erpnext/education/doctype/guardian/guardian.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils.csvutils import getlink - - -class Guardian(Document): - def __setup__(self): - self.onload() - - def onload(self): - """Load Students for quick view""" - self.load_students() - - def load_students(self): - """Load `students` from the database""" - self.students = [] - students = frappe.get_all("Student Guardian", filters={"guardian": self.name}, fields=["parent"]) - for student in students: - self.append( - "students", - { - "student": student.parent, - "student_name": frappe.db.get_value("Student", student.parent, "title"), - }, - ) - - def validate(self): - self.students = [] - - -@frappe.whitelist() -def invite_guardian(guardian): - guardian_doc = frappe.get_doc("Guardian", guardian) - if not guardian_doc.email_address: - frappe.throw(_("Please set Email Address")) - else: - guardian_as_user = frappe.get_value("User", dict(email=guardian_doc.email_address)) - if guardian_as_user: - frappe.msgprint(_("User {0} already exists").format(getlink("User", guardian_as_user))) - return guardian_as_user - else: - user = frappe.get_doc( - { - "doctype": "User", - "first_name": guardian_doc.guardian_name, - "email": guardian_doc.email_address, - "user_type": "Website User", - "send_welcome_email": 1, - } - ).insert(ignore_permissions=True) - frappe.msgprint(_("User {0} created").format(getlink("User", user.name))) - return user.name diff --git a/erpnext/education/doctype/guardian/test_guardian.py b/erpnext/education/doctype/guardian/test_guardian.py deleted file mode 100644 index de3638c309..0000000000 --- a/erpnext/education/doctype/guardian/test_guardian.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Guardian') - - -class TestGuardian(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/guardian_interest/__init__.py b/erpnext/education/doctype/guardian_interest/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/guardian_interest/guardian_interest.json b/erpnext/education/doctype/guardian_interest/guardian_interest.json deleted file mode 100644 index 1995c551db..0000000000 --- a/erpnext/education/doctype/guardian_interest/guardian_interest.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-07-25 07:19:55.113871", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "interest", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Interest", - "length": 0, - "no_copy": 0, - "options": "Interest", - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-10 19:10:22.333454", - "modified_by": "Administrator", - "module": "Education", - "name": "Guardian Interest", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/guardian_interest/guardian_interest.py b/erpnext/education/doctype/guardian_interest/guardian_interest.py deleted file mode 100644 index 6cd1e55d83..0000000000 --- a/erpnext/education/doctype/guardian_interest/guardian_interest.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class GuardianInterest(Document): - pass diff --git a/erpnext/education/doctype/guardian_student/__init__.py b/erpnext/education/doctype/guardian_student/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/guardian_student/guardian_student.json b/erpnext/education/doctype/guardian_student/guardian_student.json deleted file mode 100644 index 2519a54af8..0000000000 --- a/erpnext/education/doctype/guardian_student/guardian_student.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-01-31 11:53:21.580099", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Student", - "length": 0, - "no_copy": 0, - "options": "Student", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Student Name", - "length": 0, - "no_copy": 0, - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-10 19:10:15.786362", - "modified_by": "Administrator", - "module": "Education", - "name": "Guardian Student", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/guardian_student/guardian_student.py b/erpnext/education/doctype/guardian_student/guardian_student.py deleted file mode 100644 index 4c29575bee..0000000000 --- a/erpnext/education/doctype/guardian_student/guardian_student.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class GuardianStudent(Document): - pass diff --git a/erpnext/education/doctype/instructor/__init__.py b/erpnext/education/doctype/instructor/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/instructor/instructor.js b/erpnext/education/doctype/instructor/instructor.js deleted file mode 100644 index 034b0aaf5d..0000000000 --- a/erpnext/education/doctype/instructor/instructor.js +++ /dev/null @@ -1,64 +0,0 @@ -cur_frm.add_fetch("employee", "department", "department"); -cur_frm.add_fetch("employee", "image", "image"); - -frappe.ui.form.on("Instructor", { - employee: function(frm) { - if (!frm.doc.employee) return; - frappe.db.get_value("Employee", {name: frm.doc.employee}, "company", (d) => { - frm.set_query("department", function() { - return { - "filters": { - "company": d.company, - } - }; - }); - frm.set_query("department", "instructor_log", function() { - return { - "filters": { - "company": d.company, - } - }; - }); - }); - }, - refresh: function(frm) { - if (!frm.doc.__islocal) { - frm.add_custom_button(__("As Examiner"), function() { - frappe.new_doc("Assessment Plan", { - examiner: frm.doc.name - }); - }, __("Assessment Plan")); - frm.add_custom_button(__("As Supervisor"), function() { - frappe.new_doc("Assessment Plan", { - supervisor: frm.doc.name - }); - }, __("Assessment Plan")); - } - frm.set_query("employee", function(doc) { - return { - "filters": { - "department": doc.department, - } - }; - }); - - frm.set_query("academic_term", "instructor_log", function(_doc, cdt, cdn) { - let d = locals[cdt][cdn]; - return { - filters: { - "academic_year": d.academic_year - } - }; - }); - - frm.set_query("course", "instructor_log", function(_doc, cdt, cdn) { - let d = locals[cdt][cdn]; - return { - query: "erpnext.education.doctype.program_enrollment.program_enrollment.get_program_courses", - filters: { - "program": d.program - } - }; - }); - } -}); diff --git a/erpnext/education/doctype/instructor/instructor.json b/erpnext/education/doctype/instructor/instructor.json deleted file mode 100644 index a417391711..0000000000 --- a/erpnext/education/doctype/instructor/instructor.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2015-11-04 15:56:30.004034", - "doctype": "DocType", - "document_type": "Other", - "engine": "InnoDB", - "field_order": [ - "instructor_name", - "employee", - "gender", - "column_break_5", - "status", - "naming_series", - "department", - "image", - "log_details", - "instructor_log" - ], - "fields": [ - { - "fieldname": "instructor_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Instructor Name", - "reqd": 1 - }, - { - "fieldname": "employee", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Employee", - "options": "Employee" - }, - { - "fieldname": "column_break_5", - "fieldtype": "Column Break" - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Naming Series", - "options": "EDU-INS-.YYYY.-", - "set_only_once": 1 - }, - { - "fetch_from": "employee.department", - "fieldname": "department", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Department", - "options": "Department" - }, - { - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Image" - }, - { - "fieldname": "log_details", - "fieldtype": "Section Break", - "label": "Instructor Log" - }, - { - "fieldname": "instructor_log", - "fieldtype": "Table", - "label": "Instructor Log", - "options": "Instructor Log" - }, - { - "default": "Active", - "fieldname": "status", - "fieldtype": "Select", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Status", - "options": "Active\nLeft" - }, - { - "fetch_from": "employee.gender", - "fieldname": "gender", - "fieldtype": "Link", - "label": "Gender", - "options": "Gender", - "read_only_depends_on": "employee" - } - ], - "image_field": "image", - "links": [], - "modified": "2020-07-23 18:33:57.904398", - "modified_by": "Administrator", - "module": "Education", - "name": "Instructor", - "owner": "Administrator", - "permissions": [ - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor" - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Education Manager", - "set_user_permissions": 1, - "share": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "instructor_name" -} \ No newline at end of file diff --git a/erpnext/education/doctype/instructor/instructor.py b/erpnext/education/doctype/instructor/instructor.py deleted file mode 100644 index 24e0607e2d..0000000000 --- a/erpnext/education/doctype/instructor/instructor.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.model.naming import set_name_by_naming_series - - -class Instructor(Document): - def autoname(self): - naming_method = frappe.db.get_value("Education Settings", None, "instructor_created_by") - if not naming_method: - frappe.throw(_("Please setup Instructor Naming System in Education > Education Settings")) - else: - if naming_method == "Naming Series": - set_name_by_naming_series(self) - elif naming_method == "Employee Number": - if not self.employee: - frappe.throw(_("Please select Employee")) - self.name = self.employee - elif naming_method == "Full Name": - self.name = self.instructor_name - - def validate(self): - self.validate_duplicate_employee() - - def validate_duplicate_employee(self): - if self.employee and frappe.db.get_value( - "Instructor", {"employee": self.employee, "name": ["!=", self.name]}, "name" - ): - frappe.throw(_("Employee ID is linked with another instructor")) - - -def get_timeline_data(doctype, name): - """Return timeline for course schedule""" - return dict( - frappe.db.sql( - """ - SELECT unix_timestamp(`schedule_date`), count(*) - FROM `tabCourse Schedule` - WHERE - instructor=%s and - `schedule_date` > date_sub(curdate(), interval 1 year) - GROUP BY schedule_date - """, - name, - ) - ) diff --git a/erpnext/education/doctype/instructor/instructor_dashboard.py b/erpnext/education/doctype/instructor/instructor_dashboard.py deleted file mode 100644 index ead10ca7f8..0000000000 --- a/erpnext/education/doctype/instructor/instructor_dashboard.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from frappe import _ - - -def get_data(): - return { - "heatmap": True, - "heatmap_message": _("This is based on the course schedules of this Instructor"), - "fieldname": "instructor", - "non_standard_fieldnames": {"Assessment Plan": "supervisor"}, - "transactions": [ - {"label": _("Course and Assessment"), "items": ["Course Schedule", "Assessment Plan"]}, - {"label": _("Students"), "items": ["Student Group"]}, - ], - } diff --git a/erpnext/education/doctype/instructor/test_instructor.py b/erpnext/education/doctype/instructor/test_instructor.py deleted file mode 100644 index ee1e81dd30..0000000000 --- a/erpnext/education/doctype/instructor/test_instructor.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Instructor') - - -class TestInstructor(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/instructor/test_records.json b/erpnext/education/doctype/instructor/test_records.json deleted file mode 100644 index 220d84eb96..0000000000 --- a/erpnext/education/doctype/instructor/test_records.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "naming_series": "_T-Instructor-", - "employee": "_T-Employee-00001", - "instructor_name": "_Test Instructor" - }, - { - "naming_series": "_T-Instructor-", - "employee": "_T-Employee-00002", - "instructor_name": "_Test Instructor 2" - } -] diff --git a/erpnext/education/doctype/instructor_log/__init__.py b/erpnext/education/doctype/instructor_log/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/instructor_log/instructor_log.json b/erpnext/education/doctype/instructor_log/instructor_log.json deleted file mode 100644 index 5b9e1f9b97..0000000000 --- a/erpnext/education/doctype/instructor_log/instructor_log.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "actions": [], - "creation": "2017-12-27 08:55:52.680284", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "academic_year", - "academic_term", - "department", - "column_break_3", - "program", - "course", - "student_group", - "section_break_8", - "other_details" - ], - "fields": [ - { - "fieldname": "academic_year", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Academic Year", - "options": "Academic Year", - "reqd": 1 - }, - { - "fieldname": "academic_term", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Academic Term", - "options": "Academic Term" - }, - { - "fieldname": "department", - "fieldtype": "Link", - "label": "Department", - "options": "Department" - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "program", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Program", - "options": "Program", - "reqd": 1 - }, - { - "fieldname": "course", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Course", - "options": "Course" - }, - { - "fieldname": "student_group", - "fieldtype": "Link", - "label": "Student Group", - "options": "Student Group" - }, - { - "fieldname": "section_break_8", - "fieldtype": "Section Break" - }, - { - "fieldname": "other_details", - "fieldtype": "Small Text", - "label": "Other details" - } - ], - "istable": 1, - "links": [], - "modified": "2020-10-23 15:15:50.759657", - "modified_by": "Administrator", - "module": "Education", - "name": "Instructor Log", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/instructor_log/instructor_log.py b/erpnext/education/doctype/instructor_log/instructor_log.py deleted file mode 100644 index 12d11ba005..0000000000 --- a/erpnext/education/doctype/instructor_log/instructor_log.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class InstructorLog(Document): - pass diff --git a/erpnext/education/doctype/options/__init__.py b/erpnext/education/doctype/options/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/options/options.json b/erpnext/education/doctype/options/options.json deleted file mode 100644 index 59deab7837..0000000000 --- a/erpnext/education/doctype/options/options.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-10-15 14:05:28.601274", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "option", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Option", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "is_correct", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Is Correct", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-10-15 14:16:18.303156", - "modified_by": "Administrator", - "module": "Education", - "name": "Options", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/options/options.py b/erpnext/education/doctype/options/options.py deleted file mode 100644 index 968a772900..0000000000 --- a/erpnext/education/doctype/options/options.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class Options(Document): - pass diff --git a/erpnext/education/doctype/program/__init__.py b/erpnext/education/doctype/program/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/program/program.js b/erpnext/education/doctype/program/program.js deleted file mode 100644 index 2d89351504..0000000000 --- a/erpnext/education/doctype/program/program.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2015, Frappe Technologies and contributors -// For license information, please see license.txt - -cur_frm.add_fetch('fee_structure', 'total_amount', 'amount'); - -frappe.ui.form.on("Program", "refresh", function(frm) { - -}); diff --git a/erpnext/education/doctype/program/program.json b/erpnext/education/doctype/program/program.json deleted file mode 100644 index 2dfe50b2f0..0000000000 --- a/erpnext/education/doctype/program/program.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:program_name", - "creation": "2015-09-07 12:54:03.609282", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "program_name", - "department", - "column_break_3", - "program_abbreviation", - "section_break_courses", - "courses", - "section_break_5", - "is_published", - "allow_self_enroll", - "is_featured", - "column_break_11", - "intro_video", - "hero_image", - "description" - ], - "fields": [ - { - "fieldname": "program_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Program Name", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "department", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Department", - "options": "Department" - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "program_abbreviation", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Program Abbreviation" - }, - { - "fieldname": "section_break_5", - "fieldtype": "Section Break", - "label": "Portal Settings" - }, - { - "fieldname": "courses", - "fieldtype": "Table", - "label": "Courses", - "options": "Program Course" - }, - { - "depends_on": "is_published", - "fieldname": "description", - "fieldtype": "Small Text", - "label": "Description" - }, - { - "depends_on": "is_published", - "fieldname": "intro_video", - "fieldtype": "Data", - "label": "Intro Video" - }, - { - "fieldname": "hero_image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Hero Image" - }, - { - "default": "0", - "fieldname": "is_published", - "fieldtype": "Check", - "label": "Is Published" - }, - { - "default": "0", - "depends_on": "eval: doc.is_published == 1", - "fieldname": "is_featured", - "fieldtype": "Check", - "label": "Is Featured" - }, - { - "default": "0", - "depends_on": "eval: doc.is_published == 1", - "fieldname": "allow_self_enroll", - "fieldtype": "Check", - "label": "Allow Self Enroll" - }, - { - "fieldname": "section_break_courses", - "fieldtype": "Section Break", - "label": "Courses" - }, - { - "fieldname": "column_break_11", - "fieldtype": "Column Break" - } - ], - "image_field": "hero_image", - "modified": "2019-06-12 12:31:14.999346", - "modified_by": "Administrator", - "module": "Education", - "name": "Program", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "share": 1, - "write": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Guest", - "share": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Student", - "share": 1 - } - ], - "restrict_to_domain": "Education", - "search_fields": "program_name", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/education/doctype/program/program.py b/erpnext/education/doctype/program/program.py deleted file mode 100644 index 5250f8c05e..0000000000 --- a/erpnext/education/doctype/program/program.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import frappe -from frappe.model.document import Document - - -class Program(Document): - def get_course_list(self): - program_course_list = self.courses - course_list = [ - frappe.get_doc("Course", program_course.course) for program_course in program_course_list - ] - return course_list diff --git a/erpnext/education/doctype/program/program_dashboard.py b/erpnext/education/doctype/program/program_dashboard.py deleted file mode 100644 index 21820618bb..0000000000 --- a/erpnext/education/doctype/program/program_dashboard.py +++ /dev/null @@ -1,13 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "fieldname": "program", - "transactions": [ - {"label": _("Admission and Enrollment"), "items": ["Student Applicant", "Program Enrollment"]}, - {"label": _("Student Activity"), "items": ["Student Group", "Student Log"]}, - {"label": _("Fee"), "items": ["Fees", "Fee Structure", "Fee Schedule"]}, - {"label": _("Assessment"), "items": ["Assessment Plan", "Assessment Result"]}, - ], - } diff --git a/erpnext/education/doctype/program/test_program.py b/erpnext/education/doctype/program/test_program.py deleted file mode 100644 index c3dbad2d16..0000000000 --- a/erpnext/education/doctype/program/test_program.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -import frappe - -from erpnext.education.doctype.course.test_course import make_course, make_course_and_linked_topic -from erpnext.education.doctype.topic.test_topic import make_topic_and_linked_content - -test_data = { - "program_name": "_Test Program", - "description": "_Test Program", - "course": [ - { - "course_name": "_Test Course 1", - "topic": [ - { - "topic_name": "_Test Topic 1-1", - "content": [ - {"type": "Article", "name": "_Test Article 1-1"}, - {"type": "Article", "name": "_Test Article 1-2"}, - ], - }, - { - "topic_name": "_Test Topic 1-2", - "content": [ - {"type": "Article", "name": "_Test Article 1-3"}, - {"type": "Article", "name": "_Test Article 1-4"}, - ], - }, - ], - } - ], -} - - -class TestProgram(unittest.TestCase): - def setUp(self): - make_program_and_linked_courses("_Test Program 1", ["_Test Course 1", "_Test Course 2"]) - - def test_get_course_list(self): - program = frappe.get_doc("Program", "_Test Program 1") - course = program.get_course_list() - self.assertEqual(course[0].name, "_Test Course 1") - self.assertEqual(course[1].name, "_Test Course 2") - frappe.db.rollback() - - def tearDown(self): - for dt in ["Program", "Course", "Topic", "Article"]: - for entry in frappe.get_all(dt): - frappe.delete_doc(dt, entry.program) - - -def make_program(name): - program = frappe.get_doc( - { - "doctype": "Program", - "program_name": name, - "program_code": name, - "description": "_test description", - "is_published": True, - "is_featured": True, - } - ).insert() - return program.name - - -def make_program_and_linked_courses(program_name, course_name_list): - try: - program = frappe.get_doc("Program", program_name) - except frappe.DoesNotExistError: - make_program(program_name) - program = frappe.get_doc("Program", program_name) - course_list = [make_course(course_name) for course_name in course_name_list] - for course in course_list: - program.append("courses", {"course": course, "required": 1}) - program.save() - return program - - -def setup_program(): - topic_list = [course["topic"] for course in test_data["course"]] - for topic in topic_list[0]: - make_topic_and_linked_content(topic["topic_name"], topic["content"]) - - all_courses_list = [ - {"course": course["course_name"], "topic": [topic["topic_name"] for topic in course["topic"]]} - for course in test_data["course"] - ] # returns [{'course': 'Applied Math', 'topic': ['Trignometry', 'Geometry']}] - for course in all_courses_list: - make_course_and_linked_topic(course["course"], course["topic"]) - - course_list = [course["course_name"] for course in test_data["course"]] - program = make_program_and_linked_courses(test_data["program_name"], course_list) - return program diff --git a/erpnext/education/doctype/program/test_records.json b/erpnext/education/doctype/program/test_records.json deleted file mode 100644 index 4013695896..0000000000 --- a/erpnext/education/doctype/program/test_records.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "program_name": "_TP1", - "description": "Test Description", - "program_abbreviation": "TP1" - }, - { - "program_name": "_TP2", - "description": "Test Description", - "program_abbreviation": "TP2" - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/program_course/__init__.py b/erpnext/education/doctype/program_course/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/program_course/program_course.json b/erpnext/education/doctype/program_course/program_course.json deleted file mode 100644 index dc6b3fcef8..0000000000 --- a/erpnext/education/doctype/program_course/program_course.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "actions": [], - "creation": "2015-09-07 14:37:01.886859", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "course", - "course_name", - "required" - ], - "fields": [ - { - "fieldname": "course", - "fieldtype": "Link", - "in_global_search": 1, - "in_list_view": 1, - "label": "Course", - "options": "Course", - "reqd": 1 - }, - { - "fetch_from": "course.course_name", - "fieldname": "course_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Course Name", - "read_only": 1 - }, - { - "default": "1", - "fieldname": "required", - "fieldtype": "Check", - "in_list_view": 1, - "label": "Mandatory" - } - ], - "istable": 1, - "links": [], - "modified": "2020-09-15 18:14:22.816795", - "modified_by": "Administrator", - "module": "Education", - "name": "Program Course", - "owner": "Administrator", - "permissions": [], - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/program_course/program_course.py b/erpnext/education/doctype/program_course/program_course.py deleted file mode 100644 index dec392c42c..0000000000 --- a/erpnext/education/doctype/program_course/program_course.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class ProgramCourse(Document): - pass diff --git a/erpnext/education/doctype/program_enrollment/__init__.py b/erpnext/education/doctype/program_enrollment/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment.js b/erpnext/education/doctype/program_enrollment/program_enrollment.js deleted file mode 100644 index e92d063602..0000000000 --- a/erpnext/education/doctype/program_enrollment/program_enrollment.js +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2016, Frappe and contributors -// For license information, please see license.txt - - -frappe.ui.form.on('Program Enrollment', { - setup: function(frm) { - frm.add_fetch('fee_structure', 'total_amount', 'amount'); - }, - - onload: function(frm) { - frm.set_query('academic_term', function() { - return { - 'filters':{ - 'academic_year': frm.doc.academic_year - } - }; - }); - - frm.set_query('academic_term', 'fees', function() { - return { - 'filters':{ - 'academic_year': frm.doc.academic_year - } - }; - }); - - frm.fields_dict['fees'].grid.get_field('fee_structure').get_query = function(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - return { - filters: {'academic_term': d.academic_term} - } - }; - - if (frm.doc.program) { - frm.set_query('course', 'courses', function() { - return { - query: 'erpnext.education.doctype.program_enrollment.program_enrollment.get_program_courses', - filters: { - 'program': frm.doc.program - } - } - }); - } - - frm.set_query('student', function() { - return{ - query: 'erpnext.education.doctype.program_enrollment.program_enrollment.get_students', - filters: { - 'academic_year': frm.doc.academic_year, - 'academic_term': frm.doc.academic_term - } - } - }); - }, - - program: function(frm) { - frm.events.get_courses(frm); - if (frm.doc.program) { - frappe.call({ - method: 'erpnext.education.api.get_fee_schedule', - args: { - 'program': frm.doc.program, - 'student_category': frm.doc.student_category - }, - callback: function(r) { - if (r.message) { - frm.set_value('fees' ,r.message); - frm.events.get_courses(frm); - } - } - }); - } - }, - - student_category: function() { - frappe.ui.form.trigger('Program Enrollment', 'program'); - }, - - get_courses: function(frm) { - frm.set_value('courses',[]); - frappe.call({ - method: 'get_courses', - doc:frm.doc, - callback: function(r) { - if (r.message) { - frm.set_value('courses', r.message); - } - } - }) - } -}); - -frappe.ui.form.on('Program Enrollment Course', { - courses_add: function(frm){ - frm.fields_dict['courses'].grid.get_field('course').get_query = function(doc) { - var course_list = []; - if(!doc.__islocal) course_list.push(doc.name); - $.each(doc.courses, function(_idx, val) { - if (val.course) course_list.push(val.course); - }); - return { filters: [['Course', 'name', 'not in', course_list]] }; - }; - } -}); diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment.json b/erpnext/education/doctype/program_enrollment/program_enrollment.json deleted file mode 100644 index 4a00fd0454..0000000000 --- a/erpnext/education/doctype/program_enrollment/program_enrollment.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "autoname": "EDU-ENR-.YYYY.-.#####", - "creation": "2015-12-02 12:58:32.916080", - "doctype": "DocType", - "document_type": "Document", - "engine": "InnoDB", - "field_order": [ - "student", - "student_name", - "student_category", - "student_batch_name", - "school_house", - "column_break_4", - "program", - "academic_year", - "academic_term", - "enrollment_date", - "boarding_student", - "enrolled_courses", - "courses", - "transportation", - "mode_of_transportation", - "column_break_13", - "vehicle_no", - "section_break_7", - "fees", - "amended_from", - "image" - ], - "fields": [ - { - "fieldname": "student", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Student", - "options": "Student", - "reqd": 1 - }, - { - "fetch_from": "student.title", - "fieldname": "student_name", - "fieldtype": "Read Only", - "in_global_search": 1, - "label": "Student Name", - "read_only": 1 - }, - { - "fieldname": "student_category", - "fieldtype": "Link", - "label": "Student Category", - "options": "Student Category" - }, - { - "allow_on_submit": 1, - "fieldname": "student_batch_name", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Student Batch", - "options": "Student Batch Name" - }, - { - "allow_on_submit": 1, - "fieldname": "school_house", - "fieldtype": "Link", - "label": "School House", - "options": "School House" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fieldname": "program", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Program", - "options": "Program", - "reqd": 1 - }, - { - "fieldname": "academic_year", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Academic Year", - "options": "Academic Year", - "reqd": 1 - }, - { - "fieldname": "academic_term", - "fieldtype": "Link", - "label": "Academic Term", - "options": "Academic Term" - }, - { - "default": "Today", - "fieldname": "enrollment_date", - "fieldtype": "Date", - "label": "Enrollment Date", - "reqd": 1 - }, - { - "default": "0", - "description": "Check this if the Student is residing at the Institute's Hostel.", - "fieldname": "boarding_student", - "fieldtype": "Check", - "label": "Boarding Student" - }, - { - "collapsible": 1, - "collapsible_depends_on": "vehicle_no", - "fieldname": "transportation", - "fieldtype": "Section Break", - "label": "Transportation" - }, - { - "allow_on_submit": 1, - "fieldname": "mode_of_transportation", - "fieldtype": "Select", - "label": "Mode of Transportation", - "options": "\nWalking\nInstitute's Bus\nPublic Transport\nSelf-Driving Vehicle\nPick/Drop by Guardian" - }, - { - "fieldname": "column_break_13", - "fieldtype": "Column Break" - }, - { - "allow_on_submit": 1, - "fieldname": "vehicle_no", - "fieldtype": "Data", - "label": "Vehicle/Bus Number" - }, - { - "fieldname": "enrolled_courses", - "fieldtype": "Section Break", - "label": "Enrolled courses" - }, - { - "allow_on_submit": 1, - "fieldname": "courses", - "fieldtype": "Table", - "label": "Courses", - "options": "Program Enrollment Course" - }, - { - "collapsible": 1, - "fieldname": "section_break_7", - "fieldtype": "Section Break", - "label": "Fees" - }, - { - "fieldname": "fees", - "fieldtype": "Table", - "label": "Fees", - "options": "Program Fee" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Program Enrollment", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Image" - } - ], - "image_field": "image", - "is_submittable": 1, - "links": [], - "modified": "2020-09-15 18:12:11.988565", - "modified_by": "Administrator", - "module": "Education", - "name": "Program Enrollment", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "create": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "LMS User", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "student_name" -} \ No newline at end of file diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment.py b/erpnext/education/doctype/program_enrollment/program_enrollment.py deleted file mode 100644 index 69d281b938..0000000000 --- a/erpnext/education/doctype/program_enrollment/program_enrollment.py +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright (c) 2015, Frappe and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _, msgprint -from frappe.desk.reportview import get_match_cond -from frappe.model.document import Document -from frappe.query_builder.functions import Min -from frappe.utils import comma_and, get_link_to_form, getdate - - -class ProgramEnrollment(Document): - def validate(self): - self.validate_duplication() - self.validate_academic_year() - if self.academic_term: - self.validate_academic_term() - if not self.student_name: - self.student_name = frappe.db.get_value("Student", self.student, "title") - if not self.courses: - self.extend("courses", self.get_courses()) - - def on_submit(self): - self.update_student_joining_date() - self.make_fee_records() - self.create_course_enrollments() - - def validate_academic_year(self): - start_date, end_date = frappe.db.get_value( - "Academic Year", self.academic_year, ["year_start_date", "year_end_date"] - ) - if self.enrollment_date: - if start_date and getdate(self.enrollment_date) < getdate(start_date): - frappe.throw( - _("Enrollment Date cannot be before the Start Date of the Academic Year {0}").format( - get_link_to_form("Academic Year", self.academic_year) - ) - ) - - if end_date and getdate(self.enrollment_date) > getdate(end_date): - frappe.throw( - _("Enrollment Date cannot be after the End Date of the Academic Term {0}").format( - get_link_to_form("Academic Year", self.academic_year) - ) - ) - - def validate_academic_term(self): - start_date, end_date = frappe.db.get_value( - "Academic Term", self.academic_term, ["term_start_date", "term_end_date"] - ) - if self.enrollment_date: - if start_date and getdate(self.enrollment_date) < getdate(start_date): - frappe.throw( - _("Enrollment Date cannot be before the Start Date of the Academic Term {0}").format( - get_link_to_form("Academic Term", self.academic_term) - ) - ) - - if end_date and getdate(self.enrollment_date) > getdate(end_date): - frappe.throw( - _("Enrollment Date cannot be after the End Date of the Academic Term {0}").format( - get_link_to_form("Academic Term", self.academic_term) - ) - ) - - def validate_duplication(self): - enrollment = frappe.get_all( - "Program Enrollment", - filters={ - "student": self.student, - "program": self.program, - "academic_year": self.academic_year, - "academic_term": self.academic_term, - "docstatus": ("<", 2), - "name": ("!=", self.name), - }, - ) - if enrollment: - frappe.throw(_("Student is already enrolled.")) - - def update_student_joining_date(self): - table = frappe.qb.DocType("Program Enrollment") - date = ( - frappe.qb.from_(table) - .select(Min(table.enrollment_date).as_("enrollment_date")) - .where(table.student == self.student) - ).run(as_dict=True) - - if date: - frappe.db.set_value("Student", self.student, "joining_date", date[0].enrollment_date) - - def make_fee_records(self): - from erpnext.education.api import get_fee_components - - fee_list = [] - for d in self.fees: - fee_components = get_fee_components(d.fee_structure) - if fee_components: - fees = frappe.new_doc("Fees") - fees.update( - { - "student": self.student, - "academic_year": self.academic_year, - "academic_term": d.academic_term, - "fee_structure": d.fee_structure, - "program": self.program, - "due_date": d.due_date, - "student_name": self.student_name, - "program_enrollment": self.name, - "components": fee_components, - } - ) - - fees.save() - fees.submit() - fee_list.append(fees.name) - if fee_list: - fee_list = [ - """%s""" % (fee, fee) for fee in fee_list - ] - msgprint(_("Fee Records Created - {0}").format(comma_and(fee_list))) - - @frappe.whitelist() - def get_courses(self): - return frappe.db.sql( - """select course from `tabProgram Course` where parent = %s and required = 1""", - (self.program), - as_dict=1, - ) - - def create_course_enrollments(self): - student = frappe.get_doc("Student", self.student) - course_list = [course.course for course in self.courses] - for course_name in course_list: - student.enroll_in_course( - course_name=course_name, program_enrollment=self.name, enrollment_date=self.enrollment_date - ) - - def get_all_course_enrollments(self): - course_enrollment_names = frappe.get_list( - "Course Enrollment", filters={"program_enrollment": self.name} - ) - return [ - frappe.get_doc("Course Enrollment", course_enrollment.name) - for course_enrollment in course_enrollment_names - ] - - def get_quiz_progress(self): - student = frappe.get_doc("Student", self.student) - quiz_progress = frappe._dict() - progress_list = [] - for course_enrollment in self.get_all_course_enrollments(): - course_progress = course_enrollment.get_progress(student) - for progress_item in course_progress: - if progress_item["content_type"] == "Quiz": - progress_item["course"] = course_enrollment.course - progress_list.append(progress_item) - if not progress_list: - return None - quiz_progress.quiz_attempt = progress_list - quiz_progress.name = self.program - quiz_progress.program = self.program - return quiz_progress - - -@frappe.whitelist() -@frappe.validate_and_sanitize_search_inputs -def get_program_courses(doctype, txt, searchfield, start, page_len, filters): - if not filters.get("program"): - frappe.msgprint(_("Please select a Program first.")) - return [] - - return frappe.db.sql( - """select course, course_name from `tabProgram Course` - where parent = %(program)s and course like %(txt)s {match_cond} - order by - if(locate(%(_txt)s, course), locate(%(_txt)s, course), 99999), - idx desc, - `tabProgram Course`.course asc - limit {start}, {page_len}""".format( - match_cond=get_match_cond(doctype), start=start, page_len=page_len - ), - {"txt": "%{0}%".format(txt), "_txt": txt.replace("%", ""), "program": filters["program"]}, - ) - - -@frappe.whitelist() -@frappe.validate_and_sanitize_search_inputs -def get_students(doctype, txt, searchfield, start, page_len, filters): - if not filters.get("academic_term"): - filters["academic_term"] = frappe.defaults.get_defaults().academic_term - - if not filters.get("academic_year"): - filters["academic_year"] = frappe.defaults.get_defaults().academic_year - - enrolled_students = frappe.get_list( - "Program Enrollment", - filters={ - "academic_term": filters.get("academic_term"), - "academic_year": filters.get("academic_year"), - }, - fields=["student"], - ) - - students = [d.student for d in enrolled_students] if enrolled_students else [""] - - return frappe.db.sql( - """select - name, title from tabStudent - where - name not in (%s) - and - `%s` LIKE %s - order by - idx desc, name - limit %s, %s""" - % (", ".join(["%s"] * len(students)), searchfield, "%s", "%s", "%s"), - tuple(students + ["%%%s%%" % txt, start, page_len]), - ) diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py b/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py deleted file mode 100644 index c308961d8c..0000000000 --- a/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py +++ /dev/null @@ -1,9 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "fieldname": "program_enrollment", - "transactions": [{"label": _("Course and Fee"), "items": ["Course Enrollment", "Fees"]}], - "reports": [{"label": _("Report"), "items": ["Student and Guardian Contact Details"]}], - } diff --git a/erpnext/education/doctype/program_enrollment/test_program_enrollment.py b/erpnext/education/doctype/program_enrollment/test_program_enrollment.py deleted file mode 100644 index 4d43175fef..0000000000 --- a/erpnext/education/doctype/program_enrollment/test_program_enrollment.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2015, Frappe and Contributors -# See license.txt - -import unittest - -import frappe - -from erpnext.education.doctype.program.test_program import make_program_and_linked_courses -from erpnext.education.doctype.student.test_student import create_student, get_student - - -class TestProgramEnrollment(unittest.TestCase): - def setUp(self): - create_student( - { - "first_name": "_Test Name", - "last_name": "_Test Last Name", - "email": "_test_student@example.com", - } - ) - make_program_and_linked_courses("_Test Program 1", ["_Test Course 1", "_Test Course 2"]) - - def test_create_course_enrollments(self): - student = get_student("_test_student@example.com") - enrollment = student.enroll_in_program("_Test Program 1") - course_enrollments = student.get_all_course_enrollments() - self.assertTrue("_Test Course 1" in course_enrollments.keys()) - self.assertTrue("_Test Course 2" in course_enrollments.keys()) - frappe.db.rollback() - - def tearDown(self): - for entry in frappe.db.get_all("Course Enrollment"): - frappe.delete_doc("Course Enrollment", entry.name) - - for entry in frappe.db.get_all("Program Enrollment"): - doc = frappe.get_doc("Program Enrollment", entry.name) - doc.cancel() - doc.delete() diff --git a/erpnext/education/doctype/program_enrollment_course/__init__.py b/erpnext/education/doctype/program_enrollment_course/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.json b/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.json deleted file mode 100644 index 502a40165a..0000000000 --- a/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-04-10 19:28:19.616308", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "course", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Course", - "length": 0, - "no_copy": 0, - "options": "Course", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "course.course_name", - "fieldname": "course_name", - "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": 0, - "label": "Course Name", - "length": 0, - "no_copy": 0, - "options": "", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-05-16 22:42:39.136276", - "modified_by": "Administrator", - "module": "Education", - "name": "Program Enrollment Course", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.py b/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.py deleted file mode 100644 index 8b2d82c5ee..0000000000 --- a/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class ProgramEnrollmentCourse(Document): - pass diff --git a/erpnext/education/doctype/program_enrollment_fee/__init__.py b/erpnext/education/doctype/program_enrollment_fee/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.json b/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.json deleted file mode 100644 index 0af28155e2..0000000000 --- a/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-05-19 05:52:56.322125", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_term", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Academic Term", - "length": 0, - "no_copy": 0, - "options": "Academic Term", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "fee_structure", - "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": "Fee Structure", - "length": 0, - "no_copy": 0, - "options": "Fee Structure", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_3", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "due_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Due Date", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Amount", - "length": 0, - "no_copy": 0, - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-10 19:11:07.516632", - "modified_by": "Administrator", - "module": "Education", - "name": "Program Enrollment Fee", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.py b/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.py deleted file mode 100644 index 17d410f7b2..0000000000 --- a/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class ProgramEnrollmentFee(Document): - pass diff --git a/erpnext/education/doctype/program_enrollment_tool/__init__.py b/erpnext/education/doctype/program_enrollment_tool/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.js b/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.js deleted file mode 100644 index 06d7598194..0000000000 --- a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2016, Frappe and contributors -// For license information, please see license.txt - -frappe.ui.form.on("Program Enrollment Tool", { - setup: function(frm) { - frm.add_fetch("student", "title", "student_name"); - frm.add_fetch("student_applicant", "title", "student_name"); - if(frm.doc.__onload && frm.doc.__onload.academic_term_reqd) { - frm.toggle_reqd("academic_term", true); - } - }, - - "refresh": function(frm) { - frm.disable_save(); - frm.fields_dict.enroll_students.$input.addClass(' btn btn-primary'); - frappe.realtime.on("program_enrollment_tool", function(data) { - frappe.hide_msgprint(true); - frappe.show_progress(__("Enrolling students"), data.progress[0], data.progress[1]); - }); - }, - - get_students_from: function(frm) { - if (frm.doc.get_students_from == "Student Applicant") { - frm.dashboard.add_comment(__('Only the Student Applicant with the status "Approved" will be selected in the table below.')); - } - }, - - "get_students": function(frm) { - frm.set_value("students",[]); - frappe.call({ - method: "get_students", - doc:frm.doc, - callback: function(r) { - if(r.message) { - frm.set_value("students", r.message); - } - } - }); - }, - - "enroll_students": function(frm) { - frappe.call({ - method: "enroll_students", - doc:frm.doc, - callback: function(r) { - frm.set_value("students", []); - frappe.hide_msgprint(true); - } - }); - } -}); diff --git a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.json b/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.json deleted file mode 100644 index 35ad98d120..0000000000 --- a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.json +++ /dev/null @@ -1,553 +0,0 @@ -{ - "allow_copy": 1, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-06-10 03:01:05.178956", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 0, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "get_students_from", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Get Students From", - "length": 0, - "no_copy": 0, - "options": "\nStudent Applicant\nProgram Enrollment", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "program", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Program", - "length": 0, - "no_copy": 0, - "options": "Program", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.get_students_from==\"Program Enrollment\"", - "fieldname": "student_batch", - "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": "Student Batch", - "length": 0, - "no_copy": 0, - "options": "Student Batch Name", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_3", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_year", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Academic Year", - "length": 0, - "no_copy": 0, - "options": "Academic Year", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_term", - "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": "Academic Term", - "length": 0, - "no_copy": 0, - "options": "Academic Term", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_5", - "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, - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "get_students", - "fieldtype": "Button", - "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": "Get Students", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "students", - "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": "Students", - "length": 0, - "no_copy": 0, - "options": "Program Enrollment Tool Student", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_7", - "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": "Enrollment 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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.get_students_from==\"Program Enrollment\"", - "fieldname": "new_program", - "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": "New Program", - "length": 0, - "no_copy": 0, - "options": "Program", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "new_student_batch", - "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": "New Student Batch", - "length": 0, - "no_copy": 0, - "options": "Student Batch Name", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "enroll_students", - "fieldtype": "Button", - "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": "Enroll Students", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_12", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.get_students_from==\"Program Enrollment\"", - "fieldname": "new_academic_year", - "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": "New Academic Year", - "length": 0, - "no_copy": 0, - "options": "Academic Year", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.get_students_from==\"Program Enrollment\"", - "fieldname": "new_academic_term", - "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": "New Academic Term", - "length": 0, - "no_copy": 0, - "options": "Academic Term", - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 1, - "hide_toolbar": 1, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "max_attachments": 0, - "modified": "2018-07-26 04:44:13.232146", - "modified_by": "Administrator", - "module": "Education", - "name": "Program Enrollment Tool", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Education Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.py b/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.py deleted file mode 100644 index 9e72876f19..0000000000 --- a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (c) 2015, Frappe and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import cint - -from erpnext.education.api import enroll_student - - -class ProgramEnrollmentTool(Document): - def onload(self): - academic_term_reqd = cint(frappe.db.get_single_value("Education Settings", "academic_term_reqd")) - self.set_onload("academic_term_reqd", academic_term_reqd) - - @frappe.whitelist() - def get_students(self): - students = [] - if not self.get_students_from: - frappe.throw(_("Mandatory field - Get Students From")) - elif not self.program: - frappe.throw(_("Mandatory field - Program")) - elif not self.academic_year: - frappe.throw(_("Mandatory field - Academic Year")) - else: - condition = "and academic_term=%(academic_term)s" if self.academic_term else " " - if self.get_students_from == "Student Applicant": - students = frappe.db.sql( - """select name as student_applicant, title as student_name from `tabStudent Applicant` - where application_status="Approved" and program=%(program)s and academic_year=%(academic_year)s {0}""".format( - condition - ), - self.as_dict(), - as_dict=1, - ) - elif self.get_students_from == "Program Enrollment": - condition2 = "and student_batch_name=%(student_batch)s" if self.student_batch else " " - students = frappe.db.sql( - """select student, student_name, student_batch_name, student_category from `tabProgram Enrollment` - where program=%(program)s and academic_year=%(academic_year)s {0} {1} and docstatus != 2""".format( - condition, condition2 - ), - self.as_dict(), - as_dict=1, - ) - - student_list = [d.student for d in students] - if student_list: - inactive_students = frappe.db.sql( - """ - select name as student, title as student_name from `tabStudent` where name in (%s) and enabled = 0""" - % ", ".join(["%s"] * len(student_list)), - tuple(student_list), - as_dict=1, - ) - - for student in students: - if student.student in [d.student for d in inactive_students]: - students.remove(student) - - if students: - return students - else: - frappe.throw(_("No students Found")) - - @frappe.whitelist() - def enroll_students(self): - total = len(self.students) - for i, stud in enumerate(self.students): - frappe.publish_realtime( - "program_enrollment_tool", dict(progress=[i + 1, total]), user=frappe.session.user - ) - if stud.student: - prog_enrollment = frappe.new_doc("Program Enrollment") - prog_enrollment.student = stud.student - prog_enrollment.student_name = stud.student_name - prog_enrollment.student_category = stud.student_category - prog_enrollment.program = self.new_program - prog_enrollment.academic_year = self.new_academic_year - prog_enrollment.academic_term = self.new_academic_term - prog_enrollment.student_batch_name = ( - stud.student_batch_name if stud.student_batch_name else self.new_student_batch - ) - prog_enrollment.save() - elif stud.student_applicant: - prog_enrollment = enroll_student(stud.student_applicant) - prog_enrollment.academic_year = self.academic_year - prog_enrollment.academic_term = self.academic_term - prog_enrollment.student_batch_name = ( - stud.student_batch_name if stud.student_batch_name else self.new_student_batch - ) - prog_enrollment.save() - frappe.msgprint(_("{0} Students have been enrolled").format(total)) diff --git a/erpnext/education/doctype/program_enrollment_tool/test_program_enrollment_tool.py b/erpnext/education/doctype/program_enrollment_tool/test_program_enrollment_tool.py deleted file mode 100644 index e806792eec..0000000000 --- a/erpnext/education/doctype/program_enrollment_tool/test_program_enrollment_tool.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestProgramEnrollmentTool(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/program_enrollment_tool_student/__init__.py b/erpnext/education/doctype/program_enrollment_tool_student/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.json b/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.json deleted file mode 100644 index 1d7497387f..0000000000 --- a/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "actions": [], - "creation": "2016-06-10 03:29:02.539914", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "student_applicant", - "student", - "student_name", - "column_break_3", - "student_batch_name", - "student_category" - ], - "fields": [ - { - "fieldname": "student_applicant", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Student Applicant", - "options": "Student Applicant" - }, - { - "fieldname": "student", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Student", - "options": "Student" - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "student_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Student Name", - "read_only": 1 - }, - { - "fieldname": "student_batch_name", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Student Batch Name", - "options": "Student Batch Name" - }, - { - "fieldname": "student_category", - "fieldtype": "Link", - "label": "Student Category", - "options": "Student Category", - "read_only": 1 - } - ], - "istable": 1, - "links": [], - "modified": "2021-07-29 18:19:54.471594", - "modified_by": "Administrator", - "module": "Education", - "name": "Program Enrollment Tool Student", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.py b/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.py deleted file mode 100644 index b37e5d343e..0000000000 --- a/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class ProgramEnrollmentToolStudent(Document): - pass diff --git a/erpnext/education/doctype/program_fee/__init__.py b/erpnext/education/doctype/program_fee/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/program_fee/program_fee.json b/erpnext/education/doctype/program_fee/program_fee.json deleted file mode 100644 index d45e4bd240..0000000000 --- a/erpnext/education/doctype/program_fee/program_fee.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-05-19 05:52:56.322125", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_term", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Academic Term", - "length": 0, - "no_copy": 0, - "options": "Academic Term", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "fee_structure", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Fee Structure", - "length": 0, - "no_copy": 0, - "options": "Fee Structure", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_category", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Student Category", - "length": 0, - "no_copy": 0, - "options": "Student Category", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_3", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "due_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Due Date", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Amount", - "length": 0, - "no_copy": 0, - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-10 19:07:10.426335", - "modified_by": "Administrator", - "module": "Education", - "name": "Program Fee", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/program_fee/program_fee.py b/erpnext/education/doctype/program_fee/program_fee.py deleted file mode 100644 index e9a0be102c..0000000000 --- a/erpnext/education/doctype/program_fee/program_fee.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class ProgramFee(Document): - pass diff --git a/erpnext/education/doctype/question/__init__.py b/erpnext/education/doctype/question/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/question/question.js b/erpnext/education/doctype/question/question.js deleted file mode 100644 index 01b3091b58..0000000000 --- a/erpnext/education/doctype/question/question.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Question', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/question/question.json b/erpnext/education/doctype/question/question.json deleted file mode 100644 index e396760616..0000000000 --- a/erpnext/education/doctype/question/question.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "allow_import": 1, - "autoname": "format:QUESTION-{#####}", - "creation": "2018-10-01 15:58:00.696815", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "question", - "options", - "question_type" - ], - "fields": [ - { - "fieldname": "question", - "fieldtype": "Text Editor", - "in_list_view": 1, - "label": "Question", - "reqd": 1 - }, - { - "fieldname": "options", - "fieldtype": "Table", - "label": "Options", - "options": "Options", - "reqd": 1 - }, - { - "fieldname": "question_type", - "fieldtype": "Select", - "in_standard_filter": 1, - "label": "Type", - "options": "\nSingle Correct Answer\nMultiple Correct Answer", - "read_only": 1 - } - ], - "modified": "2020-09-24 18:39:21.880974", - "modified_by": "Administrator", - "module": "Education", - "name": "Question", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "share": 1, - "write": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "LMS User", - "share": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC" -} diff --git a/erpnext/education/doctype/question/question.py b/erpnext/education/doctype/question/question.py deleted file mode 100644 index 99910b3c90..0000000000 --- a/erpnext/education/doctype/question/question.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document - - -class Question(Document): - def validate(self): - self.check_at_least_one_option() - self.check_minimum_one_correct_answer() - self.set_question_type() - - def check_at_least_one_option(self): - if len(self.options) <= 1: - frappe.throw(_("A question must have more than one options")) - else: - pass - - def check_minimum_one_correct_answer(self): - correct_options = [option.is_correct for option in self.options] - if bool(sum(correct_options)): - pass - else: - frappe.throw(_("A qustion must have at least one correct options")) - - def set_question_type(self): - correct_options = [option for option in self.options if option.is_correct] - if len(correct_options) > 1: - self.question_type = "Multiple Correct Answer" - else: - self.question_type = "Single Correct Answer" - - def get_answer(self): - options = self.options - answers = [item.name for item in options if item.is_correct == True] - if len(answers) == 0: - frappe.throw(_("No correct answer is set for {0}").format(self.name)) - return None - elif len(answers) == 1: - return answers[0] - else: - return answers diff --git a/erpnext/education/doctype/question/test_question.py b/erpnext/education/doctype/question/test_question.py deleted file mode 100644 index 7506d84a09..0000000000 --- a/erpnext/education/doctype/question/test_question.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestQuestion(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/quiz/__init__.py b/erpnext/education/doctype/quiz/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/quiz/quiz.js b/erpnext/education/doctype/quiz/quiz.js deleted file mode 100644 index 320869be31..0000000000 --- a/erpnext/education/doctype/quiz/quiz.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Quiz', { - refresh: function(frm) { - if (!frm.doc.__islocal) { - frm.add_custom_button(__('Add to Topics'), function() { - frm.trigger('add_quiz_to_topics'); - }, __('Action')); - } - }, - - validate: function(frm){ - frm.events.check_duplicate_question(frm.doc.question); - }, - - check_duplicate_question: function(questions_data){ - var questions = []; - questions_data.forEach(function(q){ - questions.push(q.question_link); - }); - var questions_set = new Set(questions); - if (questions.length != questions_set.size) { - frappe.throw(__('The question cannot be duplicate')); - } - }, - - add_quiz_to_topics: function(frm) { - get_topics_without_quiz(frm.doc.name).then(r => { - if (r.message.length) { - frappe.prompt([ - { - fieldname: 'topics', - label: __('Topics'), - fieldtype: 'MultiSelectPills', - get_data: function() { - return r.message; - } - } - ], - function(data) { - frappe.call({ - method: 'erpnext.education.doctype.topic.topic.add_content_to_topics', - args: { - 'content_type': 'Quiz', - 'content': frm.doc.name, - 'topics': data.topics, - }, - callback: function(r) { - if (!r.exc) { - frm.reload_doc(); - } - }, - freeze: true, - freeze_message: __('...Adding Quiz to Topics') - }); - }, __('Add Quiz to Topics'), __('Add')); - } else { - frappe.msgprint(__('This quiz is already added to the existing topics')); - } - }); - } -}); - -let get_topics_without_quiz = function(quiz) { - return frappe.call({ - type: 'GET', - method: 'erpnext.education.doctype.quiz.quiz.get_topics_without_quiz', - args: {'quiz': quiz} - }); -}; diff --git a/erpnext/education/doctype/quiz/quiz.json b/erpnext/education/doctype/quiz/quiz.json deleted file mode 100644 index 16d7d7e4bf..0000000000 --- a/erpnext/education/doctype/quiz/quiz.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:title", - "creation": "2018-10-17 05:52:50.149904", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "title", - "question", - "quiz_configuration_section", - "passing_score", - "max_attempts", - "grading_basis", - "column_break_7", - "is_time_bound", - "duration" - ], - "fields": [ - { - "fieldname": "title", - "fieldtype": "Data", - "label": "Title", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "question", - "fieldtype": "Table", - "label": "Question", - "options": "Quiz Question", - "reqd": 1 - }, - { - "fieldname": "quiz_configuration_section", - "fieldtype": "Section Break", - "label": "Quiz Configuration" - }, - { - "default": "75", - "description": "Score out of 100", - "fieldname": "passing_score", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Passing Score", - "reqd": 1 - }, - { - "default": "1", - "description": "Enter 0 to waive limit", - "fieldname": "max_attempts", - "fieldtype": "Int", - "in_list_view": 1, - "label": "Max Attempts", - "reqd": 1 - }, - { - "default": "Latest Highest Score", - "fieldname": "grading_basis", - "fieldtype": "Select", - "label": "Grading Basis", - "options": "Latest Highest Score\nLatest Attempt" - }, - { - "default": "0", - "fieldname": "is_time_bound", - "fieldtype": "Check", - "label": "Is Time-Bound" - }, - { - "depends_on": "is_time_bound", - "fieldname": "duration", - "fieldtype": "Duration", - "label": "Duration" - }, - { - "fieldname": "column_break_7", - "fieldtype": "Column Break" - } - ], - "links": [], - "modified": "2020-12-24 15:41:35.043262", - "modified_by": "Administrator", - "module": "Education", - "name": "Quiz", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "LMS User", - "share": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/quiz/quiz.py b/erpnext/education/doctype/quiz/quiz.py deleted file mode 100644 index 7a9cdf3d9a..0000000000 --- a/erpnext/education/doctype/quiz/quiz.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document - - -class Quiz(Document): - def validate(self): - if self.passing_score > 100: - frappe.throw(_("Passing Score value should be between 0 and 100")) - - def allowed_attempt(self, enrollment, quiz_name): - if self.max_attempts == 0: - return True - - try: - if ( - len(frappe.get_all("Quiz Activity", {"enrollment": enrollment.name, "quiz": quiz_name})) - >= self.max_attempts - ): - frappe.msgprint(_("Maximum attempts for this quiz reached!")) - return False - else: - return True - except Exception as e: - return False - - def evaluate(self, response_dict, quiz_name): - questions = [frappe.get_doc("Question", question.question_link) for question in self.question] - answers = {q.name: q.get_answer() for q in questions} - result = {} - for key in answers: - try: - if isinstance(response_dict[key], list): - is_correct = compare_list_elementwise(response_dict[key], answers[key]) - else: - is_correct = response_dict[key] == answers[key] - except Exception as e: - is_correct = False - result[key] = is_correct - score = (sum(result.values()) * 100) / len(answers) - if score >= self.passing_score: - status = "Pass" - else: - status = "Fail" - return result, score, status - - def get_questions(self): - return [frappe.get_doc("Question", question.question_link) for question in self.question] - - -def compare_list_elementwise(*args): - try: - if all(len(args[0]) == len(_arg) for _arg in args[1:]): - return all(all([element in (item) for element in args[0]]) for item in args[1:]) - else: - return False - except TypeError: - frappe.throw(_("Compare List function takes on list arguments")) - - -@frappe.whitelist() -def get_topics_without_quiz(quiz): - data = [] - for entry in frappe.db.get_all("Topic"): - topic = frappe.get_doc("Topic", entry.name) - topic_contents = [tc.content for tc in topic.topic_content] - if not topic_contents or quiz not in topic_contents: - data.append(topic.name) - return data diff --git a/erpnext/education/doctype/quiz/test_quiz.py b/erpnext/education/doctype/quiz/test_quiz.py deleted file mode 100644 index a69a0c1d58..0000000000 --- a/erpnext/education/doctype/quiz/test_quiz.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestQuiz(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/quiz_activity/__init__.py b/erpnext/education/doctype/quiz_activity/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/quiz_activity/quiz_activity.js b/erpnext/education/doctype/quiz_activity/quiz_activity.js deleted file mode 100644 index f6ba12ca4d..0000000000 --- a/erpnext/education/doctype/quiz_activity/quiz_activity.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Quiz Activity', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/quiz_activity/quiz_activity.json b/erpnext/education/doctype/quiz_activity/quiz_activity.json deleted file mode 100644 index 742c88754a..0000000000 --- a/erpnext/education/doctype/quiz_activity/quiz_activity.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "actions": [], - "autoname": "format:EDU-QA-{YYYY}-{#####}", - "beta": 1, - "creation": "2018-10-15 15:48:40.482821", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "enrollment", - "student", - "column_break_3", - "course", - "section_break_5", - "quiz", - "column_break_7", - "status", - "section_break_9", - "result", - "section_break_11", - "activity_date", - "score", - "column_break_14", - "time_taken" - ], - "fields": [ - { - "fieldname": "enrollment", - "fieldtype": "Link", - "label": "Enrollment", - "options": "Course Enrollment", - "set_only_once": 1 - }, - { - "fetch_from": "enrollment.student", - "fieldname": "student", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Student", - "options": "Student", - "read_only": 1 - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fetch_from": "enrollment.course", - "fieldname": "course", - "fieldtype": "Link", - "label": "Course", - "options": "Course", - "read_only": 1, - "set_only_once": 1 - }, - { - "fieldname": "section_break_5", - "fieldtype": "Section Break" - }, - { - "fieldname": "quiz", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Quiz", - "options": "Quiz", - "set_only_once": 1 - }, - { - "fieldname": "column_break_7", - "fieldtype": "Column Break" - }, - { - "fieldname": "status", - "fieldtype": "Select", - "label": "Status", - "options": "\nPass\nFail", - "read_only": 1 - }, - { - "fieldname": "section_break_9", - "fieldtype": "Section Break" - }, - { - "fieldname": "result", - "fieldtype": "Table", - "label": "Result", - "options": "Quiz Result", - "set_only_once": 1 - }, - { - "fieldname": "activity_date", - "fieldtype": "Data", - "label": "Activity Date", - "set_only_once": 1 - }, - { - "fieldname": "score", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Score", - "set_only_once": 1 - }, - { - "fieldname": "time_taken", - "fieldtype": "Duration", - "label": "Time Taken", - "set_only_once": 1 - }, - { - "fieldname": "section_break_11", - "fieldtype": "Section Break" - }, - { - "fieldname": "column_break_14", - "fieldtype": "Column Break" - } - ], - "links": [], - "modified": "2020-12-24 15:41:20.085380", - "modified_by": "Administrator", - "module": "Education", - "name": "Quiz Activity", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "LMS User", - "share": 1, - "write": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "share": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/quiz_activity/quiz_activity.py b/erpnext/education/doctype/quiz_activity/quiz_activity.py deleted file mode 100644 index a67f82fe07..0000000000 --- a/erpnext/education/doctype/quiz_activity/quiz_activity.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class QuizActivity(Document): - pass diff --git a/erpnext/education/doctype/quiz_activity/test_quiz_activity.py b/erpnext/education/doctype/quiz_activity/test_quiz_activity.py deleted file mode 100644 index 1040c1a869..0000000000 --- a/erpnext/education/doctype/quiz_activity/test_quiz_activity.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestQuizActivity(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/quiz_question/__init__.py b/erpnext/education/doctype/quiz_question/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/quiz_question/quiz_question.json b/erpnext/education/doctype/quiz_question/quiz_question.json deleted file mode 100644 index aab07a3e6b..0000000000 --- a/erpnext/education/doctype/quiz_question/quiz_question.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "allow_rename": 1, - "creation": "2018-10-17 06:13:00.098883", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "question_link", - "question" - ], - "fields": [ - { - "fieldname": "question_link", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Question Link", - "options": "Question", - "reqd": 1 - }, - { - "fetch_from": "question_link.question", - "fieldname": "question", - "fieldtype": "Text Editor", - "in_list_view": 1, - "label": "Question", - "read_only": 1 - } - ], - "istable": 1, - "modified": "2020-09-24 12:24:02.312577", - "modified_by": "Administrator", - "module": "Education", - "name": "Quiz Question", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} diff --git a/erpnext/education/doctype/quiz_question/quiz_question.py b/erpnext/education/doctype/quiz_question/quiz_question.py deleted file mode 100644 index 91641ebb30..0000000000 --- a/erpnext/education/doctype/quiz_question/quiz_question.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class QuizQuestion(Document): - pass diff --git a/erpnext/education/doctype/quiz_result/__init__.py b/erpnext/education/doctype/quiz_result/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/quiz_result/quiz_result.js b/erpnext/education/doctype/quiz_result/quiz_result.js deleted file mode 100644 index a018749e69..0000000000 --- a/erpnext/education/doctype/quiz_result/quiz_result.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Quiz Result', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/quiz_result/quiz_result.json b/erpnext/education/doctype/quiz_result/quiz_result.json deleted file mode 100644 index 67c7e2d449..0000000000 --- a/erpnext/education/doctype/quiz_result/quiz_result.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "creation": "2018-10-15 15:52:25.766374", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "question", - "selected_option", - "quiz_result" - ], - "fields": [ - { - "fieldname": "question", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Question", - "options": "Question", - "read_only": 1, - "reqd": 1, - "set_only_once": 1 - }, - { - "fieldname": "selected_option", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Selected Option", - "read_only": 1, - "set_only_once": 1 - }, - { - "fieldname": "quiz_result", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Result", - "options": "\nCorrect\nWrong", - "read_only": 1, - "reqd": 1, - "set_only_once": 1 - } - ], - "istable": 1, - "modified": "2019-06-03 12:52:32.267392", - "modified_by": "Administrator", - "module": "Education", - "name": "Quiz Result", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/quiz_result/quiz_result.py b/erpnext/education/doctype/quiz_result/quiz_result.py deleted file mode 100644 index 615281bad2..0000000000 --- a/erpnext/education/doctype/quiz_result/quiz_result.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class QuizResult(Document): - pass diff --git a/erpnext/education/doctype/quiz_result/test_quiz_result.py b/erpnext/education/doctype/quiz_result/test_quiz_result.py deleted file mode 100644 index 12098a77ff..0000000000 --- a/erpnext/education/doctype/quiz_result/test_quiz_result.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestQuizResult(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/room/__init__.py b/erpnext/education/doctype/room/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/room/room.js b/erpnext/education/doctype/room/room.js deleted file mode 100644 index 1263b60ced..0000000000 --- a/erpnext/education/doctype/room/room.js +++ /dev/null @@ -1,2 +0,0 @@ -frappe.ui.form.on("Room", { -}); diff --git a/erpnext/education/doctype/room/room.json b/erpnext/education/doctype/room/room.json deleted file mode 100644 index 888a0fa097..0000000000 --- a/erpnext/education/doctype/room/room.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "HTL-ROOM-.YYYY.-.#####", - "beta": 0, - "creation": "2015-09-09 16:20:14.613061", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 0, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "room_name", - "fieldtype": "Data", - "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": "Room Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "room_number", - "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": 0, - "label": "Room Number", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "seating_capacity", - "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": 0, - "label": "Seating Capacity", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "menu_index": 0, - "modified": "2018-08-21 16:15:46.096492", - "modified_by": "Administrator", - "module": "Education", - "name": "Room", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "room_name", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/room/room.py b/erpnext/education/doctype/room/room.py deleted file mode 100644 index a2a89805a8..0000000000 --- a/erpnext/education/doctype/room/room.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class Room(Document): - pass diff --git a/erpnext/education/doctype/room/room_dashboard.py b/erpnext/education/doctype/room/room_dashboard.py deleted file mode 100644 index dfc295cc44..0000000000 --- a/erpnext/education/doctype/room/room_dashboard.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from frappe import _ - - -def get_data(): - return { - "fieldname": "room", - "transactions": [ - {"label": _("Course"), "items": ["Course Schedule"]}, - {"label": _("Assessment"), "items": ["Assessment Plan"]}, - ], - } diff --git a/erpnext/education/doctype/room/test_records.json b/erpnext/education/doctype/room/test_records.json deleted file mode 100644 index 6edf076808..0000000000 --- a/erpnext/education/doctype/room/test_records.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "room_name": "_Test Room", - "room_number": "1001", - "seating_capacity": 100 - }, - { - "room_name": "_Test Room 1", - "room_number": "1002", - "seating_capacity": 100 - }, - { - "room_name": "_Test Room 2", - "room_number": "1003", - "seating_capacity": 100 - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/room/test_room.py b/erpnext/education/doctype/room/test_room.py deleted file mode 100644 index ea0baf2137..0000000000 --- a/erpnext/education/doctype/room/test_room.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Room') - - -class TestRoom(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/school_house/__init__.py b/erpnext/education/doctype/school_house/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/school_house/school_house.js b/erpnext/education/doctype/school_house/school_house.js deleted file mode 100644 index cf1dcd4c3c..0000000000 --- a/erpnext/education/doctype/school_house/school_house.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('School House', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/school_house/school_house.json b/erpnext/education/doctype/school_house/school_house.json deleted file mode 100644 index 8a653a9730..0000000000 --- a/erpnext/education/doctype/school_house/school_house.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "field:house_name", - "beta": 0, - "creation": "2017-03-27 15:19:54.672995", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "house_name", - "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": 0, - "label": "House Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2017-11-10 19:05:06.419022", - "modified_by": "Administrator", - "module": "Education", - "name": "School House", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/school_house/school_house.py b/erpnext/education/doctype/school_house/school_house.py deleted file mode 100644 index 52e0508758..0000000000 --- a/erpnext/education/doctype/school_house/school_house.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class SchoolHouse(Document): - pass diff --git a/erpnext/education/doctype/school_house/test_school_house.py b/erpnext/education/doctype/school_house/test_school_house.py deleted file mode 100644 index 7fe12d7436..0000000000 --- a/erpnext/education/doctype/school_house/test_school_house.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestSchoolHouse(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student/__init__.py b/erpnext/education/doctype/student/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student/student.js b/erpnext/education/doctype/student/student.js deleted file mode 100644 index aead556dc9..0000000000 --- a/erpnext/education/doctype/student/student.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Student', { - setup: function(frm) { - frm.add_fetch('guardian', 'guardian_name', 'guardian_name'); - frm.add_fetch('student', 'title', 'full_name'); - frm.add_fetch('student', 'gender', 'gender'); - frm.add_fetch('student', 'date_of_birth', 'date_of_birth'); - - frm.set_query('student', 'siblings', function(doc) { - return { - 'filters': { - 'name': ['!=', doc.name] - } - }; - }) - }, - refresh: function(frm) { - if(!frm.is_new()) { - - // custom buttons - frm.add_custom_button(__('Accounting Ledger'), function() { - frappe.set_route('query-report', 'General Ledger', - {party_type:'Student', party:frm.doc.name}); - }); - } - - frappe.db.get_value('Education Settings', {name: 'Education Settings'}, 'user_creation_skip', (r) => { - if (cint(r.user_creation_skip) !== 1) { - frm.set_df_property('student_email_id', 'reqd', 1); - } - }); - } -}); - -frappe.ui.form.on('Student Guardian', { - guardians_add: function(frm){ - frm.fields_dict['guardians'].grid.get_field('guardian').get_query = function(doc){ - let guardian_list = []; - if(!doc.__islocal) guardian_list.push(doc.guardian); - $.each(doc.guardians, function(idx, val){ - if (val.guardian) guardian_list.push(val.guardian); - }); - return { filters: [['Guardian', 'name', 'not in', guardian_list]] }; - }; - } -}); - - -frappe.ui.form.on('Student Sibling', { - siblings_add: function(frm){ - frm.fields_dict['siblings'].grid.get_field('student').get_query = function(doc){ - let sibling_list = [frm.doc.name]; - $.each(doc.siblings, function(idx, val){ - if (val.student && val.studying_in_same_institute == 'YES') { - sibling_list.push(val.student); - } - }); - return { filters: [['Student', 'name', 'not in', sibling_list]] }; - }; - } -}); diff --git a/erpnext/education/doctype/student/student.json b/erpnext/education/doctype/student/student.json deleted file mode 100644 index 8ba9a7fa11..0000000000 --- a/erpnext/education/doctype/student/student.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "allow_rename": 1, - "autoname": "naming_series:", - "creation": "2015-09-07 13:00:55.938280", - "doctype": "DocType", - "document_type": "Document", - "engine": "InnoDB", - "field_order": [ - "section_break_1", - "enabled", - "section_break_3", - "first_name", - "middle_name", - "last_name", - "user", - "column_break_4", - "naming_series", - "student_email_id", - "student_mobile_number", - "joining_date", - "image", - "section_break_7", - "date_of_birth", - "blood_group", - "column_break_3", - "gender", - "nationality", - "student_applicant", - "section_break_22", - "address_line_1", - "address_line_2", - "pincode", - "column_break_20", - "city", - "state", - "section_break_18", - "guardians", - "section_break_20", - "siblings", - "exit", - "date_of_leaving", - "leaving_certificate_number", - "column_break_31", - "reason_for_leaving", - "title" - ], - "fields": [ - { - "fieldname": "section_break_1", - "fieldtype": "Section Break" - }, - { - "default": "1", - "fieldname": "enabled", - "fieldtype": "Check", - "label": "Enabled" - }, - { - "fieldname": "section_break_3", - "fieldtype": "Section Break" - }, - { - "fieldname": "first_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "First Name", - "reqd": 1 - }, - { - "fieldname": "middle_name", - "fieldtype": "Data", - "label": "Middle Name" - }, - { - "fieldname": "last_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Last Name" - }, - { - "fieldname": "user", - "fieldtype": "Link", - "label": "User ID", - "options": "User" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Naming Series", - "no_copy": 1, - "options": "EDU-STU-.YYYY.-", - "set_only_once": 1 - }, - { - "fieldname": "student_email_id", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Student Email Address", - "unique": 1 - }, - { - "fieldname": "student_mobile_number", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Student Mobile Number" - }, - { - "default": "Today", - "fieldname": "joining_date", - "fieldtype": "Date", - "in_list_view": 1, - "label": "Joining Date" - }, - { - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Image", - "width": "10" - }, - { - "fieldname": "section_break_7", - "fieldtype": "Section Break", - "label": "Personal Details" - }, - { - "fieldname": "date_of_birth", - "fieldtype": "Date", - "label": "Date of Birth" - }, - { - "fieldname": "blood_group", - "fieldtype": "Select", - "label": "Blood Group", - "options": "\nA+\nA-\nB+\nB-\nO+\nO-\nAB+\nAB-" - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "gender", - "fieldtype": "Link", - "label": "Gender", - "options": "Gender" - }, - { - "fieldname": "nationality", - "fieldtype": "Data", - "label": "Nationality" - }, - { - "fieldname": "student_applicant", - "fieldtype": "Link", - "label": "Student Applicant", - "options": "Student Applicant", - "read_only": 1 - }, - { - "fieldname": "section_break_22", - "fieldtype": "Section Break", - "label": "Home Address" - }, - { - "fieldname": "address_line_1", - "fieldtype": "Data", - "label": "Address Line 1" - }, - { - "fieldname": "address_line_2", - "fieldtype": "Data", - "label": "Address Line 2" - }, - { - "fieldname": "pincode", - "fieldtype": "Data", - "label": "Pincode" - }, - { - "fieldname": "column_break_20", - "fieldtype": "Column Break" - }, - { - "fieldname": "city", - "fieldtype": "Data", - "label": "City" - }, - { - "fieldname": "state", - "fieldtype": "Data", - "label": "State" - }, - { - "fieldname": "section_break_18", - "fieldtype": "Section Break", - "label": "Guardian Details" - }, - { - "fieldname": "guardians", - "fieldtype": "Table", - "label": "Guardians", - "options": "Student Guardian" - }, - { - "collapsible": 1, - "fieldname": "section_break_20", - "fieldtype": "Section Break", - "label": "Sibling Details", - "options": "Country" - }, - { - "fieldname": "siblings", - "fieldtype": "Table", - "label": "Siblings", - "options": "Student Sibling" - }, - { - "collapsible": 1, - "fieldname": "exit", - "fieldtype": "Section Break", - "label": "Exit" - }, - { - "fieldname": "date_of_leaving", - "fieldtype": "Date", - "label": "Date of Leaving" - }, - { - "fieldname": "leaving_certificate_number", - "fieldtype": "Data", - "label": "Leaving Certificate Number" - }, - { - "fieldname": "column_break_31", - "fieldtype": "Column Break" - }, - { - "fieldname": "reason_for_leaving", - "fieldtype": "Text", - "label": "Reason For Leaving" - }, - { - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "label": "Title" - } - ], - "image_field": "image", - "links": [], - "modified": "2020-09-07 19:28:08.914568", - "modified_by": "Administrator", - "module": "Education", - "name": "Student", - "owner": "Administrator", - "permissions": [ - { - "read": 1, - "role": "Instructor" - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "import": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Student", - "share": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "LMS User", - "share": 1 - } - ], - "restrict_to_domain": "Education", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "title" -} \ No newline at end of file diff --git a/erpnext/education/doctype/student/student.py b/erpnext/education/doctype/student/student.py deleted file mode 100644 index 712d742dee..0000000000 --- a/erpnext/education/doctype/student/student.py +++ /dev/null @@ -1,223 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.desk.form.linked_with import get_linked_doctypes -from frappe.model.document import Document -from frappe.utils import getdate, today - -from erpnext.education.utils import check_content_completion, check_quiz_completion - - -class Student(Document): - def validate(self): - self.title = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name])) - self.validate_dates() - - if self.student_applicant: - self.check_unique() - self.update_applicant_status() - - if frappe.get_value("Student", self.name, "title") != self.title: - self.update_student_name_in_linked_doctype() - - def validate_dates(self): - for sibling in self.siblings: - if sibling.date_of_birth and getdate(sibling.date_of_birth) > getdate(): - frappe.throw( - _("Row {0}:Sibling Date of Birth cannot be greater than today.").format(sibling.idx) - ) - - if self.date_of_birth and getdate(self.date_of_birth) >= getdate(today()): - frappe.throw(_("Date of Birth cannot be greater than today.")) - - if self.date_of_birth and getdate(self.date_of_birth) >= getdate(self.joining_date): - frappe.throw(_("Date of Birth cannot be greater than Joining Date.")) - - if ( - self.joining_date - and self.date_of_leaving - and getdate(self.joining_date) > getdate(self.date_of_leaving) - ): - frappe.throw(_("Joining Date can not be greater than Leaving Date")) - - def update_student_name_in_linked_doctype(self): - linked_doctypes = get_linked_doctypes("Student") - for d in linked_doctypes: - meta = frappe.get_meta(d) - if not meta.issingle: - if "student_name" in [f.fieldname for f in meta.fields]: - frappe.db.sql( - """UPDATE `tab{0}` set student_name = %s where {1} = %s""".format( - d, linked_doctypes[d]["fieldname"][0] - ), - (self.title, self.name), - ) - - if "child_doctype" in linked_doctypes[d].keys() and "student_name" in [ - f.fieldname for f in frappe.get_meta(linked_doctypes[d]["child_doctype"]).fields - ]: - frappe.db.sql( - """UPDATE `tab{0}` set student_name = %s where {1} = %s""".format( - linked_doctypes[d]["child_doctype"], linked_doctypes[d]["fieldname"][0] - ), - (self.title, self.name), - ) - - def check_unique(self): - """Validates if the Student Applicant is Unique""" - student = frappe.db.sql( - "select name from `tabStudent` where student_applicant=%s and name!=%s", - (self.student_applicant, self.name), - ) - if student: - frappe.throw( - _("Student {0} exist against student applicant {1}").format( - student[0][0], self.student_applicant - ) - ) - - def after_insert(self): - if not frappe.get_single("Education Settings").get("user_creation_skip"): - self.create_student_user() - - def create_student_user(self): - """Create a website user for student creation if not already exists""" - if not frappe.db.exists("User", self.student_email_id): - student_user = frappe.get_doc( - { - "doctype": "User", - "first_name": self.first_name, - "last_name": self.last_name, - "email": self.student_email_id, - "gender": self.gender, - "send_welcome_email": 1, - "user_type": "Website User", - } - ) - student_user.flags.ignore_permissions = True - student_user.add_roles("Student") - student_user.save() - - def update_applicant_status(self): - """Updates Student Applicant status to Admitted""" - if self.student_applicant: - frappe.db.set_value( - "Student Applicant", self.student_applicant, "application_status", "Admitted" - ) - - def get_all_course_enrollments(self): - """Returns a list of course enrollments linked with the current student""" - course_enrollments = frappe.get_all( - "Course Enrollment", filters={"student": self.name}, fields=["course", "name"] - ) - if not course_enrollments: - return None - else: - enrollments = {item["course"]: item["name"] for item in course_enrollments} - return enrollments - - def get_program_enrollments(self): - """Returns a list of course enrollments linked with the current student""" - program_enrollments = frappe.get_all( - "Program Enrollment", filters={"student": self.name}, fields=["program"] - ) - if not program_enrollments: - return None - else: - enrollments = [item["program"] for item in program_enrollments] - return enrollments - - def get_topic_progress(self, course_enrollment_name, topic): - """ - Get Progress Dictionary of a student for a particular topic - :param self: Student Object - :param course_enrollment_name: Name of the Course Enrollment - :param topic: Topic DocType Object - """ - contents = topic.get_contents() - progress = [] - if contents: - for content in contents: - if content.doctype in ("Article", "Video"): - status = check_content_completion(content.name, content.doctype, course_enrollment_name) - progress.append( - {"content": content.name, "content_type": content.doctype, "is_complete": status} - ) - elif content.doctype == "Quiz": - status, score, result, time_taken = check_quiz_completion(content, course_enrollment_name) - progress.append( - { - "content": content.name, - "content_type": content.doctype, - "is_complete": status, - "score": score, - "result": result, - } - ) - return progress - - def enroll_in_program(self, program_name): - try: - enrollment = frappe.get_doc( - { - "doctype": "Program Enrollment", - "student": self.name, - "academic_year": frappe.get_last_doc("Academic Year").name, - "program": program_name, - "enrollment_date": frappe.utils.datetime.datetime.now(), - } - ) - enrollment.save(ignore_permissions=True) - except frappe.exceptions.ValidationError: - enrollment_name = frappe.get_list( - "Program Enrollment", filters={"student": self.name, "Program": program_name} - )[0].name - return frappe.get_doc("Program Enrollment", enrollment_name) - else: - enrollment.submit() - return enrollment - - def enroll_in_course(self, course_name, program_enrollment, enrollment_date=None): - if enrollment_date is None: - enrollment_date = frappe.utils.datetime.datetime.now() - try: - enrollment = frappe.get_doc( - { - "doctype": "Course Enrollment", - "student": self.name, - "course": course_name, - "program_enrollment": program_enrollment, - "enrollment_date": enrollment_date, - } - ) - enrollment.save(ignore_permissions=True) - except frappe.exceptions.ValidationError: - enrollment_name = frappe.get_list( - "Course Enrollment", - filters={ - "student": self.name, - "course": course_name, - "program_enrollment": program_enrollment, - }, - )[0].name - return frappe.get_doc("Course Enrollment", enrollment_name) - else: - return enrollment - - -def get_timeline_data(doctype, name): - """Return timeline for attendance""" - return dict( - frappe.db.sql( - """select unix_timestamp(`date`), count(*) - from `tabStudent Attendance` where - student=%s - and `date` > date_sub(curdate(), interval 1 year) - and docstatus = 1 and status = 'Present' - group by date""", - name, - ) - ) diff --git a/erpnext/education/doctype/student/student_dashboard.py b/erpnext/education/doctype/student/student_dashboard.py deleted file mode 100644 index bcc8521738..0000000000 --- a/erpnext/education/doctype/student/student_dashboard.py +++ /dev/null @@ -1,24 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "heatmap": True, - "heatmap_message": _("This is based on the attendance of this Student"), - "fieldname": "student", - "non_standard_fieldnames": {"Bank Account": "party"}, - "transactions": [ - {"label": _("Admission"), "items": ["Program Enrollment", "Course Enrollment"]}, - { - "label": _("Student Activity"), - "items": [ - "Student Log", - "Student Group", - ], - }, - {"label": _("Assessment"), "items": ["Assessment Result"]}, - {"label": _("Student LMS Activity"), "items": ["Course Activity", "Quiz Activity"]}, - {"label": _("Attendance"), "items": ["Student Attendance", "Student Leave Application"]}, - {"label": _("Fee"), "items": ["Fees", "Bank Account"]}, - ], - } diff --git a/erpnext/education/doctype/student/student_list.js b/erpnext/education/doctype/student/student_list.js deleted file mode 100644 index c1bce24d15..0000000000 --- a/erpnext/education/doctype/student/student_list.js +++ /dev/null @@ -1,3 +0,0 @@ -frappe.listview_settings['Student'] = { - add_fields: [ "image"] -} diff --git a/erpnext/education/doctype/student/test_records.json b/erpnext/education/doctype/student/test_records.json deleted file mode 100644 index 8ad3afa6a8..0000000000 --- a/erpnext/education/doctype/student/test_records.json +++ /dev/null @@ -1,35 +0,0 @@ -[ - { - "first_name": "_Test", - "middle_name": "Student", - "last_name": "Name", - "program": "TC101", - "date_of_birth": "2000-01-01", - "gender": "Male", - "student_email_id": "_test_student@example.com", - "blood_group": "A+" - - }, - { - "first_name": "_Test", - "middle_name": "Student", - "last_name": "Name 1", - "program": "TC101", - "date_of_birth": "2000-01-01", - "gender": "Male", - "student_email_id": "_test_student_1@example.com", - "blood_group": "A+" - - }, - { - "first_name": "_Test", - "middle_name": "Student", - "last_name": "Name 2", - "program": "TC101", - "date_of_birth": "2000-01-01", - "gender": "Female", - "student_email_id": "_test_student_2@example.com", - "blood_group": "A+" - - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/student/test_student.py b/erpnext/education/doctype/student/test_student.py deleted file mode 100644 index 89449b0299..0000000000 --- a/erpnext/education/doctype/student/test_student.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -import frappe - -from erpnext.education.doctype.program.test_program import make_program_and_linked_courses - -test_records = frappe.get_test_records("Student") - - -class TestStudent(unittest.TestCase): - def setUp(self): - create_student( - { - "first_name": "_Test Name", - "last_name": "_Test Last Name", - "email": "_test_student@example.com", - } - ) - make_program_and_linked_courses("_Test Program 1", ["_Test Course 1", "_Test Course 2"]) - - def test_create_student_user(self): - self.assertTrue(bool(frappe.db.exists("User", "_test_student@example.com"))) - frappe.db.rollback() - - def test_enroll_in_program(self): - student = get_student("_test_student@example.com") - enrollment = student.enroll_in_program("_Test Program 1") - test_enrollment = frappe.get_all( - "Program Enrollment", filters={"student": student.name, "Program": "_Test Program 1"} - ) - self.assertTrue(len(test_enrollment)) - self.assertEqual(test_enrollment[0]["name"], enrollment.name) - frappe.db.rollback() - - def test_get_program_enrollments(self): - student = get_student("_test_student@example.com") - enrollment = student.enroll_in_program("_Test Program 1") - program_enrollments = student.get_program_enrollments() - self.assertTrue("_Test Program 1" in program_enrollments) - frappe.db.rollback() - - def test_get_all_course_enrollments(self): - student = get_student("_test_student@example.com") - enrollment = student.enroll_in_program("_Test Program 1") - course_enrollments = student.get_all_course_enrollments() - self.assertTrue("_Test Course 1" in course_enrollments.keys()) - self.assertTrue("_Test Course 2" in course_enrollments.keys()) - frappe.db.rollback() - - def tearDown(self): - for entry in frappe.db.get_all("Course Enrollment"): - frappe.delete_doc("Course Enrollment", entry.name) - - for entry in frappe.db.get_all("Program Enrollment"): - doc = frappe.get_doc("Program Enrollment", entry.name) - doc.cancel() - doc.delete() - - -def create_student(student_dict): - student = get_student(student_dict["email"]) - if not student: - student = frappe.get_doc( - { - "doctype": "Student", - "first_name": student_dict["first_name"], - "last_name": student_dict["last_name"], - "student_email_id": student_dict["email"], - } - ).insert() - return student - - -def get_student(email): - try: - student_id = frappe.get_all("Student", {"student_email_id": email}, ["name"])[0].name - return frappe.get_doc("Student", student_id) - except IndexError: - return None diff --git a/erpnext/education/doctype/student_admission/__init__.py b/erpnext/education/doctype/student_admission/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_admission/student_admission.js b/erpnext/education/doctype/student_admission/student_admission.js deleted file mode 100644 index 2b6296726c..0000000000 --- a/erpnext/education/doctype/student_admission/student_admission.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Student Admission', { - program: function(frm) { - if (frm.doc.academic_year && frm.doc.program) { - frm.doc.route = frappe.model.scrub(frm.doc.program) + "-" + frappe.model.scrub(frm.doc.academic_year) - frm.refresh_field("route"); - } - }, - - academic_year: function(frm) { - frm.trigger("program"); - }, - - admission_end_date: function(frm) { - if(frm.doc.admission_end_date && frm.doc.admission_end_date <= frm.doc.admission_start_date){ - frm.set_value("admission_end_date", ""); - frappe.throw(__("Admission End Date should be greater than Admission Start Date.")); - } - } -}); diff --git a/erpnext/education/doctype/student_admission/student_admission.json b/erpnext/education/doctype/student_admission/student_admission.json deleted file mode 100644 index 75f21625b0..0000000000 --- a/erpnext/education/doctype/student_admission/student_admission.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "actions": [], - "allow_guest_to_view": 1, - "allow_rename": 1, - "creation": "2016-09-13 03:05:27.154713", - "doctype": "DocType", - "document_type": "Document", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "title", - "route", - "column_break_3", - "academic_year", - "admission_start_date", - "admission_end_date", - "published", - "enable_admission_application", - "section_break_5", - "program_details", - "introduction" - ], - "fields": [ - { - "fieldname": "title", - "fieldtype": "Data", - "label": "Title" - }, - { - "fieldname": "route", - "fieldtype": "Data", - "label": "Route", - "no_copy": 1, - "unique": 1 - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "academic_year", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Academic Year", - "no_copy": 1, - "options": "Academic Year", - "reqd": 1 - }, - { - "fieldname": "admission_start_date", - "fieldtype": "Date", - "label": "Admission Start Date", - "mandatory_depends_on": "enable_admission_application", - "no_copy": 1 - }, - { - "fieldname": "admission_end_date", - "fieldtype": "Date", - "label": "Admission End Date", - "mandatory_depends_on": "enable_admission_application", - "no_copy": 1 - }, - { - "default": "0", - "fieldname": "published", - "fieldtype": "Check", - "label": "Publish on website" - }, - { - "fieldname": "section_break_5", - "fieldtype": "Section Break", - "label": "Eligibility and Details" - }, - { - "fieldname": "program_details", - "fieldtype": "Table", - "label": "Eligibility and Details", - "options": "Student Admission Program" - }, - { - "fieldname": "introduction", - "fieldtype": "Text Editor", - "label": "Introduction" - }, - { - "default": "0", - "depends_on": "published", - "fieldname": "enable_admission_application", - "fieldtype": "Check", - "label": "Enable Admission Application" - } - ], - "has_web_view": 1, - "is_published_field": "published", - "links": [], - "modified": "2020-09-18 00:14:54.615321", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Admission", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "route": "admissions", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "title" -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_admission/student_admission.py b/erpnext/education/doctype/student_admission/student_admission.py deleted file mode 100644 index 6c775f0dff..0000000000 --- a/erpnext/education/doctype/student_admission/student_admission.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.utils import nowdate -from frappe.website.website_generator import WebsiteGenerator - - -class StudentAdmission(WebsiteGenerator): - def autoname(self): - if not self.title: - self.title = self.get_title() - self.name = self.title - - def validate(self): - if not self.route: # pylint: disable=E0203 - self.route = "admissions/" + "-".join(self.title.split(" ")) - - if self.enable_admission_application and not self.program_details: - frappe.throw(_("Please add programs to enable admission application.")) - - def get_context(self, context): - context.no_cache = 1 - context.show_sidebar = True - context.title = self.title - context.parents = [ - {"name": "admissions", "title": _("All Student Admissions"), "route": "admissions"} - ] - - def get_title(self): - return _("Admissions for {0}").format(self.academic_year) - - -def get_list_context(context=None): - context.update( - { - "show_sidebar": True, - "title": _("Student Admissions"), - "get_list": get_admission_list, - "row_template": "education/doctype/student_admission/templates/student_admission_row.html", - } - ) - - -def get_admission_list( - doctype, txt, filters, limit_start, limit_page_length=20, order_by="modified" -): - return frappe.db.sql( - """select name, title, academic_year, modified, admission_start_date, route, - admission_end_date from `tabStudent Admission` where published=1 and admission_end_date >= %s - order by admission_end_date asc limit {0}, {1} - """.format( - limit_start, limit_page_length - ), - [nowdate()], - as_dict=1, - ) diff --git a/erpnext/education/doctype/student_admission/templates/student_admission.html b/erpnext/education/doctype/student_admission/templates/student_admission.html deleted file mode 100644 index f9ddac086b..0000000000 --- a/erpnext/education/doctype/student_admission/templates/student_admission.html +++ /dev/null @@ -1,77 +0,0 @@ - -{% extends "templates/web.html" %} - -{% block breadcrumbs %} - {% include "templates/includes/breadcrumbs.html" %} -{% endblock %} - -{% block header %} -

{{ title }}

-{% endblock %} - -{% block page_content %} - {% set today = frappe.utils.getdate(frappe.utils.nowdate()) %} -
-
- Application will be closed soon - {% elif frappe.utils.getdate(doc.admission_end_date) > today >= frappe.utils.getdate(doc.admission_start_date)%} - green"> Application open - {% elif frappe.utils.getdate(doc.admission_start_date) > today %} - blue"> Application will open - {% else %} - gray - {% endif %} - -
-
- {{ _("Start on") }}: {{ frappe.format_date(admission_start_date) }}
- {{ _("End on") }}: {{ frappe.format_date(admission_end_date) }} -
-

- - {%- if introduction -%} -
{{ introduction }}
- {% endif %} - - {% if program_details %} -
-
-

Eligibility and Other Details:

- - - - - - - - - {%- if doc.enable_admission_application and frappe.utils.getdate(doc.admission_start_date) <= today -%} - - {% endif %} - - - - {% for row in program_details %} - - - - - - - {%- if doc.enable_admission_application and frappe.utils.getdate(doc.admission_start_date) <= today -%} - - {% endif %} - - {% endfor %} - -
Program/Std.DescriptionMinumum AgeMaximum AgeApplication Fee
{{ row.program }}
{{ row.description if row.description else '' }}
{{ row.min_age }}{{ row.max_age }}{{ row.application_fee }} - - {{ _("Apply Now") }} - -
-
- {% endif %} - -{% endblock %} diff --git a/erpnext/education/doctype/student_admission/templates/student_admission_row.html b/erpnext/education/doctype/student_admission/templates/student_admission_row.html deleted file mode 100644 index dc4587bc94..0000000000 --- a/erpnext/education/doctype/student_admission/templates/student_admission_row.html +++ /dev/null @@ -1,44 +0,0 @@ - diff --git a/erpnext/education/doctype/student_admission/test_student_admission.py b/erpnext/education/doctype/student_admission/test_student_admission.py deleted file mode 100644 index 82c720a305..0000000000 --- a/erpnext/education/doctype/student_admission/test_student_admission.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Student Admission') - - -class TestStudentAdmission(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_admission_program/__init__.py b/erpnext/education/doctype/student_admission_program/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_admission_program/student_admission_program.json b/erpnext/education/doctype/student_admission_program/student_admission_program.json deleted file mode 100644 index d14b9a4d91..0000000000 --- a/erpnext/education/doctype/student_admission_program/student_admission_program.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "actions": [], - "creation": "2017-09-15 12:59:43.207923", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "program", - "min_age", - "max_age", - "description", - "column_break_4", - "application_fee", - "applicant_naming_series" - ], - "fields": [ - { - "fieldname": "program", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Program", - "options": "Program" - }, - { - "fieldname": "column_break_4", - "fieldtype": "Column Break" - }, - { - "fieldname": "application_fee", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Application Fee" - }, - { - "fieldname": "applicant_naming_series", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Naming Series (for Student Applicant)" - }, - { - "fieldname": "min_age", - "fieldtype": "Int", - "in_list_view": 1, - "label": "Minimum Age" - }, - { - "fieldname": "max_age", - "fieldtype": "Int", - "in_list_view": 1, - "label": "Maximum Age" - }, - { - "fetch_from": "program.description", - "fetch_if_empty": 1, - "fieldname": "description", - "fieldtype": "Small Text", - "label": "Description" - } - ], - "istable": 1, - "links": [], - "modified": "2020-10-05 13:03:42.005985", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Admission Program", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_admission_program/student_admission_program.py b/erpnext/education/doctype/student_admission_program/student_admission_program.py deleted file mode 100644 index eba2239148..0000000000 --- a/erpnext/education/doctype/student_admission_program/student_admission_program.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentAdmissionProgram(Document): - pass diff --git a/erpnext/education/doctype/student_applicant/__init__.py b/erpnext/education/doctype/student_applicant/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_applicant/student_applicant.js b/erpnext/education/doctype/student_applicant/student_applicant.js deleted file mode 100644 index 7b41a72174..0000000000 --- a/erpnext/education/doctype/student_applicant/student_applicant.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on("Student Applicant", { - setup: function(frm) { - frm.add_fetch("guardian", "guardian_name", "guardian_name"); - }, - - refresh: function(frm) { - if (frm.doc.application_status==="Applied" && frm.doc.docstatus===1 ) { - frm.add_custom_button(__("Approve"), function() { - frm.set_value("application_status", "Approved"); - frm.save_or_update(); - - }, 'Actions'); - - frm.add_custom_button(__("Reject"), function() { - frm.set_value("application_status", "Rejected"); - frm.save_or_update(); - }, 'Actions'); - } - - if (frm.doc.application_status === "Approved" && frm.doc.docstatus === 1) { - frm.add_custom_button(__("Enroll"), function() { - frm.events.enroll(frm) - }).addClass("btn-primary"); - - frm.add_custom_button(__("Reject"), function() { - frm.set_value("application_status", "Rejected"); - frm.save_or_update(); - }, 'Actions'); - } - - frappe.realtime.on("enroll_student_progress", function(data) { - if(data.progress) { - frappe.hide_msgprint(true); - frappe.show_progress(__("Enrolling student"), data.progress[0],data.progress[1]); - } - }); - - frappe.db.get_value("Education Settings", {name: "Education Settings"}, "user_creation_skip", (r) => { - if (cint(r.user_creation_skip) !== 1) { - frm.set_df_property("student_email_id", "reqd", 1); - } - }); - }, - - enroll: function(frm) { - frappe.model.open_mapped_doc({ - method: "erpnext.education.api.enroll_student", - frm: frm - }) - } -}); - -frappe.ui.form.on('Student Sibling', { - setup: function(frm) { - frm.add_fetch("student", "title", "full_name"); - frm.add_fetch("student", "gender", "gender"); - frm.add_fetch("student", "date_of_birth", "date_of_birth"); - } -}); diff --git a/erpnext/education/doctype/student_applicant/student_applicant.json b/erpnext/education/doctype/student_applicant/student_applicant.json deleted file mode 100644 index 95f9224a73..0000000000 --- a/erpnext/education/doctype/student_applicant/student_applicant.json +++ /dev/null @@ -1,300 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2015-09-11 11:50:09.740807", - "doctype": "DocType", - "document_type": "Document", - "engine": "InnoDB", - "field_order": [ - "first_name", - "middle_name", - "last_name", - "program", - "student_category", - "lms_only", - "paid", - "column_break_8", - "naming_series", - "application_status", - "application_date", - "academic_year", - "academic_term", - "student_admission", - "image", - "section_break_4", - "date_of_birth", - "gender", - "blood_group", - "column_break_12", - "student_email_id", - "student_mobile_number", - "nationality", - "home_address", - "address_line_1", - "address_line_2", - "pincode", - "column_break_23", - "city", - "state", - "section_break_20", - "guardians", - "section_break_21", - "siblings", - "section_break_23", - "title", - "amended_from" - ], - "fields": [ - { - "fieldname": "first_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "First Name", - "reqd": 1 - }, - { - "fieldname": "middle_name", - "fieldtype": "Data", - "label": "Middle Name" - }, - { - "fieldname": "last_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Last Name" - }, - { - "fieldname": "program", - "fieldtype": "Link", - "in_filter": 1, - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Program", - "options": "Program", - "reqd": 1 - }, - { - "default": "0", - "fieldname": "lms_only", - "fieldtype": "Check", - "label": "LMS Only" - }, - { - "default": "0", - "fieldname": "paid", - "fieldtype": "Check", - "label": "Paid" - }, - { - "fieldname": "column_break_8", - "fieldtype": "Column Break" - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Naming Series", - "no_copy": 1, - "options": "EDU-APP-.YYYY.-", - "set_only_once": 1 - }, - { - "allow_on_submit": 1, - "depends_on": "eval:doc.docstatus != 0", - "fieldname": "application_status", - "fieldtype": "Select", - "in_filter": 1, - "label": "Application Status", - "no_copy": 1, - "options": "Applied\nApproved\nRejected\nAdmitted" - }, - { - "default": "Today", - "fieldname": "application_date", - "fieldtype": "Date", - "label": "Application Date" - }, - { - "fieldname": "academic_year", - "fieldtype": "Link", - "label": "Academic Year", - "options": "Academic Year" - }, - { - "fieldname": "academic_term", - "fieldtype": "Link", - "label": "Academic Term", - "options": "Academic Term" - }, - { - "fieldname": "student_admission", - "fieldtype": "Link", - "label": "Student Admission", - "options": "Student Admission" - }, - { - "fieldname": "image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Image" - }, - { - "fieldname": "section_break_4", - "fieldtype": "Section Break", - "label": "Personal Details" - }, - { - "fieldname": "date_of_birth", - "fieldtype": "Date", - "label": "Date of Birth" - }, - { - "fieldname": "gender", - "fieldtype": "Select", - "label": "Gender", - "options": "\nMale\nFemale" - }, - { - "fieldname": "blood_group", - "fieldtype": "Select", - "label": "Blood Group", - "options": "\nA+\nA-\nB+\nB-\nO+\nO-\nAB+\nAB-" - }, - { - "fieldname": "column_break_12", - "fieldtype": "Column Break" - }, - { - "fieldname": "student_email_id", - "fieldtype": "Data", - "label": "Student Email Address", - "options": "Email", - "unique": 1 - }, - { - "fieldname": "student_mobile_number", - "fieldtype": "Data", - "label": "Student Mobile Number" - }, - { - "fieldname": "nationality", - "fieldtype": "Data", - "label": "Nationality" - }, - { - "fieldname": "home_address", - "fieldtype": "Section Break", - "label": "Home Address" - }, - { - "fieldname": "address_line_1", - "fieldtype": "Data", - "label": "Address Line 1" - }, - { - "fieldname": "address_line_2", - "fieldtype": "Data", - "label": "Address Line 2" - }, - { - "fieldname": "pincode", - "fieldtype": "Data", - "label": "Pincode" - }, - { - "fieldname": "column_break_23", - "fieldtype": "Column Break" - }, - { - "fieldname": "city", - "fieldtype": "Data", - "label": "City" - }, - { - "fieldname": "state", - "fieldtype": "Data", - "label": "State" - }, - { - "collapsible": 1, - "fieldname": "section_break_20", - "fieldtype": "Section Break", - "label": "Guardian Details" - }, - { - "fieldname": "guardians", - "fieldtype": "Table", - "label": "Guardians", - "options": "Student Guardian" - }, - { - "collapsible": 1, - "fieldname": "section_break_21", - "fieldtype": "Section Break", - "label": "Sibling Details" - }, - { - "fieldname": "siblings", - "fieldtype": "Table", - "label": "Siblings", - "options": "Student Sibling" - }, - { - "fieldname": "section_break_23", - "fieldtype": "Section Break" - }, - { - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "label": "Title" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Student Applicant", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "student_category", - "fieldtype": "Link", - "label": "Student Category", - "options": "Student Category" - } - ], - "image_field": "image", - "is_submittable": 1, - "links": [], - "modified": "2021-03-01 23:00:25.119241", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Applicant", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "import": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "title" -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_applicant/student_applicant.py b/erpnext/education/doctype/student_applicant/student_applicant.py deleted file mode 100644 index f04ebb0b0c..0000000000 --- a/erpnext/education/doctype/student_applicant/student_applicant.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import add_years, date_diff, getdate, nowdate - - -class StudentApplicant(Document): - def autoname(self): - from frappe.model.naming import set_name_by_naming_series - - if self.student_admission: - naming_series = None - if self.program: - # set the naming series from the student admission if provided. - student_admission = get_student_admission_data(self.student_admission, self.program) - if student_admission: - naming_series = student_admission.get("applicant_naming_series") - else: - naming_series = None - else: - frappe.throw(_("Select the program first")) - - if naming_series: - self.naming_series = naming_series - - set_name_by_naming_series(self) - - def validate(self): - self.validate_dates() - self.title = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name])) - - if self.student_admission and self.program and self.date_of_birth: - self.validation_from_student_admission() - - def validate_dates(self): - if self.date_of_birth and getdate(self.date_of_birth) >= getdate(): - frappe.throw(_("Date of Birth cannot be greater than today.")) - - def on_update_after_submit(self): - student = frappe.get_list("Student", filters={"student_applicant": self.name}) - if student: - frappe.throw( - _("Cannot change status as student {0} is linked with student application {1}").format( - student[0].name, self.name - ) - ) - - def on_submit(self): - if self.paid and not self.student_admission: - frappe.throw( - _("Please select Student Admission which is mandatory for the paid student applicant") - ) - - def validation_from_student_admission(self): - - student_admission = get_student_admission_data(self.student_admission, self.program) - - if ( - student_admission - and student_admission.min_age - and date_diff(nowdate(), add_years(getdate(self.date_of_birth), student_admission.min_age)) < 0 - ): - frappe.throw(_("Not eligible for the admission in this program as per Date Of Birth")) - - if ( - student_admission - and student_admission.max_age - and date_diff(nowdate(), add_years(getdate(self.date_of_birth), student_admission.max_age)) > 0 - ): - frappe.throw(_("Not eligible for the admission in this program as per Date Of Birth")) - - def on_payment_authorized(self, *args, **kwargs): - self.db_set("paid", 1) - - -def get_student_admission_data(student_admission, program): - - student_admission = frappe.db.sql( - """select sa.admission_start_date, sa.admission_end_date, - sap.program, sap.min_age, sap.max_age, sap.applicant_naming_series - from `tabStudent Admission` sa, `tabStudent Admission Program` sap - where sa.name = sap.parent and sa.name = %s and sap.program = %s""", - (student_admission, program), - as_dict=1, - ) - - if student_admission: - return student_admission[0] - else: - return None diff --git a/erpnext/education/doctype/student_applicant/student_applicant_list.js b/erpnext/education/doctype/student_applicant/student_applicant_list.js deleted file mode 100644 index c39d46ec63..0000000000 --- a/erpnext/education/doctype/student_applicant/student_applicant_list.js +++ /dev/null @@ -1,21 +0,0 @@ -frappe.listview_settings['Student Applicant'] = { - add_fields: [ "application_status", 'paid'], - has_indicator_for_draft: 1, - get_indicator: function(doc) { - if (doc.paid) { - return [__("Paid"), "green", "paid,=,Yes"]; - } - else if (doc.application_status=="Applied") { - return [__("Applied"), "orange", "application_status,=,Applied"]; - } - else if (doc.application_status=="Approved") { - return [__("Approved"), "green", "application_status,=,Approved"]; - } - else if (doc.application_status=="Rejected") { - return [__("Rejected"), "red", "application_status,=,Rejected"]; - } - else if (doc.application_status=="Admitted") { - return [__("Admitted"), "blue", "application_status,=,Admitted"]; - } - } -}; diff --git a/erpnext/education/doctype/student_applicant/test_student_applicant.py b/erpnext/education/doctype/student_applicant/test_student_applicant.py deleted file mode 100644 index bd0e360db7..0000000000 --- a/erpnext/education/doctype/student_applicant/test_student_applicant.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Student Applicant') - - -class TestStudentApplicant(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_attendance/__init__.py b/erpnext/education/doctype/student_attendance/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_attendance/student_attendance.js b/erpnext/education/doctype/student_attendance/student_attendance.js deleted file mode 100644 index 2bbecb911f..0000000000 --- a/erpnext/education/doctype/student_attendance/student_attendance.js +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -cur_frm.add_fetch("course_schedule", "schedule_date", "date"); -cur_frm.add_fetch("course_schedule", "student_group", "student_group") diff --git a/erpnext/education/doctype/student_attendance/student_attendance.json b/erpnext/education/doctype/student_attendance/student_attendance.json deleted file mode 100644 index e6e46d1c1b..0000000000 --- a/erpnext/education/doctype/student_attendance/student_attendance.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "actions": [], - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2015-11-05 15:20:23.045996", - "doctype": "DocType", - "document_type": "Document", - "engine": "InnoDB", - "field_order": [ - "naming_series", - "student", - "student_name", - "student_mobile_number", - "course_schedule", - "student_group", - "column_break_3", - "date", - "status", - "leave_application", - "amended_from" - ], - "fields": [ - { - "fieldname": "student", - "fieldtype": "Link", - "in_global_search": 1, - "in_standard_filter": 1, - "label": "Student", - "options": "Student", - "reqd": 1, - "search_index": 1 - }, - { - "fieldname": "course_schedule", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Course Schedule", - "options": "Course Schedule" - }, - { - "fieldname": "date", - "fieldtype": "Date", - "label": "Date", - "reqd": 1, - "search_index": 1 - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fetch_from": "student.title", - "fieldname": "student_name", - "fieldtype": "Read Only", - "in_global_search": 1, - "label": "Student Name" - }, - { - "fieldname": "student_group", - "fieldtype": "Link", - "in_global_search": 1, - "in_standard_filter": 1, - "label": "Student Group", - "options": "Student Group" - }, - { - "default": "Present", - "fieldname": "status", - "fieldtype": "Select", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Status", - "options": "Present\nAbsent", - "reqd": 1 - }, - { - "fieldname": "leave_application", - "fieldtype": "Link", - "label": "Leave Application", - "options": "Student Leave Application", - "read_only": 1 - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "options": "EDU-ATT-.YYYY.-" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Student Attendance", - "print_hide": 1, - "read_only": 1 - }, - { - "fetch_from": "student.student_mobile_number", - "fieldname": "student_mobile_number", - "fieldtype": "Read Only", - "label": "Student Mobile Number", - "options": "Phone" - } - ], - "index_web_pages_for_search": 1, - "is_submittable": 1, - "links": [], - "modified": "2021-03-24 00:02:11.005895", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Attendance", - "owner": "Administrator", - "permissions": [ - { - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "student_name" -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_attendance/student_attendance.py b/erpnext/education/doctype/student_attendance/student_attendance.py deleted file mode 100644 index 20f8fb7d77..0000000000 --- a/erpnext/education/doctype/student_attendance/student_attendance.py +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import formatdate, get_link_to_form, getdate - -from erpnext import get_default_company -from erpnext.education.api import get_student_group_students -from erpnext.hr.doctype.holiday_list.holiday_list import is_holiday - - -class StudentAttendance(Document): - def validate(self): - self.validate_mandatory() - self.validate_date() - self.set_date() - self.set_student_group() - self.validate_student() - self.validate_duplication() - self.validate_is_holiday() - - def set_date(self): - if self.course_schedule: - self.date = frappe.db.get_value("Course Schedule", self.course_schedule, "schedule_date") - - def validate_mandatory(self): - if not (self.student_group or self.course_schedule): - frappe.throw( - _("{0} or {1} is mandatory").format( - frappe.bold("Student Group"), frappe.bold("Course Schedule") - ), - title=_("Mandatory Fields"), - ) - - def validate_date(self): - if not self.leave_application and getdate(self.date) > getdate(): - frappe.throw(_("Attendance cannot be marked for future dates.")) - - if self.student_group: - academic_year = frappe.db.get_value("Student Group", self.student_group, "academic_year") - if academic_year: - year_start_date, year_end_date = frappe.db.get_value( - "Academic Year", academic_year, ["year_start_date", "year_end_date"] - ) - if year_start_date and year_end_date: - if getdate(self.date) < getdate(year_start_date) or getdate(self.date) > getdate( - year_end_date - ): - frappe.throw( - _("Attendance cannot be marked outside of Academic Year {0}").format(academic_year) - ) - - def set_student_group(self): - if self.course_schedule: - self.student_group = frappe.db.get_value( - "Course Schedule", self.course_schedule, "student_group" - ) - - def validate_student(self): - if self.course_schedule: - student_group = frappe.db.get_value("Course Schedule", self.course_schedule, "student_group") - else: - student_group = self.student_group - student_group_students = [d.student for d in get_student_group_students(student_group)] - if student_group and self.student not in student_group_students: - student_group_doc = get_link_to_form("Student Group", student_group) - frappe.throw( - _("Student {0}: {1} does not belong to Student Group {2}").format( - frappe.bold(self.student), self.student_name, frappe.bold(student_group_doc) - ) - ) - - def validate_duplication(self): - """Check if the Attendance Record is Unique""" - attendance_record = None - if self.course_schedule: - attendance_record = frappe.db.exists( - "Student Attendance", - { - "student": self.student, - "course_schedule": self.course_schedule, - "docstatus": ("!=", 2), - "name": ("!=", self.name), - }, - ) - else: - attendance_record = frappe.db.exists( - "Student Attendance", - { - "student": self.student, - "student_group": self.student_group, - "date": self.date, - "docstatus": ("!=", 2), - "name": ("!=", self.name), - "course_schedule": "", - }, - ) - - if attendance_record: - record = get_link_to_form("Student Attendance", attendance_record) - frappe.throw( - _("Student Attendance record {0} already exists against the Student {1}").format( - record, frappe.bold(self.student) - ), - title=_("Duplicate Entry"), - ) - - def validate_is_holiday(self): - holiday_list = get_holiday_list() - if is_holiday(holiday_list, self.date): - frappe.throw( - _("Attendance cannot be marked for {0} as it is a holiday.").format( - frappe.bold(formatdate(self.date)) - ) - ) - - -def get_holiday_list(company=None): - if not company: - company = get_default_company() or frappe.get_all("Company")[0].name - - holiday_list = frappe.get_cached_value("Company", company, "default_holiday_list") - if not holiday_list: - frappe.throw( - _("Please set a default Holiday List for Company {0}").format( - frappe.bold(get_default_company()) - ) - ) - return holiday_list diff --git a/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py b/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py deleted file mode 100644 index 34132af69e..0000000000 --- a/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py +++ /dev/null @@ -1,12 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "reports": [ - { - "label": _("Reports"), - "items": ["Student Monthly Attendance Sheet", "Student Batch-Wise Attendance"], - } - ] - } diff --git a/erpnext/education/doctype/student_attendance/student_attendance_list.js b/erpnext/education/doctype/student_attendance/student_attendance_list.js deleted file mode 100644 index e89b76c8d5..0000000000 --- a/erpnext/education/doctype/student_attendance/student_attendance_list.js +++ /dev/null @@ -1,11 +0,0 @@ -frappe.listview_settings['Student Attendance'] = { - add_fields: [ "status"], - get_indicator: function(doc) { - if (doc.status=="Absent") { - return [__("Absent"), "orange", "status,=,Absent"]; - } - else if (doc.status=="Present") { - return [__("Present"), "green", "status,=,Present"]; - } - } -}; diff --git a/erpnext/education/doctype/student_attendance/test_student_attendance.py b/erpnext/education/doctype/student_attendance/test_student_attendance.py deleted file mode 100644 index e5b1841e1d..0000000000 --- a/erpnext/education/doctype/student_attendance/test_student_attendance.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Student Attendance') - - -class TestStudentAttendance(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_attendance_tool/__init__.py b/erpnext/education/doctype/student_attendance_tool/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.js b/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.js deleted file mode 100644 index 4526585175..0000000000 --- a/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.js +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt -frappe.provide("education"); - -frappe.ui.form.on('Student Attendance Tool', { - setup: (frm) => { - frm.students_area = $('
') - .appendTo(frm.fields_dict.students_html.wrapper); - }, - onload: function(frm) { - frm.set_query("student_group", function() { - return { - "filters": { - "group_based_on": frm.doc.group_based_on, - "disabled": 0 - } - }; - }); - }, - - refresh: function(frm) { - if (frappe.route_options) { - frm.set_value("based_on", frappe.route_options.based_on); - frm.set_value("student_group", frappe.route_options.student_group); - frm.set_value("course_schedule", frappe.route_options.course_schedule); - frappe.route_options = null; - } - frm.disable_save(); - }, - - based_on: function(frm) { - if (frm.doc.based_on == "Student Group") { - frm.set_value("course_schedule", ""); - } else { - frm.set_value("student_group", ""); - } - }, - - student_group: function(frm) { - if ((frm.doc.student_group && frm.doc.date) || frm.doc.course_schedule) { - frm.students_area.find('.student-attendance-checks').html(`
Fetching...
`); - var method = "erpnext.education.doctype.student_attendance_tool.student_attendance_tool.get_student_attendance_records"; - - frappe.call({ - method: method, - args: { - based_on: frm.doc.based_on, - student_group: frm.doc.student_group, - date: frm.doc.date, - course_schedule: frm.doc.course_schedule - }, - callback: function(r) { - frm.events.get_students(frm, r.message); - } - }) - } - }, - - date: function(frm) { - if (frm.doc.date > frappe.datetime.get_today()) - frappe.throw(__("Cannot mark attendance for future dates.")); - frm.trigger("student_group"); - }, - - course_schedule: function(frm) { - frm.trigger("student_group"); - }, - - get_students: function(frm, students) { - students = students || []; - frm.students_editor = new education.StudentsEditor(frm, frm.students_area, students); - } -}); - - -education.StudentsEditor = class StudentsEditor { - constructor(frm, wrapper, students) { - this.wrapper = wrapper; - this.frm = frm; - if(students.length > 0) { - this.make(frm, students); - } else { - this.show_empty_state(); - } - } - make(frm, students) { - var me = this; - - $(this.wrapper).empty(); - var student_toolbar = $('

\ - \ - \ -

').appendTo($(this.wrapper)); - - student_toolbar.find(".btn-add") - .html(__('Check all')) - .on("click", function() { - $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) { - if (!$(check).prop("disabled")) { - check.checked = true; - } - }); - }); - - student_toolbar.find(".btn-remove") - .html(__('Uncheck all')) - .on("click", function() { - $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) { - if (!$(check).prop("disabled")) { - check.checked = false; - } - }); - }); - - student_toolbar.find(".btn-mark-att") - .html(__('Mark Attendance')) - .on("click", function() { - $(me.wrapper.find(".btn-mark-att")).attr("disabled", true); - var studs = []; - $(me.wrapper.find('input[type="checkbox"]')).each(function(i, check) { - var $check = $(check); - studs.push({ - student: $check.data().student, - student_name: $check.data().studentName, - group_roll_number: $check.data().group_roll_number, - disabled: $check.prop("disabled"), - checked: $check.is(":checked") - }); - }); - - var students_present = studs.filter(function(stud) { - return !stud.disabled && stud.checked; - }); - - var students_absent = studs.filter(function(stud) { - return !stud.disabled && !stud.checked; - }); - - frappe.confirm(__("Do you want to update attendance?
Present: {0}
Absent: {1}", - [students_present.length, students_absent.length]), - function() { //ifyes - if(!frappe.request.ajax_count) { - frappe.call({ - method: "erpnext.education.api.mark_attendance", - freeze: true, - freeze_message: __("Marking attendance"), - args: { - "students_present": students_present, - "students_absent": students_absent, - "student_group": frm.doc.student_group, - "course_schedule": frm.doc.course_schedule, - "date": frm.doc.date - }, - callback: function(r) { - $(me.wrapper.find(".btn-mark-att")).attr("disabled", false); - frm.trigger("student_group"); - } - }); - } - }, - function() { //ifno - $(me.wrapper.find(".btn-mark-att")).attr("disabled", false); - } - ); - }); - - // make html grid of students - let student_html = ''; - for (let student of students) { - student_html += `
-
- -
-
`; - } - - $(`
${student_html}
`).appendTo(me.wrapper); - } - - show_empty_state() { - $(this.wrapper).html( - `
- ${__("No Students in")} ${this.frm.doc.student_group} -
` - ); - } -}; diff --git a/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.json b/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.json deleted file mode 100644 index ee8f4842a3..0000000000 --- a/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "actions": [], - "allow_copy": 1, - "creation": "2016-11-16 17:12:46.437539", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "based_on", - "group_based_on", - "column_break_2", - "student_group", - "academic_year", - "academic_term", - "course_schedule", - "date", - "attendance", - "students_html" - ], - "fields": [ - { - "fieldname": "based_on", - "fieldtype": "Select", - "label": "Based On", - "options": "Student Group\nCourse Schedule" - }, - { - "default": "Batch", - "depends_on": "eval:doc.based_on == \"Student Group\"", - "fieldname": "group_based_on", - "fieldtype": "Select", - "label": "Group Based On", - "options": "Batch\nCourse\nActivity" - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "depends_on": "eval:doc.based_on ==\"Student Group\"", - "fieldname": "student_group", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Student Group", - "options": "Student Group", - "reqd": 1 - }, - { - "depends_on": "eval:doc.based_on ==\"Course Schedule\"", - "fieldname": "course_schedule", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Course Schedule", - "options": "Course Schedule", - "reqd": 1 - }, - { - "depends_on": "eval:doc.based_on ==\"Student Group\"", - "fieldname": "date", - "fieldtype": "Date", - "in_list_view": 1, - "label": "Date", - "reqd": 1 - }, - { - "depends_on": "eval: (doc.course_schedule \n|| (doc.student_group && doc.date))", - "fieldname": "attendance", - "fieldtype": "Section Break", - "label": "Attendance" - }, - { - "fieldname": "students_html", - "fieldtype": "HTML", - "label": "Students HTML" - }, - { - "fetch_from": "student_group.academic_year", - "fieldname": "academic_year", - "fieldtype": "Link", - "label": "Academic Year", - "options": "Academic Year", - "read_only": 1 - }, - { - "fetch_from": "student_group.academic_term", - "fieldname": "academic_term", - "fieldtype": "Link", - "label": "Academic Term", - "options": "Academic Term", - "read_only": 1 - } - ], - "hide_toolbar": 1, - "issingle": 1, - "links": [], - "modified": "2020-10-23 17:52:28.078971", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Attendance Tool", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "read": 1, - "role": "Instructor", - "write": 1 - }, - { - "create": 1, - "read": 1, - "role": "Academics User", - "write": 1 - } - ], - "restrict_to_domain": "Education", - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.py b/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.py deleted file mode 100644 index c626a0f288..0000000000 --- a/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe.model.document import Document - - -class StudentAttendanceTool(Document): - pass - - -@frappe.whitelist() -def get_student_attendance_records(based_on, date=None, student_group=None, course_schedule=None): - student_list = [] - student_attendance_list = [] - - if based_on == "Course Schedule": - student_group = frappe.db.get_value("Course Schedule", course_schedule, "student_group") - if student_group: - student_list = frappe.get_all( - "Student Group Student", - fields=["student", "student_name", "group_roll_number"], - filters={"parent": student_group, "active": 1}, - order_by="group_roll_number", - ) - - if not student_list: - student_list = frappe.get_all( - "Student Group Student", - fields=["student", "student_name", "group_roll_number"], - filters={"parent": student_group, "active": 1}, - order_by="group_roll_number", - ) - - StudentAttendance = frappe.qb.DocType("Student Attendance") - - if course_schedule: - student_attendance_list = ( - frappe.qb.from_(StudentAttendance) - .select(StudentAttendance.student, StudentAttendance.status) - .where((StudentAttendance.course_schedule == course_schedule)) - ).run(as_dict=True) - else: - student_attendance_list = ( - frappe.qb.from_(StudentAttendance) - .select(StudentAttendance.student, StudentAttendance.status) - .where( - (StudentAttendance.student_group == student_group) - & (StudentAttendance.date == date) - & ((StudentAttendance.course_schedule == "") | (StudentAttendance.course_schedule.isnull())) - ) - ).run(as_dict=True) - - for attendance in student_attendance_list: - for student in student_list: - if student.student == attendance.student: - student.status = attendance.status - - return student_list diff --git a/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.py b/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.py deleted file mode 100644 index c15036fe03..0000000000 --- a/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestStudentAttendanceTool(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_batch_name/__init__.py b/erpnext/education/doctype/student_batch_name/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_batch_name/student_batch_name.js b/erpnext/education/doctype/student_batch_name/student_batch_name.js deleted file mode 100644 index 7ed3021fb4..0000000000 --- a/erpnext/education/doctype/student_batch_name/student_batch_name.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Student Batch Name', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/student_batch_name/student_batch_name.json b/erpnext/education/doctype/student_batch_name/student_batch_name.json deleted file mode 100644 index abb6436010..0000000000 --- a/erpnext/education/doctype/student_batch_name/student_batch_name.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "field:batch_name", - "beta": 0, - "creation": "2016-11-17 18:45:57.965091", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "batch_name", - "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": 0, - "label": "Batch Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2017-11-10 19:08:17.980349", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Batch Name", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_batch_name/student_batch_name.py b/erpnext/education/doctype/student_batch_name/student_batch_name.py deleted file mode 100644 index ae59291dcf..0000000000 --- a/erpnext/education/doctype/student_batch_name/student_batch_name.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentBatchName(Document): - pass diff --git a/erpnext/education/doctype/student_batch_name/test_records.json b/erpnext/education/doctype/student_batch_name/test_records.json deleted file mode 100644 index bf365c638a..0000000000 --- a/erpnext/education/doctype/student_batch_name/test_records.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "batch_name": "_Batch 1" - }, - { - "batch_name": "_Batch 2" - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/student_batch_name/test_student_batch_name.py b/erpnext/education/doctype/student_batch_name/test_student_batch_name.py deleted file mode 100644 index bf9639bf62..0000000000 --- a/erpnext/education/doctype/student_batch_name/test_student_batch_name.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Student Batch Name') - - -class TestStudentBatchName(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_category/__init__.py b/erpnext/education/doctype/student_category/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_category/student_category.js b/erpnext/education/doctype/student_category/student_category.js deleted file mode 100644 index 3a264d1d4a..0000000000 --- a/erpnext/education/doctype/student_category/student_category.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Student Category', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/student_category/student_category.json b/erpnext/education/doctype/student_category/student_category.json deleted file mode 100644 index d7d4444a28..0000000000 --- a/erpnext/education/doctype/student_category/student_category.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "field:category", - "beta": 0, - "creation": "2016-09-05 06:28:33.679415", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "category", - "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": 0, - "label": "Category", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2017-11-10 19:09:45.783401", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Category", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_category/student_category.py b/erpnext/education/doctype/student_category/student_category.py deleted file mode 100644 index 0d7185967e..0000000000 --- a/erpnext/education/doctype/student_category/student_category.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentCategory(Document): - pass diff --git a/erpnext/education/doctype/student_category/student_category_dashboard.py b/erpnext/education/doctype/student_category/student_category_dashboard.py deleted file mode 100644 index d7a332c4d2..0000000000 --- a/erpnext/education/doctype/student_category/student_category_dashboard.py +++ /dev/null @@ -1,8 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "fieldname": "student_category", - "transactions": [{"label": _("Fee"), "items": ["Fee Structure", "Fee Schedule", "Fees"]}], - } diff --git a/erpnext/education/doctype/student_category/test_student_category.py b/erpnext/education/doctype/student_category/test_student_category.py deleted file mode 100644 index 5671e9fa44..0000000000 --- a/erpnext/education/doctype/student_category/test_student_category.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Student Category') - - -class TestStudentCategory(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_group/__init__.py b/erpnext/education/doctype/student_group/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_group/student_group.js b/erpnext/education/doctype/student_group/student_group.js deleted file mode 100644 index 39ee9cebd1..0000000000 --- a/erpnext/education/doctype/student_group/student_group.js +++ /dev/null @@ -1,145 +0,0 @@ -cur_frm.add_fetch('student', 'title', 'student_name'); - -frappe.ui.form.on('Student Group', { - onload: function(frm) { - frm.set_query('academic_term', function() { - return { - filters: { - 'academic_year': (frm.doc.academic_year) - } - }; - }); - if (!frm.__islocal) { - frm.set_query('student', 'students', function() { - return{ - query: 'erpnext.education.doctype.student_group.student_group.fetch_students', - filters: { - 'academic_year': frm.doc.academic_year, - 'group_based_on': frm.doc.group_based_on, - 'academic_term': frm.doc.academic_term, - 'program': frm.doc.program, - 'batch': frm.doc.batch, - 'student_category': frm.doc.student_category, - 'course': frm.doc.course, - 'student_group': frm.doc.name - } - } - }); - } - }, - - refresh: function(frm) { - if (!frm.doc.__islocal) { - - frm.add_custom_button(__('Add Guardians to Email Group'), function() { - frappe.call({ - method: 'erpnext.education.api.update_email_group', - args: { - 'doctype': 'Student Group', - 'name': frm.doc.name - } - }); - }, __('Actions')); - - frm.add_custom_button(__('Student Attendance Tool'), function() { - frappe.route_options = { - based_on: 'Student Group', - student_group: frm.doc.name - } - frappe.set_route('Form', 'Student Attendance Tool', 'Student Attendance Tool'); - }, __('Tools')); - - frm.add_custom_button(__('Course Scheduling Tool'), function() { - frappe.route_options = { - student_group: frm.doc.name - } - frappe.set_route('Form', 'Course Scheduling Tool', 'Course Scheduling Tool'); - }, __('Tools')); - - frm.add_custom_button(__('Newsletter'), function() { - frappe.route_options = { - 'Newsletter Email Group.email_group': frm.doc.name - } - frappe.set_route('List', 'Newsletter'); - }, __('View')); - - } - }, - - group_based_on: function(frm) { - if (frm.doc.group_based_on == 'Batch') { - frm.doc.course = null; - frm.set_df_property('program', 'reqd', 1); - frm.set_df_property('course', 'reqd', 0); - } - else if (frm.doc.group_based_on == 'Course') { - frm.set_df_property('program', 'reqd', 0); - frm.set_df_property('course', 'reqd', 1); - } - else if (frm.doc.group_based_on == 'Activity') { - frm.set_df_property('program', 'reqd', 0); - frm.set_df_property('course', 'reqd', 0); - } - }, - - get_students: function(frm) { - if (frm.doc.group_based_on == 'Batch' || frm.doc.group_based_on == 'Course') { - var student_list = []; - var max_roll_no = 0; - $.each(frm.doc.students, function(_i,d) { - student_list.push(d.student); - if (d.group_roll_number>max_roll_no) { - max_roll_no = d.group_roll_number; - } - }); - - if (frm.doc.academic_year) { - frappe.call({ - method: 'erpnext.education.doctype.student_group.student_group.get_students', - args: { - 'academic_year': frm.doc.academic_year, - 'academic_term': frm.doc.academic_term, - 'group_based_on': frm.doc.group_based_on, - 'program': frm.doc.program, - 'batch' : frm.doc.batch, - 'student_category' : frm.doc.student_category, - 'course': frm.doc.course - }, - callback: function(r) { - if (r.message) { - $.each(r.message, function(i, d) { - if(!in_list(student_list, d.student)) { - var s = frm.add_child('students'); - s.student = d.student; - s.student_name = d.student_name; - if (d.active === 0) { - s.active = 0; - } - s.group_roll_number = ++max_roll_no; - } - }); - refresh_field('students'); - frm.save(); - } else { - frappe.msgprint(__('Student Group is already updated.')) - } - } - }) - } - } else { - frappe.msgprint(__('Select students manually for the Activity based Group')); - } - } -}); - -frappe.ui.form.on('Student Group Instructor', { - instructors_add: function(frm){ - frm.fields_dict['instructors'].grid.get_field('instructor').get_query = function(doc){ - let instructor_list = []; - $.each(doc.instructors, function(idx, val){ - instructor_list.push(val.instructor); - }); - return { filters: [['Instructor', 'name', 'not in', instructor_list]] }; - }; - } -}); diff --git a/erpnext/education/doctype/student_group/student_group.json b/erpnext/education/doctype/student_group/student_group.json deleted file mode 100644 index 44b38b1345..0000000000 --- a/erpnext/education/doctype/student_group/student_group.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:student_group_name", - "creation": "2015-09-07 12:55:52.072792", - "doctype": "DocType", - "document_type": "Document", - "engine": "InnoDB", - "field_order": [ - "academic_year", - "group_based_on", - "student_group_name", - "max_strength", - "column_break_3", - "academic_term", - "program", - "batch", - "student_category", - "course", - "disabled", - "section_break_6", - "get_students", - "students", - "section_break_12", - "instructors" - ], - "fields": [ - { - "fieldname": "academic_year", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Academic Year", - "options": "Academic Year", - "set_only_once": 1 - }, - { - "fieldname": "group_based_on", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Group Based on", - "options": "\nBatch\nCourse\nActivity", - "reqd": 1 - }, - { - "fieldname": "student_group_name", - "fieldtype": "Data", - "label": "Student Group Name", - "reqd": 1, - "unique": 1 - }, - { - "description": "Set 0 for no limit", - "fieldname": "max_strength", - "fieldtype": "Int", - "label": "Max Strength" - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "academic_term", - "fieldtype": "Link", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Academic Term", - "options": "Academic Term" - }, - { - "fieldname": "program", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Program", - "options": "Program" - }, - { - "fieldname": "batch", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Batch", - "options": "Student Batch Name" - }, - { - "depends_on": "eval:doc.group_based_on == 'Course'", - "fieldname": "course", - "fieldtype": "Link", - "in_global_search": 1, - "in_standard_filter": 1, - "label": "Course", - "options": "Course" - }, - { - "default": "0", - "fieldname": "disabled", - "fieldtype": "Check", - "label": "Disabled" - }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "section_break_6", - "fieldtype": "Section Break", - "label": "Students" - }, - { - "fieldname": "get_students", - "fieldtype": "Button", - "label": "Get Students" - }, - { - "allow_on_submit": 1, - "fieldname": "students", - "fieldtype": "Table", - "label": "Students", - "options": "Student Group Student" - }, - { - "fieldname": "section_break_12", - "fieldtype": "Section Break", - "label": "Instructors" - }, - { - "fieldname": "instructors", - "fieldtype": "Table", - "label": "Instructors", - "options": "Student Group Instructor" - }, - { - "fieldname": "student_category", - "fieldtype": "Link", - "label": "Student Category", - "options": "Student Category" - } - ], - "modified": "2019-04-26 10:52:57.303951", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Group", - "owner": "Administrator", - "permissions": [ - { - "read": 1, - "role": "Instructor" - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "write": 1 - } - ], - "restrict_to_domain": "Education", - "search_fields": "program, batch, course", - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_group/student_group.py b/erpnext/education/doctype/student_group/student_group.py deleted file mode 100644 index a94489ba53..0000000000 --- a/erpnext/education/doctype/student_group/student_group.py +++ /dev/null @@ -1,200 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import cint - -from erpnext.education.utils import validate_duplicate_student - - -class StudentGroup(Document): - def validate(self): - self.validate_mandatory_fields() - self.validate_strength() - self.validate_students() - self.validate_and_set_child_table_fields() - validate_duplicate_student(self.students) - - def validate_mandatory_fields(self): - if self.group_based_on == "Course" and not self.course: - frappe.throw(_("Please select Course")) - if self.group_based_on == "Course" and (not self.program and self.batch): - frappe.throw(_("Please select Program")) - if self.group_based_on == "Batch" and not self.program: - frappe.throw(_("Please select Program")) - - def validate_strength(self): - if cint(self.max_strength) < 0: - frappe.throw(_("""Max strength cannot be less than zero.""")) - if self.max_strength and len(self.students) > self.max_strength: - frappe.throw( - _("""Cannot enroll more than {0} students for this student group.""").format(self.max_strength) - ) - - def validate_students(self): - program_enrollment = get_program_enrollment( - self.academic_year, - self.academic_term, - self.program, - self.batch, - self.student_category, - self.course, - ) - students = [d.student for d in program_enrollment] if program_enrollment else [] - for d in self.students: - if not frappe.db.get_value("Student", d.student, "enabled") and d.active and not self.disabled: - frappe.throw(_("{0} - {1} is inactive student").format(d.group_roll_number, d.student_name)) - - if ( - (self.group_based_on == "Batch") - and cint(frappe.defaults.get_defaults().validate_batch) - and d.student not in students - ): - frappe.throw( - _("{0} - {1} is not enrolled in the Batch {2}").format( - d.group_roll_number, d.student_name, self.batch - ) - ) - - if ( - (self.group_based_on == "Course") - and cint(frappe.defaults.get_defaults().validate_course) - and (d.student not in students) - ): - frappe.throw( - _("{0} - {1} is not enrolled in the Course {2}").format( - d.group_roll_number, d.student_name, self.course - ) - ) - - def validate_and_set_child_table_fields(self): - roll_numbers = [d.group_roll_number for d in self.students if d.group_roll_number] - max_roll_no = max(roll_numbers) if roll_numbers else 0 - roll_no_list = [] - for d in self.students: - if not d.student_name: - d.student_name = frappe.db.get_value("Student", d.student, "title") - if not d.group_roll_number: - max_roll_no += 1 - d.group_roll_number = max_roll_no - if d.group_roll_number in roll_no_list: - frappe.throw(_("Duplicate roll number for student {0}").format(d.student_name)) - else: - roll_no_list.append(d.group_roll_number) - - -@frappe.whitelist() -def get_students( - academic_year, - group_based_on, - academic_term=None, - program=None, - batch=None, - student_category=None, - course=None, -): - enrolled_students = get_program_enrollment( - academic_year, academic_term, program, batch, student_category, course - ) - - if enrolled_students: - student_list = [] - for s in enrolled_students: - if frappe.db.get_value("Student", s.student, "enabled"): - s.update({"active": 1}) - else: - s.update({"active": 0}) - student_list.append(s) - return student_list - else: - frappe.msgprint(_("No students found")) - return [] - - -def get_program_enrollment( - academic_year, academic_term=None, program=None, batch=None, student_category=None, course=None -): - - condition1 = " " - condition2 = " " - if academic_term: - condition1 += " and pe.academic_term = %(academic_term)s" - if program: - condition1 += " and pe.program = %(program)s" - if batch: - condition1 += " and pe.student_batch_name = %(batch)s" - if student_category: - condition1 += " and pe.student_category = %(student_category)s" - if course: - condition1 += " and pe.name = pec.parent and pec.course = %(course)s" - condition2 = ", `tabProgram Enrollment Course` pec" - - return frappe.db.sql( - """ - select - pe.student, pe.student_name - from - `tabProgram Enrollment` pe {condition2} - where - pe.academic_year = %(academic_year)s {condition1} - order by - pe.student_name asc - """.format( - condition1=condition1, condition2=condition2 - ), - ( - { - "academic_year": academic_year, - "academic_term": academic_term, - "program": program, - "batch": batch, - "student_category": student_category, - "course": course, - } - ), - as_dict=1, - ) - - -@frappe.whitelist() -@frappe.validate_and_sanitize_search_inputs -def fetch_students(doctype, txt, searchfield, start, page_len, filters): - if filters.get("group_based_on") != "Activity": - enrolled_students = get_program_enrollment( - filters.get("academic_year"), - filters.get("academic_term"), - filters.get("program"), - filters.get("batch"), - filters.get("student_category"), - ) - student_group_student = frappe.db.sql_list( - """select student from `tabStudent Group Student` where parent=%s""", - (filters.get("student_group")), - ) - students = ( - [d.student for d in enrolled_students if d.student not in student_group_student] - if enrolled_students - else [""] - ) or [""] - return frappe.db.sql( - """select name, title from tabStudent - where name in ({0}) and (`{1}` LIKE %s or title LIKE %s) - order by idx desc, name - limit %s, %s""".format( - ", ".join(["%s"] * len(students)), searchfield - ), - tuple(students + ["%%%s%%" % txt, "%%%s%%" % txt, start, page_len]), - ) - else: - return frappe.db.sql( - """select name, title from tabStudent - where `{0}` LIKE %s or title LIKE %s - order by idx desc, name - limit %s, %s""".format( - searchfield - ), - tuple(["%%%s%%" % txt, "%%%s%%" % txt, start, page_len]), - ) diff --git a/erpnext/education/doctype/student_group/student_group_dashboard.py b/erpnext/education/doctype/student_group/student_group_dashboard.py deleted file mode 100644 index 094b5a0235..0000000000 --- a/erpnext/education/doctype/student_group/student_group_dashboard.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - -from frappe import _ - - -def get_data(): - return { - "fieldname": "student_group", - "transactions": [ - {"label": _("Assessment"), "items": ["Assessment Plan", "Assessment Result"]}, - {"label": _("Course"), "items": ["Course Schedule"]}, - ], - } diff --git a/erpnext/education/doctype/student_group/test_records.json b/erpnext/education/doctype/student_group/test_records.json deleted file mode 100644 index 4c4e042b15..0000000000 --- a/erpnext/education/doctype/student_group/test_records.json +++ /dev/null @@ -1,34 +0,0 @@ -[ - { - "student_group_name": "Batch-_TP1-_Batch 1-2014-2015 (_Test Academic Term)", - "group_based_on": "Batch", - "program": "_TP1", - "batch": "_Batch 1", - "academic_year": "2014-2015", - "academic_term": "2014-2015 (_Test Academic Term)", - "max_strength": 0 - }, - { - "student_group_name": "Course-TC101-2014-2015 (_Test Academic Term)", - "group_based_on": "Course", - "course": "TC101", - "academic_year": "2014-2015", - "academic_term": "2014-2015 (_Test Academic Term)", - "max_strength": 0 - }, - { - "student_group_name": "Course-TC102-2014-2015 (_Test Academic Term)", - "group_based_on": "Course", - "course": "TC102", - "academic_year": "2014-2015", - "academic_term": "2014-2015 (_Test Academic Term)", - "max_strength": 0 - }, - { - "student_group_name": "Activity-2014-2015 (_Test Academic Term)", - "group_based_on": "Activity", - "academic_year": "2014-2015", - "academic_term": "2014-2015 (_Test Academic Term)", - "max_strength": 0 - } -] \ No newline at end of file diff --git a/erpnext/education/doctype/student_group/test_student_group.py b/erpnext/education/doctype/student_group/test_student_group.py deleted file mode 100644 index 84b49309ac..0000000000 --- a/erpnext/education/doctype/student_group/test_student_group.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and Contributors -# See license.txt - -import unittest - -import frappe - -import erpnext.education - - -def get_random_group(): - doc = frappe.get_doc( - { - "doctype": "Student Group", - "student_group_name": "_Test Student Group-" + frappe.generate_hash(length=5), - "group_based_on": "Activity", - } - ).insert() - - student_list = frappe.get_all("Student", limit=5) - - doc.extend("students", [{"student": d.name, "active": 1} for d in student_list]) - doc.save() - - return doc - - -class TestStudentGroup(unittest.TestCase): - def test_student_roll_no(self): - doc = get_random_group() - self.assertEqual(max([d.group_roll_number for d in doc.students]), len(doc.students)) - - def test_in_group(self): - doc = get_random_group() - - last_student = doc.students[-1].student - - # remove last student - doc.students = doc.students[:-1] - doc.save() - - self.assertRaises( - erpnext.education.StudentNotInGroupError, - erpnext.education.validate_student_belongs_to_group, - last_student, - doc.name, - ) - - # safe, don't throw validation - erpnext.education.validate_student_belongs_to_group(doc.students[0].student, doc.name) diff --git a/erpnext/education/doctype/student_group_creation_tool/__init__.py b/erpnext/education/doctype/student_group_creation_tool/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.js b/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.js deleted file mode 100644 index c189e2763c..0000000000 --- a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.js +++ /dev/null @@ -1,40 +0,0 @@ -frappe.ui.form.on("Student Group Creation Tool", "refresh", function(frm) { - frm.disable_save(); - frm.page.set_primary_action(__("Create Student Groups"), function() { - frappe.call({ - method: "create_student_groups", - doc:frm.doc - }) - }); - frappe.realtime.on("student_group_creation_progress", function(data) { - if(data.progress) { - frappe.hide_msgprint(true); - frappe.show_progress(__("Creating student groups"), data.progress[0],data.progress[1]); - } - }); -}); - -frappe.ui.form.on("Student Group Creation Tool", "get_courses", function(frm) { - frm.set_value("courses",[]); - if (frm.doc.academic_year && frm.doc.program) { - frappe.call({ - method: "get_courses", - doc:frm.doc, - callback: function(r) { - if(r.message) { - frm.set_value("courses", r.message); - } - } - }) - } -}); - -frappe.ui.form.on("Student Group Creation Tool", "onload", function(frm){ - cur_frm.set_query("academic_term",function(){ - return{ - "filters":{ - "academic_year": (frm.doc.academic_year) - } - }; - }); -}); diff --git a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.json b/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.json deleted file mode 100644 index fe7cbdb0b8..0000000000 --- a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.json +++ /dev/null @@ -1,309 +0,0 @@ -{ - "allow_copy": 1, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-01-04 14:45:36.576933", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 0, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_year", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Academic Year", - "length": 0, - "no_copy": 0, - "options": "Academic Year", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Leave blank if you make students groups per year", - "fieldname": "academic_term", - "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": "Academic Term", - "length": 0, - "no_copy": 0, - "options": "Academic Term", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "get_courses", - "fieldtype": "Button", - "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": "Get Courses", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_4", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "program", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Program", - "length": 0, - "no_copy": 0, - "options": "Program", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Leave unchecked if you don't want to consider batch while making course based groups. ", - "fieldname": "separate_groups", - "fieldtype": "Check", - "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": "Separate course based Group for every Batch", - "length": 0, - "no_copy": 0, - "options": "", - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_4", - "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, - "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, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "courses", - "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": "Courses", - "length": 0, - "no_copy": 0, - "options": "Student Group Creation Tool Course", - "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, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 1, - "hide_toolbar": 1, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "max_attachments": 0, - "modified": "2017-12-27 09:35:30.211254", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Group Creation Tool", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Education Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.py b/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.py deleted file mode 100644 index bbeb654bfc..0000000000 --- a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (c) 2015, Frappe and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ -from frappe.model.document import Document - -from erpnext.education.doctype.student_group.student_group import get_students - - -class StudentGroupCreationTool(Document): - @frappe.whitelist() - def get_courses(self): - group_list = [] - - batches = frappe.db.sql("""select name as batch from `tabStudent Batch Name`""", as_dict=1) - for batch in batches: - group_list.append({"group_based_on": "Batch", "batch": batch.batch}) - - courses = frappe.db.sql( - """select course, course_name from `tabProgram Course` where parent=%s""", - (self.program), - as_dict=1, - ) - if self.separate_groups: - from itertools import product - - course_list = product(courses, batches) - for course in course_list: - temp_dict = {} - temp_dict.update({"group_based_on": "Course"}) - temp_dict.update(course[0]) - temp_dict.update(course[1]) - group_list.append(temp_dict) - else: - for course in courses: - course.update({"group_based_on": "Course"}) - group_list.append(course) - - for group in group_list: - if group.get("group_based_on") == "Batch": - student_group_name = ( - self.program - + "/" - + group.get("batch") - + "/" - + (self.academic_term if self.academic_term else self.academic_year) - ) - group.update({"student_group_name": student_group_name}) - elif group.get("group_based_on") == "Course": - student_group_name = ( - group.get("course") - + "/" - + self.program - + ("/" + group.get("batch") if group.get("batch") else "") - + "/" - + (self.academic_term if self.academic_term else self.academic_year) - ) - group.update({"student_group_name": student_group_name}) - - return group_list - - @frappe.whitelist() - def create_student_groups(self): - if not self.courses: - frappe.throw(_("""No Student Groups created.""")) - - l = len(self.courses) - for d in self.courses: - if not d.student_group_name: - frappe.throw(_("Student Group Name is mandatory in row {0}").format(d.idx)) - - if d.group_based_on == "Course" and not d.course: - frappe.throw(_("Course is mandatory in row {0}").format(d.idx)) - - if d.group_based_on == "Batch" and not d.batch: - frappe.throw(_("Batch is mandatory in row {0}").format(d.idx)) - - frappe.publish_realtime( - "student_group_creation_progress", {"progress": [d.idx, l]}, user=frappe.session.user - ) - - student_group = frappe.new_doc("Student Group") - student_group.student_group_name = d.student_group_name - student_group.group_based_on = d.group_based_on - student_group.program = self.program - student_group.course = d.course - student_group.batch = d.batch - student_group.max_strength = d.max_strength - student_group.academic_term = self.academic_term - student_group.academic_year = self.academic_year - student_list = get_students( - self.academic_year, d.group_based_on, self.academic_term, self.program, d.batch, d.course - ) - - for student in student_list: - student_group.append("students", student) - student_group.save() - - frappe.msgprint(_("{0} Student Groups created.").format(l)) diff --git a/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.py b/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.py deleted file mode 100644 index 8722f973a8..0000000000 --- a/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestStudentGroupCreationTool(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_group_creation_tool_course/__init__.py b/erpnext/education/doctype/student_group_creation_tool_course/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.json b/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.json deleted file mode 100644 index 9f691a1cb0..0000000000 --- a/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.json +++ /dev/null @@ -1,272 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-01-04 15:03:57.940079", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "group_based_on", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Group Based On", - "length": 0, - "no_copy": 0, - "options": "\nBatch\nCourse", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "course", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Course", - "length": 0, - "no_copy": 0, - "options": "Course", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "batch", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Batch", - "length": 0, - "no_copy": 0, - "options": "Student Batch Name", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_3", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_group_name", - "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": 0, - "label": "Student Group Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "course.course_name", - "fieldname": "course_code", - "fieldtype": "Read Only", - "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": "Course Code", - "length": 0, - "no_copy": 0, - "options": "", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "max_strength", - "fieldtype": "Int", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Max Strength", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-11-04 03:38:52.525155", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Group Creation Tool Course", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.py b/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.py deleted file mode 100644 index 78e45411fd..0000000000 --- a/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentGroupCreationToolCourse(Document): - pass diff --git a/erpnext/education/doctype/student_group_instructor/__init__.py b/erpnext/education/doctype/student_group_instructor/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_group_instructor/student_group_instructor.json b/erpnext/education/doctype/student_group_instructor/student_group_instructor.json deleted file mode 100644 index cb4e52756b..0000000000 --- a/erpnext/education/doctype/student_group_instructor/student_group_instructor.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-04-17 16:06:01.406768", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "instructor", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Instructor", - "length": 0, - "no_copy": 0, - "options": "Instructor", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "instructor.instructor_name", - "fieldname": "instructor_name", - "fieldtype": "Read Only", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Instructor Name", - "length": 0, - "no_copy": 0, - "options": "", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-11-04 03:39:02.413082", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Group Instructor", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_group_instructor/student_group_instructor.py b/erpnext/education/doctype/student_group_instructor/student_group_instructor.py deleted file mode 100644 index 05ef6fc116..0000000000 --- a/erpnext/education/doctype/student_group_instructor/student_group_instructor.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentGroupInstructor(Document): - pass diff --git a/erpnext/education/doctype/student_group_student/__init__.py b/erpnext/education/doctype/student_group_student/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_group_student/student_group_student.json b/erpnext/education/doctype/student_group_student/student_group_student.json deleted file mode 100644 index d55db344eb..0000000000 --- a/erpnext/education/doctype/student_group_student/student_group_student.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2015-09-11 15:14:58.501830", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Student", - "length": 0, - "no_copy": 0, - "options": "Student", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_name", - "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": 0, - "label": "Student Name", - "length": 0, - "no_copy": 0, - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "group_roll_number", - "fieldtype": "Int", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Group Roll Number", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "active", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Active", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-11-04 03:38:22.896203", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Group Student", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_group_student/student_group_student.py b/erpnext/education/doctype/student_group_student/student_group_student.py deleted file mode 100644 index f9d00abde0..0000000000 --- a/erpnext/education/doctype/student_group_student/student_group_student.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentGroupStudent(Document): - pass diff --git a/erpnext/education/doctype/student_guardian/__init__.py b/erpnext/education/doctype/student_guardian/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_guardian/student_guardian.json b/erpnext/education/doctype/student_guardian/student_guardian.json deleted file mode 100644 index 3f03a3d1a2..0000000000 --- a/erpnext/education/doctype/student_guardian/student_guardian.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-09-01 14:28:39.174471", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "guardian", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Guardian", - "length": 0, - "no_copy": 0, - "options": "Guardian", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "guardian_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Guardian Name", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "relation", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Relation", - "length": 0, - "no_copy": 0, - "options": "\nMother\nFather\nOthers", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-11-04 03:38:14.211238", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Guardian", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_guardian/student_guardian.py b/erpnext/education/doctype/student_guardian/student_guardian.py deleted file mode 100644 index 0843acfd50..0000000000 --- a/erpnext/education/doctype/student_guardian/student_guardian.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentGuardian(Document): - pass diff --git a/erpnext/education/doctype/student_language/__init__.py b/erpnext/education/doctype/student_language/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_language/student_language.js b/erpnext/education/doctype/student_language/student_language.js deleted file mode 100644 index 6239ed1e44..0000000000 --- a/erpnext/education/doctype/student_language/student_language.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Student Language', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/student_language/student_language.json b/erpnext/education/doctype/student_language/student_language.json deleted file mode 100644 index fc53cd13c6..0000000000 --- a/erpnext/education/doctype/student_language/student_language.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "field:language_name", - "beta": 0, - "creation": "2017-02-21 01:55:00.366273", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "language_name", - "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": 0, - "label": "Language Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 1 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-11-04 03:37:34.712397", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Language", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_language/student_language.py b/erpnext/education/doctype/student_language/student_language.py deleted file mode 100644 index d578c9a0b6..0000000000 --- a/erpnext/education/doctype/student_language/student_language.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentLanguage(Document): - pass diff --git a/erpnext/education/doctype/student_language/test_student_language.py b/erpnext/education/doctype/student_language/test_student_language.py deleted file mode 100644 index d1a8b6d526..0000000000 --- a/erpnext/education/doctype/student_language/test_student_language.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Student Language') - - -class TestStudentLanguage(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_leave_application/__init__.py b/erpnext/education/doctype/student_leave_application/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_leave_application/student_leave_application.js b/erpnext/education/doctype/student_leave_application/student_leave_application.js deleted file mode 100644 index 4746148311..0000000000 --- a/erpnext/education/doctype/student_leave_application/student_leave_application.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Student Leave Application', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/student_leave_application/student_leave_application.json b/erpnext/education/doctype/student_leave_application/student_leave_application.json deleted file mode 100644 index 31b3da2fbd..0000000000 --- a/erpnext/education/doctype/student_leave_application/student_leave_application.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "actions": [], - "autoname": "EDU-SLA-.YYYY.-.#####", - "creation": "2016-11-28 15:38:54.793854", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "student", - "student_name", - "column_break_3", - "from_date", - "to_date", - "total_leave_days", - "section_break_5", - "attendance_based_on", - "student_group", - "course_schedule", - "mark_as_present", - "column_break_11", - "reason", - "amended_from" - ], - "fields": [ - { - "fieldname": "student", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Student", - "options": "Student", - "reqd": 1 - }, - { - "fetch_from": "student.title", - "fieldname": "student_name", - "fieldtype": "Read Only", - "in_global_search": 1, - "label": "Student Name", - "read_only": 1 - }, - { - "fieldname": "column_break_3", - "fieldtype": "Column Break" - }, - { - "fieldname": "from_date", - "fieldtype": "Date", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "From Date", - "reqd": 1 - }, - { - "fieldname": "to_date", - "fieldtype": "Date", - "in_list_view": 1, - "label": "To Date", - "reqd": 1 - }, - { - "default": "0", - "description": "Check this to mark the student as present in case the student is not attending the institute to participate or represent the institute in any event.\n\n", - "fieldname": "mark_as_present", - "fieldtype": "Check", - "label": "Mark as Present" - }, - { - "fieldname": "section_break_5", - "fieldtype": "Section Break" - }, - { - "fieldname": "reason", - "fieldtype": "Text", - "label": "Reason" - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "label": "Amended From", - "no_copy": 1, - "options": "Student Leave Application", - "print_hide": 1, - "read_only": 1 - }, - { - "allow_in_quick_entry": 1, - "default": "Student Group", - "fieldname": "attendance_based_on", - "fieldtype": "Select", - "label": "Attendance Based On", - "options": "Student Group\nCourse Schedule" - }, - { - "allow_in_quick_entry": 1, - "depends_on": "eval:doc.attendance_based_on === \"Student Group\";", - "fieldname": "student_group", - "fieldtype": "Link", - "label": "Student Group", - "mandatory_depends_on": "eval:doc.attendance_based_on === \"Student Group\";", - "options": "Student Group" - }, - { - "allow_in_quick_entry": 1, - "depends_on": "eval:doc.attendance_based_on === \"Course Schedule\";", - "fieldname": "course_schedule", - "fieldtype": "Link", - "label": "Course Schedule", - "mandatory_depends_on": "eval:doc.attendance_based_on === \"Course Schedule\";", - "options": "Course Schedule" - }, - { - "fieldname": "column_break_11", - "fieldtype": "Column Break" - }, - { - "fieldname": "total_leave_days", - "fieldtype": "Float", - "label": "Total Leave Days", - "read_only": 1 - } - ], - "is_submittable": 1, - "links": [], - "modified": "2020-09-21 18:10:24.440669", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Leave Application", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "submit": 1, - "write": 1 - }, - { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "share": 1, - "submit": 1, - "write": 1 - } - ], - "quick_entry": 1, - "restrict_to_domain": "Education", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "student_name" -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_leave_application/student_leave_application.py b/erpnext/education/doctype/student_leave_application/student_leave_application.py deleted file mode 100644 index c3645cf485..0000000000 --- a/erpnext/education/doctype/student_leave_application/student_leave_application.py +++ /dev/null @@ -1,135 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from datetime import timedelta - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils import date_diff, flt, get_link_to_form, getdate - -from erpnext.education.doctype.student_attendance.student_attendance import get_holiday_list -from erpnext.hr.doctype.holiday_list.holiday_list import is_holiday - - -class StudentLeaveApplication(Document): - def validate(self): - self.validate_holiday_list() - self.validate_duplicate() - self.validate_from_to_dates("from_date", "to_date") - - def on_submit(self): - self.update_attendance() - - def on_cancel(self): - self.cancel_attendance() - - def validate_duplicate(self): - data = frappe.db.sql( - """select name from `tabStudent Leave Application` - where - ((%(from_date)s > from_date and %(from_date)s < to_date) or - (%(to_date)s > from_date and %(to_date)s < to_date) or - (%(from_date)s <= from_date and %(to_date)s >= to_date)) and - name != %(name)s and student = %(student)s and docstatus < 2 - """, - { - "from_date": self.from_date, - "to_date": self.to_date, - "student": self.student, - "name": self.name, - }, - as_dict=1, - ) - - if data: - link = get_link_to_form("Student Leave Application", data[0].name) - frappe.throw( - _("Leave application {0} already exists against the student {1}").format( - link, frappe.bold(self.student) - ), - title=_("Duplicate Entry"), - ) - - def validate_holiday_list(self): - holiday_list = get_holiday_list() - self.total_leave_days = get_number_of_leave_days(self.from_date, self.to_date, holiday_list) - - def update_attendance(self): - holiday_list = get_holiday_list() - - for dt in daterange(getdate(self.from_date), getdate(self.to_date)): - date = dt.strftime("%Y-%m-%d") - - if is_holiday(holiday_list, date): - continue - - attendance = frappe.db.exists( - "Student Attendance", {"student": self.student, "date": date, "docstatus": ("!=", 2)} - ) - - status = "Present" if self.mark_as_present else "Absent" - if attendance: - # update existing attendance record - values = dict() - values["status"] = status - values["leave_application"] = self.name - frappe.db.set_value("Student Attendance", attendance, values) - else: - # make a new attendance record - doc = frappe.new_doc("Student Attendance") - doc.student = self.student - doc.student_name = self.student_name - doc.date = date - doc.leave_application = self.name - doc.status = status - if self.attendance_based_on == "Student Group": - doc.student_group = self.student_group - else: - doc.course_schedule = self.course_schedule - doc.insert(ignore_permissions=True, ignore_mandatory=True) - doc.submit() - - def cancel_attendance(self): - if self.docstatus == 2: - attendance = frappe.db.sql( - """ - SELECT name - FROM `tabStudent Attendance` - WHERE - student = %s and - (date between %s and %s) and - docstatus < 2 - """, - (self.student, self.from_date, self.to_date), - as_dict=1, - ) - - for name in attendance: - frappe.db.set_value("Student Attendance", name, "docstatus", 2) - - -def daterange(start_date, end_date): - for n in range(int((end_date - start_date).days) + 1): - yield start_date + timedelta(n) - - -def get_number_of_leave_days(from_date, to_date, holiday_list): - number_of_days = date_diff(to_date, from_date) + 1 - - holidays = frappe.db.sql( - """ - SELECT - COUNT(DISTINCT holiday_date) - FROM `tabHoliday` h1,`tabHoliday List` h2 - WHERE - h1.parent = h2.name and - h1.holiday_date between %s and %s and - h2.name = %s""", - (from_date, to_date, holiday_list), - )[0][0] - - number_of_days = flt(number_of_days) - flt(holidays) - - return number_of_days diff --git a/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py b/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py deleted file mode 100644 index 8819c3bf65..0000000000 --- a/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py +++ /dev/null @@ -1,2 +0,0 @@ -def get_data(): - return {"fieldname": "leave_application", "transactions": [{"items": ["Student Attendance"]}]} diff --git a/erpnext/education/doctype/student_leave_application/test_student_leave_application.py b/erpnext/education/doctype/student_leave_application/test_student_leave_application.py deleted file mode 100644 index 7146fc2576..0000000000 --- a/erpnext/education/doctype/student_leave_application/test_student_leave_application.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -import frappe -from frappe.utils import add_days, add_months, getdate - -from erpnext import get_default_company -from erpnext.education.doctype.student.test_student import create_student -from erpnext.education.doctype.student_group.test_student_group import get_random_group - - -class TestStudentLeaveApplication(unittest.TestCase): - def setUp(self): - frappe.db.sql("""delete from `tabStudent Leave Application`""") - create_holiday_list() - - def test_attendance_record_creation(self): - leave_application = create_leave_application() - attendance_record = frappe.db.exists( - "Student Attendance", {"leave_application": leave_application.name, "status": "Absent"} - ) - self.assertTrue(attendance_record) - - # mark as present - date = add_days(getdate(), -1) - leave_application = create_leave_application(date, date, 1) - attendance_record = frappe.db.exists( - "Student Attendance", {"leave_application": leave_application.name, "status": "Present"} - ) - self.assertTrue(attendance_record) - - def test_attendance_record_updated(self): - attendance = create_student_attendance() - create_leave_application() - self.assertEqual(frappe.db.get_value("Student Attendance", attendance.name, "status"), "Absent") - - def test_attendance_record_cancellation(self): - leave_application = create_leave_application() - leave_application.cancel() - attendance_status = frappe.db.get_value( - "Student Attendance", {"leave_application": leave_application.name}, "docstatus" - ) - self.assertTrue(attendance_status, 2) - - def test_holiday(self): - today = getdate() - leave_application = create_leave_application( - from_date=today, to_date=add_days(today, 1), submit=0 - ) - - # holiday list validation - company = get_default_company() or frappe.get_all("Company")[0].name - frappe.db.set_value("Company", company, "default_holiday_list", "") - self.assertRaises(frappe.ValidationError, leave_application.save) - - frappe.db.set_value("Company", company, "default_holiday_list", "Test Holiday List for Student") - leave_application.save() - - leave_application.reload() - self.assertEqual(leave_application.total_leave_days, 1) - - # check no attendance record created for a holiday - leave_application.submit() - self.assertIsNone( - frappe.db.exists( - "Student Attendance", {"leave_application": leave_application.name, "date": add_days(today, 1)} - ) - ) - - def tearDown(self): - company = get_default_company() or frappe.get_all("Company")[0].name - frappe.db.set_value("Company", company, "default_holiday_list", "_Test Holiday List") - - -def create_leave_application(from_date=None, to_date=None, mark_as_present=0, submit=1): - student = get_student() - - leave_application = frappe.new_doc("Student Leave Application") - leave_application.student = student.name - leave_application.attendance_based_on = "Student Group" - leave_application.student_group = get_random_group().name - leave_application.from_date = from_date if from_date else getdate() - leave_application.to_date = from_date if from_date else getdate() - leave_application.mark_as_present = mark_as_present - - if submit: - leave_application.insert() - leave_application.submit() - - return leave_application - - -def create_student_attendance(date=None, status=None): - student = get_student() - attendance = frappe.get_doc( - { - "doctype": "Student Attendance", - "student": student.name, - "status": status if status else "Present", - "date": date if date else getdate(), - "student_group": get_random_group().name, - } - ).insert() - return attendance - - -def get_student(): - return create_student( - dict(email="test_student@gmail.com", first_name="Test", last_name="Student") - ) - - -def create_holiday_list(): - holiday_list = "Test Holiday List for Student" - today = getdate() - if not frappe.db.exists("Holiday List", holiday_list): - frappe.get_doc( - dict( - doctype="Holiday List", - holiday_list_name=holiday_list, - from_date=add_months(today, -6), - to_date=add_months(today, 6), - holidays=[dict(holiday_date=add_days(today, 1), description="Test")], - ) - ).insert() - - company = get_default_company() or frappe.get_all("Company")[0].name - frappe.db.set_value("Company", company, "default_holiday_list", holiday_list) - return holiday_list diff --git a/erpnext/education/doctype/student_log/__init__.py b/erpnext/education/doctype/student_log/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_log/student_log.js b/erpnext/education/doctype/student_log/student_log.js deleted file mode 100644 index 40e63e9f88..0000000000 --- a/erpnext/education/doctype/student_log/student_log.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Student Log', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/student_log/student_log.json b/erpnext/education/doctype/student_log/student_log.json deleted file mode 100644 index cdd6aaa826..0000000000 --- a/erpnext/education/doctype/student_log/student_log.json +++ /dev/null @@ -1,423 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "EDU-SLOG-.YYYY.-.#####", - "beta": 0, - "creation": "2016-07-29 03:27:22.451772", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student", - "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": 1, - "label": "Student", - "length": 0, - "no_copy": 0, - "options": "Student", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "student.title", - "fieldname": "student_name", - "fieldtype": "Read Only", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Student Name", - "length": 0, - "no_copy": 0, - "options": "", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "type", - "fieldtype": "Select", - "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": "Type", - "length": 0, - "no_copy": 0, - "options": "General\nAcademic\nMedical\nAchievement", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Date", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_3", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_year", - "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": "Academic Year", - "length": 0, - "no_copy": 0, - "options": "Academic Year", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_term", - "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": "Academic Term", - "length": 0, - "no_copy": 0, - "options": "Academic Term", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "program", - "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": "Program", - "length": 0, - "no_copy": 0, - "options": "Program", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_batch", - "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": "Student Batch", - "length": 0, - "no_copy": 0, - "options": "Student Batch Name", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_5", - "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, - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "log", - "fieldtype": "Text Editor", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 1, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Log", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-08-21 16:15:47.027645", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Log", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Academics User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "student_name", - "track_changes": 0, - "track_seen": 1, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_log/student_log.py b/erpnext/education/doctype/student_log/student_log.py deleted file mode 100644 index b95f34e049..0000000000 --- a/erpnext/education/doctype/student_log/student_log.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentLog(Document): - pass diff --git a/erpnext/education/doctype/student_log/test_student_log.py b/erpnext/education/doctype/student_log/test_student_log.py deleted file mode 100644 index fef1ab56ac..0000000000 --- a/erpnext/education/doctype/student_log/test_student_log.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -# test_records = frappe.get_test_records('Student Log') - - -class TestStudentLog(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_report_generation_tool/__init__.py b/erpnext/education/doctype/student_report_generation_tool/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.html b/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.html deleted file mode 100644 index a9e84e6e27..0000000000 --- a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - -
- -
- - {% if letterhead and add_letterhead %} -
{{ letterhead }}
- {% endif %} - -
- -
-
-
-
- -
-
- {{ doc.students[0] }} -
-
- -
-
- -
-
- {{ doc.student_name }} -
-
- -
-
- -
-
- {{ doc.program }} -
-
- -
-
- -
-
- {{ doc.student_batch }} -
-
-
- -
-
-
- -
-
- {{ doc.academic_year }} -
-
- - {% if doc.academic_term %} -
-
- -
-
- {{ doc.academic_term }} -
-
- {% endif %} - -
-
- -
-
- {{ doc.assessment_group }} -
-
-
-
- - -{% if doc.show_marks | int %} - {% set result_data = 'score' %} -{% else %} - {% set result_data = 'grade' %} -{% endif %} - - -{% for course in courses %} - -
-
- -
- - - - - - {% for assessment_group in assessment_groups %} - - {% endfor %} - - - - - {% for criteria in course_criteria[course] %} - - - {% for assessment_group in assessment_groups %} - {% if (assessment_result.get(course) and assessment_result.get(course).get(assessment_group) and assessment_result.get(course).get(assessment_group).get(criteria)) %} - - {% else %} - - {% endif %} - {% endfor %} - - {% endfor %} - - -
-
-
- -
-
- {{ course }} ({{ frappe.db.get_value("Course", course, "course_name") }}) -
-
-
{{ _("Assessment Criteria") }} {{ assessment_group }}
{{ criteria }} - {{ assessment_result.get(course).get(assessment_group).get(criteria).get(result_data) }} - {% if result_data == 'score' %} - ({{ assessment_result.get(course).get(assessment_group).get(criteria).get('maximum_score') }}) - {% endif %} -
-
-
-
- -{% endfor %} - -
- -
-
-

{{ _("Student Attendance")}}


-
- Present {{ doc.attendance.get("Present") if doc.attendance.get("Present") != None else '0' }} days - out of {{ doc.attendance.get("Present") + doc.attendance.get("Absent") }} -
-
- -
-

{{ _("Parents Teacher Meeting Attendance")}}


-
- Present {{ doc.parents_attendance if doc.parents_attendance != None else '0' }} - out of {{ doc.parents_meeting if doc.parents_meeting != None else '0' }} -
-
-
- -{% if doc.assessment_terms %} -
-
-

{{ doc.assessment_terms }}

-
-
-{% endif %} -
diff --git a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.js b/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.js deleted file mode 100644 index 565074d878..0000000000 --- a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Student Report Generation Tool', { - onload: function(frm) { - frm.set_query("academic_term",function(){ - return{ - "filters":{ - "academic_year": frm.doc.academic_year - } - }; - }); - frm.set_query("assessment_group", function() { - return{ - filters: { - "is_group": 1 - } - }; - }); - }, - - refresh: function(frm) { - frm.disable_save(); - frm.page.clear_indicator(); - frm.page.set_primary_action(__('Print Report Card'), () => { - let url = "/api/method/erpnext.education.doctype.student_report_generation_tool.student_report_generation_tool.preview_report_card"; - open_url_post(url, {"doc": frm.doc}, true); - }); - }, - - student: function(frm) { - if (frm.doc.student) { - frappe.call({ - method:"erpnext.education.api.get_current_enrollment", - args: { - "student": frm.doc.student, - "academic_year": frm.doc.academic_year - }, - callback: function(r) { - if(r){ - $.each(r.message, function(i, d) { - if (frm.fields_dict.hasOwnProperty(i)) { - frm.set_value(i, d); - } - }); - } - } - }); - } - }, - - terms: function(frm) { - if(frm.doc.terms) { - return frappe.call({ - method: 'erpnext.setup.doctype.terms_and_conditions.terms_and_conditions.get_terms_and_conditions', - args: { - template_name: frm.doc.terms, - doc: frm.doc - }, - callback: function(r) { - frm.set_value("assessment_terms", r.message); - } - }); - } - } -}); diff --git a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.json b/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.json deleted file mode 100644 index a3282990d0..0000000000 --- a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.json +++ /dev/null @@ -1,618 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-01-15 15:36:32.830069", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student", - "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": "Student", - "length": 0, - "no_copy": 0, - "options": "Student", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_name", - "fieldtype": "Read Only", - "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": "Student Name", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "program", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Program", - "length": 0, - "no_copy": 0, - "options": "Program", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "student_batch", - "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": "Batch", - "length": 0, - "no_copy": 0, - "options": "Student Batch Name", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "include_all_assessment", - "fieldtype": "Check", - "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": "Include All Assessment Group", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "show_marks", - "fieldtype": "Check", - "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": "Show Marks", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "add_letterhead", - "fieldtype": "Check", - "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": "Add letterhead", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_3", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "assessment_group", - "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": "Assessment Group", - "length": 0, - "no_copy": 0, - "options": "Assessment Group", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_year", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Academic Year", - "length": 0, - "no_copy": 0, - "options": "Academic Year", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "academic_term", - "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": "Academic Term", - "length": 0, - "no_copy": 0, - "options": "Academic Term", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "add_letterhead", - "fieldname": "letter_head", - "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": "Letter Head", - "length": 0, - "no_copy": 0, - "options": "Letter Head", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_5", - "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": "Print Section", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "parents_meeting", - "fieldtype": "Data", - "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": "Total Parents Teacher Meeting", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "parents_attendance", - "fieldtype": "Data", - "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": "Attended by Parents", - "length": 0, - "no_copy": 0, - "options": "", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "terms", - "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": "Terms", - "length": 0, - "no_copy": 0, - "options": "Terms and Conditions", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "assessment_terms", - "fieldtype": "Text Editor", - "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": "Assessment Terms", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 1, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "max_attachments": 0, - "modified": "2018-11-04 03:38:42.970869", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Report Generation Tool", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "System Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py b/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py deleted file mode 100644 index ae3c140a2e..0000000000 --- a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import json - -import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.utils.pdf import get_pdf - -from erpnext.education.report.course_wise_assessment_report.course_wise_assessment_report import ( - get_child_assessment_groups, - get_formatted_result, -) - - -class StudentReportGenerationTool(Document): - pass - - -@frappe.whitelist() -def preview_report_card(doc): - doc = frappe._dict(json.loads(doc)) - doc.students = [doc.student] - if not (doc.student_name and doc.student_batch): - program_enrollment = frappe.get_all( - "Program Enrollment", - fields=["student_batch_name", "student_name"], - filters={"student": doc.student, "docstatus": ("!=", 2), "academic_year": doc.academic_year}, - ) - if program_enrollment: - doc.batch = program_enrollment[0].student_batch_name - doc.student_name = program_enrollment[0].student_name - - # get the assessment result of the selected student - values = get_formatted_result( - doc, get_course=True, get_all_assessment_groups=doc.include_all_assessment - ) - assessment_result = values.get("assessment_result").get(doc.student) - courses = values.get("course_dict") - course_criteria = get_courses_criteria(courses) - - # get the assessment group as per the user selection - if doc.include_all_assessment: - assessment_groups = get_child_assessment_groups(doc.assessment_group) - else: - assessment_groups = [doc.assessment_group] - - # get the attendance of the student for that peroid of time. - doc.attendance = get_attendance_count(doc.students[0], doc.academic_year, doc.academic_term) - - template = ( - "erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.html" - ) - base_template_path = "frappe/www/printview.html" - - from frappe.www.printview import get_letter_head - - letterhead = get_letter_head( - frappe._dict({"letter_head": doc.letterhead}), not doc.add_letterhead - ) - - html = frappe.render_template( - template, - { - "doc": doc, - "assessment_result": assessment_result, - "courses": courses, - "assessment_groups": assessment_groups, - "course_criteria": course_criteria, - "letterhead": letterhead and letterhead.get("content", None), - "add_letterhead": doc.add_letterhead if doc.add_letterhead else 0, - }, - ) - final_template = frappe.render_template( - base_template_path, {"body": html, "title": "Report Card"} - ) - - frappe.response.filename = "Report Card " + doc.students[0] + ".pdf" - frappe.response.filecontent = get_pdf(final_template) - frappe.response.type = "download" - - -def get_courses_criteria(courses): - course_criteria = frappe._dict() - for course in courses: - course_criteria[course] = [ - d.assessment_criteria - for d in frappe.get_all( - "Course Assessment Criteria", fields=["assessment_criteria"], filters={"parent": course} - ) - ] - return course_criteria - - -def get_attendance_count(student, academic_year, academic_term=None): - if academic_year: - from_date, to_date = frappe.db.get_value( - "Academic Year", academic_year, ["year_start_date", "year_end_date"] - ) - elif academic_term: - from_date, to_date = frappe.db.get_value( - "Academic Term", academic_term, ["term_start_date", "term_end_date"] - ) - if from_date and to_date: - attendance = dict( - frappe.db.sql( - """select status, count(student) as no_of_days - from `tabStudent Attendance` where student = %s and docstatus = 1 - and date between %s and %s group by status""", - (student, from_date, to_date), - ) - ) - if "Absent" not in attendance.keys(): - attendance["Absent"] = 0 - if "Present" not in attendance.keys(): - attendance["Present"] = 0 - return attendance - else: - frappe.throw(_("Provide the academic year and set the starting and ending date.")) diff --git a/erpnext/education/doctype/student_report_generation_tool/test_student_report_generation_tool.py b/erpnext/education/doctype/student_report_generation_tool/test_student_report_generation_tool.py deleted file mode 100644 index e37881f012..0000000000 --- a/erpnext/education/doctype/student_report_generation_tool/test_student_report_generation_tool.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestStudentReportGenerationTool(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/student_sibling/__init__.py b/erpnext/education/doctype/student_sibling/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_sibling/student_sibling.json b/erpnext/education/doctype/student_sibling/student_sibling.json deleted file mode 100644 index f67fe79d98..0000000000 --- a/erpnext/education/doctype/student_sibling/student_sibling.json +++ /dev/null @@ -1,306 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-09-01 14:41:23.824083", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 0, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "studying_in_same_institute", - "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": "Studying in Same Institute", - "length": 0, - "no_copy": 0, - "options": "NO\nYES", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 3, - "fieldname": "full_name", - "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": 0, - "label": "Full Name", - "length": 0, - "no_copy": 0, - "options": "", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 1, - "fieldname": "gender", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Gender", - "length": 0, - "no_copy": 0, - "options": "\nMale\nFemale", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "", - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_4", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.studying_in_same_institute == \"YES\"", - "fieldname": "student", - "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": "Student ID", - "length": 0, - "no_copy": 0, - "options": "Student", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 2, - "depends_on": "eval:doc.studying_in_same_institute == \"NO\"", - "fieldname": "institution", - "fieldtype": "Data", - "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": "Institution", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 2, - "fieldname": "program", - "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": 0, - "label": "Program", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 2, - "fieldname": "date_of_birth", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Date of Birth", - "length": 0, - "no_copy": 0, - "options": "", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-11-04 03:37:25.881487", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Sibling", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_sibling/student_sibling.py b/erpnext/education/doctype/student_sibling/student_sibling.py deleted file mode 100644 index 9ee0667d14..0000000000 --- a/erpnext/education/doctype/student_sibling/student_sibling.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentSibling(Document): - pass diff --git a/erpnext/education/doctype/student_siblings/__init__.py b/erpnext/education/doctype/student_siblings/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/student_siblings/student_siblings.json b/erpnext/education/doctype/student_siblings/student_siblings.json deleted file mode 100644 index 9d91ad2e2c..0000000000 --- a/erpnext/education/doctype/student_siblings/student_siblings.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2016-09-01 14:41:23.824083", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "name1", - "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": 0, - "label": "Name", - "length": 0, - "no_copy": 0, - "options": "", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "gender", - "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", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "date_of_birth", - "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 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-11-04 03:37:46.485218", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Siblings", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Education", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/education/doctype/student_siblings/student_siblings.py b/erpnext/education/doctype/student_siblings/student_siblings.py deleted file mode 100644 index ee89f4f157..0000000000 --- a/erpnext/education/doctype/student_siblings/student_siblings.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class StudentSiblings(Document): - pass diff --git a/erpnext/education/doctype/topic/__init__.py b/erpnext/education/doctype/topic/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/topic/test_topic.py b/erpnext/education/doctype/topic/test_topic.py deleted file mode 100644 index c11204a575..0000000000 --- a/erpnext/education/doctype/topic/test_topic.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - -import frappe - - -class TestTopic(unittest.TestCase): - def setUp(self): - make_topic_and_linked_content("_Test Topic 1", [{"type": "Article", "name": "_Test Article 1"}]) - - def test_get_contents(self): - topic = frappe.get_doc("Topic", "_Test Topic 1") - contents = topic.get_contents() - self.assertEqual(contents[0].doctype, "Article") - self.assertEqual(contents[0].name, "_Test Article 1") - frappe.db.rollback() - - -def make_topic(name): - try: - topic = frappe.get_doc("Topic", name) - except frappe.DoesNotExistError: - topic = frappe.get_doc( - { - "doctype": "Topic", - "topic_name": name, - "topic_code": name, - } - ).insert() - return topic.name - - -def make_topic_and_linked_content(topic_name, content_dict_list): - try: - topic = frappe.get_doc("Topic", topic_name) - except frappe.DoesNotExistError: - make_topic(topic_name) - topic = frappe.get_doc("Topic", topic_name) - content_list = [make_content(content["type"], content["name"]) for content in content_dict_list] - for content in content_list: - topic.append("topic_content", {"content": content.title, "content_type": content.doctype}) - topic.save() - return topic - - -def make_content(type, name): - try: - content = frappe.get_doc(type, name) - except frappe.DoesNotExistError: - content = frappe.get_doc({"doctype": type, "title": name}).insert() - return content diff --git a/erpnext/education/doctype/topic/topic.js b/erpnext/education/doctype/topic/topic.js deleted file mode 100644 index 0c903c5a56..0000000000 --- a/erpnext/education/doctype/topic/topic.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Topic', { - refresh: function(frm) { - if (!cur_frm.doc.__islocal) { - frm.add_custom_button(__('Add to Courses'), function() { - frm.trigger('add_topic_to_courses'); - }, __('Action')); - } - }, - - add_topic_to_courses: function(frm) { - get_courses_without_topic(frm.doc.name).then(r => { - if (r.message.length) { - frappe.prompt([ - { - fieldname: 'courses', - label: __('Courses'), - fieldtype: 'MultiSelectPills', - get_data: function() { - return r.message; - } - } - ], - function(data) { - frappe.call({ - method: 'erpnext.education.doctype.topic.topic.add_topic_to_courses', - args: { - 'topic': frm.doc.name, - 'courses': data.courses - }, - callback: function(r) { - if (!r.exc) { - frm.reload_doc(); - } - }, - freeze: true, - freeze_message: __('...Adding Topic to Courses') - }); - }, __('Add Topic to Courses'), __('Add')); - } else { - frappe.msgprint(__('This topic is already added to the existing courses')); - } - }); - } -}); - -let get_courses_without_topic = function(topic) { - return frappe.call({ - type: 'GET', - method: 'erpnext.education.doctype.topic.topic.get_courses_without_topic', - args: {'topic': topic} - }); -}; diff --git a/erpnext/education/doctype/topic/topic.json b/erpnext/education/doctype/topic/topic.json deleted file mode 100644 index 305458bf67..0000000000 --- a/erpnext/education/doctype/topic/topic.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:topic_name", - "creation": "2018-12-12 11:37:39.917760", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "topic_name", - "topic_content", - "description", - "hero_image" - ], - "fields": [ - { - "fieldname": "topic_name", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Name", - "reqd": 1, - "unique": 1 - }, - { - "fieldname": "topic_content", - "fieldtype": "Table", - "label": "Topic Content", - "options": "Topic Content" - }, - { - "fieldname": "hero_image", - "fieldtype": "Attach Image", - "hidden": 1, - "label": "Hero Image" - }, - { - "fieldname": "description", - "fieldtype": "Small Text", - "label": "Description" - } - ], - "image_field": "hero_image", - "modified": "2019-06-12 12:34:49.911300", - "modified_by": "Administrator", - "module": "Education", - "name": "Topic", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Administrator", - "share": 1, - "write": 1 - }, - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Instructor", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/topic/topic.py b/erpnext/education/doctype/topic/topic.py deleted file mode 100644 index 6dd965552b..0000000000 --- a/erpnext/education/doctype/topic/topic.py +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import json - -import frappe -from frappe import _ -from frappe.model.document import Document - - -class Topic(Document): - def get_contents(self): - try: - topic_content_list = self.topic_content - content_data = [ - frappe.get_doc(topic_content.content_type, topic_content.content) - for topic_content in topic_content_list - ] - except Exception as e: - frappe.log_error(frappe.get_traceback()) - return None - return content_data - - -@frappe.whitelist() -def get_courses_without_topic(topic): - data = [] - for entry in frappe.db.get_all("Course"): - course = frappe.get_doc("Course", entry.name) - topics = [t.topic for t in course.topics] - if not topics or topic not in topics: - data.append(course.name) - return data - - -@frappe.whitelist() -def add_topic_to_courses(topic, courses, mandatory=False): - courses = json.loads(courses) - for entry in courses: - course = frappe.get_doc("Course", entry) - course.append("topics", {"topic": topic, "topic_name": topic}) - course.flags.ignore_mandatory = True - course.save() - frappe.db.commit() - frappe.msgprint( - _("Topic {0} has been added to all the selected courses successfully.").format( - frappe.bold(topic) - ), - title=_("Courses updated"), - indicator="green", - ) - - -@frappe.whitelist() -def add_content_to_topics(content_type, content, topics): - topics = json.loads(topics) - for entry in topics: - topic = frappe.get_doc("Topic", entry) - topic.append( - "topic_content", - { - "content_type": content_type, - "content": content, - }, - ) - topic.flags.ignore_mandatory = True - topic.save() - frappe.db.commit() - frappe.msgprint( - _("{0} {1} has been added to all the selected topics successfully.").format( - content_type, frappe.bold(content) - ), - title=_("Topics updated"), - indicator="green", - ) diff --git a/erpnext/education/doctype/topic_content/__init__.py b/erpnext/education/doctype/topic_content/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/doctype/topic_content/test_topic_content.py b/erpnext/education/doctype/topic_content/test_topic_content.py deleted file mode 100644 index 56bb40968c..0000000000 --- a/erpnext/education/doctype/topic_content/test_topic_content.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestTopicContent(unittest.TestCase): - pass diff --git a/erpnext/education/doctype/topic_content/topic_content.js b/erpnext/education/doctype/topic_content/topic_content.js deleted file mode 100644 index 9cda0cabb2..0000000000 --- a/erpnext/education/doctype/topic_content/topic_content.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Topic Content', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/education/doctype/topic_content/topic_content.json b/erpnext/education/doctype/topic_content/topic_content.json deleted file mode 100644 index 444fd1d07c..0000000000 --- a/erpnext/education/doctype/topic_content/topic_content.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "creation": "2018-12-12 11:42:57.987434", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "content_type", - "column_break_2", - "content" - ], - "fields": [ - { - "fieldname": "content_type", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Content Type", - "options": "\nArticle\nVideo\nQuiz", - "reqd": 1 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "fieldname": "content", - "fieldtype": "Dynamic Link", - "in_list_view": 1, - "label": "Content", - "options": "content_type", - "reqd": 1 - } - ], - "istable": 1, - "modified": "2019-05-14 11:12:49.153771", - "modified_by": "Administrator", - "module": "Education", - "name": "Topic Content", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/education/doctype/topic_content/topic_content.py b/erpnext/education/doctype/topic_content/topic_content.py deleted file mode 100644 index 88d0eee73a..0000000000 --- a/erpnext/education/doctype/topic_content/topic_content.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from frappe.model.document import Document - - -class TopicContent(Document): - pass diff --git a/erpnext/education/education_dashboard/education/education.json b/erpnext/education/education_dashboard/education/education.json deleted file mode 100644 index 41d33758b9..0000000000 --- a/erpnext/education/education_dashboard/education/education.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "cards": [ - { - "card": "Total Students" - }, - { - "card": "Total Instructors" - }, - { - "card": "Program Enrollments" - }, - { - "card": "Student Applicants to Review" - } - ], - "charts": [ - { - "chart": "Program Enrollments", - "width": "Full" - }, - { - "chart": "Program wise Enrollment", - "width": "Half" - }, - { - "chart": "Course wise Enrollment", - "width": "Half" - }, - { - "chart": "Course wise Student Count", - "width": "Half" - }, - { - "chart": "Student Category wise Program Enrollments", - "width": "Half" - }, - { - "chart": "Student Gender Diversity Ratio", - "width": "Half" - }, - { - "chart": "Instructor Gender Diversity Ratio", - "width": "Half" - }, - { - "chart": "Program wise Fee Collection", - "width": "Full" - } - ], - "creation": "2020-07-22 18:51:02.195762", - "dashboard_name": "Education", - "docstatus": 0, - "doctype": "Dashboard", - "idx": 0, - "is_default": 0, - "is_standard": 1, - "modified": "2020-08-05 16:22:17.428101", - "modified_by": "Administrator", - "module": "Education", - "name": "Education", - "owner": "Administrator" -} \ No newline at end of file diff --git a/erpnext/education/module_onboarding/education/education.json b/erpnext/education/module_onboarding/education/education.json deleted file mode 100644 index e5f0fec3d1..0000000000 --- a/erpnext/education/module_onboarding/education/education.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "allow_roles": [ - { - "role": "Education Manager" - } - ], - "creation": "2020-07-27 19:02:49.561391", - "docstatus": 0, - "doctype": "Module Onboarding", - "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/education", - "idx": 0, - "is_complete": 0, - "modified": "2020-07-27 21:10:46.722961", - "modified_by": "Administrator", - "module": "Education", - "name": "Education", - "owner": "Administrator", - "steps": [ - { - "step": "Create a Student" - }, - { - "step": "Create an Instructor" - }, - { - "step": "Introduction to Program and Courses" - }, - { - "step": "Create a Topic" - }, - { - "step": "Create a Course" - }, - { - "step": "Create a Program" - }, - { - "step": "Enroll a Student in a Program" - }, - { - "step": "Introduction to Student Group" - }, - { - "step": "Introduction to Student Attendance" - } - ], - "subtitle": "Students, Instructors, Programs and more.", - "success_message": "The Education Module is all set up!", - "title": "Let's Set Up the Education Module." -} diff --git a/erpnext/education/number_card/program_enrollments/program_enrollments.json b/erpnext/education/number_card/program_enrollments/program_enrollments.json deleted file mode 100644 index 5847679ddd..0000000000 --- a/erpnext/education/number_card/program_enrollments/program_enrollments.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "aggregate_function_based_on": "", - "creation": "2020-07-27 18:26:27.005186", - "docstatus": 0, - "doctype": "Number Card", - "document_type": "Program Enrollment", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Program Enrollment\",\"docstatus\",\"=\",\"1\",false],[\"Program Enrollment\",\"enrollment_date\",\"Timespan\",\"this year\",false]]", - "function": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "label": "Program Enrollments", - "modified": "2020-07-27 18:26:32.512624", - "modified_by": "Administrator", - "module": "Education", - "name": "Program Enrollments", - "owner": "Administrator", - "report_function": "Sum", - "show_percentage_stats": 1, - "stats_time_interval": "Yearly", - "type": "Document Type" -} \ No newline at end of file diff --git a/erpnext/education/number_card/student_applicants_to_review/student_applicants_to_review.json b/erpnext/education/number_card/student_applicants_to_review/student_applicants_to_review.json deleted file mode 100644 index 258667a2d4..0000000000 --- a/erpnext/education/number_card/student_applicants_to_review/student_applicants_to_review.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "aggregate_function_based_on": "", - "creation": "2020-07-27 18:42:33.366862", - "docstatus": 0, - "doctype": "Number Card", - "document_type": "Student Applicant", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Student Applicant\",\"application_status\",\"=\",\"Applied\",false]]", - "function": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "label": "Student Applicants to Review", - "modified": "2020-07-27 18:42:42.739710", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Applicants to Review", - "owner": "Administrator", - "report_function": "Sum", - "show_percentage_stats": 1, - "stats_time_interval": "Monthly", - "type": "Document Type" -} \ No newline at end of file diff --git a/erpnext/education/number_card/total_instructors/total_instructors.json b/erpnext/education/number_card/total_instructors/total_instructors.json deleted file mode 100644 index b8d3cc0fdf..0000000000 --- a/erpnext/education/number_card/total_instructors/total_instructors.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "aggregate_function_based_on": "", - "creation": "2020-07-23 14:19:38.423190", - "docstatus": 0, - "doctype": "Number Card", - "document_type": "Instructor", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Instructor\",\"status\",\"=\",\"Active\",false]]", - "function": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "label": "Total Instructors", - "modified": "2020-07-23 14:19:47.623306", - "modified_by": "Administrator", - "module": "Education", - "name": "Total Instructors", - "owner": "Administrator", - "report_function": "Sum", - "show_percentage_stats": 1, - "stats_time_interval": "Monthly", - "type": "Document Type" -} \ No newline at end of file diff --git a/erpnext/education/number_card/total_students/total_students.json b/erpnext/education/number_card/total_students/total_students.json deleted file mode 100644 index 109c3d8ad9..0000000000 --- a/erpnext/education/number_card/total_students/total_students.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "aggregate_function_based_on": "", - "creation": "2020-07-23 14:18:07.732298", - "docstatus": 0, - "doctype": "Number Card", - "document_type": "Student", - "dynamic_filters_json": "[]", - "filters_json": "[[\"Student\",\"enabled\",\"=\",1,false]]", - "function": "Count", - "idx": 0, - "is_public": 1, - "is_standard": 1, - "label": "Total Students", - "modified": "2020-07-23 14:18:40.603947", - "modified_by": "Administrator", - "module": "Education", - "name": "Total Students", - "owner": "Administrator", - "report_function": "Sum", - "show_percentage_stats": 1, - "stats_time_interval": "Monthly", - "type": "Document Type" -} \ No newline at end of file diff --git a/erpnext/education/onboarding_step/create_a_course/create_a_course.json b/erpnext/education/onboarding_step/create_a_course/create_a_course.json deleted file mode 100644 index 02eee14056..0000000000 --- a/erpnext/education/onboarding_step/create_a_course/create_a_course.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Create Entry", - "creation": "2020-07-27 19:09:04.493932", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-07-27 19:09:04.493932", - "modified_by": "Administrator", - "name": "Create a Course", - "owner": "Administrator", - "reference_document": "Course", - "show_full_form": 1, - "title": "Create a Course", - "validate_action": 1 -} \ No newline at end of file diff --git a/erpnext/education/onboarding_step/create_a_program/create_a_program.json b/erpnext/education/onboarding_step/create_a_program/create_a_program.json deleted file mode 100644 index 61726304e0..0000000000 --- a/erpnext/education/onboarding_step/create_a_program/create_a_program.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Create Entry", - "creation": "2020-07-27 19:09:35.451945", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-07-27 19:09:35.451945", - "modified_by": "Administrator", - "name": "Create a Program", - "owner": "Administrator", - "reference_document": "Program", - "show_full_form": 1, - "title": "Create a Program", - "validate_action": 1 -} \ No newline at end of file diff --git a/erpnext/education/onboarding_step/create_a_student/create_a_student.json b/erpnext/education/onboarding_step/create_a_student/create_a_student.json deleted file mode 100644 index 07c3f7331e..0000000000 --- a/erpnext/education/onboarding_step/create_a_student/create_a_student.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Create Entry", - "creation": "2020-07-27 19:17:20.326837", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 1, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-07-27 19:49:47.724289", - "modified_by": "Administrator", - "name": "Create a Student", - "owner": "Administrator", - "reference_document": "Student", - "show_full_form": 1, - "title": "Create a Student", - "validate_action": 1 -} \ No newline at end of file diff --git a/erpnext/education/onboarding_step/create_a_topic/create_a_topic.json b/erpnext/education/onboarding_step/create_a_topic/create_a_topic.json deleted file mode 100644 index 96a536488e..0000000000 --- a/erpnext/education/onboarding_step/create_a_topic/create_a_topic.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Create Entry", - "creation": "2020-07-27 19:08:40.754534", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-07-27 19:09:13.231995", - "modified_by": "Administrator", - "name": "Create a Topic", - "owner": "Administrator", - "reference_document": "Topic", - "show_full_form": 1, - "title": "Create a Topic", - "validate_action": 1 -} \ No newline at end of file diff --git a/erpnext/education/onboarding_step/create_an_instructor/create_an_instructor.json b/erpnext/education/onboarding_step/create_an_instructor/create_an_instructor.json deleted file mode 100644 index 419d6e07f1..0000000000 --- a/erpnext/education/onboarding_step/create_an_instructor/create_an_instructor.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Create Entry", - "creation": "2020-07-27 19:17:39.158037", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 1, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-07-27 19:49:47.723494", - "modified_by": "Administrator", - "name": "Create an Instructor", - "owner": "Administrator", - "reference_document": "Instructor", - "show_full_form": 1, - "title": "Create an Instructor", - "validate_action": 1 -} \ No newline at end of file diff --git a/erpnext/education/onboarding_step/enroll_a_student_in_a_program/enroll_a_student_in_a_program.json b/erpnext/education/onboarding_step/enroll_a_student_in_a_program/enroll_a_student_in_a_program.json deleted file mode 100644 index 61e48cd520..0000000000 --- a/erpnext/education/onboarding_step/enroll_a_student_in_a_program/enroll_a_student_in_a_program.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Create Entry", - "creation": "2020-07-27 19:10:28.530226", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-07-27 19:10:28.530226", - "modified_by": "Administrator", - "name": "Enroll a Student in a Program", - "owner": "Administrator", - "reference_document": "Program Enrollment", - "show_full_form": 0, - "title": "Enroll a Student in a Program", - "validate_action": 1 -} \ No newline at end of file diff --git a/erpnext/education/onboarding_step/introduction_to_program_and_courses/introduction_to_program_and_courses.json b/erpnext/education/onboarding_step/introduction_to_program_and_courses/introduction_to_program_and_courses.json deleted file mode 100644 index a9ddfc00da..0000000000 --- a/erpnext/education/onboarding_step/introduction_to_program_and_courses/introduction_to_program_and_courses.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Watch Video", - "creation": "2020-07-27 19:05:12.663987", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-07-27 20:18:11.831789", - "modified_by": "Administrator", - "name": "Introduction to Program and Courses", - "owner": "Administrator", - "show_full_form": 0, - "title": "Introduction to Program and Courses", - "validate_action": 1, - "video_url": "https://www.youtube.com/watch?v=1ueE4seFTp8" -} \ No newline at end of file diff --git a/erpnext/education/onboarding_step/introduction_to_student_attendance/introduction_to_student_attendance.json b/erpnext/education/onboarding_step/introduction_to_student_attendance/introduction_to_student_attendance.json deleted file mode 100644 index 3de99728ea..0000000000 --- a/erpnext/education/onboarding_step/introduction_to_student_attendance/introduction_to_student_attendance.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "action": "Watch Video", - "creation": "2020-07-27 19:14:57.176131", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-07-27 19:55:55.411032", - "modified_by": "Administrator", - "name": "Introduction to Student Attendance", - "owner": "Administrator", - "show_full_form": 0, - "title": "Introduction to Student Attendance", - "validate_action": 1, - "video_url": "https://youtu.be/j9pgkPuyiaI" -} \ No newline at end of file diff --git a/erpnext/education/onboarding_step/introduction_to_student_group/introduction_to_student_group.json b/erpnext/education/onboarding_step/introduction_to_student_group/introduction_to_student_group.json deleted file mode 100644 index 74bdcd17be..0000000000 --- a/erpnext/education/onboarding_step/introduction_to_student_group/introduction_to_student_group.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "action": "Watch Video", - "creation": "2020-07-27 19:12:05.046465", - "docstatus": 0, - "doctype": "Onboarding Step", - "idx": 0, - "is_complete": 0, - "is_mandatory": 0, - "is_single": 0, - "is_skipped": 0, - "modified": "2020-07-27 19:42:47.286441", - "modified_by": "Administrator", - "name": "Introduction to Student Group", - "owner": "Administrator", - "reference_document": "Student Group", - "show_full_form": 0, - "title": "Introduction to Student Group", - "validate_action": 1, - "video_url": "https://youtu.be/5K_smeeE1Q4" -} \ No newline at end of file diff --git a/erpnext/education/report/__init__.py b/erpnext/education/report/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/absent_student_report/__init__.py b/erpnext/education/report/absent_student_report/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/absent_student_report/absent_student_report.js b/erpnext/education/report/absent_student_report/absent_student_report.js deleted file mode 100644 index bf2d10d59e..0000000000 --- a/erpnext/education/report/absent_student_report/absent_student_report.js +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -// License: GNU General Public License v3. See license.txt - - -frappe.query_reports["Absent Student Report"] = { - "filters": [ - { - "fieldname":"date", - "label": __("Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "reqd": 1 - } - ] -} diff --git a/erpnext/education/report/absent_student_report/absent_student_report.json b/erpnext/education/report/absent_student_report/absent_student_report.json deleted file mode 100644 index 92ad860cc6..0000000000 --- a/erpnext/education/report/absent_student_report/absent_student_report.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2013-05-13 14:04:03", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 3, - "is_standard": "Yes", - "modified": "2020-06-24 17:16:40.251116", - "modified_by": "Administrator", - "module": "Education", - "name": "Absent Student Report", - "owner": "Administrator", - "prepared_report": 0, - "ref_doctype": "Student Attendance", - "report_name": "Absent Student Report", - "report_type": "Script Report", - "roles": [ - { - "role": "Academics User" - } - ] -} \ No newline at end of file diff --git a/erpnext/education/report/absent_student_report/absent_student_report.py b/erpnext/education/report/absent_student_report/absent_student_report.py deleted file mode 100644 index ac27f715ec..0000000000 --- a/erpnext/education/report/absent_student_report/absent_student_report.py +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - - -import frappe -from frappe import _, msgprint -from frappe.utils import formatdate - -from erpnext.education.doctype.student_attendance.student_attendance import get_holiday_list -from erpnext.hr.doctype.holiday_list.holiday_list import is_holiday - - -def execute(filters=None): - if not filters: - filters = {} - - if not filters.get("date"): - msgprint(_("Please select date"), raise_exception=1) - - columns = get_columns(filters) - date = filters.get("date") - - holiday_list = get_holiday_list() - if is_holiday(holiday_list, filters.get("date")): - msgprint( - _("No attendance has been marked for {0} as it is a Holiday").format( - frappe.bold(formatdate(filters.get("date"))) - ) - ) - - absent_students = get_absent_students(date) - leave_applicants = get_leave_applications(date) - if absent_students: - student_list = [d["student"] for d in absent_students] - transportation_details = get_transportation_details(date, student_list) - - data = [] - for student in absent_students: - if not student.student in leave_applicants: - row = [student.student, student.student_name, student.student_group] - stud_details = frappe.db.get_value( - "Student", student.student, ["student_email_id", "student_mobile_number"], as_dict=True - ) - - if stud_details.student_email_id: - row += [stud_details.student_email_id] - else: - row += [""] - - if stud_details.student_mobile_number: - row += [stud_details.student_mobile_number] - else: - row += [""] - if transportation_details.get(student.student): - row += transportation_details.get(student.student) - - data.append(row) - - return columns, data - - -def get_columns(filters): - columns = [ - _("Student") + ":Link/Student:90", - _("Student Name") + "::150", - _("Student Group") + "::180", - _("Student Email Address") + "::180", - _("Student Mobile No.") + "::150", - _("Mode of Transportation") + "::150", - _("Vehicle/Bus Number") + "::150", - ] - return columns - - -def get_absent_students(date): - absent_students = frappe.db.sql( - """ - SELECT student, student_name, student_group - FROM `tabStudent Attendance` - WHERE - status='Absent' and docstatus=1 and date = %s - ORDER BY - student_group, student_name""", - date, - as_dict=1, - ) - return absent_students - - -def get_leave_applications(date): - leave_applicants = [] - leave_applications = frappe.db.sql( - """ - SELECT student - FROM - `tabStudent Leave Application` - WHERE - docstatus = 1 and mark_as_present = 1 and - from_date <= %s and to_date >= %s - """, - (date, date), - ) - for student in leave_applications: - leave_applicants.append(student[0]) - - return leave_applicants - - -def get_transportation_details(date, student_list): - academic_year = frappe.get_all( - "Academic Year", filters=[["year_start_date", "<=", date], ["year_end_date", ">=", date]] - ) - if academic_year: - academic_year = academic_year[0].name - elif frappe.defaults.get_defaults().academic_year: - academic_year = frappe.defaults.get_defaults().academic_year - else: - return {} - - transportation_details = frappe.get_all( - "Program Enrollment", - fields=["student", "mode_of_transportation", "vehicle_no"], - filters={ - "student": ("in", student_list), - "academic_year": academic_year, - "docstatus": ("not in", ["2"]), - }, - ) - transportation_map = {} - for d in transportation_details: - transportation_map[d.student] = [d.mode_of_transportation, d.vehicle_no] - return transportation_map diff --git a/erpnext/education/report/assessment_plan_status/__init__.py b/erpnext/education/report/assessment_plan_status/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/assessment_plan_status/assessment_plan_status.js b/erpnext/education/report/assessment_plan_status/assessment_plan_status.js deleted file mode 100644 index 2d1eb09640..0000000000 --- a/erpnext/education/report/assessment_plan_status/assessment_plan_status.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["Assessment Plan Status"] = { - "filters": [ - { - "fieldname":"assessment_group", - "label": __("Assessment Group"), - "fieldtype": "Link", - "options": "Assessment Group", - "get_query": function() { - return{ - filters: { - 'is_group': 0 - } - }; - } - }, - { - "fieldname":"schedule_date", - "label": __("Scheduled Upto"), - "fieldtype": "Date", - "options": "" - } - - ] -} diff --git a/erpnext/education/report/assessment_plan_status/assessment_plan_status.json b/erpnext/education/report/assessment_plan_status/assessment_plan_status.json deleted file mode 100644 index cbca648d57..0000000000 --- a/erpnext/education/report/assessment_plan_status/assessment_plan_status.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2017-11-09 15:07:30.404428", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2020-06-24 17:16:02.027410", - "modified_by": "Administrator", - "module": "Education", - "name": "Assessment Plan Status", - "owner": "Administrator", - "prepared_report": 0, - "ref_doctype": "Assessment Plan", - "report_name": "Assessment Plan Status", - "report_type": "Script Report", - "roles": [ - { - "role": "Academics User" - } - ] -} \ No newline at end of file diff --git a/erpnext/education/report/assessment_plan_status/assessment_plan_status.py b/erpnext/education/report/assessment_plan_status/assessment_plan_status.py deleted file mode 100644 index 7cf5b30548..0000000000 --- a/erpnext/education/report/assessment_plan_status/assessment_plan_status.py +++ /dev/null @@ -1,187 +0,0 @@ -# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from itertools import groupby - -import frappe -from frappe import _ -from frappe.utils import cint - -DOCSTATUS = { - 0: "saved", - 1: "submitted", -} - - -def execute(filters=None): - columns, data = [], [] - - args = frappe._dict() - args["assessment_group"] = filters.get("assessment_group") - args["schedule_date"] = filters.get("schedule_date") - - columns = get_column() - - data, chart = get_assessment_data(args) - - return columns, data, None, chart - - -def get_assessment_data(args=None): - - # [total, saved, submitted, remaining] - chart_data = [0, 0, 0, 0] - - condition = "" - if args["assessment_group"]: - condition += "and assessment_group = %(assessment_group)s" - if args["schedule_date"]: - condition += "and schedule_date <= %(schedule_date)s" - - assessment_plan = frappe.db.sql( - """ - SELECT - ap.name as assessment_plan, - ap.assessment_name, - ap.student_group, - ap.schedule_date, - (select count(*) from `tabStudent Group Student` sgs where sgs.parent=ap.student_group) - as student_group_strength - FROM - `tabAssessment Plan` ap - WHERE - ap.docstatus = 1 {condition} - ORDER BY - ap.modified desc - """.format( - condition=condition - ), - (args), - as_dict=1, - ) - - assessment_plan_list = [d.assessment_plan for d in assessment_plan] if assessment_plan else [""] - assessment_result = get_assessment_result(assessment_plan_list) - - for d in assessment_plan: - - assessment_plan_details = assessment_result.get(d.assessment_plan) - assessment_plan_details = ( - frappe._dict() if not assessment_plan_details else frappe._dict(assessment_plan_details) - ) - if "saved" not in assessment_plan_details: - assessment_plan_details.update({"saved": 0}) - if "submitted" not in assessment_plan_details: - assessment_plan_details.update({"submitted": 0}) - - # remaining students whose marks not entered - remaining_students = ( - cint(d.student_group_strength) - - cint(assessment_plan_details.saved) - - cint(assessment_plan_details.submitted) - ) - assessment_plan_details.update({"remaining": remaining_students}) - d.update(assessment_plan_details) - - chart_data[0] += cint(d.student_group_strength) - chart_data[1] += assessment_plan_details.saved - chart_data[2] += assessment_plan_details.submitted - chart_data[3] += assessment_plan_details.remaining - - chart = get_chart(chart_data[1:]) - - return assessment_plan, chart - - -def get_assessment_result(assessment_plan_list): - assessment_result_dict = frappe._dict() - - assessment_result = frappe.db.sql( - """ - SELECT - assessment_plan, docstatus, count(*) as count - FROM - `tabAssessment Result` - WHERE - assessment_plan in (%s) - GROUP BY - assessment_plan, docstatus - ORDER BY - assessment_plan - """ - % ", ".join(["%s"] * len(assessment_plan_list)), - tuple(assessment_plan_list), - as_dict=1, - ) - - for key, group in groupby(assessment_result, lambda ap: ap["assessment_plan"]): - tmp = {} - for d in group: - if d.docstatus in [0, 1]: - tmp.update({DOCSTATUS[d.docstatus]: d.count}) - assessment_result_dict[key] = tmp - - return assessment_result_dict - - -def get_chart(chart_data): - return { - "data": {"labels": ["Saved", "Submitted", "Remaining"], "datasets": [{"values": chart_data}]}, - "type": "percentage", - } - - -def get_column(): - return [ - { - "fieldname": "assessment_plan", - "label": _("Assessment Plan"), - "fieldtype": "Link", - "options": "Assessment Plan", - "width": 120, - }, - { - "fieldname": "assessment_name", - "label": _("Assessment Plan Name"), - "fieldtype": "Data", - "options": "", - "width": 200, - }, - { - "fieldname": "schedule_date", - "label": _("Schedule Date"), - "fieldtype": "Date", - "options": "", - "width": 100, - }, - { - "fieldname": "student_group", - "label": _("Student Group"), - "fieldtype": "Link", - "options": "Student Group", - "width": 200, - }, - { - "fieldname": "student_group_strength", - "label": _("Total Student"), - "fieldtype": "Data", - "options": "", - "width": 100, - }, - { - "fieldname": "submitted", - "label": _("Submitted"), - "fieldtype": "Data", - "options": "", - "width": 100, - }, - {"fieldname": "saved", "label": _("Saved"), "fieldtype": "Data", "options": "", "width": 100}, - { - "fieldname": "remaining", - "label": _("Remaining"), - "fieldtype": "Data", - "options": "", - "width": 100, - }, - ] diff --git a/erpnext/education/report/course_wise_assessment_report/__init__.py b/erpnext/education/report/course_wise_assessment_report/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.html b/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.html deleted file mode 100644 index 33e725f08b..0000000000 --- a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.html +++ /dev/null @@ -1,50 +0,0 @@ -{% - var letterhead = filters.letter_head || (frappe.get_doc(":Company", filters.company) && frappe.get_doc(":Company", filters.company).default_letter_head) || frappe.defaults.get_default("letter_head"); - var report_columns = report.get_columns_for_print(); -%} -{% if(letterhead) { %} -
- {%= frappe.boot.letter_heads[letterhead].header %} -
-{% } %} -

{%= __("Assessment Report") %}

-
-
{%= __("Academic Year: ") %} {%= filters.academic_year %}
-{% if (filters.academic_term){ %} -
{%= __("Academic Term: ") %} {%= filters.academic_term %}
-{% } %} -
{%= __("Course Code: ") %} {%= filters.course %}
-
{%= __("Assessment Group: ") %} {%= filters.assessment_group %}
-{% if (filters.student_group){ %} -
{%= __("Student Group: ") %} {%= filters.student_group %}
-{% } %} -
- - - - - {% for(var i=1, l=report_columns.length; i{%= report_columns[i].label %} - {% } %} - - - - {% for(var j=0, k=data.length; j - {% for(var i=1, l=report_columns.length; i - {% var fieldname = report_columns[i].fieldname; %} - {% if (!is_null(row[fieldname])) { %} - {%= row[fieldname] %} - {% } %} - - {% } %} - - {% } %} - -
- -

Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}

diff --git a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.js b/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.js deleted file mode 100644 index 8c42d48641..0000000000 --- a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.query_reports["Course wise Assessment Report"] = { - "filters": [ - { - "fieldname":"academic_year", - "label": __("Academic Year"), - "fieldtype": "Link", - "options": "Academic Year", - "reqd": 1 - }, - { - "fieldname":"academic_term", - "label": __("Academic Term"), - "fieldtype": "Link", - "options": "Academic Term" - }, - { - "fieldname":"course", - "label": __("Course"), - "fieldtype": "Link", - "options": "Course", - "reqd": 1 - }, - { - "fieldname":"student_group", - "label": __("Student Group"), - "fieldtype": "Link", - "options": "Student Group" - }, - { - "fieldname":"assessment_group", - "label": __("Assessment Group"), - "fieldtype": "Link", - "options": "Assessment Group", - "reqd": 1 - } - ] -}; diff --git a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.json b/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.json deleted file mode 100644 index 416db9d00f..0000000000 --- a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2017-05-05 14:46:13.776133", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2020-06-24 17:15:15.477530", - "modified_by": "Administrator", - "module": "Education", - "name": "Course wise Assessment Report", - "owner": "Administrator", - "prepared_report": 0, - "query": "", - "ref_doctype": "Assessment Result", - "report_name": "Course wise Assessment Report", - "report_type": "Script Report", - "roles": [ - { - "role": "Instructor" - }, - { - "role": "Education Manager" - } - ] -} \ No newline at end of file diff --git a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py b/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py deleted file mode 100644 index 0930882e40..0000000000 --- a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py +++ /dev/null @@ -1,303 +0,0 @@ -# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from collections import OrderedDict, defaultdict - -import frappe -from frappe import _ - -from erpnext.education.api import get_grade - - -def execute(filters=None): - data, chart, grades = [], [], [] - args = frappe._dict() - grade_wise_analysis = defaultdict(dict) - - args["academic_year"] = filters.get("academic_year") - args["course"] = filters.get("course") - args["assessment_group"] = filters.get("assessment_group") - - args["academic_term"] = filters.get("academic_term") - args["student_group"] = filters.get("student_group") - - if args["assessment_group"] == "All Assessment Groups": - frappe.throw(_("Please select the assessment group other than 'All Assessment Groups'")) - - returned_values = get_formatted_result(args, get_assessment_criteria=True) - student_dict = returned_values["student_details"] - result_dict = returned_values["assessment_result"] - assessment_criteria_dict = returned_values["assessment_criteria"] - - for student in result_dict: - student_row = {} - student_row["student"] = student - student_row["student_name"] = student_dict[student] - for criteria in assessment_criteria_dict: - scrub_criteria = frappe.scrub(criteria) - if criteria in result_dict[student][args.course][args.assessment_group]: - student_row[scrub_criteria] = result_dict[student][args.course][args.assessment_group][ - criteria - ]["grade"] - student_row[scrub_criteria + "_score"] = result_dict[student][args.course][ - args.assessment_group - ][criteria]["score"] - - # create the list of possible grades - if student_row[scrub_criteria] not in grades: - grades.append(student_row[scrub_criteria]) - - # create the dict of for gradewise analysis - if student_row[scrub_criteria] not in grade_wise_analysis[criteria]: - grade_wise_analysis[criteria][student_row[scrub_criteria]] = 1 - else: - grade_wise_analysis[criteria][student_row[scrub_criteria]] += 1 - else: - student_row[frappe.scrub(criteria)] = "" - student_row[frappe.scrub(criteria) + "_score"] = "" - data.append(student_row) - - assessment_criteria_list = [d for d in assessment_criteria_dict] - columns = get_column(assessment_criteria_dict) - chart = get_chart_data(grades, assessment_criteria_list, grade_wise_analysis) - - return columns, data, None, chart - - -def get_formatted_result( - args, get_assessment_criteria=False, get_course=False, get_all_assessment_groups=False -): - cond, cond1, cond2, cond3, cond4 = " ", " ", " ", " ", " " - args_list = [args.academic_year] - - if args.course: - cond = " and ar.course=%s" - args_list.append(args.course) - - if args.academic_term: - cond1 = " and ar.academic_term=%s" - args_list.append(args.academic_term) - - if args.student_group: - cond2 = " and ar.student_group=%s" - args_list.append(args.student_group) - - create_total_dict = False - - assessment_groups = get_child_assessment_groups(args.assessment_group) - cond3 = " and ar.assessment_group in (%s)" % (", ".join(["%s"] * len(assessment_groups))) - args_list += assessment_groups - - if args.students: - cond4 = " and ar.student in (%s)" % (", ".join(["%s"] * len(args.students))) - args_list += args.students - - assessment_result = frappe.db.sql( - """ - SELECT - ar.student, ar.student_name, ar.academic_year, ar.academic_term, ar.program, ar.course, - ar.assessment_plan, ar.grading_scale, ar.assessment_group, ar.student_group, - ard.assessment_criteria, ard.maximum_score, ard.grade, ard.score - FROM - `tabAssessment Result` ar, `tabAssessment Result Detail` ard - WHERE - ar.name=ard.parent and ar.docstatus=1 and ar.academic_year=%s {0} {1} {2} {3} {4} - ORDER BY - ard.assessment_criteria""".format( - cond, cond1, cond2, cond3, cond4 - ), - tuple(args_list), - as_dict=1, - ) - - # create the nested dictionary structure as given below: - # ..... - # "Final Grade" -> assessment criteria used for totaling and args.assessment_group -> for totaling all the assesments - - student_details = {} - formatted_assessment_result = defaultdict(dict) - assessment_criteria_dict = OrderedDict() - course_dict = OrderedDict() - total_maximum_score = None - if not (len(assessment_groups) == 1 and assessment_groups[0] == args.assessment_group): - create_total_dict = True - - # add the score for a given score and recalculate the grades - def add_score_and_recalculate_grade(result, assessment_group, assessment_criteria): - formatted_assessment_result[result.student][result.course][assessment_group][ - assessment_criteria - ]["maximum_score"] += result.maximum_score - formatted_assessment_result[result.student][result.course][assessment_group][ - assessment_criteria - ]["score"] += result.score - tmp_grade = get_grade( - result.grading_scale, - ( - ( - formatted_assessment_result[result.student][result.course][assessment_group][ - assessment_criteria - ]["score"] - ) - / ( - formatted_assessment_result[result.student][result.course][assessment_group][ - assessment_criteria - ]["maximum_score"] - ) - ) - * 100, - ) - formatted_assessment_result[result.student][result.course][assessment_group][ - assessment_criteria - ]["grade"] = tmp_grade - - # create the assessment criteria "Final Grade" with the sum of all the scores of the assessment criteria in a given assessment group - def add_total_score(result, assessment_group): - if ( - "Final Grade" - not in formatted_assessment_result[result.student][result.course][assessment_group] - ): - formatted_assessment_result[result.student][result.course][assessment_group][ - "Final Grade" - ] = frappe._dict( - { - "assessment_criteria": "Final Grade", - "maximum_score": result.maximum_score, - "score": result.score, - "grade": result.grade, - } - ) - else: - add_score_and_recalculate_grade(result, assessment_group, "Final Grade") - - for result in assessment_result: - if result.student not in student_details: - student_details[result.student] = result.student_name - - assessment_criteria_details = frappe._dict( - { - "assessment_criteria": result.assessment_criteria, - "maximum_score": result.maximum_score, - "score": result.score, - "grade": result.grade, - } - ) - - if not formatted_assessment_result[result.student]: - formatted_assessment_result[result.student] = defaultdict(dict) - if not formatted_assessment_result[result.student][result.course]: - formatted_assessment_result[result.student][result.course] = defaultdict(dict) - - if not create_total_dict: - formatted_assessment_result[result.student][result.course][result.assessment_group][ - result.assessment_criteria - ] = assessment_criteria_details - add_total_score(result, result.assessment_group) - - # create the total of all the assessment groups criteria-wise - elif create_total_dict: - if get_all_assessment_groups: - formatted_assessment_result[result.student][result.course][result.assessment_group][ - result.assessment_criteria - ] = assessment_criteria_details - if not formatted_assessment_result[result.student][result.course][args.assessment_group]: - formatted_assessment_result[result.student][result.course][ - args.assessment_group - ] = defaultdict(dict) - formatted_assessment_result[result.student][result.course][args.assessment_group][ - result.assessment_criteria - ] = assessment_criteria_details - elif ( - result.assessment_criteria - not in formatted_assessment_result[result.student][result.course][args.assessment_group] - ): - formatted_assessment_result[result.student][result.course][args.assessment_group][ - result.assessment_criteria - ] = assessment_criteria_details - elif ( - result.assessment_criteria - in formatted_assessment_result[result.student][result.course][args.assessment_group] - ): - add_score_and_recalculate_grade(result, args.assessment_group, result.assessment_criteria) - - add_total_score(result, args.assessment_group) - - total_maximum_score = formatted_assessment_result[result.student][result.course][ - args.assessment_group - ]["Final Grade"]["maximum_score"] - if get_assessment_criteria: - assessment_criteria_dict[result.assessment_criteria] = formatted_assessment_result[ - result.student - ][result.course][args.assessment_group][result.assessment_criteria]["maximum_score"] - if get_course: - course_dict[result.course] = total_maximum_score - - if get_assessment_criteria and total_maximum_score: - assessment_criteria_dict["Final Grade"] = total_maximum_score - - return { - "student_details": student_details, - "assessment_result": formatted_assessment_result, - "assessment_criteria": assessment_criteria_dict, - "course_dict": course_dict, - } - - -def get_column(assessment_criteria): - columns = [ - { - "fieldname": "student", - "label": _("Student ID"), - "fieldtype": "Link", - "options": "Student", - "width": 90, - }, - {"fieldname": "student_name", "label": _("Student Name"), "fieldtype": "Data", "width": 160}, - ] - for d in assessment_criteria: - columns.append({"fieldname": frappe.scrub(d), "label": d, "fieldtype": "Data", "width": 110}) - columns.append( - { - "fieldname": frappe.scrub(d) + "_score", - "label": "Score(" + str(int(assessment_criteria[d])) + ")", - "fieldtype": "Float", - "width": 100, - } - ) - - return columns - - -def get_chart_data(grades, criteria_list, kounter): - grades = sorted(grades) - datasets = [] - - for grade in grades: - tmp = frappe._dict({"name": grade, "values": []}) - for criteria in criteria_list: - if grade in kounter[criteria]: - tmp["values"].append(kounter[criteria][grade]) - else: - tmp["values"].append(0) - datasets.append(tmp) - - return { - "data": {"labels": criteria_list, "datasets": datasets}, - "type": "bar", - } - - -def get_child_assessment_groups(assessment_group): - assessment_groups = [] - group_type = frappe.get_value("Assessment Group", assessment_group, "is_group") - if group_type: - from frappe.desk.treeview import get_children - - assessment_groups = [ - d.get("value") - for d in get_children("Assessment Group", assessment_group) - if d.get("value") and not d.get("expandable") - ] - else: - assessment_groups = [assessment_group] - return assessment_groups diff --git a/erpnext/education/report/final_assessment_grades/__init__.py b/erpnext/education/report/final_assessment_grades/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/final_assessment_grades/final_assessment_grades.js b/erpnext/education/report/final_assessment_grades/final_assessment_grades.js deleted file mode 100644 index ddff8a884e..0000000000 --- a/erpnext/education/report/final_assessment_grades/final_assessment_grades.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["Final Assessment Grades"] = { - "filters": [ - { - "fieldname":"academic_year", - "label": __("Academic Year"), - "fieldtype": "Link", - "options": "Academic Year", - "reqd": 1 - }, - { - "fieldname":"student_group", - "label": __("Student Group"), - "fieldtype": "Link", - "options": "Student Group", - "reqd": 1, - "get_query": function() { - return{ - filters: { - "group_based_on": "Batch", - "academic_year": frappe.query_report.get_filter_value('academic_year') - } - }; - } - }, - { - "fieldname":"assessment_group", - "label": __("Assessment Group"), - "fieldtype": "Link", - "options": "Assessment Group", - "reqd": 1 - } - - ] -} diff --git a/erpnext/education/report/final_assessment_grades/final_assessment_grades.json b/erpnext/education/report/final_assessment_grades/final_assessment_grades.json deleted file mode 100644 index 6a23494768..0000000000 --- a/erpnext/education/report/final_assessment_grades/final_assessment_grades.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2018-01-22 17:04:43.412054", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2020-06-24 17:13:35.373756", - "modified_by": "Administrator", - "module": "Education", - "name": "Final Assessment Grades", - "owner": "Administrator", - "prepared_report": 0, - "ref_doctype": "Assessment Result", - "report_name": "Final Assessment Grades", - "report_type": "Script Report", - "roles": [ - { - "role": "Instructor" - }, - { - "role": "Education Manager" - } - ] -} \ No newline at end of file diff --git a/erpnext/education/report/final_assessment_grades/final_assessment_grades.py b/erpnext/education/report/final_assessment_grades/final_assessment_grades.py deleted file mode 100644 index 8d5acc61f2..0000000000 --- a/erpnext/education/report/final_assessment_grades/final_assessment_grades.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -from collections import defaultdict - -import frappe -from frappe import _ - -from erpnext.education.report.course_wise_assessment_report.course_wise_assessment_report import ( - get_chart_data, - get_formatted_result, -) - - -def execute(filters=None): - columns, data, grades = [], [], [] - args = frappe._dict() - course_wise_analysis = defaultdict(dict) - - args["academic_year"] = filters.get("academic_year") - assessment_group = args["assessment_group"] = filters.get("assessment_group") - - student_group = filters.get("student_group") - args.students = frappe.db.sql_list( - "select student from `tabStudent Group Student` where parent=%s", (student_group) - ) - - values = get_formatted_result(args, get_course=True) - student_details = values.get("student_details") - assessment_result = values.get("assessment_result") - course_dict = values.get("course_dict") - - for student in args.students: - if student_details.get(student): - student_row = {} - student_row["student"] = student - student_row["student_name"] = student_details[student] - for course in course_dict: - scrub_course = frappe.scrub(course) - if assessment_group in assessment_result[student][course]: - student_row["grade_" + scrub_course] = assessment_result[student][course][assessment_group][ - "Total Score" - ]["grade"] - student_row["score_" + scrub_course] = assessment_result[student][course][assessment_group][ - "Total Score" - ]["score"] - - # create the list of possible grades - if student_row["grade_" + scrub_course] not in grades: - grades.append(student_row["grade_" + scrub_course]) - - # create the dict of for gradewise analysis - if student_row["grade_" + scrub_course] not in course_wise_analysis[course]: - course_wise_analysis[course][student_row["grade_" + scrub_course]] = 1 - else: - course_wise_analysis[course][student_row["grade_" + scrub_course]] += 1 - - data.append(student_row) - - course_list = [d for d in course_dict] - columns = get_column(course_dict) - chart = get_chart_data(grades, course_list, course_wise_analysis) - return columns, data, None, chart - - -def get_column(course_dict): - columns = [ - { - "fieldname": "student", - "label": _("Student ID"), - "fieldtype": "Link", - "options": "Student", - "width": 90, - }, - {"fieldname": "student_name", "label": _("Student Name"), "fieldtype": "Data", "width": 160}, - ] - for course in course_dict: - columns.append( - { - "fieldname": "grade_" + frappe.scrub(course), - "label": course, - "fieldtype": "Data", - "width": 110, - } - ) - columns.append( - { - "fieldname": "score_" + frappe.scrub(course), - "label": "Score(" + str(course_dict[course]) + ")", - "fieldtype": "Float", - "width": 100, - } - ) - - return columns diff --git a/erpnext/education/report/program_wise_fee_collection/__init__.py b/erpnext/education/report/program_wise_fee_collection/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.js b/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.js deleted file mode 100644 index 72e8f12e9d..0000000000 --- a/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt -/* eslint-disable */ - -frappe.query_reports["Program wise Fee Collection"] = { - "filters": [ - { - "fieldname": "from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), - "reqd": 1 - }, - { - "fieldname": "to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "reqd": 1 - } - ] -}; diff --git a/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.json b/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.json deleted file mode 100644 index ee5c0dec79..0000000000 --- a/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "add_total_row": 1, - "creation": "2020-07-27 16:05:33.263539", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "json": "{}", - "modified": "2020-08-05 14:14:12.410515", - "modified_by": "Administrator", - "module": "Education", - "name": "Program wise Fee Collection", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT \n FeesCollected.program AS \"Program:Link/Program:200\",\n FeesCollected.paid_amount AS \"Fees Collected:Currency:150\",\n FeesCollected.outstanding_amount AS \"Outstanding Amount:Currency:150\",\n FeesCollected.grand_total \"Grand Total:Currency:150\"\nFROM (\n SELECT \n sum(grand_total) - sum(outstanding_amount) AS paid_amount, program,\n sum(outstanding_amount) AS outstanding_amount,\n sum(grand_total) AS grand_total\n FROM `tabFees`\n WHERE docstatus = 1\n GROUP BY program\n) AS FeesCollected\nORDER BY FeesCollected.paid_amount DESC", - "ref_doctype": "Fees", - "report_name": "Program wise Fee Collection", - "report_type": "Script Report", - "roles": [ - { - "role": "Academics User" - }, - { - "role": "Accounts User" - }, - { - "role": "Accounts Manager" - } - ] -} \ No newline at end of file diff --git a/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.py b/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.py deleted file mode 100644 index e5591f9b6b..0000000000 --- a/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.py +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ - - -def execute(filters=None): - if not filters: - filters = {} - - columns = get_columns(filters) - data = get_data(filters) - chart = get_chart_data(data) - - return columns, data, None, chart - - -def get_columns(filters=None): - return [ - { - "label": _("Program"), - "fieldname": "program", - "fieldtype": "Link", - "options": "Program", - "width": 300, - }, - { - "label": _("Fees Collected"), - "fieldname": "fees_collected", - "fieldtype": "Currency", - "width": 200, - }, - { - "label": _("Outstanding Amount"), - "fieldname": "outstanding_amount", - "fieldtype": "Currency", - "width": 200, - }, - {"label": _("Grand Total"), "fieldname": "grand_total", "fieldtype": "Currency", "width": 200}, - ] - - -def get_data(filters=None): - data = [] - - conditions = get_filter_conditions(filters) - - fee_details = frappe.db.sql( - """ - SELECT - FeesCollected.program, - FeesCollected.paid_amount, - FeesCollected.outstanding_amount, - FeesCollected.grand_total - FROM ( - SELECT - sum(grand_total) - sum(outstanding_amount) AS paid_amount, program, - sum(outstanding_amount) AS outstanding_amount, - sum(grand_total) AS grand_total - FROM `tabFees` - WHERE - docstatus = 1 and - program IS NOT NULL - %s - GROUP BY program - ) AS FeesCollected - ORDER BY FeesCollected.paid_amount DESC - """ - % (conditions), - as_dict=1, - ) - - for entry in fee_details: - data.append( - { - "program": entry.program, - "fees_collected": entry.paid_amount, - "outstanding_amount": entry.outstanding_amount, - "grand_total": entry.grand_total, - } - ) - - return data - - -def get_filter_conditions(filters): - conditions = "" - - if filters.get("from_date") and filters.get("to_date"): - conditions += " and posting_date BETWEEN '%s' and '%s'" % ( - filters.get("from_date"), - filters.get("to_date"), - ) - - return conditions - - -def get_chart_data(data): - if not data: - return - - labels = [] - fees_collected = [] - outstanding_amount = [] - - for entry in data: - labels.append(entry.get("program")) - fees_collected.append(entry.get("fees_collected")) - outstanding_amount.append(entry.get("outstanding_amount")) - - return { - "data": { - "labels": labels, - "datasets": [ - {"name": _("Fees Collected"), "values": fees_collected}, - {"name": _("Outstanding Amt"), "values": outstanding_amount}, - ], - }, - "type": "bar", - } diff --git a/erpnext/education/report/student_and_guardian_contact_details/__init__.py b/erpnext/education/report/student_and_guardian_contact_details/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.js b/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.js deleted file mode 100644 index 2734b538b2..0000000000 --- a/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.query_reports["Student and Guardian Contact Details"] = { - "filters": [ - { - "fieldname":"academic_year", - "label": __("Academic Year"), - "fieldtype": "Link", - "options": "Academic Year", - "reqd": 1, - }, - { - "fieldname":"program", - "label": __("Program"), - "fieldtype": "Link", - "options": "Program", - "reqd": 1 - }, - { - "fieldname":"student_batch_name", - "label": __("Batch Name"), - "fieldtype": "Link", - "options": "Student Batch Name", - "reqd": 1 - }, - - ] -} diff --git a/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.json b/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.json deleted file mode 100644 index fa9be65681..0000000000 --- a/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2017-03-27 17:47:16.831433", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2020-06-24 17:16:50.639488", - "modified_by": "Administrator", - "module": "Education", - "name": "Student and Guardian Contact Details", - "owner": "Administrator", - "prepared_report": 0, - "ref_doctype": "Program Enrollment", - "report_name": "Student and Guardian Contact Details", - "report_type": "Script Report", - "roles": [ - { - "role": "Instructor" - }, - { - "role": "Academics User" - } - ] -} \ No newline at end of file diff --git a/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.py b/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.py deleted file mode 100644 index 6f871d7ad7..0000000000 --- a/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.py +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe -from frappe import _ - - -def execute(filters=None): - columns, data = [], [] - - academic_year = filters.get("academic_year") - program = filters.get("program") - student_batch_name = filters.get("student_batch_name") - - columns = get_columns() - - program_enrollments = frappe.get_list( - "Program Enrollment", - fields=["student", "student_name"], - filters={ - "academic_year": academic_year, - "program": program, - "student_batch_name": student_batch_name, - }, - ) - - student_list = [d.student for d in program_enrollments] - if not student_list: - return columns, [] - - group_roll_no_map = get_student_roll_no(academic_year, program, student_batch_name) - student_map = get_student_details(student_list) - guardian_map = get_guardian_map(student_list) - - for d in program_enrollments: - student_details = student_map.get(d.student) - row = [ - group_roll_no_map.get(d.student), - d.student, - d.student_name, - student_details.get("student_mobile_number"), - student_details.get("student_email_id"), - student_details.get("address"), - ] - - student_guardians = guardian_map.get(d.student) - - if student_guardians: - for i in range(2): - if i < len(student_guardians): - g = student_guardians[i] - row += [g.guardian_name, g.relation, g.mobile_number, g.email_address] - - data.append(row) - - return columns, data - - -def get_columns(): - columns = [ - _("Group Roll No") + "::60", - _("Student ID") + ":Link/Student:90", - _("Student Name") + "::150", - _("Student Mobile No.") + "::110", - _("Student Email ID") + "::125", - _("Student Address") + "::175", - _("Guardian1 Name") + "::150", - _("Relation with Guardian1") + "::80", - _("Guardian1 Mobile No") + "::125", - _("Guardian1 Email ID") + "::125", - _("Guardian2 Name") + "::150", - _("Relation with Guardian2") + "::80", - _("Guardian2 Mobile No") + "::125", - _("Guardian2 Email ID") + "::125", - ] - return columns - - -def get_student_details(student_list): - student_map = frappe._dict() - student_details = frappe.db.sql( - """ - select name, student_mobile_number, student_email_id, address_line_1, address_line_2, city, state from `tabStudent` where name in (%s)""" - % ", ".join(["%s"] * len(student_list)), - tuple(student_list), - as_dict=1, - ) - for s in student_details: - student = frappe._dict() - student["student_mobile_number"] = s.student_mobile_number - student["student_email_id"] = s.student_email_id - student["address"] = ", ".join( - [d for d in [s.address_line_1, s.address_line_2, s.city, s.state] if d] - ) - student_map[s.name] = student - return student_map - - -def get_guardian_map(student_list): - guardian_map = frappe._dict() - guardian_details = frappe.db.sql( - """ - select parent, guardian, guardian_name, relation from `tabStudent Guardian` where parent in (%s)""" - % ", ".join(["%s"] * len(student_list)), - tuple(student_list), - as_dict=1, - ) - - guardian_list = list(set([g.guardian for g in guardian_details])) or [""] - - guardian_mobile_no = dict( - frappe.db.sql( - """select name, mobile_number from `tabGuardian` - where name in (%s)""" - % ", ".join(["%s"] * len(guardian_list)), - tuple(guardian_list), - ) - ) - - guardian_email_id = dict( - frappe.db.sql( - """select name, email_address from `tabGuardian` - where name in (%s)""" - % ", ".join(["%s"] * len(guardian_list)), - tuple(guardian_list), - ) - ) - - for guardian in guardian_details: - guardian["mobile_number"] = guardian_mobile_no.get(guardian.guardian) - guardian["email_address"] = guardian_email_id.get(guardian.guardian) - guardian_map.setdefault(guardian.parent, []).append(guardian) - - return guardian_map - - -def get_student_roll_no(academic_year, program, batch): - student_group = frappe.get_all( - "Student Group", - filters={"academic_year": academic_year, "program": program, "batch": batch, "disabled": 0}, - ) - if student_group: - roll_no_dict = dict( - frappe.db.sql( - """select student, group_roll_number from `tabStudent Group Student` where parent=%s""", - (student_group[0].name), - ) - ) - return roll_no_dict - return {} diff --git a/erpnext/education/report/student_batch_wise_attendance/__init__.py b/erpnext/education/report/student_batch_wise_attendance/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.js b/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.js deleted file mode 100644 index 9f1fcbc816..0000000000 --- a/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.query_reports["Student Batch-Wise Attendance"] = { - "filters": [{ - "fieldname": "date", - "label": __("Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "reqd": 1 - }] -} diff --git a/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.json b/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.json deleted file mode 100644 index 8baf8f9fe0..0000000000 --- a/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2016-11-28 22:07:03.859124", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 2, - "is_standard": "Yes", - "modified": "2020-06-24 17:16:59.823709", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Batch-Wise Attendance", - "owner": "Administrator", - "prepared_report": 0, - "ref_doctype": "Student Attendance", - "report_name": "Student Batch-Wise Attendance", - "report_type": "Script Report", - "roles": [ - { - "role": "Academics User" - } - ] -} \ No newline at end of file diff --git a/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py b/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py deleted file mode 100644 index 282f5c9aec..0000000000 --- a/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - - -import frappe -from frappe import _, msgprint -from frappe.utils import formatdate - -from erpnext.education.doctype.student_attendance.student_attendance import get_holiday_list -from erpnext.hr.doctype.holiday_list.holiday_list import is_holiday - - -def execute(filters=None): - if not filters: - filters = {} - - if not filters.get("date"): - msgprint(_("Please select date"), raise_exception=1) - - holiday_list = get_holiday_list() - if is_holiday(holiday_list, filters.get("date")): - msgprint( - _("No attendance has been marked for {0} as it is a Holiday").format( - frappe.bold(formatdate(filters.get("date"))) - ) - ) - - columns = get_columns(filters) - - active_student_group = get_active_student_group() - - data = [] - for student_group in active_student_group: - row = [student_group.name] - present_students = 0 - absent_students = 0 - student_group_strength = get_student_group_strength(student_group.name) - student_attendance = get_student_attendance(student_group.name, filters.get("date")) - if student_attendance: - for attendance in student_attendance: - if attendance.status == "Present": - present_students = attendance.count - elif attendance.status == "Absent": - absent_students = attendance.count - - unmarked_students = student_group_strength - (present_students + absent_students) - row += [student_group_strength, present_students, absent_students, unmarked_students] - data.append(row) - - return columns, data - - -def get_columns(filters): - columns = [ - _("Student Group") + ":Link/Student Group:250", - _("Student Group Strength") + "::170", - _("Present") + "::90", - _("Absent") + "::90", - _("Not Marked") + "::90", - ] - return columns - - -def get_active_student_group(): - active_student_groups = frappe.db.sql( - """select name from `tabStudent Group` where group_based_on = "Batch" - and academic_year=%s order by name""", - (frappe.defaults.get_defaults().academic_year), - as_dict=1, - ) - return active_student_groups - - -def get_student_group_strength(student_group): - student_group_strength = frappe.db.sql( - """select count(*) from `tabStudent Group Student` - where parent = %s and active=1""", - student_group, - )[0][0] - return student_group_strength - - -def get_student_attendance(student_group, date): - student_attendance = frappe.db.sql( - """select count(*) as count, status from `tabStudent Attendance` where - student_group= %s and date= %s and docstatus = 1 and - (course_schedule is Null or course_schedule='') group by status""", - (student_group, date), - as_dict=1, - ) - return student_attendance diff --git a/erpnext/education/report/student_fee_collection/__init__.py b/erpnext/education/report/student_fee_collection/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/student_fee_collection/student_fee_collection.json b/erpnext/education/report/student_fee_collection/student_fee_collection.json deleted file mode 100644 index c0229a2ee2..0000000000 --- a/erpnext/education/report/student_fee_collection/student_fee_collection.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "add_total_row": 1, - "creation": "2016-06-22 02:58:41.024538", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 3, - "is_standard": "Yes", - "modified": "2020-06-24 17:14:39.452551", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Fee Collection", - "owner": "Administrator", - "prepared_report": 0, - "query": "SELECT\n student as \"Student:Link/Student:200\",\n student_name as \"Student Name::200\",\n sum(grand_total) - sum(outstanding_amount) as \"Paid Amount:Currency:150\",\n sum(outstanding_amount) as \"Outstanding Amount:Currency:150\",\n sum(grand_total) as \"Grand Total:Currency:150\"\nFROM\n `tabFees` \nWHERE\n docstatus=1 \nGROUP BY\n student", - "ref_doctype": "Fees", - "report_name": "Student Fee Collection", - "report_type": "Query Report", - "roles": [ - { - "role": "Academics User" - } - ] -} diff --git a/erpnext/education/report/student_monthly_attendance_sheet/__init__.py b/erpnext/education/report/student_monthly_attendance_sheet/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.js b/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.js deleted file mode 100644 index 62c94557d7..0000000000 --- a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -// License: GNU General Public License v3. See license.txt - - -frappe.query_reports["Student Monthly Attendance Sheet"] = { - "filters": [{ - "fieldname": "month", - "label": __("Month"), - "fieldtype": "Select", - "options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", - "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", - "Dec" - ][frappe.datetime.str_to_obj(frappe.datetime.get_today()).getMonth()], - }, - { - "fieldname": "year", - "label": __("Year"), - "fieldtype": "Select", - "reqd": 1 - }, - { - "fieldname": "student_group", - "label": __("Student Group"), - "fieldtype": "Link", - "options": "Student Group", - "reqd": 1 - } - ], - - "onload": function() { - return frappe.call({ - method: "erpnext.education.report.student_monthly_attendance_sheet.student_monthly_attendance_sheet.get_attendance_years", - callback: function(r) { - var year_filter = frappe.query_report.get_filter('year'); - year_filter.df.options = r.message; - year_filter.df.default = r.message.split("\n")[0]; - year_filter.refresh(); - year_filter.set_input(year_filter.df.default); - } - }); - } -} diff --git a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.json b/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.json deleted file mode 100644 index 1423d4fee1..0000000000 --- a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "add_total_row": 0, - "creation": "2013-05-13 14:04:03", - "disable_prepared_report": 0, - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 3, - "is_standard": "Yes", - "modified": "2020-06-24 17:16:13.307053", - "modified_by": "Administrator", - "module": "Education", - "name": "Student Monthly Attendance Sheet", - "owner": "Administrator", - "prepared_report": 0, - "ref_doctype": "Student Attendance", - "report_name": "Student Monthly Attendance Sheet", - "report_type": "Script Report", - "roles": [ - { - "role": "Academics User" - } - ] -} \ No newline at end of file diff --git a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py b/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py deleted file mode 100644 index 9312e2b018..0000000000 --- a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -# License: GNU General Public License v3. See license.txt - - -import frappe -from frappe import _ -from frappe.utils import add_days, cstr, date_diff, get_first_day, get_last_day, getdate - -from erpnext.education.api import get_student_group_students -from erpnext.education.doctype.student_attendance.student_attendance import get_holiday_list -from erpnext.support.doctype.issue.issue import get_holidays - - -def execute(filters=None): - if not filters: - filters = {} - - from_date = get_first_day(filters["month"] + "-" + filters["year"]) - to_date = get_last_day(filters["month"] + "-" + filters["year"]) - total_days_in_month = date_diff(to_date, from_date) + 1 - columns = get_columns(total_days_in_month) - students = get_student_group_students(filters.get("student_group"), 1) - students_list = get_students_list(students) - att_map = get_attendance_list(from_date, to_date, filters.get("student_group"), students_list) - data = [] - - for stud in students: - row = [stud.student, stud.student_name] - student_status = frappe.db.get_value("Student", stud.student, "enabled") - date = from_date - total_p = total_a = 0.0 - - for day in range(total_days_in_month): - status = "None" - - if att_map.get(stud.student): - status = att_map.get(stud.student).get(date, "None") - elif not student_status: - status = "Inactive" - else: - status = "None" - - status_map = {"Present": "P", "Absent": "A", "None": "", "Inactive": "-", "Holiday": "H"} - row.append(status_map[status]) - - if status == "Present": - total_p += 1 - elif status == "Absent": - total_a += 1 - date = add_days(date, 1) - - row += [total_p, total_a] - data.append(row) - return columns, data - - -def get_columns(days_in_month): - columns = [_("Student") + ":Link/Student:90", _("Student Name") + "::150"] - for day in range(days_in_month): - columns.append(cstr(day + 1) + "::20") - columns += [_("Total Present") + ":Int:95", _("Total Absent") + ":Int:90"] - return columns - - -def get_students_list(students): - student_list = [] - for stud in students: - student_list.append(stud.student) - return student_list - - -def get_attendance_list(from_date, to_date, student_group, students_list): - attendance_list = frappe.db.sql( - """select student, date, status - from `tabStudent Attendance` where student_group = %s - and docstatus = 1 - and date between %s and %s - order by student, date""", - (student_group, from_date, to_date), - as_dict=1, - ) - - att_map = {} - students_with_leave_application = get_students_with_leave_application( - from_date, to_date, students_list - ) - for d in attendance_list: - att_map.setdefault(d.student, frappe._dict()).setdefault(d.date, "") - - if students_with_leave_application.get( - d.date - ) and d.student in students_with_leave_application.get(d.date): - att_map[d.student][d.date] = "Present" - else: - att_map[d.student][d.date] = d.status - - att_map = mark_holidays(att_map, from_date, to_date, students_list) - - return att_map - - -def get_students_with_leave_application(from_date, to_date, students_list): - if not students_list: - return - leave_applications = frappe.db.sql( - """ - select student, from_date, to_date - from `tabStudent Leave Application` - where - mark_as_present = 1 and docstatus = 1 - and student in %(students)s - and ( - from_date between %(from_date)s and %(to_date)s - or to_date between %(from_date)s and %(to_date)s - or (%(from_date)s between from_date and to_date and %(to_date)s between from_date and to_date) - ) - """, - {"students": students_list, "from_date": from_date, "to_date": to_date}, - as_dict=True, - ) - students_with_leaves = {} - for application in leave_applications: - for date in daterange(application.from_date, application.to_date): - students_with_leaves.setdefault(date, []).append(application.student) - - return students_with_leaves - - -def daterange(d1, d2): - import datetime - - return (d1 + datetime.timedelta(days=i) for i in range((d2 - d1).days + 1)) - - -@frappe.whitelist() -def get_attendance_years(): - year_list = frappe.db.sql_list( - """select distinct YEAR(date) from `tabStudent Attendance` ORDER BY YEAR(date) DESC""" - ) - if not year_list: - year_list = [getdate().year] - return "\n".join(str(year) for year in year_list) - - -def mark_holidays(att_map, from_date, to_date, students_list): - holiday_list = get_holiday_list() - holidays = get_holidays(holiday_list) - - for dt in daterange(getdate(from_date), getdate(to_date)): - if dt in holidays: - for student in students_list: - att_map.setdefault(student, frappe._dict()).setdefault(dt, "Holiday") - - return att_map diff --git a/erpnext/education/setup.py b/erpnext/education/setup.py deleted file mode 100644 index 2b82da556c..0000000000 --- a/erpnext/education/setup.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import frappe - - -def setup_education(): - disable_desk_access_for_student_role() - if frappe.db.exists("Academic Year", "2015-16"): - # already setup - return - create_academic_sessions() - - -def insert_record(records): - for r in records: - doc = frappe.new_doc(r.get("doctype")) - doc.update(r) - try: - doc.insert(ignore_permissions=True) - except frappe.DuplicateEntryError as e: - # pass DuplicateEntryError and continue - if e.args and e.args[0] == doc.doctype and e.args[1] == doc.name: - # make sure DuplicateEntryError is for the exact same doc and not a related doc - pass - else: - raise - - -def create_academic_sessions(): - data = [ - {"doctype": "Academic Year", "academic_year_name": "2015-16"}, - {"doctype": "Academic Year", "academic_year_name": "2016-17"}, - {"doctype": "Academic Year", "academic_year_name": "2017-18"}, - {"doctype": "Academic Year", "academic_year_name": "2018-19"}, - {"doctype": "Academic Term", "academic_year": "2016-17", "term_name": "Semester 1"}, - {"doctype": "Academic Term", "academic_year": "2016-17", "term_name": "Semester 2"}, - {"doctype": "Academic Term", "academic_year": "2017-18", "term_name": "Semester 1"}, - {"doctype": "Academic Term", "academic_year": "2017-18", "term_name": "Semester 2"}, - ] - insert_record(data) - - -def disable_desk_access_for_student_role(): - try: - student_role = frappe.get_doc("Role", "Student") - except frappe.DoesNotExistError: - create_student_role() - return - - student_role.desk_access = 0 - student_role.save() - - -def create_student_role(): - student_role = frappe.get_doc( - {"doctype": "Role", "role_name": "Student", "desk_access": 0, "restrict_to_domain": "Education"} - ) - student_role.insert() diff --git a/erpnext/education/utils.py b/erpnext/education/utils.py deleted file mode 100644 index e6eb1c9987..0000000000 --- a/erpnext/education/utils.py +++ /dev/null @@ -1,449 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies and contributors - -import frappe -from frappe import _ - - -class OverlapError(frappe.ValidationError): - pass - - -def validate_overlap_for(doc, doctype, fieldname, value=None): - """Checks overlap for specified field. - - :param fieldname: Checks Overlap for this field - """ - - existing = get_overlap_for(doc, doctype, fieldname, value) - if existing: - frappe.throw( - _("This {0} conflicts with {1} for {2} {3}").format( - doc.doctype, - existing.name, - doc.meta.get_label(fieldname) if not value else fieldname, - value or doc.get(fieldname), - ), - OverlapError, - ) - - -def get_overlap_for(doc, doctype, fieldname, value=None): - """Returns overlaping document for specified field. - - :param fieldname: Checks Overlap for this field - """ - - existing = frappe.db.sql( - """select name, from_time, to_time from `tab{0}` - where `{1}`=%(val)s and schedule_date = %(schedule_date)s and - ( - (from_time > %(from_time)s and from_time < %(to_time)s) or - (to_time > %(from_time)s and to_time < %(to_time)s) or - (%(from_time)s > from_time and %(from_time)s < to_time) or - (%(from_time)s = from_time and %(to_time)s = to_time)) - and name!=%(name)s and docstatus!=2""".format( - doctype, fieldname - ), - { - "schedule_date": doc.schedule_date, - "val": value or doc.get(fieldname), - "from_time": doc.from_time, - "to_time": doc.to_time, - "name": doc.name or "No Name", - }, - as_dict=True, - ) - - return existing[0] if existing else None - - -def validate_duplicate_student(students): - unique_students = [] - for stud in students: - if stud.student in unique_students: - frappe.throw( - _("Student {0} - {1} appears Multiple times in row {2} & {3}").format( - stud.student, stud.student_name, unique_students.index(stud.student) + 1, stud.idx - ) - ) - else: - unique_students.append(stud.student) - - return None - - -# LMS Utils -def get_current_student(): - """Returns current student from frappe.session.user - - Returns: - object: Student Document - """ - email = frappe.session.user - if email in ("Administrator", "Guest"): - return None - try: - student_id = frappe.get_all("Student", {"student_email_id": email}, ["name"])[0].name - return frappe.get_doc("Student", student_id) - except (IndexError, frappe.DoesNotExistError): - return None - - -def get_portal_programs(): - """Returns a list of all program to be displayed on the portal - Programs are returned based on the following logic - is_published and (student_is_enrolled or student_can_self_enroll) - - Returns: - list of dictionary: List of all programs and to be displayed on the portal along with access rights - """ - published_programs = frappe.get_all("Program", filters={"is_published": True}) - if not published_programs: - return None - - program_list = [frappe.get_doc("Program", program) for program in published_programs] - portal_programs = [ - {"program": program, "has_access": allowed_program_access(program.name)} - for program in program_list - if allowed_program_access(program.name) or program.allow_self_enroll - ] - - return portal_programs - - -def allowed_program_access(program, student=None): - """Returns enrollment status for current student - - Args: - program (string): Name of the program - student (object): instance of Student document - - Returns: - bool: Is current user enrolled or not - """ - if has_super_access(): - return True - if not student: - student = get_current_student() - if student and get_enrollment("program", program, student.name): - return True - else: - return False - - -def get_enrollment(master, document, student): - """Gets enrollment for course or program - - Args: - master (string): can either be program or course - document (string): program or course name - student (string): Student ID - - Returns: - string: Enrollment Name if exists else returns empty string - """ - if master == "program": - enrollments = frappe.get_all( - "Program Enrollment", filters={"student": student, "program": document, "docstatus": 1} - ) - if master == "course": - enrollments = frappe.get_all( - "Course Enrollment", filters={"student": student, "course": document} - ) - - if enrollments: - return enrollments[0].name - else: - return None - - -@frappe.whitelist() -def enroll_in_program(program_name, student=None): - """Enroll student in program - - Args: - program_name (string): Name of the program to be enrolled into - student (string, optional): name of student who has to be enrolled, if not - provided, a student will be created from the current user - - Returns: - string: name of the program enrollment document - """ - if has_super_access(): - return - - if not student == None: - student = frappe.get_doc("Student", student) - else: - # Check if self enrollment in allowed - program = frappe.get_doc("Program", program_name) - if not program.allow_self_enroll: - return frappe.throw(_("You are not allowed to enroll for this course")) - - student = get_current_student() - if not student: - student = create_student_from_current_user() - - # Check if student is already enrolled in program - enrollment = get_enrollment("program", program_name, student.name) - if enrollment: - return enrollment - - # Check if self enrollment in allowed - program = frappe.get_doc("Program", program_name) - if not program.allow_self_enroll: - return frappe.throw(_("You are not allowed to enroll for this course")) - - # Enroll in program - program_enrollment = student.enroll_in_program(program_name) - return program_enrollment.name - - -def has_super_access(): - """Check if user has a role that allows full access to LMS - - Returns: - bool: true if user has access to all lms content - """ - current_user = frappe.get_doc("User", frappe.session.user) - roles = set([role.role for role in current_user.roles]) - return bool( - roles & {"Administrator", "Instructor", "Education Manager", "System Manager", "Academic User"} - ) - - -@frappe.whitelist() -def add_activity(course, content_type, content, program): - if has_super_access(): - return None - - student = get_current_student() - if not student: - return frappe.throw( - _("Student with email {0} does not exist").format(frappe.session.user), frappe.DoesNotExistError - ) - - enrollment = get_or_create_course_enrollment(course, program) - if content_type == "Quiz": - return - else: - return enrollment.add_activity(content_type, content) - - -@frappe.whitelist() -def evaluate_quiz(quiz_response, quiz_name, course, program, time_taken): - import json - - student = get_current_student() - - quiz_response = json.loads(quiz_response) - quiz = frappe.get_doc("Quiz", quiz_name) - result, score, status = quiz.evaluate(quiz_response, quiz_name) - - if has_super_access(): - return {"result": result, "score": score, "status": status} - - if student: - enrollment = get_or_create_course_enrollment(course, program) - if quiz.allowed_attempt(enrollment, quiz_name): - enrollment.add_quiz_activity(quiz_name, quiz_response, result, score, status, time_taken) - return {"result": result, "score": score, "status": status} - else: - return None - - -@frappe.whitelist() -def get_quiz(quiz_name, course): - try: - quiz = frappe.get_doc("Quiz", quiz_name) - questions = quiz.get_questions() - except Exception: - frappe.throw(_("Quiz {0} does not exist").format(quiz_name), frappe.DoesNotExistError) - return None - - questions = [ - { - "name": question.name, - "question": question.question, - "type": question.question_type, - "options": [{"name": option.name, "option": option.option} for option in question.options], - } - for question in questions - ] - - if has_super_access(): - return { - "questions": questions, - "activity": None, - "is_time_bound": quiz.is_time_bound, - "duration": quiz.duration, - } - - student = get_current_student() - course_enrollment = get_enrollment("course", course, student.name) - status, score, result, time_taken = check_quiz_completion(quiz, course_enrollment) - return { - "questions": questions, - "activity": {"is_complete": status, "score": score, "result": result, "time_taken": time_taken}, - "is_time_bound": quiz.is_time_bound, - "duration": quiz.duration, - } - - -def get_topic_progress(topic, course_name, program): - """ - Return the porgress of a course in a program as well as the content to continue from. - :param topic_name: - :param course_name: - """ - student = get_current_student() - if not student: - return None - course_enrollment = get_or_create_course_enrollment(course_name, program) - progress = student.get_topic_progress(course_enrollment.name, topic) - if not progress: - return None - count = sum([activity["is_complete"] for activity in progress]) - if count == 0: - return {"completed": False, "started": False} - elif count == len(progress): - return {"completed": True, "started": True} - elif count < len(progress): - return {"completed": False, "started": True} - - -def get_course_progress(course, program): - """ - Return the porgress of a course in a program as well as the content to continue from. - :param topic_name: - :param course_name: - """ - course_progress = [] - for course_topic in course.topics: - topic = frappe.get_doc("Topic", course_topic.topic) - progress = get_topic_progress(topic, course.name, program) - if progress: - course_progress.append(progress) - if course_progress: - number_of_completed_topics = sum([activity["completed"] for activity in course_progress]) - total_topics = len(course_progress) - if total_topics == 1: - return course_progress[0] - if number_of_completed_topics == 0: - return {"completed": False, "started": False} - if number_of_completed_topics == total_topics: - return {"completed": True, "started": True} - if number_of_completed_topics < total_topics: - return {"completed": False, "started": True} - - return None - - -def get_program_progress(program): - program_progress = [] - if not program.courses: - return None - for program_course in program.courses: - course = frappe.get_doc("Course", program_course.course) - progress = get_course_progress(course, program.name) - if progress: - progress["name"] = course.name - progress["course"] = course.course_name - program_progress.append(progress) - - if program_progress: - return program_progress - - return None - - -def get_program_completion(program): - topics = frappe.db.sql( - """select `tabCourse Topic`.topic, `tabCourse Topic`.parent - from `tabCourse Topic`, - `tabProgram Course` - where `tabCourse Topic`.parent = `tabProgram Course`.course - and `tabProgram Course`.parent = %s""", - program.name, - ) - - progress = [] - for topic in topics: - topic_doc = frappe.get_doc("Topic", topic[0]) - topic_progress = get_topic_progress(topic_doc, topic[1], program.name) - if topic_progress: - progress.append(topic_progress) - - if progress: - number_of_completed_topics = sum([activity["completed"] for activity in progress if activity]) - total_topics = len(progress) - try: - return int((float(number_of_completed_topics) / total_topics) * 100) - except ZeroDivisionError: - return 0 - - return 0 - - -def create_student_from_current_user(): - user = frappe.get_doc("User", frappe.session.user) - - student = frappe.get_doc( - { - "doctype": "Student", - "first_name": user.first_name, - "last_name": user.last_name, - "student_email_id": user.email, - "user": frappe.session.user, - } - ) - - student.save(ignore_permissions=True) - return student - - -def get_or_create_course_enrollment(course, program): - student = get_current_student() - course_enrollment = get_enrollment("course", course, student.name) - if not course_enrollment: - program_enrollment = get_enrollment("program", program.name, student.name) - if not program_enrollment: - frappe.throw(_("You are not enrolled in program {0}").format(program)) - return - return student.enroll_in_course( - course_name=course, program_enrollment=get_enrollment("program", program.name, student.name) - ) - else: - return frappe.get_doc("Course Enrollment", course_enrollment) - - -def check_content_completion(content_name, content_type, enrollment_name): - activity = frappe.get_all( - "Course Activity", - filters={"enrollment": enrollment_name, "content_type": content_type, "content": content_name}, - ) - if activity: - return True - else: - return False - - -def check_quiz_completion(quiz, enrollment_name): - attempts = frappe.get_all( - "Quiz Activity", - filters={"enrollment": enrollment_name, "quiz": quiz.name}, - fields=["name", "activity_date", "score", "status", "time_taken"], - ) - status = False if quiz.max_attempts == 0 else bool(len(attempts) >= quiz.max_attempts) - score = None - result = None - time_taken = None - if attempts: - if quiz.grading_basis == "Last Highest Score": - attempts = sorted(attempts, key=lambda i: int(i.score), reverse=True) - score = attempts[0]["score"] - result = attempts[0]["status"] - time_taken = attempts[0]["time_taken"] - if result == "Pass": - status = True - return status, score, result, time_taken diff --git a/erpnext/education/web_form/__init__.py b/erpnext/education/web_form/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/web_form/student_applicant/__init__.py b/erpnext/education/web_form/student_applicant/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/education/web_form/student_applicant/student_applicant.js b/erpnext/education/web_form/student_applicant/student_applicant.js deleted file mode 100644 index ffc5e98425..0000000000 --- a/erpnext/education/web_form/student_applicant/student_applicant.js +++ /dev/null @@ -1,3 +0,0 @@ -frappe.ready(function() { - // bind events here -}) diff --git a/erpnext/education/web_form/student_applicant/student_applicant.json b/erpnext/education/web_form/student_applicant/student_applicant.json deleted file mode 100644 index 7b4eaa18ff..0000000000 --- a/erpnext/education/web_form/student_applicant/student_applicant.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "accept_payment": 0, - "allow_comments": 0, - "allow_delete": 0, - "allow_edit": 1, - "allow_incomplete": 0, - "allow_multiple": 1, - "allow_print": 0, - "amount": 0.0, - "amount_based_on_field": 0, - "apply_document_permissions": 0, - "creation": "2016-09-22 13:10:10.792735", - "doc_type": "Student Applicant", - "docstatus": 0, - "doctype": "Web Form", - "idx": 0, - "is_standard": 1, - "login_required": 1, - "max_attachment_size": 0, - "modified": "2020-10-07 23:13:07.814941", - "modified_by": "Administrator", - "module": "Education", - "name": "student-applicant", - "owner": "Administrator", - "payment_button_label": "Buy Now", - "published": 1, - "route": "student-applicant", - "route_to_success_link": 0, - "show_attachments": 0, - "show_in_grid": 0, - "show_sidebar": 1, - "sidebar_items": [], - "success_url": "/student-applicant", - "title": "Student Applicant", - "web_form_fields": [ - { - "allow_read_on_all_link_options": 0, - "fieldname": "first_name", - "fieldtype": "Data", - "hidden": 0, - "label": "First Name", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 1, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "middle_name", - "fieldtype": "Data", - "hidden": 0, - "label": "Middle Name", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "last_name", - "fieldtype": "Data", - "hidden": 0, - "label": "Last Name", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 1, - "fieldname": "program", - "fieldtype": "Link", - "hidden": 0, - "label": "Program", - "max_length": 0, - "max_value": 0, - "options": "Program", - "read_only": 0, - "reqd": 1, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 1, - "fieldname": "academic_year", - "fieldtype": "Link", - "hidden": 0, - "label": "Academic Year", - "max_length": 0, - "max_value": 0, - "options": "Academic Year", - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 1, - "fieldname": "academic_term", - "fieldtype": "Link", - "hidden": 0, - "label": "Academic Term", - "max_length": 0, - "max_value": 0, - "options": "Academic Term", - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "date_of_birth", - "fieldtype": "Date", - "hidden": 0, - "label": "Date of Birth", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 1, - "fieldname": "gender", - "fieldtype": "Link", - "hidden": 0, - "label": "Gender", - "max_length": 0, - "max_value": 0, - "options": "Gender", - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "blood_group", - "fieldtype": "Select", - "hidden": 0, - "label": "Blood Group", - "max_length": 0, - "max_value": 0, - "options": "\nA+\nA-\nB+\nB-\nO+\nO-\nAB+\nAB-", - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "student_email_id", - "fieldtype": "Data", - "hidden": 0, - "label": "Student Email ID", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 1, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "student_mobile_number", - "fieldtype": "Data", - "hidden": 0, - "label": "Student Mobile Number", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "default": "", - "fieldname": "nationality", - "fieldtype": "Data", - "hidden": 0, - "label": "Nationality", - "max_length": 0, - "max_value": 0, - "options": "", - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "address_line_1", - "fieldtype": "Data", - "hidden": 0, - "label": "Address Line 1", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "address_line_2", - "fieldtype": "Data", - "hidden": 0, - "label": "Address Line 2", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "pincode", - "fieldtype": "Data", - "hidden": 0, - "label": "Pincode", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "siblings", - "fieldtype": "Table", - "hidden": 0, - "label": "Siblings", - "max_length": 0, - "max_value": 0, - "options": "Student Sibling", - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "student_admission", - "fieldtype": "Link", - "hidden": 0, - "label": "Student Admission", - "max_length": 0, - "max_value": 0, - "options": "Student Admission", - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - } - ] -} \ No newline at end of file diff --git a/erpnext/education/web_form/student_applicant/student_applicant.py b/erpnext/education/web_form/student_applicant/student_applicant.py deleted file mode 100644 index 02e3e93333..0000000000 --- a/erpnext/education/web_form/student_applicant/student_applicant.py +++ /dev/null @@ -1,3 +0,0 @@ -def get_context(context): - # do your magic here - pass diff --git a/erpnext/education/workspace/education/education.json b/erpnext/education/workspace/education/education.json deleted file mode 100644 index 0c7f19894c..0000000000 --- a/erpnext/education/workspace/education/education.json +++ /dev/null @@ -1,765 +0,0 @@ -{ - "charts": [ - { - "chart_name": "Program Enrollments", - "label": "Program Enrollments" - } - ], - "content": "[{\"type\":\"onboarding\",\"data\":{\"onboarding_name\":\"Education\",\"col\":12}},{\"type\":\"chart\",\"data\":{\"chart_name\":\"Program Enrollments\",\"col\":12}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"Your Shortcuts\",\"col\":12}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Student\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Instructor\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Program\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Course\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Fees\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Student Monthly Attendance Sheet\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Course Scheduling Tool\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Student Attendance Tool\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Dashboard\",\"col\":3}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"Reports & Masters\",\"col\":12}},{\"type\":\"card\",\"data\":{\"card_name\":\"Student and Instructor\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Masters\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Content Masters\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Settings\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Admission\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Fees\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Schedule\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Attendance\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"LMS Activity\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Assessment\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Assessment Reports\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Tools\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Other Reports\",\"col\":4}}]", - "creation": "2020-03-02 17:22:57.066401", - "docstatus": 0, - "doctype": "Workspace", - "for_user": "", - "hide_custom": 0, - "icon": "education", - "idx": 0, - "label": "Education", - "links": [ - { - "hidden": 0, - "is_query_report": 0, - "label": "Student and Instructor", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student", - "link_count": 0, - "link_to": "Student", - "link_type": "DocType", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Instructor", - "link_count": 0, - "link_to": "Instructor", - "link_type": "DocType", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Guardian", - "link_count": 0, - "link_to": "Guardian", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Group", - "link_count": 0, - "link_to": "Student Group", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Log", - "link_count": 0, - "link_to": "Student Log", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Masters", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Program", - "link_count": 0, - "link_to": "Program", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Course", - "link_count": 0, - "link_to": "Course", - "link_type": "DocType", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Topic", - "link_count": 0, - "link_to": "Topic", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Room", - "link_count": 0, - "link_to": "Room", - "link_type": "DocType", - "onboard": 1, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Content Masters", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Article", - "link_count": 0, - "link_to": "Article", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Video", - "link_count": 0, - "link_to": "Video", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Quiz", - "link_count": 0, - "link_to": "Quiz", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Settings", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Education Settings", - "link_count": 0, - "link_to": "Education Settings", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Category", - "link_count": 0, - "link_to": "Student Category", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Batch Name", - "link_count": 0, - "link_to": "Student Batch Name", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Grading Scale", - "link_count": 0, - "link_to": "Grading Scale", - "link_type": "DocType", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Academic Term", - "link_count": 0, - "link_to": "Academic Term", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Academic Year", - "link_count": 0, - "link_to": "Academic Year", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Admission", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Applicant", - "link_count": 0, - "link_to": "Student Applicant", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Admission", - "link_count": 0, - "link_to": "Student Admission", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Program Enrollment", - "link_count": 0, - "link_to": "Program Enrollment", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Course Enrollment", - "link_count": 0, - "link_to": "Course Enrollment", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Fees", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Fee Structure", - "link_count": 0, - "link_to": "Fee Structure", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Fee Category", - "link_count": 0, - "link_to": "Fee Category", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Fee Schedule", - "link_count": 0, - "link_to": "Fee Schedule", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Fees", - "link_count": 0, - "link_to": "Fees", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Fees", - "hidden": 0, - "is_query_report": 1, - "label": "Student Fee Collection Report", - "link_count": 0, - "link_to": "Student Fee Collection", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Fees", - "hidden": 0, - "is_query_report": 1, - "label": "Program wise Fee Collection Report", - "link_count": 0, - "link_to": "Program wise Fee Collection", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Schedule", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Course Schedule", - "link_count": 0, - "link_to": "Course Schedule", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Course Scheduling Tool", - "link_count": 0, - "link_to": "Course Scheduling Tool", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Attendance", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Attendance", - "link_count": 0, - "link_to": "Student Attendance", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Leave Application", - "link_count": 0, - "link_to": "Student Leave Application", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Student Attendance", - "hidden": 0, - "is_query_report": 1, - "label": "Student Monthly Attendance Sheet", - "link_count": 0, - "link_to": "Student Monthly Attendance Sheet", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Student Attendance", - "hidden": 0, - "is_query_report": 1, - "label": "Absent Student Report", - "link_count": 0, - "link_to": "Absent Student Report", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Student Attendance", - "hidden": 0, - "is_query_report": 1, - "label": "Student Batch-Wise Attendance", - "link_count": 0, - "link_to": "Student Batch-Wise Attendance", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "LMS Activity", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Course Enrollment", - "link_count": 0, - "link_to": "Course Enrollment", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Course Activity", - "link_count": 0, - "link_to": "Course Activity", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Quiz Activity", - "link_count": 0, - "link_to": "Quiz Activity", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Assessment", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Assessment Plan", - "link_count": 0, - "link_to": "Assessment Plan", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Assessment Group", - "link_count": 0, - "link_to": "Assessment Group", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Assessment Result", - "link_count": 0, - "link_to": "Assessment Result", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Assessment Criteria", - "link_count": 0, - "link_to": "Assessment Criteria", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Assessment Reports", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "Assessment Result", - "hidden": 0, - "is_query_report": 1, - "label": "Course wise Assessment Report", - "link_count": 0, - "link_to": "Course wise Assessment Report", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Assessment Result", - "hidden": 0, - "is_query_report": 1, - "label": "Final Assessment Grades", - "link_count": 0, - "link_to": "Final Assessment Grades", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Assessment Plan", - "hidden": 0, - "is_query_report": 1, - "label": "Assessment Plan Status", - "link_count": 0, - "link_to": "Assessment Plan Status", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Report Generation Tool", - "link_count": 0, - "link_to": "Student Report Generation Tool", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Tools", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Attendance Tool", - "link_count": 0, - "link_to": "Student Attendance Tool", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Assessment Result Tool", - "link_count": 0, - "link_to": "Assessment Result Tool", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Student Group Creation Tool", - "link_count": 0, - "link_to": "Student Group Creation Tool", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Program Enrollment Tool", - "link_count": 0, - "link_to": "Program Enrollment Tool", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Course Scheduling Tool", - "link_count": 0, - "link_to": "Course Scheduling Tool", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Other Reports", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "Program Enrollment", - "hidden": 0, - "is_query_report": 1, - "label": "Student and Guardian Contact Details", - "link_count": 0, - "link_to": "Student and Guardian Contact Details", - "link_type": "Report", - "onboard": 0, - "type": "Link" - } - ], - "modified": "2022-01-13 17:29:13.676542", - "modified_by": "Administrator", - "module": "Education", - "name": "Education", - "owner": "Administrator", - "parent_page": "", - "public": 1, - "restrict_to_domain": "Education", - "roles": [], - "sequence_id": 9.0, - "shortcuts": [ - { - "color": "Grey", - "format": "{} Active", - "label": "Student", - "link_to": "Student", - "stats_filter": "{\n \"enabled\": 1\n}", - "type": "DocType" - }, - { - "color": "Grey", - "format": "{} Active", - "label": "Instructor", - "link_to": "Instructor", - "stats_filter": "{\n \"status\": \"Active\"\n}", - "type": "DocType" - }, - { - "color": "", - "format": "", - "label": "Program", - "link_to": "Program", - "stats_filter": "", - "type": "DocType" - }, - { - "label": "Course", - "link_to": "Course", - "type": "DocType" - }, - { - "color": "Grey", - "format": "{} Unpaid", - "label": "Fees", - "link_to": "Fees", - "stats_filter": "{\n \"outstanding_amount\": [\"!=\", 0.0]\n}", - "type": "DocType" - }, - { - "label": "Student Monthly Attendance Sheet", - "link_to": "Student Monthly Attendance Sheet", - "type": "Report" - }, - { - "label": "Course Scheduling Tool", - "link_to": "Course Scheduling Tool", - "type": "DocType" - }, - { - "label": "Student Attendance Tool", - "link_to": "Student Attendance Tool", - "type": "DocType" - }, - { - "label": "Dashboard", - "link_to": "Education", - "type": "Dashboard" - } - ], - "title": "Education" -} \ No newline at end of file diff --git a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py index 46a4d3c69e..6d977e022f 100644 --- a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py +++ b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py @@ -32,7 +32,7 @@ def order(*args, **kwargs): error_message = ( frappe.get_traceback() + "\n\n Request Data: \n" + json.loads(frappe.request.data).__str__() ) - frappe.log_error(error_message, "WooCommerce Error") + frappe.log_error("WooCommerce Error", error_message) raise diff --git a/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py b/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py index e1972ae3d3..55517e4828 100644 --- a/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py +++ b/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py @@ -107,7 +107,7 @@ class GoCardlessSettings(Document): return self.create_charge_on_gocardless() except Exception: - frappe.log_error(frappe.get_traceback()) + frappe.log_error("Gocardless payment reqeust failed") return { "redirect_to": frappe.redirect_to_message( _("Server Error"), @@ -163,21 +163,15 @@ class GoCardlessSettings(Document): or payment.status == "charged_back" ): self.integration_request.db_set("status", "Cancelled", update_modified=False) - frappe.log_error( - _("Payment Cancelled. Please check your GoCardless Account for more details"), - "GoCardless Payment Error", - ) + frappe.log_error("Gocardless payment cancelled") self.integration_request.db_set("error", payment.status, update_modified=False) else: self.integration_request.db_set("status", "Failed", update_modified=False) - frappe.log_error( - _("Payment Failed. Please check your GoCardless Account for more details"), - "GoCardless Payment Error", - ) + frappe.log_error("Gocardless payment failed") self.integration_request.db_set("error", payment.status, update_modified=False) except Exception as e: - frappe.log_error(e, "GoCardless Payment Error") + frappe.log_error("GoCardless Payment Error") if self.flags.status_changed_to == "Completed": status = "Completed" @@ -188,7 +182,7 @@ class GoCardlessSettings(Document): self.data.get("reference_doctype"), self.data.get("reference_docname") ).run_method("on_payment_authorized", self.flags.status_changed_to) except Exception: - frappe.log_error(frappe.get_traceback()) + frappe.log_error("Gocardless redirect failed") if custom_redirect_to: redirect_to = custom_redirect_to diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py index 78a598ce98..e389980726 100644 --- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py +++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py @@ -152,7 +152,7 @@ def generate_stk_push(**kwargs): return response except Exception: - frappe.log_error(title=_("Mpesa Express Transaction Error")) + frappe.log_error("Mpesa Express Transaction Error") frappe.throw( _("Issue detected with Mpesa configuration, check the error logs for more details"), title=_("Mpesa Express Error"), @@ -203,7 +203,7 @@ def verify_transaction(**kwargs): integration_request.handle_success(transaction_response) except Exception: integration_request.handle_failure(transaction_response) - frappe.log_error(frappe.get_traceback()) + frappe.log_error("Mpesa: Failed to verify transaction") else: integration_request.handle_failure(transaction_response) @@ -275,7 +275,7 @@ def get_account_balance(request_payload): ) return response except Exception: - frappe.log_error(title=_("Account Balance Processing Error")) + frappe.log_error("Mpesa: Failed to get account balance") frappe.throw(_("Please check your configuration and try again"), title=_("Error")) @@ -315,7 +315,7 @@ def process_balance_info(**kwargs): except Exception: request.handle_failure(account_balance_response) frappe.log_error( - title=_("Mpesa Account Balance Processing Error"), message=account_balance_response + title="Mpesa Account Balance Processing Error", message=account_balance_response ) else: request.handle_failure(account_balance_response) diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py index 625dd3110e..38d69932f2 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py @@ -23,7 +23,7 @@ class PlaidConnector: def get_access_token(self, public_token): if public_token is None: - frappe.log_error(_("Public token is missing for this bank"), _("Plaid public token error")) + frappe.log_error("Plaid: Public token is missing") response = self.client.Item.public_token.exchange(public_token) access_token = response["access_token"] return access_token @@ -61,10 +61,10 @@ class PlaidConnector: try: response = self.client.LinkToken.create(token_request) except InvalidRequestError: - frappe.log_error(frappe.get_traceback(), _("Plaid invalid request error")) + frappe.log_error("Plaid: Invalid request error") frappe.msgprint(_("Please check your Plaid client ID and secret values")) except APIError as e: - frappe.log_error(frappe.get_traceback(), _("Plaid authentication error")) + frappe.log_error("Plaid: Authentication error") frappe.throw(_(str(e)), title=_("Authentication Failed")) else: return response["link_token"] @@ -81,7 +81,7 @@ class PlaidConnector: except requests.Timeout: pass except Exception as e: - frappe.log_error(frappe.get_traceback(), _("Plaid authentication error")) + frappe.log_error("Plaid: Authentication error") frappe.throw(_(str(e)), title=_("Authentication Failed")) def get_transactions(self, start_date, end_date, account_id=None): @@ -102,4 +102,4 @@ class PlaidConnector: except ItemError as e: raise e except Exception: - frappe.log_error(frappe.get_traceback(), _("Plaid transactions sync error")) + frappe.log_error("Plaid: Transactions sync error") diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py index ce65f6c0ff..62ea85fc5d 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py @@ -54,7 +54,7 @@ def add_institution(token, response): ) bank.insert() except Exception: - frappe.log_error(frappe.get_traceback(), title=_("Plaid Link Error")) + frappe.log_error("Plaid Link Error") else: bank = frappe.get_doc("Bank", response["institution"]["name"]) bank.plaid_access_token = access_token @@ -113,7 +113,7 @@ def add_bank_accounts(response, bank, company): _("Bank account {0} already exists and could not be created again").format(account["name"]) ) except Exception: - frappe.log_error(frappe.get_traceback(), title=_("Plaid Link Error")) + frappe.log_error("Plaid Link Error") frappe.throw( _("There was an error creating Bank Account while linking with Plaid."), title=_("Plaid Link Failed"), @@ -135,7 +135,7 @@ def add_bank_accounts(response, bank, company): existing_account.save() result.append(existing_bank_account) except Exception: - frappe.log_error(frappe.get_traceback(), title=_("Plaid Link Error")) + frappe.log_error("Plaid Link Error") frappe.throw( _("There was an error updating Bank Account {} while linking with Plaid.").format( existing_bank_account diff --git a/erpnext/erpnext_integrations/stripe_integration.py b/erpnext/erpnext_integrations/stripe_integration.py index b12adc1d3d..2d7e8a5d31 100644 --- a/erpnext/erpnext_integrations/stripe_integration.py +++ b/erpnext/erpnext_integrations/stripe_integration.py @@ -22,7 +22,7 @@ def create_stripe_subscription(gateway_controller, data): return create_subscription_on_stripe(stripe_settings) except Exception: - frappe.log_error(frappe.get_traceback()) + stripe_settings.log_error("Unable to create Stripe subscription") return { "redirect_to": frappe.redirect_to_message( _("Server Error"), @@ -55,9 +55,9 @@ def create_subscription_on_stripe(stripe_settings): else: stripe_settings.integration_request.db_set("status", "Failed", update_modified=False) - frappe.log_error("Subscription N°: " + subscription.id, "Stripe Payment not completed") + frappe.log_error(f"Stripe Subscription ID {subscription.id}: Payment failed") except Exception: stripe_settings.integration_request.db_set("status", "Failed", update_modified=False) - frappe.log_error(frappe.get_traceback()) + stripe_settings.log_error("Unable to create Stripe subscription") return stripe_settings.finalize_request() diff --git a/erpnext/hooks.py b/erpnext/hooks.py index fe0a89a276..066249ba22 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -62,14 +62,12 @@ treeviews = [ "Supplier Group", "Sales Person", "Territory", - "Assessment Group", "Department", ] # website update_website_context = [ "erpnext.e_commerce.shopping_cart.utils.update_website_context", - "erpnext.education.doctype.education_settings.education_settings.update_website_context", ] my_account_context = "erpnext.e_commerce.shopping_cart.utils.update_my_account_context" webform_list_context = "erpnext.controllers.website_list_for_contact.get_webform_list_context" @@ -80,25 +78,9 @@ calendars = [ "Leave Application", "Sales Order", "Holiday List", - "Course Schedule", ] -domains = { - "Distribution": "erpnext.domains.distribution", - "Education": "erpnext.domains.education", - "Manufacturing": "erpnext.domains.manufacturing", - "Retail": "erpnext.domains.retail", - "Services": "erpnext.domains.services", -} - -website_generators = [ - "Item Group", - "Website Item", - "BOM", - "Sales Partner", - "Job Opening", - "Student Admission", -] +website_generators = ["Item Group", "Website Item", "BOM", "Sales Partner", "Job Opening"] website_context = { "favicon": "/assets/erpnext/images/erpnext-favicon.svg", @@ -182,7 +164,6 @@ website_route_rules = [ "defaults": {"doctype": "Address", "parents": [{"label": _("Addresses"), "route": "addresses"}]}, }, {"from_route": "/jobs", "to_route": "Job Opening"}, - {"from_route": "/admissions", "to_route": "Student Admission"}, {"from_route": "/boms", "to_route": "BOM"}, {"from_route": "/timesheets", "to_route": "Timesheet"}, {"from_route": "/material-requests", "to_route": "Material Request"}, @@ -255,14 +236,7 @@ standard_portal_menu_items = [ "reference_doctype": "Timesheet", "role": "Customer", }, - {"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees", "role": "Student"}, {"title": _("Newsletter"), "route": "/newsletters", "reference_doctype": "Newsletter"}, - { - "title": _("Admission"), - "route": "/admissions", - "reference_doctype": "Student Admission", - "role": "Student", - }, { "title": _("Material Request"), "route": "/material-requests", @@ -275,7 +249,6 @@ standard_portal_menu_items = [ default_roles = [ {"role": "Customer", "doctype": "Contact", "email_field": "email_id"}, {"role": "Supplier", "doctype": "Contact", "email_field": "email_id"}, - {"role": "Student", "doctype": "Student", "email_field": "student_email_id"}, ] sounds = [ @@ -539,11 +512,8 @@ accounting_dimension_doctypes = [ "Landed Cost Item", "Asset Value Adjustment", "Loyalty Program", - "Fee Schedule", - "Fee Structure", "Stock Reconciliation", "Travel Request", - "Fees", "POS Profile", "Opening Invoice Creation Tool", "Opening Invoice Creation Tool Item", @@ -551,6 +521,9 @@ accounting_dimension_doctypes = [ "Subscription Plan", "POS Invoice", "POS Invoice Item", + "Purchase Order", + "Purchase Receipt", + "Sales Order", ] regional_overrides = { @@ -646,48 +619,6 @@ global_search_doctypes = { {"doctype": "Maintenance Visit", "index": 46}, {"doctype": "Warranty Claim", "index": 47}, ], - "Education": [ - {"doctype": "Article", "index": 1}, - {"doctype": "Video", "index": 2}, - {"doctype": "Topic", "index": 3}, - {"doctype": "Course", "index": 4}, - {"doctype": "Program", "index": 5}, - {"doctype": "Quiz", "index": 6}, - {"doctype": "Question", "index": 7}, - {"doctype": "Fee Schedule", "index": 8}, - {"doctype": "Fee Structure", "index": 9}, - {"doctype": "Fees", "index": 10}, - {"doctype": "Student Group", "index": 11}, - {"doctype": "Student", "index": 12}, - {"doctype": "Instructor", "index": 13}, - {"doctype": "Course Activity", "index": 14}, - {"doctype": "Quiz Activity", "index": 15}, - {"doctype": "Course Enrollment", "index": 16}, - {"doctype": "Program Enrollment", "index": 17}, - {"doctype": "Student Language", "index": 18}, - {"doctype": "Student Applicant", "index": 19}, - {"doctype": "Assessment Result", "index": 20}, - {"doctype": "Assessment Plan", "index": 21}, - {"doctype": "Grading Scale", "index": 22}, - {"doctype": "Guardian", "index": 23}, - {"doctype": "Student Leave Application", "index": 24}, - {"doctype": "Student Log", "index": 25}, - {"doctype": "Room", "index": 26}, - {"doctype": "Course Schedule", "index": 27}, - {"doctype": "Student Attendance", "index": 28}, - {"doctype": "Announcement", "index": 29}, - {"doctype": "Student Category", "index": 30}, - {"doctype": "Assessment Group", "index": 31}, - {"doctype": "Student Batch Name", "index": 32}, - {"doctype": "Assessment Criteria", "index": 33}, - {"doctype": "Academic Year", "index": 34}, - {"doctype": "Academic Term", "index": 35}, - {"doctype": "School House", "index": 36}, - {"doctype": "Student Admission", "index": 37}, - {"doctype": "Fee Category", "index": 38}, - {"doctype": "Assessment Code", "index": 39}, - {"doctype": "Discussion", "index": 40}, - ], } additional_timeline_content = { diff --git a/erpnext/hr/doctype/employee_checkin/employee_checkin.py b/erpnext/hr/doctype/employee_checkin/employee_checkin.py index 64eb019b00..e07b5e5db5 100644 --- a/erpnext/hr/doctype/employee_checkin/employee_checkin.py +++ b/erpnext/hr/doctype/employee_checkin/employee_checkin.py @@ -5,7 +5,7 @@ import frappe from frappe import _ from frappe.model.document import Document -from frappe.utils import cint, get_datetime +from frappe.utils import cint, get_datetime, get_link_to_form from erpnext.hr.doctype.attendance.attendance import ( get_duplicate_attendance_record, @@ -130,14 +130,11 @@ def mark_attendance_and_link_log( """ log_names = [x.name for x in logs] employee = logs[0].employee + if attendance_status == "Skip": - frappe.db.sql( - """update `tabEmployee Checkin` - set skip_auto_attendance = %s - where name in %s""", - ("1", log_names), - ) + skip_attendance_in_checkins(log_names) return None + elif attendance_status in ("Present", "Absent", "Half Day"): employee_doc = frappe.get_doc("Employee", employee) duplicate = get_duplicate_attendance_record(employee, attendance_date, shift) @@ -159,6 +156,12 @@ def mark_attendance_and_link_log( } attendance = frappe.get_doc(doc_dict).insert() attendance.submit() + + if attendance_status == "Absent": + attendance.add_comment( + text=_("Employee was marked Absent for not meeting the working hours threshold.") + ) + frappe.db.sql( """update `tabEmployee Checkin` set attendance = %s @@ -167,13 +170,10 @@ def mark_attendance_and_link_log( ) return attendance else: - frappe.db.sql( - """update `tabEmployee Checkin` - set skip_auto_attendance = %s - where name in %s""", - ("1", log_names), - ) + skip_attendance_in_checkins(log_names) + add_comment_in_checkins(log_names, duplicate, overlapping) return None + else: frappe.throw(_("{} is an invalid Attendance Status.").format(attendance_status)) @@ -241,3 +241,34 @@ def time_diff_in_hours(start, end): def find_index_in_dict(dict_list, key, value): return next((index for (index, d) in enumerate(dict_list) if d[key] == value), None) + + +def add_comment_in_checkins(log_names, duplicate, overlapping): + if duplicate: + text = _("Auto Attendance skipped due to duplicate attendance record: {}").format( + get_link_to_form("Attendance", duplicate[0].name) + ) + else: + text = _("Auto Attendance skipped due to overlapping attendance record: {}").format( + get_link_to_form("Attendance", overlapping.name) + ) + + for name in log_names: + frappe.get_doc( + { + "doctype": "Comment", + "comment_type": "Comment", + "reference_doctype": "Employee Checkin", + "reference_name": name, + "content": text, + } + ).insert(ignore_permissions=True) + + +def skip_attendance_in_checkins(log_names): + EmployeeCheckin = frappe.qb.DocType("Employee Checkin") + ( + frappe.qb.update(EmployeeCheckin) + .set("skip_auto_attendance", 1) + .where(EmployeeCheckin.name.isin(log_names)) + ).run() diff --git a/erpnext/hr/doctype/employee_grade/employee_grade.json b/erpnext/hr/doctype/employee_grade/employee_grade.json index 88b061a3c3..4967137840 100644 --- a/erpnext/hr/doctype/employee_grade/employee_grade.json +++ b/erpnext/hr/doctype/employee_grade/employee_grade.json @@ -8,7 +8,9 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ - "default_salary_structure" + "default_salary_structure", + "currency", + "default_base_pay" ], "fields": [ { @@ -16,14 +18,31 @@ "fieldtype": "Link", "label": "Default Salary Structure", "options": "Salary Structure" + }, + { + "depends_on": "default_salary_structure", + "fieldname": "default_base_pay", + "fieldtype": "Currency", + "label": "Default Base Pay", + "options": "currency" + }, + { + "fetch_from": "default_salary_structure.currency", + "fieldname": "currency", + "fieldtype": "Link", + "hidden": 1, + "label": "Currency", + "options": "Currency", + "read_only": 1 } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2020-08-26 13:12:07.815330", + "modified": "2022-05-06 15:42:10.395508", "modified_by": "Administrator", "module": "HR", "name": "Employee Grade", + "naming_rule": "Set by user", "owner": "Administrator", "permissions": [ { @@ -65,5 +84,6 @@ ], "sort_field": "modified", "sort_order": "DESC", + "states": [], "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py b/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py index dde52d7ad8..a1d39d4423 100644 --- a/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py +++ b/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py @@ -18,6 +18,7 @@ class TestLeaveAllocation(FrappeTestCase): def setUp(self): frappe.db.delete("Leave Period") frappe.db.delete("Leave Allocation") + frappe.db.delete("Leave Ledger Entry") emp_id = make_employee("test_emp_leave_allocation@salary.com", company="_Test Company") self.employee = frappe.get_doc("Employee", emp_id) diff --git a/erpnext/hr/doctype/shift_type/shift_type.py b/erpnext/hr/doctype/shift_type/shift_type.py index 5e214cf7b7..a61bb9ee5f 100644 --- a/erpnext/hr/doctype/shift_type/shift_type.py +++ b/erpnext/hr/doctype/shift_type/shift_type.py @@ -134,7 +134,17 @@ class ShiftType(Document): shift_details = get_employee_shift(employee, timestamp, True) if shift_details and shift_details.shift_type.name == self.name: - mark_attendance(employee, date, "Absent", self.name) + attendance = mark_attendance(employee, date, "Absent", self.name) + if attendance: + frappe.get_doc( + { + "doctype": "Comment", + "comment_type": "Comment", + "reference_doctype": "Attendance", + "reference_name": attendance, + "content": frappe._("Employee was marked Absent due to missing Employee Checkins."), + } + ).insert(ignore_permissions=True) def get_start_and_end_dates(self, employee): """Returns start and end dates for checking attendance and marking absent diff --git a/erpnext/hr/doctype/training_event/training_event.json b/erpnext/hr/doctype/training_event/training_event.json index fcf845a587..42e02ca3bf 100644 --- a/erpnext/hr/doctype/training_event/training_event.json +++ b/erpnext/hr/doctype/training_event/training_event.json @@ -1,850 +1,231 @@ { - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:event_name", - "beta": 0, - "creation": "2016-08-08 04:53:58.355206", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, + "actions": [], + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:event_name", + "creation": "2016-08-08 04:53:58.355206", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "event_name", + "training_program", + "event_status", + "has_certificate", + "column_break_2", + "type", + "level", + "company", + "section_break_4", + "trainer_name", + "trainer_email", + "column_break_7", + "supplier", + "contact_number", + "section_break_9", + "course", + "location", + "column_break_12", + "start_time", + "end_time", + "section_break_15", + "introduction", + "section_break_18", + "employees", + "amended_from", + "employee_emails" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "event_name", - "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": 0, - "label": "Event Name", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "event_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Event Name", + "no_copy": 1, + "reqd": 1, + "unique": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "training_program", - "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": "Training Program", - "length": 0, - "no_copy": 0, - "options": "Training Program", - "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, - "unique": 0 - }, + "fieldname": "training_program", + "fieldtype": "Link", + "label": "Training Program", + "options": "Training Program" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "event_status", - "fieldtype": "Select", - "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": "Event Status", - "length": 0, - "no_copy": 0, - "options": "Scheduled\nCompleted\nCancelled", - "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, - "unique": 0 - }, + "allow_on_submit": 1, + "fieldname": "event_status", + "fieldtype": "Select", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Event Status", + "options": "Scheduled\nCompleted\nCancelled", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.type == 'Seminar' || doc.type == 'Workshop' || doc.type == 'Conference' || doc.type == 'Exam'", - "fieldname": "has_certificate", - "fieldtype": "Check", - "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": "Has Certificate", - "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, - "unique": 0 - }, + "default": "0", + "depends_on": "eval:doc.type == 'Seminar' || doc.type == 'Workshop' || doc.type == 'Conference' || doc.type == 'Exam'", + "fieldname": "has_certificate", + "fieldtype": "Check", + "label": "Has Certificate" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_2", - "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, - "unique": 0 - }, + "fieldname": "column_break_2", + "fieldtype": "Column Break" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "type", - "fieldtype": "Select", - "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": "Type", - "length": 0, - "no_copy": 0, - "options": "Seminar\nTheory\nWorkshop\nConference\nExam\nInternet\nSelf-Study", - "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, - "unique": 0 - }, + "fieldname": "type", + "fieldtype": "Select", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Type", + "options": "Seminar\nTheory\nWorkshop\nConference\nExam\nInternet\nSelf-Study", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.type == 'Seminar' || doc.type == 'Workshop' || doc.type == 'Exam'", - "fieldname": "level", - "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": "Level", - "length": 0, - "no_copy": 0, - "options": "\nBeginner\nIntermediate\nAdvance", - "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, - "unique": 0 - }, + "depends_on": "eval:doc.type == 'Seminar' || doc.type == 'Workshop' || doc.type == 'Exam'", + "fieldname": "level", + "fieldtype": "Select", + "label": "Level", + "options": "\nBeginner\nIntermediate\nAdvance" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "company", - "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": "Company", - "length": 0, - "no_copy": 0, - "options": "Company", - "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, - "unique": 0 - }, + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_4", - "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, - "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, - "unique": 0 - }, + "fieldname": "section_break_4", + "fieldtype": "Section Break" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "trainer_name", - "fieldtype": "Data", - "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": "Trainer Name", - "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, - "unique": 0 - }, + "fieldname": "trainer_name", + "fieldtype": "Data", + "label": "Trainer Name" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "trainer_email", - "fieldtype": "Data", - "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": "Trainer Email", - "length": 0, - "no_copy": 0, - "options": "", - "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, - "unique": 0 - }, + "fieldname": "trainer_email", + "fieldtype": "Data", + "label": "Trainer Email" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_7", - "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, - "unique": 0 - }, + "fieldname": "column_break_7", + "fieldtype": "Column Break" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "supplier", - "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": "Supplier", - "length": 0, - "no_copy": 0, - "options": "Supplier", - "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, - "unique": 0 - }, + "fieldname": "supplier", + "fieldtype": "Link", + "label": "Supplier", + "options": "Supplier" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "contact_number", - "fieldtype": "Data", - "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": "Contact Number", - "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, - "unique": 0 - }, + "fieldname": "contact_number", + "fieldtype": "Data", + "label": "Contact Number" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_9", - "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, - "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, - "unique": 0 - }, + "fieldname": "section_break_9", + "fieldtype": "Section Break" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "course", - "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": 1, - "label": "Course", - "length": 0, - "no_copy": 0, - "options": "Course", - "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, - "unique": 0 - }, + "fieldname": "course", + "fieldtype": "Data", + "in_standard_filter": 1, + "label": "Course" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "location", - "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": "Location", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "location", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Location", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_12", - "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, - "unique": 0 - }, + "fieldname": "column_break_12", + "fieldtype": "Column Break" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "start_time", - "fieldtype": "Datetime", - "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": "Start Time", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "start_time", + "fieldtype": "Datetime", + "label": "Start Time", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "end_time", - "fieldtype": "Datetime", - "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": "End Time", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "end_time", + "fieldtype": "Datetime", + "label": "End Time", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_15", - "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, - "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, - "unique": 0 - }, + "fieldname": "section_break_15", + "fieldtype": "Section Break" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "introduction", - "fieldtype": "Text Editor", - "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": "Introduction", - "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": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "introduction", + "fieldtype": "Text Editor", + "label": "Introduction", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_18", - "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": "Attendees", - "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, - "unique": 0 - }, + "fieldname": "section_break_18", + "fieldtype": "Section Break", + "label": "Attendees" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "employees", - "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": "Employees", - "length": 0, - "no_copy": 0, - "options": "Training Event Employee", - "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, - "unique": 0 - }, + "allow_on_submit": 1, + "fieldname": "employees", + "fieldtype": "Table", + "label": "Employees", + "options": "Training Event Employee" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amended_from", - "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": "Amended From", - "length": 0, - "no_copy": 1, - "options": "Training Event", - "permlevel": 0, - "print_hide": 1, - "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, - "unique": 0 - }, + "fieldname": "amended_from", + "fieldtype": "Link", + "label": "Amended From", + "no_copy": 1, + "options": "Training Event", + "print_hide": 1, + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "employee_emails", - "fieldtype": "Small Text", - "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": "Employee Emails", - "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, - "unique": 0 + "fieldname": "employee_emails", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Employee Emails", + "options": "Email" } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 1, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2019-03-12 10:56:29.065781", - "modified_by": "Administrator", - "module": "HR", - "name": "Training Event", - "name_case": "", - "owner": "Administrator", + ], + "is_submittable": 1, + "links": [], + "modified": "2022-04-28 13:29:35.139497", + "modified_by": "Administrator", + "module": "HR", + "name": "Training Event", + "naming_rule": "By fieldname", + "owner": "Administrator", "permissions": [ { - "amend": 1, - "apply_user_permissions": 0, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "HR Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "import": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "HR Manager", + "share": 1, + "submit": 1, "write": 1 } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "search_fields": "event_name", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "event_name", - "track_changes": 0, - "track_seen": 0 -} + ], + "search_fields": "event_name", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "states": [], + "title_field": "event_name" +} \ No newline at end of file diff --git a/erpnext/hr/doctype/training_feedback/training_feedback.json b/erpnext/hr/doctype/training_feedback/training_feedback.json index ebf5a506f0..e968911776 100644 --- a/erpnext/hr/doctype/training_feedback/training_feedback.json +++ b/erpnext/hr/doctype/training_feedback/training_feedback.json @@ -1,7 +1,7 @@ { "actions": [], "autoname": "HR-TRF-.YYYY.-.#####", - "creation": "2016-08-08 06:35:34.158568", + "creation": "2022-01-27 13:14:35.935580", "doctype": "DocType", "editable_grid": 1, "engine": "InnoDB", @@ -46,9 +46,8 @@ { "fetch_from": "training_event.course", "fieldname": "course", - "fieldtype": "Link", + "fieldtype": "Data", "label": "Course", - "options": "Course", "read_only": 1 }, { @@ -101,7 +100,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2022-01-18 19:32:20.805277", + "modified": "2022-04-28 13:32:29.261421", "modified_by": "Administrator", "module": "HR", "name": "Training Feedback", diff --git a/erpnext/loan_management/loan_common.js b/erpnext/loan_management/loan_common.js index 43980ffef4..247e30b843 100644 --- a/erpnext/loan_management/loan_common.js +++ b/erpnext/loan_management/loan_common.js @@ -3,11 +3,6 @@ frappe.ui.form.on(cur_frm.doctype, { refresh: function(frm) { - if (!frappe.boot.active_domains.includes("Non Profit")) { - frm.set_df_property('applicant_type', 'options', ['Employee', 'Customer']); - frm.refresh_field('applicant_type'); - } - if (['Loan Disbursement', 'Loan Repayment', 'Loan Interest Accrual', 'Loan Write Off'].includes(frm.doc.doctype) && frm.doc.docstatus > 0) { diff --git a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py index 139dcbcdd9..c0770fac90 100644 --- a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py +++ b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py @@ -154,7 +154,7 @@ def run_bom_job( except Exception: frappe.db.rollback() - error_log = frappe.log_error(message=frappe.get_traceback(), title=_("BOM Update Tool Error")) + error_log = doc.log_error("BOM Update Tool Error") doc.db_set("status", "Failed") doc.db_set("error_log", error_log.name) diff --git a/erpnext/modules.txt b/erpnext/modules.txt index c6b3159e0f..869166b939 100644 --- a/erpnext/modules.txt +++ b/erpnext/modules.txt @@ -12,7 +12,6 @@ Utilities Assets Portal Maintenance -Education Regional ERPNext Integrations Quality Management diff --git a/erpnext/patches.txt b/erpnext/patches.txt index d6c44cb331..d5b15922ec 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -333,6 +333,7 @@ erpnext.patches.v13_0.delete_bank_reconciliation_detail erpnext.patches.v13_0.enable_provisional_accounting erpnext.patches.v13_0.non_profit_deprecation_warning erpnext.patches.v13_0.enable_ksa_vat_docs #1 +erpnext.patches.v14_0.delete_education_doctypes [post_model_sync] erpnext.patches.v14_0.rename_ongoing_status_in_sla_documents @@ -365,5 +366,7 @@ erpnext.patches.v13_0.remove_unknown_links_to_prod_plan_items # 24-03-2022 erpnext.patches.v13_0.update_expense_claim_status_for_paid_advances erpnext.patches.v13_0.create_gst_custom_fields_in_quotation erpnext.patches.v13_0.copy_custom_field_filters_to_website_item +erpnext.patches.v13_0.change_default_item_manufacturer_fieldtype erpnext.patches.v14_0.discount_accounting_separation erpnext.patches.v14_0.delete_employee_transfer_property_doctype +erpnext.patches.v13_0.create_accounting_dimensions_in_orders \ No newline at end of file diff --git a/erpnext/patches/v11_0/refactor_autoname_naming.py b/erpnext/patches/v11_0/refactor_autoname_naming.py index de453ccf21..fa8f4eb23e 100644 --- a/erpnext/patches/v11_0/refactor_autoname_naming.py +++ b/erpnext/patches/v11_0/refactor_autoname_naming.py @@ -69,8 +69,6 @@ doctype_series_map = { "Soil Analysis": "AG-ANA-.YY.-.MM.-.#####", "Soil Texture": "AG-TEX-.YYYY.-.#####", "Stock Ledger Entry": "MAT-SLE-.YYYY.-.#####", - "Student Leave Application": "EDU-SLA-.YYYY.-.#####", - "Student Log": "EDU-SLOG-.YYYY.-.#####", "Subscription": "ACC-SUB-.YYYY.-.#####", "Task": "TASK-.YYYY.-.#####", "Tax Rule": "ACC-TAX-RULE-.YYYY.-.#####", diff --git a/erpnext/patches/v11_0/refactor_naming_series.py b/erpnext/patches/v11_0/refactor_naming_series.py index 4945860797..cdc92fe61f 100644 --- a/erpnext/patches/v11_0/refactor_naming_series.py +++ b/erpnext/patches/v11_0/refactor_naming_series.py @@ -55,8 +55,6 @@ doctype_series_map = { "Shareholder": "ACC-SH-.YYYY.-", "Stock Entry": "MAT-STE-.YYYY.-", "Stock Reconciliation": "MAT-RECO-.YYYY.-", - "Student": "EDU-STU-.YYYY.-", - "Student Applicant": "EDU-APP-.YYYY.-", "Supplier": "SUP-.YYYY.-", "Supplier Quotation": "PUR-SQTN-.YYYY.-", "Supplier Scorecard Period": "PU-SSP-.YYYY.-", diff --git a/erpnext/patches/v11_0/set_department_for_doctypes.py b/erpnext/patches/v11_0/set_department_for_doctypes.py index 1e14b9ceb0..4900458e10 100644 --- a/erpnext/patches/v11_0/set_department_for_doctypes.py +++ b/erpnext/patches/v11_0/set_department_for_doctypes.py @@ -19,7 +19,6 @@ def execute(): "Training Event Employee", "Payroll Employee Detail", ], - "education": ["Instructor"], "projects": ["Activity Cost", "Timesheet"], "setup": ["Sales Person"], } diff --git a/erpnext/patches/v11_0/update_account_type_in_party_type.py b/erpnext/patches/v11_0/update_account_type_in_party_type.py index e55f9f20cc..47252eb98f 100644 --- a/erpnext/patches/v11_0/update_account_type_in_party_type.py +++ b/erpnext/patches/v11_0/update_account_type_in_party_type.py @@ -13,7 +13,6 @@ def execute(): "Employee": "Payable", "Member": "Receivable", "Shareholder": "Payable", - "Student": "Receivable", } for party_type, account_type in party_types.items(): diff --git a/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py b/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py index c069c24cfa..671dfd116d 100644 --- a/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py +++ b/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py @@ -17,7 +17,7 @@ def execute(): """ ) except Exception as e: - frappe.log_error(e, title="Patch Migration Failed") + frappe.log_error("Bank to Bank Account patch migration failed") frappe.reload_doc("accounts", "doctype", "bank_account") frappe.reload_doc("accounts", "doctype", "payment_request") diff --git a/erpnext/patches/v13_0/add_missing_fg_item_for_stock_entry.py b/erpnext/patches/v13_0/add_missing_fg_item_for_stock_entry.py index 517a14a830..ddbb7fd0f1 100644 --- a/erpnext/patches/v13_0/add_missing_fg_item_for_stock_entry.py +++ b/erpnext/patches/v13_0/add_missing_fg_item_for_stock_entry.py @@ -96,8 +96,7 @@ def repost_stock_entry(doc): make_sl_entries(sl_entries, True) except Exception: print(f"SLE entries not posted for the stock entry {doc.name}") - traceback = frappe.get_traceback() - frappe.log_error(traceback) + doc.log_error("Stock respost failed") def get_sle_for_target_warehouse(doc, sl_entries, finished_item_row): diff --git a/erpnext/patches/v13_0/change_default_item_manufacturer_fieldtype.py b/erpnext/patches/v13_0/change_default_item_manufacturer_fieldtype.py new file mode 100644 index 0000000000..0b00188e6a --- /dev/null +++ b/erpnext/patches/v13_0/change_default_item_manufacturer_fieldtype.py @@ -0,0 +1,16 @@ +import frappe + + +def execute(): + + # Erase all default item manufacturers that dont exist. + item = frappe.qb.DocType("Item") + manufacturer = frappe.qb.DocType("Manufacturer") + + ( + frappe.qb.update(item) + .set(item.default_item_manufacturer, None) + .left_join(manufacturer) + .on(item.default_item_manufacturer == manufacturer.name) + .where(manufacturer.name.isnull() & item.default_item_manufacturer.isnotnull()) + ).run() diff --git a/erpnext/patches/v13_0/convert_to_website_item_in_item_card_group_template.py b/erpnext/patches/v13_0/convert_to_website_item_in_item_card_group_template.py index 020521d5b9..1bac0fdbf0 100644 --- a/erpnext/patches/v13_0/convert_to_website_item_in_item_card_group_template.py +++ b/erpnext/patches/v13_0/convert_to_website_item_in_item_card_group_template.py @@ -56,8 +56,5 @@ def make_new_website_item(item: str) -> Union[str, None]: web_item = make_website_item(doc) # returns [website_item.name, item_name] return web_item[0] except Exception: - title = f"{item}: Error while converting to Website Item " - frappe.log_error( - title + "for Item Card Group Template" + "\n\n" + frappe.get_traceback(), title=title - ) + doc.log_error("Website Item creation failed") return None diff --git a/erpnext/patches/v13_0/create_accounting_dimensions_in_orders.py b/erpnext/patches/v13_0/create_accounting_dimensions_in_orders.py new file mode 100644 index 0000000000..8a3f1d0a58 --- /dev/null +++ b/erpnext/patches/v13_0/create_accounting_dimensions_in_orders.py @@ -0,0 +1,39 @@ +import frappe +from frappe.custom.doctype.custom_field.custom_field import create_custom_field + + +def execute(): + accounting_dimensions = frappe.db.get_all( + "Accounting Dimension", fields=["fieldname", "label", "document_type", "disabled"] + ) + + if not accounting_dimensions: + return + + count = 1 + for d in accounting_dimensions: + + if count % 2 == 0: + insert_after_field = "dimension_col_break" + else: + insert_after_field = "accounting_dimensions_section" + + for doctype in ["Purchase Order", "Purchase Receipt", "Sales Order"]: + + field = frappe.db.get_value("Custom Field", {"dt": doctype, "fieldname": d.fieldname}) + + if field: + continue + + df = { + "fieldname": d.fieldname, + "label": d.label, + "fieldtype": "Link", + "options": d.document_type, + "insert_after": insert_after_field, + } + + create_custom_field(doctype, df, ignore_validate=False) + frappe.clear_cache(doctype=doctype) + + count += 1 diff --git a/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py b/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py index 492e0403ec..6c64ef6559 100644 --- a/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py +++ b/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py @@ -40,7 +40,10 @@ def execute(): ) if purchase_invoices + sales_invoices: - frappe.log_error(json.dumps(purchase_invoices + sales_invoices, indent=2), title="Patch Log") + frappe.log_error( + "Fix invalid gain / loss patch log", + message=json.dumps(purchase_invoices + sales_invoices, indent=2), + ) acc_frozen_upto = frappe.db.get_value("Accounts Settings", None, "acc_frozen_upto") if acc_frozen_upto: diff --git a/erpnext/patches/v14_0/delete_education_doctypes.py b/erpnext/patches/v14_0/delete_education_doctypes.py new file mode 100644 index 0000000000..76b2300fd2 --- /dev/null +++ b/erpnext/patches/v14_0/delete_education_doctypes.py @@ -0,0 +1,55 @@ +import click +import frappe + + +def execute(): + if "education" in frappe.get_installed_apps(): + return + + frappe.delete_doc("Workspace", "Education", ignore_missing=True, force=True) + + pages = frappe.get_all("Page", {"module": "education"}, pluck="name") + for page in pages: + frappe.delete_doc("Page", page, ignore_missing=True, force=True) + + reports = frappe.get_all("Report", {"module": "education", "is_standard": "Yes"}, pluck="name") + for report in reports: + frappe.delete_doc("Report", report, ignore_missing=True, force=True) + + print_formats = frappe.get_all( + "Print Format", {"module": "education", "standard": "Yes"}, pluck="name" + ) + for print_format in print_formats: + frappe.delete_doc("Print Format", print_format, ignore_missing=True, force=True) + + frappe.reload_doc("website", "doctype", "website_settings") + forms = frappe.get_all("Web Form", {"module": "education", "is_standard": 1}, pluck="name") + for form in forms: + frappe.delete_doc("Web Form", form, ignore_missing=True, force=True) + + dashboards = frappe.get_all("Dashboard", {"module": "education", "is_standard": 1}, pluck="name") + for dashboard in dashboards: + frappe.delete_doc("Dashboard", dashboard, ignore_missing=True, force=True) + + dashboards = frappe.get_all( + "Dashboard Chart", {"module": "education", "is_standard": 1}, pluck="name" + ) + for dashboard in dashboards: + frappe.delete_doc("Dashboard Chart", dashboard, ignore_missing=True, force=True) + + frappe.reload_doc("desk", "doctype", "number_card") + cards = frappe.get_all("Number Card", {"module": "education", "is_standard": 1}, pluck="name") + for card in cards: + frappe.delete_doc("Number Card", card, ignore_missing=True, force=True) + + doctypes = frappe.get_all("DocType", {"module": "education", "custom": 0}, pluck="name") + for doctype in doctypes: + frappe.delete_doc("DocType", doctype, ignore_missing=True) + + frappe.delete_doc("Module Def", "Education", ignore_missing=True, force=True) + + click.secho( + "Education Module is moved to a separate app" + "Please install the app to continue using the module: https://github.com/frappe/education", + fg="yellow", + ) diff --git a/erpnext/patches/v14_0/discount_accounting_separation.py b/erpnext/patches/v14_0/discount_accounting_separation.py index fd498052d8..0d1349a320 100644 --- a/erpnext/patches/v14_0/discount_accounting_separation.py +++ b/erpnext/patches/v14_0/discount_accounting_separation.py @@ -2,8 +2,10 @@ import frappe def execute(): - doc = frappe.get_doc("Accounts Settings") - discount_account = doc.enable_discount_accounting + data = frappe.db.sql( + 'select value from tabSingles where doctype="Accounts Settings" and field="enable_discount_accounting"' + ) + discount_account = data and int(data[0][0]) or 0 if discount_account: for doctype in ["Buying Settings", "Selling Settings"]: frappe.db.set_value(doctype, doctype, "enable_discount_accounting", 1, update_modified=False) diff --git a/erpnext/patches/v14_0/rename_ongoing_status_in_sla_documents.py b/erpnext/patches/v14_0/rename_ongoing_status_in_sla_documents.py index 2eb6becb09..8ea96abd30 100644 --- a/erpnext/patches/v14_0/rename_ongoing_status_in_sla_documents.py +++ b/erpnext/patches/v14_0/rename_ongoing_status_in_sla_documents.py @@ -18,4 +18,4 @@ def execute(): ).run() except Exception: - frappe.log_error(title="Failed to Patch SLA Status") + frappe.log_error("Failed to Patch SLA Status") diff --git a/erpnext/payroll/doctype/salary_slip/salary_slip.py b/erpnext/payroll/doctype/salary_slip/salary_slip.py index 192232949a..6a7f72b013 100644 --- a/erpnext/payroll/doctype/salary_slip/salary_slip.py +++ b/erpnext/payroll/doctype/salary_slip/salary_slip.py @@ -375,13 +375,19 @@ class SalarySlip(TransactionBase): if joining_date and (getdate(self.start_date) < joining_date <= getdate(self.end_date)): start_date = joining_date unmarked_days = self.get_unmarked_days_based_on_doj_or_relieving( - unmarked_days, include_holidays_in_total_working_days, self.start_date, joining_date + unmarked_days, + include_holidays_in_total_working_days, + self.start_date, + add_days(joining_date, -1), ) if relieving_date and (getdate(self.start_date) <= relieving_date < getdate(self.end_date)): end_date = relieving_date unmarked_days = self.get_unmarked_days_based_on_doj_or_relieving( - unmarked_days, include_holidays_in_total_working_days, relieving_date, self.end_date + unmarked_days, + include_holidays_in_total_working_days, + add_days(relieving_date, 1), + self.end_date, ) # exclude days for which attendance has been marked @@ -407,10 +413,10 @@ class SalarySlip(TransactionBase): from erpnext.hr.doctype.employee.employee import is_holiday if include_holidays_in_total_working_days: - unmarked_days -= date_diff(end_date, start_date) + unmarked_days -= date_diff(end_date, start_date) + 1 else: # exclude only if not holidays - for days in range(date_diff(end_date, start_date)): + for days in range(date_diff(end_date, start_date) + 1): date = add_days(end_date, -days) if not is_holiday(self.employee, date): unmarked_days -= 1 diff --git a/erpnext/payroll/doctype/salary_slip/test_salary_slip.py b/erpnext/payroll/doctype/salary_slip/test_salary_slip.py index 869ea83f27..1bc3741922 100644 --- a/erpnext/payroll/doctype/salary_slip/test_salary_slip.py +++ b/erpnext/payroll/doctype/salary_slip/test_salary_slip.py @@ -128,6 +128,72 @@ class TestSalarySlip(unittest.TestCase): }, ) def test_payment_days_for_mid_joinee_including_holidays(self): + no_of_days = self.get_no_of_days() + month_start_date, month_end_date = get_first_day(nowdate()), get_last_day(nowdate()) + + new_emp_id = make_employee("test_payment_days_based_on_joining_date@salary.com") + joining_date, relieving_date = add_days(month_start_date, 3), add_days(month_end_date, -5) + + for days in range(date_diff(month_end_date, month_start_date) + 1): + date = add_days(month_start_date, days) + mark_attendance(new_emp_id, date, "Present", ignore_validate=True) + + # Case 1: relieving in mid month + frappe.db.set_value( + "Employee", + new_emp_id, + {"date_of_joining": month_start_date, "relieving_date": relieving_date, "status": "Active"}, + ) + + new_ss = make_employee_salary_slip( + "test_payment_days_based_on_joining_date@salary.com", + "Monthly", + "Test Payment Based On Attendence", + ) + self.assertEqual(new_ss.payment_days, no_of_days[0] - 5) + + # Case 2: joining in mid month + frappe.db.set_value( + "Employee", + new_emp_id, + {"date_of_joining": joining_date, "relieving_date": month_end_date, "status": "Active"}, + ) + + frappe.delete_doc("Salary Slip", new_ss.name, force=True) + new_ss = make_employee_salary_slip( + "test_payment_days_based_on_joining_date@salary.com", + "Monthly", + "Test Payment Based On Attendence", + ) + self.assertEqual(new_ss.payment_days, no_of_days[0] - 3) + + # Case 3: joining and relieving in mid-month + frappe.db.set_value( + "Employee", + new_emp_id, + {"date_of_joining": joining_date, "relieving_date": relieving_date, "status": "Left"}, + ) + + frappe.delete_doc("Salary Slip", new_ss.name, force=True) + new_ss = make_employee_salary_slip( + "test_payment_days_based_on_joining_date@salary.com", + "Monthly", + "Test Payment Based On Attendence", + ) + + self.assertEqual(new_ss.total_working_days, no_of_days[0]) + self.assertEqual(new_ss.payment_days, no_of_days[0] - 8) + + @change_settings( + "Payroll Settings", + { + "payroll_based_on": "Attendance", + "consider_unmarked_attendance_as": "Absent", + "include_holidays_in_total_working_days": True, + }, + ) + def test_payment_days_for_mid_joinee_including_holidays_and_unmarked_days(self): + # tests mid month joining and relieving along with unmarked days from erpnext.hr.doctype.holiday_list.holiday_list import is_holiday no_of_days = self.get_no_of_days() @@ -135,12 +201,6 @@ class TestSalarySlip(unittest.TestCase): new_emp_id = make_employee("test_payment_days_based_on_joining_date@salary.com") joining_date, relieving_date = add_days(month_start_date, 3), add_days(month_end_date, -5) - frappe.db.set_value( - "Employee", - new_emp_id, - {"date_of_joining": joining_date, "relieving_date": relieving_date, "status": "Left"}, - ) - holidays = 0 for days in range(date_diff(relieving_date, joining_date) + 1): @@ -150,6 +210,12 @@ class TestSalarySlip(unittest.TestCase): else: holidays += 1 + frappe.db.set_value( + "Employee", + new_emp_id, + {"date_of_joining": joining_date, "relieving_date": relieving_date, "status": "Left"}, + ) + new_ss = make_employee_salary_slip( "test_payment_days_based_on_joining_date@salary.com", "Monthly", diff --git a/erpnext/payroll/doctype/salary_structure/salary_structure.js b/erpnext/payroll/doctype/salary_structure/salary_structure.js index d5c20dce6b..7853b4860e 100755 --- a/erpnext/payroll/doctype/salary_structure/salary_structure.js +++ b/erpnext/payroll/doctype/salary_structure/salary_structure.js @@ -164,6 +164,15 @@ frappe.ui.form.on('Salary Structure', { primary_action_label: __('Assign') }); + d.fields_dict.grade.df.onchange = function() { + const grade = d.fields_dict.grade.value; + if (grade) { + frappe.db.get_value('Employee Grade', grade, 'default_base_pay') + .then(({ message }) => { + d.set_value('base', message.default_base_pay); + }); + } + }; d.show(); }, diff --git a/erpnext/payroll/doctype/salary_structure/test_salary_structure.py b/erpnext/payroll/doctype/salary_structure/test_salary_structure.py index 2eb16711b1..e9b5ed2261 100644 --- a/erpnext/payroll/doctype/salary_structure/test_salary_structure.py +++ b/erpnext/payroll/doctype/salary_structure/test_salary_structure.py @@ -4,6 +4,7 @@ import unittest import frappe +from frappe.tests.utils import FrappeTestCase from frappe.utils import add_years, date_diff, get_first_day, nowdate from frappe.utils.make_random import get_random @@ -23,7 +24,7 @@ from erpnext.payroll.doctype.salary_structure.salary_structure import make_salar test_dependencies = ["Fiscal Year"] -class TestSalaryStructure(unittest.TestCase): +class TestSalaryStructure(FrappeTestCase): def setUp(self): for dt in ["Salary Slip", "Salary Structure", "Salary Structure Assignment"]: frappe.db.sql("delete from `tab%s`" % dt) @@ -132,6 +133,23 @@ class TestSalaryStructure(unittest.TestCase): self.assertEqual(salary_structure_assignment.base, 5000) self.assertEqual(salary_structure_assignment.variable, 200) + def test_employee_grade_defaults(self): + salary_structure = make_salary_structure( + "Salary Structure - Lead", "Monthly", currency="INR", company="_Test Company" + ) + create_employee_grade("Lead", salary_structure.name) + employee = make_employee("test_employee_grade@salary.com", company="_Test Company", grade="Lead") + + # structure assignment should have the default salary structure and base pay + salary_structure.assign_salary_structure(employee=employee, from_date=nowdate()) + structure, base = frappe.db.get_value( + "Salary Structure Assignment", + {"employee": employee, "salary_structure": salary_structure.name, "from_date": nowdate()}, + ["salary_structure", "base"], + ) + self.assertEqual(structure, salary_structure.name) + self.assertEqual(base, 50000) + def test_multi_currency_salary_structure(self): make_employee("test_muti_currency_employee@salary.com") sal_struct = make_salary_structure("Salary Structure Multi Currency", "Monthly", currency="USD") @@ -251,3 +269,15 @@ def get_payable_account(company=None): if not company: company = erpnext.get_default_company() return frappe.db.get_value("Company", company, "default_payroll_payable_account") + + +def create_employee_grade(grade, default_structure=None): + if not frappe.db.exists("Employee Grade", grade): + frappe.get_doc( + { + "doctype": "Employee Grade", + "__newname": grade, + "default_salary_structure": default_structure, + "default_base_pay": 50000, + } + ).insert() diff --git a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.json b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.json index 613246e732..91d49a0738 100644 --- a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.json +++ b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.json @@ -10,6 +10,7 @@ "employee", "employee_name", "department", + "grade", "company", "payroll_payable_account", "column_break_6", @@ -67,6 +68,8 @@ "fieldtype": "Column Break" }, { + "fetch_from": "grade.default_salary_structure", + "fetch_if_empty": 1, "fieldname": "salary_structure", "fieldtype": "Link", "in_list_view": 1, @@ -96,6 +99,8 @@ "label": "Base & Variable" }, { + "fetch_from": "grade.default_base_pay", + "fetch_if_empty": 1, "fieldname": "base", "fieldtype": "Currency", "label": "Base", @@ -158,11 +163,19 @@ "fieldtype": "Table", "label": "Cost Centers", "options": "Employee Cost Center" + }, + { + "fetch_from": "employee.grade", + "fieldname": "grade", + "fieldtype": "Link", + "label": "Grade", + "options": "Employee Grade", + "read_only": 1 } ], "is_submittable": 1, "links": [], - "modified": "2022-01-19 12:43:54.439073", + "modified": "2022-05-06 12:18:36.972336", "modified_by": "Administrator", "module": "Payroll", "name": "Salary Structure Assignment", diff --git a/erpnext/portal/utils.py b/erpnext/portal/utils.py index 09d100708e..7be8c5df18 100644 --- a/erpnext/portal/utils.py +++ b/erpnext/portal/utils.py @@ -23,10 +23,6 @@ def set_default_role(doc, method): doc.add_roles("Customer") elif link.link_doctype == "Supplier" and "Supplier" not in roles: doc.add_roles("Supplier") - elif frappe.get_value("Student", dict(student_email_id=doc.email)) and "Student" not in roles: - doc.add_roles("Student") - elif frappe.get_value("Guardian", dict(email_address=doc.email)) and "Guardian" not in roles: - doc.add_roles("Guardian") def create_customer_or_supplier(): diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 29f1ce455e..8a8e1d1bf5 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -9,9 +9,9 @@ from frappe.desk.reportview import get_match_cond from frappe.model.document import Document from frappe.utils import add_days, flt, get_datetime, get_time, get_url, nowtime, today +from erpnext import get_default_company from erpnext.controllers.employee_boarding_controller import update_employee_boarding_status from erpnext.controllers.queries import get_filters_cond -from erpnext.education.doctype.student_attendance.student_attendance import get_holiday_list from erpnext.hr.doctype.daily_work_summary.daily_work_summary import get_users_email from erpnext.hr.doctype.holiday_list.holiday_list import is_holiday @@ -86,6 +86,7 @@ class Project(Document): type=task_details.type, issue=task_details.issue, is_group=task_details.is_group, + color=task_details.color, ) ).insert() @@ -665,3 +666,17 @@ def set_project_status(project, status): project.status = status project.save() + + +def get_holiday_list(company=None): + if not company: + company = get_default_company() or frappe.get_all("Company")[0].name + + holiday_list = frappe.get_cached_value("Company", company, "default_holiday_list") + if not holiday_list: + frappe.throw( + _("Please set a default Holiday List for Company {0}").format( + frappe.bold(get_default_company()) + ) + ) + return holiday_list diff --git a/erpnext/public/js/education/assessment_result_tool.html b/erpnext/public/js/education/assessment_result_tool.html deleted file mode 100644 index f7d1ab39fc..0000000000 --- a/erpnext/public/js/education/assessment_result_tool.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - {% for c in criteria %} - - {% endfor %} - - - - - - {% for c in criteria %} - - {% endfor %} - - - - - {% for s in students %} - - - - - {% for c in criteria %} - - {% endfor %} - - - {% endfor %} - -
StudentStudent Name{{ c.assessment_criteria }}CommentsTotal Marks
Score ({{ c.maximum_score }})Score ({{max_total_score}})
{{ s.student }}{{ s.student_name }} - - {% if(s.assessment_details) { %} - {{s.assessment_details[c.assessment_criteria][1]}} - {% } %} - - - - - - - {% if(s.assessment_details) { %} - {{s.assessment_details.total_score[1]}} - {% } %} - - - {% if(s.assessment_details) { %} - {{s.assessment_details.total_score[0]}} - {% } %} - - - - - - -
diff --git a/erpnext/public/js/education/lms/quiz.js b/erpnext/public/js/education/lms/quiz.js deleted file mode 100644 index 66160a7610..0000000000 --- a/erpnext/public/js/education/lms/quiz.js +++ /dev/null @@ -1,238 +0,0 @@ -class Quiz { - constructor(wrapper, options) { - this.wrapper = wrapper; - Object.assign(this, options); - this.questions = [] - this.refresh(); - } - - refresh() { - this.get_quiz(); - } - - get_quiz() { - frappe.call('erpnext.education.utils.get_quiz', { - quiz_name: this.name, - course: this.course - }).then(res => { - this.make(res.message) - }); - } - - make(data) { - if (data.is_time_bound) { - $(".lms-timer").removeClass("hide"); - if (!data.activity || (data.activity && !data.activity.is_complete)) { - this.initialiseTimer(data.duration); - this.is_time_bound = true; - this.time_taken = 0; - } - } - data.questions.forEach(question_data => { - let question_wrapper = document.createElement('div'); - let question = new Question({ - wrapper: question_wrapper, - ...question_data - }); - this.questions.push(question) - this.wrapper.appendChild(question_wrapper); - }) - if (data.activity && data.activity.is_complete) { - this.disable() - let indicator = 'red' - let message = 'Your are not allowed to attempt the quiz again.' - if (data.activity.result == 'Pass') { - indicator = 'green' - message = 'You have already cleared the quiz.' - } - if (data.activity.time_taken) { - this.calculate_and_display_time(data.activity.time_taken, "Time Taken - "); - } - this.set_quiz_footer(message, indicator, data.activity.score) - } - else { - this.make_actions(); - } - window.addEventListener('beforeunload', (event) => { - event.preventDefault(); - event.returnValue = ''; - }); - } - - initialiseTimer(duration) { - this.time_left = duration; - var self = this; - var old_diff; - this.calculate_and_display_time(this.time_left, "Time Left - "); - this.start_time = new Date().getTime(); - this.timer = setInterval(function () { - var diff = (new Date().getTime() - self.start_time)/1000; - var variation = old_diff ? diff - old_diff : diff; - old_diff = diff; - self.time_left -= variation; - self.time_taken += variation; - self.calculate_and_display_time(self.time_left, "Time Left - "); - if (self.time_left <= 0) { - clearInterval(self.timer); - self.time_taken -= 1; - self.submit(); - } - }, 1000); - } - - calculate_and_display_time(second, text) { - var timer_display = document.getElementsByClassName("lms-timer")[0]; - var hours = this.append_zero(Math.floor(second / 3600)); - var minutes = this.append_zero(Math.floor(second % 3600 / 60)); - var seconds = this.append_zero(Math.ceil(second % 3600 % 60)); - timer_display.innerText = text + hours + ":" + minutes + ":" + seconds; - } - - append_zero(time) { - return time > 9 ? time : "0" + time; - } - - make_actions() { - const button = document.createElement("button"); - button.classList.add("btn", "btn-primary", "mt-5", "mr-2"); - - button.id = 'submit-button'; - button.innerText = 'Submit'; - button.onclick = () => this.submit(); - this.submit_btn = button - this.wrapper.appendChild(button); - } - - submit() { - if (this.is_time_bound) { - clearInterval(this.timer); - $(".lms-timer").text(""); - } - this.submit_btn.innerText = 'Evaluating..' - this.submit_btn.disabled = true - this.disable() - frappe.call('erpnext.education.utils.evaluate_quiz', { - quiz_name: this.name, - quiz_response: this.get_selected(), - course: this.course, - program: this.program, - time_taken: this.is_time_bound ? this.time_taken : 0 - }).then(res => { - this.submit_btn.remove() - if (!res.message) { - frappe.throw(__("Something went wrong while evaluating the quiz.")) - } - - let indicator = 'red' - let message = 'Fail' - if (res.message.status == 'Pass') { - indicator = 'green' - message = 'Congratulations, you cleared the quiz.' - } - - this.set_quiz_footer(message, indicator, res.message.score) - }); - } - - set_quiz_footer(message, indicator, score) { - const div = document.createElement("div"); - div.classList.add("mt-5"); - div.innerHTML = `
-
-

${message}

-
Score: ${score}/100
-
- -
` - - this.wrapper.appendChild(div) - } - - disable() { - this.questions.forEach(que => que.disable()) - } - - get_selected() { - let que = {} - this.questions.forEach(question => { - que[question.name] = question.get_selected() - }) - return que - } -} - -class Question { - constructor(opts) { - Object.assign(this, opts); - this.make(); - } - - make() { - this.make_question() - this.make_options() - } - - get_selected() { - let selected = this.options.filter(opt => opt.input.checked) - if (this.type == 'Single Correct Answer') { - if (selected[0]) return selected[0].name - } - if (this.type == 'Multiple Correct Answer') { - return selected.map(opt => opt.name) - } - return null - } - - disable() { - let selected = this.options.forEach(opt => opt.input.disabled = true) - } - - make_question() { - let question_wrapper = document.createElement('h5'); - question_wrapper.classList.add('mt-3'); - question_wrapper.innerHTML = this.question; - this.wrapper.appendChild(question_wrapper); - } - - make_options() { - let make_input = (name, value) => { - let input = document.createElement('input'); - input.id = name; - input.name = this.name; - input.value = value; - input.type = 'radio'; - if (this.type == 'Multiple Correct Answer') - input.type = 'checkbox'; - input.classList.add('form-check-input'); - return input; - } - - let make_label = function (name, value) { - let label = document.createElement('label'); - label.classList.add('form-check-label'); - label.htmlFor = name; - label.innerText = value; - return label - } - - let make_option = function (wrapper, option) { - let option_div = document.createElement('div'); - option_div.classList.add('form-check', 'pb-1'); - let input = make_input(option.name, option.option); - let label = make_label(option.name, option.option); - option_div.appendChild(input); - option_div.appendChild(label); - wrapper.appendChild(option_div); - return { input: input, ...option }; - } - - let options_wrapper = document.createElement('div') - options_wrapper.classList.add('ml-2') - let option_list = [] - this.options.forEach(opt => option_list.push(make_option(options_wrapper, opt))) - this.options = option_list - this.wrapper.appendChild(options_wrapper) - } -} diff --git a/erpnext/public/js/erpnext.bundle.js b/erpnext/public/js/erpnext.bundle.js index 3baf66784f..3dae6d407b 100644 --- a/erpnext/public/js/erpnext.bundle.js +++ b/erpnext/public/js/erpnext.bundle.js @@ -16,7 +16,6 @@ import "./templates/item_quick_entry.html"; import "./utils/item_quick_entry"; import "./utils/customer_quick_entry"; import "./utils/supplier_quick_entry"; -import "./education/assessment_result_tool.html"; import "./call_popup/call_popup"; import "./utils/dimension_tree_filter"; import "./utils/barcode_scanner"; diff --git a/erpnext/public/js/setup_wizard.js b/erpnext/public/js/setup_wizard.js index 83b69aebc5..9288f515cd 100644 --- a/erpnext/public/js/setup_wizard.js +++ b/erpnext/public/js/setup_wizard.js @@ -12,37 +12,6 @@ frappe.setup.on("before_load", function () { }); erpnext.setup.slides_settings = [ - { - // Domain - name: 'domain', - title: __('Select your Domains'), - fields: [ - { - fieldname: 'domains', - label: __('Domains'), - fieldtype: 'MultiCheck', - options: [ - { "label": __("Distribution"), "value": "Distribution" }, - { "label": __("Education"), "value": "Education" }, - { "label": __("Manufacturing"), "value": "Manufacturing" }, - { "label": __("Retail"), "value": "Retail" }, - { "label": __("Services"), "value": "Services" }, - { "label": __("Healthcare (beta)"), "value": "Healthcare" }, - { "label": __("Non Profit (beta)"), "value": "Non Profit" } - ], reqd: 1 - }, - ], - // help: __('Select the nature of your business.'), - validate: function () { - if (this.values.domains.length === 0) { - frappe.msgprint(__("Please select at least one domain.")); - return false; - } - frappe.setup.domains = this.values.domains; - return true; - }, - }, - { // Brand name: 'brand', @@ -59,15 +28,13 @@ erpnext.setup.slides_settings = [ }, { fieldname: 'company_name', - label: frappe.setup.domains.includes('Education') ? - __('Institute Name') : __('Company Name'), + label: __('Company Name'), fieldtype: 'Data', reqd: 1 }, { fieldname: 'company_abbr', - label: frappe.setup.domains.includes('Education') ? - __('Institute Abbreviation') : __('Company Abbreviation'), + label: __('Company Abbreviation'), fieldtype: 'Data' } ], @@ -107,17 +74,12 @@ erpnext.setup.slides_settings = [ name: 'organisation', title: __("Your Organization"), icon: "fa fa-building", - // help: frappe.setup.domains.includes('Education') ? - // __('The name of the institute for which you are setting up this system.') : - // __('The name of your company for which you are setting up this system.')), fields: [ { fieldname: 'company_tagline', label: __('What does it do?'), fieldtype: 'Data', - placeholder: frappe.setup.domains.includes('Education') ? - __('e.g. "Primary School" or "University"') : - __('e.g. "Build tools for builders"'), + placeholder: __('e.g. "Build tools for builders"'), reqd: 1 }, { fieldname: 'bank_account', label: __('Bank Name'), fieldtype: 'Data', reqd: 1 }, diff --git a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py index 77c4d7c6ca..34701c140d 100644 --- a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py +++ b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py @@ -160,7 +160,7 @@ def get_file_content(file_name, zip_file_object): try: content = encoded_content.decode("utf-16") except UnicodeDecodeError as e: - frappe.log_error(message=e, title="UTF-16 encoding error for File Name: " + file_name) + frappe.log_error("UTF-16 encoding error for File Name: " + file_name) return content @@ -390,9 +390,7 @@ def create_purchase_invoice(supplier_name, file_name, args, name): return pi.name except Exception as e: frappe.db.set_value("Import Supplier Invoice", name, "status", "Error") - frappe.log_error( - message=e, title="Create Purchase Invoice: " + args.get("bill_no") + "File Name: " + file_name - ) + pi.log_error("Unable to create Puchase Invoice") return None diff --git a/erpnext/regional/india/e_invoice/einvoice.js b/erpnext/regional/india/e_invoice/einvoice.js index 17b018c65b..763e65784a 100644 --- a/erpnext/regional/india/e_invoice/einvoice.js +++ b/erpnext/regional/india/e_invoice/einvoice.js @@ -99,8 +99,21 @@ erpnext.setup_einvoice_actions = (doctype) => { ...data }, freeze: true, - callback: () => frm.reload_doc() || d.hide(), - error: () => d.hide() + callback: () => { + frappe.show_alert({ + message: __('E-Way Bill Generated successfully'), + indicator: 'green' + }, 7); + frm.reload_doc(); + d.hide(); + }, + error: () => { + frappe.show_alert({ + message: __('E-Way Bill was not Generated'), + indicator: 'red' + }, 7); + d.hide(); + } }); }, primary_action_label: __('Submit') @@ -136,27 +149,58 @@ erpnext.setup_einvoice_actions = (doctype) => { } if (irn && ewaybill && !irn_cancelled && !eway_bill_cancelled) { + const fields = [ + { + "label": "Reason", + "fieldname": "reason", + "fieldtype": "Select", + "reqd": 1, + "default": "1-Duplicate", + "options": ["1-Duplicate", "2-Data Entry Error", "3-Order Cancelled", "4-Other"] + }, + { + "label": "Remark", + "fieldname": "remark", + "fieldtype": "Data", + "reqd": 1 + } + ]; const action = () => { - let message = __('Cancellation of e-way bill is currently not supported.') + ' '; - message += '

'; - message += __('You must first use the portal to cancel the e-way bill and then update the cancelled status in the ERPNext system.'); - - const dialog = frappe.msgprint({ - title: __('Update E-Way Bill Cancelled Status?'), - message: message, - indicator: 'orange', - primary_action: { - action: function() { - frappe.call({ - method: 'erpnext.regional.india.e_invoice.utils.cancel_eway_bill', - args: { doctype, docname: name }, - freeze: true, - callback: () => frm.reload_doc() || dialog.hide() - }); - } + const d = new frappe.ui.Dialog({ + title: __('Cancel E-Way Bill'), + fields: fields, + primary_action: function() { + const data = d.get_values(); + frappe.call({ + method: 'erpnext.regional.india.e_invoice.utils.cancel_eway_bill', + args: { + doctype, + docname: name, + eway_bill: ewaybill, + reason: data.reason.split('-')[0], + remark: data.remark + }, + freeze: true, + callback: () => { + frappe.show_alert({ + message: __('E-Way Bill Cancelled successfully'), + indicator: 'green' + }, 7); + frm.reload_doc(); + d.hide(); + }, + error: () => { + frappe.show_alert({ + message: __('E-Way Bill was not Cancelled'), + indicator: 'red' + }, 7); + d.hide(); + } + }); }, - primary_action_label: __('Yes') + primary_action_label: __('Submit') }); + d.show(); }; add_custom_button(__("Cancel E-Way Bill"), action); } @@ -202,7 +246,8 @@ const get_ewaybill_fields = (frm) => { 'fieldname': 'distance', 'label': 'Distance (in km)', 'fieldtype': 'Float', - 'default': frm.doc.distance + 'default': frm.doc.distance, + 'description': 'Set as zero to auto calculate distance using pin codes', }, { 'fieldname': 'transporter_col_break', diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py index 0f73c5f9bc..53d3211d3b 100644 --- a/erpnext/regional/india/e_invoice/utils.py +++ b/erpnext/regional/india/e_invoice/utils.py @@ -57,6 +57,7 @@ def validate_eligibility(doc): invalid_company = not frappe.db.get_value("E Invoice User", {"company": doc.get("company")}) invalid_supply_type = doc.get("gst_category") not in [ "Registered Regular", + "Registered Composition", "SEZ", "Overseas", "Deemed Export", @@ -124,24 +125,33 @@ def read_json(name): def get_transaction_details(invoice): supply_type = "" - if invoice.gst_category == "Registered Regular": + if ( + invoice.gst_category == "Registered Regular" or invoice.gst_category == "Registered Composition" + ): supply_type = "B2B" elif invoice.gst_category == "SEZ": - supply_type = "SEZWOP" + if invoice.export_type == "Without Payment of Tax": + supply_type = "SEZWOP" + else: + supply_type = "SEZWP" elif invoice.gst_category == "Overseas": - supply_type = "EXPWOP" + if invoice.export_type == "Without Payment of Tax": + supply_type = "EXPWOP" + else: + supply_type = "EXPWP" elif invoice.gst_category == "Deemed Export": supply_type = "DEXP" if not supply_type: - rr, sez, overseas, export = ( + rr, rc, sez, overseas, export = ( bold("Registered Regular"), + bold("Registered Composition"), bold("SEZ"), bold("Overseas"), bold("Deemed Export"), ) frappe.throw( - _("GST category should be one of {}, {}, {}, {}").format(rr, sez, overseas, export), + _("GST category should be one of {}, {}, {}, {}, {}").format(rr, rc, sez, overseas, export), title=_("Invalid Supply Type"), ) @@ -433,7 +443,7 @@ def get_eway_bill_details(invoice): dict( gstin=invoice.gst_transporter_id, name=invoice.transporter_name, - mode_of_transport=mode_of_transport[invoice.mode_of_transport], + mode_of_transport=mode_of_transport[invoice.mode_of_transport or ""] or None, distance=invoice.distance or 0, document_name=invoice.lr_no, document_date=format_date(invoice.lr_date, "dd/mm/yyyy"), @@ -782,7 +792,7 @@ class GSPConnector: self.irn_details_url = self.base_url + "/enriched/ei/api/invoice/irn" self.generate_irn_url = self.base_url + "/enriched/ei/api/invoice" self.gstin_details_url = self.base_url + "/enriched/ei/api/master/gstin" - self.cancel_ewaybill_url = self.base_url + "/enriched/ewb/ewayapi?action=CANEWB" + self.cancel_ewaybill_url = self.base_url + "/enriched/ei/api/ewayapi" self.generate_ewaybill_url = self.base_url + "/enriched/ei/api/ewaybill" def set_invoice(self): @@ -1103,6 +1113,19 @@ class GSPConnector: self.invoice.eway_bill_validity = res.get("result").get("EwbValidTill") self.invoice.eway_bill_cancelled = 0 self.invoice.update(args) + if res.get("info"): + info = res.get("info") + # when we have more features (responses) in eway bill, we can add them using below forloop. + for msg in info: + if msg.get("InfCd") == "EWBPPD": + pin_to_pin_distance = int(re.search(r"\d+", msg.get("Desc")).group()) + frappe.msgprint( + _("Auto Calculated Distance is {} KM.").format(str(pin_to_pin_distance)), + title="Notification", + indicator="green", + alert=True, + ) + self.invoice.distance = flt(pin_to_pin_distance) self.invoice.flags.updater_reference = { "doctype": self.invoice.doctype, "docname": self.invoice.name, @@ -1125,7 +1148,6 @@ class GSPConnector: headers = self.get_headers() data = json.dumps({"ewbNo": eway_bill, "cancelRsnCode": reason, "cancelRmrk": remark}, indent=4) headers["username"] = headers["user_name"] - del headers["user_name"] try: res = self.make_request("post", self.cancel_ewaybill_url, headers, data) if res.get("success"): @@ -1290,13 +1312,9 @@ def generate_eway_bill(doctype, docname, **kwargs): @frappe.whitelist() -def cancel_eway_bill(doctype, docname): - # TODO: uncomment when eway_bill api from Adequare is enabled - # gsp_connector = GSPConnector(doctype, docname) - # gsp_connector.cancel_eway_bill(eway_bill, reason, remark) - - frappe.db.set_value(doctype, docname, "ewaybill", "") - frappe.db.set_value(doctype, docname, "eway_bill_cancelled", 1) +def cancel_eway_bill(doctype, docname, eway_bill, reason, remark): + gsp_connector = GSPConnector(doctype, docname) + gsp_connector.cancel_eway_bill(eway_bill, reason, remark) @frappe.whitelist() diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index 062c2ef5c5..e41cd34c72 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -762,7 +762,7 @@ def get_custom_fields(): insert_after="customer", no_copy=1, print_hide=1, - depends_on='eval:in_list(["Registered Regular", "SEZ", "Overseas", "Deemed Export"], doc.gst_category) && doc.irn_cancelled === 0', + depends_on='eval:in_list(["Registered Regular", "Registered Composition", "SEZ", "Overseas", "Deemed Export"], doc.gst_category) && doc.irn_cancelled === 0', ), dict( fieldname="irn_cancelled", diff --git a/erpnext/regional/report/vat_audit_report/vat_audit_report.py b/erpnext/regional/report/vat_audit_report/vat_audit_report.py index 6e5982465c..70f2c0a333 100644 --- a/erpnext/regional/report/vat_audit_report/vat_audit_report.py +++ b/erpnext/regional/report/vat_audit_report/vat_audit_report.py @@ -95,10 +95,9 @@ class VATAuditReport(object): as_dict=1, ) for d in items: - if d.item_code not in self.invoice_items.get(d.parent, {}): - self.invoice_items.setdefault(d.parent, {}).setdefault(d.item_code, {"net_amount": 0.0}) - self.invoice_items[d.parent][d.item_code]["net_amount"] += d.get("base_net_amount", 0) - self.invoice_items[d.parent][d.item_code]["is_zero_rated"] = d.is_zero_rated + self.invoice_items.setdefault(d.parent, {}).setdefault(d.item_code, {"net_amount": 0.0}) + self.invoice_items[d.parent][d.item_code]["net_amount"] += d.get("base_net_amount", 0) + self.invoice_items[d.parent][d.item_code]["is_zero_rated"] = d.is_zero_rated def get_items_based_on_tax_rate(self, doctype): self.items_based_on_tax_rate = frappe._dict() @@ -110,7 +109,7 @@ class VATAuditReport(object): self.tax_details = frappe.db.sql( """ SELECT - parent, account_head, item_wise_tax_detail, base_tax_amount_after_discount_amount + parent, account_head, item_wise_tax_detail FROM `tab%s` WHERE @@ -123,7 +122,7 @@ class VATAuditReport(object): tuple([doctype] + list(self.invoices.keys())), ) - for parent, account, item_wise_tax_detail, tax_amount in self.tax_details: + for parent, account, item_wise_tax_detail in self.tax_details: if item_wise_tax_detail: try: if account in self.sa_vat_accounts: @@ -135,7 +134,7 @@ class VATAuditReport(object): # to skip items with non-zero tax rate in multiple rows if taxes[0] == 0 and not is_zero_rated: continue - tax_rate, item_amount_map = self.get_item_amount_map(parent, item_code, taxes) + tax_rate = self.get_item_amount_map(parent, item_code, taxes) if tax_rate is not None: rate_based_dict = self.items_based_on_tax_rate.setdefault(parent, {}).setdefault( @@ -151,16 +150,22 @@ class VATAuditReport(object): tax_rate = taxes[0] tax_amount = taxes[1] gross_amount = net_amount + tax_amount - item_amount_map = self.item_tax_rate.setdefault(parent, {}).setdefault(item_code, []) - amount_dict = { - "tax_rate": tax_rate, - "gross_amount": gross_amount, - "tax_amount": tax_amount, - "net_amount": net_amount, - } - item_amount_map.append(amount_dict) - return tax_rate, item_amount_map + self.item_tax_rate.setdefault(parent, {}).setdefault( + item_code, + { + "tax_rate": tax_rate, + "gross_amount": 0.0, + "tax_amount": 0.0, + "net_amount": 0.0, + }, + ) + + self.item_tax_rate[parent][item_code]["net_amount"] += net_amount + self.item_tax_rate[parent][item_code]["tax_amount"] += tax_amount + self.item_tax_rate[parent][item_code]["gross_amount"] += gross_amount + + return tax_rate def get_conditions(self): conditions = "" @@ -205,9 +210,10 @@ class VATAuditReport(object): for inv, inv_data in self.invoices.items(): if self.items_based_on_tax_rate.get(inv): for rate, items in self.items_based_on_tax_rate.get(inv).items(): + row = {"tax_amount": 0.0, "gross_amount": 0.0, "net_amount": 0.0} + consolidated_data_map.setdefault(rate, {"data": []}) for item in items: - row = {} item_details = self.item_tax_rate.get(inv).get(item) row["account"] = inv_data.get("account") row["posting_date"] = formatdate(inv_data.get("posting_date"), "dd-mm-yyyy") @@ -216,10 +222,11 @@ class VATAuditReport(object): row["party_type"] = "Customer" if doctype == "Sales Invoice" else "Supplier" row["party"] = inv_data.get("party") row["remarks"] = inv_data.get("remarks") - row["gross_amount"] = item_details[0].get("gross_amount") - row["tax_amount"] = item_details[0].get("tax_amount") - row["net_amount"] = item_details[0].get("net_amount") - consolidated_data_map[rate]["data"].append(row) + row["gross_amount"] += item_details.get("gross_amount") + row["tax_amount"] += item_details.get("tax_amount") + row["net_amount"] += item_details.get("net_amount") + + consolidated_data_map[rate]["data"].append(row) return consolidated_data_map diff --git a/erpnext/regional/united_arab_emirates/setup.py b/erpnext/regional/united_arab_emirates/setup.py index cc647f8519..c77fdcc142 100644 --- a/erpnext/regional/united_arab_emirates/setup.py +++ b/erpnext/regional/united_arab_emirates/setup.py @@ -244,7 +244,7 @@ def make_custom_fields(): "Supplier Quotation Item": invoice_item_fields, } - create_custom_fields(custom_fields) + create_custom_fields(custom_fields, ignore_validate=True) def add_print_formats(): diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 0b48f70eab..6b6ea89b63 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -65,7 +65,11 @@ frappe.ui.form.on("Sales Order", { frm.set_value('transaction_date', frappe.datetime.get_today()) } erpnext.queries.setup_queries(frm, "Warehouse", function() { - return erpnext.queries.warehouse(frm.doc); + return { + filters: [ + ["Warehouse", "company", "in", ["", cstr(frm.doc.company)]], + ] + }; }); frm.set_query('project', function(doc, cdt, cdn) { @@ -77,7 +81,19 @@ frappe.ui.form.on("Sales Order", { } }); - erpnext.queries.setup_warehouse_query(frm); + frm.set_query('warehouse', 'items', function(doc, cdt, cdn) { + let row = locals[cdt][cdn]; + let query = { + filters: [ + ["Warehouse", "company", "in", ["", cstr(frm.doc.company)]], + ] + }; + if (row.item_code) { + query.query = "erpnext.controllers.queries.warehouse_query"; + query.filters.push(["Bin", "item_code", "=", row.item_code]); + } + return query; + }); frm.ignore_doctypes_on_cancel_all = ['Purchase Order']; }, @@ -152,7 +168,9 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } } - this.frm.add_custom_button(__('Pick List'), () => this.create_pick_list(), __('Create')); + if (flt(doc.per_picked, 6) < 100 && flt(doc.per_delivered, 6) < 100) { + this.frm.add_custom_button(__('Pick List'), () => this.create_pick_list(), __('Create')); + } const order_is_a_sale = ["Sales", "Shopping Cart"].indexOf(doc.order_type) !== -1; const order_is_maintenance = ["Maintenance"].indexOf(doc.order_type) !== -1; diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index fe2f14e19a..ff921c721d 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -25,6 +25,10 @@ "po_no", "po_date", "tax_id", + "accounting_dimensions_section", + "cost_center", + "dimension_col_break", + "project", "contact_info", "customer_address", "address_display", @@ -113,7 +117,6 @@ "is_internal_customer", "represents_company", "inter_company_order_reference", - "project", "party_account_currency", "column_break_77", "source", @@ -1520,14 +1523,31 @@ "fieldname": "per_picked", "fieldtype": "Percent", "label": "% Picked", + "no_copy": 1, "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions" + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" } ], "icon": "fa fa-file-text", "idx": 105, "is_submittable": 1, "links": [], - "modified": "2022-03-15 21:38:31.437586", + "modified": "2022-04-26 14:38:18.350207", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index d3b4286be5..b463213f50 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -385,6 +385,16 @@ class SalesOrder(SellingController): if tot_qty != 0: self.db_set("per_delivered", flt(delivered_qty / tot_qty) * 100, update_modified=False) + def update_picking_status(self): + total_picked_qty = 0.0 + total_qty = 0.0 + for so_item in self.items: + total_picked_qty += flt(so_item.picked_qty) + total_qty += flt(so_item.stock_qty) + per_picked = total_picked_qty / total_qty * 100 + + self.db_set("per_picked", flt(per_picked), update_modified=False) + def set_indicator(self): """Set indicator for portal""" if self.per_billed < 100 and self.per_delivered < 100: @@ -1232,9 +1242,30 @@ def make_inter_company_purchase_order(source_name, target_doc=None): @frappe.whitelist() def create_pick_list(source_name, target_doc=None): - def update_item_quantity(source, target, source_parent): - target.qty = flt(source.qty) - flt(source.delivered_qty) - target.stock_qty = (flt(source.qty) - flt(source.delivered_qty)) * flt(source.conversion_factor) + from erpnext.stock.doctype.packed_item.packed_item import is_product_bundle + + def update_item_quantity(source, target, source_parent) -> None: + picked_qty = flt(source.picked_qty) / (flt(source.conversion_factor) or 1) + qty_to_be_picked = flt(source.qty) - max(picked_qty, flt(source.delivered_qty)) + + target.qty = qty_to_be_picked + target.stock_qty = qty_to_be_picked * flt(source.conversion_factor) + + def update_packed_item_qty(source, target, source_parent) -> None: + qty = flt(source.qty) + for item in source_parent.items: + if source.parent_detail_docname == item.name: + picked_qty = flt(item.picked_qty) / (flt(item.conversion_factor) or 1) + pending_percent = (item.qty - max(picked_qty, item.delivered_qty)) / item.qty + target.qty = target.stock_qty = qty * pending_percent + return + + def should_pick_order_item(item) -> bool: + return ( + abs(item.delivered_qty) < abs(item.qty) + and item.delivered_by_supplier != 1 + and not is_product_bundle(item.item_code) + ) doc = get_mapped_doc( "Sales Order", @@ -1245,8 +1276,17 @@ def create_pick_list(source_name, target_doc=None): "doctype": "Pick List Item", "field_map": {"parent": "sales_order", "name": "sales_order_item"}, "postprocess": update_item_quantity, - "condition": lambda doc: abs(doc.delivered_qty) < abs(doc.qty) - and doc.delivered_by_supplier != 1, + "condition": should_pick_order_item, + }, + "Packed Item": { + "doctype": "Pick List Item", + "field_map": { + "parent": "sales_order", + "name": "sales_order_item", + "parent_detail_docname": "product_bundle_item", + }, + "field_no_map": ["picked_qty"], + "postprocess": update_packed_item_qty, }, }, target_doc, diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index 195e96486b..3797856db2 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -803,13 +803,15 @@ { "fieldname": "picked_qty", "fieldtype": "Float", - "label": "Picked Qty" + "label": "Picked Qty (in Stock UOM)", + "no_copy": 1, + "read_only": 1 } ], "idx": 1, "istable": 1, "links": [], - "modified": "2022-03-15 20:17:33.984799", + "modified": "2022-04-27 03:15:34.366563", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", diff --git a/erpnext/selling/workspace/selling/selling.json b/erpnext/selling/workspace/selling/selling.json index a700ad89a3..45e160d143 100644 --- a/erpnext/selling/workspace/selling/selling.json +++ b/erpnext/selling/workspace/selling/selling.json @@ -5,7 +5,7 @@ "label": "Sales Order Trends" } ], - "content": "[{\"type\":\"onboarding\",\"data\":{\"onboarding_name\":\"Selling\",\"col\":12}},{\"type\":\"chart\",\"data\":{\"chart_name\":\"Sales Order Trends\",\"col\":12}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"Quick Access\",\"col\":12}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Item\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Sales Order\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Sales Analytics\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Sales Order Analysis\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Dashboard\",\"col\":3}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"Reports & Masters\",\"col\":12}},{\"type\":\"card\",\"data\":{\"card_name\":\"Selling\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Items and Pricing\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Settings\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Key Reports\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Other Reports\",\"col\":4}}]", + "content": "[{\"type\":\"onboarding\",\"data\":{\"onboarding_name\":\"Selling\",\"col\":12}},{\"type\":\"chart\",\"data\":{\"chart_name\":\"Sales Order Trends\",\"col\":12}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"Quick Access\",\"col\":12}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Item\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Sales Order\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Sales Analytics\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Sales Order Analysis\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Dashboard\",\"col\":3}},{\"type\":\"spacer\",\"data\":{\"col\":12}},{\"type\":\"header\",\"data\":{\"text\":\"Reports & Masters\",\"col\":12}},{\"type\":\"card\",\"data\":{\"card_name\":\"Selling\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Items and Pricing\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Settings\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Key Reports\",\"col\":4}},{\"type\":\"card\",\"data\":{\"card_name\":\"Other Reports\",\"col\":4}}]", "creation": "2020-01-28 11:49:12.092882", "docstatus": 0, "doctype": "Workspace", @@ -314,118 +314,11 @@ "onboard": 0, "type": "Link" }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Key Reports", - "link_count": 0, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 1, - "label": "Sales Analytics", - "link_count": 0, - "link_to": "Sales Analytics", - "link_type": "Report", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "Sales Order", - "hidden": 0, - "is_query_report": 1, - "label": "Sales Order Analysis", - "link_count": 0, - "link_to": "Sales Order Analysis", - "link_type": "Report", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Sales Funnel", - "link_count": 0, - "link_to": "sales-funnel", - "link_type": "Page", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "Sales Order", - "hidden": 0, - "is_query_report": 1, - "label": "Sales Order Trends", - "link_count": 0, - "link_to": "Sales Order Trends", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Quotation", - "hidden": 0, - "is_query_report": 1, - "label": "Quotation Trends", - "link_count": 0, - "link_to": "Quotation Trends", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Customer", - "hidden": 0, - "is_query_report": 1, - "label": "Customer Acquisition and Loyalty", - "link_count": 0, - "link_to": "Customer Acquisition and Loyalty", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Sales Order", - "hidden": 0, - "is_query_report": 1, - "label": "Inactive Customers", - "link_count": 0, - "link_to": "Inactive Customers", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Sales Order", - "hidden": 0, - "is_query_report": 1, - "label": "Sales Person-wise Transaction Summary", - "link_count": 0, - "link_to": "Sales Person-wise Transaction Summary", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Item", - "hidden": 0, - "is_query_report": 1, - "label": "Item-wise Sales History", - "link_count": 0, - "link_to": "Item-wise Sales History", - "link_type": "Report", - "onboard": 0, - "type": "Link" - }, { "hidden": 0, "is_query_report": 0, "label": "Other Reports", - "link_count": 0, + "link_count": 12, "onboard": 0, "type": "Card Break" }, @@ -560,9 +453,258 @@ "link_type": "Report", "onboard": 0, "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Key Reports", + "link_count": 22, + "onboard": 0, + "type": "Card Break" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 1, + "label": "Sales Analytics", + "link_count": 0, + "link_to": "Sales Analytics", + "link_type": "Report", + "onboard": 1, + "type": "Link" + }, + { + "dependencies": "Sales Order", + "hidden": 0, + "is_query_report": 1, + "label": "Sales Order Analysis", + "link_count": 0, + "link_to": "Sales Order Analysis", + "link_type": "Report", + "onboard": 1, + "type": "Link" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Sales Funnel", + "link_count": 0, + "link_to": "sales-funnel", + "link_type": "Page", + "onboard": 1, + "type": "Link" + }, + { + "dependencies": "Sales Order", + "hidden": 0, + "is_query_report": 1, + "label": "Sales Order Trends", + "link_count": 0, + "link_to": "Sales Order Trends", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Quotation", + "hidden": 0, + "is_query_report": 1, + "label": "Quotation Trends", + "link_count": 0, + "link_to": "Quotation Trends", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Customer", + "hidden": 0, + "is_query_report": 1, + "label": "Customer Acquisition and Loyalty", + "link_count": 0, + "link_to": "Customer Acquisition and Loyalty", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Sales Order", + "hidden": 0, + "is_query_report": 1, + "label": "Inactive Customers", + "link_count": 0, + "link_to": "Inactive Customers", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Sales Order", + "hidden": 0, + "is_query_report": 1, + "label": "Sales Person-wise Transaction Summary", + "link_count": 0, + "link_to": "Sales Person-wise Transaction Summary", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Item", + "hidden": 0, + "is_query_report": 1, + "label": "Item-wise Sales History", + "link_count": 0, + "link_to": "Item-wise Sales History", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Lead", + "hidden": 0, + "is_query_report": 1, + "label": "Lead Details", + "link_count": 0, + "link_to": "Lead Details", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Address", + "hidden": 0, + "is_query_report": 1, + "label": "Customer Addresses And Contacts", + "link_count": 0, + "link_to": "Address And Contacts", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Item", + "hidden": 0, + "is_query_report": 1, + "label": "Available Stock for Packing Items", + "link_count": 0, + "link_to": "Available Stock for Packing Items", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Sales Order", + "hidden": 0, + "is_query_report": 1, + "label": "Pending SO Items For Purchase Request", + "link_count": 0, + "link_to": "Pending SO Items For Purchase Request", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Delivery Note", + "hidden": 0, + "is_query_report": 1, + "label": "Delivery Note Trends", + "link_count": 0, + "link_to": "Delivery Note Trends", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Sales Invoice", + "hidden": 0, + "is_query_report": 1, + "label": "Sales Invoice Trends", + "link_count": 0, + "link_to": "Sales Invoice Trends", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Customer", + "hidden": 0, + "is_query_report": 1, + "label": "Customer Credit Balance", + "link_count": 0, + "link_to": "Customer Credit Balance", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Customer", + "hidden": 0, + "is_query_report": 1, + "label": "Customers Without Any Sales Transactions", + "link_count": 0, + "link_to": "Customers Without Any Sales Transactions", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Customer", + "hidden": 0, + "is_query_report": 1, + "label": "Sales Partners Commission", + "link_count": 0, + "link_to": "Sales Partners Commission", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Sales Order", + "hidden": 0, + "is_query_report": 1, + "label": "Territory Target Variance Based On Item Group", + "link_count": 0, + "link_to": "Territory Target Variance Based On Item Group", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Sales Order", + "hidden": 0, + "is_query_report": 1, + "label": "Sales Person Target Variance Based On Item Group", + "link_count": 0, + "link_to": "Sales Person Target Variance Based On Item Group", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Sales Order", + "hidden": 0, + "is_query_report": 1, + "label": "Sales Partner Target Variance Based On Item Group", + "link_count": 0, + "link_to": "Sales Partner Target Variance based on Item Group", + "link_type": "Report", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 1, + "label": "Payment Terms Status for Sales Order", + "link_count": 0, + "link_to": "Payment Terms Status for Sales Order", + "link_type": "Report", + "onboard": 0, + "type": "Link" } ], - "modified": "2022-01-13 17:43:02.778627", + "modified": "2022-04-26 13:29:55.087240", "modified_by": "Administrator", "module": "Selling", "name": "Selling", diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index 370a3278a0..cc62a2ac73 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -147,9 +147,8 @@ }, { "fieldname": "domain", - "fieldtype": "Link", - "label": "Domain", - "options": "Domain" + "fieldtype": "Data", + "label": "Domain" }, { "fieldname": "parent_company", @@ -748,7 +747,7 @@ "image_field": "company_logo", "is_tree": 1, "links": [], - "modified": "2022-01-25 10:33:16.826067", + "modified": "2022-04-27 10:33:16.826067", "modified_by": "Administrator", "module": "Setup", "name": "Company", diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index c11645822f..9bde6e2c47 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -528,7 +528,7 @@ def install_country_fixtures(company, country): except ImportError: pass except Exception: - frappe.log_error() + frappe.log_error("Unable to set country fixtures") frappe.throw( _("Failed to setup defaults for country {0}. Please contact support.").format( frappe.bold(country) diff --git a/erpnext/setup/doctype/naming_series/naming_series.js b/erpnext/setup/doctype/naming_series/naming_series.js index 7c76d9ca4b..861b2b3983 100644 --- a/erpnext/setup/doctype/naming_series/naming_series.js +++ b/erpnext/setup/doctype/naming_series/naming_series.js @@ -4,10 +4,13 @@ frappe.ui.form.on("Naming Series", { onload: function(frm) { - frm.disable_save(); frm.events.get_doc_and_prefix(frm); }, + refresh: function(frm) { + frm.disable_save(); + }, + get_doc_and_prefix: function(frm) { frappe.call({ method: "get_transactions", diff --git a/erpnext/setup/setup_wizard/operations/company_setup.py b/erpnext/setup/setup_wizard/operations/company_setup.py index 36dd661176..aadc98989f 100644 --- a/erpnext/setup/setup_wizard/operations/company_setup.py +++ b/erpnext/setup/setup_wizard/operations/company_setup.py @@ -30,7 +30,6 @@ def create_fiscal_year_and_company(args): "country": args.get("country"), "create_chart_of_accounts_based_on": "Standard Template", "chart_of_accounts": args.get("chart_of_accounts"), - "domain": args.get("domains")[0], } ).insert() diff --git a/erpnext/setup/setup_wizard/operations/defaults_setup.py b/erpnext/setup/setup_wizard/operations/defaults_setup.py index 07321ed7ac..ea0779864d 100644 --- a/erpnext/setup/setup_wizard/operations/defaults_setup.py +++ b/erpnext/setup/setup_wizard/operations/defaults_setup.py @@ -26,9 +26,6 @@ def set_default_settings(args): system_settings.email_footer_address = args.get("company_name") system_settings.save() - domain_settings = frappe.get_single("Domain Settings") - domain_settings.set_active_domains(args.get("domains")) - stock_settings = frappe.get_doc("Stock Settings") stock_settings.item_naming_by = "Item Code" stock_settings.valuation_method = "FIFO" diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index a0056e2112..4235e1f7db 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -43,14 +43,6 @@ default_sales_partner_type = [ def install(country=None): records = [ - # domains - {"doctype": "Domain", "domain": "Distribution"}, - {"doctype": "Domain", "domain": "Manufacturing"}, - {"doctype": "Domain", "domain": "Retail"}, - {"doctype": "Domain", "domain": "Services"}, - {"doctype": "Domain", "domain": "Education"}, - {"doctype": "Domain", "domain": "Healthcare"}, - {"doctype": "Domain", "domain": "Non Profit"}, # ensure at least an empty Address Template exists for this Country {"doctype": "Address Template", "country": country}, # item group @@ -376,7 +368,6 @@ def install(country=None): {"doctype": "Party Type", "party_type": "Supplier", "account_type": "Payable"}, {"doctype": "Party Type", "party_type": "Employee", "account_type": "Payable"}, {"doctype": "Party Type", "party_type": "Shareholder", "account_type": "Payable"}, - {"doctype": "Party Type", "party_type": "Student", "account_type": "Receivable"}, {"doctype": "Opportunity Type", "name": _("Sales")}, {"doctype": "Opportunity Type", "name": _("Support")}, {"doctype": "Opportunity Type", "name": _("Maintenance")}, @@ -397,13 +388,6 @@ def install(country=None): {"doctype": "Offer Term", "offer_term": _("Incentives")}, {"doctype": "Print Heading", "print_heading": _("Credit Note")}, {"doctype": "Print Heading", "print_heading": _("Debit Note")}, - # Assessment Group - { - "doctype": "Assessment Group", - "assessment_group_name": _("All Assessment Groups"), - "is_group": 1, - "parent_assessment_group": "", - }, # Share Management {"doctype": "Share Type", "title": _("Equity")}, {"doctype": "Share Type", "title": _("Preference")}, @@ -798,7 +782,6 @@ def install_defaults(args=None): frappe.db.set_value("Stock Settings", None, "email_footer_address", args.get("company_name")) set_global_defaults(args) - set_active_domains(args) update_stock_settings() update_shopping_cart_settings(args) @@ -822,10 +805,6 @@ def set_global_defaults(args): global_defaults.save() -def set_active_domains(args): - frappe.get_single("Domain Settings").set_active_domains(args.get("domains")) - - def update_stock_settings(): stock_settings = frappe.get_doc("Stock Settings") stock_settings.item_naming_by = "Item Code" diff --git a/erpnext/setup/setup_wizard/operations/taxes_setup.py b/erpnext/setup/setup_wizard/operations/taxes_setup.py index 39dc7e3327..2f77dd6ae5 100644 --- a/erpnext/setup/setup_wizard/operations/taxes_setup.py +++ b/erpnext/setup/setup_wizard/operations/taxes_setup.py @@ -116,7 +116,7 @@ def update_regional_tax_settings(country, company): frappe.get_attr(module_name)(country, company) except Exception as e: # Log error and ignore if failed to setup regional tax settings - frappe.log_error() + frappe.log_error("Unable to setup regional tax settings") pass diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py index 4cae5191a6..bd86a5b969 100644 --- a/erpnext/setup/setup_wizard/setup_wizard.py +++ b/erpnext/setup/setup_wizard/setup_wizard.py @@ -36,7 +36,6 @@ def get_setup_stages(args=None): "tasks": [ {"fn": setup_defaults, "args": args, "fail_msg": _("Failed to setup defaults")}, {"fn": stage_four, "args": args, "fail_msg": _("Failed to create website")}, - {"fn": set_active_domains, "args": args, "fail_msg": _("Failed to add Domain")}, ], }, { @@ -84,8 +83,3 @@ def setup_complete(args=None): setup_defaults(args) stage_four(args) fin(args) - - -def set_active_domains(args): - domain_settings = frappe.get_single("Domain Settings") - domain_settings.set_active_domains(args.get("domains")) diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index 2200e6cd1d..b3ff439d74 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -33,10 +33,8 @@ def before_tests(): "email": "test@erpnext.com", "password": "test", "chart_of_accounts": "Standard", - "domains": ["Manufacturing"], } ) - _enable_all_domains() frappe.db.sql("delete from `tabLeave Allocation`") frappe.db.sql("delete from `tabLeave Application`") @@ -112,7 +110,7 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No cache.setex(name=key, time=21600, value=flt(value)) return flt(value) except Exception: - frappe.log_error(title="Get Exchange Rate") + frappe.log_error("Unable to fetch exchange rate") frappe.msgprint( _( "Unable to find exchange rate for {0} to {1} for key date {2}. Please create a Currency Exchange record manually" @@ -131,17 +129,9 @@ def format_ces_api(data, param): def enable_all_roles_and_domains(): """enable all roles and domain for testing""" - _enable_all_domains() _enable_all_roles_for_admin() -def _enable_all_domains(): - domains = frappe.get_all("Domain", pluck="name") - if not domains: - return - frappe.get_single("Domain Settings").set_active_domains(domains) - - def _enable_all_roles_for_admin(): from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to diff --git a/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json b/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json index c5640bc079..eeb71c7709 100644 --- a/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json +++ b/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json @@ -1,7 +1,7 @@ { "charts": [], "content": "[{\"type\":\"header\",\"data\":{\"text\":\"Your Shortcuts\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\",\"col\":12}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Projects Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Accounts Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Stock Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"HR Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Selling Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Buying Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Support Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Shopping Cart Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Portal Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Domain Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Products Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Naming Series\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Manufacturing Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Education Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Hotel Settings\",\"col\":3}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"CRM Settings\",\"col\":3}}]", - "creation": "2020-03-12 14:47:51.166455", + "creation": "2022-01-27 13:14:47.349433", "docstatus": 0, "doctype": "Workspace", "for_user": "", @@ -10,7 +10,7 @@ "idx": 0, "label": "ERPNext Settings", "links": [], - "modified": "2022-01-13 19:18:59.362820", + "modified": "2022-04-28 11:42:01.043569", "modified_by": "Administrator", "module": "Setup", "name": "ERPNext Settings", @@ -90,20 +90,6 @@ "restrict_to_domain": "Manufacturing", "type": "DocType" }, - { - "icon": "education", - "label": "Education Settings", - "link_to": "Education Settings", - "restrict_to_domain": "Education", - "type": "DocType" - }, - { - "icon": "organization", - "label": "Hotel Settings", - "link_to": "Hotel Settings", - "restrict_to_domain": "Hospitality", - "type": "DocType" - }, { "icon": "setting", "label": "Domain Settings", diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index 7ebc4eed75..e3222bc885 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -23,6 +23,10 @@ "is_return", "issue_credit_note", "return_against", + "accounting_dimensions_section", + "cost_center", + "dimension_col_break", + "project", "customer_po_details", "po_no", "column_break_17", @@ -115,7 +119,6 @@ "driver_name", "lr_date", "more_info", - "project", "campaign", "source", "column_break5", @@ -1309,13 +1312,29 @@ "fieldtype": "Currency", "label": "Amount Eligible for Commission", "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions" + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" } ], "icon": "fa fa-truck", "idx": 146, "is_submittable": 1, "links": [], - "modified": "2022-03-10 14:29:13.428984", + "modified": "2022-04-26 14:48:08.781837", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", @@ -1380,6 +1399,7 @@ "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", + "states": [], "timeline_field": "customer", "title_field": "title", "track_changes": 1, diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index b5a45578c6..f97e7ca9c6 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -78,56 +78,6 @@ class TestDeliveryNote(FrappeTestCase): self.assertFalse(get_gl_entries("Delivery Note", dn.name)) - # def test_delivery_note_gl_entry(self): - # company = frappe.db.get_value('Warehouse', 'Stores - TCP1', 'company') - - # set_valuation_method("_Test Item", "FIFO") - - # make_stock_entry(target="Stores - TCP1", qty=5, basic_rate=100) - - # stock_in_hand_account = get_inventory_account('_Test Company with perpetual inventory') - # prev_bal = get_balance_on(stock_in_hand_account) - - # dn = create_delivery_note(company='_Test Company with perpetual inventory', warehouse='Stores - TCP1', cost_center = 'Main - TCP1', expense_account = "Cost of Goods Sold - TCP1") - - # gl_entries = get_gl_entries("Delivery Note", dn.name) - # self.assertTrue(gl_entries) - - # stock_value_difference = abs(frappe.db.get_value("Stock Ledger Entry", - # {"voucher_type": "Delivery Note", "voucher_no": dn.name}, "stock_value_difference")) - - # expected_values = { - # stock_in_hand_account: [0.0, stock_value_difference], - # "Cost of Goods Sold - TCP1": [stock_value_difference, 0.0] - # } - # for i, gle in enumerate(gl_entries): - # self.assertEqual([gle.debit, gle.credit], expected_values.get(gle.account)) - - # # check stock in hand balance - # bal = get_balance_on(stock_in_hand_account) - # self.assertEqual(bal, prev_bal - stock_value_difference) - - # # back dated incoming entry - # make_stock_entry(posting_date=add_days(nowdate(), -2), target="Stores - TCP1", - # qty=5, basic_rate=100) - - # gl_entries = get_gl_entries("Delivery Note", dn.name) - # self.assertTrue(gl_entries) - - # stock_value_difference = abs(frappe.db.get_value("Stock Ledger Entry", - # {"voucher_type": "Delivery Note", "voucher_no": dn.name}, "stock_value_difference")) - - # expected_values = { - # stock_in_hand_account: [0.0, stock_value_difference], - # "Cost of Goods Sold - TCP1": [stock_value_difference, 0.0] - # } - # for i, gle in enumerate(gl_entries): - # self.assertEqual([gle.debit, gle.credit], expected_values.get(gle.account)) - - # dn.cancel() - # self.assertTrue(get_gl_entries("Delivery Note", dn.name)) - # set_perpetual_inventory(0, company) - def test_delivery_note_gl_entry_packing_item(self): company = frappe.db.get_value("Warehouse", "Stores - TCP1", "company") @@ -854,8 +804,6 @@ class TestDeliveryNote(FrappeTestCase): company="_Test Company with perpetual inventory", ) - company = frappe.db.get_value("Warehouse", "Stores - TCP1", "company") - set_valuation_method("_Test Item", "FIFO") make_stock_entry(target="Stores - TCP1", qty=5, basic_rate=100) @@ -881,8 +829,6 @@ class TestDeliveryNote(FrappeTestCase): def test_delivery_note_cost_center_with_balance_sheet_account(self): cost_center = "Main - TCP1" - company = frappe.db.get_value("Warehouse", "Stores - TCP1", "company") - set_valuation_method("_Test Item", "FIFO") make_stock_entry(target="Stores - TCP1", qty=5, basic_rate=100) diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index 06da8ee9c3..4f3e842995 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -869,8 +869,9 @@ }, { "fieldname": "default_item_manufacturer", - "fieldtype": "Data", + "fieldtype": "Link", "label": "Default Item Manufacturer", + "options": "Manufacturer", "read_only": 1 }, { @@ -918,7 +919,7 @@ "image_field": "image", "index_web_pages_for_search": 1, "links": [], - "modified": "2022-03-25 06:38:55.942304", + "modified": "2022-04-28 04:52:10.272256", "modified_by": "Administrator", "module": "Stock", "name": "Item", @@ -991,4 +992,4 @@ "states": [], "title_field": "item_name", "track_changes": 1 -} +} \ No newline at end of file diff --git a/erpnext/stock/doctype/packed_item/packed_item.json b/erpnext/stock/doctype/packed_item/packed_item.json index e94c34d7ad..cb8eb30cb3 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.json +++ b/erpnext/stock/doctype/packed_item/packed_item.json @@ -29,6 +29,7 @@ "ordered_qty", "column_break_16", "incoming_rate", + "picked_qty", "page_break", "prevdoc_doctype", "parent_detail_docname" @@ -234,13 +235,20 @@ "label": "Ordered Qty", "no_copy": 1, "read_only": 1 + }, + { + "fieldname": "picked_qty", + "fieldtype": "Float", + "label": "Picked Qty", + "no_copy": 1, + "read_only": 1 } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2022-03-10 15:42:00.265915", + "modified": "2022-04-27 05:23:08.683245", "modified_by": "Administrator", "module": "Stock", "name": "Packed Item", diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py index 026dd4e122..4d05d7a345 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -32,7 +32,7 @@ def make_packing_list(doc): reset = reset_packing_list(doc) for item_row in doc.get("items"): - if frappe.db.exists("Product Bundle", {"new_item_code": item_row.item_code}): + if is_product_bundle(item_row.item_code): for bundle_item in get_product_bundle_items(item_row.item_code): pi_row = add_packed_item_row( doc=doc, @@ -54,6 +54,10 @@ def make_packing_list(doc): set_product_bundle_rate_amount(doc, parent_items_price) # set price in bundle item +def is_product_bundle(item_code: str) -> bool: + return bool(frappe.db.exists("Product Bundle", {"new_item_code": item_code})) + + def get_indexed_packed_items_table(doc): """ Create dict from stale packed items table like: diff --git a/erpnext/stock/doctype/packed_item/test_packed_item.py b/erpnext/stock/doctype/packed_item/test_packed_item.py index fe1b0d9f79..ad7fd9a697 100644 --- a/erpnext/stock/doctype/packed_item/test_packed_item.py +++ b/erpnext/stock/doctype/packed_item/test_packed_item.py @@ -1,10 +1,12 @@ # Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt +from typing import List, Optional, Tuple + +import frappe from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils import add_to_date, nowdate -from erpnext.selling.doctype.product_bundle.test_product_bundle import make_product_bundle from erpnext.selling.doctype.sales_order.sales_order import make_delivery_note from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order from erpnext.stock.doctype.item.test_item import make_item @@ -12,6 +14,33 @@ from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import get_gl_ from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry +def create_product_bundle( + quantities: Optional[List[int]] = None, warehouse: Optional[str] = None +) -> Tuple[str, List[str]]: + """Get a new product_bundle for use in tests. + + Create 10x required stock if warehouse is specified. + """ + if not quantities: + quantities = [2, 2] + + bundle = make_item(properties={"is_stock_item": 0}).name + + bundle_doc = frappe.get_doc({"doctype": "Product Bundle", "new_item_code": bundle}) + + components = [] + for qty in quantities: + compoenent = make_item().name + components.append(compoenent) + bundle_doc.append("items", {"item_code": compoenent, "qty": qty}) + if warehouse: + make_stock_entry(item=compoenent, to_warehouse=warehouse, qty=10 * qty, rate=100) + + bundle_doc.insert() + + return bundle, components + + class TestPackedItem(FrappeTestCase): "Test impact on Packed Items table in various scenarios." @@ -19,24 +48,11 @@ class TestPackedItem(FrappeTestCase): def setUpClass(cls) -> None: super().setUpClass() cls.warehouse = "_Test Warehouse - _TC" - cls.bundle = "_Test Product Bundle X" - cls.bundle_items = ["_Test Bundle Item 1", "_Test Bundle Item 2"] - cls.bundle2 = "_Test Product Bundle Y" - cls.bundle2_items = ["_Test Bundle Item 3", "_Test Bundle Item 4"] + cls.bundle, cls.bundle_items = create_product_bundle(warehouse=cls.warehouse) + cls.bundle2, cls.bundle2_items = create_product_bundle(warehouse=cls.warehouse) - make_item(cls.bundle, {"is_stock_item": 0}) - make_item(cls.bundle2, {"is_stock_item": 0}) - for item in cls.bundle_items + cls.bundle2_items: - make_item(item, {"is_stock_item": 1}) - - make_item("_Test Normal Stock Item", {"is_stock_item": 1}) - - make_product_bundle(cls.bundle, cls.bundle_items, qty=2) - make_product_bundle(cls.bundle2, cls.bundle2_items, qty=2) - - for item in cls.bundle_items + cls.bundle2_items: - make_stock_entry(item_code=item, to_warehouse=cls.warehouse, qty=100, rate=100) + cls.normal_item = make_item().name def test_adding_bundle_item(self): "Test impact on packed items if bundle item row is added." @@ -58,7 +74,7 @@ class TestPackedItem(FrappeTestCase): self.assertEqual(so.packed_items[1].qty, 4) # change item code to non bundle item - so.items[0].item_code = "_Test Normal Stock Item" + so.items[0].item_code = self.normal_item so.save() self.assertEqual(len(so.packed_items), 0) diff --git a/erpnext/stock/doctype/pick_list/pick_list.json b/erpnext/stock/doctype/pick_list/pick_list.json index c604c711ef..e984c082d4 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.json +++ b/erpnext/stock/doctype/pick_list/pick_list.json @@ -114,6 +114,7 @@ "set_only_once": 1 }, { + "collapsible": 1, "fieldname": "print_settings_section", "fieldtype": "Section Break", "label": "Print Settings" @@ -129,7 +130,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2021-10-05 15:08:40.369957", + "modified": "2022-04-21 07:56:40.646473", "modified_by": "Administrator", "module": "Stock", "name": "Pick List", @@ -199,5 +200,6 @@ ], "sort_field": "modified", "sort_order": "DESC", + "states": [], "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 33d7745c62..70d2f23070 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -4,13 +4,14 @@ import json from collections import OrderedDict, defaultdict from itertools import groupby -from operator import itemgetter +from typing import Dict, List, Set import frappe from frappe import _ from frappe.model.document import Document from frappe.model.mapper import map_child_doc from frappe.utils import cint, floor, flt, today +from frappe.utils.nestedset import get_descendants_of from erpnext.selling.doctype.sales_order.sales_order import ( make_delivery_note as create_delivery_note_from_sales_order, @@ -38,6 +39,7 @@ class PickList(Document): ) def before_submit(self): + update_sales_orders = set() for item in self.locations: # if the user has not entered any picked qty, set it to stock_qty, before submit if item.picked_qty == 0: @@ -45,7 +47,8 @@ class PickList(Document): if item.sales_order_item: # update the picked_qty in SO Item - self.update_so(item.sales_order_item, item.picked_qty, item.item_code) + self.update_sales_order_item(item, item.picked_qty, item.item_code) + update_sales_orders.add(item.sales_order) if not frappe.get_cached_value("Item", item.item_code, "has_serial_no"): continue @@ -65,18 +68,29 @@ class PickList(Document): title=_("Quantity Mismatch"), ) + self.update_bundle_picked_qty() + self.update_sales_order_picking_status(update_sales_orders) + def before_cancel(self): - # update picked_qty in SO Item on cancel of PL + """Deduct picked qty on cancelling pick list""" + updated_sales_orders = set() + for item in self.get("locations"): if item.sales_order_item: - self.update_so(item.sales_order_item, -1 * item.picked_qty, item.item_code) + self.update_sales_order_item(item, -1 * item.picked_qty, item.item_code) + updated_sales_orders.add(item.sales_order) + + self.update_bundle_picked_qty() + self.update_sales_order_picking_status(updated_sales_orders) + + def update_sales_order_item(self, item, picked_qty, item_code): + item_table = "Sales Order Item" if not item.product_bundle_item else "Packed Item" + stock_qty_field = "stock_qty" if not item.product_bundle_item else "qty" - def update_so(self, so_item, picked_qty, item_code): - so_doc = frappe.get_doc( - "Sales Order", frappe.db.get_value("Sales Order Item", so_item, "parent") - ) already_picked, actual_qty = frappe.db.get_value( - "Sales Order Item", so_item, ["picked_qty", "qty"] + item_table, + item.sales_order_item, + ["picked_qty", stock_qty_field], ) if self.docstatus == 1: @@ -86,20 +100,16 @@ class PickList(Document): frappe.throw( _( "You are picking more than required quantity for {}. Check if there is any other pick list created for {}" - ).format(item_code, so_doc.name) + ).format(item_code, item.sales_order) ) - frappe.db.set_value("Sales Order Item", so_item, "picked_qty", already_picked + picked_qty) + frappe.db.set_value(item_table, item.sales_order_item, "picked_qty", already_picked + picked_qty) - total_picked_qty = 0 - total_so_qty = 0 - for item in so_doc.get("items"): - total_picked_qty += flt(item.picked_qty) - total_so_qty += flt(item.stock_qty) - total_picked_qty = total_picked_qty + picked_qty - per_picked = total_picked_qty / total_so_qty * 100 - - so_doc.db_set("per_picked", flt(per_picked), update_modified=False) + @staticmethod + def update_sales_order_picking_status(sales_orders: Set[str]) -> None: + for sales_order in sales_orders: + if sales_order: + frappe.get_doc("Sales Order", sales_order).update_picking_status() @frappe.whitelist() def set_item_locations(self, save=False): @@ -109,7 +119,7 @@ class PickList(Document): from_warehouses = None if self.parent_warehouse: - from_warehouses = frappe.db.get_descendants("Warehouse", self.parent_warehouse) + from_warehouses = get_descendants_of("Warehouse", self.parent_warehouse) # Create replica before resetting, to handle empty table on update after submit. locations_replica = self.get("locations") @@ -190,8 +200,7 @@ class PickList(Document): frappe.throw(_("Qty of Finished Goods Item should be greater than 0.")) def before_print(self, settings=None): - if self.get("group_same_items"): - self.group_similar_items() + self.group_similar_items() def group_similar_items(self): group_item_qty = defaultdict(float) @@ -217,6 +226,57 @@ class PickList(Document): for idx, item in enumerate(self.locations, start=1): item.idx = idx + def update_bundle_picked_qty(self): + product_bundles = self._get_product_bundles() + product_bundle_qty_map = self._get_product_bundle_qty_map(product_bundles.values()) + + for so_row, item_code in product_bundles.items(): + picked_qty = self._compute_picked_qty_for_bundle(so_row, product_bundle_qty_map[item_code]) + item_table = "Sales Order Item" + already_picked = frappe.db.get_value(item_table, so_row, "picked_qty") + frappe.db.set_value( + item_table, + so_row, + "picked_qty", + already_picked + (picked_qty * (1 if self.docstatus == 1 else -1)), + ) + + def _get_product_bundles(self) -> Dict[str, str]: + # Dict[so_item_row: item_code] + product_bundles = {} + for item in self.locations: + if not item.product_bundle_item: + continue + product_bundles[item.product_bundle_item] = frappe.db.get_value( + "Sales Order Item", + item.product_bundle_item, + "item_code", + ) + return product_bundles + + def _get_product_bundle_qty_map(self, bundles: List[str]) -> Dict[str, Dict[str, float]]: + # bundle_item_code: Dict[component, qty] + product_bundle_qty_map = {} + for bundle_item_code in bundles: + bundle = frappe.get_last_doc("Product Bundle", {"new_item_code": bundle_item_code}) + product_bundle_qty_map[bundle_item_code] = {item.item_code: item.qty for item in bundle.items} + return product_bundle_qty_map + + def _compute_picked_qty_for_bundle(self, bundle_row, bundle_items) -> int: + """Compute how many full bundles can be created from picked items.""" + precision = frappe.get_precision("Stock Ledger Entry", "qty_after_transaction") + + possible_bundles = [] + for item in self.locations: + if item.product_bundle_item != bundle_row: + continue + + if qty_in_bundle := bundle_items.get(item.item_code): + possible_bundles.append(item.picked_qty / qty_in_bundle) + else: + possible_bundles.append(0) + return int(flt(min(possible_bundles), precision or 6)) + def validate_item_locations(pick_list): if not pick_list.locations: @@ -450,22 +510,18 @@ def create_delivery_note(source_name, target_doc=None): for location in pick_list.locations: if location.sales_order: sales_orders.append( - [frappe.db.get_value("Sales Order", location.sales_order, "customer"), location.sales_order] + frappe.db.get_value( + "Sales Order", location.sales_order, ["customer", "name as sales_order"], as_dict=True + ) ) - # Group sales orders by customer - for key, keydata in groupby(sales_orders, key=itemgetter(0)): - sales_dict[key] = set([d[1] for d in keydata]) + + for customer, rows in groupby(sales_orders, key=lambda so: so["customer"]): + sales_dict[customer] = {row.sales_order for row in rows} if sales_dict: delivery_note = create_dn_with_so(sales_dict, pick_list) - is_item_wo_so = 0 - for location in pick_list.locations: - if not location.sales_order: - is_item_wo_so = 1 - break - if is_item_wo_so == 1: - # Create a DN for items without sales orders as well + if not all(item.sales_order for item in pick_list.locations): delivery_note = create_dn_wo_so(pick_list) frappe.msgprint(_("Delivery Note(s) created for the Pick List")) @@ -492,27 +548,30 @@ def create_dn_wo_so(pick_list): def create_dn_with_so(sales_dict, pick_list): delivery_note = None + item_table_mapper = { + "doctype": "Delivery Note Item", + "field_map": { + "rate": "rate", + "name": "so_detail", + "parent": "against_sales_order", + }, + "condition": lambda doc: abs(doc.delivered_qty) < abs(doc.qty) + and doc.delivered_by_supplier != 1, + } + for customer in sales_dict: for so in sales_dict[customer]: delivery_note = None delivery_note = create_delivery_note_from_sales_order(so, delivery_note, skip_item_mapping=True) - - item_table_mapper = { - "doctype": "Delivery Note Item", - "field_map": { - "rate": "rate", - "name": "so_detail", - "parent": "against_sales_order", - }, - "condition": lambda doc: abs(doc.delivered_qty) < abs(doc.qty) - and doc.delivered_by_supplier != 1, - } break if delivery_note: # map all items of all sales orders of that customer for so in sales_dict[customer]: map_pl_locations(pick_list, item_table_mapper, delivery_note, so) - delivery_note.insert(ignore_mandatory=True) + delivery_note.flags.ignore_mandatory = True + delivery_note.insert() + update_packed_item_details(pick_list, delivery_note) + delivery_note.save() return delivery_note @@ -520,28 +579,28 @@ def create_dn_with_so(sales_dict, pick_list): def map_pl_locations(pick_list, item_mapper, delivery_note, sales_order=None): for location in pick_list.locations: - if location.sales_order == sales_order: - if location.sales_order_item: - sales_order_item = frappe.get_cached_doc( - "Sales Order Item", {"name": location.sales_order_item} - ) - else: - sales_order_item = None + if location.sales_order != sales_order or location.product_bundle_item: + continue - source_doc, table_mapper = ( - [sales_order_item, item_mapper] if sales_order_item else [location, item_mapper] - ) + if location.sales_order_item: + sales_order_item = frappe.get_doc("Sales Order Item", location.sales_order_item) + else: + sales_order_item = None - dn_item = map_child_doc(source_doc, delivery_note, table_mapper) + source_doc = sales_order_item or location - if dn_item: - dn_item.pick_list_item = location.name - dn_item.warehouse = location.warehouse - dn_item.qty = flt(location.picked_qty) / (flt(location.conversion_factor) or 1) - dn_item.batch_no = location.batch_no - dn_item.serial_no = location.serial_no + dn_item = map_child_doc(source_doc, delivery_note, item_mapper) - update_delivery_note_item(source_doc, dn_item, delivery_note) + if dn_item: + dn_item.pick_list_item = location.name + dn_item.warehouse = location.warehouse + dn_item.qty = flt(location.picked_qty) / (flt(location.conversion_factor) or 1) + dn_item.batch_no = location.batch_no + dn_item.serial_no = location.serial_no + + update_delivery_note_item(source_doc, dn_item, delivery_note) + + add_product_bundles_to_delivery_note(pick_list, delivery_note, item_mapper) set_delivery_note_missing_values(delivery_note) delivery_note.pick_list = pick_list.name @@ -549,6 +608,50 @@ def map_pl_locations(pick_list, item_mapper, delivery_note, sales_order=None): delivery_note.customer = frappe.get_value("Sales Order", sales_order, "customer") +def add_product_bundles_to_delivery_note( + pick_list: "PickList", delivery_note, item_mapper +) -> None: + """Add product bundles found in pick list to delivery note. + + When mapping pick list items, the bundle item itself isn't part of the + locations. Dynamically fetch and add parent bundle item into DN.""" + product_bundles = pick_list._get_product_bundles() + product_bundle_qty_map = pick_list._get_product_bundle_qty_map(product_bundles.values()) + + for so_row, item_code in product_bundles.items(): + sales_order_item = frappe.get_doc("Sales Order Item", so_row) + dn_bundle_item = map_child_doc(sales_order_item, delivery_note, item_mapper) + dn_bundle_item.qty = pick_list._compute_picked_qty_for_bundle( + so_row, product_bundle_qty_map[item_code] + ) + update_delivery_note_item(sales_order_item, dn_bundle_item, delivery_note) + + +def update_packed_item_details(pick_list: "PickList", delivery_note) -> None: + """Update stock details on packed items table of delivery note.""" + + def _find_so_row(packed_item): + for item in delivery_note.items: + if packed_item.parent_detail_docname == item.name: + return item.so_detail + + def _find_pick_list_location(bundle_row, packed_item): + if not bundle_row: + return + for loc in pick_list.locations: + if loc.product_bundle_item == bundle_row and loc.item_code == packed_item.item_code: + return loc + + for packed_item in delivery_note.packed_items: + so_row = _find_so_row(packed_item) + location = _find_pick_list_location(so_row, packed_item) + if not location: + continue + packed_item.warehouse = location.warehouse + packed_item.batch_no = location.batch_no + packed_item.serial_no = location.serial_no + + @frappe.whitelist() def create_stock_entry(pick_list): pick_list = frappe.get_doc(json.loads(pick_list)) diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py index 27b06d2dd9..f552299806 100644 --- a/erpnext/stock/doctype/pick_list/test_pick_list.py +++ b/erpnext/stock/doctype/pick_list/test_pick_list.py @@ -3,18 +3,21 @@ import frappe from frappe import _dict - -test_dependencies = ["Item", "Sales Invoice", "Stock Entry", "Batch"] - from frappe.tests.utils import FrappeTestCase +from erpnext.selling.doctype.sales_order.sales_order import create_pick_list +from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order from erpnext.stock.doctype.item.test_item import create_item, make_item +from erpnext.stock.doctype.packed_item.test_packed_item import create_product_bundle from erpnext.stock.doctype.pick_list.pick_list import create_delivery_note from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt +from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation import ( EmptyStockReconciliationItemsError, ) +test_dependencies = ["Item", "Sales Invoice", "Stock Entry", "Batch"] + class TestPickList(FrappeTestCase): def test_pick_list_picks_warehouse_for_each_item(self): @@ -579,14 +582,79 @@ class TestPickList(FrappeTestCase): if dn_item.item_code == "_Test Item 2": self.assertEqual(dn_item.qty, 2) - # def test_pick_list_skips_items_in_expired_batch(self): - # pass + def test_picklist_with_multi_uom(self): + warehouse = "_Test Warehouse - _TC" + item = make_item(properties={"uoms": [dict(uom="Box", conversion_factor=24)]}).name + make_stock_entry(item=item, to_warehouse=warehouse, qty=1000) - # def test_pick_list_from_sales_order(self): - # pass + so = make_sales_order(item_code=item, qty=10, rate=42, uom="Box") + pl = create_pick_list(so.name) + # pick half the qty + for loc in pl.locations: + loc.picked_qty = loc.stock_qty / 2 + pl.save() + pl.submit() - # def test_pick_list_from_work_order(self): - # pass + so.reload() + self.assertEqual(so.per_picked, 50) - # def test_pick_list_from_material_request(self): - # pass + def test_picklist_with_bundles(self): + warehouse = "_Test Warehouse - _TC" + + quantities = [5, 2] + bundle, components = create_product_bundle(quantities, warehouse=warehouse) + bundle_items = dict(zip(components, quantities)) + + so = make_sales_order(item_code=bundle, qty=3, rate=42) + + pl = create_pick_list(so.name) + pl.save() + self.assertEqual(len(pl.locations), 2) + for item in pl.locations: + self.assertEqual(item.stock_qty, bundle_items[item.item_code] * 3) + + # check picking status on sales order + pl.submit() + so.reload() + self.assertEqual(so.per_picked, 100) + + # deliver + dn = create_delivery_note(pl.name).submit() + self.assertEqual(dn.items[0].rate, 42) + self.assertEqual(dn.packed_items[0].warehouse, warehouse) + so.reload() + self.assertEqual(so.per_delivered, 100) + + def test_picklist_with_partial_bundles(self): + # from test_records.json + warehouse = "_Test Warehouse - _TC" + + quantities = [5, 2] + bundle, components = create_product_bundle(quantities, warehouse=warehouse) + + so = make_sales_order(item_code=bundle, qty=4, rate=42) + + pl = create_pick_list(so.name) + for loc in pl.locations: + loc.picked_qty = loc.qty / 2 + + pl.save().submit() + so.reload() + self.assertEqual(so.per_picked, 50) + + # deliver half qty + dn = create_delivery_note(pl.name).submit() + self.assertEqual(dn.items[0].rate, 42) + so.reload() + self.assertEqual(so.per_delivered, 50) + + pl = create_pick_list(so.name) + pl.save().submit() + so.reload() + self.assertEqual(so.per_picked, 100) + + # deliver remaining + dn = create_delivery_note(pl.name).submit() + self.assertEqual(dn.items[0].rate, 42) + so.reload() + self.assertEqual(so.per_delivered, 100) diff --git a/erpnext/stock/doctype/pick_list_item/pick_list_item.json b/erpnext/stock/doctype/pick_list_item/pick_list_item.json index 805286ddcc..a96ebfcdee 100644 --- a/erpnext/stock/doctype/pick_list_item/pick_list_item.json +++ b/erpnext/stock/doctype/pick_list_item/pick_list_item.json @@ -27,6 +27,7 @@ "column_break_15", "sales_order", "sales_order_item", + "product_bundle_item", "material_request", "material_request_item" ], @@ -146,6 +147,7 @@ { "fieldname": "sales_order_item", "fieldtype": "Data", + "hidden": 1, "label": "Sales Order Item", "read_only": 1 }, @@ -177,11 +179,19 @@ "fieldtype": "Data", "label": "Item Group", "read_only": 1 + }, + { + "description": "product bundle item row's name in sales order. Also indicates that picked item is to be used for a product bundle", + "fieldname": "product_bundle_item", + "fieldtype": "Data", + "hidden": 1, + "label": "Product Bundle Item", + "read_only": 1 } ], "istable": 1, "links": [], - "modified": "2021-09-28 12:02:16.923056", + "modified": "2022-04-22 05:27:38.497997", "modified_by": "Administrator", "module": "Stock", "name": "Pick List Item", @@ -190,5 +200,6 @@ "quick_entry": 1, "sort_field": "modified", "sort_order": "DESC", + "states": [], "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index 19c490d37f..983b62a09a 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -24,6 +24,10 @@ "apply_putaway_rule", "is_return", "return_against", + "accounting_dimensions_section", + "cost_center", + "dimension_col_break", + "project", "section_addresses", "supplier_address", "contact_person", @@ -107,7 +111,6 @@ "bill_no", "bill_date", "more_info", - "project", "status", "amended_from", "range", @@ -1143,13 +1146,29 @@ "label": "Represents Company", "options": "Company", "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions" + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" } ], "icon": "fa fa-truck", "idx": 261, "is_submittable": 1, "links": [], - "modified": "2022-04-10 22:50:37.761362", + "modified": "2022-04-26 13:41:32.625197", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt", diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index eb0be460d8..236b944c3a 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -135,7 +135,7 @@ def repost(doc): except Exception: frappe.db.rollback() traceback = frappe.get_traceback() - frappe.log_error(traceback) + doc.log_error("Unable to repost item valuation") message = frappe.message_log.pop() if frappe.message_log else "" if traceback: diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json index c38dfaa1c8..f56e059f81 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.json +++ b/erpnext/stock/doctype/stock_entry/stock_entry.json @@ -46,9 +46,9 @@ "items", "get_stock_and_rate", "section_break_19", - "total_incoming_value", - "column_break_22", "total_outgoing_value", + "column_break_22", + "total_incoming_value", "value_difference", "additional_costs_section", "additional_costs", @@ -374,7 +374,7 @@ { "fieldname": "total_incoming_value", "fieldtype": "Currency", - "label": "Total Incoming Value", + "label": "Total Incoming Value (Receipt)", "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1 @@ -386,7 +386,7 @@ { "fieldname": "total_outgoing_value", "fieldtype": "Currency", - "label": "Total Outgoing Value", + "label": "Total Outgoing Value (Consumption)", "options": "Company:company:default_currency", "print_hide": 1, "read_only": 1 @@ -394,7 +394,7 @@ { "fieldname": "value_difference", "fieldtype": "Currency", - "label": "Total Value Difference (Out - In)", + "label": "Total Value Difference (Incoming - Outgoing)", "options": "Company:company:default_currency", "print_hide_if_no_value": 1, "read_only": 1 @@ -619,7 +619,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2022-02-07 12:55:14.614077", + "modified": "2022-05-02 05:21:39.060501", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry", diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py index e826e003c2..1e59aae9a8 100644 --- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py @@ -30,7 +30,6 @@ class TestStockReconciliation(FrappeTestCase): frappe.db.set_value("Stock Settings", None, "allow_negative_stock", 1) def tearDown(self): - frappe.flags.dont_execute_stock_reposts = None frappe.local.future_sle = {} def test_reco_for_fifo(self): @@ -40,7 +39,9 @@ class TestStockReconciliation(FrappeTestCase): self._test_reco_sle_gle("Moving Average") def _test_reco_sle_gle(self, valuation_method): - se1, se2, se3 = insert_existing_sle(warehouse="Stores - TCP1") + item_code = make_item(properties={"valuation_method": valuation_method}).name + + se1, se2, se3 = insert_existing_sle(warehouse="Stores - TCP1", item_code=item_code) company = frappe.db.get_value("Warehouse", "Stores - TCP1", "company") # [[qty, valuation_rate, posting_date, # posting_time, expected_stock_value, bin_qty, bin_valuation]] @@ -54,11 +55,9 @@ class TestStockReconciliation(FrappeTestCase): ] for d in input_data: - set_valuation_method("_Test Item", valuation_method) - last_sle = get_previous_sle( { - "item_code": "_Test Item", + "item_code": item_code, "warehouse": "Stores - TCP1", "posting_date": d[2], "posting_time": d[3], @@ -67,6 +66,7 @@ class TestStockReconciliation(FrappeTestCase): # submit stock reconciliation stock_reco = create_stock_reconciliation( + item_code=item_code, qty=d[0], rate=d[1], posting_date=d[2], @@ -481,9 +481,11 @@ class TestStockReconciliation(FrappeTestCase): """ from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note + frappe.db.rollback() + # repost will make this test useless, qty should update in realtime without reposts frappe.flags.dont_execute_stock_reposts = True - frappe.db.rollback() + self.addCleanup(frappe.flags.pop, "dont_execute_stock_reposts") item_code = make_item().name warehouse = "_Test Warehouse - _TC" @@ -594,26 +596,26 @@ def create_batch_item_with_batch(item_name, batch_id): b.save() -def insert_existing_sle(warehouse): +def insert_existing_sle(warehouse, item_code="_Test Item"): from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry se1 = make_stock_entry( posting_date="2012-12-15", posting_time="02:00", - item_code="_Test Item", + item_code=item_code, target=warehouse, qty=10, basic_rate=700, ) se2 = make_stock_entry( - posting_date="2012-12-25", posting_time="03:00", item_code="_Test Item", source=warehouse, qty=15 + posting_date="2012-12-25", posting_time="03:00", item_code=item_code, source=warehouse, qty=15 ) se3 = make_stock_entry( posting_date="2013-01-05", posting_time="07:00", - item_code="_Test Item", + item_code=item_code, target=warehouse, qty=15, basic_rate=1200, diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py index 3b18a9ac26..df16643d46 100644 --- a/erpnext/stock/doctype/warehouse/warehouse.py +++ b/erpnext/stock/doctype/warehouse/warehouse.py @@ -36,6 +36,9 @@ class Warehouse(NestedSet): self.set_onload("account", account) load_address_and_contact(self) + def validate(self): + self.warn_about_multiple_warehouse_account() + def on_update(self): self.update_nsm_model() @@ -70,6 +73,53 @@ class Warehouse(NestedSet): self.update_nsm_model() self.unlink_from_items() + def warn_about_multiple_warehouse_account(self): + "If Warehouse value is split across multiple accounts, warn." + + def get_accounts_where_value_is_booked(name): + sle = frappe.qb.DocType("Stock Ledger Entry") + gle = frappe.qb.DocType("GL Entry") + ac = frappe.qb.DocType("Account") + + return ( + frappe.qb.from_(sle) + .join(gle) + .on(sle.voucher_no == gle.voucher_no) + .join(ac) + .on(ac.name == gle.account) + .select(gle.account) + .distinct() + .where((sle.warehouse == name) & (ac.account_type == "Stock")) + .orderby(sle.creation) + .run(as_dict=True) + ) + + if self.is_new(): + return + + old_wh_account = frappe.db.get_value("Warehouse", self.name, "account") + + # WH account is being changed or set get all accounts against which wh value is booked + if self.account != old_wh_account: + accounts = get_accounts_where_value_is_booked(self.name) + accounts = [d.account for d in accounts] + + if not accounts or (len(accounts) == 1 and self.account in accounts): + # if same singular account has stock value booked ignore + return + + warning = _("Warehouse's Stock Value has already been booked in the following accounts:") + account_str = "
" + ", ".join(frappe.bold(ac) for ac in accounts) + reason = "

" + _( + "Booking stock value across multiple accounts will make it harder to track stock and account value." + ) + + frappe.msgprint( + warning + account_str + reason, + title=_("Multiple Warehouse Accounts"), + indicator="orange", + ) + def check_if_sle_exists(self): return frappe.db.exists("Stock Ledger Entry", {"warehouse": self.name}) diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py index ee151b7517..4763b472c2 100644 --- a/erpnext/stock/reorder_item.py +++ b/erpnext/stock/reorder_item.py @@ -136,14 +136,14 @@ def create_material_request(material_requests): mr_list = [] exceptions_list = [] - def _log_exception(): + def _log_exception(mr): if frappe.local.message_log: exceptions_list.extend(frappe.local.message_log) frappe.local.message_log = [] else: exceptions_list.append(frappe.get_traceback()) - frappe.log_error(frappe.get_traceback()) + mr.log_error("Unable to create material request") for request_type in material_requests: for company in material_requests[request_type]: @@ -207,7 +207,7 @@ def create_material_request(material_requests): mr_list.append(mr) except Exception: - _log_exception() + _log_exception(mr) if mr_list: if getattr(frappe.local, "reorder_email_notify", None) is None: diff --git a/erpnext/templates/generators/student_admission.html b/erpnext/templates/generators/student_admission.html deleted file mode 100644 index 8cc58a0a1f..0000000000 --- a/erpnext/templates/generators/student_admission.html +++ /dev/null @@ -1,27 +0,0 @@ - -{% extends "templates/web.html" %} - -{% block breadcrumbs %} - {% include "templates/includes/breadcrumbs.html" %} -{% endblock %} - -{% block header %} - -

{{ title }}

-{% endblock %} - -{% block page_content %} - -{%- if introduction -%} -
{{ introduction }}
-{% endif %} - -{%- if doc.enable_admission_application -%} -

- - {{ _("Apply Now") }} -

-{% endif %} - -{% endblock %} diff --git a/erpnext/templates/includes/assessment/assessment_row.html b/erpnext/templates/includes/assessment/assessment_row.html deleted file mode 100644 index a33ccffc36..0000000000 --- a/erpnext/templates/includes/assessment/assessment_row.html +++ /dev/null @@ -1,19 +0,0 @@ -
-
-
- {{ doc.course }} -
-
- {{ doc.room }} -
-
- {{doc.schedule_date }} -
-
- {{ doc.from_time }} -
-
- {{ doc.to_time }} -
-
-
diff --git a/erpnext/templates/includes/course/course_row.html b/erpnext/templates/includes/course/course_row.html deleted file mode 100644 index fddfc3c17a..0000000000 --- a/erpnext/templates/includes/course/course_row.html +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/erpnext/templates/includes/course/macros.html b/erpnext/templates/includes/course/macros.html deleted file mode 100644 index 334b5ea200..0000000000 --- a/erpnext/templates/includes/course/macros.html +++ /dev/null @@ -1 +0,0 @@ -{% macro back_link(doc) %}&back-to=/courses?course={{ doc.name }}&back-to-title={{ doc.course_name }}{% endmacro %} diff --git a/erpnext/templates/pages/integrations/gocardless_checkout.py b/erpnext/templates/pages/integrations/gocardless_checkout.py index 280f67f16b..655be52c55 100644 --- a/erpnext/templates/pages/integrations/gocardless_checkout.py +++ b/erpnext/templates/pages/integrations/gocardless_checkout.py @@ -96,5 +96,5 @@ def check_mandate(data, reference_doctype, reference_docname): return {"redirect_to": redirect_flow.redirect_url} except Exception as e: - frappe.log_error(e, "GoCardless Payment Error") + frappe.log_error("GoCardless Payment Error") return {"redirect_to": "/integrations/payment-failed"} diff --git a/erpnext/templates/pages/integrations/gocardless_confirmation.py b/erpnext/templates/pages/integrations/gocardless_confirmation.py index cab532a530..559aa4806d 100644 --- a/erpnext/templates/pages/integrations/gocardless_confirmation.py +++ b/erpnext/templates/pages/integrations/gocardless_confirmation.py @@ -60,7 +60,7 @@ def confirm_payment(redirect_flow_id, reference_doctype, reference_docname): try: create_mandate(data) except Exception as e: - frappe.log_error(e, "GoCardless Mandate Registration Error") + frappe.log_error("GoCardless Mandate Registration Error") gateway_controller = get_gateway_controller(reference_docname) frappe.get_doc("GoCardless Settings", gateway_controller).create_payment_request(data) @@ -68,7 +68,7 @@ def confirm_payment(redirect_flow_id, reference_doctype, reference_docname): return {"redirect_to": confirmation_url} except Exception as e: - frappe.log_error(e, "GoCardless Payment Error") + frappe.log_error("GoCardless Payment Error") return {"redirect_to": "/integrations/payment-failed"} @@ -103,4 +103,4 @@ def create_mandate(data): ).insert(ignore_permissions=True) except Exception: - frappe.log_error(frappe.get_traceback()) + frappe.log_error("Gocardless: Unable to create mandate") diff --git a/erpnext/tests/server/agriculture.txt b/erpnext/tests/server/agriculture.txt deleted file mode 100644 index 29dc9ab62d..0000000000 --- a/erpnext/tests/server/agriculture.txt +++ /dev/null @@ -1,4 +0,0 @@ -Disease -Crop -Crop Cycle -Soil Texture \ No newline at end of file diff --git a/erpnext/tests/test_activation.py b/erpnext/tests/test_activation.py new file mode 100644 index 0000000000..b56e2332cf --- /dev/null +++ b/erpnext/tests/test_activation.py @@ -0,0 +1,9 @@ +from frappe.tests.utils import FrappeTestCase + +from erpnext.utilities.activation import get_level + + +class TestActivation(FrappeTestCase): + def test_activation(self): + levels = get_level() + self.assertTrue(levels) diff --git a/erpnext/tests/test_woocommerce.py b/erpnext/tests/test_woocommerce.py deleted file mode 100644 index 663464b6b7..0000000000 --- a/erpnext/tests/test_woocommerce.py +++ /dev/null @@ -1,152 +0,0 @@ -import os -import time -import unittest - -import frappe -import requests - -from erpnext.erpnext_integrations.connectors.woocommerce_connection import order - - -class TestWoocommerce(unittest.TestCase): - def setUp(self): - - woo_settings = frappe.get_doc("Woocommerce Settings") - if not woo_settings.secret: - woo_settings.secret = "ec434676aa1de0e502389f515c38f89f653119ab35e9117c7a79e576" - woo_settings.woocommerce_server_url = "https://woocommerce.mntechnique.com/" - woo_settings.api_consumer_key = "ck_fd43ff5756a6abafd95fadb6677100ce95a758a1" - woo_settings.api_consumer_secret = "cs_94360a1ad7bef7fa420a40cf284f7b3e0788454e" - woo_settings.enable_sync = 1 - woo_settings.company = "_Test Company" - woo_settings.tax_account = "Sales Expenses - _TC" - woo_settings.f_n_f_account = "Expenses - _TC" - woo_settings.creation_user = "Administrator" - woo_settings.save(ignore_permissions=True) - - def test_sales_order_for_woocommerce(self): - frappe.flags.woocomm_test_order_data = { - "id": 75, - "parent_id": 0, - "number": "74", - "order_key": "wc_order_5aa1281c2dacb", - "created_via": "checkout", - "version": "3.3.3", - "status": "processing", - "currency": "INR", - "date_created": "2018-03-08T12:10:04", - "date_created_gmt": "2018-03-08T12:10:04", - "date_modified": "2018-03-08T12:10:04", - "date_modified_gmt": "2018-03-08T12:10:04", - "discount_total": "0.00", - "discount_tax": "0.00", - "shipping_total": "150.00", - "shipping_tax": "0.00", - "cart_tax": "0.00", - "total": "649.00", - "total_tax": "0.00", - "prices_include_tax": False, - "customer_id": 12, - "customer_ip_address": "103.54.99.5", - "customer_user_agent": "mozilla\\/5.0 (x11; linux x86_64) applewebkit\\/537.36 (khtml, like gecko) chrome\\/64.0.3282.186 safari\\/537.36", - "customer_note": "", - "billing": { - "first_name": "Tony", - "last_name": "Stark", - "company": "_Test Company", - "address_1": "Mumbai", - "address_2": "", - "city": "Dadar", - "state": "MH", - "postcode": "123", - "country": "IN", - "email": "tony@gmail.com", - "phone": "123457890", - }, - "shipping": { - "first_name": "Tony", - "last_name": "Stark", - "company": "", - "address_1": "Mumbai", - "address_2": "", - "city": "Dadar", - "state": "MH", - "postcode": "123", - "country": "IN", - }, - "payment_method": "cod", - "payment_method_title": "Cash on delivery", - "transaction_id": "", - "date_paid": "", - "date_paid_gmt": "", - "date_completed": "", - "date_completed_gmt": "", - "cart_hash": "8e76b020d5790066496f244860c4703f", - "meta_data": [], - "line_items": [ - { - "id": 80, - "name": "Marvel", - "product_id": 56, - "variation_id": 0, - "quantity": 1, - "tax_class": "", - "subtotal": "499.00", - "subtotal_tax": "0.00", - "total": "499.00", - "total_tax": "0.00", - "taxes": [], - "meta_data": [], - "sku": "", - "price": 499, - } - ], - "tax_lines": [], - "shipping_lines": [ - { - "id": 81, - "method_title": "Flat rate", - "method_id": "flat_rate:1", - "total": "150.00", - "total_tax": "0.00", - "taxes": [], - "meta_data": [{"id": 623, "key": "Items", "value": "Marvel × 1"}], - } - ], - "fee_lines": [], - "coupon_lines": [], - "refunds": [], - } - order() - - self.assertTrue(frappe.get_value("Customer", {"woocommerce_email": "tony@gmail.com"})) - self.assertTrue(frappe.get_value("Item", {"woocommerce_id": 56})) - self.assertTrue(frappe.get_value("Sales Order", {"woocommerce_id": 75})) - frappe.flags.woocomm_test_order_data = {} - - -def emulate_request(): - # Emulate Woocommerce Request - headers = { - "X-Wc-Webhook-Event": "created", - "X-Wc-Webhook-Signature": "h1SjzQMPwd68MF5bficeFq20/RkQeRLsb9AVCUz/rLs=", - } - # Emulate Request Data - data = """{"id":74,"parent_id":0,"number":"74","order_key":"wc_order_5aa1281c2dacb","created_via":"checkout","version":"3.3.3","status":"processing","currency":"INR","date_created":"2018-03-08T12:10:04","date_created_gmt":"2018-03-08T12:10:04","date_modified":"2018-03-08T12:10:04","date_modified_gmt":"2018-03-08T12:10:04","discount_total":"0.00","discount_tax":"0.00","shipping_total":"150.00","shipping_tax":"0.00","cart_tax":"0.00","total":"649.00","total_tax":"0.00","prices_include_tax":false,"customer_id":12,"customer_ip_address":"103.54.99.5","customer_user_agent":"mozilla\\/5.0 (x11; linux x86_64) applewebkit\\/537.36 (khtml, like gecko) chrome\\/64.0.3282.186 safari\\/537.36","customer_note":"","billing":{"first_name":"Tony","last_name":"Stark","company":"Woocommerce","address_1":"Mumbai","address_2":"","city":"Dadar","state":"MH","postcode":"123","country":"IN","email":"tony@gmail.com","phone":"123457890"},"shipping":{"first_name":"Tony","last_name":"Stark","company":"","address_1":"Mumbai","address_2":"","city":"Dadar","state":"MH","postcode":"123","country":"IN"},"payment_method":"cod","payment_method_title":"Cash on delivery","transaction_id":"","date_paid":null,"date_paid_gmt":null,"date_completed":null,"date_completed_gmt":null,"cart_hash":"8e76b020d5790066496f244860c4703f","meta_data":[],"line_items":[{"id":80,"name":"Marvel","product_id":56,"variation_id":0,"quantity":1,"tax_class":"","subtotal":"499.00","subtotal_tax":"0.00","total":"499.00","total_tax":"0.00","taxes":[],"meta_data":[],"sku":"","price":499}],"tax_lines":[],"shipping_lines":[{"id":81,"method_title":"Flat rate","method_id":"flat_rate:1","total":"150.00","total_tax":"0.00","taxes":[],"meta_data":[{"id":623,"key":"Items","value":"Marvel × 1"}]}],"fee_lines":[],"coupon_lines":[],"refunds":[]}""" - - # Build URL - port = frappe.get_site_config().webserver_port or "8000" - - if os.environ.get("CI"): - host = "localhost" - else: - host = frappe.local.site - - url = "http://{site}:{port}/api/method/erpnext.erpnext_integrations.connectors.woocommerce_connection.order".format( - site=host, port=port - ) - - r = requests.post(url=url, headers=headers, data=data) - - time.sleep(5) - return r diff --git a/erpnext/tests/ui/agriculture.txt b/erpnext/tests/ui/agriculture.txt deleted file mode 100644 index 4622bc0df3..0000000000 --- a/erpnext/tests/ui/agriculture.txt +++ /dev/null @@ -1,7 +0,0 @@ -erpnext/agriculture/doctype/land_unit/test_land_unit.js -erpnext/agriculture/doctype/fertilizer/test_fertilizer.js -erpnext/agriculture/doctype/water_analysis/test_water_analysis.js -erpnext/agriculture/doctype/disease/test_disease.js -erpnext/agriculture/doctype/soil_texture/test_soil_texture.js -erpnext/agriculture/doctype/crop/test_crop.js -erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.js \ No newline at end of file diff --git a/erpnext/tests/ui/make_fixtures.js b/erpnext/tests/ui/make_fixtures.js deleted file mode 100644 index 8c9e50884a..0000000000 --- a/erpnext/tests/ui/make_fixtures.js +++ /dev/null @@ -1,258 +0,0 @@ -$.extend(frappe.test_data, { - // "Fiscal Year": { - // "2017-18": [ - // {"year": "2017-18"}, - // {"year_start_date": "2017-04-01"}, - // {"year_end_date": "2018-03-31"}, - // ] - // }, - "Customer": { - "Test Customer 1": [ - {customer_name: "Test Customer 1"} - ], - "Test Customer 2": [ - {customer_name: "Test Customer 2"} - ], - "Test Customer 3": [ - {customer_name: "Test Customer 3"} - ], - }, - "Item": { - "Test Product 1": [ - {item_code: "Test Product 1"}, - {item_group: "Products"}, - {is_stock_item: 1}, - {standard_rate: 100}, - {opening_stock: 100}, - ], - "Test Product 2": [ - {item_code: "Test Product 2"}, - {item_group: "Products"}, - {is_stock_item: 1}, - {standard_rate: 150}, - {opening_stock: 200}, - ], - "Test Product 3": [ - {item_code: "Test Product 3"}, - {item_group: "Products"}, - {is_stock_item: 1}, - {standard_rate: 250}, - {opening_stock: 100}, - {stock_uom:'Kg'} - ], - "Test Service 1": [ - {item_code: "Test Service 1"}, - {item_group: "Services"}, - {is_stock_item: 0}, - {standard_rate: 200} - ], - "Test Service 2": [ - {item_code: "Test Service 2"}, - {item_group: "Services"}, - {is_stock_item: 0}, - {standard_rate: 300} - ] - }, - "Lead": { - "LEAD-00001": [ - {lead_name: "Test Lead 1"} - ], - "LEAD-00002": [ - {lead_name: "Test Lead 2"} - ], - "LEAD-00003": [ - {lead_name: "Test Lead 3"} - ] - }, - "Address": { - "Test1-Billing": [ - {address_title:"Test1"}, - {address_type: "Billing"}, - {address_line1: "Billing Street 1"}, - {city: "Billing City 1"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 1"} - ] - ]} - ], - "Test1-Shipping": [ - {address_title:"Test1"}, - {address_type: "Shipping"}, - {address_line1: "Shipping Street 1"}, - {city: "Shipping City 1"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 1"} - ] - ]} - ], - "Test1-Warehouse": [ - {address_title:"Test1"}, - {address_type: "Warehouse"}, - {address_line1: "Warehouse Street 1"}, - {city: "Warehouse City 1"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 1"} - ] - ]} - ], - "Test2-Billing": [ - {address_title:"Test2"}, - {address_type: "Billing"}, - {address_line1: "Billing Street 2"}, - {city: "Billing City 2"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 2"} - ] - ]} - ], - "Test2-Shipping": [ - {address_title:"Test2"}, - {address_type: "Shipping"}, - {address_line1: "Shipping Street 2"}, - {city: "Shipping City 2"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 2"} - ] - ]} - ], - "Test2-Warehouse": [ - {address_title:"Test2"}, - {address_type: "Warehouse"}, - {address_line1: "Warehouse Street 2"}, - {city: "Warehouse City 2"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 2"} - ] - ]} - ] - }, - "Contact": { - "Contact 1-Test Customer 1": [ - {first_name: "Contact 1"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 1"} - ] - ]} - ], - "Contact 2-Test Customer 1": [ - {first_name: "Contact 2"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 1"} - ] - ]} - ], - "Contact 1-Test Customer 2": [ - {first_name: "Contact 1"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 2"} - ] - ]} - ], - "Contact 2-Test Customer 2": [ - {first_name: "Contact 2"}, - {links: [ - [ - {link_doctype: "Customer"}, - {link_name: "Test Customer 2"} - ] - ]} - ], - }, - "Price List": { - "Test-Buying-USD": [ - {price_list_name: "Test-Buying-USD"}, - {currency: "USD"}, - {buying: "1"} - ], - "Test-Buying-EUR": [ - {price_list_name: "Test-Buying-EUR"}, - {currency: "EUR"}, - {buying: "1"} - ], - "Test-Selling-USD": [ - {price_list_name: "Test-Selling-USD"}, - {currency: "USD"}, - {selling: "1"} - ], - "Test-Selling-EUR": [ - {price_list_name: "Test-Selling-EUR"}, - {currency: "EUR"}, - {selling: "1"} - ], - }, - "Terms and Conditions": { - "Test Term 1": [ - {title: "Test Term 1"} - ], - "Test Term 2": [ - {title: "Test Term 2"} - ] - }, - "Item Price": { - "ITEM-PRICE-00001": [ - {item_code: 'Test Product 1'}, - {price_list: '_Test Price List'}, - {price_list_rate: 100} - ], - "ITEM-PRICE-00002": [ - {item_code: 'Test Product 2'}, - {price_list: '_Test Price List'}, - {price_list_rate: 200} - ] - }, - "Payment Term": { - "_Test Payment Term": [ - {payment_term_name: '_Test Payment Term'}, - {due_date_based_on: 'Day(s) after invoice date'}, - {invoice_portion: 100}, - {credit_days: 0} - ] - }, - "Payment Terms Template": { - "_Test Payment Term Template UI": [ - {template_name: "_Test Payment Term Template UI"}, - {terms: [ - [ - {payment_term: '_Test Payment Term'}, - {invoice_portion: 100} - ] - ]} - ] - } -}); - - -// this is a script that creates all fixtures -// called as a test -QUnit.module('fixture'); - -QUnit.test('Make fixtures', assert => { - // create all fixtures first - assert.expect(0); - let done = assert.async(); - let tasks = []; - Object.keys(frappe.test_data).forEach(function(doctype) { - tasks.push(function() { - return frappe.tests.setup_doctype(doctype, frappe.test_data[doctype]); - }); - }); - frappe.run_serially(tasks).then(() => done()); -}); diff --git a/erpnext/tests/ui/setup_wizard.js b/erpnext/tests/ui/setup_wizard.js deleted file mode 100644 index ccff785ec9..0000000000 --- a/erpnext/tests/ui/setup_wizard.js +++ /dev/null @@ -1,47 +0,0 @@ -const path = require('path'); -const path_join = path.resolve; -const apps_path = path_join(__dirname, '..', '..', '..', '..'); -const frappe_ui_tests_path = path_join(apps_path, 'frappe', 'frappe', 'tests', 'ui'); - -const login = require(frappe_ui_tests_path + "/login.js")['Login']; -const welcome = require(frappe_ui_tests_path + "/setup_wizard.js")['Welcome']; -const region = require(frappe_ui_tests_path + "/setup_wizard.js")['Region']; -const user = require(frappe_ui_tests_path + "/setup_wizard.js")['User']; - -module.exports = { - before: browser => { - browser - .url(browser.launch_url + '/login') - .waitForElementVisible('body', 5000); - }, - 'Login': login, - 'Welcome': welcome, - 'Region': region, - 'User': user, - 'Domain': browser => { - let slide_selector = '[data-slide-name="domain"]'; - browser - .waitForElementVisible(slide_selector, 2000) - .setValue('select[data-fieldname="domain"]', "Manufacturing") - .click(slide_selector + ' .next-btn'); - }, - 'Brand': browser => { - let slide_selector = '[data-slide-name="brand"]'; - browser - .waitForElementVisible(slide_selector, 2000) - .setValue('input[data-fieldname="company_name"]', "Acme") - .click(slide_selector + " .next-btn"); - }, - 'Organisation': browser => { - let slide_selector = '[data-slide-name="organisation"]'; - browser - .waitForElementVisible(slide_selector, 2000) - .setValue('input[data-fieldname="company_tagline"]', "Build tools for Builders") - .setValue('input[data-fieldname="bank_account"]', "YNG") - .click(slide_selector + " .next-btn"); - }, - - after: browser => { - browser.end(); - }, -}; diff --git a/erpnext/tests/ui/tests.txt b/erpnext/tests/ui/tests.txt deleted file mode 100644 index 5e238e449e..0000000000 --- a/erpnext/tests/ui/tests.txt +++ /dev/null @@ -1,110 +0,0 @@ -erpnext/tests/ui/make_fixtures.js #long -erpnext/accounts/doctype/account/tests/test_account.js -erpnext/accounts/doctype/account/tests/test_make_tax_account.js -erpnext/accounts/doctype/account/tests/test_account_with_number.js -erpnext/accounts/doctype/pricing_rule/tests/test_pricing_rule.js -erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js -erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.js -erpnext/accounts/doctype/shipping_rule/test_shipping_rule.js -erpnext/crm/doctype/opportunity/test_opportunity.js -erpnext/stock/doctype/item/tests/test_item.js -erpnext/selling/doctype/quotation/tests/test_quotation_with_discount_on_grand_total.js -erpnext/selling/doctype/quotation/tests/test_quotation_with_item_wise_discount.js -erpnext/selling/doctype/quotation/tests/test_quotation_with_multi_uom.js -erpnext/selling/doctype/quotation/tests/test_quotation_with_taxes_and_charges.js -erpnext/selling/doctype/quotation/tests/test_quotation_with_shipping_rule.js -erpnext/selling/doctype/quotation/tests/test_quotation.js -erpnext/selling/doctype/sales_order/tests/test_sales_order.js -erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multiple_delivery_date.js -erpnext/selling/doctype/sales_order/tests/test_sales_order_with_item_wise_discount.js -erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multi_uom.js -erpnext/selling/doctype/sales_order/tests/test_sales_order_with_discount_on_grand_total.js -erpnext/selling/doctype/sales_order/tests/test_sales_order_with_taxes_and_charges.js -erpnext/selling/doctype/sales_order/tests/test_sales_order_with_shipping_rule.js -erpnext/selling/doctype/sales_order/tests/test_sales_order_with_pricing_rule.js -erpnext/manufacturing/doctype/workstation/test_workstation.js -erpnext/manufacturing/doctype/operation/test_operation.js -erpnext/manufacturing/doctype/bom/test_bom.js -erpnext/projects/doctype/project/project_timesheet.js -erpnext/hr/doctype/holiday_list/test_holiday_list.js -erpnext/hr/doctype/branch/test_branch.js -erpnext/hr/doctype/leave_block_list/test_leave_block_list.js -erpnext/hr/doctype/department/test_department.js -erpnext/hr/doctype/designation/test_designation.js -erpnext/hr/doctype/employment_type/test_employment_type.js -erpnext/hr/doctype/employee/test_employee.js -erpnext/hr/doctype/employee_attendance_tool/test_employee_attendance_tool.js -erpnext/hr/doctype/attendance/test_attendance.js -erpnext/hr/doctype/leave_type/test_leave_type.js -erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.js -erpnext/hr/doctype/leave_allocation/test_leave_allocation.js -erpnext/hr/doctype/leave_application/test_leave_application.js -erpnext/stock/doctype/warehouse/test_warehouse.js -erpnext/manufacturing/doctype/work_order/test_work_order.js #long -erpnext/accounts/page/pos/test_pos.js -erpnext/selling/page/point_of_sale/tests/test_point_of_sale.js -erpnext/selling/doctype/product_bundle/test_product_bundle.js -erpnext/stock/doctype/delivery_note/test_delivery_note.js -erpnext/stock/doctype/material_request/tests/test_material_request.js -erpnext/stock/doctype/material_request/tests/test_material_request_type_material_issue.js -erpnext/stock/doctype/material_request/tests/test_material_request_type_material_transfer.js -erpnext/stock/doctype/material_request/tests/test_material_request_type_manufacture.js -erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue.js -erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt.js -erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer.js -erpnext/hr/doctype/salary_structure/test_salary_structure.js -erpnext/hr/doctype/salary_slip/test_salary_slip.js -erpnext/hr/doctype/job_opening/test_job_opening.js -erpnext/hr/doctype/job_applicant/test_job_applicant.js -erpnext/hr/doctype/job_offer/test_job_offer.js -erpnext/hr/doctype/appraisal_template/test_appraisal_template.js -erpnext/hr/doctype/appraisal/test_appraisal.js -erpnext/hr/doctype/expense_claim_type/test_expense_claim_type.js -erpnext/hr/doctype/expense_claim/test_expense_claim.js -erpnext/hr/doctype/training_event/tests/test_training_event.js -erpnext/hr/doctype/training_result_employee/test_training_result.js -erpnext/hr/doctype/training_feedback/test_training_feedback.js -erpnext/hr/doctype/loan_type/test_loan_type.js -erpnext/hr/doctype/loan_application/test_loan_application.js -erpnext/hr/doctype/loan/test_loan.js -erpnext/buying/doctype/supplier/test_supplier.js -erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation.js -erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation.js -erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_taxes_and_charges.js -erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice.js -erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment.js -erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment_request.js -erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.js -erpnext/accounts/doctype/payment_entry/tests/test_payment_against_purchase_invoice.js -erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_item_wise_discount.js -erpnext/buying/doctype/purchase_order/tests/test_purchase_order.js -erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_multi_uom.js -erpnext/buying/doctype/purchase_order/tests/test_purchase_order_get_items.js -erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_discount_on_grand_total.js -erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_item_wise_discount.js -erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_taxes_and_charges.js -erpnext/buying/doctype/purchase_order/tests/test_purchase_order_receipt.js -erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.js -erpnext/accounts/doctype/journal_entry/test_journal_entry.js -erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js -erpnext/accounts/doctype/payment_entry/tests/test_payment_entry.js -erpnext/selling/doctype/quotation/tests/test_quotation_submit_cancel_amend.js -erpnext/stock/doctype/batch/test_batch.js -erpnext/accounts/doctype/bank_reconciliation/test_bank_reconciliation.js -erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt_for_serialize_item.js -erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer_for_manufacture.js -erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_subcontract.js -erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue_with_serialize_item.js -erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_repack.js -erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_serialize_item.js -erpnext/accounts/doctype/payment_entry/tests/test_payment_against_invoice.js -erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_last_purchase_rate.js -erpnext/stock/doctype/item_price/test_item_price.js -erpnext/stock/doctype/delivery_note/test_delivery_note_with_margin.js -erpnext/selling/doctype/sales_order/tests/test_sales_order_with_margin.js -erpnext/selling/doctype/quotation/tests/test_quotation_with_margin.js -erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_margin.js -erpnext/hr/doctype/payroll_entry/test_set_salary_components.js -erpnext/hr/doctype/payroll_entry/test_payroll_entry.js -erpnext/accounts/doctype/pricing_rule/tests/test_pricing_rule_with_same_currency.js -erpnext/accounts/doctype/pricing_rule/tests/test_pricing_rule_with_different_currency.js \ No newline at end of file diff --git a/erpnext/tests/ui/tests2.txt b/erpnext/tests/ui/tests2.txt deleted file mode 100644 index e410a83b2e..0000000000 --- a/erpnext/tests/ui/tests2.txt +++ /dev/null @@ -1,46 +0,0 @@ -erpnext/setup/doctype/company/tests/test_company.js -erpnext/crm/doctype/lead/tests/test_lead_individual.js -erpnext/crm/doctype/lead/tests/test_lead_organization.js -erpnext/setup/doctype/company/tests/test_company_production.js -erpnext/hr/doctype/leave_block_list/test_leave_block_list.js -erpnext/hr/doctype/department/test_department.js -erpnext/hr/doctype/designation/test_designation.js -erpnext/education/doctype/academic_year/test_academic_year.js -erpnext/education/doctype/academic_term/test_academic_term.js -erpnext/education/doctype/education_settings/test_education_settings.js -erpnext/education/doctype/student_batch_name/test_student_batch_name.js -erpnext/education/doctype/student_category/test_student_category.js -erpnext/education/doctype/room/test_room.js -erpnext/education/doctype/instructor/test_instructor.js -erpnext/education/doctype/grading_scale/test_grading_scale.js -erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.js -erpnext/education/doctype/assessment_criteria/test_assessment_criteria.js -erpnext/education/doctype/course/test_course.js -erpnext/education/doctype/program/test_program.js -erpnext/education/doctype/guardian/test_guardian.js -erpnext/education/doctype/student_admission/test_student_admission.js -erpnext/education/doctype/student_applicant/tests/test_student_applicant_dummy_data.js -erpnext/education/doctype/student_applicant/tests/test_student_applicant.js -erpnext/education/doctype/student_applicant/tests/test_student_applicant_options.js -erpnext/education/doctype/student_log/test_student_log.js -erpnext/education/doctype/student_group/test_student_group.js -erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.js -erpnext/education/doctype/student_leave_application/test_student_leave_application.js -erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.js -erpnext/education/doctype/student_attendance/test_student_attendance.js -erpnext/education/doctype/assessment_group/test_assessment_group.js -erpnext/education/doctype/assessment_plan/test_assessment_plan.js -erpnext/education/doctype/assessment_result/test_assessment_result.js -erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.js -erpnext/projects/doctype/task/tests/test_task_tree.js -erpnext/restaurant/doctype/restaurant/test_restaurant.js -erpnext/restaurant/doctype/restaurant_table/test_restaurant_table.js -erpnext/restaurant/doctype/restaurant_menu/test_restaurant_menu.js -erpnext/restaurant/doctype/restaurant_order_entry/restaurant_order_entry.js -erpnext/non_profit/doctype/membership_type/test_membership_type.js -erpnext/non_profit/doctype/member/test_member.js -erpnext/non_profit/doctype/volunteer_type/test_volunteer_type.js -erpnext/non_profit/doctype/volunteer/test_volunteer.js -erpnext/non_profit/doctype/donor_type/test_donor_type.js -erpnext/non_profit/doctype/donor/test_donor.js -erpnext/non_profit/doctype/grant_application/test_grant_application.js \ No newline at end of file diff --git a/erpnext/tests/ui_test_bulk_transaction_processing.py b/erpnext/tests/ui_test_bulk_transaction_processing.py deleted file mode 100644 index a0dc76d54f..0000000000 --- a/erpnext/tests/ui_test_bulk_transaction_processing.py +++ /dev/null @@ -1,21 +0,0 @@ -import frappe - -from erpnext.bulk_transaction.doctype.bulk_transaction_logger.test_bulk_transaction_logger import ( - create_company, - create_customer, - create_item, - create_so, -) - - -@frappe.whitelist() -def create_records(): - create_company() - create_customer() - create_item() - - gd = frappe.get_doc("Global Defaults") - gd.set("default_company", "Test Bulk") - gd.save() - frappe.clear_cache() - create_so() diff --git a/erpnext/tests/ui_test_helpers.py b/erpnext/tests/ui_test_helpers.py deleted file mode 100644 index 44834c8a77..0000000000 --- a/erpnext/tests/ui_test_helpers.py +++ /dev/null @@ -1,75 +0,0 @@ -import frappe -from frappe.utils import getdate - - -@frappe.whitelist() -def create_employee_records(): - create_company() - create_missing_designation() - - frappe.db.sql("DELETE FROM tabEmployee WHERE company='Test Org Chart'") - - emp1 = create_employee("Test Employee 1", "CEO") - emp2 = create_employee("Test Employee 2", "CTO") - emp3 = create_employee("Test Employee 3", "Head of Marketing and Sales", emp1) - emp4 = create_employee("Test Employee 4", "Project Manager", emp2) - emp5 = create_employee("Test Employee 5", "Engineer", emp2) - emp6 = create_employee("Test Employee 6", "Analyst", emp3) - emp7 = create_employee("Test Employee 7", "Software Developer", emp4) - - employees = [emp1, emp2, emp3, emp4, emp5, emp6, emp7] - return employees - - -@frappe.whitelist() -def get_employee_records(): - return frappe.db.get_list( - "Employee", filters={"company": "Test Org Chart"}, pluck="name", order_by="name" - ) - - -def create_company(): - company = frappe.db.exists("Company", "Test Org Chart") - if not company: - company = ( - frappe.get_doc( - { - "doctype": "Company", - "company_name": "Test Org Chart", - "country": "India", - "default_currency": "INR", - } - ) - .insert() - .name - ) - - return company - - -def create_employee(first_name, designation, reports_to=None): - employee = frappe.db.exists("Employee", {"first_name": first_name, "designation": designation}) - if not employee: - employee = ( - frappe.get_doc( - { - "doctype": "Employee", - "first_name": first_name, - "company": "Test Org Chart", - "gender": "Female", - "date_of_birth": getdate("08-12-1998"), - "date_of_joining": getdate("01-01-2021"), - "designation": designation, - "reports_to": reports_to, - } - ) - .insert() - .name - ) - - return employee - - -def create_missing_designation(): - if not frappe.db.exists("Designation", "CTO"): - frappe.get_doc({"doctype": "Designation", "designation_name": "CTO"}).insert() diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index 98666bf11c..d1c21469f8 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -360,7 +360,7 @@ Bank Statement,Kontoauszug, Bank Statement Settings,Kontoauszug Einstellungen, Bank Statement balance as per General Ledger,Kontoauszug Bilanz nach Hauptbuch, Bank account cannot be named as {0},Bankname {0} ungültig, -Bank/Cash transactions against party or for internal transfer,Bank / Geldgeschäfte gegen Partei oder für die interne Übertragung, +Bank/Cash transactions against party or for internal transfer,Bank-/Bargeldtransaktionen mit einer Partei oder intern, Banking,Bankwesen, Banking and Payments,Bank- und Zahlungsverkehr, Barcode {0} already used in Item {1},Barcode {0} wird bereits für Artikel {1} verwendet, @@ -1098,7 +1098,7 @@ From Datetime,Von Datum und Uhrzeit, From Delivery Note,Von Lieferschein, From Fiscal Year,Ab dem Geschäftsjahr, From GSTIN,Von GSTIN, -From Party Name,Von Party Name, +From Party Name,Name des Absenders, From Pin Code,Von Pin-Code, From Place,Von Ort, From Range has to be less than To Range,Von-Bereich muss kleiner sein als Bis-Bereich, @@ -1174,7 +1174,7 @@ Gross Profit / Loss,Bruttogewinn / Verlust, Gross Purchase Amount,Bruttokaufbetrag, Gross Purchase Amount is mandatory,Bruttokaufbetrag ist erforderlich, Group by Account,Gruppieren nach Konto, -Group by Party,Gruppieren nach Parteien, +Group by Party,Gruppieren nach Partei, Group by Voucher,Gruppieren nach Beleg, Group by Voucher (Consolidated),Gruppieren nach Beleg (konsolidiert), Group node warehouse is not allowed to select for transactions,Gruppenknoten Lager ist nicht für Transaktionen zu wählen erlaubt, @@ -1873,12 +1873,12 @@ Parents Teacher Meeting Attendance,Eltern Lehrer Treffen Teilnahme, Part-time,Teilzeit, Partially Depreciated,Teilweise abgeschrieben, Partially Received,Teilweise erhalten, -Party,Gruppe, -Party Name,Name, -Party Type,Gruppen-Typ, -Party Type and Party is mandatory for {0} account,Party Type und Party ist für das Konto {0} obligatorisch, -Party Type is mandatory,Party-Typ ist Pflicht, -Party is mandatory,Partei ist obligatorisch, +Party,Partei, +Party Name,Name der Partei, +Party Type,Partei-Typ, +Party Type and Party is mandatory for {0} account,Partei-Typ und Partei sind Pflichtfelder für Konto {0}, +Party Type is mandatory,Partei-Typ ist ein Pflichtfeld, +Party is mandatory,Partei ist ein Pflichtfeld, Password,Passwort, Password policy for Salary Slips is not set,Die Kennwortrichtlinie für Gehaltsabrechnungen ist nicht festgelegt, Past Due Date,Fälligkeitsdatum, @@ -2039,10 +2039,10 @@ Please select Existing Company for creating Chart of Accounts,Bitte wählen Sie Please select Healthcare Service,Bitte wählen Sie Gesundheitsdienst, "Please select Item where ""Is Stock Item"" is ""No"" and ""Is Sales Item"" is ""Yes"" and there is no other Product Bundle","Bitte einen Artikel auswählen, bei dem ""Ist Lagerartikel"" mit ""Nein"" und ""Ist Verkaufsartikel"" mit ""Ja"" bezeichnet ist, und es kein anderes Produkt-Bundle gibt", Please select Maintenance Status as Completed or remove Completion Date,Bitte wählen Sie Wartungsstatus als erledigt oder entfernen Sie das Abschlussdatum, -Please select Party Type first,Bitte zuerst Gruppentyp auswählen, +Please select Party Type first,Bitte zuerst Partei-Typ auswählen, Please select Patient,Bitte einen Patienten auswählen, Please select Patient to get Lab Tests,"Bitte wählen Sie Patient, um Labortests zu erhalten", -Please select Posting Date before selecting Party,Bitte wählen Sie Buchungsdatum vor dem Party-Auswahl, +Please select Posting Date before selecting Party,Bitte erst Buchungsdatum und dann die Partei auswählen, Please select Posting Date first,Bitte zuerst ein Buchungsdatum auswählen, Please select Price List,Bitte eine Preisliste auswählen, Please select Program,Bitte wählen Sie Programm, @@ -2184,7 +2184,7 @@ Process Day Book Data,Tagesbuchdaten verarbeiten, Process Master Data,Stammdaten bearbeiten, Processing Chart of Accounts and Parties,Verarbeiten des Kontenplans und der Parteien, Processing Items and UOMs,Verarbeiten von Artikeln und Mengeneinheiten, -Processing Party Addresses,Bearbeiteradressen, +Processing Party Addresses,Verarbeitung der Adressen der Parteien, Processing Vouchers,Bearbeitung von Gutscheinen, Procurement,Beschaffung, Produced Qty,Produzierte Menge, @@ -2488,8 +2488,8 @@ Row {0}: From Time and To Time of {1} is overlapping with {2},Zeile {0}: Zeitüb Row {0}: From time must be less than to time,Zeile {0}: Von Zeit zu Zeit muss kleiner sein, Row {0}: Hours value must be greater than zero.,Row {0}: Stunden-Wert muss größer als Null sein., Row {0}: Invalid reference {1},Zeile {0}: Ungültige Referenz {1}, -Row {0}: Party / Account does not match with {1} / {2} in {3} {4},Zeile {0}: Gruppe / Konto stimmt nicht mit {1} / {2} in {3} {4} überein, -Row {0}: Party Type and Party is required for Receivable / Payable account {1},Zeile {0}: Gruppen-Typ und Gruppe sind für Forderungen-/Verbindlichkeiten-Konto {1} zwingend erforderlich, +Row {0}: Party / Account does not match with {1} / {2} in {3} {4},Zeile {0}: Partei / Konto stimmt nicht mit {1} / {2} in {3} {4} überein, +Row {0}: Party Type and Party is required for Receivable / Payable account {1},Zeile {0}: Partei-Typ und Partei sind für Forderungen-/Verbindlichkeiten-Konto {1} zwingend erforderlich, Row {0}: Payment against Sales/Purchase Order should always be marked as advance,"Zeile {0}: ""Zahlung zu Auftrag bzw. Bestellung"" sollte immer als ""Vorkasse"" eingestellt werden", Row {0}: Please check 'Is Advance' against Account {1} if this is an advance entry.,"Zeile {0}: Wenn es sich um eine Vorkasse-Buchung handelt, bitte ""Ist Vorkasse"" zu Konto {1} anklicken, .", Row {0}: Please set at Tax Exemption Reason in Sales Taxes and Charges,Zeile {0}: Bitte setzen Sie den Steuerbefreiungsgrund in den Umsatzsteuern und -gebühren, @@ -3047,7 +3047,7 @@ To Deliver,Auszuliefern, To Deliver and Bill,Auszuliefern und Abzurechnen, To Fiscal Year,Bis zum Geschäftsjahr, To GSTIN,Zu GSTIN, -To Party Name,Zum Party-Namen, +To Party Name,Name des Empfängers, To Pin Code,PIN-Code, To Place,Hinstellen, To Receive,Zu empfangen, @@ -3058,7 +3058,7 @@ To create a Payment Request reference document is required,Zur Erstellung eines To date can not be equal or less than from date,Bis heute kann nicht gleich oder weniger als von Datum sein, To date can not be less than from date,Bis heute kann nicht weniger als von Datum sein, To date can not greater than employee's relieving date,Bis heute kann nicht mehr als Entlastungsdatum des Mitarbeiters sein, -"To filter based on Party, select Party Type first","Um auf der Grundlage von Gruppen zu filtern, bitte zuerst den Gruppentyp wählen", +"To filter based on Party, select Party Type first","Bitte Partei-Typ wählen um nach Partei zu filtern", "To get the best out of ERPNext, we recommend that you take some time and watch these help videos.","Um ERPNext bestmöglich zu nutzen, empfehlen wir Ihnen, sich die Zeit zu nehmen diese Hilfevideos anzusehen.", "To include tax in row {0} in Item rate, taxes in rows {1} must also be included","Um Steuern im Artikelpreis in Zeile {0} einzubeziehen, müssen Steuern in den Zeilen {1} ebenfalls einbezogen sein", To make Customer based incentive schemes.,Um Kunden basierte Anreizsysteme zu machen., @@ -4550,7 +4550,7 @@ Company Account,Firmenkonto, Account Subtype,Kontosubtyp, Is Default Account,Ist Standardkonto, Is Company Account,Ist Unternehmenskonto, -Party Details,Party Details, +Party Details,Details der Partei, Account Details,Kontendaten, IBAN,IBAN, Bank Account No,Bankkonto Nr, @@ -4786,9 +4786,9 @@ Payment Order,Zahlungsauftrag, Subscription Section,Abonnementbereich, Journal Entry Account,Journalbuchungskonto, Account Balance,Kontostand, -Party Balance,Gruppen-Saldo, +Party Balance,Saldo der Partei, Accounting Dimensions,Abrechnungsdimensionen, -If Income or Expense,Wenn Ertrag oder Aufwand, +If Income or Expense,Wenn Ertrag oder Aufwand, Exchange Rate,Wechselkurs, Debit in Company Currency,Soll in Unternehmenswährung, Credit in Company Currency,(Gut)Haben in Unternehmenswährung, @@ -4829,11 +4829,11 @@ Name of the Monthly Distribution,Bezeichnung der monatsweisen Verteilung, Monthly Distribution Percentages,Prozentuale Aufteilungen der monatsweisen Verteilung, Monthly Distribution Percentage,Prozentuale Aufteilung der monatsweisen Verteilung, Percentage Allocation,Prozentuale Aufteilung, -Create Missing Party,Erstelle fehlende Partei, +Create Missing Party,Fehlende Partei erstellen, Create missing customer or supplier.,Erstelle einen fehlenden Kunden oder Lieferanten., Opening Invoice Creation Tool Item,Eröffnen des Rechnungserstellungswerkzeugs, Temporary Opening Account,Temporäres Eröffnungskonto, -Party Account,Gruppenkonto, +Party Account,Konto der Partei, Type of Payment,Zahlungsart, ACC-PAY-.YYYY.-,ACC-PAY-.JJJJ.-, Receive,Empfangen, @@ -4842,7 +4842,7 @@ Payment Order Status,Zahlungsauftragsstatus, Payment Ordered,Zahlung bestellt, Payment From / To,Zahlung von / an, Company Bank Account,Firmenkonto, -Party Bank Account,Party-Bankkonto, +Party Bank Account,Bankkonto der Partei, Account Paid From,Ausgangskonto, Account Paid To,Eingangskonto, Paid Amount (Company Currency),Gezahlter Betrag (Unternehmenswährung), @@ -4946,7 +4946,7 @@ Is Cumulative,Ist kumulativ, Coupon Code Based,Gutscheincode basiert, Discount on Other Item,Rabatt auf andere Artikel, Apply Rule On Other,Regel auf andere anwenden, -Party Information,Party Informationen, +Party Information,Informationen zur Partei, Quantity and Amount,Menge und Menge, Min Qty,Mindestmenge, Max Qty,Maximalmenge, @@ -5048,7 +5048,7 @@ Group same items,Gruppe gleichen Artikel, Print Language,Drucksprache, "Once set, this invoice will be on hold till the set date","Einmal eingestellt, wird diese Rechnung bis zum festgelegten Datum gehalten", Credit To,Gutschreiben auf, -Party Account Currency,Gruppenkonten-Währung, +Party Account Currency,Währung des Kontos der Partei, Against Expense Account,Zu Aufwandskonto, Inter Company Invoice Reference,Unternehmensübergreifende Rechnungsreferenz, Is Internal Supplier,Ist interner Lieferant, @@ -5650,7 +5650,7 @@ From Time ,Von-Zeit, Campaign Email Schedule,Kampagnen-E-Mail-Zeitplan, Send After (days),Senden nach (Tage), Signed,Unterzeichnet, -Party User,Party Benutzer, +Party User,Benutzer der Partei, Unsigned,Nicht unterzeichnet, Fulfilment Status,Erfüllungsstatus, N/A,nicht verfügbar, @@ -8598,7 +8598,7 @@ Territory-wise Sales,Gebietsbezogene Verkäufe, Total Stock Summary,Gesamt Stock Zusammenfassung, Trial Balance,Probebilanz, Trial Balance (Simple),Probebilanz (einfach), -Trial Balance for Party,Summen- und Saldenliste für Gruppe, +Trial Balance for Party,Summen- und Saldenliste für Partei, Unpaid Expense Claim,Ungezahlte Spesenabrechnung, Warehouse wise Item Balance Age and Value,Lagerweise Item Balance Alter und Wert, Work Order Stock Report,Arbeitsauftragsbericht, @@ -9533,7 +9533,7 @@ Account {0} exists in parent company {1}.,Konto {0} existiert in der Muttergesel "To overrule this, enable '{0}' in company {1}","Um dies zu überschreiben, aktivieren Sie '{0}' in Firma {1}", Invalid condition expression,Ungültiger Bedingungsausdruck, Please Select a Company First,Bitte wählen Sie zuerst eine Firma aus, -Please Select Both Company and Party Type First,Bitte wählen Sie zuerst Firmen- und Partytyp aus, +Please Select Both Company and Party Type First,Bitte zuerst Unternehmen und Partei-Typ auswählen, Provide the invoice portion in percent,Geben Sie den Rechnungsanteil in Prozent an, Give number of days according to prior selection,Geben Sie die Anzahl der Tage gemäß vorheriger Auswahl an, Email Details,E-Mail-Details, diff --git a/erpnext/translations/ru.csv b/erpnext/translations/ru.csv index 6703da6063..6ca3344767 100644 --- a/erpnext/translations/ru.csv +++ b/erpnext/translations/ru.csv @@ -155,7 +155,7 @@ Advance Payments,Авансовые платежи, Advance account currency should be same as company currency {0},"Валюта авансового счета должна быть такой же, как и валюта компании {0}", Advance amount cannot be greater than {0} {1},"Предварительная сумма не может быть больше, чем {0} {1}", Advertising,Реклама, -Aerospace,авиационно-космический, +Aerospace,Авиационно-космический, Against,Против, Against Account,Со счета, Against Journal Entry {0} does not have any unmatched {1} entry,Против Запись в журнале {0} не имеет никакого непревзойденную {1} запись, @@ -208,7 +208,7 @@ Amount After Depreciation,Сумма после амортизации, Amount of Integrated Tax,Сумма Интегрированного Налога, Amount of TDS Deducted,Количество вычитаемых TDS, Amount should not be less than zero.,Сумма не должна быть меньше нуля., -Amount to Bill,"Сумма, Биллу", +Amount to Bill,"Сумма к оплате", Amount {0} {1} against {2} {3},Сумма {0} {1} против {2} {3}, Amount {0} {1} deducted against {2},Сумма {0} {1} вычтены {2}, Amount {0} {1} transferred from {2} to {3},Сумма {0} {1} переведен из {2} до {3}, @@ -254,7 +254,7 @@ Approving Role cannot be same as role the rule is Applicable To,"Утвержд Approving User cannot be same as user the rule is Applicable To,"Утвержденный Пользователь не может быть тем же пользователем, к которому применимо правило", "Apps using current key won't be able to access, are you sure?","Приложения, использующие текущий ключ, не смогут получить доступ, вы уверены?", Are you sure you want to cancel this appointment?,Вы действительно хотите отменить эту встречу?, -Arrear,задолженность, +Arrear,Задолженность, As Examiner,Как экзаменатор, As On Date,По состоянию на Дату, As Supervisor,Как супервизор, @@ -347,7 +347,7 @@ Balance Qty,Баланс Кол-во, Balance Sheet,Балансовый отчет, Balance Value,Валюта баланса, Balance for Account {0} must always be {1},Весы для счета {0} должен быть всегда {1}, -Bank,Банк:, +Bank,Банк, Bank Account,Банковский счет, Bank Accounts,Банковские счета, Bank Draft,Банковский счет, @@ -358,7 +358,7 @@ Bank Reconciliation,Банковская сверка, Bank Reconciliation Statement,Банковская сверка состояние, Bank Statement,Выписка из банка, Bank Statement Settings,Настройки банковских выписок, -Bank Statement balance as per General Ledger,Банк балансовый отчет за Главную книгу, +Bank Statement balance as per General Ledger,Баланс банковской выписки согласно бухгалтерской книге, Bank account cannot be named as {0},Банковский счет не может быть назван {0}, Bank/Cash transactions against party or for internal transfer,Банк / Кассовые операции против партии или для внутренней передачи, Banking,Банковские операции, @@ -639,10 +639,10 @@ Could not submit some Salary Slips,Не удалось отправить нек "Could not update stock, invoice contains drop shipping item.","Не удалось обновить запасы, счет-фактура содержит продукт прямой доставки.", Country wise default Address Templates,Шаблоны адресов по умолчанию для разных стран, Course,Курс, -Course Code: ,Код курса:, +Course Code: ,Код курса: , Course Enrollment {0} does not exists,Зачисление на курс {0} не существует, Course Schedule,Расписание курса, -Course: ,Курс:, +Course: ,Курс: , Cr,Cr, Create,Создать, Create BOM,Создать спецификацию, @@ -1023,8 +1023,8 @@ Fees,Оплаты, Female,Женский, Fetch Data,Получение данных, Fetch Subscription Updates,Получение обновлений подписки, -Fetch exploded BOM (including sub-assemblies),Fetch разобранном BOM (в том числе узлов), -Fetching records......,Получение записей ......, +Fetch exploded BOM (including sub-assemblies),Получить развернутую спецификацию (включая узлы), +Fetching records......,Получение записей......, Field Name,Имя поля, Fieldname,Имя поля, Fields,Поля, @@ -1056,7 +1056,7 @@ Fixed Asset,Основное средство, Fixed Asset Item must be a non-stock item.,Элемент основных средств не может быть элементом запасов., Fixed Assets,Основные средства, Following Material Requests have been raised automatically based on Item's re-order level,Следующие запросы на материалы были созданы автоматически на основании минимального уровня запасов продукта, -Following accounts might be selected in GST Settings:,В настройках GST можно выбрать следующие учетные записи:, +Following accounts might be selected in GST Settings:,В настройках НДС можно выбрать следующие учетные записи:, Following course schedules were created,Были составлены графики курсов, Following item {0} is not marked as {1} item. You can enable them as {1} item from its Item master,Следующий элемент {0} не помечен как элемент {1}. Вы можете включить их как {1} из своего элемента, Following items {0} are not marked as {1} item. You can enable them as {1} item from its Item master,Следующие элементы {0} не помечены как {1}. Вы можете включить их как {1} из своего элемента, @@ -1109,7 +1109,7 @@ From date can not be less than employee's joining date,От даты не мож From value must be less than to value in row {0},"От значение должно быть меньше, чем значение в строке {0}", From {0} | {1} {2},С {0} | {1} {2}, Fuel Price,Топливо Цена, -Fuel Qty,Топливо Кол-во, +Fuel Qty,Топливо кол-во, Fulfillment,свершение, Full,Полный, Full Name,Полное имя, @@ -1154,7 +1154,7 @@ Goal and Procedure,Цель и процедура, Goals cannot be empty,Цели не могут быть пустыми, Goods In Transit,Товары в пути, Goods Transferred,Товар передан, -Goods and Services Tax (GST India),Налог на товары и услуги (GST India), +Goods and Services Tax (GST India),Налог на товары и услуги (НДС Индия), Goods are already received against the outward entry {0},Товар уже получен против выездной записи {0}, Government,Правительство, Grand Total,Общий итог, @@ -1185,7 +1185,7 @@ Guardian2 Mobile No,Guardian2 Mobile №, Guardian2 Name,Имя Guardian2, Guest,Гость, HR Manager,Менеджер отдела кадров, -HSN,HSN, +HSN,ГСК, HSN/SAC,HSN / SAC, Half Day,Полдня, Half Day Date is mandatory,Полдня Дата обязательна, @@ -1229,7 +1229,7 @@ Human Resource,Кадры, Human Resources,Персонал, IFSC Code,Код IFSC, IGST Amount,Сумма IGST, -IP Address,Айпи адрес, +IP Address,IP адрес, ITC Available (whether in full op part),ITC Доступен (будь то в полной части оп), ITC Reversed,ITC наоборот, Identifying Decision Makers,"Определение лиц, принимающих решения", @@ -1255,7 +1255,7 @@ In Maintenance,В обеспечении, In Production,В производстве, In Qty,В кол-ве, In Stock Qty,В наличии Кол-во, -In Stock: ,В наличии:, +In Stock: ,В наличии: , In Value,В цене, "In the case of multi-tier program, Customers will be auto assigned to the concerned tier as per their spent",В случае многоуровневой программы Клиенты будут автоматически назначены соответствующему уровню в соответствии с затраченными, Inactive,Неактивный, @@ -1270,7 +1270,7 @@ Income Account,Счет Доходов, Income Tax,Подоходный налог, Incoming,Входящий, Incoming Rate,Входящая цена, -Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction.,"Неверное количество Главная книга найдено. Вы, возможно, выбран неправильный счет в сделке.", +Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction.,"Обнаружено неверное количество записей в бухгалтерской книге. Возможно, вы выбрали неверный счет в транзакции.", Increment cannot be 0,Прирост не может быть 0, Increment for Attribute {0} cannot be 0,Прирост за атрибут {0} не может быть 0, Indirect Expenses,Косвенные расходы, @@ -1339,11 +1339,11 @@ Issued,Запрошено, Issues,Вопросов, It is needed to fetch Item Details.,Это необходимо для отображения подробностей продукта., Item,Продукт, -Item 1,Пункт 1, -Item 2,Пункт 2, -Item 3,Пункт 3, -Item 4,Пункт 4, -Item 5,Пункт 5, +Item 1,Продукт 1, +Item 2,Продукт 2, +Item 3,Продукт 3, +Item 4,Продукт 4, +Item 5,Продукт 5, Item Cart,Продуктовая корзина, Item Code,Код продукта, Item Code cannot be changed for Serial No.,Код товара не может быть изменен для серийный номер, @@ -1357,7 +1357,7 @@ Item Price added for {0} in Price List {1},Цена продукта {0} доб "Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, UOM, Qty and Dates.","Цена товара отображается несколько раз на основе Прайс-листа, Поставщика / Клиента, Валюты, Предмет, UOM, Кол-во и Даты.", Item Price updated for {0} in Price List {1},Цена продукта {0} обновлена в прайс-листе {1}, Item Row {0}: {1} {2} does not exist in above '{1}' table,Элемент Row {0}: {1} {2} не существует в таблице «{1}», -Item Tax Row {0} must have account of type Tax or Income or Expense or Chargeable,Пункт Налоговый ряд {0} должен иметь учетную запись типа налога или доходов или расходов или платная, +Item Tax Row {0} must have account of type Tax or Income or Expense or Chargeable,"Строка налога {0} должен иметь счет типа Налога, Доход, Расходов или Облагаемый налогом," Item Template,Шаблон продукта, Item Variant Settings,Параметры модификации продкута, Item Variant {0} already exists with same attributes,Модификация продукта {0} с этими атрибутами уже существует, @@ -1372,17 +1372,17 @@ Item {0} does not exist in the system or has expired,Продукт {0} не с Item {0} has already been returned,Продукт {0} уже возвращен, Item {0} has been disabled,Продукт {0} не годен, Item {0} has reached its end of life on {1},Пункт {0} достигла своей жизни на {1}, -Item {0} ignored since it is not a stock item,"Пункт {0} игнорируется, так как это не складские позиции", -"Item {0} is a template, please select one of its variants","Пункт {0} шаблона, выберите один из его вариантов", -Item {0} is cancelled,Пункт {0} отменяется, -Item {0} is disabled,Пункт {0} отключена, +Item {0} ignored since it is not a stock item,"Товар {0} игнорируется, так как это не складские позиции", +"Item {0} is a template, please select one of its variants","Объект {0} это шаблон, выберите один из его вариантов", +Item {0} is cancelled,Продукт {0} отменен, +Item {0} is disabled,Продукт {0} отключен, Item {0} is not a serialized Item,Пункт {0} не сериализованным Пункт, Item {0} is not a stock Item,Продукта {0} нет на складе, Item {0} is not active or end of life has been reached,Пункт {0} не является активным или конец жизни был достигнут, Item {0} is not setup for Serial Nos. Check Item master,Пункт {0} не установка для мастера серийные номера Проверить товара, Item {0} is not setup for Serial Nos. Column must be blank,Пункт {0} не установка для серийные номера колонке должно быть пустым, -Item {0} must be a Fixed Asset Item,Пункт {0} должен быть Fixed Asset Item, -Item {0} must be a Sub-contracted Item,Пункт {0} должен быть Субдоговорная Пункт, +Item {0} must be a Fixed Asset Item,Объект {0} должен быть объектом основных средств, +Item {0} must be a Sub-contracted Item,Объект {0} должен быть Субдоговорная Пункт, Item {0} must be a non-stock item,Продукт {0} должен отсутствовать на складе, Item {0} must be a stock Item,Продукт {0} должен быть в наличии, Item {0} not found,Продукт {0} не найден, @@ -1456,7 +1456,7 @@ Leaves has been granted sucessfully,Листья были успешно пре Leaves must be allocated in multiples of 0.5,"Листья должны быть выделены несколько 0,5", Leaves per Year,Листья в год, Ledger,Регистр, -Legal,легальный, +Legal,Легальный, Legal Expenses,Судебные издержки, Letter Head,Печатный бланк, Letter Heads for print templates.,Письмо главы для шаблонов печати., @@ -1470,7 +1470,7 @@ Link to Material Request,Ссылка на запрос материала, List of all share transactions,Список всех сделок с акциями, List of available Shareholders with folio numbers,Список доступных акционеров с номерами фолио, Loading Payment System,Загрузка платежной системы, -Loan,ссуда, +Loan,Ссуда, Loan Amount cannot exceed Maximum Loan Amount of {0},Сумма кредита не может превышать максимальный Сумма кредита {0}, Loan Application,Заявка на получение ссуды, Loan Management,Управление кредитами, @@ -1540,14 +1540,14 @@ Marketplace,Торговая площадка, Marketplace Error,Ошибка рынка, Masters,Мастеры, Match Payments with Invoices,Соответствие Платежи с счетов-фактур, -Match non-linked Invoices and Payments.,"Подходим, не связанных Счета и платежи.", -Material,материал, +Match non-linked Invoices and Payments.,Сопоставьте несвязанные счета и платежи., +Material,Материал, Material Consumption,Расход материала, Material Consumption is not set in Manufacturing Settings.,Потребление материала не задано в настройках производства., Material Receipt,Материал Поступление, Material Request,Запрос материала, Material Request Date,Дата заявки на материал, -Material Request No,Материал Запрос Нет, +Material Request No,Запрос материалов №, "Material Request not created, as quantity for Raw Materials already available.","Запрос материала не создан, так как количество сырья уже доступно.", Material Request of maximum {0} can be made for Item {1} against Sales Order {2},Максимум {0} заявок на материал может быть сделано для продукта {1} по Сделке {2}, Material Request to Purchase Order,Материал Заказать орденом, @@ -1559,7 +1559,7 @@ Material to Supplier,Материал Поставщику, Max Exemption Amount cannot be greater than maximum exemption amount {0} of Tax Exemption Category {1},Максимальная сумма освобождения не может превышать максимальную сумму освобождения {0} для категории налоговых освобождений {1}, Max benefits should be greater than zero to dispense benefits,"Максимальные преимущества должны быть больше нуля, чтобы распределять преимущества", Max discount allowed for item: {0} is {1}%,Макс скидка позволило пункта: {0} {1}%, -Max: {0},Max: {0}, +Max: {0},Макс.: {0}, Maximum Samples - {0} can be retained for Batch {1} and Item {2}.,Максимальные образцы - {0} могут сохраняться для Batch {1} и Item {2}., Maximum Samples - {0} have already been retained for Batch {1} and Item {2} in Batch {3}.,Максимальные образцы - {0} уже сохранены для Batch {1} и Item {2} в пакете {3}., Maximum amount eligible for the component {0} exceeds {1},"Максимальное количество, подходящее для компонента {0}, превышает {1}", @@ -1627,7 +1627,7 @@ Multiple Variants,Несколько вариантов, Multiple fiscal years exist for the date {0}. Please set company in Fiscal Year,"Несколько финансовых лет существуют на дату {0}. Пожалуйста, установите компанию в финансовый год", Music,Музыка, My Account,Мой аккаунт, -Name error: {0},Ошибка Имя: {0}, +Name error: {0},Имя ошибки: {0}, Name of new Account. Note: Please don't create accounts for Customers and Suppliers,"Название нового счёта. Примечание: Пожалуйста, не создавайте счета для клиентов и поставщиков", Name or Email is mandatory,Имя или адрес электронной почты является обязательным, Nature Of Supplies,Природа поставок, @@ -1639,7 +1639,7 @@ Negotiation/Review,Переговоры / Обзор, Net Asset value as on,Чистая стоимость активов на, Net Cash from Financing,Чистые денежные средства от финансовой деятельности, Net Cash from Investing,Чистые денежные средства от инвестиционной деятельности, -Net Cash from Operations,Чистые денежные средства от операционной, +Net Cash from Operations,Чистые денежные средства от операций, Net Change in Accounts Payable,Чистое изменение кредиторской задолженности, Net Change in Accounts Receivable,Чистое изменение дебиторской задолженности, Net Change in Cash,Чистое изменение денежных средств, @@ -1651,17 +1651,17 @@ Net Pay,Чистая оплата, Net Pay cannot be less than 0,"Net Pay не может быть меньше, чем 0", Net Profit,Чистая прибыль, Net Salary Amount,Чистая сумма зарплаты, -Net Total,Чистая Всего, +Net Total,Чистая всего, Net pay cannot be negative,Чистая зарплата не может быть отрицательным, New Account Name,Новое название счёта, New Address,Новый адрес, -New BOM,Новая ВМ, +New BOM,Новая спецификация, New Batch ID (Optional),Новый идентификатор партии (необязательно), New Batch Qty,Новое количество партий, New Company,Новая Компания, New Cost Center Name,Название нового центра затрат, New Customer Revenue,Новый Выручка клиентов, -New Customers,новые клиенты, +New Customers,Новые клиенты, New Department,Новый отдел, New Employee,Новый сотрудник, New Location,Новое место, @@ -1725,10 +1725,10 @@ No tasks,Нет задач, No time sheets,Нет табелей, No values,Нет значений, No {0} found for Inter Company Transactions.,Нет {0} найдено для транзакций Inter Company., -Non GST Inward Supplies,Не входящие в GST поставки, +Non GST Inward Supplies,Не входящие в НДС поставки, Non Profit,Некоммерческое предприятие, Non Profit (beta),Некоммерческое предприятие (бета), -Non-GST outward supplies,Внешние поставки без GST, +Non-GST outward supplies,Внешние поставки без НДС, Non-Group to Group,Non-группы к группе, None,Никто, None of the items have any change in quantity or value.,Ни одному продукту не изменено количество или объём., @@ -1777,7 +1777,7 @@ Online Auctions,Аукционы в Интернете, Only Leave Applications with status 'Approved' and 'Rejected' can be submitted,Только оставьте приложения со статусом «Одобрено» и «Отклонено» могут быть представлены, "Only the Student Applicant with the status ""Approved"" will be selected in the table below.",В таблице ниже будет выбран только кандидат-студент со статусом «Approved»., Only users with {0} role can register on Marketplace,Только пользователи с ролью {0} могут зарегистрироваться на Marketplace, -Open BOM {0},Открыть ВОМ {0}, +Open BOM {0},Открыть спецификацию {0}, Open Item {0},Открыть продукт {0}, Open Notifications,Открытые уведомления, Open Orders,Открытые заказы, @@ -1804,7 +1804,7 @@ Opening Value,Начальное значение, Opening {0} Invoice created,Открытие {0} счет-фактуры, Operation,Операция, Operation Time must be greater than 0 for Operation {0},"Время работы должно быть больше, чем 0 для операции {0}", -"Operation {0} longer than any available working hours in workstation {1}, break down the operation into multiple operations","Операция {0} больше, чем каких-либо имеющихся рабочих часов в рабочей станции {1}, сломать операции в несколько операций", +"Operation {0} longer than any available working hours in workstation {1}, break down the operation into multiple operations","Операция {0} больше, чем имеющихся часов на рабочем месте{1}, разбить операции на более мелкие", Operations,Эксплуатация, Operations cannot be left blank,"Операции, не может быть оставлено пустым", Opp Count,Счетчик Opp, @@ -1874,7 +1874,7 @@ Party Type and Party is mandatory for {0} account,Тип и сторона па Party Type is mandatory,Тип партии является обязательным, Party is mandatory,Партия является обязательным, Password,Пароль, -Password policy for Salary Slips is not set,Политика паролей для Salary Slips не установлена, +Password policy for Salary Slips is not set,Политика паролей для зарплатных ведомостей не установлена, Past Due Date,Прошлая дата погашения, Patient,Пациент, Patient Appointment,Назначение пациента, @@ -1882,7 +1882,7 @@ Patient Encounter,Встреча пациента, Patient not found,Пациент не найден, Pay Remaining,Оплатить остаток, Pay {0} {1},Оплатить {0} {1}, -Payable,к оплате, +Payable,К оплате, Payable Account,Счёт оплаты, Payable Amount,Сумма к оплате, Payment,Оплата, @@ -1970,12 +1970,12 @@ Please enter Account for Change Amount,"Пожалуйста, введите с Please enter Approving Role or Approving User,"Пожалуйста, введите утверждении роли или утверждении Пользователь", Please enter Cost Center,"Пожалуйста, введите МВЗ", Please enter Delivery Date,Укажите дату поставки, -Please enter Employee Id of this sales person,"Пожалуйста, введите Employee Id этого менеджера по продажам", +Please enter Employee Id of this sales person,"Пожалуйста, введите идентификатор сотрудника этого продавца", Please enter Expense Account,"Пожалуйста, введите Expense счет", Please enter Item Code to get Batch Number,"Пожалуйста, введите код товара, чтобы получить номер партии", Please enter Item Code to get batch no,"Пожалуйста, введите Код товара, чтобы получить партию не", Please enter Item first,"Пожалуйста, введите сначала продукт", -Please enter Maintaince Details first,"Пожалуйста, введите Maintaince Подробности", +Please enter Maintaince Details first,"Пожалуйста, введите детали обслуживания", Please enter Planned Qty for Item {0} at row {1},"Пожалуйста, введите Запланированное Количество по пункту {0} в строке {1}", Please enter Preferred Contact Email,"Пожалуйста, введите предпочитаемый адрес электронной почты Контакта", Please enter Production Item first,"Пожалуйста, сначала введите производство продукта", @@ -2023,14 +2023,14 @@ Please select Charge Type first,"Пожалуйста, выберите Charge Please select Company,"Пожалуйста, выберите компанию", Please select Company and Designation,Выберите компанию и обозначение, Please select Company and Posting Date to getting entries,Выберите компанию и дату проводки для получения записей., -Please select Company first,"Пожалуйста, выберите КОМПАНИЯ Первый", -Please select Completion Date for Completed Asset Maintenance Log,Выберите Дата завершения для завершенного журнала обслуживания активов, -Please select Completion Date for Completed Repair,"Пожалуйста, выберите Дата завершения для завершенного ремонта", -Please select Course,Выберите курс, -Please select Drug,Выберите лекарство, -Please select Employee,Выберите Сотрудник, +Please select Company first,"Пожалуйста, выберите первую компанию", +Please select Completion Date for Completed Asset Maintenance Log,Выберите дата завершения для журнала обслуживания активов, +Please select Completion Date for Completed Repair,"Пожалуйста, выберите дату завершения ремонта", +Please select Course,"Пожалуйста, выберите курс", +Please select Drug,"Пожалуйста, выберите лекарство", +Please select Employee,"Пожалуйста, выберите сотрудника", Please select Existing Company for creating Chart of Accounts,"Пожалуйста, выберите Существующую компанию для создания плана счетов", -Please select Healthcare Service,Выберите Healthcare Service, +Please select Healthcare Service,Выберите услуги здравоохранение, "Please select Item where ""Is Stock Item"" is ""No"" and ""Is Sales Item"" is ""Yes"" and there is no other Product Bundle","Пожалуйста, выберите продукт со значениями ""Складируемый продукт"" - ""Нет"", ""Продаваемый продукт"" - ""Да"" и без связи с продуктовым набором.", Please select Maintenance Status as Completed or remove Completion Date,Выберите «Состояние обслуживания» как «Завершено» или «Дата завершения», Please select Party Type first,"Пожалуйста, выберите партии первого типа", @@ -2039,8 +2039,8 @@ Please select Patient to get Lab Tests,"Выберите «Пациент», ч Please select Posting Date before selecting Party,"Пожалуйста, выберите Дата публикации, прежде чем выбрать партию", Please select Posting Date first,"Пожалуйста, выберите проводки Дата первого", Please select Price List,"Пожалуйста, выберите прайс-лист", -Please select Program,Выберите программу, -Please select Qty against item {0},Выберите кол-во продукта {0}, +Please select Program,"Пожалуйста, выберите программу", +Please select Qty against item {0},"Пожалуйста, выберите количество продуктов {0}", Please select Sample Retention Warehouse in Stock Settings first,Сначала выберите «Хранилище хранения образцов» в разделе «Настройки запаса», Please select Start Date and End Date for Item {0},"Пожалуйста, выберите дату начала и дату окончания Пункт {0}", Please select Student Admission which is mandatory for the paid student applicant,"Пожалуйста, выберите Вход для студентов, который является обязательным для оплачиваемого студента", @@ -2048,19 +2048,19 @@ Please select a BOM,Выберите спецификацию, Please select a Batch for Item {0}. Unable to find a single batch that fulfills this requirement,"Выберите партию для продукта {0}. Не удалось найти такую, которая удовлетворяет этому требованию.", Please select a Company,"Пожалуйста, выберите компанию", Please select a batch,Выберите пакет, -Please select a csv file,Выберите файл CSV, +Please select a csv file,"Пожалуйста, выберите файл CSV", Please select a field to edit from numpad,Выберите поле для редактирования из numpad, -Please select a table,Выберите таблицу, -Please select a valid Date,Пожалуйста выберите правильную дату, +Please select a table,"Пожалуйста, выберите таблицу", +Please select a valid Date,"Пожалуйста, выберите правильную дату", Please select a value for {0} quotation_to {1},"Пожалуйста, выберите значение для {0} предложение_для {1}", -Please select a warehouse,Выберите склад, +Please select a warehouse,"Пожалуйста, выберите склад", Please select at least one domain.,Выберите хотя бы один домен., Please select correct account,"Пожалуйста, выберите правильный счет", Please select date,"Пожалуйста, выберите даты", Please select item code,"Пожалуйста, выберите код продукта", Please select month and year,"Пожалуйста, выберите месяц и год", Please select prefix first,"Пожалуйста, выберите префикс первым", -Please select the Company,Выберите компанию, +Please select the Company,"Пожалуйста, выберите компанию", Please select the Multiple Tier Program type for more than one collection rules.,Выберите несколько типов программ для нескольких правил сбора., Please select the assessment group other than 'All Assessment Groups',"Выберите группу оценки, отличную от «Все группы оценки»,", Please select the document type first,"Пожалуйста, выберите тип документа сначала", @@ -2071,13 +2071,13 @@ Please set 'Apply Additional Discount On',"Пожалуйста, установ Please set 'Asset Depreciation Cost Center' in Company {0},"Пожалуйста, установите "активов Амортизация затрат по МВЗ" в компании {0}", Please set 'Gain/Loss Account on Asset Disposal' in Company {0},"Пожалуйста, установите "прибыль / убыток Счет по лиду с отходами актива в компании {0}", Please set Account in Warehouse {0} or Default Inventory Account in Company {1},Укажите учетную запись в хранилище {0} или учетную запись инвентаризации по умолчанию в компании {1}, -Please set B2C Limit in GST Settings.,Установите B2C Limit в настройках GST., +Please set B2C Limit in GST Settings.,Установите B2C ограничение в настройках НДС., Please set Company,Укажите компанию, Please set Company filter blank if Group By is 'Company',"Пожалуйста, установите фильтр компании blank, если Group By является «Company»", Please set Default Payroll Payable Account in Company {0},"Пожалуйста, установите по умолчанию Payroll расчётный счёт в компании {0}", Please set Depreciation related Accounts in Asset Category {0} or Company {1},"Пожалуйста, установите Амортизация соответствующих счетов в Asset Категория {0} или компании {1}", Please set Email Address,"Пожалуйста, установите адрес электронной почты", -Please set GST Accounts in GST Settings,"Пожалуйста, установите учетные записи GST в настройках GST", +Please set GST Accounts in GST Settings,"Пожалуйста, установите счета НДС в настройках НДС", Please set Hotel Room Rate on {},"Пожалуйста, установите рейтинг номера в отеле {}", Please set Number of Depreciations Booked,"Пожалуйста, установите Количество отчислений на амортизацию бронирования", Please set Unrealized Exchange Gain/Loss Account in Company {0},Установите Unrealized Exchange Gain / Loss Account в компании {0}, @@ -2190,7 +2190,7 @@ Production Item,Производство товара, Products,Продукты, Profit and Loss,Прибыль и убытки, Profit for the year,Прибыль за год, -Program,программа, +Program,Программа, Program in the Fee Structure and Student Group {0} are different.,Программа в структуре вознаграждения и студенческой группе {0} отличается., Program {0} does not exist.,Программа {0} не существует., Program: ,Программа: , @@ -2206,7 +2206,7 @@ Project Update.,Обновление проекта., Project Value,Значимость проекта, Project activity / task.,Проектная деятельность / задачи., Project master.,Мастер проекта., -Project-wise data is not available for Quotation,Данные Проекта не доступны для Предложения, +Project-wise data is not available for Quotation,Данные проекта не доступны для предложения, Projected,Проектированный, Projected Qty,Прогнозируемое кол-во, Projected Quantity Formula,Формула прогнозируемого количества, @@ -2220,7 +2220,7 @@ Provisional Profit / Loss (Credit),Предварительная прибыль Publications,Публикации, Publish Items on Website,Опубликовать товары на сайте, Published,Опубликовано, -Publishing,Издательское дело, +Publishing,Публикация, Purchase,Купить, Purchase Amount,Сумма покупки, Purchase Date,Дата покупки, @@ -2248,7 +2248,7 @@ Purchasing,Покупка, Purpose must be one of {0},Цель должна быть одна из {0}, Qty,Кол-во, Qty To Manufacture,Кол-во для производства, -Qty Total,Количество Всего, +Qty Total,Общее количество, Qty for {0},Кол-во для {0}, Qualification,Квалификаци, Quality,Качество, @@ -2301,7 +2301,7 @@ Reading Uploaded File,Чтение загруженного файла, Real Estate,Недвижимость, Reason For Putting On Hold,Причина удержания, Reason for Hold,Причина удержания, -Reason for hold: ,Причина удержания:, +Reason for hold: ,Причина удержания: , Receipt,Квитанция, Receipt document must be submitted,Документ о получении должен быть исполнен, Receivable,Дебиторская задолженность, @@ -2391,7 +2391,7 @@ Reserved Warehouse is mandatory for Item {0} in Raw Materials supplied,Заре Reserved for manufacturing,Зарезервировано для изготовления, Reserved for sale,Зарезервировано для продажи, Reserved for sub contracting,Зарезервировано для субподряда, -Resistant,резистентный, +Resistant,Резистентный, Resolve error and upload again.,Устраните ошибку и загрузите снова., Responsibilities,Обязанности, Rest Of The World,Остальной мир, @@ -2423,15 +2423,15 @@ Root cannot have a parent cost center,Корневая не может имет Round Off,Округлять, Rounded Total,Итого с округлением, Route,Маршрут, -Row # {0}: ,Ряд # {0}:, -Row # {0}: Batch No must be same as {1} {2},"Ряд # {0}: Пакетное Нет должно быть таким же, как {1} {2}", -Row # {0}: Cannot return more than {1} for Item {2},Ряд # {0}: Невозможно вернуть более {1} для п {2}, +Row # {0}: ,Строка # {0}:, +Row # {0}: Batch No must be same as {1} {2},"Строка # {0}: Номер партии не должен быть таким же, как {1} {2}", +Row # {0}: Cannot return more than {1} for Item {2},Строка # {0}: Невозможно вернуть более {1} для {2}, Row # {0}: Rate cannot be greater than the rate used in {1} {2},"Строка # {0}: ставка не может быть больше ставки, используемой в {1} {2}", -Row # {0}: Serial No is mandatory,Ряд # {0}: Серийный номер является обязательным, -Row # {0}: Serial No {1} does not match with {2} {3},"Ряд # {0}: Серийный номер {1}, не соответствует {2} {3}", +Row # {0}: Serial No is mandatory,Строка # {0}: Серийный номер является обязательным, +Row # {0}: Serial No {1} does not match with {2} {3},"Строка # {0}: Серийный номер {1}, не соответствует {2} {3}", Row #{0} (Payment Table): Amount must be negative,Строка # {0} (таблица платежей): сумма должна быть отрицательной, Row #{0} (Payment Table): Amount must be positive,Строка # {0} (таблица платежей): сумма должна быть положительной, -Row #{0}: Account {1} does not belong to company {2},Строка # {0}: учетная запись {1} не принадлежит компании {2}, +Row #{0}: Account {1} does not belong to company {2},Строка # {0}: Счет {1} не принадлежит компании {2}, Row #{0}: Allocated Amount cannot be greater than outstanding amount.,Строка # {0}: выделенная сумма не может превышать невыплаченную сумму., "Row #{0}: Asset {1} cannot be submitted, it is already {2}","Строка # {0}: Актив {1} не может быть проведен, он уже {2}", Row #{0}: Cannot set Rate if amount is greater than billed amount for Item {1}.,"Строка # {0}: не может установить значение скорости, если сумма превышает сумму выставленного счета за элемент {1}.", @@ -2440,62 +2440,62 @@ Row #{0}: Duplicate entry in References {1} {2},Строка # {0}: Дублир Row #{0}: Expected Delivery Date cannot be before Purchase Order Date,Строка # {0}: ожидаемая дата поставки не может быть до даты заказа на поставку, Row #{0}: Item added,Строка № {0}: пункт добавлен, Row #{0}: Journal Entry {1} does not have account {2} or already matched against another voucher,Строка # {0}: Запись в журнале {1} не имеет учетной записи {2} или уже сопоставляется с другой купон, -Row #{0}: Not allowed to change Supplier as Purchase Order already exists,Ряд # {0}: Не разрешено изменять Поставщик как уже существует заказа, -Row #{0}: Please set reorder quantity,"Ряд # {0}: Пожалуйста, установите количество тональный", -Row #{0}: Please specify Serial No for Item {1},"Ряд # {0}: Пожалуйста, сформулируйте Серийный номер для Пункт {1}", -Row #{0}: Qty increased by 1,Ряд № {0}: кол-во увеличено на 1, -Row #{0}: Rate must be same as {1}: {2} ({3} / {4}) ,"Ряд # {0}: цена должна быть такой же, как {1}: {2} ({3} / {4})", +Row #{0}: Not allowed to change Supplier as Purchase Order already exists,Строка # {0}: Не разрешено изменять поставщика когда уже существует заказ, +Row #{0}: Please set reorder quantity,"Строка # {0}: Пожалуйста, укажите количество повторного заказа", +Row #{0}: Please specify Serial No for Item {1},"Строка # {0}: Пожалуйста, сформулируйте серийный номер для продукта {1}", +Row #{0}: Qty increased by 1,Строка № {0}: кол-во увеличено на 1, +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}) ,"Строка # {0}: цена должна быть такой же, как {1}: {2} ({3} / {4})", Row #{0}: Reference Document Type must be one of Expense Claim or Journal Entry,Строка # {0}: Тип ссылочного документа должен быть одним из заголовка расхода или записи журнала, -"Row #{0}: Reference Document Type must be one of Purchase Order, Purchase Invoice or Journal Entry","Строка # {0}: Ссылка Тип документа должен быть одним из заказа на поставку, счета-фактуры Покупка или журнал запись", -Row #{0}: Rejected Qty can not be entered in Purchase Return,Ряд # {0}: Отклонено Кол-во не может быть введен в приобретении Вернуться, -Row #{0}: Rejected Warehouse is mandatory against rejected Item {1},Ряд # {0}: Отклонено Склад является обязательным в отношении отклонил Пункт {1}, +"Row #{0}: Reference Document Type must be one of Purchase Order, Purchase Invoice or Journal Entry","Строка # {0}: Тип справочного документа должен быть одним из следующих: Заказ на покупку, Счет-фактура на покупку или Запись в журнале", +Row #{0}: Rejected Qty can not be entered in Purchase Return,Строка # {0}: Отклоненное количество не может быть введено в возврат покупки, +Row #{0}: Rejected Warehouse is mandatory against rejected Item {1},Строка # {0}: Отклонено Склад является обязательным в отношении отклонил Пункт {1}, Row #{0}: Reqd by Date cannot be before Transaction Date,Строка # {0}: Reqd by Date не может быть до даты транзакции, -Row #{0}: Set Supplier for item {1},Ряд # {0}: Установить Поставщик по пункту {1}, +Row #{0}: Set Supplier for item {1},Строка # {0}: Установить поставщика для {1}, Row #{0}: Status must be {1} for Invoice Discounting {2},Строка # {0}: статус должен быть {1} для дисконтирования счета-фактуры {2}, "Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches","Строка # {0}: партия {1} имеет только {2} qty. Выберите другой пакет, в котором имеется {3} qty, или разбейте строку на несколько строк, чтобы доставлять / выпускать из нескольких партий", -Row #{0}: Timings conflicts with row {1},Ряд # {0}: тайминги конфликты с рядом {1}, -Row #{0}: {1} can not be negative for item {2},Строка # {0}: {1} не может быть отрицательным по пункту {2}, -Row No {0}: Amount cannot be greater than Pending Amount against Expense Claim {1}. Pending Amount is {2},"Ряд № {0}: Сумма не может быть больше, чем указанная в Авансовом Отчете {1}. Указанная сумма {2}", +Row #{0}: Timings conflicts with row {1},Строка # {0}: Тайминги конфликтуют со строкой {1}, +Row #{0}: {1} can not be negative for item {2},Строка # {0}: {1} не может быть отрицательным для {2}, +Row No {0}: Amount cannot be greater than Pending Amount against Expense Claim {1}. Pending Amount is {2},"Строка № {0}: Сумма не может быть больше, чем указанная в Авансовом Отчете {1}. Указанная сумма {2}", Row {0} : Operation is required against the raw material item {1},Строка {0}: требуется операция против элемента исходного материала {1}, Row {0}# Allocated amount {1} cannot be greater than unclaimed amount {2},"Строка {0} # Выделенная сумма {1} не может быть больше, чем невостребованная сумма {2}", Row {0}# Item {1} cannot be transferred more than {2} against Purchase Order {3},Строка {0} # Элемент {1} не может быть передан более {2} в отношении заказа на поставку {3}, Row {0}# Paid Amount cannot be greater than requested advance amount,Строка {0} # Платная сумма не может быть больше запрашиваемой суммы аванса, Row {0}: Activity Type is mandatory.,Строка {0}: Вид деятельности является обязательным., -Row {0}: Advance against Customer must be credit,Ряд {0}: Предварительная отношении Клиента должен быть кредит, -Row {0}: Advance against Supplier must be debit,Ряд {0}: Предварительная против Поставщика должны быть дебет, +Row {0}: Advance against Customer must be credit,Строка {0}: Аванс в отношении клиента должен быть кредитом, +Row {0}: Advance against Supplier must be debit,Строка {0}: Аванс в отношении поставщика должны быть дебетом, Row {0}: Allocated amount {1} must be less than or equals to Payment Entry amount {2},Строка {0}: Выделенная сумма {1} должна быть меньше или равна сумме платежа ввода {2}, -Row {0}: Allocated amount {1} must be less than or equals to invoice outstanding amount {2},"Ряд {0}: суммы, выделенной {1} должен быть меньше или равен счета-фактуры сумма задолженности {2}", -Row {0}: An Reorder entry already exists for this warehouse {1},Ряд {0}: запись Изменить порядок уже существует для этого склада {1}, +Row {0}: Allocated amount {1} must be less than or equals to invoice outstanding amount {2},"Строка {0}: суммы, выделенной {1} должен быть меньше или равен счета-фактуры сумма задолженности {2}", +Row {0}: An Reorder entry already exists for this warehouse {1},Строка {0}: Запись о повторном заказе уже существует для этого склада {1}, Row {0}: Bill of Materials not found for the Item {1},Строка {0}: Для продукта {1} не найдена ведомость материалов, -Row {0}: Conversion Factor is mandatory,Ряд {0}: Коэффициент преобразования является обязательным, +Row {0}: Conversion Factor is mandatory,Строка {0}: Коэффициент преобразования является обязательным, Row {0}: Cost center is required for an item {1},Строка {0}: МВЗ требуется для элемента {1}, -Row {0}: Credit entry can not be linked with a {1},Ряд {0}: Кредитная запись не может быть связан с {1}, -Row {0}: Currency of the BOM #{1} should be equal to the selected currency {2},Строка {0}: Валюта BOM # {1} должен быть равен выбранной валюте {2}, -Row {0}: Debit entry can not be linked with a {1},Ряд {0}: Дебет запись не может быть связан с {1}, +Row {0}: Credit entry can not be linked with a {1},Строка {0}: Кредитная запись не может быть связана с {1}, +Row {0}: Currency of the BOM #{1} should be equal to the selected currency {2},Строка {0}: Валюта спецификации # {1} должен быть равен выбранной валюте {2}, +Row {0}: Debit entry can not be linked with a {1},Строка {0}: Дебет запись не может быть связан с {1}, Row {0}: Depreciation Start Date is required,Строка {0}: требуется дата начала амортизации, Row {0}: Enter location for the asset item {1},Строка {0}: введите местоположение для объекта актива {1}, -Row {0}: Exchange Rate is mandatory,Ряд {0}: Курс является обязательным, -Row {0}: Expected Value After Useful Life must be less than Gross Purchase Amount,Ряд {0}: ожидаемое значение после полезной жизни должно быть меньше валовой суммы покупки, +Row {0}: Exchange Rate is mandatory,Строка {0}: Курс является обязательным, +Row {0}: Expected Value After Useful Life must be less than Gross Purchase Amount,Строка {0}: Ожидаемая стоимость после срока полезного использования должна быть меньше общей суммы покупки, Row {0}: From Time and To Time is mandatory.,Строка {0}: От времени и времени является обязательным., Row {0}: From Time and To Time of {1} is overlapping with {2},Строка {0}: От времени и времени {1} перекрывается с {2}, Row {0}: From time must be less than to time,Строка {0}: время должно быть меньше времени, Row {0}: Hours value must be greater than zero.,Строка {0}: значение часов должно быть больше нуля., -Row {0}: Invalid reference {1},Ряд {0}: Недопустимая ссылка {1}, -Row {0}: Party / Account does not match with {1} / {2} in {3} {4},Ряд {0}: Партия / счета не соответствует {1} / {2} в {3} {4}, -Row {0}: Party Type and Party is required for Receivable / Payable account {1},Ряд {0}: Партия Тип и партия необходима для / дебиторская задолженность внимание {1}, -Row {0}: Payment against Sales/Purchase Order should always be marked as advance,Ряд {0}: Платеж по покупке / продаже порядок должен всегда быть помечены как заранее, -Row {0}: Please check 'Is Advance' against Account {1} if this is an advance entry.,"Ряд {0}: Пожалуйста, проверьте 'Как Advance ""против счета {1}, если это заранее запись.", -Row {0}: Please set at Tax Exemption Reason in Sales Taxes and Charges,Строка {0}: укажите причину освобождения от налогов в налогах с продаж и сборах, +Row {0}: Invalid reference {1},Строка {0}: Недопустимая ссылка {1}, +Row {0}: Party / Account does not match with {1} / {2} in {3} {4},Строка {0}: Партия / счета не соответствует {1} / {2} в {3} {4}, +Row {0}: Party Type and Party is required for Receivable / Payable account {1},Строка {0}: Для счета дебиторской/кредиторской задолженности требуется тип и сторона стороны {1}, +Row {0}: Payment against Sales/Purchase Order should always be marked as advance,Строка {0}: Платеж по покупке / продаже порядок должен всегда быть помечены как заранее, +Row {0}: Please check 'Is Advance' against Account {1} if this is an advance entry.,"Строка {0}: Пожалуйста, проверьте 'Как Advance ""против счета {1}, если это заранее запись.", +Row {0}: Please set at Tax Exemption Reason in Sales Taxes and Charges,Строка {0}: Укажите причину освобождения от уплаты налогов в разделе Налоги и сборы, Row {0}: Please set the Mode of Payment in Payment Schedule,"Строка {0}: пожалуйста, установите способ оплаты в графике платежей", Row {0}: Please set the correct code on Mode of Payment {1},Строка {0}: установите правильный код в способе оплаты {1}, -Row {0}: Qty is mandatory,Ряд {0}: Кол-во является обязательным, +Row {0}: Qty is mandatory,Строка {0}: Кол-во является обязательным, Row {0}: Quality Inspection rejected for item {1},Строка {0}: проверка качества отклонена для элемента {1}, -Row {0}: UOM Conversion Factor is mandatory,Ряд {0}: Коэффициент преобразования Единица измерения является обязательным, -Row {0}: select the workstation against the operation {1},Строка {0}: выберите рабочую станцию против операции {1}, +Row {0}: UOM Conversion Factor is mandatory,Строка {0}: Коэффициент преобразования единиц измерения является обязательным, +Row {0}: select the workstation against the operation {1},Строка {0}: выберите рабочее место для операции {1}, Row {0}: {1} Serial numbers required for Item {2}. You have provided {3}.,Строка {0}: {1} Необходимы серийные номера продукта {2}. Вы предоставили {3}., Row {0}: {1} must be greater than 0,Строка {0}: {1} должна быть больше 0, -Row {0}: {1} {2} does not match with {3},Ряд {0}: {1} {2} не соответствует {3}, -Row {0}:Start Date must be before End Date,Ряд {0}: Дата начала должна быть раньше даты окончания, +Row {0}: {1} {2} does not match with {3},Строка {0}: {1} {2} не соответствует {3}, +Row {0}:Start Date must be before End Date,Строка {0}: Дата начала должна быть раньше даты окончания, Rows with duplicate due dates in other rows were found: {0},Были найдены строки с повторяющимися датами в других строках: {0}, Rules for adding shipping costs.,Правила для добавления стоимости доставки., Rules for applying pricing and discount.,Правила применения цен и скидки., @@ -2532,7 +2532,7 @@ Sales Order {0} is not valid,Сделка {0} не действительна, Sales Order {0} is {1},Сделка {0} это {1}, Sales Orders,Сделки, Sales Partner,Партнер по продажам, -Sales Pipeline,Воронка продаж, +Sales Pipeline,Пайплайн продаж, Sales Price List,Прайс-лист продажи, Sales Return,Возвраты с продаж, Sales Summary,Резюме продаж, @@ -2567,7 +2567,7 @@ Scheduled Upto,Запланировано до, "Schedules for {0} overlaps, do you want to proceed after skiping overlaped slots ?","Расписания для {0} перекрываются, вы хотите продолжить после пропусков перекрытых слотов?", Score cannot be greater than Maximum Score,"Оценка не может быть больше, чем максимальный балл", Score must be less than or equal to 5,Оценка должна быть меньше или равна 5, -Scorecards,Scorecards, +Scorecards,Оценочные карты, Scrapped,Уничтоженный, Search,Поиск, Search Results,результаты поиска, @@ -2587,17 +2587,17 @@ See past quotations,Посмотреть прошлые предложения, Select,Выбрать, Select Alternate Item,Выбрать альтернативный элемент, Select Attribute Values,Выберите значения атрибута, -Select BOM,Выберите BOM, -Select BOM and Qty for Production,Выберите BOM и Кол-во для производства, +Select BOM,Выберите спецификацию, +Select BOM and Qty for Production,Выберите спецификацию и кол-во для производства, "Select BOM, Qty and For Warehouse","Выберите спецификацию, кол-во и для склада", Select Batch,Выбрать пакет, Select Batch Numbers,Выберите пакетные номера, Select Brand...,Выберите бренд ..., Select Company,Выберите компанию, -Select Company...,Выберите компанию ..., +Select Company...,Выберите компанию..., Select Customer,Выбрать клиента, Select Days,Выберите дни, -Select Default Supplier,Выберите По умолчанию Поставщик, +Select Default Supplier,Выберите поставщика по умолчанию, Select DocType,Выберите тип документа, Select Fiscal Year...,Выберите финансовый год ..., Select Item (optional),Выберите продукт (необязательно), @@ -2610,7 +2610,7 @@ Select Property,Выберите свойство, Select Quantity,Выберите количество, Select Serial Numbers,Выберите серийные номера, Select Target Warehouse,Выберите целевое хранилище, -Select Warehouse...,Выберите Склад ..., +Select Warehouse...,Выберите cклад ..., Select an account to print in account currency,Выберите учетную запись для печати в валюте счета., Select an employee to get the employee advance.,"Выберите сотрудника, чтобы получить работу сотрудника.", Select at least one value from each of the attributes.,Выберите по крайней мере одно значение из каждого из атрибутов., @@ -2636,25 +2636,25 @@ Send mass SMS to your contacts,Отправить массовое СМС по Sensitivity,Чувствительность, Sent,Отправлено, Serial No and Batch,Серийный номер и партия, -Serial No is mandatory for Item {0},Серийный номер является обязательным для п. {0}, +Serial No is mandatory for Item {0},Серийный номер является обязательным для продукта {0}, Serial No {0} does not belong to Batch {1},Серийный номер {0} не принадлежит к пакету {1}, Serial No {0} does not belong to Delivery Note {1},Серийный номер {0} не принадлежит накладной {1}, -Serial No {0} does not belong to Item {1},Серийный номер {0} не принадлежит Пункт {1}, -Serial No {0} does not belong to Warehouse {1},Серийный номер {0} не принадлежит Склад {1}, -Serial No {0} does not belong to any Warehouse,Серийный номер {0} не принадлежит ни к одной Склад, +Serial No {0} does not belong to Item {1},Серийный номер {0} не принадлежит продукту {1}, +Serial No {0} does not belong to Warehouse {1},Серийный номер {0} не принадлежит складу {1}, +Serial No {0} does not belong to any Warehouse,Серийный номер {0} не принадлежит ни к одному складу, Serial No {0} does not exist,Серийный номер {0} не существует, Serial No {0} has already been received,Серийный номер {0} уже существует, -Serial No {0} is under maintenance contract upto {1},Серийный номер {0} находится под контрактом на техническое обслуживание ДО {1}, +Serial No {0} is under maintenance contract upto {1},Серийный номер {0} находится под контрактом на техническое обслуживание до {1}, Serial No {0} is under warranty upto {1},Серийный номер {0} находится на гарантии до {1}, Serial No {0} not found,Серийный номер {0} не найден, -Serial No {0} not in stock,Серийный номер {0} не в наличии, -Serial No {0} quantity {1} cannot be a fraction,Серийный номер {0} количество {1} не может быть фракция, +Serial No {0} not in stock,Серийного номера {0} нет в наличии, +Serial No {0} quantity {1} cannot be a fraction,Серийный номер {0} количество {1} не может быть дробным, Serial Nos Required for Serialized Item {0},Требуются серийные номера для серийного продукта {0}, Serial Number: {0} is already referenced in Sales Invoice: {1},Серийный номер: {0} уже указан в счете продаж: {1}, Serial Numbers,Серийные номера, Serial Numbers in row {0} does not match with Delivery Note,Серийные номера в строке {0} не совпадают с полем «Поставка», Serial no {0} has been already returned,Серийный номер {0} уже возвращен, -Serial number {0} entered more than once,Серийный номер {0} вошли более одного раза, +Serial number {0} entered more than once,Серийный номер {0} используется больше одного раза, Serialized Inventory,Учет сериями, Series Updated,Идентификатор обновлен, Series Updated Successfully,Идентификатор успешно обновлен, @@ -2745,7 +2745,7 @@ Small,Небольшой, Soap & Detergent,Моющие средства, Software,Программное обеспечение, Software Developer,Разработчик программного обеспечения, -Softwares,Softwares, +Softwares,Программное обеспечение, Soil compositions do not add up to 100,Композиции почвы не составляют до 100, Sold,Продан, Some emails are invalid,Некоторые электронные письма недействительны, @@ -2754,13 +2754,13 @@ Something went wrong!,Что-то пошло не так!, "Sorry, Serial Nos cannot be merged","К сожалению, серийные номера не могут быть объединены", Source,Источник, Source Name,Имя источника, -Source Warehouse,Источник Склад, +Source Warehouse,Склад источник, Source and Target Location cannot be same,Источник и целевое местоположение не могут быть одинаковыми, Source and target warehouse cannot be same for row {0},Источник и цель склад не может быть одинаковым для ряда {0}, Source and target warehouse must be different,Исходный и целевой склад должны быть разными, Source of Funds (Liabilities),Источник финансирования (обязательства), Source warehouse is mandatory for row {0},Источник склад является обязательным для ряда {0}, -Specified BOM {0} does not exist for Item {1},Указанная ВМ {0} для продукта {1} не существует, +Specified BOM {0} does not exist for Item {1},Указанная спецификация {0} для продукта {1} не существует, Split,Трещина, Split Batch,Сплит-пакет, Split Issue,Сплит-выпуск, @@ -2770,7 +2770,7 @@ Standard,Стандартный, Standard Buying,Стандартный Покупка, Standard Selling,Стандартный Продажа, Standard contract terms for Sales or Purchase.,Стандартные условия договора для продажи или покупки., -Start Date,Дата Начала, +Start Date,Дата начала, Start Date of Agreement can't be greater than or equal to End Date.,Дата начала соглашения не может быть больше или равна дате окончания., Start Year,Год начала, "Start and end dates not in a valid Payroll Period, cannot calculate {0}","Даты начала и окончания не в допустимом Периоде платежной ведомости, не может вычислить {0}", @@ -2821,7 +2821,7 @@ Structures have been assigned successfully,Структуры были успе Student,Студент, Student Activity,Студенческая деятельность, Student Address,Адрес студента, -Student Admissions,зачисляемых студентов, +Student Admissions,Зачисление студентов, Student Attendance,Посещаемость студента, "Student Batches help you track attendance, assessments and fees for students","Студенческие Порции помогают отслеживать посещаемость, оценки и сборы для студентов", Student Email Address,Адрес электронной почты студента, @@ -2835,20 +2835,20 @@ Student ID: ,Студенческий билет:, Student LMS Activity,Студенческая LMS Активность, Student Mobile No.,Мобильный номер студента, Student Name,Имя ученика, -Student Name: ,Имя ученика:, +Student Name: ,Имя ученика: , Student Report Card,Студенческая отчетная карточка, Student is already enrolled.,Студент уже поступил., Student {0} - {1} appears Multiple times in row {2} & {3},Student {0} - {1} несколько раз появляется в строке {2} и {3}, Student {0} does not belong to group {1},Студент {0} не принадлежит группе {1}, Student {0} exist against student applicant {1},Student {0} существует против студента заявителя {1}, "Students are at the heart of the system, add all your students","Студенты в центре системы, добавьте все студенты", -Sub Assemblies,Sub сборки, +Sub Assemblies,Подсборки, Sub Type,Подтип, -Sub-contracting,Суб-сжимания, +Sub-contracting,Суб-контракты, Subcontract,Субподряд, Subject,Тема, Submit,Провести, -Submit Proof,Подтвердить, +Submit Proof,Отправить подтверждение, Submit Salary Slip,Провести Зарплатную ведомость, Submit this Work Order for further processing.,Отправьте этот рабочий заказ для дальнейшей обработки., Submit this to create the Employee record,"Отправьте это, чтобы создать запись сотрудника", @@ -2857,9 +2857,9 @@ Subscription,Подписка, Subscription Management,Управление подпиской, Subscriptions,Подписки, Subtotal,Промежуточный итог, -Successful,успешный, -Successfully Reconciled,Успешно Примирение, -Successfully Set Supplier,Успешно установить поставщика, +Successful,Успешно, +Successfully Reconciled,Успешно согласовано, +Successfully Set Supplier,Поставщик успешно установлен, Successfully created payment entries,Успешно созданные платежные записи, Successfully deleted all transactions related to this company!,"Успешно удален все сделки, связанные с этой компанией!", Sum of Scores of Assessment Criteria needs to be {0}.,Сумма десятков критериев оценки должно быть {0}., @@ -2879,11 +2879,11 @@ Supplier Invoice No exists in Purchase Invoice {0},Поставщик Счет- Supplier Name,наименование поставщика, Supplier Part No,Деталь поставщика №, Supplier Quotation,Предложение поставщика, -Supplier Scorecard,Поставщик Scorecard, +Supplier Scorecard,Оценочная карта поставщика, Supplier Warehouse mandatory for sub-contracted Purchase Receipt,Поставщик Склад обязательным для субподрядчиком ТОВАРНЫЙ ЧЕК, Supplier database.,База данных поставщиков., Supplier {0} not found in {1},Поставщик {0} не найден в {1}, -Supplier(s),Поставщик (и), +Supplier(s),Поставщик(и), Supplies made to UIN holders,Поставки для держателей UIN, Supplies made to Unregistered Persons,"Поставки, сделанные незарегистрированным лицам", Suppliies made to Composition Taxable Persons,"Поставки, сделанные в состав облагаемых лиц", @@ -2916,8 +2916,8 @@ Tax Category for overriding tax rates.,Налоговая категория д Tax ID,ИНН, Tax Id: ,Идентификатор налога: , Tax Rate,Размер налога, -Tax Rule Conflicts with {0},Налоговый Правило конфликты с {0}, -Tax Rule for transactions.,Налоговый Правило для сделок., +Tax Rule Conflicts with {0},Налоговое правило конфликтует с {0}, +Tax Rule for transactions.,Налоговое правило для сделок., Tax Template is mandatory.,Налоговый шаблона является обязательным., Tax Withholding rates to be applied on transactions.,"Ставки налога на удержание, применяемые к сделкам.", Tax template for buying transactions.,Налоговый шаблон для покупки сделок., @@ -2928,7 +2928,7 @@ Taxes,Налоги, Team Updates,Команда обновления, Technology,Технология, Telecommunications,Телекоммуникации, -Telephone Expenses,Телефон Расходы, +Telephone Expenses,Телефонные расходы, Television,Телевидение, Template Name,Название шаблона, Template of terms or contract.,Шаблон терминов или договором., @@ -2936,7 +2936,7 @@ Templates of supplier scorecard criteria.,Шаблоны критериев оц Templates of supplier scorecard variables.,Шаблоны переменных показателей поставщика., Templates of supplier standings.,Шаблоны позиций поставщиков., Temporarily on Hold,Временно в режиме удержания, -Temporary,временный, +Temporary,Временный, Temporary Accounts,Временные счета, Temporary Opening,Временное открытие, Terms and Conditions,Правила и условия, @@ -2965,7 +2965,7 @@ The name of the institute for which you are setting up this system.,"Назва The name of your company for which you are setting up this system.,"Название вашей компании, для которой вы настраиваете эту систему.", The number of shares and the share numbers are inconsistent,Количество акций и номеров акций несовместимы, The payment gateway account in plan {0} is different from the payment gateway account in this payment request,Учетная запись платежного шлюза в плане {0} отличается от учетной записи платежного шлюза в этом платежном запросе, -The selected BOMs are not for the same item,Выбранные ВМ не для одного продукта, +The selected BOMs are not for the same item,Выбранные спецификации не для одного продукта, The selected item cannot have Batch,Выбранный продукт не может иметь партию, The seller and the buyer cannot be the same,Продавец и покупатель не могут быть одинаковыми, The shareholder does not belong to this company,Акционер не принадлежит к этой компании, @@ -2992,17 +2992,17 @@ This Week's Summary,Резюме этой недели, This action will stop future billing. Are you sure you want to cancel this subscription?,Это действие остановит будущий биллинг. Вы действительно хотите отменить эту подписку?, This covers all scorecards tied to this Setup,"Это охватывает все оценочные карточки, привязанные к этой настройке", This document is over limit by {0} {1} for item {4}. Are you making another {3} against the same {2}?,Этот документ находится над пределом {0} {1} для элемента {4}. Вы делаете другой {3} против того же {2}?, -This is a root account and cannot be edited.,Это корень счетов и не может быть изменен., -This is a root customer group and cannot be edited.,Это корневая группа клиентов и не могут быть изменены., -This is a root department and cannot be edited.,Это корневой отдел и не может быть отредактирован., +This is a root account and cannot be edited.,Это кореневой счет и он не может быть изменен., +This is a root customer group and cannot be edited.,Это корневая группа клиентов и она не может быть изменена., +This is a root department and cannot be edited.,Это корневой отдел и он не может быть отредактирован., This is a root healthcare service unit and cannot be edited.,Это корневая служба здравоохранения и не может быть отредактирована., This is a root item group and cannot be edited.,Это корень группы продуктов и не может быть изменен., This is a root sales person and cannot be edited.,Это корневой продавец и не может быть изменен., -This is a root supplier group and cannot be edited.,Это группа поставщиков корней и не может быть отредактирована., +This is a root supplier group and cannot be edited.,Это корневая группа поставщиков и она не может быть отредактирована., This is a root territory and cannot be edited.,Это корневая территория и не может быть изменена., -This is an example website auto-generated from ERPNext,Это пример сайт автоматически сгенерированный из ERPNext, +This is an example website auto-generated from ERPNext,Это пример сайта автоматически сгенерированного из ERPNext, This is based on logs against this Vehicle. See timeline below for details,Это основано на журналах для этого транспортного средства. Смотрите график ниже для деталей, -This is based on stock movement. See {0} for details,Это основано на фондовом движении. См {0} для получения более подробной, +This is based on stock movement. See {0} for details,Это основано на движении остатков. См {0} для получения более подробной, This is based on the Time Sheets created against this project,"Это основано на табелях учета рабочего времени, созданных по этому проекту", This is based on the attendance of this Employee,Это основано на посещаемости этого сотрудника, This is based on the attendance of this Student,Это основано на посещаемости этого студента, @@ -3024,7 +3024,7 @@ Timesheet,Табель, Timesheet for tasks.,Табель для задач., Timesheet {0} is already completed or cancelled,Табель {0} уже заполнен или отменен, Timesheets,Табели, -"Timesheets help keep track of time, cost and billing for activites done by your team","Timesheets поможет отслеживать время, стоимость и выставление счетов для Активности сделанной вашей команды", +"Timesheets help keep track of time, cost and billing for activites done by your team","Табели учета рабочего времени помогают отслеживать время, стоимость и выставлять счета за работу, проделанную вашей командой.", Titles for print templates e.g. Proforma Invoice.,"Титулы для шаблонов печати, например, счет-проформа.", To,К, To Address 1,Адрес 1, @@ -3034,7 +3034,7 @@ To Date,До, To Date cannot be before From Date,На сегодняшний день не может быть раньше от даты, To Date cannot be less than From Date,"Дата не может быть меньше, чем с даты", To Date must be greater than From Date,"До даты должно быть больше, чем с даты", -To Date should be within the Fiscal Year. Assuming To Date = {0},Дата должна быть в пределах финансового года. Предположим, до даты = {0}, +"To Date should be within the Fiscal Year. Assuming To Date = {0}","Дата должна быть в пределах финансового года. Предположим, до даты = {0}", To Datetime,Для DateTime, To Deliver,Для доставки, To Deliver and Bill,Для доставки и оплаты, @@ -3066,8 +3066,8 @@ Too many columns. Export the report and print it using a spreadsheet application Tools,Инструменты, Total (Credit),Итого (кредит), Total (Without Tax),Всего (без налога), -Total Absent,Всего Отсутствует, -Total Achieved,Всего Выполнено, +Total Absent,Всего отсутствует, +Total Achieved,Всего выполнено, Total Actual,Общий фактический, Total Allocated Leaves,Всего выделенных листов, Total Amount,Общая сумма, @@ -3096,7 +3096,7 @@ Total Qty,Общее количество, Total Quantity,Общая численность, Total Revenue,Общий доход, Total Student,Всего учеников, -Total Target,Всего Target, +Total Target,Всего целей, Total Tax,Совокупный налог, Total Taxable Amount,Общая сумма налогооблагаемой суммы, Total Taxable Value,Общая налогооблагаемая стоимость, @@ -3148,7 +3148,7 @@ Transporter ID,Идентификатор транспортника, Transporter Name,Название транспорта, Travel,Путешествия, Travel Expenses,Командировочные расходы, -Tree Type,Дерево Тип, +Tree Type,Дерево тип, Tree of Bill of Materials,Дерево Билла материалов, Tree of Item Groups.,Структура продуктовых групп, Tree of Procedures,Дерево процедур, @@ -3170,11 +3170,11 @@ Unable to find score starting at {0}. You need to have standing scores covering Unable to find variable: ,Не удалось найти переменную:, Unblock Invoice,Разблокировать счет-фактуру, Uncheck all,Снять все, -Unclosed Fiscal Years Profit / Loss (Credit),Unclosed финансовых лет Прибыль / убыток (Кредит), +Unclosed Fiscal Years Profit / Loss (Credit),Прибыль/убыток за незакрытые финансовые годы (кредит), Unit,Единица, Unit of Measure,Единица измерения, Unit of Measure {0} has been entered more than once in Conversion Factor Table,Единица измерения {0} был введен более чем один раз в таблицу преобразования Factor, -Unknown,неизвестный, +Unknown,Неизвестный, Unpaid,Неоплачено, Unsecured Loans,Необеспеченных кредитов, Unsubscribe from this Email Digest,Отписаться от этого дайджеста электронной почты, @@ -3215,7 +3215,7 @@ Valid from and valid upto fields are mandatory for the cumulative,Допусти Valid from date must be less than valid upto date,Срок действия с даты должен быть меньше срока действия до даты, Valid till date cannot be before transaction date,Действителен до даты не может быть до даты транзакции, Validity,Период действия, -Validity period of this quotation has ended.,Срок действия этого Предложения истек, +Validity period of this quotation has ended.,Срок действия этого предложения истек, Valuation Rate,Оценка, Valuation Rate is mandatory if Opening Stock entered,"Оценка Оцените является обязательным, если введен Открытие изображения", Valuation type charges can not marked as Inclusive,Обвинения типа Оценка не может отмечен как включено, @@ -3224,7 +3224,7 @@ Value Proposition,Ценностное предложение, Value for Attribute {0} must be within the range of {1} to {2} in the increments of {3} for Item {4},Значение атрибута {0} должно быть в диапазоне от {1} до {2} в приращений {3} для п {4}, Value missing,Недостающее значение, Value must be between {0} and {1},Значение должно быть между {0} и {1}, -"Values of exempt, nil rated and non-GST inward supplies","Значения льготных, нулевых и не связанных с GST внутренних поставок", +"Values of exempt, nil rated and non-GST inward supplies","Значения льготных, нулевых и не связанных с НДС внутренних поставок", Variable,Переменная, Variance,Дисперсия, Variance ({}),Дисперсия ({}), @@ -3235,7 +3235,7 @@ Variant Details Report,Подробный отчет о вариантах, Variant creation has been queued.,Создание вариантов было поставлено в очередь., Vehicle Expenses,Расходы транспортных средств, Vehicle No,Автомобиль №, -Vehicle Type,тип машины, +Vehicle Type,Тип автомобиля, Vehicle/Bus Number,Номер транспортного средства / автобуса, Venture Capital,Инвестиции, View Chart of Accounts,Просмотр схемы счетов, @@ -3313,11 +3313,11 @@ Work Order {0} must be submitted,Порядок работы {0} должен б Work Orders Created: {0},Созданы рабочие задания: {0}, Work Summary for {0},Резюме работы для {0}, Work-in-Progress Warehouse is required before Submit,Работа-в-Прогресс Склад требуется перед Отправить, -Workflow, Рабочий процесс, +Workflow,Рабочий процесс, Working,Работающий, Working Hours,Часы работы, -Workstation,Рабочая станция, -Workstation is closed on the following dates as per Holiday List: {0},Рабочая станция закрыта в следующие даты согласно списка праздников: {0}, +Workstation,Рабочее место, +Workstation is closed on the following dates as per Holiday List: {0},Рабочая место закрыто в следующие даты согласно списка праздников: {0}, Wrapping up,Завершение, Wrong Password,Неправильный пароль, Year start date or end date is overlapping with {0}. To avoid please set company,"Год дата начала или дата окончания перекрывается с {0}. Чтобы избежать, пожалуйста, установите компанию", @@ -3325,7 +3325,7 @@ You are not authorized to add or update entries before {0},"Вы не автор You are not authorized to approve leaves on Block Dates,Вы не уполномочен утверждать листья на Блок Сроки, You are not authorized to set Frozen value,Ваши настройки доступа не позволяют замораживать значения, You are not present all day(s) between compensatory leave request days,Вы не присутствуете весь день (ы) между днями запроса компенсационного отпуска, -You can not change rate if BOM mentioned agianst any item,"Вы не можете изменить рейтинг, если ВМ упоминается agianst любого продукта", +You can not change rate if BOM mentioned agianst any item,"Вы не можете изменить оценку спецификации, упомянутой для любого элемента", You can not enter current voucher in 'Against Journal Entry' column,Вы не можете ввести текущий ваучер в «Против Запись в журнале 'колонке, You can only have Plans with the same billing cycle in a Subscription,У вас могут быть только планы с одинаковым биллинговым циклом в подписке, You can only redeem max {0} points in this order.,Вы можете выкупить только max {0} очков в этом порядке., @@ -3335,7 +3335,7 @@ You can only submit Leave Encashment for a valid encashment amount,Вы може You can't redeem Loyalty Points having more value than the Grand Total.,"Вы не можете выкупить очки лояльности, имеющие большую ценность, чем Grand Total.", You cannot credit and debit same account at the same time,Нельзя кредитовать и дебетовать один счёт за один раз, You cannot delete Fiscal Year {0}. Fiscal Year {0} is set as default in Global Settings,Нельзя удалить {0} финансовый год. Финансовый год {0} установлен основным в глобальных параметрах, -You cannot delete Project Type 'External',Вы не можете удалить Project Type 'External', +You cannot delete Project Type 'External',Вы не можете удалить проект типа 'Внешний', You cannot edit root node.,Вы не можете редактировать корневой узел., You cannot restart a Subscription that is not cancelled.,"Вы не можете перезапустить подписку, которая не отменена.", You don't have enought Loyalty Points to redeem,У вас недостаточно очков лояльности для выкупа, @@ -3552,10 +3552,10 @@ Importing {0} of {1},Импорт {0} из {1}, Invalid URL,неправильный адрес, Landscape,Альбомный, Last Sync On,Последняя синхронизация, -Naming Series,Идентификация по Имени, +Naming Series,Идентификация по имени, No data to export,Нет данных для экспорта, Portrait,Портретный, -Print Heading,Распечатать Заголовок, +Print Heading,Распечатать заголовок, Scheduler Inactive,Планировщик неактивен, Scheduler is inactive. Cannot import data.,Планировщик неактивен. Невозможно импортировать данные., Show Document,Показать документ, @@ -3570,12 +3570,12 @@ Webhook Secret,Webhook Secret, To Date is a mandatory filter.,На сегодняшний день это обязательный фильтр., A new appointment has been created for you with {0},Для вас создана новая встреча с {0}, Account Value,Стоимость аккаунта, -Account is mandatory to get payment entries,Аккаунт обязателен для получения платежных записей, -Account is not set for the dashboard chart {0},Учетная запись не настроена для диаграммы панели мониторинга {0}, -Account {0} does not belong to company {1},Аккаунт {0} не принадлежит компании {1}, -Account {0} does not exists in the dashboard chart {1},Аккаунт {0} не существует в диаграмме панели {1}, -Account: {0} is capital Work in progress and can not be updated by Journal Entry,Аккаунт: {0} является капитальным незавершенным и не может быть обновлен в журнале, -Account: {0} is not permitted under Payment Entry,Аккаунт: {0} не разрешен при вводе платежа, +Account is mandatory to get payment entries,Счет обязателен для получения платежных записей, +Account is not set for the dashboard chart {0},Счет не настроен для диаграммы панели мониторинга {0}, +Account {0} does not belong to company {1},Счет {0} не принадлежит компании {1}, +Account {0} does not exists in the dashboard chart {1},Счет {0} не существует в диаграмме панели {1}, +Account: {0} is capital Work in progress and can not be updated by Journal Entry,Счет: {0} является незавершенным и не может быть обновлен в журнале, +Account: {0} is not permitted under Payment Entry,Счет: {0} не разрешен при вводе платежа, Accounting Dimension {0} is required for 'Balance Sheet' account {1}.,Параметр учета {0} требуется для счета «Баланс» {1}., Accounting Dimension {0} is required for 'Profit and Loss' account {1}.,Параметр учета {0} требуется для счета «Прибыли и убытки» {1}., Accounting Masters,Бухгалтерские мастера, @@ -3746,7 +3746,7 @@ Error: {0} is mandatory field,Ошибка: {0} является обязате Event Link,Ссылка на событие, Exception occurred while reconciling {0},Исключительная ситуация при согласовании {0}, Expected and Discharge dates cannot be less than Admission Schedule date,Ожидаемые и даты выписки не могут быть меньше даты приема, -Expire Allocation,Expire Allocation, +Expire Allocation,Истечение срока действия, Expired,Истек срок действия, Export,Экспорт, Export not allowed. You need {0} role to export.,Экспорт не допускается. Вам нужно {0} роль для экспорта., @@ -3770,7 +3770,7 @@ Fuel Expense,Расход топлива, Future Payment Amount,Сумма будущего платежа, Future Payment Ref,Будущий платеж Ref, Future Payments,Будущие платежи, -GST HSN Code does not exist for one or more items,GST Код HSN не существует для одного или нескольких пунктов, +GST HSN Code does not exist for one or more items,НДС ГС-код не существует для одного или нескольких товаров, Generate E-Way Bill JSON,Создать электронный билл Билл JSON, Get Items,Получить продукты, Get Outstanding Documents,Получить выдающиеся документы, @@ -3792,7 +3792,7 @@ Import Data from CSV / Excel files.,Импорт данных из файлов In Progress,Выполняется, Incoming call from {0},Входящий звонок от {0}, Incorrect Warehouse,Неправильный склад, -Intermediate,промежуточный, +Intermediate,Промежуточный, Invalid Barcode. There is no Item attached to this barcode.,Неверный штрих-код. К этому штрих-коду не прикреплено ни одного предмета., Invalid credentials,Неверные учетные данные, Invite as User,Пригласить в пользователя, @@ -3803,7 +3803,7 @@ Item Reported,Товар сообщен, Item listing removed,Список товаров удален, Item quantity can not be zero,Количество товара не может быть нулевым, Item taxes updated,Товарные налоги обновлены, -Item {0}: {1} qty produced. ,Элемент {0}: произведено {1} кол-во., +Item {0}: {1} qty produced. ,Элемент {0}: произведено {1} кол-во. , Joining Date can not be greater than Leaving Date,"Дата вступления не может быть больше, чем Дата отъезда", Lab Test Item {0} already exist,Элемент лабораторного теста {0} уже существует, Last Issue,Последний выпуск, @@ -3926,7 +3926,7 @@ Please select a Sales Person for item: {0},"Пожалуйста, выберит Please select another payment method. Stripe does not support transactions in currency '{0}',Выберите другой способ оплаты. Полоса не поддерживает транзакции в валюте '{0}', Please select the customer.,"Пожалуйста, выберите клиента.", Please set a Supplier against the Items to be considered in the Purchase Order.,"Пожалуйста, установите Поставщика в отношении Товаров, которые должны быть учтены в Заказе на поставку.", -Please set account heads in GST Settings for Compnay {0},"Пожалуйста, установите заголовки учетных записей в настройках GST для Compnay {0}", +Please set account heads in GST Settings for Compnay {0},"Пожалуйста, установите заголовки счетов в настройках НДС для комании {0}", Please set an email id for the Lead {0},"Пожалуйста, установите идентификатор электронной почты для отведения {0}", Please set default UOM in Stock Settings,"Пожалуйста, установите UOM по умолчанию в настройках акций", Please set filter based on Item or Warehouse due to a large amount of entries.,"Пожалуйста, установите фильтр на основе товара или склада из-за большого количества записей.", @@ -3994,7 +3994,7 @@ Return amount cannot be greater unclaimed amount,Возврат суммы не Review,Обзор, Room,Комната, Room Type,Тип комнаты, -Row # ,Ряд #, +Row # ,Строка # , Row #{0}: Accepted Warehouse and Supplier Warehouse cannot be same,Строка # {0}: принятый склад и склад поставщика не могут быть одинаковыми, Row #{0}: Cannot delete item {1} which has already been billed.,"Строка # {0}: невозможно удалить элемент {1}, для которого уже выставлен счет.", Row #{0}: Cannot delete item {1} which has already been delivered,"Строка # {0}: невозможно удалить элемент {1}, который уже был доставлен", @@ -4126,7 +4126,7 @@ Unlink external integrations,Отключить внешние интеграц Unmarked Attendance for days,Посещаемость без опознавательных знаков в течение нескольких дней, Unpublish Item,Отменить публикацию, Unreconciled,несверенный, -Unsupported GST Category for E-Way Bill JSON generation,Неподдерживаемая категория GST для генерации E-Way Bill JSON, +Unsupported GST Category for E-Way Bill JSON generation,Неподдерживаемая категория НДС для генерации E-Way Bill JSON, Update,Обновить, Update Details,Обновить данные, Update Taxes for Items,Обновить налоги на товары, @@ -4165,10 +4165,10 @@ You must be a registered supplier to generate e-Way Bill,Вы должны бы You need to login as a Marketplace User before you can add any reviews.,"Вам необходимо войти в систему как пользователь Marketplace, чтобы добавить какие-либо отзывы.", Your Featured Items,Ваши избранные товары, Your Items,Ваши товары, -Your Profile,Твой профиль, +Your Profile,Ваш профиль, Your rating:,Ваш рейтинг:, and,и, -e-Way Bill already exists for this document,e-Way Bill уже существует для этого документа, +e-Way Bill already exists for this document,e-Way платеж уже существует для этого документа, woocommerce - {0},woocommerce - {0}, {0} Coupon used are {1}. Allowed quantity is exhausted,Использован {0} купон: {1}. Допустимое количество исчерпано, {0} Name,{0} Имя, @@ -4226,9 +4226,9 @@ Write Off,Списать, Email Id,Email ID, No,№, Reference Doctype,Ссылка DocType, -User Id,Идентификатор пользователя, +User Id,ID пользователя, Yes,Да, -Actual ,Фактически, +Actual ,Актуальный , Add to cart,Добавить в корзину, Budget,Бюджет, Chart of Accounts,План счетов, @@ -4238,7 +4238,7 @@ Download as JSON,Скачать как JSON, End date can not be less than start date,"Дата окончания не может быть меньше, чем Дата начала", For Default Supplier (Optional),Поставщик по умолчанию (необязательно), From date cannot be greater than To date,"С даты не может быть больше, чем к дате", -Group by,Group By, +Group by,Группировать по, In stock,В наличии, Item name,Название продукта, Loan amount is mandatory,Сумма кредита обязательна, @@ -4252,12 +4252,12 @@ Not in stock,Нет в наличии, Not permitted,Не разрешено, Open Issues ,Открыть вопросы, Open Projects ,Открыть проекты, -Open To Do ,Открыть список задач, +Open To Do ,Открыть список задач , Operation Id,Код операции, Partially ordered,Частично заказанно, Please select company first,Сначала выберите компанию, Please select patient,Выберите пациента, -Printed On ,Напечатано на, +Printed On ,Напечатано на , Projected qty,Прогнозируемое кол-во, Sales person,Продавец, Serial No {0} Created,Серийный номер {0} создан, @@ -4281,7 +4281,7 @@ Row #{0}: Item {1} is not a Serialized/Batched Item. It cannot have a Serial No/ Please set {0},"Пожалуйста, установите {0}", Please set {0},"Пожалуйста, установите {0}",supplier Draft,Черновой вариант,"docstatus,=,0" -Cancelled,отменен,"docstatus,=,2" +Cancelled,Отменен,"docstatus,=,2" Please setup Instructor Naming System in Education > Education Settings,"Пожалуйста, настройте систему именования инструкторов в «Образование»", Please set Naming Series for {0} via Setup > Settings > Naming Series,"Пожалуйста, установите серию имен для {0} через Настройка> Настройки> Серия имен", UOM Conversion factor ({0} -> {1}) not found for item: {2},Коэффициент преобразования UOM ({0} -> {1}) не найден для элемента: {2}, @@ -4375,7 +4375,7 @@ Row {0}: Due Date in the Payment Terms table cannot be before Posting Date,Ст Cannot find {} for item {}. Please set the same in Item Master or Stock Settings.,Не удается найти {} для элемента {}. Установите то же самое в Мастер предметов или Настройки запасов., Row #{0}: The batch {1} has already expired.,Строка № {0}: срок действия пакета {1} уже истек., Start Year and End Year are mandatory,Год начала и год окончания являются обязательными, -GL Entry,GL Вступление, +GL Entry,БК запись, Cannot allocate more than {0} against payment term {1},Невозможно выделить более {0} на срок платежа {1}, The root account {0} must be a group,Корневая учетная запись {0} должна быть группой, Shipping rule not applicable for country {0} in Shipping Address,Правило доставки неприменимо для страны {0} в адресе доставки, @@ -4405,7 +4405,7 @@ Update Current Stock,Обновить текущий запас, "{0} Retain Sample is based on batch, please check Has Batch No to retain sample of item","{0} Сохранить образец основан на партии. Установите флажок "Имеет номер партии", чтобы сохранить образец товара.", Empty,Пустой, Currently no stock available in any warehouse,В настоящее время нет в наличии ни на одном складе, -BOM Qty,BOM Qty, +BOM Qty,Кол-во спецификаций, Time logs are required for {0} {1},Журналы времени необходимы для {0} {1}, Total Completed Qty,Всего завершено кол-во, Qty to Manufacture,Кол-во для производства, @@ -4424,8 +4424,8 @@ Inpatient Visit Charge Item,Ставка на стационарный визи OP Consulting Charge,OP Consulting Charge, Inpatient Visit Charge,Стационарное посещение, Appointment Status,Статус встречи, -Test: ,Контрольная работа:, -Collection Details: ,Детали коллекции:, +Test: ,Тест: , +Collection Details: ,Детали коллекции: , {0} out of {1},{0} из {1}, Select Therapy Type,Выберите тип терапии, {0} sessions completed,{0} сеансов завершено, @@ -4493,7 +4493,7 @@ Parent Account,Родительский счет, Setting Account Type helps in selecting this Account in transactions.,Установка Тип аккаунта помогает в выборе этого счет в сделках., Chargeable,Ответственный, Rate at which this tax is applied,Курс по которому этот налог применяется, -Frozen,замороженные, +Frozen,Замороженные, "If the account is frozen, entries are allowed to restricted users.","Если счет замораживается, записи разрешается ограниченных пользователей.", Balance must be,Баланс должен быть, Lft,Lft, @@ -4518,8 +4518,8 @@ Users with this role are allowed to set frozen accounts and create / modify acco Determine Address Tax Category From,Определить адрес налоговой категории от, Over Billing Allowance (%),Превышение надбавки (%), Credit Controller,Кредитная контроллер, -Check Supplier Invoice Number Uniqueness,Проверять Уникальность Номера Счетов получаемых от Поставщика, -Make Payment via Journal Entry,Платежи через журнал Вход, +Check Supplier Invoice Number Uniqueness,Проверять уникальность номеров счетов получаемых от поставщика, +Make Payment via Journal Entry,Произвести оплату через журнальную запись, Unlink Payment on Cancellation of Invoice,Unlink Оплата об аннулировании счета-фактуры, Book Asset Depreciation Entry Automatically,Автоматическое внесение амортизации в книгу, Automatically Add Taxes and Charges from Item Tax Template,Автоматически добавлять налоги и сборы из шаблона налога на товар, @@ -4535,7 +4535,7 @@ SWIFT number,SWIFT номер, Branch Code,Код филиала, Address and Contact,Адрес и контакт, Address HTML,Адрес HTML, -Contact HTML,Связаться с HTML, +Contact HTML,Контакт HTML, Data Import Configuration,Конфигурация импорта данных, Bank Transaction Mapping,Отображение банковских транзакций, Plaid Access Token,Жетон доступа к пледу, @@ -4556,8 +4556,8 @@ Bank Account Subtype,Подтип банковского счета, Bank Account Type,Тип банковского счета, Bank Guarantee,Банковская гарантия, Bank Guarantee Type,Тип банковской гарантии, -Receiving,получающий, -Providing,обеспечение, +Receiving,Получение, +Providing,Обеспечение, Reference Document Name,Название ссылочного документа, Validity in Days,Срок действия в днях, Bank Account Info,Информация о банковском счете, @@ -4582,7 +4582,7 @@ Statement Headers,Заголовки операторов, Transaction Data Mapping,Сопоставление данных транзакций, Mapped Items,Отображаемые объекты, Bank Statement Settings Item,Элемент настройки выписки по банку, -Mapped Header,Mapped Header, +Mapped Header,Сопоставленный заголовок, Bank Header,Заголовок банка, Bank Statement Transaction Entry,Ввод транзакции с банковским выпиской, Bank Transaction Entries,Записи банковских транзакций, @@ -4595,7 +4595,7 @@ Payment Invoice Items,Платежные счета, Reconciled Transactions,Согласованные транзакции, Bank Statement Transaction Invoice Item,Элемент счета транзакции банковского выписки, Payment Description,Описание платежа, -Invoice Date,Дата Счета, +Invoice Date,Дата счета, invoice,счет-фактура, Bank Statement Transaction Payment Item,Элемент оплаты транзакции по банковскому счету, outstanding_amount,outstanding_amount, @@ -4605,7 +4605,7 @@ Bank Data,Банковские данные, Mapped Data Type,Тип данных сопоставления, Mapped Data,Отображаемые данные, Bank Transaction,Банковская операция, -ACC-BTN-.YYYY.-,ACC-БТН-.YYYY.-, +ACC-BTN-.YYYY.-,ACC-BTN-.YYYY.-, Transaction ID,ID транзакции, Unallocated Amount,Нераспределенные Сумма, Field in Bank Transaction,Поле в банковской операции, @@ -4636,7 +4636,7 @@ II,II, III,III, IV,IV, C-Form Invoice Detail,C-образный Счет Подробно, -Invoice No,Номер Счета, +Invoice No,Номер cчета, Cash Flow Mapper,Диспетчер денежных потоков, Section Name,Название раздела, Section Header,Заголовок раздела, @@ -4652,11 +4652,11 @@ Is Working Capital,Оборотный капитал, Is Finance Cost Adjustment,Корректировка финансовых расходов, Is Income Tax Liability,Ответственность подоходного налога, Is Income Tax Expense,Расходы на подоходный налог, -Cash Flow Mapping Accounts,Учетные записи денежных потоков, -account,аккаунт, +Cash Flow Mapping Accounts,Счета денежных потоков, +account,счет, Cash Flow Mapping Template,Шаблон сопоставления денежных потоков, Cash Flow Mapping Template Details,Подробное описание шаблонов движения денежных средств, -POS-CLO-,POS-ClO-, +POS-CLO-,POS-CLO-, Custody,Опека, Net Amount,Чистая сумма, Cashier Closing Payments,Кассовые платежи, @@ -4689,8 +4689,8 @@ Closed Document,Закрытый документ, Track separate Income and Expense for product verticals or divisions.,Подписка отдельный доходы и расходы за вертикалей продукции или подразделений., Cost Center Name,Название учетного отдела, Parent Cost Center,Родитель МВЗ, -lft,LFT, -rgt,РТГ, +lft,лев, +rgt,прав, Coupon Code,Код купона, Coupon Name,Название купона, "e.g. ""Summer Holiday 2019 Offer 20""","например, "Летние каникулы 2019 Предложение 20"", @@ -4715,17 +4715,17 @@ Current Exchange Rate,Текущий обменный курс, Balance In Base Currency,Баланс в базовой валюте, New Exchange Rate,Новый обменный курс, New Balance In Base Currency,Новый баланс в базовой валюте, -Gain/Loss,Прибыль / убыток, +Gain/Loss,Прибыль/убыток, **Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.,**Фискальный год** представляет собой финансовый год. Все бухгалтерские записи и другие крупные сделки отслеживаются по **Фискальному году**., Year Name,Год, "For e.g. 2012, 2012-13","Например, 2012, 2012-13", Year Start Date,Дата начала года, Year End Date,Дата окончания года, Companies,Компании, -Auto Created,Автосоздан, +Auto Created,Создан автоматически, Stock User,Пользователь склада, Fiscal Year Company,Финансовый год компании, -Debit Amount,Дебет Сумма, +Debit Amount,Сумма дебета, Credit Amount,Сумма кредита, Debit Amount in Account Currency,Дебет Сумма в валюте счета, Credit Amount in Account Currency,Сумма кредита в валюте счета, @@ -4733,10 +4733,10 @@ Voucher Detail No,Подробности ваучера №, Is Opening,Открывает, Is Advance,Является Advance, To Rename,Переименовать, -GST Account,Учетная запись GST, -CGST Account,Учетная запись CGST, -SGST Account,Учетная запись SGST, -IGST Account,Учет IGST, +GST Account,НДС счет, +CGST Account,CGST счет, +SGST Account,SGST счет, +IGST Account,IGST счет, CESS Account,CESS-аккаунт, Loan Start Date,Дата начала займа, Loan Period (Days),Срок кредитования (дни), @@ -4759,11 +4759,11 @@ Contra Entry,Contra запись, Excise Entry,Акцизный запись, Write Off Entry,Списание запись, Opening Entry,Начальная запись, -ACC-JV-.YYYY.-,ACC-СП-.YYYY.-, +ACC-JV-.YYYY.-,ACC-JV-.YYYY.-, Accounting Entries,Бухгалтерские Проводки, -Total Debit,Всего Дебет, -Total Credit,Всего очков, -Difference (Dr - Cr),Отличия (д-р - Cr), +Total Debit,Общий дебет, +Total Credit,Общий кредит, +Difference (Dr - Cr),Разница (Деб - Кред), Make Difference Entry,Сделать Разница запись, Total Amount Currency,Общая сумма валюты, Total Amount in Words,Общая сумма в словах, @@ -4811,8 +4811,8 @@ Loyalty Program Help,Помощь в программе лояльности, Loyalty Program Collection,Коллекция программы лояльности, Tier Name,Название уровня, Minimum Total Spent,Минимальные общие затраты, -Collection Factor (=1 LP),Коэффициент сбора (= 1 LP), -For how much spent = 1 Loyalty Point,За сколько потраченных = 1 Точка лояльности, +Collection Factor (=1 LP),Коэффициент сбора (= 1 Балл), +For how much spent = 1 Loyalty Point,За сколько потраченных = 1 Балл лояльности, Mode of Payment Account,Форма оплаты счета, Default Account,По умолчанию учетная запись, Default account will be automatically updated in POS Invoice when this mode is selected.,"Учетная запись по умолчанию будет автоматически обновляться в POS-счете, если выбран этот режим.", @@ -4845,9 +4845,9 @@ Get Outstanding Invoice,Получить выдающийся счет, Payment References,Ссылки оплаты, Writeoff,Списать, Total Allocated Amount,Общая сумма Обозначенная, -Total Allocated Amount (Company Currency),Общая Выделенная сумма (Компания Валюта), +Total Allocated Amount (Company Currency),Общая Выделенная сумма (валюта компании), Set Exchange Gain / Loss,Установить Курсовая прибыль / убыток, -Difference Amount (Company Currency),Разница Сумма (Компания Валюта), +Difference Amount (Company Currency),Разница Сумма (валюта компании), Write Off Difference Amount,Списание разница в, Deductions or Loss,Отчисления или убыток, Payment Deductions or Loss,Отчисления оплаты или убыток, @@ -4857,7 +4857,7 @@ Payment Entry Reference,Оплата запись Ссылка, Allocated,Выделенные, Payment Gateway Account,Аккаунт платежного шлюза, Payment Account,Счёт оплаты, -Default Payment Request Message,По умолчанию Оплата Сообщение запроса, +Default Payment Request Message,Сообщение запроса платежа по умолчанию, PMO-,PMO-, Payment Order Type,Тип платежного поручения, Payment Order Reference,Ссылка на платежное поручение, @@ -4867,20 +4867,20 @@ Receivable / Payable Account,Счет Дебиторской / Кредитор Bank / Cash Account,Банк / Расчетный счет, From Invoice Date,От Дата Счета, To Invoice Date,Счета-фактуры Дата, -Minimum Invoice Amount,Минимальная Сумма счета, -Maximum Invoice Amount,Максимальная Сумма счета, +Minimum Invoice Amount,Минимальная сумма счета, +Maximum Invoice Amount,Максимальная сумма счета, System will fetch all the entries if limit value is zero.,"Система извлечет все записи, если предельное значение равно нулю.", Get Unreconciled Entries,Получить несверенные записи, Unreconciled Payment Details,Несогласованные Детали компенсации, Invoice/Journal Entry Details,Счет / Журнал вступления подробнее, Payment Reconciliation Invoice,Оплата Примирение Счет, -Invoice Number,Номер Счета, -Payment Reconciliation Payment,Оплата Примирение Оплата, -Reference Row,Ссылка Row, +Invoice Number,Номер cчета, +Payment Reconciliation Payment,Сверка платежей об оплате, +Reference Row,Справочная строка, Allocated amount,Выделенная сумма, Payment Request Type,Тип платежного запроса, -Outward,внешний, -Inward,внутрь, +Outward,Внешний, +Inward,Внутренний, ACC-PRQ-.YYYY.-,ACC-PRQ-.YYYY.-, Transaction Details,Детали транзакции, Amount in customer's currency,Сумма в валюте клиента, @@ -4892,7 +4892,7 @@ Recipient Message And Payment Details,Получатель сообщения и Make Sales Invoice,Создать счёт, Mute Email,Отключить электронную почту, payment_url,payment_url, -Payment Gateway Details,Компенсация Детали шлюза, +Payment Gateway Details,Детали платежного шлюза, Payment Schedule,График оплаты, Invoice Portion,Часть счета, Payment Amount,Сумма платежа, @@ -4910,8 +4910,8 @@ Closing Fiscal Year,Закрытие финансового года, Closing Account Head,Закрытие счета руководитель, "The account head under Liability or Equity, in which Profit/Loss will be booked","Глава счета под обязательство или долевой, в котором прибыль / убыток будет забронирован", POS Customer Group,POS Группа клиентов, -POS Field,POS Field, -POS Item Group,POS Item Group, +POS Field,POS поле, +POS Item Group,POS продуктовая группа, Company Address,Адрес компании, Update Stock,Обновить остатки, Ignore Pricing Rule,Игнорировать правило ценообразования, @@ -4940,8 +4940,8 @@ Discount on Other Item,Скидка на другой товар, Apply Rule On Other,Применить правило на других, Party Information,Информация о вечеринке, Quantity and Amount,Количество и сумма, -Min Qty,Мин Кол-во, -Max Qty,Макс Кол-во, +Min Qty,Мин. кол-во, +Max Qty,Макс. кол-во, Min Amt,Мин Amt, Max Amt,Макс Амт, Period Settings,Настройки периода, @@ -4957,27 +4957,27 @@ Product Discount Scheme,Схема скидок на товары, Same Item,Тот же пункт, Free Item,Бесплатный товар, Threshold for Suggestion,Порог для предложения, -System will notify to increase or decrease quantity or amount ,Система сообщит об увеличении или уменьшении количества или суммы, +System will notify to increase or decrease quantity or amount ,Система сообщит об увеличении или уменьшении количества или суммы , "Higher the number, higher the priority","Чем выше число, тем выше приоритет", Apply Multiple Pricing Rules,Применить несколько правил ценообразования, Apply Discount on Rate,Применить скидку на ставку, Validate Applied Rule,Утвердить примененное правило, Rule Description,Описание правила, -Pricing Rule Help,Цены Правило Помощь, +Pricing Rule Help,Справка по правилу ценообразования, Promotional Scheme Id,Идентификатор рекламной схемы, Promotional Scheme,Схема продвижения, -Pricing Rule Brand,Ценовое правило Бренд, +Pricing Rule Brand,Правило ценообразования для бренда, Pricing Rule Detail,Детализация правила ценообразования, Child Docname,Детское имя, Rule Applied,Правило применяется, -Pricing Rule Item Code,Правило ценообразования Код товара, -Pricing Rule Item Group,Группа правил правила ценообразования, +Pricing Rule Item Code,Правило ценообразования по коду продукта, +Pricing Rule Item Group,Правило ценообразования для группы, Price Discount Slabs,Цена Скидка Плиты, Promotional Scheme Price Discount,Рекламная схема Цена со скидкой, Product Discount Slabs,Дисконтные плиты продукта, Promotional Scheme Product Discount,Рекламная схема товара со скидкой, -Min Amount,Минимальная сумма, -Max Amount,Макс. Сумма, +Min Amount,Мин. сумма, +Max Amount,Макс. сумма, Discount Type,Тип скидки, ACC-PINV-.YYYY.-,ACC-PINV-.YYYY.-, Tax Withholding Category,Категория удержания налогов, @@ -4985,12 +4985,12 @@ Edit Posting Date and Time,Изменить дату и время публик Is Paid,Оплачено, Is Return (Debit Note),Возврат (дебетовая заметка), Apply Tax Withholding Amount,Применять сумму удержания налога, -Accounting Dimensions ,Бухгалтерские размеры, +Accounting Dimensions ,Бухгалтерские измерения , Supplier Invoice Details,Подробная информация о поставщике счета, Supplier Invoice Date,Дата выставления счета поставщиком, Return Against Purchase Invoice,Вернуться против счет покупки, Select Supplier Address,Выбрать адрес поставщика, -Contact Person,Контактное Лицо, +Contact Person,Контактное лицо, Select Shipping Address,Выберите адрес доставки, Currency and Price List,Валюта и прайс-лист, Price List Currency,Прайс-лист валют, @@ -5002,42 +5002,42 @@ Raw Materials Supplied,Поставка сырья, Supplier Warehouse,Склад поставщика, Pricing Rules,Правила ценообразования, Supplied Items,Поставляемые продукты, -Total (Company Currency),Всего (Компания валют), -Net Total (Company Currency),Чистая Всего (Компания Валюта), +Total (Company Currency),Всего (валюта компании), +Net Total (Company Currency),Чистая Всего (валюта компании), Total Net Weight,Общий вес нетто, Shipping Rule,Правило доставки, Purchase Taxes and Charges Template,Купить налоги и сборы шаблон, Purchase Taxes and Charges,Покупка Налоги и сборы, Tax Breakup,Распределение налогов, Taxes and Charges Calculation,Налоги и сборы Расчет, -Taxes and Charges Added (Company Currency),Налоги и сборы Добавил (Компания Валюта), -Taxes and Charges Deducted (Company Currency),"Налоги, которые вычитаются (Компания Валюта)", -Total Taxes and Charges (Company Currency),Всего Налоги и сборы (Компания Валюты), +Taxes and Charges Added (Company Currency),Налоги и сборы Добавил (валюта компании), +Taxes and Charges Deducted (Company Currency),"Налоги, которые вычитаются (валюта компании)", +Total Taxes and Charges (Company Currency),Всего Налоги и сборы (валюта компании), Taxes and Charges Added,Налоги и сборы добавлены, Taxes and Charges Deducted,"Налоги и сборы, вычитаемые", Total Taxes and Charges,Общие налоги и сборы, Additional Discount,Дополнительная скидка, -Apply Additional Discount On,Применить Дополнительную Скидку на, -Additional Discount Amount (Company Currency),Дополнительная скидка Сумма (валюта компании), +Apply Additional Discount On,Применить дополнительную скидку на, +Additional Discount Amount (Company Currency),Сумма дополнительных скидок (валюта компании), Additional Discount Percentage,Дополнительная скидка в процентах, Additional Discount Amount,Сумма дополнительной скидки, -Grand Total (Company Currency),Общий итог (Компания Валюта), +Grand Total (Company Currency),Общий итог (валюта компании), Rounding Adjustment (Company Currency),Коррекция округления (валюта компании), -Rounded Total (Company Currency),Округлые Всего (Компания Валюта), -In Words (Company Currency),В Слов (Компания валюте), +Rounded Total (Company Currency),Округлые Всего (валюта компании), +In Words (Company Currency),Словами (валюта компании), Rounding Adjustment,Коррекция округления, In Words,Прописью, -Total Advance,Всего Advance, +Total Advance,Общий аванс, Disable Rounded Total,Отключение закругленными Итого, Cash/Bank Account,Наличные / Банковский счет, -Write Off Amount (Company Currency),Списание Сумма (Компания валют), -Set Advances and Allocate (FIFO),Set Advances and Allocate (FIFO), +Write Off Amount (Company Currency),Сумма списаний (валюта компании), +Set Advances and Allocate (FIFO),Установите авансы и распределите (FIFO), Get Advances Paid,Получить авансы выданные, Advances,Авансы, -Terms,Термины, +Terms,Условия, Terms and Conditions1,Сроки и условиях1, Group same items,Сгруппировать похожие продукты, -Print Language,Язык печати, +Print Language,Язык для печати, "Once set, this invoice will be on hold till the set date",После этого этот счет будет приостановлен до установленной даты, Credit To,Кредит для, Party Account Currency,Партия Валюта счета, @@ -5047,22 +5047,22 @@ Is Internal Supplier,Внутренний поставщик, Start date of current invoice's period,Дату периода текущего счета-фактуры начнем, End date of current invoice's period,Дата и время окончания периода текущего счета-фактуры в, Update Auto Repeat Reference,Обновить ссылку на автоматический повтор, -Purchase Invoice Advance,Счета-фактуры Advance, -Purchase Invoice Item,Покупка Счет Пункт, -Quantity and Rate,Количество и курс, +Purchase Invoice Advance,Авансовый счет на покупку, +Purchase Invoice Item,Счет на покупку продукта, +Quantity and Rate,Количество и стоимость, Received Qty,Поступившее кол-во, -Accepted Qty,Принятый Кол-во, -Rejected Qty,Отклонено Кол-во, +Accepted Qty,Принятое кол-во, +Rejected Qty,Отклоненое кол-во, UOM Conversion Factor,Коэффициент пересчета единицы измерения, -Discount on Price List Rate (%),Скидка на Прайс-лист ставка (%), -Price List Rate (Company Currency),Прайс-лист Тариф (Компания Валюта), -Rate ,Цена, -Rate (Company Currency),Тариф (Компания Валюта), -Amount (Company Currency),Сумма (Компания Валюта), +Discount on Price List Rate (%),Скидка от прайс-листа (%), +Price List Rate (Company Currency),Прайс-лист Тариф (валюта компании), +Rate ,Цена , +Rate (Company Currency),Тариф (валюта компании), +Amount (Company Currency),Сумма (валюта компании), Is Free Item,Это бесплатный товар, Net Rate,Нетто-ставка, -Net Rate (Company Currency),Чистая скорость (Компания валют), -Net Amount (Company Currency),Чистая сумма (валюта Компании), +Net Rate (Company Currency),Чистая стоимость (валюта компании), +Net Amount (Company Currency),Чистая сумма (валюта компании), Item Tax Amount Included in Value,"Сумма налога на имущество, включенная в стоимость", Landed Cost Voucher Amount,Земельные стоимости путевки сумма, Raw Materials Supplied Cost,Стоимость поставленного сырья, @@ -5070,7 +5070,7 @@ Accepted Warehouse,Принимающий склад, Serial No,Серийный номер, Rejected Serial No,Отклоненный Серийный номер, Expense Head,Глава расходов, -Is Fixed Asset,Фиксирована Asset, +Is Fixed Asset,Является основным средством, Asset Location,Месторасположение активов, Deferred Expense,Отложенные расходы, Deferred Expense Account,Отсроченная учетная запись, @@ -5092,7 +5092,7 @@ Consider Tax or Charge for,Рассмотрим налога или сбора Valuation and Total,Оценка и Всего, Valuation,Оценка, Add or Deduct,Добавить или вычесть, -Deduct,Вычеты €, +Deduct,Вычеты, On Previous Row Amount,На Сумму предыдущей строки, On Previous Row Total,На Итого предыдущей строки, On Item Quantity,На количество товара, @@ -5103,10 +5103,10 @@ Account Head,Основной счет, Tax Amount After Discount Amount,Сумма налога После скидка сумма, Item Wise Tax Detail ,Пункт Мудрые налоговые данные, "Standard tax template that can be applied to all Purchase Transactions. This template can contain list of tax heads and also other expense heads like ""Shipping"", ""Insurance"", ""Handling"" etc.\n\n#### Note\n\nThe tax rate you define here will be the standard tax rate for all **Items**. If there are **Items** that have different rates, they must be added in the **Item Tax** table in the **Item** master.\n\n#### Description of Columns\n\n1. Calculation Type: \n - This can be on **Net Total** (that is the sum of basic amount).\n - **On Previous Row Total / Amount** (for cumulative taxes or charges). If you select this option, the tax will be applied as a percentage of the previous row (in the tax table) amount or total.\n - **Actual** (as mentioned).\n2. Account Head: The Account ledger under which this tax will be booked\n3. Cost Center: If the tax / charge is an income (like shipping) or expense it needs to be booked against a Cost Center.\n4. Description: Description of the tax (that will be printed in invoices / quotes).\n5. Rate: Tax rate.\n6. Amount: Tax amount.\n7. Total: Cumulative total to this point.\n8. Enter Row: If based on ""Previous Row Total"" you can select the row number which will be taken as a base for this calculation (default is the previous row).\n9. Consider Tax or Charge for: In this section you can specify if the tax / charge is only for valuation (not a part of total) or only for total (does not add value to the item) or for both.\n10. Add or Deduct: Whether you want to add or deduct the tax.","Стандартный шаблон налог, который может быть применен ко всем операциям купли-. Этот шаблон может содержать перечень налоговых руководителей, а также других расходов руководителей как ""Shipping"", ""Insurance"", ""Обращение"" и т.д. \n\n #### Примечание \n\n ставка налога на которые вы указали здесь будет стандартная ставка налога на прибыль для всех ** деталей **. Если есть ** товары **, которые имеют различные цены, они должны быть добавлены в ** деталь налога ** стол в ** деталь ** мастера.\n\n #### Описание колонок \n\n 1. Расчет Тип: \n - Это может быть ** Чистый Всего ** (то есть сумма основной суммы).\n - ** На предыдущей строке Total / сумма ** (по совокупности налогов и сборов). Если вы выбираете эту опцию, налог будет применяться в процентах от предыдущего ряда (в налоговом таблицы) суммы или объема.\n - ** ** Фактический (как уже упоминалось).\n 2. Счет Руководитель: лицевому счету, при которых этот налог будут забронированы \n 3. Центр Стоимость: Если налог / налог на заряд доход (как перевозка груза) или расходов это должен быть забронирован на МВЗ.\n 4. Описание: Описание налога (которые будут напечатаны в счетах-фактурах / кавычек).\n 5. Оценить: Налоговая ставка.\n 6. Количество: Сумма налога.\n 7. Всего: Суммарное к этой точке.\n 8. Введите Row: Если на базе ""Предыдущая сумма по строке"" вы можете выбрать номер строки которой будет приниматься в качестве основы для такого расчета (по умолчанию предыдущего ряда).\n 9. Рассмотрим налог или сбор для: В этом разделе вы можете указать, будет ли налог / налог на сбор только для оценки (не часть от общей суммы) или только для общей (не добавляет ценности объект) или для обоих.\n 10. Добавить или вычесть: Если вы хотите, чтобы добавить или вычесть налог.", -Salary Component Account,Зарплатный Компонент, +Salary Component Account,Счет компонента заработной платы, Default Bank / Cash account will be automatically updated in Salary Journal Entry when this mode is selected.,"По умолчанию банк / Наличный счет будет автоматически обновляться в Зарплатный Запись в журнале, когда выбран этот режим.", ACC-SINV-.YYYY.-,ACC-SINV-.YYYY.-, -Include Payment (POS),Включите Оплату (POS), +Include Payment (POS),Включая оплату (POS), Offline POS Name,Offline POS Имя, Is Return (Credit Note),Возврат (кредитная нота), Return Against Sales Invoice,Вернуться против накладная, @@ -5126,13 +5126,13 @@ Product Bundle Help,Продукт Связка Помощь, Time Sheet List,Список табелей учета рабочего времени, Time Sheets,Табель учета рабочего времени, Total Billing Amount,Общая сумма счета, -Sales Taxes and Charges Template,Продажи Налоги и сборы шаблона, +Sales Taxes and Charges Template,Шаблон налогов и сборов с продаж, Sales Taxes and Charges,Налоги и сборы с продаж, Loyalty Points Redemption,Выкуп лояльности очков, Redeem Loyalty Points,Погасить очки лояльности, Redemption Account,Счет погашения, Redemption Cost Center,Центр выкупа, -In Words will be visible once you save the Sales Invoice.,По словам будет виден только вы сохраните Расходная накладная., +In Words will be visible once you save the Sales Invoice.,В записях будет видно как только вы сохраните счет продажи., Allocate Advances Automatically (FIFO),Автоматическое выделение авансов (FIFO), Get Advances Received,Получить авансы полученные, Base Change Amount (Company Currency),Базовая Изменение Сумма (Компания Валюта), @@ -5149,7 +5149,7 @@ C-Form Applicable,C-образный Применимо, Commission Rate (%),Комиссия ставка (%), Sales Team1,Продажи Команда1, Against Income Account,Со счета доходов, -Sales Invoice Advance,Счет Продажи предварительный, +Sales Invoice Advance,Предварительный счет продажи, Advance amount,Предварительная сумма, Sales Invoice Item,Счет на продажу продукта, Customer's Item Code,Клиентский код продукта, @@ -5163,12 +5163,12 @@ Delivered By Supplier,Доставлено поставщиком, Deferred Revenue,Отложенный доход, Deferred Revenue Account,Отложенный счет доходов, Enable Deferred Revenue,Включить отложенный доход, -Stock Details,Подробности Запасов, +Stock Details,Подробности запасов, Customer Warehouse (Optional),Склад Клиент (Необязательно), -Available Batch Qty at Warehouse,Доступные Пакетная Кол-во на складе, -Available Qty at Warehouse,Доступное Кол-во на складе, +Available Batch Qty at Warehouse,Доступное кол-во пакетов на складе, +Available Qty at Warehouse,Доступное кол-во на складе, Delivery Note Item,Доставляемый продукт, -Base Amount (Company Currency),Базовая сумма (Компания Валюта), +Base Amount (Company Currency),Базовая сумма (валюта компании), Sales Invoice Timesheet,Счет по табелю, Time Sheet,Табель учета рабочего времени, Billing Hours,Оплачеваемые часы, @@ -5184,14 +5184,14 @@ Is Company,Это компания, Current State,Текущее состояние, Purchased,Купленный, From Shareholder,От акционеров, -From Folio No,Из Folio No, +From Folio No,Из фолио №, To Shareholder,Акционеру, -To Folio No,В Folio No, +To Folio No,В фолио №, Equity/Liability Account,Акционерный / Обязательный счет, Asset Account,Аккаунт активов, (including),(в том числе), ACC-SH-.YYYY.-,ACC-SH-.YYYY.-, -Folio no.,Folio no., +Folio no.,Фолио №, Address and Contacts,Адрес и контакты, Contact List,Список контактов, Hidden list maintaining the list of contacts linked to Shareholder,"Скрытый список, поддерживающий список контактов, связанных с Акционером", @@ -5201,7 +5201,7 @@ example: Next Day Shipping,Пример: доставка на следующи Shipping Rule Type,Тип правила доставки, Shipping Account,Счет доставки, Calculate Based On,Рассчитать на основе, -Fixed,Исправлена, +Fixed,Фиксированно, Net Weight,Вес нетто, Shipping Amount,Сумма доставки, Shipping Rule Conditions,Правило перевозки груза, @@ -5248,11 +5248,11 @@ Billing County,Платежный County, Billing State,Государственный счетов, Billing Zipcode,"Индекс по банковскому переводу, по счету", Billing Country,Страна плательщика, -Shipping City,Доставка Город, -Shipping County,графство Доставка, -Shipping State,Государственный Доставка, -Shipping Zipcode,Доставка Zipcode, -Shipping Country,Доставка Страна, +Shipping City,Доставка город, +Shipping County,Доставка округ, +Shipping State,Доставка регион, +Shipping Zipcode,Доставка индекс, +Shipping Country,Доставка страна, Tax Withholding Account,Удержание налога, Tax Withholding Rates,Ставки удержания налогов, Rates,Ставки, @@ -5278,7 +5278,7 @@ Ignore holidays,Игнорировать праздники, Previous Business Day,Предыдущий рабочий день, Next Business Day,Следующий рабочий день, Urgent,Важно, -Crop,урожай, +Crop,Урожай, Crop Name,Название урожая, Scientific Name,Научное название, "You can define all the tasks which need to carried out for this crop here. The day field is used to mention the day on which the task needs to be carried out, 1 being the 1st day, etc.. ","Здесь вы можете определить все задачи, которые необходимо выполнить для этого урожая. Поле дня используется для обозначения дня, когда задача должна быть выполнена, 1 - 1-й день и т. Д.", @@ -5286,7 +5286,7 @@ Crop Spacing,Интервал между культурами, Crop Spacing UOM,Интервал между кадрами UOM, Row Spacing,Интервал между рядами, Row Spacing UOM,Интервал строк, -Perennial,круглогодичный, +Perennial,Круглогодичный, Biennial,двухгодичный, Planting UOM,Посадка UOM, Planting Area,Площадь посадки, @@ -5296,7 +5296,7 @@ Produced Items,Производимые товары, Produce,Производить, Byproducts,Субпродукты, Linked Location,Связанное местоположение, -A link to all the Locations in which the Crop is growing,Ссылка на все Местоположения в который растет Урожай, +A link to all the Locations in which the Crop is growing,Ссылка на все местоположения в которых есть урожай, This will be day 1 of the crop cycle,Это будет первый день цикла урожая, ISO 8601 standard,Стандарт ISO 8601, Cycle Type,Тип цикла, @@ -5357,11 +5357,11 @@ Appearance,Внешность, Person Responsible,Ответственное лицо, Water Analysis Criteria,Критерии анализа воды, Weather Parameter,Параметры погоды, -ACC-ASS-.YYYY.-,ACC-АСС-.YYYY.-, +ACC-ASS-.YYYY.-,ACC-ASS-.YYYY.-, Asset Owner,Владелец актива, Asset Owner Company,Компания по управлению активами, -Custodian,попечитель, -Disposal Date,Утилизация Дата, +Custodian,Попечитель, +Disposal Date,Дата утилизации, Journal Entry for Scrap,Запись в журнале для лома, Available-for-use Date,Доступная для использования дата, Calculate Depreciation,Рассчитать амортизацию, @@ -5374,9 +5374,9 @@ Manual,Руководство, Value After Depreciation,Значение после амортизации, Total Number of Depreciations,Общее количество отчислений на амортизацию, Frequency of Depreciation (Months),Частота амортизации (месяцев), -Next Depreciation Date,Следующий Износ Дата, -Depreciation Schedule,Амортизация Расписание, -Depreciation Schedules,Амортизационные Расписания, +Next Depreciation Date,Следующая дата амортизации, +Depreciation Schedule,Амортизация расписание, +Depreciation Schedules,Амортизационные расписания, Insurance details,Детали страхования, Policy number,Номер полиса, Insurer,Страхователь, @@ -5394,7 +5394,7 @@ Asset Category Name,Asset Категория Название, Depreciation Options,Варианты амортизации, Enable Capital Work in Progress Accounting,Включить капитальную работу в процессе учета, Finance Book Detail,Финансовая книга, -Asset Category Account,Категория активов Счет, +Asset Category Account,Счет категории активов, Fixed Asset Account,Счет учета основных средств, Accumulated Depreciation Account,Начисленной амортизации Счет, Depreciation Expense Account,Износ счет расходов, @@ -5411,15 +5411,15 @@ Manufacturing User,Сотрудник производства, Asset Maintenance Log,Журнал обслуживания активов, ACC-AML-.YYYY.-,ACC-AML-.YYYY.-, Maintenance Type,Тип технического обслуживания, -Maintenance Status,Техническое обслуживание Статус, -Planned,планируемый, +Maintenance Status,Статус технического обслуживания, +Planned,Планируемый, Has Certificate ,Имеет сертификат, Certificate,Сертификат, Actions performed,Выполненные действия, Asset Maintenance Task,Задача по обслуживанию активов, Maintenance Task,Задача обслуживания, Preventive Maintenance,Профилактика, -Calibration,калибровка, +Calibration,Калибровка, 2 Yearly,2 года, Certificate Required,Требуется сертификат, Assign to Name,Назначить имя, @@ -5461,11 +5461,11 @@ Tree Details,Детали Дерево, Maintenance Team Member,Член технической службы, Team Member,Участник команды, Maintenance Role,Роль обслуживания, -Buying Settings,Настройка покупки, -Settings for Buying Module,Настройки для покупки модуля, -Supplier Naming By,Поставщик Именование По, +Buying Settings,Настройка закупок, +Settings for Buying Module,Настройки модуля закупок, +Supplier Naming By,Поставщик именование по, Default Supplier Group,Группа поставщиков по умолчанию, -Default Buying Price List,По умолчанию Покупка Прайс-лист, +Default Buying Price List,По умолчанию прайс-лист покупки, Backflush Raw Materials of Subcontract Based On,"Исходные материалы субподряда, основанные на", Material Transferred for Subcontract,"Материал, переданный для субподряда", Over Transfer Allowance (%),Превышение Пособия (%), @@ -5473,13 +5473,13 @@ Percentage you are allowed to transfer more against the quantity ordered. For ex PUR-ORD-.YYYY.-,PUR-ORD-.YYYY.-, Get Items from Open Material Requests,Получить товары из Открыть Запросов Материала, Fetch items based on Default Supplier.,Получать элементы на основе поставщика по умолчанию., -Required By,Требуется По, -Order Confirmation No,Подтверждение заказа Нет, +Required By,Требуется по, +Order Confirmation No,Подтверждение заказа №, Order Confirmation Date,Дата подтверждения заказа, -Customer Mobile No,Заказчик Мобильная Нет, -Customer Contact Email,Контактный адрес электронной почты Клиента, +Customer Mobile No,Заказчик номер мобильного, +Customer Contact Email,Контактный адрес электронной почты клиента, Set Target Warehouse,Установить целевой склад, -Sets 'Warehouse' in each row of the Items table.,Устанавливает «Склад» в каждой строке таблицы «Предметы»., +Sets 'Warehouse' in each row of the Items table.,Устанавливает «Склад» в каждой строке таблицы «Продукты»., Supply Raw Materials,Поставка сырья, Purchase Order Pricing Rule,Правило ценообразования заказа на покупку, Set Reserve Warehouse,Установить резервный склад, @@ -5501,13 +5501,13 @@ Blanket Order,Заказать одеяло, Blanket Order Rate,Стоимость заказа на одеяло, Returned Qty,Вернулся Кол-во, Purchase Order Item Supplied,Заказ товара Поставляется, -BOM Detail No,ВМ детали №, +BOM Detail No,Подробности спецификации №, Stock Uom,Единица измерения запасов, Raw Material Item Code,Код сырьевой позиции, Supplied Qty,Поставляемое кол-во, Purchase Receipt Item Supplied,Покупка Получение товара Поставляется, Current Stock,Наличие на складе, -PUR-RFQ-.YYYY.-,PUR-предложения-.YYYY.-, +PUR-RFQ-.YYYY.-,PUR-RFQ-.YYYY.-, For individual supplier,Для индивидуального поставщика, Link to Material Requests,Ссылка на запросы материалов, Message for Supplier,Сообщение для Поставщика, @@ -5560,7 +5560,7 @@ Scoring Standings,Подсчет очков, Criteria Setup,Настройка критериев, Load All Criteria,Загрузить все критерии, Scoring Criteria,Критерии оценки, -Scorecard Actions,Действия в Scorecard, +Scorecard Actions,Действия в оценочной карте, Warn for new Request for Quotations,Предупреждать о новых запросах на предложение, Warn for new Purchase Orders,Предупреждать о новых заказах на поставку, Notify Supplier,Сообщите поставщику, @@ -5573,22 +5573,22 @@ Criteria Weight,Вес критериев, Supplier Scorecard Period,Период оценки поставщика, PU-SSP-.YYYY.-,PU-SSP-.YYYY.-, Period Score,Период, -Calculations,вычисления, +Calculations,Вычисления, Criteria,Критерии, Variables,Переменные, -Supplier Scorecard Setup,Поставщик Scorecard Setup, +Supplier Scorecard Setup,Настройка оценочной карты поставщика, Supplier Scorecard Scoring Criteria,Критерии оценки поставщика, Score,Балл, -Supplier Scorecard Scoring Standing,Поставщик Scorecard Scoring Standing, +Supplier Scorecard Scoring Standing,Статус оценочной карты поставщика, Standing Name,Постоянное имя, Purple,Пурпурный, Yellow,Жёлтый, Orange,Оранжевый, -Min Grade,Min Grade, -Max Grade,Макс. Класс, +Min Grade,Мин. класс, +Max Grade,Макс. класс, Warn Purchase Orders,Предупреждать заказы на поставку, Prevent Purchase Orders,Запретить заказы на поставку, -Employee ,Сотрудник, +Employee ,Сотрудник , Supplier Scorecard Scoring Variable,Переменная переменной Scorecard поставщика, Variable Name,Имя переменной, Parameter Name,Имя параметра, @@ -5645,8 +5645,8 @@ Signed,подписанный, Party User,Пользователь Party, Unsigned,Неподписанный, Fulfilment Status,Статус выполнения, -N/A,N/A, -Unfulfilled,невыполненный, +N/A,Н/д, +Unfulfilled,Невыполненный, Partially Fulfilled,Частично выполнено, Fulfilled,Исполненная, Lapsed,Просроченные, @@ -5699,12 +5699,12 @@ OAuth Credentials,Учетные данные OAuth, Consumer Key,Потребительский ключ, Consumer Secret,Потребительский секрет, User Details,Детали пользователя, -Person URN,Человек URN, +Person URN,ИНН человека, Session Status,Статус сеанса, Lost Reason Detail,Потерянная причина подробно, Opportunity Lost Reason,Возможность потерянной причины, Potential Sales Deal,Сделка потенциальных продаж, -CRM-OPP-.YYYY.-,CRM-ОПП-.YYYY.-, +CRM-OPP-.YYYY.-,CRM-OPP-.YYYY.-, Opportunity From,Возможность из, Customer / Lead Name,Имя Клиента / Лида, Opportunity Type,Тип возможности, @@ -5719,14 +5719,14 @@ Contact Info,Контактная информация, Customer / Lead Address,Адрес Клиента / Лида, Contact Mobile No,Связаться Мобильный Нет, Enter name of campaign if source of enquiry is campaign,"Введите имя кампании, если источником исследования является кампания", -Opportunity Date,Дата Выявления, -Opportunity Item,Продукт Выявления, +Opportunity Date,Дата возможности, +Opportunity Item,Возможность по продукту, Basic Rate,Основная ставка, Stage Name,Сценический псевдоним, Social Media Post,Сообщение в социальных сетях, Post Status,Статус сообщения, Posted,Опубликовано, -Share On,Поделись, +Share On,Поделиться, Twitter,Twitter, LinkedIn,LinkedIn, Twitter Post Id,Идентификатор сообщения Twitter, @@ -5818,7 +5818,7 @@ Fee Schedule Program,Планирование программы, Student Batch,Student Batch, Total Students,Всего студентов, Fee Schedule Student Group,Плата за обучение Студенческая группа, -EDU-FST-.YYYY.-,EDU-FST .YYYY.-, +EDU-FST-.YYYY.-,EDU-FST-.YYYY.-, EDU-FEE-.YYYY.-,EDU-FEE-.YYYY.-, Include Payment,Включить оплату, Send Payment Request,Отправить запрос на оплату, @@ -5827,7 +5827,7 @@ Student Email,Электронная почта студента, Grading Scale Name,Название шкалы оценок, Grading Scale Intervals,Интервалы Оценочная шкала, Intervals,Интервалы, -Grading Scale Interval,Интервал Градация шкалы, +Grading Scale Interval,Интервал градации шкалы, Grade Code,Код оценки, Threshold,Предельное значение, Grade Description,Описание класса, @@ -5865,8 +5865,8 @@ Self-Driving Vehicle,Личное транспортное средство, Pick/Drop by Guardian,Доставляет и забирает родитель/попечитель, Enrolled courses,Зачисленные курсы, Program Enrollment Course,Курсы по зачислению в программу, -Program Enrollment Fee,Программа Зачисление Плата, -Program Enrollment Tool,Программа Зачисление Tool, +Program Enrollment Fee,Плата за участие в программе, +Program Enrollment Tool,Инструмент регистрации в программе, Get Students From,Получить студентов из, Student Applicant,Абитуриент, Get Students,Получить Студенты, @@ -5885,7 +5885,7 @@ Multiple Correct Answer,Множественный правильный отве Quiz Configuration,Конфигурация викторины, Passing Score,Проходной балл, Score out of 100,Оценка из 100, -Max Attempts,Макс Попытки, +Max Attempts,Макс. попыток, Enter 0 to waive limit,"Введите 0, чтобы отказаться от лимита", Grading Basis,Оценка основ, Latest Highest Score,Последний наивысший балл, @@ -5921,7 +5921,7 @@ Guardians,Опекуны, Sibling Details,подробности Родственные, Siblings,Братья и сестры, Exit,Выход, -Date of Leaving,Дата Покидая, +Date of Leaving,Дата ухода, Leaving Certificate Number,Оставив номер сертификата, Reason For Leaving,Причина ухода, Student Admission,приёму студентов, @@ -5958,9 +5958,9 @@ Student Group Student,Студенческая группа Student, Group Roll Number,Номер группы в реестре учреждения, Student Guardian,Студент-хранитель, Relation,Отношение, -Mother,Мама, +Mother,Мать, Father,Отец, -Student Language,Student Язык, +Student Language,Язык студента, Student Leave Application,Заявление на отпуск обучаемого, Mark as Present,Отметить как “Присутствует”, Student Log,Журнал студента, @@ -6042,7 +6042,7 @@ Quickbooks Company ID,Идентификатор компании Quickbooks, Company Settings,Настройки компании, Default Shipping Account,Учетная запись по умолчанию, Default Warehouse,Склад по умолчанию, -Default Cost Center,По умолчанию Центр Стоимость, +Default Cost Center,Центр затрат по умолчанию, Undeposited Funds Account,Учет нераспределенных средств, Shopify Log,Логи Shopify, Request Data,Запросить данные, @@ -6063,7 +6063,7 @@ For Company,Для Компании, Cash Account will used for Sales Invoice creation,Денежный счет будет использоваться для создания счета-фактуры, Update Price from Shopify To ERPNext Price List,Обновить цену от Shopify до прайс-листа ERPNext, Default Warehouse to to create Sales Order and Delivery Note,Склад по умолчанию для формирования Сделки и Доставки, -Sales Order Series,Идентификаторы Сделок, +Sales Order Series,Идентификаторы сделок, Import Delivery Notes from Shopify on Shipment,Импорт уведомлений о доставке из Shopify on Shipment, Delivery Note Series,Идентификаторы документов доставки, Import Sales Invoice from Shopify if Payment is marked,"Импортировать счет-фактуру продавца, чтобы узнать, отмечен ли платеж", @@ -6100,7 +6100,7 @@ Is Day Book Data Imported,Импортированы ли данные днев Woocommerce Settings,Настройки Woocommerce, Enable Sync,Включить синхронизацию, Woocommerce Server URL,URL-адрес сервера Woocommerce, -Secret,секрет, +Secret,Секрет, API consumer key,Пользовательский ключ API, API consumer secret,Секрет потребителя API, Tax Account,Налоговый счет, @@ -6126,7 +6126,7 @@ HLC-CPR-.YYYY.-,HLC-CPR-.YYYY.-, Procedure Template,Шаблон процедуры, Procedure Prescription,Процедура рецепта, Service Unit,Сервисный блок, -Consumables,расходные материалы, +Consumables,Расходные материалы, Consume Stock,Потребляемый запас, Invoice Consumables Separately,Отдельно выставляйте счета на расходные материалы, Consumption Invoiced,Счет за потребление, @@ -6143,14 +6143,14 @@ Sample UOM,Образец единицы измерения, Collection Details,Сведения о собрании, Change In Item,Изменить элемент, Codification Table,Таблица кодирования, -Complaints,жалобы, +Complaints,Жалобы, Dosage Strength,Дозировка, Strength,Прочность, Drug Prescription,Рецепт лекарств, Drug Name / Description,Название / описание препарата, -Dosage,дозировка, +Dosage,Дозировка, Dosage by Time Interval,Дозировка по временному интервалу, -Interval,интервал, +Interval,Интервал, Interval UOM,Интервал UOM, Hour,Час, Update Schedule,Расписание обновлений, @@ -6179,10 +6179,10 @@ Mobile,Мобильный, Phone (R),Телефон (R), Phone (Office),Телефон(офисный), Employee and User Details,Сведения о сотруднике и пользователе, -Hospital,больница, +Hospital,Больница, Appointments,Назначения, Practitioner Schedules,Расписание практикующих, -Charges,расходы, +Charges,Расходы, Out Patient Consulting Charge,Плата за консультацию пациента, Default Currency,Базовая валюта, Healthcare Schedule Time Slot,Расписание занятий, @@ -6217,7 +6217,7 @@ Time period (Valid number of days) for free consultations,Срок (Действ Default Healthcare Service Items,Предметы медицинского обслуживания по умолчанию, "You can configure default Items for billing consultation charges, procedure consumption items and inpatient visits","Вы можете настроить элементы по умолчанию для выставления счетов за консультации, элементы потребления процедур и посещения стационара.", Clinical Procedure Consumable Item,Расходный материал для клинической процедуры, -Default Accounts,Учетные записи по умолчанию, +Default Accounts,Счета по умолчанию, Default income accounts to be used if not set in Healthcare Practitioner to book Appointment charges.,"Учетные записи будут использоваться по умолчанию, если они не установлены в Практикуме здравоохранения, чтобы забронировать плату за назначение.", Default receivable accounts to be used to book Appointment charges.,"Счета дебиторской задолженности по умолчанию, которые будут использоваться для учета расходов на встречу.", Out Patient SMS Alerts,Оповещения SMS для пациентов, @@ -6258,7 +6258,7 @@ Admission Scheduled,Входное расписание, Discharge Scheduled,Расписание выписок, Discharged,Выписанный, Admission Schedule Date,Дата приема, -Admitted Datetime,Допустимое значение Datetime, +Admitted Datetime,Допустимое значение даты и времени, Expected Discharge,Ожидаемый выпуск, Discharge Date,Дата выписки, Lab Prescription,Лабораторный рецепт, @@ -6318,7 +6318,7 @@ Duration (In Minutes),Продолжительность (в минутах), Reference Sales Invoice,Ссылка на счет-фактуру, More Info,Подробнее, Referring Practitioner,Справляющий практик, -Reminded,напомнил, +Reminded,Напомнил, HLC-PA-.YYYY.-,HLC-PA-.YYYY.-, Assessment Template,Шаблон оценки, Assessment Datetime,Дата и время оценки, @@ -6333,14 +6333,14 @@ Patient Assessment Parameter,Параметр оценки пациента, Patient Assessment Sheet,Лист оценки пациента, Patient Assessment Template,Шаблон оценки пациента, Assessment Parameters,Параметры оценки, -Parameters,параметры, +Parameters,Параметры, Assessment Scale,Шкала оценки, Scale Minimum,Минимальный масштаб, Scale Maximum,Максимальный масштаб, HLC-ENC-.YYYY.-,HLC-ENC-.YYYY.-, Encounter Date,Дата встречи, Encounter Time,Время встречи, -Encounter Impression,Впечатление от Encounter, +Encounter Impression,Впечатление от встречи, Symptoms,Симптомы, In print,В печати, Medical Coding,Медицинское кодирование, @@ -6386,7 +6386,7 @@ Tongue,Язык, Coated,Покрытый, Very Coated,Очень хорошо, Normal,Нормальный, -Furry,пушистый, +Furry,Пушистый, Cuts,Порезы, Abdomen,Брюшная полость, Bloated,Раздутый, @@ -6427,13 +6427,13 @@ Default Taxes and Charges,По умолчанию Налоги и сборы, Default Invoice Naming Series,Идентификаторы по имени для счета по умолчанию, Additional Salary,Дополнительная зарплата, HR,HR, -HR-ADS-.YY.-.MM.-,HR-ADS-.YY .-. MM.-, -Salary Component,Зарплата Компонент, +HR-ADS-.YY.-.MM.-,HR-ADS-.YY.-.MM.-, +Salary Component,Компонент зарплаты, Overwrite Salary Structure Amount,Перезаписать сумму заработной платы, Deduct Full Tax on Selected Payroll Date,Вычесть полный налог на выбранную дату расчета, Payroll Date,Дата расчета заработной платы, Date on which this component is applied,Дата применения этого компонента, -Salary Slip,Зарплата скольжения, +Salary Slip,Справка о заработной плате, Salary Component Type,Тип залогового имущества, HR User,Сотрудник отдела кадров, Appointment Letter,Назначение письмо, @@ -6451,9 +6451,9 @@ For Employee Name,Для имени сотрудника, Goals,Цели, Total Score (Out of 5),Всего рейтинг (из 5), "Any other remarks, noteworthy effort that should go in the records.","Любые другие замечания, отметить усилия, которые должны идти в записях.", -Appraisal Goal,Оценка Гол, -Key Responsibility Area,Ключ Ответственность Площадь, -Weightage (%),Weightage (%), +Appraisal Goal,Цель оценки, +Key Responsibility Area,Основная зона ответственности, +Weightage (%),Весовая нагрузка (%), Score (0-5),Оценка (0-5), Score Earned,Оценка Заработано, Appraisal Template Title,Название шаблона оценки, @@ -6470,7 +6470,7 @@ Late Entry,Поздний вход, Early Exit,Ранний выход, Half Day Date,Полдня Дата, On Duty,На службе, -Explanation,объяснение, +Explanation,Объяснение, Compensatory Leave Request,Компенсационный отпуск, Leave Allocation,Распределение отпусков, Worked On Holiday,Работал на отдыхе, @@ -6558,14 +6558,14 @@ Health Details,Подробности здоровья, "Here you can maintain height, weight, allergies, medical concerns etc","Здесь вы можете записывать рост, вес, аллергии, медицинские проблемы и т. п.", Educational Qualification,Образовательный ценз, Previous Work Experience,Предыдущий опыт работы, -External Work History,Внешний Работа История, +External Work History,Внешний история работы, History In Company,История в компании, -Internal Work History,Внутренняя история Работа, +Internal Work History,Внутренняя история работ, Resignation Letter Date,Отставка Письмо Дата, Relieving Date,Освобождение Дата, Reason for Leaving,Причина увольнения, Leave Encashed?,Оставьте инкассированы?, -Encashment Date,Инкассация Дата, +Encashment Date,Дата инкассации, New Workplace,Новый рабочий участок, HR-EAD-.YYYY.-,HR-EAD-.YYYY.-, Returned Amount,Возвращенная сумма, @@ -6602,8 +6602,8 @@ Log Type,Тип журнала, OUT,ИЗ, Location / Device ID,Расположение / ID устройства, Skip Auto Attendance,Пропустить автоматическое посещение, -Shift Start,Shift Start, -Shift End,Shift End, +Shift Start,Сдвинуть начало, +Shift End,Сдвинуть окончание, Shift Actual Start,Сдвиг фактического начала, Shift Actual End,Сдвиг фактического конца, Employee Education,Сотрудник Образование, @@ -6678,23 +6678,23 @@ New Employee ID,Новый идентификатор сотрудника, Employee Transfer Property,Свойство переноса персонала, HR-EXP-.YYYY.-,HR-EXP-.YYYY.-, Expense Taxes and Charges,Расходные налоги и сборы, -Total Sanctioned Amount,Всего Санкционированный Количество, +Total Sanctioned Amount,Общая санкционированная сумма, Total Advance Amount,Общая сумма аванса, Total Claimed Amount,Всего заявленной суммы, Total Amount Reimbursed,Общая сумма возмещаются, -Vehicle Log,Автомобиль Вход, +Vehicle Log,Журнал автомобиля, Employees Email Id,Идентификаторы почты сотрудников, More Details,Подробнее, -Expense Claim Account,Счет Авансового Отчета, -Expense Claim Advance,Претензия на увеличение расходов, +Expense Claim Account,Счет требований о расходах, +Expense Claim Advance,Предварительное требование о возмещении расходов, Unclaimed amount,Невостребованная сумма, Expense Claim Detail,Детали Авансового Отчета, Expense Date,Дата расхода, -Expense Claim Type,Тип Авансового Отчета, +Expense Claim Type,Тип требования о расходах, Holiday List Name,Название списка выходных, Total Holidays,Всего праздников, Add Weekly Holidays,Добавить еженедельные каникулы, -Weekly Off,Еженедельный Выкл, +Weekly Off,Еженедельный выходной, Add to Holidays,Добавить в праздники, Holidays,Праздники, Clear Table,Очистить таблицу, @@ -6822,7 +6822,7 @@ Is Compensatory,Компенсационный, Maximum Carry Forwarded Leaves,Максимум несут переадресованные листья, Expire Carry Forwarded Leaves (Days),Expire Carry Forwarded Leaves (Days), Calculated in days,Рассчитано в днях, -Encashment,инкассация, +Encashment,Инкассация, Allow Encashment,Разрешить инкассацию, Encashment Threshold Days,Дни порога инкассации, Earned Leave,Заработано, @@ -6837,7 +6837,7 @@ Employees,Сотрудники, Number Of Employees,Количество работников, Employee Details,Сотрудник Подробнее, Validate Attendance,Подтвердить посещаемость, -Salary Slip Based on Timesheet,Зарплата скольжения на основе Timesheet, +Salary Slip Based on Timesheet,Зарплатная ведомость на основе карточки учета рабочего времени, Select Payroll Period,Выберите Период начисления заработной платы, Deduct Tax For Unclaimed Employee Benefits,Вычет налога для невостребованных сотрудников, Deduct Tax For Unsubmitted Tax Exemption Proof,Доход от вычета налога за отказ в освобождении от налогов, @@ -6876,7 +6876,7 @@ Tax on flexible benefit,Налог на гибкую выгоду, Tax on additional salary,Налог на дополнительную зарплату, Salary Structure,Зарплата Структура, Working Days,В рабочие дни, -Salary Slip Timesheet,Зарплата скольжению Timesheet, +Salary Slip Timesheet,Табель учета рабочего времени, Total Working Hours,Всего часов работы, Hour Rate,Часовой разряд, Bank Account No.,Счет №, @@ -6891,8 +6891,8 @@ Total Loan Repayment,Общая сумма погашения кредита, net pay info,Чистая информация платить, Gross Pay - Total Deduction - Loan Repayment,Gross Pay - Итого Вычет - Погашение кредита, Total in words,Всего в словах, -Net Pay (in words) will be visible once you save the Salary Slip.,"Чистая Платное (прописью) будут видны, как только вы сохраните Зарплата Слип.", -Salary Component for timesheet based payroll.,Заработная плата Компонент для расчета заработной платы на основе расписания., +Net Pay (in words) will be visible once you save the Salary Slip.,"Чистая плата (прописью) будет видна, как только вы сохраните зарплатную ведомость.", +Salary Component for timesheet based payroll.,Компонент заработной платы для расчета зарплаты на основе расписания., Leave Encashment Amount Per Day,Оставить количество инкассации в день, Max Benefits (Amount),Максимальные выгоды (сумма), Salary breakup based on Earning and Deduction.,Зарплата распада на основе Заработок и дедукции., @@ -6908,8 +6908,8 @@ Determine Check-in and Check-out,Определить Заезд и Выезд, Alternating entries as IN and OUT during the same shift,Чередование записей как IN и OUT в течение одной смены, Strictly based on Log Type in Employee Checkin,Строго на основе типа журнала в регистрации сотрудников, Working Hours Calculation Based On,Расчет рабочего времени на основе, -First Check-in and Last Check-out,Первый заезд и Последний выезд, -Every Valid Check-in and Check-out,Каждый действительный заезд и выезд, +First Check-in and Last Check-out,Первый заезд и последний выезд, +Every Valid Check-in and Check-out,Каждый проверенный заезд и выезд, Begin check-in before shift start time (in minutes),Начать регистрацию до начала смены (в минутах), The time before the shift start time during which Employee Check-in is considered for attendance.,"Время до начала смены, в течение которого регистрация сотрудников рассматривается для посещения.", Allow check-out after shift end time (in minutes),Разрешить выезд после окончания смены (в минутах), @@ -6917,7 +6917,7 @@ Time after the end of shift during which check-out is considered for attendance. Working Hours Threshold for Half Day,Порог рабочего времени на полдня, Working hours below which Half Day is marked. (Zero to disable),"Рабочее время, ниже которого отмечается полдня. (Ноль отключить)", Working Hours Threshold for Absent,Порог рабочего времени для отсутствующих, -Working hours below which Absent is marked. (Zero to disable),Порог рабочего времени, ниже которого устанавливается отметка «Отсутствует». (Ноль для отключения),", +"Working hours below which Absent is marked. (Zero to disable)","Порог рабочего времени, ниже которого устанавливается отметка «Отсутствует». (Ноль для отключения)", Process Attendance After,Посещаемость процесса после, Attendance will be marked automatically only after this date.,Посещаемость будет отмечена автоматически только после этой даты., Last Sync of Checkin,Последняя синхронизация регистрации, @@ -6947,15 +6947,15 @@ Training Program,Программа обучения, Event Status,Состояние события, Has Certificate,Имеет сертификат, Seminar,Семинар, -Theory,теория, -Workshop,мастерская, +Theory,Теория, +Workshop,Мастерская, Conference,Конференция, Exam,Экзамен, -Internet,интернет, +Internet,Интернет, Self-Study,Самообучения, -Advance,авансировать, +Advance,Аванс, Trainer Name,Имя тренера, -Trainer Email,Электронная почта Тренера, +Trainer Email,Электронная почта тренера, Attendees,Присутствующие, Employee Emails,Электронные почты сотрудников, Training Event Employee,Обучение сотрудников Событие, @@ -7147,11 +7147,11 @@ Proposed Pledge,Предлагаемый залог, Total Payment,Всего к оплате, Balance Loan Amount,Баланс Сумма кредита, Is Accrued,Начислено, -Salary Slip Loan,Зарплатный ссудный кредит, +Salary Slip Loan,Ссуда на зарплату, Loan Repayment Entry,Запись о погашении кредита, Sanctioned Loan Amount,Санкционированная сумма кредита, Sanctioned Amount Limit,Утвержденный лимит суммы, -Unpledge,Unpledge, +Unpledge,Отменить залог, Haircut,Стрижка волос, MAT-MSH-.YYYY.-,MAT-MSH-.YYYY.-, Generate Schedule,Создать расписание, @@ -7182,12 +7182,12 @@ Blanket Order Item,Элемент заказа одеяла, Ordered Quantity,Заказанное количество, Item to be manufactured or repacked,Продукт должен быть произведен или переупакован, Quantity of item obtained after manufacturing / repacking from given quantities of raw materials,Количество пункта получены после изготовления / переупаковка от заданных величин сырья, -Set rate of sub-assembly item based on BOM,Установить скорость элемента подзаголовки на основе спецификации, +Set rate of sub-assembly item based on BOM,Установить скорость сборки на основе спецификации, Allow Alternative Item,Разрешить альтернативный элемент, Item UOM,Единиц продукта, Conversion Rate,Коэффициент конверсии, Rate Of Materials Based On,Оценить материалов на основе, -With Operations,С операций, +With Operations,С операциями, Manage cost of operations,Управление стоимостью операций, Transfer Material Against,Передача материала против, Routing,Маршрутизация, @@ -7213,16 +7213,16 @@ Website Specifications,Сайт характеристики, Show Items,Показать продукты, Show Operations,Показать операции, Website Description,Описание, -BOM Explosion Item,Дерево ВМ продукта, +BOM Explosion Item,Дерево спецификации продукта, Qty Consumed Per Unit,"Кол-во, потребляемое за единицу", Include Item In Manufacturing,Включить товар в производство, -BOM Item,ВМ продукта, +BOM Item,Спецификация продукта, Item operation,Работа с элементами, Rate & Amount,Стоимость и сумма, Basic Rate (Company Currency),Основная ставка (валюта компании), Scrap %,Лом%, Original Item,Оригинальный товар, -BOM Operation,ВМ Операция, +BOM Operation,Операция спецификации, Operation Time ,Время операции, In minutes,В считанные минуты, Batch Size,Размер партии, @@ -7233,15 +7233,15 @@ Basic Amount (Company Currency),Базовая сумма (Компания Ва BOM Update Tool,Инструмент обновления спецификации, "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM.\nIt also updates latest price in all the BOMs.","Замените конкретную спецификацию во всех других спецификациях, где она используется. Он заменит старую ссылку BOM, обновит стоимость и восстановит таблицу «BOM Explosion Item» в соответствии с новой спецификацией. Он также обновляет последнюю цену во всех спецификациях.", Replace BOM,Заменить спецификацию, -Current BOM,Текущий BOM, +Current BOM,Текущая спецификация, The BOM which will be replaced,"В спецификации, которые будут заменены", The new BOM after replacement,Новая спецификация после замены, Replace,Заменить, Update latest price in all BOMs,Обновление последней цены во всех спецификациях, BOM Website Item,Спецификация продукта на сайте, -BOM Website Operation,BOM Операция Сайт, +BOM Website Operation,Операция спецификации на сайте, Operation Time,Время работы, -PO-JOB.#####,ПО-РАБОТА. #####, +PO-JOB.#####,PO-JOB.#####, Timing Detail,Сроки, Time Logs,Журналы времени, Total Time in Mins,Общее время в минутах, @@ -7252,9 +7252,9 @@ Started Time,Время начала, Current Time,Текущее время, Job Card Item,Номер карты заданий, Job Card Time Log,Журнал учета рабочего времени, -Time In Mins,Время в Мин, -Completed Qty,Завершено Кол-во, -Manufacturing Settings,Настройки Производство, +Time In Mins,Время в мин., +Completed Qty,Завершено кол-во, +Manufacturing Settings,Настройки производства, Raw Materials Consumption,Потребление сырья, Allow Multiple Material Consumption,Разрешить потребление нескольких материалов, Backflush Raw Materials Based On,На основе обратного отнесения затрат на сырье и материалы, @@ -7277,7 +7277,7 @@ Material Request Type,Тип заявки на материал, Material Issue,Вопрос по материалу, Customer Provided,Клиент предоставлен, Minimum Order Quantity,Минимум для заказа, -Default Workstation,По умолчанию Workstation, +Default Workstation,Рабочее место по умолчанию, Production Plan,План производства, MFG-PP-.YYYY.-,MFG-PP-.YYYY.-, Get Items From,Получить продукты от, @@ -7303,16 +7303,16 @@ Planned Start Date,Планируемая дата начала, Quantity and Description,Количество и описание, material_request_item,material_request_item, Product Bundle Item,Связка продуктов, -Production Plan Material Request,Производство План Материал Запрос, -Production Plan Sales Order,Производственный План по Сделкам, -Sales Order Date,Дата Сделки, +Production Plan Material Request,Производственный план по запросам материалов, +Production Plan Sales Order,Производственный план по сделкам, +Sales Order Date,Дата сделки, Routing Name,Название маршрутизации, MFG-WO-.YYYY.-,MFG-WO-.YYYY.-, -Item To Manufacture,Продукт для производство, -Material Transferred for Manufacturing,Материал переведен на Производство, -Manufactured Qty,Изготовлено Кол-во, -Use Multi-Level BOM,Использование Multi-Level BOM, -Plan material for sub-assemblies,План материал для Субсборки, +Item To Manufacture,Продукт для производства, +Material Transferred for Manufacturing,Материал отправлен на производство, +Manufactured Qty,Изготовлено кол-во, +Use Multi-Level BOM,Использование многоуровневой специфифкации, +Plan material for sub-assemblies,План материал для субсборки, Skip Material Transfer to WIP Warehouse,Пропустить передачу материала на склад WIP, Check if material transfer entry is not required,"Проверьте, не требуется ли запись материала", Backflush Raw Materials From Work-in-Progress Warehouse,Сбросить сырье с незавершенного производства, @@ -7342,34 +7342,34 @@ Operation Description,Операция Описание, Operation completed for how many finished goods?,Операция выполнена На сколько готовой продукции?, Work in Progress,Незавершенная работа, Estimated Time and Cost,Расчетное время и стоимость, -Planned Start Time,Планируемые Время, -Planned End Time,Планируемые Время окончания, +Planned Start Time,Планируемые время, +Planned End Time,Планируемые время окончания, in Minutes,Через несколько минут, Actual Time and Cost,Фактическое время и стоимость, -Actual Start Time,Фактическое начало Время, -Actual End Time,Фактическое Время окончания, +Actual Start Time,Фактическое время начала, +Actual End Time,Фактическое время окончания, Updated via 'Time Log',"Обновлено помощью ""Time Вход""", -Actual Operation Time,Фактическая Время работы, +Actual Operation Time,Фактическая время работы, in Minutes\nUpdated via 'Time Log',"в минутах \n Обновлено помощью ""Time Вход""", (Hour Rate / 60) * Actual Operation Time,(часовая ставка ÷ 60) × фактическое время работы, -Workstation Name,Имя рабочей станции, +Workstation Name,Название рабочего места, Production Capacity,Производственная мощность, Operating Costs,Операционные расходы, Electricity Cost,Стоимость электроэнергии, per hour,в час, -Consumable Cost,Расходные Стоимость, +Consumable Cost,Расходная стоимость, Rent Cost,Стоимость аренды, Wages,Заработная плата, Wages per hour,Заработная плата в час, Net Hour Rate,Чистая стоимость часа, -Workstation Working Hour,Рабочая станция Рабочие часы, +Workstation Working Hour,Рабочие часы на рабочем месте, Certification Application,Приложение для сертификации, Name of Applicant,Имя заявителя, Certification Status,Статус сертификации, Yet to appear,Но чтобы появиться, Certified,Проверенный, Not Certified,Не сертифицирован, -USD,доллар США, +USD,USD, INR,INR, Certified Consultant,Сертифицированный консультант, Name of Consultant,Имя консультанта, @@ -7383,7 +7383,7 @@ chapters/chapter_name\nleave blank automatically set after saving chapter.,гл Chapter Members,Члены группы, Members,Участники, Chapter Member,Участник, -Website URL,URL веб-сайта, +Website URL,URL сайта, Leave Reason,Оставить разум, Donor Name,Имя донора, Donor Type,Тип донора, @@ -7396,7 +7396,7 @@ Show on Website,Показать на сайте, Assessment Mark (Out of 10),Оценка (из 10), Assessment Manager,Менеджер по оценке, Email Notification Sent,Отправлено уведомление по электронной почте, -NPO-MEM-.YYYY.-,НПО-MEM-.YYYY.-, +NPO-MEM-.YYYY.-,NPO-MEM-.YYYY.-, Membership Expiry Date,Дата истечения срока членства, Razorpay Details,Детали Razorpay, Subscription ID,ID подписки, @@ -7431,23 +7431,23 @@ Homepage,Главная страница, Hero Section Based On,Раздел героя на основе, Homepage Section,Раздел домашней страницы, Hero Section,Раздел героев, -Tag Line,Tag Line, -Company Tagline for website homepage,Компания Слоган на главную страницу сайта, -Company Description for website homepage,Описание компании на главную страницу сайта, -Homepage Slideshow,Домашняя страница Слайдшоу, +Tag Line,Тег линии, +Company Tagline for website homepage,Слоган компании на главной странице сайта, +Company Description for website homepage,Описание компании на главной странице сайта, +Homepage Slideshow,Слайдшоу на домашней странице, "URL for ""All Products""",URL для "Все продукты", -Products to be shown on website homepage,Продукты будут показаны на главной страницы сайта, -Homepage Featured Product,Главная рекомендуемых продуктов, +Products to be shown on website homepage,Продукты будут показаны на главной странице сайта, +Homepage Featured Product,Рекомендуемые продукты на главной страницу, route,маршрут, Section Based On,Раздел на основе, -Section Cards,Раздел Карты, +Section Cards,Раздел Карточки, Number of Columns,Число столбцов, Number of columns for this section. 3 cards will be shown per row if you select 3 columns.,"Количество столбцов для этого раздела. 3 карты будут показаны в строке, если вы выберете 3 столбца.", Section HTML,Раздел HTML, Use this field to render any custom HTML in the section.,Используйте это поле для визуализации любого пользовательского HTML в разделе., -Section Order,Раздел Заказ, +Section Order,Раздел заказов, "Order in which sections should appear. 0 is first, 1 is second and so on.","Порядок, в котором должны появляться разделы. 0 - первое, 1 - второе и т. Д.", -Homepage Section Card,Домашняя страница Раздел Карта, +Homepage Section Card,Домашняя страница раздел карт, Subtitle,Подзаголовок, Products Settings,Настройки продуктов, Home Page is Products,Главная — Продукты, @@ -7455,8 +7455,8 @@ Home Page is Products,Главная — Продукты, Show Availability Status,Показать статус доступности, Product Page,Страница продукта, Products per Page,Продукты на страницу, -Enable Field Filters,Включить полевые фильтры, -Item Fields,Поля предметов, +Enable Field Filters,Включить поле фильтров, +Item Fields,Поля продуктов, Enable Attribute Filters,Включить фильтры атрибутов, Attributes,Атрибуты, Hide Variants,Скрыть варианты, @@ -7472,7 +7472,7 @@ Default Costing Rate,Ставка стоимости по умолчанию, Default Billing Rate,Платежная ставка по умолчанию, Dependent Task,Зависимая задача, Project Type,Тип проекта, -% Complete Method,% выполнения, +% Complete Method,% Метод оценки готовности, Task Completion,Завершеные задачи, Task Progress,Ход выполнения задачи, % Completed,% Завершено, @@ -7509,7 +7509,7 @@ Project Update,Обновление проекта, Project User,Пользователь проекта, View attachments,Просмотр вложений, Projects Settings,Настройки проектов, -Ignore Workstation Time Overlap,Игнорировать перекрытие времени рабочей станции, +Ignore Workstation Time Overlap,Игнорировать перекрытие времени на рабочем месте, Ignore User Time Overlap,Игнорировать перекрытие пользовательского времени, Ignore Employee Time Overlap,Игнорировать перекрытие времени сотрудников, Weight,Вес, @@ -7532,14 +7532,14 @@ Review Date,Дата проверки, Closing Date,Дата закрытия, Task Depends On,Задача зависит от, Task Type,Тип задачи, -TS-.YYYY.-,ТС-.ГГГГ.-, -Employee Detail,Сотрудник Деталь, +TS-.YYYY.-,TS-.YYYY.-, +Employee Detail,Подробности о сотруднике, Billing Details,Платежные реквизиты, Total Billable Hours,Всего человеко-часов, Total Billed Hours,Всего оплачиваемые часы, -Total Costing Amount,Общая сумма Стоимостью, -Total Billable Amount,Общая сумма Выплачиваемый, -Total Billed Amount,Общая сумма Объявленный, +Total Costing Amount,Общая стоимость, +Total Billable Amount,Общая сумма выплат, +Total Billed Amount,Объявленная стоимость, % Amount Billed,% Сумма счета, Hrs,Часов, Costing Amount,Калькуляция Сумма, @@ -7572,12 +7572,12 @@ Quality Review Objective,Цель проверки качества, DATEV Settings,Настройки DATEV, Regional,Региональный, Consultant ID,Идентификатор консультанта, -GST HSN Code,Код GST HSN, -HSN Code,Код HSN, -GST Settings,Настройки GST, -GST Summary,Обзор GST, +GST HSN Code,НДС ГС код, +HSN Code,ГС код, +GST Settings,Настройки НДС, +GST Summary,Сумма НДС, GSTIN Email Sent On,GSTIN электронная почта отправлена, -GST Accounts,Учетные записи GST, +GST Accounts,Счета НДС, B2C Limit,Ограничение B2C, Set Invoice Value for B2C. B2CL and B2CS calculated based on this invoice value.,"Установите значение счета для B2C. B2CL и B2CS, рассчитанные на основе этой стоимости счета.", GSTR 3B Report,Отчет GSTR 3B, @@ -7639,11 +7639,11 @@ Reservation Time,Время резервирования, Reservation End Time,Время окончания бронирования, No of Seats,Количество мест, Minimum Seating,Минимальное размещение, -"Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales Order etc from Campaigns to gauge Return on Investment. ","Следите за Кампаниями по продажам. Отслеживайте Лиды, Предложения, Сделки и т.п. от Кампаний и оцените отдачу от инвестиций.", +"Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales Order etc from Campaigns to gauge Return on Investment. ","Следите за кампаниями по продажам. Отслеживайте лиды, предложения, сделки и т.п. от кампаний и оцените отдачу от инвестиций.", SAL-CAM-.YYYY.-,SAL-CAM-.YYYY.-, Campaign Schedules,Расписание кампаний, Buyer of Goods and Services.,Покупатель товаров и услуг., -CUST-.YYYY.-,КЛИЕНТ-.YYYY.-, +CUST-.YYYY.-,CUST-.YYYY.-, Default Company Bank Account,Стандартный банковский счет компании, From Lead,Из Лида, Account Manager,Менеджер по работе с клиентами, @@ -7670,7 +7670,7 @@ Industry Type,Тип индустрии, MAT-INS-.YYYY.-,MAT-INS-.YYYY.-, Installation Date,Дата установки, Installation Time,Время установки, -Installation Note Item,Установка Примечание Пункт, +Installation Note Item,Установка примечаний к продукту, Installed Qty,Установленное количество, Lead Source,Источник лида, Period Start Date,Дата начала периода, @@ -7684,7 +7684,7 @@ Collected Amount,Собранная сумма, Expected Amount,Ожидаемая сумма, POS Closing Voucher Invoices,Счета-фактуры закрытых ваучеров, Quantity of Items,Количество позиций, -"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. \n\nThe package **Item** will have ""Is Stock Item"" as ""No"" and ""Is Sales Item"" as ""Yes"".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.\n\nNote: BOM = Bill of Materials","Собрать группу продуктов в третий продукт. Это полезно когда Вы комплектуете определённые продукты в упаковку и ведёте учёт не упаковок, а самих продуктов. Пакетному продукту указывают «Складируемый продукт» — «Нет» и «Продаваемый продукт» — «Да». Для примера: если вы продаете ноутбуки и рюкзаки отдельно, но они имеют специальную цену когда клиент покупает их вместе, тогда «ноутбук+рюкзак» будет пакетным продуктом. Примечание: ВМ = Ведомость материалов (спецификация)", +"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. \n\nThe package **Item** will have ""Is Stock Item"" as ""No"" and ""Is Sales Item"" as ""Yes"".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.\n\nNote: BOM = Bill of Materials","Собрать группу продуктов в третий продукт. Это полезно когда вы комплектуете определённые продукты в упаковку и ведёте учёт не упаковок, а самих продуктов. Пакетному продукту указывают «Складируемый продукт» — «Нет» и «Продаваемый продукт» — «Да». Для примера: если вы продаете ноутбуки и рюкзаки отдельно, но они имеют специальную цену когда клиент покупает их вместе, тогда «ноутбук+рюкзак» будет пакетным продуктом. Примечание: ВМ = Ведомость материалов (спецификация)", Parent Item,Родительский продукт, List items that form the package.,"Список продуктов, которые формируют пакет", SAL-QTN-.YYYY.-,SAL-QTN-.YYYY.-, @@ -7716,8 +7716,8 @@ Fully Billed,Выставлены счет(а) полностью, Partly Billed,Выставлены счет(а) частично, Ensure Delivery Based on Produced Serial No,Обеспечить доставку на основе серийного номера, Supplier delivers to Customer,Поставщик поставляет Покупателю, -Delivery Warehouse,Доставка Склад, -Planned Quantity,Планируемый Количество, +Delivery Warehouse,Доставка на склад, +Planned Quantity,Планируемое количество, For Production,Для производства, Work Order Qty,Кол-во заказа, Produced Quantity,Добытое количество, @@ -7738,13 +7738,13 @@ Sales Update Frequency,Частота обновления продаж, Each Transaction,Каждая транзакция, SMS Center,СМС-центр, Send To,Отправить, -All Contact,Всем Контактам, +All Contact,Всем контактам, All Customer Contact,Контакты всех клиентов, -All Supplier Contact,Всем Контактам Поставщиков, -All Sales Partner Contact,Всем Контактам Торговых Партнеров, +All Supplier Contact,Всем контактам поставщиков, +All Sales Partner Contact,Всем контактам торговых партнеров, All Lead (Open),Всем лидам (Созданным), -All Employee (Active),Всем Сотрудникам (Активным), -All Sales Person,Всем Продавцам, +All Employee (Active),Всем сотрудникам (Активным), +All Sales Person,Всем продавцам, Create Receiver List,Создать список получателей, Receiver List,Список получателей, Messages greater than 160 characters will be split into multiple messages,"Сообщения с более, чем 160 символами, будут разделены на несколько", @@ -7766,9 +7766,9 @@ Approving Role (above authorized value),Утверждении роль (выш Approving User (above authorized value),Утверждении пользователь (выше уставного стоимости), Brand Defaults,Марка по умолчанию, Legal Entity / Subsidiary with a separate Chart of Accounts belonging to the Organization.,"Юридическое лицо / Вспомогательный с отдельным Планом счетов бухгалтерского учета, принадлежащего Организации.", -Change Abbreviation,Изменить Аббревиатура, +Change Abbreviation,Изменить аббревиатуру, Parent Company,Родительская компания, -Default Values,Значения По Умолчанию, +Default Values,Значения по умолчанию, Default Holiday List,По умолчанию Список праздников, Default Selling Terms,Условия продажи по умолчанию, Default Buying Terms,Условия покупки по умолчанию, @@ -7799,7 +7799,7 @@ Default Deferred Revenue Account,По умолчанию отложенная у Default Deferred Expense Account,Учетная запись по отложенному счету по умолчанию, Default Payroll Payable Account,По умолчанию Payroll оплаты счетов, Default Expense Claim Payable Account,Платежная учетная запись по умолчанию, -Stock Settings,Настройки Запасов, +Stock Settings,Настройки запасов, Enable Perpetual Inventory,Включить вечный инвентарь, Default Inventory Account,Учетная запись по умолчанию, Stock Adjustment Account,Регулирование счета запасов, @@ -7815,7 +7815,7 @@ Company Logo,Логотип компании, Date of Incorporation,Дата включения, Date of Commencement,Дата начала, Phone No,Номер телефона, -Company Description,Описание Компании, +Company Description,Описание компании, Registration Details,Регистрационные данные, Company registration numbers for your reference. Tax numbers etc.,Регистрационные номера компании для вашей справки. Налоговые числа и т.д., Delete Company Transactions,Удалить Сделки Компания, @@ -7940,7 +7940,7 @@ Show Price,Показать цену, Show Stock Availability,Показать наличие на складе, Show Contact Us Button,Кнопка «Связаться с нами», Show Stock Quantity,Показывать количество запаса, -Show Apply Coupon Code,Показать Применить код купона, +Show Apply Coupon Code,Показать примененные коды купона, Allow items not in stock to be added to cart,"Разрешить добавление в корзину товаров, которых нет в наличии", Prices will not be shown if Price List is not set,"Цены не будут показаны, если прайс-лист не установлен", Quotation Series,Идентификаторы Предложений, @@ -7978,7 +7978,7 @@ Required only for sample item.,Требуется только для образ "If you have created a standard template in Sales Taxes and Charges Template, select one and click on the button below.","Если вы создали стандартный шаблон в шаблонах Налоги с налогами и сбором платежей, выберите его и нажмите кнопку ниже.", In Words will be visible once you save the Delivery Note.,По словам будет виден только вы сохраните накладной., In Words (Export) will be visible once you save the Delivery Note.,В Слов (Экспорт) будут видны только вы сохраните накладной., -Transporter Info,Transporter информация, +Transporter Info,Информация для транспортировки, Driver Name,Имя драйвера, Track this Delivery Note against any Project,Подписка на Delivery Note против любого проекта, Inter Company Reference,Справочник Интер, @@ -8009,7 +8009,7 @@ Order Information,запросить информацию, Contact Information,Контакты, Email sent to,Письмо отправлено, Dispatch Information,Информация о доставке, -Estimated Arrival,ожидаемое прибытие, +Estimated Arrival,Ожидаемое прибытие, MAT-DT-.YYYY.-,MAT-DT-.YYYY.-, Initial Email Notification Sent,Исходящее уведомление по электронной почте отправлено, Delivery Details,Подробности доставки, @@ -8082,13 +8082,13 @@ Country of Origin,Страна происхождения, Sales Details,Продажи Подробности, Default Sales Unit of Measure,Единица измерения продаж по умолчанию, Is Sales Item,Продаваемый продукт, -Max Discount (%),Макс Скидка (%), +Max Discount (%),Макс. скидка (%), No of Months,Число месяцев, Customer Items,Продукты для клиентов, Inspection Criteria,Критерии проверки, Inspection Required before Purchase,Перед приходованием необходима проверка, Inspection Required before Delivery,Перед отправкой необходима проверка, -Default BOM,По умолчанию BOM, +Default BOM,Спецификация по умолчанию, Supply Raw Materials for Purchase,Поставка сырья для покупки, If subcontracted to a vendor,Если по субподряду поставщика, Customer Code,Код клиента, @@ -8098,7 +8098,7 @@ Show in Website (Variant),Показать в веб-сайт (вариант), Items with higher weightage will be shown higher,Продукты с более высоким весом будут показаны выше, Show a slideshow at the top of the page,Показывать слайд-шоу в верхней части страницы, Website Image,Изображение сайта, -Website Warehouse,Сайт Склад, +Website Warehouse,Сайт склад, "Show ""In Stock"" or ""Not in Stock"" based on stock available in this warehouse.",Покажите «На складе» или «Не на складе» на основе имеющихся на складе., Website Item Groups,Продуктовые группы на сайте, List this Item in multiple groups on the website.,Укажите этот продукт в нескольких группах на сайте, @@ -8108,15 +8108,15 @@ You can use any valid Bootstrap 4 markup in this field. It will be shown on your Total Projected Qty,Общая запланированная Кол-во, Hub Publishing Details,Сведения о публикации концентратора, Publish in Hub,Опубликовать в Hub, -Publish Item to hub.erpnext.com,Опубликовать деталь к hub.erpnext.com, +Publish Item to hub.erpnext.com,Опубликовать продукт в hub.erpnext.com, Hub Category to Publish,Категория концентратора для публикации, Hub Warehouse,Склад хабов, "Publish ""In Stock"" or ""Not in Stock"" on Hub based on stock available in this warehouse.",Опубликуйте «На складе» или «Нет на складе» на концентраторе на основе имеющихся в наличии на складе., -Synced With Hub,Синхронизированные со ступицей, -Item Alternative,Пункт Альтернатива, -Alternative Item Code,Альтернативный код товара, +Synced With Hub,Синхронизированные с хабом, +Item Alternative,Альтернативный продукт, +Alternative Item Code,Альтернативный код продукта, Two-way,Двусторонний, -Alternative Item Name,Альтернативное название товара, +Alternative Item Name,Альтернативное название продукта, Attribute Name,Имя атрибута, Numeric Values,Числовые значения, From Range,От хребта, @@ -8134,7 +8134,7 @@ UPC-A,UPC-A, Item Customer Detail,Пункт Детальное клиентов, "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes","Для удобства клиентов, эти коды могут быть использованы в печатных формах документов, таких как Счета и Документы Отгрузки", Ref Code,Код ссылки, -Item Default,Пункт По умолчанию, +Item Default,Продукт по умолчанию, Purchase Defaults,Покупки по умолчанию, Default Buying Cost Center,Центр затрат продажи по умолчанию, Default Supplier,Поставщик по умолчанию, @@ -8310,34 +8310,34 @@ Additional Costs,Дополнительные расходы, Total Additional Costs,Всего Дополнительные расходы, Customer or Supplier Details,Детали по Заказчику или Поставщику, Per Transferred,За переданный, -Stock Entry Detail,Подробности Складского Акта, +Stock Entry Detail,Подробности складских записей, Basic Rate (as per Stock UOM),Базовая ставка (согласно ед.измерения запасов на складе), Basic Amount,Основное количество, Additional Cost,Дополнительная стоимость, Serial No / Batch,Серийный номер / Партия, -BOM No. for a Finished Good Item,Номер ВМ для готового продукта, -Material Request used to make this Stock Entry,"Материал Запрос используется, чтобы сделать эту Stock запись", +BOM No. for a Finished Good Item,Номер спецификации для готового продукта, +Material Request used to make this Stock Entry,"Запрос материала, использованный для создания этой записи о запасах,", Subcontracted Item,Субподрядный товар, Against Stock Entry,Против входа в акции, Stock Entry Child,Фондовый вход ребенка, PO Supplied Item,PO поставленный пункт, Reference Purchase Receipt,Ссылка на покупку, -Stock Ledger Entry,Фото со Ledger Entry, +Stock Ledger Entry,Записи в остатках, Outgoing Rate,Исходящие Оценить, Actual Qty After Transaction,Остаток после проведения, -Stock Value Difference,Расхождение Стоимости Запасов, +Stock Value Difference,Расхождение стоимости запасов, Stock Queue (FIFO),Фото со Очередь (FIFO), Is Cancelled,Является Отмененные, Stock Reconciliation,Инвентаризация запасов, This tool helps you to update or fix the quantity and valuation of stock in the system. It is typically used to synchronise the system values and what actually exists in your warehouses.,"Этот инструмент поможет вам обновить или исправить количество и оценку запасов в системе. Это, как правило, используется для синхронизации системных значений и то, что на самом деле существует в ваших складах.", -MAT-RECO-.YYYY.-,MAT-РЕКО-.YYYY.-, +MAT-RECO-.YYYY.-,MAT-RECO-.YYYY.-, Reconciliation JSON,Примирение JSON, Stock Reconciliation Item,Товар с Сверки Запасов, Before reconciliation,Перед примирения, Current Serial No,Текущий серийный номер, Current Valuation Rate,Текущая оценка, Current Amount,Текущий объем, -Quantity Difference,Количество Разница, +Quantity Difference,Количественная разница, Amount Difference,Сумма разница, Item Naming By,Наименование продукта по, Default Item Group,Продуктовая группа по умолчанию, @@ -8351,19 +8351,19 @@ Automatically Set Serial Nos based on FIFO,Автоматически устан Auto Material Request,Автоматический запрос материалов, Inter Warehouse Transfer Settings,Настройки передачи между складами, Freeze Stock Entries,Замораживание поступления запасов, -Stock Frozen Upto,Фото Замороженные До, +Stock Frozen Upto,остатки заморожены до, Batch Identification,Идентификация партии, -Use Naming Series,Использовать Идентификаторы по Имени, +Use Naming Series,Использовать серийный номер, Naming Series Prefix,Префикс Идентификации по Имени, -UOM Category,Категория UOM, -UOM Conversion Detail,Единица измерения Преобразование Подробно, +UOM Category,Категория единиц измерения, +UOM Conversion Detail,Подробно о преобразовании единиц измерения, Variant Field,Поле вариантов, A logical Warehouse against which stock entries are made.,"Логический Склад, по которому сделаны складские записи", Warehouse Detail,Подробности склада, Warehouse Name,Название склада, Warehouse Contact Info,Контактная информация склада, -PIN,ШТЫРЬ, -ISS-.YYYY.-,МКС-.ГГГГ.-, +PIN,PIN, +ISS-.YYYY.-,ISS-.YYYY.-, Raised By (Email),Создал (Email), Issue Type,Тип вопроса, Issue Split From,Выпуск Сплит От, @@ -8438,12 +8438,12 @@ Type of document to rename.,"Вид документа, переименоват File to Rename,Файл Переименовать, "Attach .csv file with two columns, one for the old name and one for the new name","Прикрепите файл .csv с двумя колоннами, одна для старого имени и одина для нового названия", Rename Log,Переименовать Входить, -SMS Log,СМС-журнал, +SMS Log,SMS-журнал, Sender Name,Имя отправителя, Sent On,Отправлено на, -No of Requested SMS,Кол-во запрошенных СМС, +No of Requested SMS,Кол-во запрошенных SMS, Requested Numbers,Запрошенные номера, -No of Sent SMS,Кол-во отправленных СМС, +No of Sent SMS,Кол-во отправленных SMS, Sent To,Отправить, Absent Student Report,Отчет о пропуске занятия, Assessment Plan Status,Статус плана оценки, @@ -8491,14 +8491,14 @@ Fichier des Ecritures Comptables [FEC],Fichier des Ecritures Comptables [FEC], Final Assessment Grades,Итоговые оценки, Fixed Asset Register,Регистр фиксированных активов, Gross and Net Profit Report,Отчет о валовой и чистой прибыли, -GST Itemised Purchase Register,Регистр покупки в GST, -GST Itemised Sales Register,Регистр продаж GST, -GST Purchase Register,Регистр закупок GST, -GST Sales Register,Реестр продаж GST, +GST Itemised Purchase Register,Подробный реестр покупок с НДС, +GST Itemised Sales Register,Подробный реестр продаж с НДС, +GST Purchase Register,Реестр закупок с НДС, +GST Sales Register,Реестр продаж с НДС, GSTR-1,GSTR-1, GSTR-2,GSTR-2, Hotel Room Occupancy,Гостиничный номер, -HSN-wise-summary of outward supplies,HSN-краткая сводка внешних поставок, +HSN-wise-summary of outward supplies,ГСК-краткая сводка внешних поставок, Inactive Customers,Неактивные клиенты, Inactive Sales Items,Неактивные позиции продаж, IRS 1099,IRS 1099, @@ -8524,7 +8524,7 @@ Loan Security Status,Состояние безопасности ссуды, Lost Opportunity,Потерянная возможность, Maintenance Schedules,Графики технического обслуживания, Material Requests for which Supplier Quotations are not created,"Запросы на Материалы, для которых не создаются Предложения Поставщика", -Monthly Attendance Sheet,Ежемесячная посещаемость Лист, +Monthly Attendance Sheet,Табель ежемесячной посещаемости, Open Work Orders,Открытые рабочие задания, Qty to Deliver,Кол-во для доставки, Patient Appointment Analytics,Аналитика записи пациентов, @@ -8561,7 +8561,7 @@ Sales Partner Target Variance based on Item Group,Целевое отклоне Sales Partner Transaction Summary,Сводка по сделкам с партнерами по продажам, Sales Partners Commission,Комиссионные Партнеров по продажам, Invoiced Amount (Exclusive Tax),Сумма счета (без учета налога), -Average Commission Rate,Средний Уровень Комиссии, +Average Commission Rate,Средний уровень комиссии, Sales Payment Summary,Сводка по продажам, Sales Person Commission Summary,Резюме комиссии по продажам, Sales Person Target Variance Based On Item Group,"Целевое отклонение продавца, основанное на группе товаров", @@ -8574,15 +8574,15 @@ Stock Ageing,Старые запасы (Неликвиды), Stock and Account Value Comparison,Сравнение стоимости акций и счетов, Stock Projected Qty,Прогнозируемое количество запасов, Student and Guardian Contact Details,Контактная информация студента и родителя/попечителя, -Student Batch-Wise Attendance,Student порционно Посещаемость, -Student Fee Collection,Student Fee Collection, +Student Batch-Wise Attendance,Посещаемость студентов, +Student Fee Collection,Сбор студенческой платы, Student Monthly Attendance Sheet,Ежемесячная посещаемость студентов, Subcontracted Item To Be Received,"Субподрядный предмет, подлежащий получению", Subcontracted Raw Materials To Be Transferred,Субподрядное сырье для передачи, Supplier Ledger Summary,Список поставщиков, Supplier-Wise Sales Analytics,Аналитика продаж в разрезе поставщиков, Support Hour Distribution,Распределение поддержки, -TDS Computation Summary,Резюме вычислений TDS, +TDS Computation Summary,Сводка расчетов TDS, TDS Payable Monthly,TDS Payable Monthly, Territory Target Variance Based On Item Group,Целевое отклонение территории на основе группы товаров, Territory-wise Sales,Продажи по территории, @@ -8624,13 +8624,13 @@ Row #{}: Currency of {} - {} doesn't matches company currency.,Строка № {} Assets created for {},"{} Активы, созданные для {}", {0} Number {1} is already used in {2} {3},{0} Номер {1} уже используется в {2} {3}, Update Bank Clearance Dates,Обновить даты оформления банка, -Healthcare Practitioner: ,Практикующий врач:, -Lab Test Conducted: ,Проведены лабораторные испытания:, -Lab Test Event: ,Событие лабораторных испытаний:, -Lab Test Result: ,Результат лабораторного тестирования:, -Clinical Procedure conducted: ,Проведенная клиническая процедура:, +Healthcare Practitioner: ,Практикующий врач: , +Lab Test Conducted: ,Проведены лабораторные испытания: , +Lab Test Event: ,Событие лабораторных испытаний: , +Lab Test Result: ,Результат лабораторного тестирования: , +Clinical Procedure conducted: ,Проведенная клиническая процедура: , Therapy Session Charges: {0},Стоимость сеанса терапии: {0}, -Therapy: ,Терапия:, +Therapy: ,Терапия: , Therapy Plan: ,План терапии:, Total Counts Targeted: ,Общее количество целевых:, Total Counts Completed: ,Всего завершено подсчетов:, @@ -8684,11 +8684,11 @@ If this is unchecked Journal Entries will be saved in a Draft state and will hav Enable Distributed Cost Center,Включить центр распределенных затрат, Distributed Cost Center,Центр распределенных затрат, Dunning,Даннинг, -DUNN-.MM.-.YY.-,DUNN-.MM .-. YY.-, +DUNN-.MM.-.YY.-,DUNN-.MM.-.YY.-, Overdue Days,Просроченные дни, Dunning Type,Тип напоминания, Dunning Fee,Плата за напоминание, -Dunning Amount,Сумма напоминаний, +Dunning Amount,Количество напоминаний, Resolved,Решено, Unresolved,Нерешенный, Printing Setting,Настройка печати, @@ -8730,7 +8730,7 @@ POS Opening Entry Detail,Детали входа открытия POS, POS Payment Method,Способ оплаты POS, Payment Methods,Способы оплаты, Process Statement Of Accounts,Выписка по счетам, -General Ledger Filters,Фильтры Главной книги, +General Ledger Filters,Фильтры бухгалтерской книги, Customers,Клиенты, Select Customers By,Выбрать клиентов по, Fetch Customers,Привлечь клиентов, @@ -8739,7 +8739,7 @@ Print Preferences,Настройки печати, Include Ageing Summary,Включить сводку по старению, Enable Auto Email,Включить автоматическую электронную почту, Filter Duration (Months),Продолжительность фильтра (мес.), -CC To,CC To, +CC To,Копия, Help Text,Текст справки, Emails Queued,Электронные письма в очереди, Process Statement Of Accounts Customer,Выписка по счетам клиента, @@ -8756,7 +8756,7 @@ GST Category,Категория GST, Registered Regular,Зарегистрированный Обычный, Registered Composition,Зарегистрированный состав, Unregistered,Незарегистрированный, -SEZ,ОЭЗ, +SEZ,ОЭС, Overseas,За границей, UIN Holders,Держатели UIN, With Payment of Tax,С уплатой налога, @@ -8813,7 +8813,7 @@ Follow Calendar Months,Следите за календарными месяца If this is checked subsequent new invoices will be created on calendar month and quarter start dates irrespective of current invoice start date,"Если этот флажок установлен, последующие новые счета будут создаваться в даты начала календарного месяца и квартала независимо от даты начала текущего счета.", Generate New Invoices Past Due Date,Создание просроченных новых счетов-фактур, New invoices will be generated as per schedule even if current invoices are unpaid or past due date,"Новые счета будут генерироваться в соответствии с графиком, даже если текущие счета не оплачены или просрочены.", -Document Type ,тип документа, +Document Type ,Тип документа , Subscription Price Based On,Цена подписки на основе, Fixed Rate,Фиксированная ставка, Based On Price List,На основании прайс-листа, @@ -8842,7 +8842,7 @@ Add to Topics,Добавить в темы, Add Article to Topics,Добавить статью в темы, This article is already added to the existing topics,Эта статья уже добавлена в существующие темы, Add to Programs,Добавить в программы, -Programs,Программ, +Programs,Программы, ...Adding Course to Programs,... Добавление курса в программы, Add Course to Programs,Добавить курс в программы, This course is already added to the existing programs,Этот курс уже добавлен в существующие программы, @@ -8889,7 +8889,7 @@ Select an Item Group for the Clinical Procedure Item.,Выберите груп Clinical Procedure Rate,Скорость клинической процедуры, Check this if the Clinical Procedure is billable and also set the rate.,"Отметьте это, если клиническая процедура оплачивается, а также установите ставку.", Check this if the Clinical Procedure utilises consumables. Click ,"Проверьте это, если в клинической процедуре используются расходные материалы. Нажмите", - to know more,знать больше, + to know more,узнать больше, "You can also set the Medical Department for the template. After saving the document, an Item will automatically be created for billing this Clinical Procedure. You can then use this template while creating Clinical Procedures for Patients. Templates save you from filling up redundant data every single time. You can also create templates for other operations like Lab Tests, Therapy Sessions, etc.","Вы также можете указать для шаблона Медицинский отдел. После сохранения документа будет автоматически создана Позиция для выставления счета за эту Клиническую процедуру. Затем вы можете использовать этот шаблон при создании клинических процедур для пациентов. Шаблоны избавляют вас от постоянного заполнения избыточными данными. Вы также можете создавать шаблоны для других операций, таких как лабораторные тесты, сеансы терапии и т. Д.", Descriptive Test Result,Описательный результат теста, Allow Blank,Разрешить пустой, @@ -8945,21 +8945,21 @@ Worksheet Print,Печать рабочего листа, Worksheet Instructions,Инструкции по рабочему листу, Result Legend Print,Печать легенды результатов, Print Position,Позиция печати, -Bottom,Дно, -Top,верхний, -Both,Обе, +Bottom,Низ, +Top,Верх, +Both,Оба, Result Legend,Легенда результата, Lab Tests,Лабораторные тесты, No Lab Tests found for the Patient {0},Для пациента не найдено лабораторных тестов {0}, -"Did not send SMS, missing patient mobile number or message content.","Не отправлено SMS, отсутствует номер мобильного телефона пациента или содержание сообщения.", +"Did not send SMS, missing patient mobile number or message content.","SMS не отправлено, отсутствует номер мобильного телефона пациента или содержание сообщения.", No Lab Tests created,Лабораторные тесты не созданы, -Creating Lab Tests...,Создание лабораторных тестов ..., +Creating Lab Tests...,Создание лабораторных тестов..., Lab Test Group Template,Шаблон группы лабораторных тестов, Add New Line,Добавить новую строку, Secondary UOM,Вторичная единица измерения, "Single: Results which require only a single input.\n
\nCompound: Results which require multiple event inputs.\n
\nDescriptive: Tests which have multiple result components with manual result entry.\n
\nGrouped: Test templates which are a group of other test templates.\n
\nNo Result: Tests with no results, can be ordered and billed but no Lab Test will be created. e.g.. Sub Tests for Grouped results","Одиночный : результаты, требующие только одного ввода.
Составные : результаты, требующие ввода нескольких событий.
Описательный : тесты с несколькими компонентами результатов с вводом результатов вручную.
Сгруппированы : тестовые шаблоны, которые представляют собой группу других тестовых шаблонов.
Нет результата : тесты, не получившие результатов, можно заказать и выставить счет, но лабораторный тест не будет создан. например. Подтесты для сгруппированных результатов", "If unchecked, the item will not be available in Sales Invoices for billing but can be used in group test creation. ","Если этот флажок не установлен, элемент не будет доступен в счетах-фактурах для выставления счетов, но его можно будет использовать при создании группового теста.", -Description ,Описание, +Description ,Описание , Descriptive Test,Описательный тест, Group Tests,Групповые тесты, Instructions to be printed on the worksheet,Инструкции для печати на рабочем листе, @@ -9013,7 +9013,7 @@ Select template item,Выберите элемент шаблона, Select variant item code for the template item {0},Выберите вариант кода товара для шаблона товара {0}, Downtime Entry,Запись о простоях, DT-,DT-, -Workstation / Machine,Рабочая станция / машина, +Workstation / Machine,Рабочее место / машина, Operator,Оператор, In Mins,В минутах, Downtime Reason,Причина простоя, @@ -9064,7 +9064,7 @@ Rented From Date,Сдано в аренду с даты, Rented To Date,Сдано на дату, Monthly Eligible Amount,Ежемесячная приемлемая сумма, Total Eligible HRA Exemption,Полное соответствие требованиям HRA, -Validating Employee Attendance...,Проверка явки сотрудников ..., +Validating Employee Attendance...,Проверка явки сотрудников..., Submitting Salary Slips and creating Journal Entry...,Отправка ведомостей о заработной плате и создание записи в журнале ..., Calculate Payroll Working Days Based On,Расчет рабочих дней для расчета заработной платы на основе, Consider Unmarked Attendance As,Считайте неотмеченную посещаемость как, @@ -9076,7 +9076,7 @@ Provident Fund Loan,Ссуда из фонда обеспечения персо Professional Tax,Профессиональный налог, Is Income Tax Component,Компонент подоходного налога, Component properties and references ,Свойства компонентов и ссылки, -Additional Salary ,Дополнительная зарплата, +Additional Salary ,Дополнительная зарплата , Unmarked days,Неотмеченные дни, Absent Days,Отсутствующие дни, Conditions and Formula variable and example,"Условия и формула, переменная и пример", @@ -9097,13 +9097,13 @@ Please enter the company name to confirm,"Пожалуйста, введите Quotation Lost Reason Detail,Расценки на потерю причины, Enable Variants,Включить варианты, Save Quotations as Draft,Сохранить предложения как черновик, -MAT-DN-RET-.YYYY.-,МАТ-ДН-РЕТ-.ГГГГ.-, +MAT-DN-RET-.YYYY.-,MAT-DN-RET-.YYYY.-, Please Select a Customer,"Пожалуйста, выберите клиента", Against Delivery Note Item,Против позиции накладной, -Is Non GST ,Без НДС, +Is Non GST ,Без НДС , Image Description,Описание изображения, Transfer Status,Статус передачи, -MAT-PR-RET-.YYYY.-,МАТ-ПР-РЕТ-.ГГГГ.-, +MAT-PR-RET-.YYYY.-,MAT-PR-RET-.YYYY.-, Track this Purchase Receipt against any Project,Отслеживайте эту квитанцию о покупке для любого проекта, Please Select a Supplier,"Пожалуйста, выберите поставщика", Add to Transit,Добавить в общественный транспорт, @@ -9206,7 +9206,7 @@ Reserved Quantity for Production,Зарезервированное количе Projected Quantity,Прогнозируемое количество, Total Sales Amount,Общая сумма продаж, Job Card Summary,Сводка карточки вакансии, -Id,Я бы, +Id,Id, Time Required (In Mins),Требуемое время (в минутах), From Posting Date,С даты публикации, To Posting Date,До даты публикации, @@ -9345,7 +9345,7 @@ Finish Topic,Завершить тему, Mins,Мин, by,по, Back to,Вернуться к, -Enrolling...,Регистрация ..., +Enrolling...,Регистрация..., You have successfully enrolled for the program ,Вы успешно записались на программу, Enrolled,Зарегистрирован, Watch Intro,Смотреть вступление, @@ -9532,7 +9532,7 @@ Email Details,Электронная почта Подробности, Preview Email,Предварительный просмотр электронной почты, Please select a Supplier,"Пожалуйста, выберите поставщика", Supplier Lead Time (days),Срок поставки поставщика (дни), -"Home, Work, etc.","Дом, работа и т. Д.", +"Home, Work, etc.","Дом, Работа и т.д.", Exit Interview Held On,Завершить собеседование, Condition and formula,Условие и формула, Sets 'Target Warehouse' in each row of the Items table.,Устанавливает «Целевой склад» в каждой строке таблицы «Предметы»., @@ -9592,7 +9592,7 @@ Mpesa Settings,Настройки Mpesa, Initiator Name,Имя инициатора, Till Number,До номера, Sandbox,Песочница, - Online PassKey,Интернет-пароль, + Online PassKey, Интернет-пароль, Security Credential,Учетные данные безопасности, Get Account Balance,Получить остаток на счете, Please set the initiator name and the security credential,Установите имя инициатора и учетные данные безопасности, @@ -9628,7 +9628,7 @@ Restrict Backdated Leave Applications,Ограничение подачи зая Sequence ID,Идентификатор последовательности, Sequence Id,Идентификатор последовательности, Allow multiple material consumptions against a Work Order,Разрешить многократное потребление материала для рабочего задания, -Plan time logs outside Workstation working hours,Планирование журналов рабочего времени вне рабочего времени рабочей станции, +Plan time logs outside Workstation working hours,Планирование журналов рабочего времени вне рабочего времени рабочего места, Plan operations X days in advance,Планируйте операции на Х дней вперед, Time Between Operations (Mins),Время между операциями (мин), Default: 10 mins,По умолчанию: 10 минут, @@ -9712,7 +9712,7 @@ From Date cannot be after the current date.,Дата начала не може To Date cannot be after the current date.,Дата не может быть позже текущей даты., From Time cannot be after the current time.,From Time не может быть позже текущего времени., To Time cannot be after the current time.,Время не может быть позже текущего времени., -Stock Entry {0} created and ,Публикация акций {0} создана и, +Stock Entry {0} created and ,Публикация акций {0} создана и , Inpatient Medication Orders updated successfully,Заказы на лечение в стационаре успешно обновлены, Row {0}: Cannot create Inpatient Medication Entry against cancelled Inpatient Medication Order {1},Строка {0}: Невозможно создать запись о стационарном лечении для отмененного заказа на лечение в стационаре {1}, Row {0}: This Medication Order is already marked as completed,Строка {0}: этот заказ на лекарства уже отмечен как выполненный., @@ -9816,7 +9816,7 @@ Please add the account to root level Company - {},"Пожалуйста, доб Account Not Found,Счет не найден, "While creating account for Child Company {0}, parent account {1} found as a ledger account.",При создании аккаунта для дочерней компании {0} родительский аккаунт {1} обнаружен как счет главной книги., Please convert the parent account in corresponding child company to a group account.,Преобразуйте родительскую учетную запись в соответствующей дочерней компании в групповую., -Invalid Parent Account,Неверный родительский аккаунт, +Invalid Parent Account,Неверный родительский счет, "Renaming it is only allowed via parent company {0}, to avoid mismatch.","Переименование разрешено только через головную компанию {0}, чтобы избежать несоответствия.", "If you {0} {1} quantities of the item {2}, the scheme {3} will be applied on the item.","Если вы {0} {1} количество товара {2}, схема {3} будет применена к товару.", "If you {0} {1} worth item {2}, the scheme {3} will be applied on the item.","Если вы {0} {1} оцениваете предмет {2}, к нему будет применена схема {3}.", diff --git a/erpnext/utilities/activation.py b/erpnext/utilities/activation.py index 43af0dc3c1..7b2df5efd1 100644 --- a/erpnext/utilities/activation.py +++ b/erpnext/utilities/activation.py @@ -18,7 +18,6 @@ def get_level(): "Customer": 5, "Delivery Note": 5, "Employee": 3, - "Instructor": 5, "Issue": 5, "Item": 5, "Journal Entry": 3, @@ -37,7 +36,6 @@ def get_level(): "Sales Order": 2, "Sales Invoice": 2, "Stock Entry": 3, - "Student": 5, "Supplier": 5, "Task": 5, "User": 5, @@ -136,24 +134,6 @@ def get_help_messages(): domain=("Services",), target=5, ), - frappe._dict( - doctype="Student", - title=_("Add Students"), - description=_("Students are at the heart of the system, add all your students"), - action=_("Create Student"), - route="List/Student", - domain=("Education",), - target=5, - ), - frappe._dict( - doctype="Student Batch", - title=_("Group your students in batches"), - description=_("Student Batches help you track attendance, assessments and fees for students"), - action=_("Create Student Batch"), - route="List/Student Batch", - domain=("Education",), - target=3, - ), frappe._dict( doctype="Employee", title=_("Create Employee Records"), diff --git a/erpnext/utilities/doctype/video/video.py b/erpnext/utilities/doctype/video/video.py index 330812dc27..a39d0a95eb 100644 --- a/erpnext/utilities/doctype/video/video.py +++ b/erpnext/utilities/doctype/video/video.py @@ -36,8 +36,7 @@ class Video(Document): self.comment_count = video_stats.get("commentCount") except Exception: - title = "Failed to Update YouTube Statistics for Video: {0}".format(self.name) - frappe.log_error(title + "\n\n" + frappe.get_traceback(), title=title) + self.log_error("Unable to update YouTube statistics") def is_tracking_enabled(): @@ -109,8 +108,7 @@ def batch_update_youtube_data(): video_stats = video.items return video_stats except Exception: - title = "Failed to Update YouTube Statistics" - frappe.log_error(title + "\n\n" + frappe.get_traceback(), title=title) + frappe.log_error("Unable to update YouTube statistics") def prepare_and_set_data(video_list): video_ids = get_formatted_ids(video_list) diff --git a/erpnext/utilities/doctype/video_settings/video_settings.py b/erpnext/utilities/doctype/video_settings/video_settings.py index 97fbc41934..9bc7972bb3 100644 --- a/erpnext/utilities/doctype/video_settings/video_settings.py +++ b/erpnext/utilities/doctype/video_settings/video_settings.py @@ -18,5 +18,5 @@ class VideoSettings(Document): build("youtube", "v3", developerKey=self.api_key) except Exception: title = _("Failed to Authenticate the API key.") - frappe.log_error(title + "\n\n" + frappe.get_traceback(), title=title) + self.log_error("Failed to authenticate API key") frappe.throw(title + " Please check the error logs.", title=_("Invalid Credentials")) diff --git a/erpnext/www/lms/__init__.py b/erpnext/www/lms/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/www/lms/content.html b/erpnext/www/lms/content.html deleted file mode 100644 index d22ef66d2a..0000000000 --- a/erpnext/www/lms/content.html +++ /dev/null @@ -1,246 +0,0 @@ -{% extends "templates/base.html" %} -{% block title %}{{ content.name or 'Content Page' }}{% endblock %} - -{% block head_include %} - - -{% endblock %} - -{% macro title() %} - -
-

{{ content.name }} ({{ position + 1 }}/{{length}})

-
-
-{% endmacro %} - -{% macro navigation() %} - {% if previous %} - {{_('Previous')}} - {% else %} - {{ _('Back to Course') }} - {% endif %} - - {% if next %} - - {% else %} - - {% endif %} -{% endmacro %} - -{% macro video() %} -
- {{ title() }} -
- {% if content.duration %} - {{ content.duration }} {{_('Mins')}} - {% endif %} - - {% if content.publish_date and content.duration%} - - - {% endif %} - - {% if content.publish_date %} - {{_('Published on')}} {{ content.publish_date.strftime('%d, %b %Y') }} - {% endif %} -
-
-
-
- {{ content.description }} -
-{% endmacro %} - -{% macro article() %} -
- {{ title() }} -
- {% if content.author or content.publish_date %} - {{_('Published')}} - {% endif %} - {% if content.author %} - {{_('by')}} {{ content.author }} - {% endif %} - {% if content.publish_date %} - {{_('on')}} {{ content.publish_date.strftime('%d, %b %Y') }} - {% endif %} -
-
-
- {{ content.content }} -
-{% endmacro %} - -{% macro quiz() %} -
- {{ title() }} -
-
-
-{% endmacro %} - -{% block content %} -
-
-
- {% if content_type=='Video' %} - {{ video() }} - {% elif content_type=='Article'%} - {{ article() }} - {% elif content_type=='Quiz' %} - {{ quiz() }} - {% endif %} -
- {{ navigation() }} -
-
-
-
-{% endblock %} - -{% block script %} - {% if content_type=='Video' %} - - {% elif content_type == 'Quiz' %} - - {% endif %} - -{% endblock %} diff --git a/erpnext/www/lms/content.py b/erpnext/www/lms/content.py deleted file mode 100644 index 99462ceeee..0000000000 --- a/erpnext/www/lms/content.py +++ /dev/null @@ -1,75 +0,0 @@ -import frappe - -import erpnext.education.utils as utils - -no_cache = 1 - - -def get_context(context): - # Load Query Parameters - try: - program = frappe.form_dict["program"] - content = frappe.form_dict["content"] - content_type = frappe.form_dict["type"] - course = frappe.form_dict["course"] - topic = frappe.form_dict["topic"] - except KeyError: - frappe.local.flags.redirect_location = "/lms" - raise frappe.Redirect - - # Check if user has access to the content - has_program_access = utils.allowed_program_access(program) - has_content_access = allowed_content_access(program, content, content_type) - - if frappe.session.user == "Guest" or not has_program_access or not has_content_access: - frappe.local.flags.redirect_location = "/lms" - raise frappe.Redirect - - # Set context for content to be displayer - context.content = frappe.get_doc(content_type, content).as_dict() - context.content_type = content_type - context.program = program - context.course = course - context.topic = topic - - topic = frappe.get_doc("Topic", topic) - content_list = [ - {"content_type": item.content_type, "content": item.content} for item in topic.topic_content - ] - - # Set context for progress numbers - context.position = content_list.index({"content": content, "content_type": content_type}) - context.length = len(content_list) - - # Set context for navigation - context.previous = get_previous_content(content_list, context.position) - context.next = get_next_content(content_list, context.position) - - -def get_next_content(content_list, current_index): - try: - return content_list[current_index + 1] - except IndexError: - return None - - -def get_previous_content(content_list, current_index): - if current_index == 0: - return None - else: - return content_list[current_index - 1] - - -def allowed_content_access(program, content, content_type): - contents_of_program = frappe.db.sql( - """select `tabTopic Content`.content, `tabTopic Content`.content_type - from `tabCourse Topic`, - `tabProgram Course`, - `tabTopic Content` - where `tabCourse Topic`.parent = `tabProgram Course`.course - and `tabTopic Content`.parent = `tabCourse Topic`.topic - and `tabProgram Course`.parent = %(program)s""", - {"program": program}, - ) - - return (content, content_type) in contents_of_program diff --git a/erpnext/www/lms/course.html b/erpnext/www/lms/course.html deleted file mode 100644 index c07b9402b1..0000000000 --- a/erpnext/www/lms/course.html +++ /dev/null @@ -1,106 +0,0 @@ -{% extends "templates/base.html" %} -{% block title %}{{ course.course_name }}{% endblock %} -{% from "www/lms/macros/hero.html" import hero %} -{% from "www/lms/macros/card.html" import null_card %} - -{% block head_include %} - -{% endblock %} - - -{% macro card(topic) %} -
-
- {% if has_access %} - - {% else %} - - {% endif %} - {% if topic.hero_image %} -
- {% else %} -
-
-
- {% endif %} -
- {% if has_access %} - - - {% else %} - - {% endif %} -
-
-{% endmacro %} - -{% block content %} -
- {{ hero(course.course_name, course.description, has_access, {'name': 'Program', 'url': '/lms/program?program=' + program }) }} -
-
- {% for topic in topics %} - {{ card(topic) }} - {% endfor %} - {% if topics %} - {% for n in range( (3 - (topics|length)) %3) %} - {{ null_card() }} - {% endfor %} - {% endif %} -
-
-
-{% endblock %} diff --git a/erpnext/www/lms/course.py b/erpnext/www/lms/course.py deleted file mode 100644 index 840beee3ad..0000000000 --- a/erpnext/www/lms/course.py +++ /dev/null @@ -1,28 +0,0 @@ -import frappe - -import erpnext.education.utils as utils - -no_cache = 1 - - -def get_context(context): - try: - program = frappe.form_dict["program"] - course_name = frappe.form_dict["name"] - except KeyError: - frappe.local.flags.redirect_location = "/lms" - raise frappe.Redirect - - context.education_settings = frappe.get_single("Education Settings") - course = frappe.get_doc("Course", course_name) - context.program = program - context.course = course - - context.topics = course.get_topics() - context.has_access = utils.allowed_program_access(context.program) - context.progress = get_topic_progress(context.topics, course, context.program) - - -def get_topic_progress(topics, course, program): - progress = {topic.name: utils.get_topic_progress(topic, course.name, program) for topic in topics} - return progress diff --git a/erpnext/www/lms/index.html b/erpnext/www/lms/index.html deleted file mode 100644 index c1e96205eb..0000000000 --- a/erpnext/www/lms/index.html +++ /dev/null @@ -1,69 +0,0 @@ -{% extends "templates/base.html" %} -{% block title %}{{ education_settings.portal_title }}{% endblock %} -{% from "www/lms/macros/card.html" import program_card %} -{% from "www/lms/macros/card.html" import null_card %} - -{% block head_include %} - - - -{% endblock %} - -{% block content %} -
-
-

{{ education_settings.portal_title }}

- {% if education_settings.description %} -

{{ education_settings.description }}

- {% endif %} -

- {% if frappe.session.user == 'Guest' %} - {{_('Sign Up')}} - {% endif %} -

-
-
-
- {% if featured_programs %} - {% for program in featured_programs %} - {{ program_card(program.program, program.has_access) }} - {% endfor %} - {% for n in range( (3 - (featured_programs|length)) %3) %} - {{ null_card() }} - {% endfor %} - {% else %} -

You have not enrolled in any program. Contact your Instructor.

- {% endif %} -
-
-
-{% endblock %} diff --git a/erpnext/www/lms/index.py b/erpnext/www/lms/index.py deleted file mode 100644 index 782ac481a0..0000000000 --- a/erpnext/www/lms/index.py +++ /dev/null @@ -1,17 +0,0 @@ -import frappe - -import erpnext.education.utils as utils - -no_cache = 1 - - -def get_context(context): - context.education_settings = frappe.get_single("Education Settings") - if not context.education_settings.enable_lms: - frappe.local.flags.redirect_location = "/" - raise frappe.Redirect - context.featured_programs = get_featured_programs() - - -def get_featured_programs(): - return utils.get_portal_programs() or [] diff --git a/erpnext/www/lms/macros/__init__.py b/erpnext/www/lms/macros/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/www/lms/macros/card.html b/erpnext/www/lms/macros/card.html deleted file mode 100644 index 3cbdec61aa..0000000000 --- a/erpnext/www/lms/macros/card.html +++ /dev/null @@ -1,34 +0,0 @@ -{% macro program_card(program, has_access) %} - -{% endmacro %} - - -{% macro null_card() %} -
-
-
-
-{% endmacro %} diff --git a/erpnext/www/lms/macros/hero.html b/erpnext/www/lms/macros/hero.html deleted file mode 100644 index dd3c23a014..0000000000 --- a/erpnext/www/lms/macros/hero.html +++ /dev/null @@ -1,53 +0,0 @@ -{% macro hero(title, description, has_access, back) %} -
- -

{{ title }}

-

{{ description or ''}}

-

- {% if frappe.session.user == 'Guest' %} - {{_('Sign Up')}} - {% elif not has_access %} - - {% endif %} -

-
- -{% block script %} - -{% endblock %} -{% endmacro %} diff --git a/erpnext/www/lms/profile.html b/erpnext/www/lms/profile.html deleted file mode 100644 index 5755dfe6d8..0000000000 --- a/erpnext/www/lms/profile.html +++ /dev/null @@ -1,64 +0,0 @@ -{% extends "templates/base.html" %} -{% block title %}Profile{% endblock %} -{% from "www/lms/macros/hero.html" import hero %} - -{% block head_include %} - -{% endblock %} - -{% macro card(program) %} - -{% endmacro %} - -{% block content %} -
-
- -

{{ student.first_name }} {{ student.last_name or '' }}

-

{{ student.name }}

-
-
-
- {% for program in progress %} - {{ card(program) }} - {% endfor %} -
-
-
-{% endblock %} diff --git a/erpnext/www/lms/profile.py b/erpnext/www/lms/profile.py deleted file mode 100644 index c4c1cd78eb..0000000000 --- a/erpnext/www/lms/profile.py +++ /dev/null @@ -1,37 +0,0 @@ -import frappe - -import erpnext.education.utils as utils - -no_cache = 1 - - -def get_context(context): - if frappe.session.user == "Guest": - frappe.local.flags.redirect_location = "/lms" - raise frappe.Redirect - - context.student = utils.get_current_student() - if not context.student: - context.student = frappe.get_doc("User", frappe.session.user) - context.progress = get_program_progress(context.student.name) - - -def get_program_progress(student): - enrolled_programs = frappe.get_all( - "Program Enrollment", filters={"student": student}, fields=["program"] - ) - student_progress = [] - for list_item in enrolled_programs: - program = frappe.get_doc("Program", list_item.program) - progress = utils.get_program_progress(program) - completion = utils.get_program_completion(program) - student_progress.append( - { - "program": program.program_name, - "name": program.name, - "progress": progress, - "completion": completion, - } - ) - - return student_progress diff --git a/erpnext/www/lms/program.html b/erpnext/www/lms/program.html deleted file mode 100644 index 30528c667d..0000000000 --- a/erpnext/www/lms/program.html +++ /dev/null @@ -1,87 +0,0 @@ -{% extends "templates/base.html" %} -{% block title %}{{ program.program_name }}{% endblock %} -{% from "www/lms/macros/hero.html" import hero %} -{% from "www/lms/macros/card.html" import null_card %} - -{% block head_include %} - -{% endblock %} - - -{% macro card(course) %} - -{% endmacro %} - -{% block content %} -
- {{ hero(program.program_name, program.description, has_access, {'name': 'Home', 'url': '/lms'}) }} -
-
- {% for course in courses %} - {{ card(course) }} - {% endfor %} - {% if courses %} - {% for n in range( (3 - (courses|length)) %3) %} - {{ null_card() }} - {% endfor %} - {% endif %} -
-
-
-{% endblock %} diff --git a/erpnext/www/lms/program.py b/erpnext/www/lms/program.py deleted file mode 100644 index 1df2aa5bac..0000000000 --- a/erpnext/www/lms/program.py +++ /dev/null @@ -1,32 +0,0 @@ -import frappe -from frappe import _ - -import erpnext.education.utils as utils - -no_cache = 1 - - -def get_context(context): - try: - program = frappe.form_dict["program"] - except KeyError: - frappe.local.flags.redirect_location = "/lms" - raise frappe.Redirect - - context.education_settings = frappe.get_single("Education Settings") - context.program = get_program(program) - context.courses = [frappe.get_doc("Course", course.course) for course in context.program.courses] - context.has_access = utils.allowed_program_access(program) - context.progress = get_course_progress(context.courses, context.program) - - -def get_program(program_name): - try: - return frappe.get_doc("Program", program_name) - except frappe.DoesNotExistError: - frappe.throw(_("Program {0} does not exist.").format(program_name)) - - -def get_course_progress(courses, program): - progress = {course.name: utils.get_course_progress(course, program) for course in courses} - return progress or {} diff --git a/erpnext/www/lms/topic.html b/erpnext/www/lms/topic.html deleted file mode 100644 index dc69599112..0000000000 --- a/erpnext/www/lms/topic.html +++ /dev/null @@ -1,58 +0,0 @@ -{% extends "templates/base.html" %} -{% block title %}{{ topic.name }}{% endblock %} -{% from "www/lms/macros/hero.html" import hero %} -{% from "www/lms/macros/card.html" import null_card %} - -{% block head_include %} - -{% endblock %} - - -{% macro card(content, index, length) %} - -{% endmacro %} - -{% block content %} -
- {{ hero(topic.topic_name, topic.description, has_access, {'name': 'Course', 'url': '/lms/course?name=' + course +'&program=' + program}) }} -
-
- {% for content in contents %} - {{ card(content, loop.index, topic.contents|length) }} - {% endfor %} - {% if contents %} - {% for n in range( (3 - (contents|length)) %3) %} - {{ null_card() }} - {% endfor %} - {% endif %} -
-
-
-{% endblock %} diff --git a/erpnext/www/lms/topic.py b/erpnext/www/lms/topic.py deleted file mode 100644 index 7783211a41..0000000000 --- a/erpnext/www/lms/topic.py +++ /dev/null @@ -1,57 +0,0 @@ -import frappe - -import erpnext.education.utils as utils - -no_cache = 1 - - -def get_context(context): - try: - course = frappe.form_dict["course"] - program = frappe.form_dict["program"] - topic = frappe.form_dict["topic"] - except KeyError: - frappe.local.flags.redirect_location = "/lms" - raise frappe.Redirect - - context.program = program - context.course = course - context.topic = frappe.get_doc("Topic", topic) - context.contents = get_contents(context.topic, course, program) - context.has_access = utils.allowed_program_access(program) - - -def get_contents(topic, course, program): - student = utils.get_current_student() - if student: - course_enrollment = utils.get_or_create_course_enrollment(course, program) - contents = topic.get_contents() - progress = [] - if contents: - for content in contents: - if content.doctype in ("Article", "Video"): - if student: - status = utils.check_content_completion(content.name, content.doctype, course_enrollment.name) - else: - status = True - progress.append({"content": content, "content_type": content.doctype, "completed": status}) - elif content.doctype == "Quiz": - if student: - status, score, result, time_taken = utils.check_quiz_completion( - content, course_enrollment.name - ) - else: - status = False - score = None - result = None - progress.append( - { - "content": content, - "content_type": content.doctype, - "completed": status, - "score": score, - "result": result, - } - ) - - return progress