From b8845b9ed986a8cd2e2e30360d12336b23b4c5bc Mon Sep 17 00:00:00 2001
From: Subin Tom
Date: Fri, 30 Jul 2021 16:30:18 +0530
Subject: [PATCH 01/87] Fix: Payment Entry party validation issue
---
erpnext/accounts/party.py | 5 +++++
erpnext/accounts/utils.py | 2 ++
2 files changed, 7 insertions(+)
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index b97dc401e6a..c3b78a4f482 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -286,6 +286,7 @@ def validate_party_gle_currency(party_type, party, company, party_account_curren
.format(frappe.bold(party_type), frappe.bold(party), frappe.bold(existing_gle_currency), frappe.bold(company)), InvalidAccountCurrency)
def validate_party_accounts(doc):
+
companies = []
for account in doc.get("accounts"):
@@ -446,6 +447,10 @@ def get_payment_terms_template(party_name, party_type, company=None):
return template
def validate_party_frozen_disabled(party_type, party_name):
+
+ if frappe.flags.ignore_party_validation:
+ return
+
if party_type and party_name:
if party_type in ("Customer", "Supplier"):
party = frappe.get_cached_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 1cdbd8d38a6..d569e1cbca2 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -350,6 +350,7 @@ def reconcile_against_document(args):
# cancel advance entry
doc = frappe.get_doc(d.voucher_type, d.voucher_no)
+ frappe.flags.ignore_party_validation = True
doc.make_gl_entries(cancel=1, adv_adj=1)
# update ref in advance entry
@@ -361,6 +362,7 @@ def reconcile_against_document(args):
# re-submit advance entry
doc = frappe.get_doc(d.voucher_type, d.voucher_no)
doc.make_gl_entries(cancel = 0, adv_adj =1)
+ frappe.flags.ignore_party_validation = False
if d.voucher_type in ('Payment Entry', 'Journal Entry'):
doc.update_expense_claim()
From a57d13e1e9538e56b401d651c52d2b9c5b84250f Mon Sep 17 00:00:00 2001
From: Deepesh Garg
Date: Thu, 29 Jul 2021 19:46:17 +0530
Subject: [PATCH 02/87] fix: Multiple fixes in payment entry
---
.../doctype/payment_entry/payment_entry.js | 4 ++--
.../doctype/payment_entry/payment_entry.py | 15 +++++++++++++--
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js
index 439b1edbce6..d96bc271efa 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js
@@ -533,8 +533,8 @@ frappe.ui.form.on('Payment Entry', {
source_exchange_rate: function(frm) {
if (frm.doc.paid_amount) {
frm.set_value("base_paid_amount", flt(frm.doc.paid_amount) * flt(frm.doc.source_exchange_rate));
- if(!frm.set_paid_amount_based_on_received_amount &&
- (frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency)) {
+ // target exchange rate should always be same as source if both account currencies is same
+ if(frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency) {
frm.set_value("target_exchange_rate", frm.doc.source_exchange_rate);
frm.set_value("base_received_amount", frm.doc.base_paid_amount);
}
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index 46904f7c571..a131a810e1f 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -55,8 +55,9 @@ class PaymentEntry(AccountsController):
self.validate_mandatory()
self.validate_reference_documents()
self.set_tax_withholding()
- self.apply_taxes()
self.set_amounts()
+ self.validate_amounts()
+ self.apply_taxes()
self.clear_unallocated_reference_document_rows()
self.validate_payment_against_negative_invoice()
self.validate_transaction_reference()
@@ -236,7 +237,9 @@ class PaymentEntry(AccountsController):
self.company_currency, self.posting_date)
def set_target_exchange_rate(self, ref_doc=None):
- if self.paid_to and not self.target_exchange_rate:
+ if self.paid_from_account_currency == self.paid_to_account_currency:
+ self.target_exchange_rate = self.source_exchange_rate
+ elif self.paid_to and not self.target_exchange_rate:
if ref_doc:
if self.paid_to_account_currency == ref_doc.currency:
self.target_exchange_rate = ref_doc.get("exchange_rate")
@@ -473,6 +476,14 @@ class PaymentEntry(AccountsController):
self.set_unallocated_amount()
self.set_difference_amount()
+ def validate_amounts(self):
+ self.validate_received_amount()
+
+ def validate_received_amount(self):
+ if self.paid_from_account_currency == self.paid_to_account_currency:
+ if self.paid_amount != self.received_amount:
+ frappe.throw(_("Received Amount cannot be greater than Paid Amount"))
+
def set_received_amount(self):
self.base_received_amount = self.base_paid_amount
From c5276f3fd36764e5e90b0b068d0d9937a88e4447 Mon Sep 17 00:00:00 2001
From: Deepesh Garg
Date: Sun, 1 Aug 2021 17:48:50 +0530
Subject: [PATCH 03/87] fix: Multiple fixes in payment entry
---
.../accounts/doctype/payment_entry/payment_entry.py | 13 ++++++++-----
erpnext/accounts/utils.py | 12 ++++++++----
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index a131a810e1f..2231b47d9cc 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -45,7 +45,7 @@ class PaymentEntry(AccountsController):
self.party_account = self.paid_to
self.party_account_currency = self.paid_to_account_currency
- def validate(self):
+ def validate(self, on_reference_unlink=False):
self.setup_party_account_field()
self.set_missing_values()
self.validate_payment_type()
@@ -64,8 +64,9 @@ class PaymentEntry(AccountsController):
self.set_title()
self.set_remarks()
self.validate_duplicate_entry()
- self.validate_allocated_amount()
- self.validate_paid_invoices()
+ if not on_reference_unlink:
+ self.validate_allocated_amount()
+ self.validate_paid_invoices()
self.ensure_supplier_is_not_blocked()
self.set_status()
@@ -529,8 +530,10 @@ class PaymentEntry(AccountsController):
base_total_allocated_amount += flt(flt(d.allocated_amount) * flt(d.exchange_rate),
self.precision("base_paid_amount"))
- self.total_allocated_amount = abs(total_allocated_amount)
- self.base_total_allocated_amount = abs(base_total_allocated_amount)
+ # Do not use absolute values as only credit notes could be allocated
+ # and total allocated should be negative in that scenario
+ self.total_allocated_amount = total_allocated_amount
+ self.base_total_allocated_amount = base_total_allocated_amount
def set_unallocated_amount(self):
self.unallocated_amount = 0
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 9272bc4fcee..11e113d0003 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -553,10 +553,14 @@ def remove_ref_doc_link_from_pe(ref_type, ref_no):
and docstatus < 2""", (now(), frappe.session.user, ref_type, ref_no))
for pe in linked_pe:
- pe_doc = frappe.get_doc("Payment Entry", pe)
- pe_doc.set_total_allocated_amount()
- pe_doc.set_unallocated_amount()
- pe_doc.clear_unallocated_reference_document_rows()
+ try:
+ pe_doc = frappe.get_doc("Payment Entry", pe)
+ pe_doc.validate(on_reference_unlink=True)
+ except Exception as e:
+ msg = _("There were issues unlinking payment entry {0}.").format(pe_doc.name)
+ msg += ' '
+ msg += _("Please cancel payment entry manually first and then resubmit")
+ frappe.throw(msg, title=_("Payment Unlink Error"))
frappe.db.sql("""update `tabPayment Entry` set total_allocated_amount=%s,
base_total_allocated_amount=%s, unallocated_amount=%s, modified=%s, modified_by=%s
From 188bba8feb64519de2c1ded0d5432308c397f04a Mon Sep 17 00:00:00 2001
From: Deepesh Garg
Date: Tue, 10 Aug 2021 14:04:31 +0530
Subject: [PATCH 04/87] fix: Validation for receivingfrom customer against
negative outstanding
---
.../accounts/doctype/payment_entry/payment_entry.py | 12 ++++++++----
erpnext/accounts/utils.py | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index 2231b47d9cc..66b46675dc8 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -64,6 +64,7 @@ class PaymentEntry(AccountsController):
self.set_title()
self.set_remarks()
self.validate_duplicate_entry()
+ self.validate_payment_type_with_outstanding()
if not on_reference_unlink:
self.validate_allocated_amount()
self.validate_paid_invoices()
@@ -120,6 +121,11 @@ class PaymentEntry(AccountsController):
if not self.get(field):
self.set(field, bank_data.account)
+ def validate_payment_type_with_outstanding(self):
+ total_outstanding = sum(d.allocated_amount for d in self.get('references'))
+ if total_outstanding < 0 and self.party_type == 'Customer' and self.payment_type == 'Receive':
+ frappe.throw(_("Cannot receive from customer against negative outstanding"), title=_("Incorrect Payment Type"))
+
def validate_allocated_amount(self):
for d in self.get("references"):
if (flt(d.allocated_amount))> 0:
@@ -530,10 +536,8 @@ class PaymentEntry(AccountsController):
base_total_allocated_amount += flt(flt(d.allocated_amount) * flt(d.exchange_rate),
self.precision("base_paid_amount"))
- # Do not use absolute values as only credit notes could be allocated
- # and total allocated should be negative in that scenario
- self.total_allocated_amount = total_allocated_amount
- self.base_total_allocated_amount = base_total_allocated_amount
+ self.total_allocated_amount = abs(total_allocated_amount)
+ self.base_total_allocated_amount = abs(base_total_allocated_amount)
def set_unallocated_amount(self):
self.unallocated_amount = 0
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 11e113d0003..9d84d940741 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -559,7 +559,7 @@ def remove_ref_doc_link_from_pe(ref_type, ref_no):
except Exception as e:
msg = _("There were issues unlinking payment entry {0}.").format(pe_doc.name)
msg += ' '
- msg += _("Please cancel payment entry manually first and then resubmit")
+ msg += _("Please cancel payment entry manually first")
frappe.throw(msg, title=_("Payment Unlink Error"))
frappe.db.sql("""update `tabPayment Entry` set total_allocated_amount=%s,
From b5162390e5881a110ca460ad4720de40ff7d4e1d Mon Sep 17 00:00:00 2001
From: Deepesh Garg
Date: Tue, 10 Aug 2021 14:52:24 +0530
Subject: [PATCH 05/87] fix: Only do specific validations on reference unlink
---
erpnext/accounts/doctype/payment_entry/payment_entry.py | 7 +++----
erpnext/accounts/utils.py | 5 ++++-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index 66b46675dc8..16b4720b37d 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -45,7 +45,7 @@ class PaymentEntry(AccountsController):
self.party_account = self.paid_to
self.party_account_currency = self.paid_to_account_currency
- def validate(self, on_reference_unlink=False):
+ def validate(self):
self.setup_party_account_field()
self.set_missing_values()
self.validate_payment_type()
@@ -65,9 +65,8 @@ class PaymentEntry(AccountsController):
self.set_remarks()
self.validate_duplicate_entry()
self.validate_payment_type_with_outstanding()
- if not on_reference_unlink:
- self.validate_allocated_amount()
- self.validate_paid_invoices()
+ self.validate_allocated_amount()
+ self.validate_paid_invoices()
self.ensure_supplier_is_not_blocked()
self.set_status()
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 9d84d940741..0d3aa8f0efd 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -555,7 +555,10 @@ def remove_ref_doc_link_from_pe(ref_type, ref_no):
for pe in linked_pe:
try:
pe_doc = frappe.get_doc("Payment Entry", pe)
- pe_doc.validate(on_reference_unlink=True)
+ pe_doc.set_total_allocated_amount()
+ pe_doc.set_unallocated_amount()
+ pe_doc.clear_unallocated_reference_document_rows()
+ pe_doc.validate_payment_type_with_outstanding()
except Exception as e:
msg = _("There were issues unlinking payment entry {0}.").format(pe_doc.name)
msg += ' '
From 7141860c04fd1541f8d346a48e3e058f4ad443c9 Mon Sep 17 00:00:00 2001
From: Deepesh Garg
Date: Tue, 10 Aug 2021 22:21:28 +0530
Subject: [PATCH 06/87] test: Update exchange rate in test cases
---
erpnext/accounts/doctype/payment_entry/payment_entry.py | 4 +++-
.../accounts/doctype/payment_entry/test_payment_entry.py | 6 +++---
erpnext/accounts/utils.py | 6 +++---
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index 16b4720b37d..a991c0679bb 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -58,6 +58,7 @@ class PaymentEntry(AccountsController):
self.set_amounts()
self.validate_amounts()
self.apply_taxes()
+ self.set_amounts_after_tax()
self.clear_unallocated_reference_document_rows()
self.validate_payment_against_negative_invoice()
self.validate_transaction_reference()
@@ -477,7 +478,6 @@ class PaymentEntry(AccountsController):
def set_amounts(self):
self.set_received_amount()
self.set_amounts_in_company_currency()
- self.set_amounts_after_tax()
self.set_total_allocated_amount()
self.set_unallocated_amount()
self.set_difference_amount()
@@ -492,6 +492,8 @@ class PaymentEntry(AccountsController):
def set_received_amount(self):
self.base_received_amount = self.base_paid_amount
+ if self.paid_from_account_currency == self.paid_to_account_currency:
+ self.received_amount = self.paid_amount
def set_amounts_after_tax(self):
applicable_tax = 0
diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py
index d1302f5ae78..420e8583eac 100644
--- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py
@@ -107,7 +107,7 @@ class TestPaymentEntry(unittest.TestCase):
pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank USD - _TC")
pe.reference_no = "1"
pe.reference_date = "2016-01-01"
- pe.target_exchange_rate = 50
+ pe.source_exchange_rate = 50
pe.insert()
pe.submit()
@@ -154,7 +154,7 @@ class TestPaymentEntry(unittest.TestCase):
pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank USD - _TC")
pe.reference_no = "1"
pe.reference_date = "2016-01-01"
- pe.target_exchange_rate = 50
+ pe.source_exchange_rate = 50
pe.insert()
pe.submit()
@@ -463,7 +463,7 @@ class TestPaymentEntry(unittest.TestCase):
pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank USD - _TC")
pe.reference_no = "1"
pe.reference_date = "2016-01-01"
- pe.target_exchange_rate = 55
+ pe.source_exchange_rate = 55
pe.append("deductions", {
"account": "_Test Exchange Gain/Loss - _TC",
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 0d3aa8f0efd..73e2c2ea863 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -19,6 +19,7 @@ from erpnext.stock import get_warehouse_account_map
class StockValueAndAccountBalanceOutOfSync(frappe.ValidationError): pass
class FiscalYearError(frappe.ValidationError): pass
+class PaymentEntryUnlinkError(frappe.ValidationError): pass
@frappe.whitelist()
def get_fiscal_year(date=None, fiscal_year=None, label="Date", verbose=1, company=None, as_dict=False):
@@ -555,15 +556,14 @@ def remove_ref_doc_link_from_pe(ref_type, ref_no):
for pe in linked_pe:
try:
pe_doc = frappe.get_doc("Payment Entry", pe)
- pe_doc.set_total_allocated_amount()
- pe_doc.set_unallocated_amount()
+ pe_doc.set_amounts()
pe_doc.clear_unallocated_reference_document_rows()
pe_doc.validate_payment_type_with_outstanding()
except Exception as e:
msg = _("There were issues unlinking payment entry {0}.").format(pe_doc.name)
msg += ' '
msg += _("Please cancel payment entry manually first")
- frappe.throw(msg, title=_("Payment Unlink Error"))
+ frappe.throw(msg, exc=PaymentEntryUnlinkError, title=_("Payment Unlink Error"))
frappe.db.sql("""update `tabPayment Entry` set total_allocated_amount=%s,
base_total_allocated_amount=%s, unallocated_amount=%s, modified=%s, modified_by=%s
From 02f44528f2b43c16fc8660b3e353533ba1bc3976 Mon Sep 17 00:00:00 2001
From: Deepesh Garg
Date: Tue, 10 Aug 2021 22:21:52 +0530
Subject: [PATCH 07/87] test: Add test case for payment entry unlink
---
.../sales_invoice/test_sales_invoice.py | 41 ++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index be20b18bead..623ab3f6f28 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -25,6 +25,7 @@ from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt
from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_invoice
from erpnext.stock.utils import get_incoming_rate
+from erpnext.accounts.utils import PaymentEntryUnlinkError
class TestSalesInvoice(unittest.TestCase):
def make(self):
@@ -135,7 +136,7 @@ class TestSalesInvoice(unittest.TestCase):
pe.paid_to_account_currency = si.currency
pe.source_exchange_rate = 1
pe.target_exchange_rate = 1
- pe.paid_amount = si.grand_total
+ pe.paid_amount = si.outstanding_amount
pe.insert()
pe.submit()
@@ -144,6 +145,44 @@ class TestSalesInvoice(unittest.TestCase):
self.assertRaises(frappe.LinkExistsError, si.cancel)
unlink_payment_on_cancel_of_invoice()
+ def test_payment_entry_unlink_against_standalone_credit_note(self):
+ from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
+ si1 = create_sales_invoice(rate=1000)
+ si2 = create_sales_invoice(rate=300)
+ si3 = create_sales_invoice(qty=-1, rate=300, is_return=1)
+
+
+ pe = get_payment_entry("Sales Invoice", si1.name, bank_account="_Test Bank - _TC")
+ pe.append('references', {
+ 'reference_doctype': 'Sales Invoice',
+ 'reference_name': si2.name,
+ 'total_amount': si2.grand_total,
+ 'outstanding_amount': si2.outstanding_amount,
+ 'allocated_amount': si2.outstanding_amount
+ })
+
+ pe.append('references', {
+ 'reference_doctype': 'Sales Invoice',
+ 'reference_name': si3.name,
+ 'total_amount': si3.grand_total,
+ 'outstanding_amount': si3.outstanding_amount,
+ 'allocated_amount': si3.outstanding_amount
+ })
+
+ pe.reference_no = 'Test001'
+ pe.reference_date = nowdate()
+ pe.save()
+ pe.submit()
+
+ unlink_payment_on_cancel_of_invoice()
+ si2.load_from_db()
+ si2.cancel()
+
+ si1.load_from_db()
+ self.assertRaises(PaymentEntryUnlinkError, si1.cancel)
+ unlink_payment_on_cancel_of_invoice(0)
+
+
def test_sales_invoice_calculation_export_currency(self):
si = frappe.copy_doc(test_records[2])
si.currency = "USD"
From a1f0cebda5f21bf4d1dba4214fd77e0dec210578 Mon Sep 17 00:00:00 2001
From: Deepesh Garg
Date: Wed, 11 Aug 2021 11:36:49 +0530
Subject: [PATCH 08/87] fix: Do not update settings for test
---
erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index 623ab3f6f28..92bf746ad8a 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -174,13 +174,11 @@ class TestSalesInvoice(unittest.TestCase):
pe.save()
pe.submit()
- unlink_payment_on_cancel_of_invoice()
si2.load_from_db()
si2.cancel()
si1.load_from_db()
self.assertRaises(PaymentEntryUnlinkError, si1.cancel)
- unlink_payment_on_cancel_of_invoice(0)
def test_sales_invoice_calculation_export_currency(self):
From 23e1d2b536b6da805eb305c70c6878374d07aaa6 Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Tue, 18 May 2021 17:11:47 +0530
Subject: [PATCH 09/87] refactor: update stock onboarding
---
.../stock/module_onboarding/stock/stock.json | 16 +++++++++----
.../create_a_delivery_note.json | 20 ++++++++++++++++
.../create_a_purchase_receipt.json | 5 ++--
.../create_a_stock_entry.json | 5 ++--
.../create_a_supplier/create_a_supplier.json | 7 +++---
.../create_a_warehouse.json | 20 ++++++++++++++++
.../create_an_item/create_an_item.json | 22 ++++++++++++++++++
.../introduction_to_stock_entry.json | 5 ++--
.../setup_your_warehouse.json | 4 ++--
.../stock_settings/stock_settings.json | 5 ++--
.../view_stock_ledger/view_stock_ledger.json | 23 +++++++++++++++++++
.../view_warehouses/view_warehouses.json | 20 ++++++++++++++++
12 files changed, 134 insertions(+), 18 deletions(-)
create mode 100644 erpnext/stock/onboarding_step/create_a_delivery_note/create_a_delivery_note.json
create mode 100644 erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json
create mode 100644 erpnext/stock/onboarding_step/create_an_item/create_an_item.json
create mode 100644 erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json
create mode 100644 erpnext/stock/onboarding_step/view_warehouses/view_warehouses.json
diff --git a/erpnext/stock/module_onboarding/stock/stock.json b/erpnext/stock/module_onboarding/stock/stock.json
index 847464822b4..6cc8ec6b052 100644
--- a/erpnext/stock/module_onboarding/stock/stock.json
+++ b/erpnext/stock/module_onboarding/stock/stock.json
@@ -19,20 +19,23 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/stock",
"idx": 0,
"is_complete": 0,
- "modified": "2020-10-14 14:54:42.741971",
+ "modified": "2021-05-18 17:01:36.137180",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock",
"owner": "Administrator",
"steps": [
{
- "step": "Setup your Warehouse"
+ "step": "Create an Item"
},
{
- "step": "Create a Product"
+ "step": "View Warehouses"
},
{
- "step": "Create a Supplier"
+ "step": "Create a Warehouse"
+ },
+ {
+ "step": "Stock Settings"
},
{
"step": "Introduction to Stock Entry"
@@ -40,11 +43,14 @@
{
"step": "Create a Stock Entry"
},
+ {
+ "step": "View Stock Ledger"
+ },
{
"step": "Create a Purchase Receipt"
},
{
- "step": "Stock Settings"
+ "step": "Create a Delivery Note"
}
],
"subtitle": "Inventory, Warehouses, Analysis, and more.",
diff --git a/erpnext/stock/onboarding_step/create_a_delivery_note/create_a_delivery_note.json b/erpnext/stock/onboarding_step/create_a_delivery_note/create_a_delivery_note.json
new file mode 100644
index 00000000000..7b702f013b6
--- /dev/null
+++ b/erpnext/stock/onboarding_step/create_a_delivery_note/create_a_delivery_note.json
@@ -0,0 +1,20 @@
+{
+ "action": "Create Entry",
+ "creation": "2021-05-17 16:15:11.745214",
+ "description": "# Create a Delivery Note\nA [**Delivery Note**](https://docs.erpnext.com/docs/user/manual/en/stock/delivery-note) is made when a shipment is shipped from the company\u2019s *Warehouse* to the *Customer*. \n\nIn this step we will create a *Delivery Note*.",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2021-05-18 15:33:47.452298",
+ "modified_by": "Administrator",
+ "name": "Create a Delivery Note",
+ "owner": "Administrator",
+ "reference_document": "Delivery Note",
+ "show_form_tour": 1,
+ "show_full_form": 1,
+ "title": "Create a Delivery Note",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json b/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json
index 9012493f57e..549fe26c253 100644
--- a/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json
+++ b/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json
@@ -1,18 +1,19 @@
{
"action": "Create Entry",
"creation": "2020-05-19 18:59:13.266713",
+ "description": "# Create a Purchase Entry\nA [**Purchase Receipt**](https://docs.erpnext.com/docs/user/manual/en/stock/purchase-receipt) is made when an *Item* is received from a *Supplier*. \n\nIn this step we will create a *Purchase Receipt*.",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
- "is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-10-14 14:53:25.618434",
+ "modified": "2021-05-18 15:17:44.204445",
"modified_by": "Administrator",
"name": "Create a Purchase Receipt",
"owner": "Administrator",
"reference_document": "Purchase Receipt",
+ "show_form_tour": 1,
"show_full_form": 1,
"title": "Create a Purchase Receipt",
"validate_action": 1
diff --git a/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json b/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json
index 09902b8844e..2244c13d5de 100644
--- a/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json
+++ b/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json
@@ -1,18 +1,19 @@
{
"action": "Create Entry",
"creation": "2020-05-15 03:20:16.277043",
+ "description": "# Create a Stock Entry\nA [**Stock Entry**](https://docs.erpnext.com/docs/user/manual/en/stock/stock-entry) allows you to record the movement of *Items* between *Warehouses*. \n\nIn this step we will create *Stock Entry*.",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
- "is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-10-14 14:53:00.105905",
+ "modified": "2021-05-18 15:15:26.355884",
"modified_by": "Administrator",
"name": "Create a Stock Entry",
"owner": "Administrator",
"reference_document": "Stock Entry",
+ "show_form_tour": 1,
"show_full_form": 1,
"title": "Create a Stock Entry",
"validate_action": 1
diff --git a/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json b/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json
index ef61fa3b2e2..49efe578a29 100644
--- a/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json
+++ b/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json
@@ -1,18 +1,19 @@
{
- "action": "Create Entry",
+ "action": "Show Form Tour",
"creation": "2020-05-14 22:09:10.043554",
+ "description": "# Create a Supplier\nIn this step we will create a **Supplier**. If you have already created a **Supplier** you can skip this step.",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
- "is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-10-14 14:53:00.120455",
+ "modified": "2021-05-17 16:37:37.697077",
"modified_by": "Administrator",
"name": "Create a Supplier",
"owner": "Administrator",
"reference_document": "Supplier",
+ "show_form_tour": 0,
"show_full_form": 0,
"title": "Create a Supplier",
"validate_action": 1
diff --git a/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json b/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json
new file mode 100644
index 00000000000..b31b0d03d7b
--- /dev/null
+++ b/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json
@@ -0,0 +1,20 @@
+{
+ "action": "Create Entry",
+ "creation": "2021-05-17 16:13:19.297789",
+ "description": "# Create a Warehouse\nIn this step we will create a [**Warehouse**](https://docs.erpnext.com/docs/user/manual/en/stock/warehouse).",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2021-05-18 15:00:36.896793",
+ "modified_by": "Administrator",
+ "name": "Create a Warehouse",
+ "owner": "Administrator",
+ "reference_document": "Warehouse",
+ "show_form_tour": 1,
+ "show_full_form": 1,
+ "title": "Create a Warehouse",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/create_an_item/create_an_item.json b/erpnext/stock/onboarding_step/create_an_item/create_an_item.json
new file mode 100644
index 00000000000..016cbd566d5
--- /dev/null
+++ b/erpnext/stock/onboarding_step/create_an_item/create_an_item.json
@@ -0,0 +1,22 @@
+{
+ "action": "Create Entry",
+ "action_label": "",
+ "creation": "2021-05-17 13:47:18.515052",
+ "description": "# Create an Item\nThe Stock module deals with the movement of items.\n\nIn this step we will create an [**Item**](https://docs.erpnext.com/docs/user/manual/en/stock/item).",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "intro_video_url": "",
+ "is_complete": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2021-05-18 16:15:20.695028",
+ "modified_by": "Administrator",
+ "name": "Create an Item",
+ "owner": "Administrator",
+ "reference_document": "Item",
+ "show_form_tour": 1,
+ "show_full_form": 1,
+ "title": "Create an Item",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/introduction_to_stock_entry/introduction_to_stock_entry.json b/erpnext/stock/onboarding_step/introduction_to_stock_entry/introduction_to_stock_entry.json
index 212e5055eda..384950e8b99 100644
--- a/erpnext/stock/onboarding_step/introduction_to_stock_entry/introduction_to_stock_entry.json
+++ b/erpnext/stock/onboarding_step/introduction_to_stock_entry/introduction_to_stock_entry.json
@@ -1,17 +1,18 @@
{
"action": "Watch Video",
"creation": "2020-05-15 02:47:17.958806",
+ "description": "# Introduction to Stock Entry\nThis video will give a quick introduction to [**Stock Entry**](https://docs.erpnext.com/docs/user/manual/en/stock/stock-entry).",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
- "is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-10-14 14:53:00.075177",
+ "modified": "2021-05-18 15:13:43.306064",
"modified_by": "Administrator",
"name": "Introduction to Stock Entry",
"owner": "Administrator",
+ "show_form_tour": 0,
"show_full_form": 0,
"title": "Introduction to Stock Entry",
"validate_action": 1,
diff --git a/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json b/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
index 75940ed2a6c..5d33a649100 100644
--- a/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
+++ b/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
@@ -5,15 +5,15 @@
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
- "is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-10-14 14:53:25.538900",
+ "modified": "2021-05-17 13:53:06.936579",
"modified_by": "Administrator",
"name": "Setup your Warehouse",
"owner": "Administrator",
"path": "Tree/Warehouse",
"reference_document": "Warehouse",
+ "show_form_tour": 0,
"show_full_form": 0,
"title": "Set up your Warehouse",
"validate_action": 1
diff --git a/erpnext/stock/onboarding_step/stock_settings/stock_settings.json b/erpnext/stock/onboarding_step/stock_settings/stock_settings.json
index ae34afa695f..096a3d2b471 100644
--- a/erpnext/stock/onboarding_step/stock_settings/stock_settings.json
+++ b/erpnext/stock/onboarding_step/stock_settings/stock_settings.json
@@ -1,18 +1,19 @@
{
"action": "Show Form Tour",
"creation": "2020-05-15 02:53:57.209967",
+ "description": "# Stock Settings\nIn this step we will view the [**Stock Settings**](https://docs.erpnext.com/docs/user/manual/en/stock/stock-settings) page, here you can set the default settings for your stock related transactions.",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
- "is_mandatory": 0,
"is_single": 1,
"is_skipped": 0,
- "modified": "2020-10-14 14:53:00.092504",
+ "modified": "2021-05-18 16:44:58.084849",
"modified_by": "Administrator",
"name": "Stock Settings",
"owner": "Administrator",
"reference_document": "Stock Settings",
+ "show_form_tour": 0,
"show_full_form": 0,
"title": "Explore Stock Settings",
"validate_action": 1
diff --git a/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json b/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json
new file mode 100644
index 00000000000..13661bc9fbd
--- /dev/null
+++ b/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json
@@ -0,0 +1,23 @@
+{
+ "action": "View Report",
+ "creation": "2021-05-17 16:16:10.727959",
+ "description": "# View Stock Ledger\nThe [**Stock Ledger**](https://docs.erpnext.com/docs/user/manual/en/stock/stock-ledger) is a detailed record that keeps track of stock movements for a company. \n\nIn this step we will view the *Stock Ledger*.",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2021-05-18 16:16:38.150079",
+ "modified_by": "Administrator",
+ "name": "View Stock Ledger",
+ "owner": "Administrator",
+ "reference_report": "Stock Ledger",
+ "report_description": "You can set the filters to see entries specific to the previous steps.",
+ "report_reference_doctype": "Stock Ledger Entry",
+ "report_type": "Script Report",
+ "show_form_tour": 0,
+ "show_full_form": 0,
+ "title": "View Stock Ledger",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/view_warehouses/view_warehouses.json b/erpnext/stock/onboarding_step/view_warehouses/view_warehouses.json
new file mode 100644
index 00000000000..c46c4bdab86
--- /dev/null
+++ b/erpnext/stock/onboarding_step/view_warehouses/view_warehouses.json
@@ -0,0 +1,20 @@
+{
+ "action": "Go to Page",
+ "creation": "2021-05-17 16:12:43.427579",
+ "description": "# View Warehouse\nIn ERPNext the term 'warehouse' can be thought of as a storage location.\n\nWarehouses are arranged in ERPNext in a tree like structure, where multiple sub-warehouses can be grouped under a single warehouse.\n\nIn this step we will view the [**Warehouse Tree**](https://docs.erpnext.com/docs/user/manual/en/stock/warehouse#21-tree-view) to view the [**Warehouses**](https://docs.erpnext.com/docs/user/manual/en/stock/warehouse) that are set by default.",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2021-05-18 15:04:41.198413",
+ "modified_by": "Administrator",
+ "name": "View Warehouses",
+ "owner": "Administrator",
+ "path": "Tree/Warehouse",
+ "show_form_tour": 0,
+ "show_full_form": 0,
+ "title": "View Warehouses",
+ "validate_action": 1
+}
\ No newline at end of file
From 0b669b3d7e0e079a4029ec5898d8de0e38333648 Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Tue, 18 May 2021 17:18:04 +0530
Subject: [PATCH 10/87] refactor: add form tour for stock module onboarding
---
.../doctype/delivery_note/delivery_note.js | 20 ++++++++++
erpnext/stock/doctype/item/item.js | 39 +++++++++++++++++++
.../purchase_receipt/purchase_receipt.js | 20 ++++++++++
.../stock/doctype/stock_entry/stock_entry.js | 20 ++++++++++
erpnext/stock/doctype/warehouse/warehouse.js | 25 +++++++++++-
5 files changed, 123 insertions(+), 1 deletion(-)
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 36dfa6d7951..b73ebd6c3bd 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -356,3 +356,23 @@ erpnext.stock.delivery_note.set_print_hide = function(doc, cdt, cdn){
dn_fields['taxes'].print_hide = 0;
}
}
+
+
+frappe.tour['Delivery Note'] = [
+ {
+ fieldname: "customer",
+ title: __("Customer"),
+ description: __("This field is used to set the 'Customer'.")
+ },
+ {
+ fieldname: "items",
+ title: __("Items"),
+ description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc. ") +
+ __("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
+ },
+ {
+ fieldname: "set_posting_time",
+ title: __("Edit Posting Date and Time"),
+ description: __("This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.")
+ }
+]
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index c5bc9f14fb1..6af14c95a45 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -793,3 +793,42 @@ frappe.ui.form.on("UOM Conversion Detail", {
}
}
})
+
+
+frappe.tour['Item'] = [
+ {
+ fieldname: "item_name",
+ title: __("Item Name"),
+ description: __("This is the actual name of the product or service.")
+ },
+ {
+ fieldname: "item_code",
+ title: __("Item Code"),
+ description: __("The Item Code can be thought of as a short-form that refers to the item. ") +
+ __("For more information click here: ") +
+ "Item Codification" +
+ __("."),
+ },
+ {
+ fieldname: "item_group",
+ title: __("Item Group"),
+ description: __("This is used for categorizing items under a common criteria. ") +
+ __("For more information click here: ") +
+ "Item Group" +
+ __("."),
+ },
+ {
+ fieldname: "stock_uom",
+ title: __("Default Unit of Measure"),
+ description: __("The Item Code can be thought of as a short-form that refers to the item. ") +
+ __("For more information click here: ") +
+ "Unit of Measure" +
+ __("."),
+ },
+ {
+ fieldname: "is_stock_item",
+ title: __("Maintain Stock"),
+ description: __("Selecting this creates a stock item and 'Stock Ledger' entries are created for all transcations. ") +
+ __("Unselect this for a non-stock item such as a service.")
+ },
+]
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index 0182ed55a18..fd4be86ae98 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -347,3 +347,23 @@ var validate_sample_quantity = function(frm, cdt, cdn) {
});
}
};
+
+
+frappe.tour['Purchase Receipt'] = [
+ {
+ fieldname: "supplier",
+ title: __("Supplier"),
+ description: __("This field is used to set the 'Supplier'.")
+ },
+ {
+ fieldname: "items",
+ title: __("Items"),
+ description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc. ") +
+ __("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
+ },
+ {
+ fieldname: "set_posting_time",
+ title: __("Edit Posting Date and Time"),
+ description: __("This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.")
+ }
+]
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 908020d02ba..8616a4cd3fe 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1101,3 +1101,23 @@ function check_should_not_attach_bom_items(bom_no) {
}
$.extend(cur_frm.cscript, new erpnext.stock.StockEntry({frm: cur_frm}));
+
+frappe.tour['Stock Entry'] = [
+ {
+ fieldname: "stock_entry_type",
+ title: __("Stock Entry Type"),
+ description: __("There are multiple 'Stock Entry Type's you can even create your own. ") +
+ __("For moving material between warehouses you can select 'Material Transfer'")
+ },
+ {
+ fieldname: "items",
+ title: __("Items"),
+ description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc. ") +
+ __("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
+ },
+ {
+ fieldname: "set_posting_time",
+ title: __("Edit Posting Date and Time"),
+ description: __("This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.")
+ }
+]
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index 1f172504a7f..9b5f2bc0b1d 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -85,4 +85,27 @@ function convert_to_group_or_ledger(frm){
}
})
-}
\ No newline at end of file
+}
+
+frappe.tour['Warehouse'] = [
+ {
+ fieldname: "warehouse_name",
+ title: __("Warehouse Name"),
+ description: __("A 'Warehouse Name' can be assigned to the warehouse. This should reflect the type of goods it contains.")
+ },
+ {
+ fieldname: "warehouse_type",
+ title: __("Warehouse Type"),
+ description: __("A 'Warehouse Type' can be set to classify warehouses.")
+ },
+ {
+ fieldname: "is_group",
+ title: __("Is Group"),
+ description: __("If you check 'Is Group', you can group warehouses under this warehouse.")
+ },
+ {
+ fieldname: "account",
+ title: __("Account"),
+ description: __("This field can be used to set a default account for all transactions with this warehouse.")
+ },
+]
From 1851232e3cc13676c131de99cc2df0b6fc5526ee Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Tue, 18 May 2021 17:30:23 +0530
Subject: [PATCH 11/87] refactor: move trailing whitespace out of translate
func
---
erpnext/stock/doctype/delivery_note/delivery_note.js | 2 +-
erpnext/stock/doctype/item/item.js | 12 ++++++------
.../doctype/purchase_receipt/purchase_receipt.js | 2 +-
erpnext/stock/doctype/stock_entry/stock_entry.js | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index b73ebd6c3bd..706ca365988 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -367,7 +367,7 @@ frappe.tour['Delivery Note'] = [
{
fieldname: "items",
title: __("Items"),
- description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc. ") +
+ description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.") + " " +
__("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
},
{
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 6af14c95a45..e664e9c1cd7 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -804,7 +804,7 @@ frappe.tour['Item'] = [
{
fieldname: "item_code",
title: __("Item Code"),
- description: __("The Item Code can be thought of as a short-form that refers to the item. ") +
+ description: __("The Item Code can be thought of as a short-form that refers to the item.") + " " +
__("For more information click here: ") +
"Item Codification" +
__("."),
@@ -812,23 +812,23 @@ frappe.tour['Item'] = [
{
fieldname: "item_group",
title: __("Item Group"),
- description: __("This is used for categorizing items under a common criteria. ") +
- __("For more information click here: ") +
+ description: __("This is used for categorizing items under a common criteria.") + " " +
+ __("For more information click here:") + " " +
"Item Group" +
__("."),
},
{
fieldname: "stock_uom",
title: __("Default Unit of Measure"),
- description: __("The Item Code can be thought of as a short-form that refers to the item. ") +
- __("For more information click here: ") +
+ description: __("The Item Code can be thought of as a short-form that refers to the item.") + " " +
+ __("For more information click here:") + " " +
"Unit of Measure" +
__("."),
},
{
fieldname: "is_stock_item",
title: __("Maintain Stock"),
- description: __("Selecting this creates a stock item and 'Stock Ledger' entries are created for all transcations. ") +
+ description: __("Selecting this creates a stock item and 'Stock Ledger' entries are created for all transcations.") + " " +
__("Unselect this for a non-stock item such as a service.")
},
]
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index fd4be86ae98..9f002f459fb 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -358,7 +358,7 @@ frappe.tour['Purchase Receipt'] = [
{
fieldname: "items",
title: __("Items"),
- description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc. ") +
+ description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.") + " " +
__("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
},
{
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 8616a4cd3fe..30d0750959e 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1106,13 +1106,13 @@ frappe.tour['Stock Entry'] = [
{
fieldname: "stock_entry_type",
title: __("Stock Entry Type"),
- description: __("There are multiple 'Stock Entry Type's you can even create your own. ") +
+ description: __("There are multiple 'Stock Entry Type's you can even create your own.") + " " +
__("For moving material between warehouses you can select 'Material Transfer'")
},
{
fieldname: "items",
title: __("Items"),
- description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc. ") +
+ description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.") + " " +
__("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
},
{
From 51d2317bb5339022040d2e177156c30157a6c20e Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Tue, 18 May 2021 17:50:59 +0530
Subject: [PATCH 12/87] refactor: sider/semgrep
---
erpnext/stock/doctype/item/item.js | 6 +++---
erpnext/stock/doctype/warehouse/warehouse.js | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index e664e9c1cd7..3144f1c12a6 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -792,7 +792,7 @@ frappe.ui.form.on("UOM Conversion Detail", {
});
}
}
-})
+});
frappe.tour['Item'] = [
@@ -805,7 +805,7 @@ frappe.tour['Item'] = [
fieldname: "item_code",
title: __("Item Code"),
description: __("The Item Code can be thought of as a short-form that refers to the item.") + " " +
- __("For more information click here: ") +
+ __("For more information click here:") + " " +
"Item Codification" +
__("."),
},
@@ -831,4 +831,4 @@ frappe.tour['Item'] = [
description: __("Selecting this creates a stock item and 'Stock Ledger' entries are created for all transcations.") + " " +
__("Unselect this for a non-stock item such as a service.")
},
-]
+];
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index 9b5f2bc0b1d..af9a5152470 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -108,4 +108,4 @@ frappe.tour['Warehouse'] = [
title: __("Account"),
description: __("This field can be used to set a default account for all transactions with this warehouse.")
},
-]
+];
From 1d67d20185e48e537a1841d5bc73ceb56ad41cfd Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Thu, 20 May 2021 13:04:59 +0530
Subject: [PATCH 13/87] refactor: remove DN, PR; change wording, add/remove
steps in tour
---
erpnext/stock/doctype/item/item.js | 20 +++++++++---------
.../stock/doctype/stock_entry/stock_entry.js | 21 ++++++++++++-------
erpnext/stock/doctype/warehouse/warehouse.js | 8 +++----
.../create_a_delivery_note.json | 20 ------------------
.../create_a_purchase_receipt.json | 20 ------------------
5 files changed, 27 insertions(+), 62 deletions(-)
delete mode 100644 erpnext/stock/onboarding_step/create_a_delivery_note/create_a_delivery_note.json
delete mode 100644 erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 3144f1c12a6..5c632fc7d54 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -796,23 +796,23 @@ frappe.ui.form.on("UOM Conversion Detail", {
frappe.tour['Item'] = [
- {
- fieldname: "item_name",
- title: __("Item Name"),
- description: __("This is the actual name of the product or service.")
- },
{
fieldname: "item_code",
title: __("Item Code"),
- description: __("The Item Code can be thought of as a short-form that refers to the item.") + " " +
+ description: __("Select an item code, this can be an SKU or a product code.") + " " +
__("For more information click here:") + " " +
"Item Codification" +
__("."),
},
+ {
+ fieldname: "item_name",
+ title: __("Item Name"),
+ description: __("Select an item name, this is the actual name of the item. You will be able to search and select an item with its name as well.")
+ },
{
fieldname: "item_group",
title: __("Item Group"),
- description: __("This is used for categorizing items under a common criteria.") + " " +
+ description: __("Select an item group to categorizing items under a common criteria. You can even create custom Item Groups.") + " " +
__("For more information click here:") + " " +
"Item Group" +
__("."),
@@ -820,7 +820,7 @@ frappe.tour['Item'] = [
{
fieldname: "stock_uom",
title: __("Default Unit of Measure"),
- description: __("The Item Code can be thought of as a short-form that refers to the item.") + " " +
+ description: __("This decides the unit of measure in which stock balance will be maintained for this item.") + " " +
__("For more information click here:") + " " +
"Unit of Measure" +
__("."),
@@ -828,7 +828,7 @@ frappe.tour['Item'] = [
{
fieldname: "is_stock_item",
title: __("Maintain Stock"),
- description: __("Selecting this creates a stock item and 'Stock Ledger' entries are created for all transcations.") + " " +
- __("Unselect this for a non-stock item such as a service.")
+ description: __("Check this field to maintain stock for this item.") + " " +
+ __("Uncheck this field for non-stock items such as a service.")
},
];
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 30d0750959e..e7bf0f3bf9b 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1106,18 +1106,23 @@ frappe.tour['Stock Entry'] = [
{
fieldname: "stock_entry_type",
title: __("Stock Entry Type"),
- description: __("There are multiple 'Stock Entry Type's you can even create your own.") + " " +
- __("For moving material between warehouses you can select 'Material Transfer'")
+ description: __("Select the type of Stock Entry to be made.") + " " +
+ __("For now, to move stock between warehouses select Material Transfer.")
+ },
+ {
+ fieldname: "from_warehouse",
+ title: __("Default Source Warehouse"),
+ description: __("Select a source warehouse, where you have stock available.")
+ },
+ {
+ fieldname: "to_warehouse",
+ title: __("Default Target Warehouse"),
+ description: __("Select a target warehouse, where stock needs to be transferred.")
},
{
fieldname: "items",
title: __("Items"),
- description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.") + " " +
+ description: __("Select an item and entry quantity to be delivered.") + " " +
__("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
},
- {
- fieldname: "set_posting_time",
- title: __("Edit Posting Date and Time"),
- description: __("This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.")
- }
]
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index af9a5152470..b29c6fdde3c 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -91,21 +91,21 @@ frappe.tour['Warehouse'] = [
{
fieldname: "warehouse_name",
title: __("Warehouse Name"),
- description: __("A 'Warehouse Name' can be assigned to the warehouse. This should reflect the type of goods it contains.")
+ description: __("Select a name for the warehouse. This should reflect it's location or purpose.")
},
{
fieldname: "warehouse_type",
title: __("Warehouse Type"),
- description: __("A 'Warehouse Type' can be set to classify warehouses.")
+ description: __("Select a warehouse type to categorize the warehouse into a sub-group.")
},
{
fieldname: "is_group",
title: __("Is Group"),
- description: __("If you check 'Is Group', you can group warehouses under this warehouse.")
+ description: __("Check this field to group warehouses under this warehouse.")
},
{
fieldname: "account",
title: __("Account"),
- description: __("This field can be used to set a default account for all transactions with this warehouse.")
+ description: __("Select an account to set a default account for all transactions with this warehouse.")
},
];
diff --git a/erpnext/stock/onboarding_step/create_a_delivery_note/create_a_delivery_note.json b/erpnext/stock/onboarding_step/create_a_delivery_note/create_a_delivery_note.json
deleted file mode 100644
index 7b702f013b6..00000000000
--- a/erpnext/stock/onboarding_step/create_a_delivery_note/create_a_delivery_note.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "action": "Create Entry",
- "creation": "2021-05-17 16:15:11.745214",
- "description": "# Create a Delivery Note\nA [**Delivery Note**](https://docs.erpnext.com/docs/user/manual/en/stock/delivery-note) is made when a shipment is shipped from the company\u2019s *Warehouse* to the *Customer*. \n\nIn this step we will create a *Delivery Note*.",
- "docstatus": 0,
- "doctype": "Onboarding Step",
- "idx": 0,
- "is_complete": 0,
- "is_single": 0,
- "is_skipped": 0,
- "modified": "2021-05-18 15:33:47.452298",
- "modified_by": "Administrator",
- "name": "Create a Delivery Note",
- "owner": "Administrator",
- "reference_document": "Delivery Note",
- "show_form_tour": 1,
- "show_full_form": 1,
- "title": "Create a Delivery Note",
- "validate_action": 1
-}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json b/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json
deleted file mode 100644
index 549fe26c253..00000000000
--- a/erpnext/stock/onboarding_step/create_a_purchase_receipt/create_a_purchase_receipt.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "action": "Create Entry",
- "creation": "2020-05-19 18:59:13.266713",
- "description": "# Create a Purchase Entry\nA [**Purchase Receipt**](https://docs.erpnext.com/docs/user/manual/en/stock/purchase-receipt) is made when an *Item* is received from a *Supplier*. \n\nIn this step we will create a *Purchase Receipt*.",
- "docstatus": 0,
- "doctype": "Onboarding Step",
- "idx": 0,
- "is_complete": 0,
- "is_single": 0,
- "is_skipped": 0,
- "modified": "2021-05-18 15:17:44.204445",
- "modified_by": "Administrator",
- "name": "Create a Purchase Receipt",
- "owner": "Administrator",
- "reference_document": "Purchase Receipt",
- "show_form_tour": 1,
- "show_full_form": 1,
- "title": "Create a Purchase Receipt",
- "validate_action": 1
-}
\ No newline at end of file
From 9581836885bd37e577e5c70fadf72738ecb0a7a3 Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Thu, 20 May 2021 15:23:17 +0530
Subject: [PATCH 14/87] refactor: add watch video step for stock opening
balance
---
.../stock/module_onboarding/stock/stock.json | 7 ++-----
.../stock_opening_balance.json | 21 +++++++++++++++++++
2 files changed, 23 insertions(+), 5 deletions(-)
create mode 100644 erpnext/stock/onboarding_step/stock_opening_balance/stock_opening_balance.json
diff --git a/erpnext/stock/module_onboarding/stock/stock.json b/erpnext/stock/module_onboarding/stock/stock.json
index 6cc8ec6b052..9e91090d5b2 100644
--- a/erpnext/stock/module_onboarding/stock/stock.json
+++ b/erpnext/stock/module_onboarding/stock/stock.json
@@ -19,7 +19,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/stock",
"idx": 0,
"is_complete": 0,
- "modified": "2021-05-18 17:01:36.137180",
+ "modified": "2021-05-20 15:08:11.987145",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock",
@@ -47,10 +47,7 @@
"step": "View Stock Ledger"
},
{
- "step": "Create a Purchase Receipt"
- },
- {
- "step": "Create a Delivery Note"
+ "step": "Stock Opening Balance"
}
],
"subtitle": "Inventory, Warehouses, Analysis, and more.",
diff --git a/erpnext/stock/onboarding_step/stock_opening_balance/stock_opening_balance.json b/erpnext/stock/onboarding_step/stock_opening_balance/stock_opening_balance.json
new file mode 100644
index 00000000000..19d6a37ba4d
--- /dev/null
+++ b/erpnext/stock/onboarding_step/stock_opening_balance/stock_opening_balance.json
@@ -0,0 +1,21 @@
+{
+ "action": "Watch Video",
+ "creation": "2021-05-17 16:13:47.511883",
+ "description": "# Stock Opening Balance\nTo set the Stock Opening Balance, you can create a [**Stock Reconciliation**](https://docs.erpnext.com/docs/user/manual/en/stock/stock-reconciliation) entry with _Purpose_ set to _Opening Balance_.\n\nFor more information you can watch the video.",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2021-05-20 15:07:19.545934",
+ "modified_by": "Administrator",
+ "name": "Stock Opening Balance",
+ "owner": "Administrator",
+ "reference_document": "Stock Reconciliation",
+ "show_form_tour": 1,
+ "show_full_form": 1,
+ "title": "Stock Opening Balance",
+ "validate_action": 1,
+ "video_url": "https://www.youtube.com/watch?v=nlHX0ZZ84Lw"
+}
\ No newline at end of file
From 37466631f20b16e94253ac2115717aed2ceeb9b8 Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Thu, 20 May 2021 15:28:08 +0530
Subject: [PATCH 15/87] refactor: reorder steps according to stock settings
refactor
---
erpnext/stock/doctype/stock_settings/stock_settings.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.js b/erpnext/stock/doctype/stock_settings/stock_settings.js
index 48624e0f25e..e2f1f951ec3 100644
--- a/erpnext/stock/doctype/stock_settings/stock_settings.js
+++ b/erpnext/stock/doctype/stock_settings/stock_settings.js
@@ -27,17 +27,17 @@ frappe.tour['Stock Settings'] = [
title: __("Default Warehouse"),
description: __("Set a Default Warehouse for Inventory Transactions. This will be fetched into the Default Warehouse in the Item master.")
},
+ {
+ fieldname: "valuation_method",
+ title: __("Valuation Method"),
+ description: __("Choose between FIFO and Moving Average Valuation Methods. Click ") + "here" + __(" to know more about them.")
+ },
{
fieldname: "allow_negative_stock",
title: __("Allow Negative Stock"),
description: __("This will allow stock items to be displayed in negative values. Using this option depends on your use case. With this option unchecked, the system warns before obstructing a transaction that is causing negative stock.")
},
- {
- fieldname: "valuation_method",
- title: __("Valuation Method"),
- description: __("Choose between FIFO and Moving Average Valuation Methods. Click ") + "here" + __(" to know more about them.")
- },
{
fieldname: "show_barcode_field",
title: __("Show Barcode Field"),
From 95992a7ea54de397c200c3be4925e7c0a5fa6482 Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Thu, 20 May 2021 15:29:24 +0530
Subject: [PATCH 16/87] refactor: fix typo, remove target warehouse cause SE
Type dependency
---
erpnext/stock/doctype/stock_entry/stock_entry.js | 5 -----
erpnext/stock/doctype/warehouse/warehouse.js | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index e7bf0f3bf9b..ecd3fee8286 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1114,11 +1114,6 @@ frappe.tour['Stock Entry'] = [
title: __("Default Source Warehouse"),
description: __("Select a source warehouse, where you have stock available.")
},
- {
- fieldname: "to_warehouse",
- title: __("Default Target Warehouse"),
- description: __("Select a target warehouse, where stock needs to be transferred.")
- },
{
fieldname: "items",
title: __("Items"),
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index b29c6fdde3c..30575a7c933 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -91,7 +91,7 @@ frappe.tour['Warehouse'] = [
{
fieldname: "warehouse_name",
title: __("Warehouse Name"),
- description: __("Select a name for the warehouse. This should reflect it's location or purpose.")
+ description: __("Select a name for the warehouse. This should reflect its location or purpose.")
},
{
fieldname: "warehouse_type",
From 599c1024a221624f83f50a7295768292aebce48a Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Thu, 20 May 2021 15:49:26 +0530
Subject: [PATCH 17/87] fix: semgrep, remove trailing and leading whitespaces
---
erpnext/stock/doctype/stock_settings/stock_settings.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.js b/erpnext/stock/doctype/stock_settings/stock_settings.js
index e2f1f951ec3..6a919309f54 100644
--- a/erpnext/stock/doctype/stock_settings/stock_settings.js
+++ b/erpnext/stock/doctype/stock_settings/stock_settings.js
@@ -20,7 +20,9 @@ frappe.tour['Stock Settings'] = [
{
fieldname: "item_naming_by",
title: __("Item Naming By"),
- description: __("By default, the Item Name is set as per the Item Code entered. If you want Items to be named by a ") + "Naming Series" + __(" choose the 'Naming Series' option."),
+ description: __("By default, the Item Name is set as per the Item Code entered. If you want Items to be named by a") + " " +
+ "Naming Series" + " " +
+ __("choose the 'Naming Series' option."),
},
{
fieldname: "default_warehouse",
@@ -30,7 +32,9 @@ frappe.tour['Stock Settings'] = [
{
fieldname: "valuation_method",
title: __("Valuation Method"),
- description: __("Choose between FIFO and Moving Average Valuation Methods. Click ") + "here" + __(" to know more about them.")
+ description: __("Choose between FIFO and Moving Average Valuation Methods. Click") + " " +
+ "here" + " " +
+ __("to know more about them.")
},
{
fieldname: "allow_negative_stock",
From f7b747e19c322df60f7cc31ac3cf0c75bc9e29aa Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Fri, 18 Jun 2021 14:43:56 +0530
Subject: [PATCH 18/87] refactor: reduce steps, reword cards
---
erpnext/stock/doctype/item/item.js | 39 -------------------
.../purchase_receipt/purchase_receipt.js | 20 ----------
.../stock_reconciliation.js | 13 +++++++
.../stock/module_onboarding/stock/stock.json | 17 ++------
.../create_a_stock_entry.json | 7 ++--
.../create_a_warehouse.json | 7 ++--
.../stock_opening_balance.json | 9 +++--
.../stock_settings/stock_settings.json | 7 ++--
.../view_stock_balance.json | 24 ++++++++++++
.../view_stock_ledger/view_stock_ledger.json | 7 ++--
10 files changed, 62 insertions(+), 88 deletions(-)
create mode 100644 erpnext/stock/onboarding_step/view_stock_balance/view_stock_balance.json
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 5c632fc7d54..c587dd5c7ec 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -793,42 +793,3 @@ frappe.ui.form.on("UOM Conversion Detail", {
}
}
});
-
-
-frappe.tour['Item'] = [
- {
- fieldname: "item_code",
- title: __("Item Code"),
- description: __("Select an item code, this can be an SKU or a product code.") + " " +
- __("For more information click here:") + " " +
- "Item Codification" +
- __("."),
- },
- {
- fieldname: "item_name",
- title: __("Item Name"),
- description: __("Select an item name, this is the actual name of the item. You will be able to search and select an item with its name as well.")
- },
- {
- fieldname: "item_group",
- title: __("Item Group"),
- description: __("Select an item group to categorizing items under a common criteria. You can even create custom Item Groups.") + " " +
- __("For more information click here:") + " " +
- "Item Group" +
- __("."),
- },
- {
- fieldname: "stock_uom",
- title: __("Default Unit of Measure"),
- description: __("This decides the unit of measure in which stock balance will be maintained for this item.") + " " +
- __("For more information click here:") + " " +
- "Unit of Measure" +
- __("."),
- },
- {
- fieldname: "is_stock_item",
- title: __("Maintain Stock"),
- description: __("Check this field to maintain stock for this item.") + " " +
- __("Uncheck this field for non-stock items such as a service.")
- },
-];
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index 9f002f459fb..0182ed55a18 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -347,23 +347,3 @@ var validate_sample_quantity = function(frm, cdt, cdn) {
});
}
};
-
-
-frappe.tour['Purchase Receipt'] = [
- {
- fieldname: "supplier",
- title: __("Supplier"),
- description: __("This field is used to set the 'Supplier'.")
- },
- {
- fieldname: "items",
- title: __("Items"),
- description: __("This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.") + " " +
- __("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
- },
- {
- fieldname: "set_posting_time",
- title: __("Edit Posting Date and Time"),
- description: __("This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.")
- }
-]
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 84f65a077e0..49c85401ace 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -302,3 +302,16 @@ erpnext.stock.StockReconciliation = class StockReconciliation extends erpnext.st
};
cur_frm.cscript = new erpnext.stock.StockReconciliation({frm: cur_frm});
+
+frappe.tour['Stock Reconciliation'] = [
+ {
+ fieldname: "purpose",
+ title: __("Purpose"),
+ description: __("Set Purpose to Opening Stock to set the stock opening balance.")
+ },
+ {
+ fieldname: "items",
+ title: __("Items"),
+ description: __("Select the items for which the opening stock has to be set.")
+ },
+];
diff --git a/erpnext/stock/module_onboarding/stock/stock.json b/erpnext/stock/module_onboarding/stock/stock.json
index 9e91090d5b2..4503f534c7c 100644
--- a/erpnext/stock/module_onboarding/stock/stock.json
+++ b/erpnext/stock/module_onboarding/stock/stock.json
@@ -19,35 +19,26 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/stock",
"idx": 0,
"is_complete": 0,
- "modified": "2021-05-20 15:08:11.987145",
+ "modified": "2021-06-18 14:41:24.286683",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock",
"owner": "Administrator",
"steps": [
{
- "step": "Create an Item"
- },
- {
- "step": "View Warehouses"
+ "step": "Stock Settings"
},
{
"step": "Create a Warehouse"
},
- {
- "step": "Stock Settings"
- },
- {
- "step": "Introduction to Stock Entry"
- },
{
"step": "Create a Stock Entry"
},
{
- "step": "View Stock Ledger"
+ "step": "Stock Opening Balance"
},
{
- "step": "Stock Opening Balance"
+ "step": "View Stock Balance"
}
],
"subtitle": "Inventory, Warehouses, Analysis, and more.",
diff --git a/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json b/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json
index 2244c13d5de..3cb522c893d 100644
--- a/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json
+++ b/erpnext/stock/onboarding_step/create_a_stock_entry/create_a_stock_entry.json
@@ -1,20 +1,21 @@
{
"action": "Create Entry",
+ "action_label": "Create a Material Transfer Entry",
"creation": "2020-05-15 03:20:16.277043",
- "description": "# Create a Stock Entry\nA [**Stock Entry**](https://docs.erpnext.com/docs/user/manual/en/stock/stock-entry) allows you to record the movement of *Items* between *Warehouses*. \n\nIn this step we will create *Stock Entry*.",
+ "description": "# Manage Stock Movements\nStock entry allows you to register the movement of stock for various purposes like transfer, received, issues, repacked, etc. To address issues related to theft and pilferages, you can always ensure that the movement of goods happens against a document reference Stock Entry in ERPNext.\n\nLet\u2019s get a quick walk-through on the various scenarios covered in Stock Entry by watching [*this video*](https://www.youtube.com/watch?v=Njt107hlY3I).",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-05-18 15:15:26.355884",
+ "modified": "2021-06-18 13:57:11.434063",
"modified_by": "Administrator",
"name": "Create a Stock Entry",
"owner": "Administrator",
"reference_document": "Stock Entry",
"show_form_tour": 1,
"show_full_form": 1,
- "title": "Create a Stock Entry",
+ "title": "Manage Stock Movements",
"validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json b/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json
index b31b0d03d7b..0ef6c3615c4 100644
--- a/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json
+++ b/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json
@@ -1,20 +1,21 @@
{
"action": "Create Entry",
+ "action_label": "Let\u2019s create your first warehouse ",
"creation": "2021-05-17 16:13:19.297789",
- "description": "# Create a Warehouse\nIn this step we will create a [**Warehouse**](https://docs.erpnext.com/docs/user/manual/en/stock/warehouse).",
+ "description": "# Setup a Warehouse\nThe warehouse can be your location/godown/store where you maintain the item's inventory, and receive/deliver them to various parties.\n\nIn ERPNext, you can maintain a Warehouse in the tree structure, so that location and sub-location of an item can be tracked. Also, you can link a Warehouse to a specific Accounting ledger, where the real-time stock value of that warehouse\u2019s item will be reflected.",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-05-18 15:00:36.896793",
+ "modified": "2021-06-18 13:52:51.126984",
"modified_by": "Administrator",
"name": "Create a Warehouse",
"owner": "Administrator",
"reference_document": "Warehouse",
"show_form_tour": 1,
"show_full_form": 1,
- "title": "Create a Warehouse",
+ "title": "Setup a Warehouse",
"validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/stock_opening_balance/stock_opening_balance.json b/erpnext/stock/onboarding_step/stock_opening_balance/stock_opening_balance.json
index 19d6a37ba4d..48fd1fddee0 100644
--- a/erpnext/stock/onboarding_step/stock_opening_balance/stock_opening_balance.json
+++ b/erpnext/stock/onboarding_step/stock_opening_balance/stock_opening_balance.json
@@ -1,21 +1,22 @@
{
- "action": "Watch Video",
+ "action": "Create Entry",
+ "action_label": "Let\u2019s create a stock opening entry",
"creation": "2021-05-17 16:13:47.511883",
- "description": "# Stock Opening Balance\nTo set the Stock Opening Balance, you can create a [**Stock Reconciliation**](https://docs.erpnext.com/docs/user/manual/en/stock/stock-reconciliation) entry with _Purpose_ set to _Opening Balance_.\n\nFor more information you can watch the video.",
+ "description": "# Update Stock Opening Balance\nIt\u2019s an entry to update the stock balance of an item, in a warehouse, on a date and time you are going live on ERPNext.\n\nOnce opening stocks are updated, you can create transactions like manufacturing and stock deliveries, where this opening stock will be consumed.",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-05-20 15:07:19.545934",
+ "modified": "2021-06-18 13:59:36.021097",
"modified_by": "Administrator",
"name": "Stock Opening Balance",
"owner": "Administrator",
"reference_document": "Stock Reconciliation",
"show_form_tour": 1,
"show_full_form": 1,
- "title": "Stock Opening Balance",
+ "title": "Update Stock Opening Balance",
"validate_action": 1,
"video_url": "https://www.youtube.com/watch?v=nlHX0ZZ84Lw"
}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/stock_settings/stock_settings.json b/erpnext/stock/onboarding_step/stock_settings/stock_settings.json
index 096a3d2b471..f7238da3348 100644
--- a/erpnext/stock/onboarding_step/stock_settings/stock_settings.json
+++ b/erpnext/stock/onboarding_step/stock_settings/stock_settings.json
@@ -1,20 +1,21 @@
{
"action": "Show Form Tour",
+ "action_label": "Take a walk through Stock Settings",
"creation": "2020-05-15 02:53:57.209967",
- "description": "# Stock Settings\nIn this step we will view the [**Stock Settings**](https://docs.erpnext.com/docs/user/manual/en/stock/stock-settings) page, here you can set the default settings for your stock related transactions.",
+ "description": "# Review Stock Settings\n\nIn ERPNext, the Stock module\u2019s features are configurable as per your business needs. Stock Settings is the place where you can set your preferences for:\n- Default values for Item and Pricing\n- Default valuation method for inventory valuation\n- Set preference for serialization and batching of item\n- Set tolerance for over-receipt and delivery of items",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
"is_single": 1,
"is_skipped": 0,
- "modified": "2021-05-18 16:44:58.084849",
+ "modified": "2021-06-18 14:13:12.678178",
"modified_by": "Administrator",
"name": "Stock Settings",
"owner": "Administrator",
"reference_document": "Stock Settings",
"show_form_tour": 0,
"show_full_form": 0,
- "title": "Explore Stock Settings",
+ "title": "Review Stock Settings",
"validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/view_stock_balance/view_stock_balance.json b/erpnext/stock/onboarding_step/view_stock_balance/view_stock_balance.json
new file mode 100644
index 00000000000..ed5fe369459
--- /dev/null
+++ b/erpnext/stock/onboarding_step/view_stock_balance/view_stock_balance.json
@@ -0,0 +1,24 @@
+{
+ "action": "View Report",
+ "action_label": "Check Stock Balance",
+ "creation": "2021-05-17 16:15:54.617572",
+ "description": "# Check Stock Reports\nBased on the various stock transactions, you can get a host of one-click Stock Reports in ERPNext like Stock Ledger, Stock Balance, Projected Quantity, and Ageing analysis.",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2021-06-18 14:41:18.499215",
+ "modified_by": "Administrator",
+ "name": "View Stock Balance",
+ "owner": "Administrator",
+ "reference_report": "Stock Balance",
+ "report_description": "You can set the filters to narrow the results, then click on Generate New Report to see the updated report.",
+ "report_reference_doctype": "Stock Ledger Entry",
+ "report_type": "Script Report",
+ "show_form_tour": 0,
+ "show_full_form": 0,
+ "title": "Check Stock Reports",
+ "validate_action": 1
+}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json b/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json
index 13661bc9fbd..7a5f164e016 100644
--- a/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json
+++ b/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json
@@ -1,14 +1,15 @@
{
"action": "View Report",
+ "action_label": "Check Stock Ledger",
"creation": "2021-05-17 16:16:10.727959",
- "description": "# View Stock Ledger\nThe [**Stock Ledger**](https://docs.erpnext.com/docs/user/manual/en/stock/stock-ledger) is a detailed record that keeps track of stock movements for a company. \n\nIn this step we will view the *Stock Ledger*.",
+ "description": "# Check Stock Reports\nBased on the various stock transactions, you can get a host of one-click Stock Reports in ERPNext like Stock Ledger, Stock Balance, Projected Quantity, and Ageing analysis.",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-05-18 16:16:38.150079",
+ "modified": "2021-06-18 14:09:39.399311",
"modified_by": "Administrator",
"name": "View Stock Ledger",
"owner": "Administrator",
@@ -18,6 +19,6 @@
"report_type": "Script Report",
"show_form_tour": 0,
"show_full_form": 0,
- "title": "View Stock Ledger",
+ "title": "Check Stock Reports",
"validate_action": 1
}
\ No newline at end of file
From ecd6584c50718adb6bae1da3de0d66a2b7d3985b Mon Sep 17 00:00:00 2001
From: Afshan <33727827+AfshanKhan@users.noreply.github.com>
Date: Thu, 19 Aug 2021 12:18:27 +0530
Subject: [PATCH 19/87] fix: assigning values to rows in sales register reports
(#26546)
* fix: assigning values to rows in sales register reports
* fix: check for is_internal_customer for unrealized_profit_loss_account
---
erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 1 +
.../item_wise_sales_register/item_wise_sales_register.py | 3 ++-
erpnext/accounts/report/sales_register/sales_register.py | 5 +++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 7dfe77db55f..b65b101051d 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -1934,6 +1934,7 @@
"description": "Unrealized Profit / Loss account for intra-company transfers",
"fieldname": "unrealized_profit_loss_account",
"fieldtype": "Link",
+ "ignore_user_permissions": 1,
"label": "Unrealized Profit / Loss Account",
"options": "Account"
},
diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
index 2e794da8425..08065a204ef 100644
--- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
+++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
@@ -76,7 +76,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
'company': d.company,
'sales_order': d.sales_order,
'delivery_note': d.delivery_note,
- 'income_account': d.unrealized_profit_loss_account or d.income_account,
+ 'income_account': d.unrealized_profit_loss_account if d.is_internal_customer == 1 else d.income_account,
'cost_center': d.cost_center,
'stock_qty': d.stock_qty,
'stock_uom': d.stock_uom
@@ -380,6 +380,7 @@ def get_items(filters, additional_query_columns):
`tabSales Invoice Item`.name, `tabSales Invoice Item`.parent,
`tabSales Invoice`.posting_date, `tabSales Invoice`.debit_to,
`tabSales Invoice`.unrealized_profit_loss_account,
+ `tabSales Invoice`.is_internal_customer,
`tabSales Invoice`.project, `tabSales Invoice`.customer, `tabSales Invoice`.remarks,
`tabSales Invoice`.territory, `tabSales Invoice`.company, `tabSales Invoice`.base_net_total,
`tabSales Invoice Item`.item_code, `tabSales Invoice Item`.description,
diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py
index 909959323f7..f38bd78c0d2 100644
--- a/erpnext/accounts/report/sales_register/sales_register.py
+++ b/erpnext/accounts/report/sales_register/sales_register.py
@@ -84,7 +84,7 @@ def _execute(filters, additional_table_columns=None, additional_query_columns=No
# Add amount in unrealized account
for account in unrealized_profit_loss_accounts:
row.update({
- frappe.scrub(account): flt(internal_invoice_map.get((inv.name, account)))
+ frappe.scrub(account+"_unrealized"): flt(internal_invoice_map.get((inv.name, account)))
})
# net total
@@ -258,6 +258,7 @@ def get_columns(invoice_list, additional_table_columns):
unrealized_profit_loss_accounts = frappe.db.sql_list("""SELECT distinct unrealized_profit_loss_account
from `tabSales Invoice` where docstatus = 1 and name in (%s)
+ and is_internal_customer = 1
and ifnull(unrealized_profit_loss_account, '') != ''
order by unrealized_profit_loss_account""" %
', '.join(['%s']*len(invoice_list)), tuple(inv.name for inv in invoice_list))
@@ -284,7 +285,7 @@ def get_columns(invoice_list, additional_table_columns):
for account in unrealized_profit_loss_accounts:
unrealized_profit_loss_account_columns.append({
"label": account,
- "fieldname": frappe.scrub(account),
+ "fieldname": frappe.scrub(account+"_unrealized"),
"fieldtype": "Currency",
"options": "currency",
"width": 120
From 4551d7d6029b6f587f6c99d4f8df5519241c6a86 Mon Sep 17 00:00:00 2001
From: Ankush Menat
Date: Thu, 19 Aug 2021 13:41:10 +0530
Subject: [PATCH 20/87] chore: mass trailing whitespace and EOF fixes
---
erpnext/.stylelintrc | 2 +-
.../account_balance_timeline.js | 2 +-
erpnext/accounts/deferred_revenue.py | 2 -
.../accounting_dimension.js | 2 +-
.../test_accounting_dimension.py | 2 -
.../accounting_dimension_filter.js | 2 +-
.../accounting_period/accounting_period.py | 2 +-
.../accounts_settings/accounts_settings.js | 2 +-
.../accounts_settings/accounts_settings.py | 4 +-
.../regional/united_states.js | 2 +-
erpnext/accounts/doctype/bank/bank.js | 2 +-
erpnext/accounts/doctype/bank/bank.py | 2 +-
.../bank_account/bank_account_dashboard.py | 2 +-
.../doctype/bank_clearance/bank_clearance.js | 2 +-
.../bank_clearance_detail.py | 2 +-
.../doctype/bank_guarantee/bank_guarantee.py | 2 +-
.../bank_transaction/bank_transaction.py | 1 -
.../bank_transaction/bank_transaction_list.js | 2 +-
.../bank_transaction_upload.py | 2 +-
.../c_form_invoice_detail.py | 2 +-
.../cash_flow_mapping/cash_flow_mapping.py | 2 -
.../cashier_closing/cashier_closing.py | 2 +-
.../cheque_print_template.js | 10 +--
.../doctype/cost_center/cost_center.py | 2 +-
.../cost_center/cost_center_dashboard.py | 2 +-
.../doctype/cost_center/cost_center_tree.js | 2 +-
.../doctype/cost_center/test_cost_center.py | 3 -
.../doctype/coupon_code/coupon_code.py | 2 +-
.../doctype/coupon_code/test_coupon_code.py | 3 -
.../discounted_invoice/discounted_invoice.py | 2 +-
.../doctype/dunning/dunning_dashboard.py | 2 +-
.../accounts/doctype/dunning/test_dunning.py | 2 +-
.../exchange_rate_revaluation.js | 4 +-
.../exchange_rate_revaluation.py | 4 +-
.../doctype/finance_book/test_finance_book.py | 2 +-
.../invoice_discounting_dashboard.py | 2 +-
.../invoice_discounting_list.js | 2 +-
.../doctype/journal_entry/regional/india.js | 2 +-
.../journal_entry/test_journal_entry.py | 2 +-
.../journal_entry_template.js | 2 +-
.../mode_of_payment/mode_of_payment.js | 2 +-
.../mode_of_payment/mode_of_payment.py | 1 -
.../monthly_distribution.py | 2 +-
.../monthly_distribution_dashboard.py | 2 +-
.../opening_invoice_creation_tool.js | 2 +-
.../opening_invoice_creation_tool.py | 1 -
.../doctype/payment_entry/payment_entry.py | 6 +-
.../payment_entry/payment_entry_list.js | 2 +-
.../test_payment_against_purchase_invoice.js | 2 +-
.../payment_entry/tests/test_payment_entry.js | 2 +-
.../tests/test_payment_entry_write_off.js | 2 +-
.../payment_gateway_account.py | 10 +--
.../doctype/payment_order/payment_order.js | 2 +-
.../payment_order/payment_order_dashboard.py | 2 +-
.../payment_order/test_payment_order.py | 2 +-
.../payment_reconciliation.py | 2 +-
.../payment_request/payment_request.py | 2 +-
.../payment_request/test_payment_request.py | 2 +-
.../doctype/payment_term/payment_term.js | 2 +-
.../payment_terms_template.js | 2 +-
.../payment_terms_template_dashboard.py | 2 +-
.../period_closing_voucher.py | 4 +-
.../test_period_closing_voucher.py | 2 +-
.../pos_closing_entry/pos_closing_entry.js | 6 +-
.../pos_invoice_merge_log.js | 6 +-
.../pos_invoice_merge_log.py | 2 +-
.../test_pos_invoice_merge_log.py | 1 -
.../pos_opening_entry/pos_opening_entry.js | 2 +-
.../pos_opening_entry/pos_opening_entry.py | 2 +-
.../test_pos_opening_entry.py | 6 +-
.../doctype/pos_settings/pos_settings.py | 2 +-
.../doctype/pricing_rule/test_pricing_rule.py | 2 +-
.../pricing_rule/tests/test_pricing_rule.js | 1 -
.../process_deferred_accounting.py | 2 +-
.../test_process_deferred_accounting.py | 2 +-
.../process_statement_of_accounts.py | 2 +-
.../promotional_scheme/promotional_scheme.js | 2 +-
.../promotional_scheme_dashboard.py | 2 +-
.../test_promotional_scheme.py | 12 +--
.../purchase_invoice/purchase_invoice.js | 2 +-
.../purchase_invoice_dashboard.py | 2 +-
.../purchase_invoice/purchase_invoice_list.js | 2 +-
.../purchase_invoice/test_purchase_invoice.js | 1 -
.../purchase_invoice_advance.py | 2 +-
.../purchase_taxes_and_charges.py | 2 +-
...se_taxes_and_charges_template_dashboard.py | 2 +-
...est_purchase_taxes_and_charges_template.js | 1 -
.../sales_invoice/regional/india_list.js | 8 +-
.../doctype/sales_invoice/regional/italy.js | 2 +-
.../sales_invoice/sales_invoice_dashboard.py | 2 +-
.../sales_invoice/tests/test_sales_invoice.js | 1 -
.../tests/test_sales_invoice_with_margin.js | 1 -
.../tests/test_sales_invoice_with_payment.js | 1 -
...test_sales_invoice_with_payment_request.js | 1 -
.../test_sales_invoice_with_serialize_item.js | 1 -
.../sales_invoice_advance.py | 2 +-
.../sales_taxes_and_charges.py | 2 +-
...es_taxes_and_charges_template_dashboard.py | 2 +-
.../test_sales_taxes_and_charges_template.js | 1 -
.../doctype/share_transfer/share_transfer.js | 2 +-
.../doctype/share_transfer/share_transfer.py | 2 +-
.../shipping_rule/test_shipping_rule.js | 1 -
.../tests/test_shipping_rule_for_buying.js | 1 -
.../shipping_rule_condition.py | 2 +-
.../doctype/subscription/subscription_list.js | 2 +-
.../doctype/subscription/test_subscription.py | 2 -
.../subscription_plan/subscription_plan.js | 2 +-
.../subscription_plan/subscription_plan.py | 2 +-
erpnext/accounts/doctype/tax_rule/tax_rule.py | 2 +-
.../tax_withholding_category.py | 4 +-
.../test_tax_withholding_category.py | 2 +-
.../bank_and_cash_payment_voucher.html | 2 +-
.../gst_e_invoice/gst_e_invoice.html | 2 +-
.../journal_auditing_voucher.html | 2 +-
.../payment_receipt_voucher.html | 1 -
.../purchase_auditing_voucher.html | 2 +-
.../sales_auditing_voucher.html | 2 +-
.../account_balance/test_account_balance.py | 5 --
.../accounts_payable/accounts_payable.js | 1 -
.../accounts_payable_summary.js | 1 -
.../accounts_payable_summary.py | 1 -
.../accounts_receivable.js | 1 -
.../test_accounts_receivable.py | 1 -
.../accounts_receivable_summary.py | 2 +-
.../report/balance_sheet/balance_sheet.py | 2 +-
.../bank_clearance_summary.js | 2 +-
.../bank_clearance_summary.py | 12 +--
.../bank_reconciliation_statement.js | 2 +-
.../billed_items_to_be_received.py | 2 +-
.../budget_variance_report.js | 1 -
.../budget_variance_report.py | 5 +-
.../accounts/report/cash_flow/cash_flow.html | 2 +-
.../accounts/report/cash_flow/cash_flow.js | 2 +-
.../consolidated_financial_statement.js | 6 +-
.../delivered_items_to_be_billed.py | 2 +-
.../report/general_ledger/general_ledger.js | 1 -
.../report/general_ledger/general_ledger.py | 4 +-
.../gross_and_net_profit_report.html | 2 +-
.../gross_and_net_profit_report.py | 2 +-
.../item_wise_sales_register.py | 4 -
erpnext/accounts/report/non_billed_report.py | 2 +-
.../payment_period_based_on_invoice_date.py | 2 +-
.../report/pos_register/pos_register.py | 30 ++++----
.../profitability_analysis.html | 2 +-
.../purchase_invoice_trends.js | 2 +-
.../purchase_invoice_trends.py | 2 +-
.../purchase_register/purchase_register.js | 2 +-
.../received_items_to_be_billed.py | 2 +-
.../sales_invoice_trends.js | 2 +-
.../sales_payment_summary.js | 2 +-
.../test_sales_payment_summary.py | 2 +-
.../report/sales_register/sales_register.js | 1 -
.../supplier_ledger_summary.py | 2 +-
.../report/trial_balance/trial_balance.js | 3 -
.../report/trial_balance/trial_balance.py | 2 +-
.../trial_balance_for_party.py | 2 +-
.../unpaid_expense_claim.py | 4 +-
erpnext/agriculture/doctype/crop/crop.js | 2 +-
.../doctype/crop/crop_dashboard.py | 2 +-
erpnext/agriculture/doctype/crop/test_crop.js | 2 +-
erpnext/agriculture/doctype/crop/test_crop.py | 2 +-
.../doctype/crop_cycle/test_crop_cycle.js | 2 +-
.../agriculture/doctype/disease/disease.py | 2 +-
.../doctype/disease/test_disease.js | 1 -
.../doctype/disease/test_disease.py | 2 +-
.../doctype/fertilizer/fertilizer.py | 2 +-
.../doctype/fertilizer/test_fertilizer.py | 2 +-
.../doctype/plant_analysis/plant_analysis.py | 2 +-
.../doctype/soil_analysis/soil_analysis.py | 2 +-
.../doctype/soil_texture/test_soil_texture.py | 2 +-
.../doctype/water_analysis/water_analysis.py | 2 +-
erpnext/agriculture/setup.py | 2 +-
erpnext/assets/dashboard_fixtures.py | 2 +-
erpnext/assets/doctype/asset/asset.js | 4 +-
.../assets/doctype/asset/asset_dashboard.py | 2 +-
erpnext/assets/doctype/asset/asset_list.js | 2 +-
erpnext/assets/doctype/asset/test_asset.py | 2 +-
.../doctype/asset_category/asset_category.py | 12 +--
.../asset_category/test_asset_category.py | 8 +-
.../asset_maintenance/asset_maintenance.js | 2 +-
.../asset_maintenance/asset_maintenance.py | 2 +-
.../test_asset_maintenance.py | 6 +-
.../asset_maintenance_log.js | 2 +-
.../doctype/asset_movement/asset_movement.js | 2 +-
.../doctype/asset_movement/asset_movement.py | 16 ++--
.../doctype/asset_repair/asset_repair.js | 4 +-
.../doctype/asset_repair/asset_repair.py | 10 +--
.../doctype/asset_repair/asset_repair_list.js | 1 -
.../doctype/asset_repair/test_asset_repair.py | 8 +-
.../test_asset_value_adjustment.py | 2 +-
.../assets/doctype/location/location_tree.js | 2 +-
.../fixed_asset_register.js | 2 +-
.../fixed_asset_register.py | 4 +-
.../buying_settings/buying_settings.js | 2 +-
.../doctype/purchase_order/purchase_order.py | 2 +-
.../doctype/purchase_order/regional/india.js | 2 +-
.../purchase_order/test_purchase_order.py | 2 +-
.../tests/test_purchase_order.js | 2 +-
.../tests/test_purchase_order_get_items.js | 2 +-
...hase_order_with_discount_on_grand_total.js | 2 +-
..._purchase_order_with_item_wise_discount.js | 2 +-
.../test_purchase_order_with_multi_uom.js | 2 +-
.../test_purchase_order_with_shipping_rule.js | 2 +-
...t_purchase_order_with_taxes_and_charges.js | 2 +-
.../purchase_order_item.py | 2 +-
.../purchase_order_item_supplied.py | 2 +-
.../purchase_receipt_item_supplied.py | 2 +-
.../request_for_quotation.py | 2 +-
.../request_for_quotation_dashboard.py | 2 +-
.../tests/test_request_for_quotation.js | 2 +-
.../test_request_for_quotation_for_status.js | 2 +-
.../buying/doctype/supplier/regional/india.js | 2 +-
.../buying/doctype/supplier/test_supplier.js | 2 +-
.../supplier_item_group.py | 2 +-
.../supplier_quotation/supplier_quotation.py | 2 +-
.../tests/test_supplier_quotation.js | 2 +-
...pplier_quotation_for_item_wise_discount.js | 2 +-
...upplier_quotation_for_taxes_and_charges.js | 2 +-
.../supplier_scorecard/supplier_scorecard.js | 2 -
.../supplier_scorecard_dashboard.py | 2 +-
.../test_supplier_scorecard.py | 1 -
.../test_supplier_scorecard_criteria.py | 2 +-
.../supplier_scorecard_period.py | 1 -
.../supplier_scorecard_standing.py | 2 +-
.../supplier_scorecard_variable.py | 2 +-
.../test_supplier_scorecard_variable.py | 2 +-
.../procurement_tracker.py | 2 +-
.../test_procurement_tracker.py | 2 +-
.../purchase_order_analysis.py | 1 -
.../purchase_order_trends.js | 2 +-
.../purchase_order_trends.py | 2 +-
.../subcontract_order_summary.py | 2 +-
.../test_subcontracted_item_to_be_received.py | 2 +-
...tracted_raw_materials_to_be_transferred.py | 2 +-
.../supplier_quotation_comparison.html | 2 +-
.../supplier_quotation_comparison.js | 2 +-
.../supplier_quotation_comparison.py | 2 +-
erpnext/buying/utils.py | 1 -
erpnext/commands/__init__.py | 2 +-
erpnext/controllers/accounts_controller.py | 22 +++---
erpnext/controllers/item_variant.py | 1 -
erpnext/controllers/subcontracting.py | 2 +-
.../crm/doctype/appointment/appointment.py | 1 -
.../appointment_booking_settings.js | 2 +-
erpnext/crm/doctype/contract/contract.js | 4 +-
erpnext/crm/doctype/contract/contract_list.js | 2 +-
.../contract_template/contract_template.py | 6 +-
erpnext/crm/doctype/lead/lead.py | 2 +-
erpnext/crm/doctype/lead/lead_dashboard.py | 2 +-
erpnext/crm/doctype/lead/test_lead.py | 2 +-
.../crm/doctype/opportunity/opportunity.js | 2 +-
.../crm/doctype/opportunity/opportunity.py | 2 +-
.../opportunity/opportunity_dashboard.py | 2 +-
.../doctype/opportunity/test_opportunity.py | 2 +-
.../social_media_post/social_media_post.js | 6 +-
.../campaign_efficiency.js | 1 -
.../campaign_efficiency.py | 2 +-
.../lead_conversion_time.js | 2 -
.../crm/report/lead_details/lead_details.js | 2 +-
.../crm/report/lead_details/lead_details.py | 7 +-
.../lost_opportunity/lost_opportunity.js | 2 +-
.../lost_opportunity/lost_opportunity.py | 26 +++----
.../prospects_engaged_but_not_converted.py | 2 +-
erpnext/demo/domains.py | 2 +-
erpnext/demo/user/education.py | 12 +--
erpnext/domains/agriculture.py | 2 +-
erpnext/domains/education.py | 2 +-
erpnext/domains/manufacturing.py | 2 +-
erpnext/domains/non_profit.py | 2 +-
erpnext/domains/services.py | 2 +-
.../doctype/academic_term/academic_term.py | 4 +-
.../academic_term/academic_term_dashboard.py | 2 +-
.../academic_term/test_academic_term.js | 2 +-
.../doctype/academic_year/academic_year.js | 2 +-
.../academic_year/academic_year_dashboard.py | 2 +-
.../academic_year/test_academic_year.js | 2 +-
erpnext/education/doctype/article/article.js | 2 +-
erpnext/education/doctype/article/article.py | 2 +-
.../assessment_criteria.py | 2 +-
.../test_assessment_criteria.js | 2 +-
.../test_assessment_criteria_group.js | 2 +-
.../assessment_group_dashboard.py | 2 +-
.../assessment_group/assessment_group_tree.js | 4 +-
.../assessment_group/test_assessment_group.js | 2 +-
.../assessment_plan/assessment_plan.js | 2 +-
.../assessment_plan_dashboard.py | 2 +-
.../assessment_result/assessment_result.js | 2 +-
.../assessment_result/assessment_result.py | 4 -
.../assessment_result_dashboard.py | 2 +-
.../test_assessment_result.js | 2 +-
.../test_assessment_result.py | 1 -
.../assessment_result_tool.py | 2 +-
.../test_assessment_result_tool.js | 2 +-
erpnext/education/doctype/course/course.js | 2 +-
erpnext/education/doctype/course/course.py | 2 +-
.../doctype/course/course_dashboard.py | 2 +-
.../education/doctype/course/test_course.js | 2 +-
.../course_activity/course_activity.py | 2 +-
.../course_enrollment_dashboard.py | 2 +-
.../test_course_enrollment.py | 3 -
.../course_schedule/course_schedule.js | 2 +-
.../course_schedule/course_schedule.py | 13 ++--
.../course_schedule_dashboard.py | 2 +-
.../course_schedule/test_course_schedule.py | 20 ++---
.../course_scheduling_tool.js | 2 +-
.../education_settings/education_settings.py | 2 +-
.../doctype/fee_schedule/fee_schedule.js | 2 +-
.../fee_schedule/fee_schedule_dashboard.py | 2 +-
.../doctype/fee_structure/fee_structure.js | 2 +-
.../doctype/fee_structure/fee_structure.py | 6 +-
.../fee_structure/fee_structure_dashboard.py | 2 +-
erpnext/education/doctype/fees/fees.py | 2 +-
erpnext/education/doctype/fees/fees_list.js | 2 +-
.../doctype/grading_scale/grading_scale.py | 2 +-
.../grading_scale/test_grading_scale.js | 2 +-
.../doctype/guardian/test_guardian.js | 2 +-
.../doctype/instructor/instructor.js | 2 +-
.../instructor/instructor_dashboard.py | 2 +-
erpnext/education/doctype/program/program.js | 4 +-
erpnext/education/doctype/program/program.py | 2 +-
.../doctype/program/program_dashboard.py | 2 +-
.../education/doctype/program/test_program.js | 2 +-
.../education/doctype/program/test_program.py | 2 +-
.../program_enrollment/program_enrollment.js | 2 +-
.../program_enrollment/program_enrollment.py | 1 -
.../program_enrollment_dashboard.py | 2 +-
.../test_program_enrollment.py | 2 +-
.../education/doctype/question/question.py | 2 +-
erpnext/education/doctype/quiz/quiz.js | 2 +-
erpnext/education/doctype/quiz/quiz.py | 2 +-
erpnext/education/doctype/room/room.js | 2 +-
.../education/doctype/room/room_dashboard.py | 2 +-
erpnext/education/doctype/student/student.js | 2 +-
.../education/doctype/student/student_list.js | 2 +-
.../education/doctype/student/test_student.py | 2 +-
.../templates/student_admission_row.html | 2 +-
.../test_student_admission.js | 2 +-
.../student_applicant/student_applicant.js | 2 +-
.../student_applicant/student_applicant.py | 2 +-
.../student_applicant_list.js | 2 +-
.../tests/test_student_applicant.js | 2 +-
.../test_student_applicant_dummy_data.js | 2 +-
.../tests/test_student_applicant_options.js | 2 +-
.../student_attendance/student_attendance.js | 2 +-
.../student_attendance_dashboard.py | 2 +-
.../student_attendance_list.js | 2 +-
.../test_student_attendance.js | 2 +-
.../student_attendance_tool.py | 2 +-
.../test_student_attendance_tool.js | 2 +-
.../doctype/student_group/student_group.js | 2 +-
.../doctype/student_group/student_group.py | 1 -
.../student_group/student_group_dashboard.py | 2 +-
.../student_group/test_student_group.js | 2 +-
.../student_group_creation_tool.js | 2 +-
.../student_group_creation_tool.py | 2 +-
.../test_student_group_creation_tool.js | 2 +-
.../student_group_student.py | 2 +-
.../student_leave_application_dashboard.py | 2 +-
.../test_student_leave_application.js | 2 +-
.../test_student_leave_application.py | 2 +-
.../doctype/student_log/test_student_log.js | 2 +-
.../student_report_generation_tool.html | 74 +++++++++----------
erpnext/education/doctype/topic/topic.js | 2 +-
erpnext/education/doctype/topic/topic.py | 2 +-
.../program_wise_fee_collection.py | 1 -
.../student_batch_wise_attendance.js | 2 +-
.../student_batch_wise_attendance.py | 2 +-
.../student_monthly_attendance_sheet.js | 2 +-
.../student_applicant/student_applicant.js | 2 +-
.../amazon_mws_settings.js | 1 -
.../doctype/amazon_mws_settings/xml_utils.py | 2 +-
.../exotel_settings/exotel_settings.py | 2 +-
.../mpesa_settings/account_balance.html | 2 +-
.../doctype/mpesa_settings/mpesa_connector.py | 2 +-
.../mpesa_settings/mpesa_custom_fields.py | 2 +-
.../doctype/mpesa_settings/mpesa_settings.py | 2 +-
.../mpesa_settings/test_mpesa_settings.py | 2 +-
.../doctype/plaid_settings/plaid_connector.py | 2 +-
.../doctype/plaid_settings/plaid_settings.js | 2 +-
.../doctype/plaid_settings/plaid_settings.py | 2 +-
.../tally_migration/tally_migration.js | 2 +-
.../woocommerce_settings.py | 4 +-
.../stripe_integration.py | 2 +-
erpnext/erpnext_integrations/utils.py | 2 +-
.../department_wise_patient_appointments.js | 2 +-
.../department_wise_patient_appointments.py | 2 +-
.../appointment_type/appointment_type.js | 2 +-
.../test_clinical_procedure.py | 2 +-
.../clinical_procedure_template.js | 1 -
.../clinical_procedure_template.py | 1 -
.../doctype/exercise_type/exercise_type.py | 1 -
.../doctype/fee_validity/fee_validity.py | 2 +-
.../doctype/fee_validity/test_fee_validity.py | 2 +-
.../healthcare_practitioner.js | 1 -
.../test_healthcare_service_unit_type.py | 2 +-
.../test_inpatient_medication_entry.py | 2 +-
.../test_inpatient_medication_order.py | 1 -
.../test_patient_appointment.py | 2 +-
.../patient_assessment/patient_assessment.py | 3 -
.../patient_encounter/patient_encounter.py | 2 +-
.../patient_history_settings.py | 2 +-
.../test_patient_medical_record.py | 2 +-
.../therapy_plan_template.py | 2 +-
.../therapy_session/therapy_session.js | 2 +-
.../doctype/therapy_type/test_therapy_type.py | 2 +-
.../doctype/vital_signs/vital_signs.py | 1 -
.../page/patient_history/patient_history.html | 2 +-
.../patient_progress/patient_progress.html | 2 +-
.../page/patient_progress/patient_progress.js | 2 +-
.../page/patient_progress/patient_progress.py | 1 -
.../patient_progress_sidebar.html | 2 +-
.../inpatient_medication_orders.py | 2 +-
.../patient_appointment_analytics.py | 2 +-
erpnext/healthcare/setup.py | 2 +-
.../patient_registration.js | 2 +-
.../hotels/doctype/hotel_room/hotel_room.py | 2 +-
.../hotel_room_reservation_calendar.js | 2 +-
.../hotel_room_occupancy.py | 2 +-
erpnext/hr/doctype/appraisal/appraisal.js | 2 +-
.../hr/doctype/appraisal/test_appraisal.js | 1 -
.../doctype/appraisal_goal/appraisal_goal.py | 2 +-
.../appraisal_template_dashboard.py | 2 +-
.../test_appraisal_template.js | 1 -
.../appraisal_template_goal.py | 2 +-
.../doctype/attendance/attendance_calendar.js | 2 +-
.../hr/doctype/attendance/test_attendance.js | 2 +-
.../attendance_request_dashboard.py | 2 +-
erpnext/hr/doctype/branch/branch.py | 2 +-
erpnext/hr/doctype/branch/test_branch.js | 2 +-
erpnext/hr/doctype/branch/test_branch.py | 2 +-
.../test_daily_work_summary.js | 2 +-
.../hr/doctype/department/department_tree.js | 2 +-
.../hr/doctype/department/test_department.js | 2 +-
.../hr/doctype/department/test_department.py | 2 +-
erpnext/hr/doctype/designation/designation.py | 2 +-
.../doctype/designation/test_designation.js | 2 +-
.../doctype/designation/test_designation.py | 2 +-
erpnext/hr/doctype/employee/employee.py | 2 +-
erpnext/hr/doctype/employee/employee_tree.js | 2 +-
erpnext/hr/doctype/employee/test_employee.js | 2 +-
.../employee_advance/test_employee_advance.py | 2 +-
.../employee_attendance_tool.css | 2 +-
.../employee_attendance_tool.js | 2 -
.../test_employee_attendance_tool.js | 2 +-
.../employee_checkin/employee_checkin.py | 1 -
.../employee_checkin/test_employee_checkin.py | 4 +-
.../employee_education/employee_education.py | 2 +-
.../employee_external_work_history.py | 2 +-
.../employee_grade_dashboard.py | 2 +-
.../employee_grievance/employee_grievance.py | 1 -
.../employee_grievance_list.js | 2 +-
.../test_employee_grievance.py | 1 -
.../employee_group/test_employee_group.py | 2 +-
.../employee_internal_work_history.py | 2 +-
.../employee_onboarding.py | 1 -
.../test_employee_onboarding.py | 2 +-
.../employee_onboarding_template_dashboard.py | 2 +-
.../employee_referral/employee_referral.py | 1 -
.../employee_referral_dashboard.py | 2 +-
.../employee_referral_list.js | 2 +-
.../test_employee_referral.py | 2 +-
.../test_employee_separation.py | 2 +-
.../employee_separation_template_dashboard.py | 2 +-
.../employment_type/employment_type.py | 2 +-
.../employment_type/test_employment_type.js | 2 +-
.../employment_type/test_employment_type.py | 2 +-
.../hr/doctype/expense_claim/expense_claim.js | 2 +-
.../expense_claim/expense_claim_dashboard.py | 2 +-
.../expense_claim/test_expense_claim.js | 1 -
.../expense_claim/test_expense_claim.py | 2 +-
.../expense_claim_detail.py | 2 +-
.../expense_claim_type/expense_claim_type.py | 2 +-
.../test_expense_claim_type.js | 1 -
erpnext/hr/doctype/holiday/holiday.py | 2 +-
.../holiday_list/holiday_list_dashboard.py | 2 +-
.../doctype/holiday_list/test_holiday_list.js | 2 +-
erpnext/hr/doctype/hr_settings/hr_settings.js | 2 +-
erpnext/hr/doctype/hr_settings/hr_settings.py | 1 -
.../hr/doctype/job_applicant/job_applicant.js | 2 +-
.../hr/doctype/job_applicant/job_applicant.py | 1 -
.../job_applicant/job_applicant_dashboard.py | 2 +-
.../job_applicant/test_job_applicant.js | 1 -
.../hr/doctype/job_offer/test_job_offer.js | 2 +-
.../hr/doctype/job_offer/test_job_offer.py | 2 +-
.../job_opening/job_opening_dashboard.py | 2 +-
.../templates/job_opening_row.html | 6 +-
.../doctype/job_opening/test_job_opening.js | 1 -
.../leave_allocation/leave_allocation.js | 2 +-
.../leave_allocation_dashboard.py | 2 +-
.../leave_allocation/test_leave_allocation.js | 2 +-
.../leave_application_calendar.js | 2 +-
.../leave_application_dashboard.py | 2 +-
.../leave_application_email_template.html | 2 +-
.../test_leave_application.js | 2 +-
.../leave_block_list_dashboard.py | 2 +-
.../leave_block_list/test_leave_block_list.js | 2 +-
.../leave_block_list_allow.py | 2 +-
.../leave_block_list_date.py | 2 +-
.../leave_control_panel.js | 2 +-
.../test_leave_control_panel.js | 2 +-
.../leave_encashment/leave_encashment.py | 2 +-
.../leave_ledger_entry/leave_ledger_entry.py | 2 +-
.../leave_period/leave_period_dashboard.py | 2 +-
.../doctype/leave_period/test_leave_period.py | 2 +-
.../leave_policy/leave_policy_dashboard.py | 2 +-
.../doctype/leave_policy/test_leave_policy.py | 2 +-
.../leave_policy_assignment_dashboard.py | 2 +-
.../leave_policy_assignment_list.js | 2 +-
.../test_leave_policy_assignment.py | 2 -
.../leave_type/leave_type_dashboard.py | 2 +-
.../hr/doctype/leave_type/test_leave_type.js | 2 +-
.../hr/doctype/leave_type/test_leave_type.py | 2 +-
.../shift_assignment_calendar.js | 2 +-
.../shift_assignment/test_shift_assignment.py | 2 +-
.../hr/doctype/shift_request/shift_request.py | 2 +-
.../shift_request/shift_request_dashboard.py | 2 +-
.../shift_request/test_shift_request.py | 2 +-
.../staffing_plan/staffing_plan_dashboard.py | 2 +-
.../staffing_plan/test_staffing_plan.py | 2 +-
.../training_event/test_training_event.py | 2 +-
.../tests/test_training_event.js | 2 +-
.../doctype/training_event/training_event.js | 1 -
.../training_event_dashboard.py | 2 +-
.../test_training_feedback.js | 1 -
.../test_training_feedback.py | 2 +-
.../training_feedback/training_feedback.js | 2 +-
.../training_feedback/training_feedback.py | 1 -
.../training_program/training_program.js | 2 +-
.../training_program_dashboard.py | 2 +-
.../training_result/training_result.js | 2 +-
.../test_training_result.js | 1 -
.../hr/doctype/vehicle/vehicle_dashboard.py | 2 +-
.../doctype/vehicle_log/test_vehicle_log.py | 2 +-
erpnext/hr/doctype/vehicle_log/vehicle_log.js | 1 -
.../training_feedback/training_feedback.html | 2 +-
.../training_scheduled.html | 2 +-
.../organizational_chart.js | 2 +-
.../organizational_chart.py | 2 +-
erpnext/hr/page/team_updates/team_updates.py | 2 +-
.../standard_appointment_letter.html | 2 +-
.../daily_work_summary_replies.py | 2 +-
.../employee_advance_summary.js | 1 -
.../employee_analytics/employee_analytics.py | 1 -
.../employee_birthday/employee_birthday.js | 4 +-
.../recruitment_analytics.js | 2 +-
.../vehicle_expenses/vehicle_expenses.js | 1 -
erpnext/hr/utils.py | 2 +-
.../job_application/job_application.js | 2 +-
.../top_10_pledged_loan_securities.js | 2 +-
.../top_10_pledged_loan_securities.py | 2 +-
.../doctype/loan/loan_dashboard.py | 2 +-
.../loan_management/doctype/loan/test_loan.py | 2 +-
.../loan_application_dashboard.py | 2 +-
.../loan_disbursement/loan_disbursement.py | 2 -
.../loan_interest_accrual.py | 1 -
.../doctype/loan_repayment/loan_repayment.py | 3 -
.../loan_security/loan_security_dashboard.py | 2 +-
.../loan_security_pledge.js | 2 +-
.../loan_security_price.py | 9 ---
.../loan_security_shortfall.py | 1 -
.../loan_security_type_dashboard.py | 2 +-
.../loan_security_unpledge.py | 5 --
.../doctype/loan_type/loan_type.py | 1 -
.../doctype/loan_type/loan_type_dashboard.py | 2 +-
.../doctype/loan_write_off/loan_write_off.py | 2 -
.../process_loan_interest_accrual.py | 1 -
...process_loan_interest_accrual_dashboard.py | 2 +-
...ocess_loan_security_shortfall_dashboard.py | 2 +-
erpnext/loan_management/loan_common.js | 2 +-
.../applicant_wise_loan_security_exposure.py | 2 +-
.../loan_interest_report.py | 2 +-
.../loan_repayment_and_closure.py | 2 +-
.../loan_security_exposure.py | 3 -
.../maintenance_schedule.js | 9 +--
.../maintenance_schedule.py | 14 ++--
.../test_maintenance_schedule.py | 4 +-
.../maintenance_visit/maintenance_visit.py | 4 +-
.../doctype/blanket_order/blanket_order.js | 2 -
.../doctype/blanket_order/blanket_order.py | 2 +-
.../blanket_order/test_blanket_order.py | 2 +-
.../doctype/bom/bom_item_preview.html | 2 +-
erpnext/manufacturing/doctype/bom/bom_tree.js | 2 +-
erpnext/manufacturing/doctype/bom/test_bom.js | 2 +-
.../bom_explosion_item/bom_explosion_item.py | 2 +-
.../doctype/bom_item/bom_item.py | 2 +-
.../doctype/bom_operation/bom_operation.py | 2 +-
.../bom_update_tool/bom_update_tool.js | 2 +-
.../doctype/job_card/job_card.js | 2 +-
.../doctype/job_card/job_card_list.js | 2 +-
.../doctype/job_card/test_job_card.py | 2 +-
.../manufacturing_settings.js | 2 +-
.../manufacturing_settings.py | 2 +-
.../doctype/operation/operation.js | 2 +-
.../doctype/operation/test_operation.py | 2 +-
.../production_plan_dashboard.py | 2 +-
.../production_plan_item.py | 2 +-
.../production_plan_sales_order.py | 2 +-
.../doctype/routing/routing_dashboard.py | 2 +-
.../work_order/work_order_dashboard.py | 2 +-
.../work_order/work_order_preview.html | 2 +-
.../work_order_item/work_order_item.py | 2 +-
.../doctype/workstation/workstation.js | 2 +-
.../bom_operations_time.py | 2 -
.../bom_stock_report/bom_stock_report.html | 2 +-
.../cost_of_poor_quality_report.py | 2 +-
.../downtime_analysis/downtime_analysis.py | 2 +-
.../exponential_smoothing_forecasting.py | 2 +-
.../job_card_summary/job_card_summary.py | 2 +-
.../production_analytics.py | 4 -
.../quality_inspection_summary.py | 2 +-
.../work_order_stock_report.py | 8 +-
.../work_order_summary/work_order_summary.py | 2 +-
.../doctype/chapter_member/chapter_member.py | 2 -
.../non_profit/doctype/donation/donation.py | 1 -
.../doctype/donation/donation_dashboard.py | 2 +-
.../doctype/donation/test_donation.py | 2 +-
erpnext/non_profit/doctype/donor/donor.py | 1 -
.../grant_application/grant_application.py | 2 +-
erpnext/non_profit/doctype/member/member.js | 2 +-
.../doctype/membership/test_membership.py | 2 +-
.../membership_type/membership_type.py | 2 +-
.../non_profit_settings.py | 2 +-
.../grant_application/grant_application.js | 2 +-
.../grant_application/grant_application.py | 2 -
...ry_settings_to_daily_work_summary_group.py | 2 +-
.../v10_0/rename_offer_letter_to_job_offer.py | 2 +-
.../rename_price_to_rate_in_pricing_rule.py | 2 +-
.../add_default_email_template_for_leave.py | 1 -
.../add_expense_claim_default_account.py | 2 +-
.../add_healthcare_service_unit_tree_root.py | 1 -
.../v11_0/add_index_on_nestedset_doctypes.py | 2 +-
erpnext/patches/v11_0/add_market_segments.py | 2 +-
erpnext/patches/v11_0/add_sales_stages.py | 2 +-
...eck_buying_selling_in_currency_exchange.py | 2 +-
.../create_salary_structure_assignments.py | 2 +-
.../v11_0/drop_column_max_days_allowed.py | 2 +-
.../v11_0/ewaybill_fields_gst_india.py | 2 +-
erpnext/patches/v11_0/hr_ux_cleanups.py | 1 -
..._asset_finance_book_against_old_entries.py | 2 +-
.../v11_0/make_location_from_warehouse.py | 1 -
...efaults_to_child_table_for_multicompany.py | 2 +-
.../move_leave_approvers_from_employee.py | 2 +-
.../patches/v11_0/refactor_autoname_naming.py | 2 +-
.../patches/v11_0/refactor_naming_series.py | 2 +-
.../v11_0/rename_asset_adjustment_doctype.py | 2 +-
erpnext/patches/v11_0/rename_bom_wo_fields.py | 2 +-
.../patches/v11_0/rename_health_insurance.py | 2 +-
.../rename_overproduction_percent_field.py | 2 +-
.../renamed_from_to_fields_in_project.py | 2 +-
.../patches/v11_0/set_missing_gst_hsn_code.py | 2 +-
.../v11_0/set_salary_component_properties.py | 2 +-
.../set_user_permissions_for_department.py | 4 +-
...ip_user_permission_check_for_department.py | 2 +-
.../update_account_type_in_party_type.py | 2 +-
.../update_allow_transfer_for_manufacture.py | 2 +-
...e_backflush_subcontract_rm_based_on_bom.py | 2 +-
.../v11_0/update_brand_in_item_price.py | 2 +-
.../v11_0/update_department_lft_rgt.py | 2 +-
erpnext/patches/v11_1/delete_bom_browser.py | 2 +-
.../patches/v11_1/make_job_card_time_logs.py | 2 +-
.../move_customer_lead_to_dynamic_column.py | 2 +-
.../patches/v11_1/rename_depends_on_lwp.py | 2 +-
.../v11_1/renamed_delayed_item_report.py | 2 +-
...s_for_material_request_type_manufacture.py | 2 +-
erpnext/patches/v11_1/set_variant_based_on.py | 2 +-
.../v11_1/update_bank_transaction_status.py | 2 +-
...pdate_default_supplier_in_item_defaults.py | 2 +-
.../v11_1/woocommerce_set_creation_user.py | 2 +-
.../add_company_link_to_einvoice_settings.py | 2 +-
...default_buying_selling_terms_in_company.py | 2 +-
...ocument_type_field_for_italy_einvoicing.py | 2 +-
.../v12_0/add_einvoice_status_field.py | 8 +-
...add_einvoice_summary_report_permissions.py | 2 +-
.../v12_0/add_eway_bill_in_delivery_note.py | 2 +-
.../v12_0/add_ewaybill_validity_field.py | 2 +-
.../add_export_type_field_in_party_master.py | 2 -
.../add_gst_category_in_delivery_note.py | 2 +-
.../v12_0/add_item_name_in_work_orders.py | 2 +-
.../add_permission_in_lower_deduction.py | 2 +-
...counting_dimensions_in_missing_doctypes.py | 2 +-
.../create_default_energy_point_rules.py | 2 +-
.../create_irs_1099_field_united_states.py | 2 +-
.../create_itc_reversal_custom_fields.py | 2 +-
.../v12_0/create_taxable_value_field.py | 2 +-
.../v12_0/delete_priority_property_setter.py | 2 +-
.../v12_0/fix_quotation_expired_status.py | 12 +--
...arget_distribution_from_parent_to_child.py | 2 +-
.../v12_0/recalculate_requested_qty_in_bin.py | 2 +-
.../remove_bank_remittance_custom_fields.py | 2 +-
.../remove_denied_leaves_from_leave_ledger.py | 2 +-
.../remove_duplicate_leave_ledger_entries.py | 2 +-
.../v12_0/rename_account_type_doctype.py | 2 +-
..._account_field_in_journal_entry_account.py | 2 +-
.../v12_0/rename_lost_reason_detail.py | 2 +-
.../v12_0/rename_pos_closing_doctype.py | 6 +-
.../patches/v12_0/rename_tolerance_fields.py | 2 +-
...counting_with_accounts_in_home_settings.py | 2 +-
...ock_ledger_entries_for_target_warehouse.py | 3 -
...eferred_accounting_in_accounts_settings.py | 2 +-
..._center_in_child_table_of_expense_claim.py | 2 +-
.../set_cwip_and_delete_asset_settings.py | 4 +-
.../v12_0/set_default_homepage_type.py | 2 +-
.../v12_0/set_default_payroll_based_on.py | 2 +-
...se_account_in_landed_cost_voucher_taxes.py | 2 +-
erpnext/patches/v12_0/set_gst_category.py | 2 -
...ian_import_supplier_invoice_permissions.py | 2 +-
erpnext/patches/v12_0/set_multi_uom_in_rfq.py | 2 +-
.../patches/v12_0/set_payment_entry_status.py | 2 +-
.../patches/v12_0/set_priority_for_support.py | 2 +-
...qty_field_in_sales_order_for_work_order.py | 2 +-
.../set_production_capacity_in_workstation.py | 2 +-
erpnext/patches/v12_0/set_quotation_status.py | 2 +-
.../v12_0/set_updated_purpose_in_pick_list.py | 2 +-
.../patches/v12_0/setup_einvoice_fields.py | 4 +-
.../patches/v12_0/stock_entry_enhancements.py | 2 +-
.../patches/v12_0/unhide_cost_center_field.py | 2 +-
...te_appointment_reminder_scheduler_entry.py | 2 +-
erpnext/patches/v12_0/update_bom_in_so_mr.py | 2 +-
...e_end_date_and_status_in_email_campaign.py | 2 +-
.../v12_0/update_ewaybill_field_position.py | 2 +-
erpnext/patches/v12_0/update_gst_category.py | 2 +-
.../update_healthcare_refactored_changes.py | 2 +-
.../v12_0/update_is_cancelled_field.py | 2 +-
.../v12_0/update_item_tax_template_company.py | 2 +-
...r_fields_in_acc_dimension_custom_fields.py | 2 +-
.../update_price_list_currency_in_bom.py | 2 +-
.../update_state_code_for_daman_and_diu.py | 2 +-
.../v12_0/update_uom_conversion_factor.py | 2 +-
erpnext/patches/v13_0/add_doctype_to_sla.py | 2 +-
.../add_naming_series_to_old_projects.py | 1 -
.../v13_0/change_default_pos_print_format.py | 2 +-
.../v13_0/check_is_income_tax_component.py | 2 +-
.../convert_qi_parameter_to_link_field.py | 2 +-
...are_custom_fields_in_stock_entry_detail.py | 2 +-
..._based_on_employee_current_leave_policy.py | 3 -
.../v13_0/create_uae_pos_invoice_fields.py | 2 +-
.../v13_0/delete_old_purchase_reports.py | 2 +-
.../patches/v13_0/delete_old_sales_reports.py | 2 +-
.../patches/v13_0/delete_orphaned_tables.py | 8 +-
.../delete_report_requested_items_to_order.py | 2 +-
.../v13_0/drop_razorpay_payload_column.py | 2 +-
.../fix_non_unique_represents_company.py | 2 +-
.../germany_fill_debtor_creditor_number.py | 2 +-
.../item_reposting_for_incorrect_sl_and_gl.py | 2 +-
.../loyalty_points_entry_for_pos_invoice.py | 4 +-
.../v13_0/make_non_standard_user_type.py | 2 +-
.../v13_0/move_branch_code_to_bank_account.py | 2 +-
...itional_salary_encashment_and_incentive.py | 1 -
.../rename_issue_status_hold_to_on_hold.py | 2 +-
...bership_settings_to_non_profit_settings.py | 2 +-
...eplace_pos_page_with_point_of_sale_page.py | 2 +-
.../v13_0/replace_pos_payment_mode_table.py | 2 +-
.../set_company_in_leave_ledger_entry.py | 2 +-
...ment_channel_in_payment_gateway_account.py | 2 +-
.../v13_0/set_pos_closing_as_failed.py | 2 +-
.../v13_0/set_training_event_attendance.py | 2 +-
erpnext/patches/v13_0/set_youtube_video_id.py | 2 +-
..._custom_roles_for_some_regional_reports.py | 2 +-
..._history_settings_for_standard_doctypes.py | 2 +-
.../patches/v13_0/stock_entry_enhancements.py | 8 +-
.../update_actual_start_and_end_date_in_wo.py | 2 +-
...update_amt_in_work_order_required_items.py | 1 -
.../patches/v13_0/update_deferred_settings.py | 2 +-
.../v13_0/update_export_type_for_gst.py | 6 +-
.../patches/v13_0/update_job_card_details.py | 2 +-
.../v13_0/update_project_template_tasks.py | 2 +-
...date_reason_for_resignation_in_employee.py | 1 -
.../v13_0/update_returned_qty_in_pr_dn.py | 2 +-
erpnext/patches/v13_0/update_subscription.py | 2 +-
...date_subscription_status_in_memberships.py | 2 +-
.../patches/v13_0/update_tds_check_field.py | 2 +-
.../patches/v13_0/update_timesheet_changes.py | 2 +-
.../updates_for_multi_currency_payroll.py | 4 +-
...oles_from_gst_report_non_indian_account.py | 2 +-
erpnext/patches/v8_1/setup_gst_india.py | 2 +-
.../test_additional_salary.py | 2 +-
.../employee_benefit_application.py | 2 +-
.../employee_tax_exemption_sub_category.py | 2 +-
erpnext/payroll/doctype/gratuity/gratuity.js | 2 +-
erpnext/payroll/doctype/gratuity/gratuity.py | 1 -
.../doctype/gratuity/gratuity_dashboard.py | 2 +-
.../doctype/gratuity_rule/gratuity_rule.js | 2 +-
.../gratuity_rule/gratuity_rule_dashboard.py | 2 +-
.../payroll_entry/payroll_entry_dashboard.py | 2 +-
.../payroll_period_dashboard.py | 2 +-
.../doctype/salary_slip/test_salary_slip.js | 2 +-
.../condition_and_formula_help.html | 2 +-
.../salary_structure/salary_structure.py | 1 -
.../salary_structure_dashboard.py | 2 +-
.../salary_structure_assignment.py | 4 +-
erpnext/payroll/notification/as | 2 +-
.../report/bank_remittance/bank_remittance.js | 1 -
.../income_tax_deductions.js | 2 +-
.../salary_payments_based_on_payment_mode.js | 2 +-
erpnext/portal/doctype/homepage/homepage.py | 1 -
.../test_product_configurator.py | 2 +-
.../doctype/activity_cost/activity_cost.js | 2 +-
.../doctype/activity_cost/activity_cost.py | 2 +-
.../activity_cost/test_activity_cost.py | 2 +-
.../doctype/activity_type/activity_type.py | 2 +-
.../activity_type/test_activity_type.py | 2 +-
.../doctype/project/project_dashboard.html | 2 +-
.../project_template/project_template.py | 2 +-
.../project_template/test_project_template.py | 2 +-
.../doctype/project_type/project_type.js | 2 +-
.../doctype/project_type/project_type.py | 2 +-
.../doctype/project_update/project_update.py | 2 +-
.../project_update/test_project_update.py | 2 +-
erpnext/projects/doctype/task/task_tree.js | 2 +-
.../projects/doctype/timesheet/timesheet.css | 2 +-
.../projects/doctype/timesheet/timesheet.js | 2 +-
.../projects/doctype/timesheet/timesheet.py | 6 +-
.../doctype/timesheet/timesheet_calendar.js | 4 +-
.../doctype/timesheet/timesheet_dashboard.py | 2 +-
.../doctype/timesheet/timesheet_list.js | 6 +-
erpnext/projects/report/billing_summary.py | 2 +-
.../daily_timesheet_summary.py | 6 +-
.../test_delayed_tasks_summary.py | 6 +-
.../employee_billing_summary.py | 2 +-
.../test_employee_util.py | 2 +-
.../project_billing_summary.py | 2 +-
.../project_profitability.py | 2 +-
erpnext/projects/web_form/tasks/tasks.js | 2 +-
erpnext/projects/web_form/tasks/tasks.py | 2 +-
erpnext/public/images/erpnext-favicon.svg | 2 +-
erpnext/public/images/erpnext-logo.svg | 2 +-
erpnext/public/images/pos.svg | 2 +-
.../js/education/assessment_result_tool.html | 2 +-
.../public/js/education/student_button.html | 8 +-
erpnext/public/js/erpnext.bundle.js | 1 -
erpnext/public/js/financial_statements.js | 2 -
erpnext/public/js/hierarchy-chart.bundle.js | 2 +-
.../hierarchy_chart_desktop.js | 2 +-
.../hierarchy_chart/hierarchy_chart_mobile.js | 2 +-
.../public/js/hub/components/ReviewArea.vue | 2 +-
.../js/hub/components/ReviewTimelineItem.vue | 1 -
erpnext/public/js/hub/pages/FeaturedItems.vue | 2 +-
erpnext/public/js/hub/pages/Publish.vue | 2 +-
erpnext/public/js/hub/pages/Seller.vue | 4 +-
erpnext/public/js/hub/vue-plugins.js | 2 +-
erpnext/public/js/leaflet/leaflet.draw.js | 2 +-
erpnext/public/js/leaflet/leaflet.js | 2 +-
erpnext/public/js/projects/timer.js | 2 +-
erpnext/public/js/setup_wizard.js | 2 +-
erpnext/public/js/stock_analytics.js | 1 -
.../public/js/templates/item_quick_entry.html | 2 +-
.../public/js/templates/item_selector.html | 2 +-
erpnext/public/js/templates/node_card.html | 2 +-
.../public/js/utils/dimension_tree_filter.js | 2 +-
erpnext/public/scss/hierarchy_chart.scss | 2 +-
erpnext/public/scss/shopping_cart.scss | 1 -
erpnext/public/scss/website.scss | 2 +-
.../doctype/quality_action/quality_action.js | 2 +-
.../doctype/quality_action/quality_action.py | 2 +-
.../quality_action/test_quality_action.py | 2 +-
.../quality_feedback/quality_feedback.py | 1 -
.../test_quality_feedback_template.py | 2 +-
.../doctype/quality_goal/quality_goal.py | 2 +-
.../doctype/quality_goal/test_quality_goal.py | 2 +-
.../quality_meeting/quality_meeting.py | 2 +-
.../quality_meeting/quality_meeting_list.js | 2 +-
.../quality_meeting/test_quality_meeting.py | 2 +-
.../quality_procedure/quality_procedure.js | 2 +-
.../quality_procedure/quality_procedure.py | 2 +-
.../quality_procedure_tree.js | 2 +-
.../test_quality_procedure.py | 2 +-
.../doctype/quality_review/quality_review.js | 2 +-
.../doctype/quality_review/quality_review.py | 2 +-
.../quality_review/quality_review_list.js | 2 +-
.../quality_review/test_quality_review.py | 2 +-
erpnext/regional/address_template/setup.py | 2 +-
.../address_template/templates/germany.html | 2 +-
.../e_invoice_settings/e_invoice_settings.py | 1 -
.../doctype/gst_hsn_code/gst_hsn_code.js | 2 +-
.../doctype/gst_hsn_code/gst_hsn_code.py | 2 +-
.../gstr_3b_report/gstr_3b_report.html | 2 +-
.../import_supplier_invoice.js | 2 +-
.../lower_deduction_certificate.py | 4 +-
.../test_tax_exemption_80g_certificate.py | 2 +-
.../germany/utils/datev/datev_constants.py | 2 +-
erpnext/regional/india/e_invoice/einvoice.js | 2 +-
erpnext/regional/india/e_invoice/utils.py | 2 +-
erpnext/regional/india/taxes.js | 1 -
erpnext/regional/india/utils.py | 6 +-
erpnext/regional/italy/__init__.py | 2 +-
erpnext/regional/report/datev/datev.py | 4 +-
.../e_invoice_summary/e_invoice_summary.py | 40 +++++-----
.../electronic_invoice_register.js | 2 +-
.../regional/report/eway_bill/eway_bill.py | 2 +-
.../gst_purchase_register.js | 2 +-
.../gst_purchase_register.py | 1 -
.../hsn_wise_summary_of_outward_supplies.py | 2 -
.../india_gst_common/india_gst_common.js | 2 +-
erpnext/regional/report/irs_1099/irs_1099.py | 2 +-
.../professional_tax_deductions.js | 2 +-
.../professional_tax_deductions.py | 2 +-
.../provident_fund_deductions.js | 2 +-
.../provident_fund_deductions.py | 2 +-
.../report/uae_vat_201/uae_vat_201.html | 2 +-
.../vat_audit_report/vat_audit_report.py | 2 +-
erpnext/regional/south_africa/setup.py | 6 +-
erpnext/regional/turkey/setup.py | 2 +-
.../restaurant/restaurant_dashboard.py | 2 +-
.../doctype/restaurant/test_restaurant.js | 2 +-
.../restaurant_menu/restaurant_menu.py | 2 -
erpnext/selling/doctype/customer/customer.js | 1 -
.../doctype/customer/regional/india.js | 2 +-
.../doctype/industry_type/industry_type.js | 8 +-
.../doctype/industry_type/industry_type.py | 2 +-
.../industry_type/test_industry_type.py | 2 +-
.../installation_note_item.py | 2 +-
.../product_bundle/test_product_bundle.js | 1 -
.../doctype/quotation/quotation_dashboard.py | 2 +-
..._quotation_with_discount_on_grand_total.js | 1 -
.../test_quotation_with_item_wise_discount.js | 1 -
.../tests/test_quotation_with_margin.js | 1 -
.../tests/test_quotation_with_multi_uom.js | 1 -
.../test_quotation_with_taxes_and_charges.js | 1 -
.../sales_order/sales_order_dashboard.py | 2 +-
.../doctype/sales_order/test_sales_order.py | 4 +-
.../tests/test_sales_order_with_margin.js | 1 -
...sales_order_with_multiple_delivery_date.js | 2 +-
.../sales_order_item/sales_order_item.py | 2 +-
.../selling/doctype/sales_team/sales_team.py | 2 +-
.../selling_settings/selling_settings.js | 2 +-
.../selling/doctype/sms_center/sms_center.py | 1 -
.../page/point_of_sale/point_of_sale.py | 2 +-
.../page/point_of_sale/pos_controller.js | 5 +-
.../page/point_of_sale/pos_item_cart.js | 2 +-
.../page/point_of_sale/pos_item_details.js | 6 +-
.../page/point_of_sale/pos_item_selector.js | 2 +-
.../page/point_of_sale/pos_number_pad.js | 2 +-
.../page/point_of_sale/pos_past_order_list.js | 2 +-
.../point_of_sale/pos_past_order_summary.js | 2 +-
.../page/sales_funnel/sales_funnel.css | 2 +-
.../selling/page/sales_funnel/sales_funnel.py | 4 +-
.../address_and_contacts.py | 2 +-
.../available_stock_for_packing_items.py | 2 +-
.../customer_acquisition_and_loyalty.js | 2 +-
.../item_wise_sales_history.js | 2 +-
.../item_wise_sales_history.py | 2 +-
.../quotation_trends/quotation_trends.js | 1 -
.../report/sales_analytics/sales_analytics.js | 2 -
.../sales_order_analysis.py | 2 +-
.../sales_order_trends/sales_order_trends.js | 2 +-
.../sales_partner_commission_summary.py | 2 +-
.../item_group_wise_sales_target_variance.py | 2 +-
...ner_target_variance_based_on_item_group.js | 4 +-
...ner_target_variance_based_on_item_group.py | 1 -
.../sales_partner_transaction_summary.py | 2 +-
.../sales_person_commission_summary.py | 6 +-
...son_target_variance_based_on_item_group.js | 4 +-
...son_target_variance_based_on_item_group.py | 2 +-
.../sales_person_wise_transaction_summary.js | 2 +-
...ory_target_variance_based_on_item_group.js | 4 +-
erpnext/selling/sales_common.js | 4 +-
erpnext/setup/default_energy_point_rules.py | 1 -
erpnext/setup/default_success_action.py | 1 -
erpnext/setup/doctype/brand/brand.js | 8 +-
erpnext/setup/doctype/brand/brand.py | 2 +-
erpnext/setup/doctype/brand/test_brand.py | 2 +-
erpnext/setup/doctype/company/company.js | 1 -
erpnext/setup/doctype/company/company.py | 2 +-
.../doctype/company/company_dashboard.py | 2 +-
erpnext/setup/doctype/company/company_tree.js | 2 +-
erpnext/setup/doctype/company/test_company.py | 1 -
.../doctype/company/tests/test_company.js | 2 +-
.../company/tests/test_company_production.js | 2 +-
.../doctype/customer_group/customer_group.py | 2 +-
.../customer_group/customer_group_tree.js | 2 +-
.../customer_group/test_customer_group.py | 2 +-
.../doctype/email_digest/email_digest.js | 2 +-
erpnext/setup/doctype/email_digest/quotes.py | 1 -
.../email_digest/templates/default.html | 8 +-
.../doctype/item_group/item_group_tree.js | 2 +-
.../doctype/print_heading/print_heading.js | 8 +-
.../doctype/print_heading/print_heading.py | 2 +-
.../print_heading/test_print_heading.py | 2 +-
.../quotation_lost_reason.js | 8 +-
.../quotation_lost_reason.py | 2 +-
.../test_quotation_lost_reason.py | 2 +-
.../sales_person/sales_person_dashboard.py | 2 +-
.../doctype/sales_person/sales_person_tree.js | 2 +-
.../supplier_group/supplier_group_tree.js | 2 +-
.../doctype/target_detail/target_detail.py | 2 +-
.../terms_and_conditions.js | 8 +-
.../terms_and_conditions.py | 4 +-
erpnext/setup/doctype/territory/territory.js | 2 +-
erpnext/setup/doctype/territory/territory.py | 2 +-
.../setup/doctype/territory/territory_tree.js | 2 +-
.../test_transaction_deletion_record.py | 6 +-
.../transaction_deletion_record.js | 8 +-
.../transaction_deletion_record_list.js | 2 +-
erpnext/setup/doctype/uom/uom.js | 8 +-
erpnext/setup/doctype/uom/uom.py | 2 +-
.../website_item_group/website_item_group.py | 2 +-
.../setup_wizard/operations/sample_data.py | 2 +-
.../setup_wizard/operations/taxes_setup.py | 4 +-
.../shopping_cart_settings.py | 2 +-
.../test_shopping_cart_settings.py | 4 +-
erpnext/shopping_cart/product_info.py | 2 +-
erpnext/shopping_cart/search.py | 2 +-
erpnext/shopping_cart/utils.py | 2 +-
.../web_template/hero_slider/hero_slider.html | 2 +-
.../item_card_group/item_card_group.html | 2 +-
erpnext/startup/filters.py | 2 +-
erpnext/startup/leaderboard.py | 2 +-
erpnext/stock/dashboard/item_dashboard.html | 2 +-
.../dashboard/warehouse_capacity_dashboard.py | 2 +-
.../warehouse_wise_stock_value.js | 2 +-
.../warehouse_wise_stock_value.py | 2 +-
erpnext/stock/doctype/batch/test_batch.js | 1 -
.../delivery_note/delivery_note_dashboard.py | 2 +-
.../doctype/delivery_note/regional/india.js | 1 -
.../delivery_note/test_delivery_note.js | 1 -
.../delivery_note/test_delivery_note.py | 2 +-
.../test_delivery_note_with_margin.js | 1 -
.../delivery_note_item/delivery_note_item.py | 2 +-
.../doctype/delivery_trip/delivery_trip.py | 2 +-
.../dispatch_notification_template.html | 2 +-
erpnext/stock/doctype/item/item.py | 2 +-
erpnext/stock/doctype/item/regional/india.js | 2 +-
.../stock/doctype/item/templates/item.html | 2 +-
.../doctype/item/templates/item_row.html | 2 +-
erpnext/stock/doctype/item/tests/test_item.js | 2 +-
.../item_attribute/test_item_attribute.py | 1 -
.../item_customer_detail.py | 2 +-
.../item_manufacturer/item_manufacturer.py | 2 +-
.../item_quality_inspection_parameter.py | 2 +-
.../doctype/item_reorder/item_reorder.py | 2 +-
.../doctype/item_supplier/item_supplier.py | 2 +-
erpnext/stock/doctype/item_tax/item_tax.py | 2 +-
.../item_website_specification.py | 2 +-
.../landed_cost_item/landed_cost_item.py | 2 +-
.../landed_cost_purchase_receipt.py | 2 +-
.../landed_cost_taxes_and_charges.py | 2 +-
.../material_request_dashboard.py | 2 +-
.../tests/test_material_request.js | 1 -
.../tests/test_material_request_from_bom.js | 1 -
.../test_material_request_type_manufacture.js | 1 -
...st_material_request_type_material_issue.js | 1 -
...material_request_type_material_transfer.js | 1 -
.../material_request_item.py | 2 +-
.../packing_slip_item/packing_slip_item.py | 2 +-
erpnext/stock/doctype/pick_list/pick_list.js | 2 +-
.../doctype/pick_list/pick_list_dashboard.py | 2 +-
.../stock/doctype/price_list/price_list.css | 2 +-
.../stock/doctype/price_list/price_list.js | 2 +-
.../stock/doctype/price_list/price_list.py | 2 +-
.../doctype/price_list/test_price_list.py | 2 +-
.../doctype/price_list/test_price_list_uom.js | 2 +-
.../purchase_receipt/regional/india.js | 2 +-
.../doctype/putaway_rule/putaway_rule.py | 2 +-
.../doctype/putaway_rule/test_putaway_rule.py | 2 +-
.../quality_inspection/quality_inspection.js | 2 +-
.../quality_inspection_reading.py | 2 +-
.../quality_inspection_template.py | 2 +-
.../stock/doctype/serial_no/test_serial_no.py | 2 +-
erpnext/stock/doctype/shipment/shipment.js | 8 +-
.../stock/doctype/shipment/shipment_list.js | 2 +-
.../stock/doctype/shipment/test_shipment.py | 6 +-
.../test_stock_entry_for_material_issue.js | 1 -
..._for_material_issue_with_serialize_item.js | 1 -
.../test_stock_entry_for_material_receipt.js | 1 -
...for_material_receipt_for_serialize_item.js | 1 -
.../test_stock_entry_for_material_transfer.js | 1 -
...y_for_material_transfer_for_manufacture.js | 1 -
.../tests/test_stock_entry_for_repack.js | 1 -
.../tests/test_stock_entry_for_subcontract.js | 1 -
.../stock_entry_detail/stock_entry_detail.py | 2 +-
.../test_stock_reconciliation.js | 1 -
.../test_stock_reconciliation.py | 1 -
.../uom_conversion_detail.py | 2 +-
.../stock/doctype/warehouse/test_warehouse.js | 2 +-
.../stock/doctype/warehouse/test_warehouse.py | 2 +-
erpnext/stock/doctype/warehouse/warehouse.js | 8 +-
.../stock/doctype/warehouse/warehouse_tree.js | 2 +-
.../stock/landed_taxes_and_charges_common.js | 1 -
.../warehouse_capacity_summary.html | 2 +-
.../warehouse_capacity_summary_header.html | 2 +-
.../batch_item_expiry_status.py | 4 +-
.../cogs_by_item_group/cogs_by_item_group.py | 4 +-
.../delayed_item_report.py | 2 +-
.../delayed_order_report.py | 2 +-
.../delivery_note_trends.js | 1 -
.../delivery_note_trends.py | 2 +-
...incorrect_balance_qty_after_transaction.py | 2 +-
.../incorrect_serial_no_valuation.py | 2 +-
.../incorrect_stock_value_report.py | 2 +-
.../item_price_stock/item_price_stock.js | 2 +-
.../item_shortage_report.py | 2 -
.../itemwise_recommended_reorder_level.js | 2 +-
.../purchase_receipt_trends.js | 1 -
.../purchase_receipt_trends.py | 2 +-
.../serial_no_ledger/serial_no_ledger.py | 1 -
.../stock/report/stock_ageing/stock_ageing.js | 2 +-
.../report/stock_analytics/stock_analytics.py | 4 -
.../stock_and_account_value_comparison.py | 2 +-
.../stock_projected_qty.py | 2 +-
.../stock_qty_vs_serial_no_count.py | 8 +-
.../supplier_wise_sales_analytics.js | 2 +-
.../total_stock_summary.js | 2 +-
erpnext/support/doctype/issue/issue.js | 2 +-
erpnext/support/doctype/issue/test_issue.py | 10 +--
.../doctype/issue_priority/issue_priority.py | 2 +-
.../issue_priority/test_issue_priority.py | 2 +-
.../service_level_agreement.py | 2 +-
.../service_level_agreement_dashboard.py | 2 +-
.../test_service_level_agreement.py | 2 +-
.../first_response_time_for_issues.py | 2 +-
.../report/issue_analytics/issue_analytics.py | 2 +-
.../issue_analytics/test_issue_analytics.py | 4 +-
.../report/issue_summary/issue_summary.py | 1 -
erpnext/support/web_form/issues/issues.js | 2 +-
.../telephony/doctype/call_log/call_log.py | 1 -
.../incoming_call_settings.js | 1 -
.../templates/emails/birthday_reminder.html | 2 +-
.../emails/daily_project_summary.html | 2 +-
.../templates/emails/daily_work_summary.html | 2 +-
.../emails/request_for_quotation.html | 2 +-
erpnext/templates/emails/training_event.html | 2 +-
.../templates/generators/item/item_inquiry.js | 2 +-
.../generators/item/item_specifications.html | 2 +-
erpnext/templates/generators/item_group.html | 2 +-
erpnext/templates/generators/job_opening.html | 6 +-
.../generators/student_admission.html | 2 +-
.../includes/cart/address_picker_card.html | 2 +-
.../includes/cart/cart_address_picker.html | 1 -
.../includes/cart/cart_items_dropdown.html | 2 +-
erpnext/templates/includes/course/macros.html | 2 +-
.../includes/itemised_tax_breakup.html | 2 +-
erpnext/templates/includes/macros.html | 2 +-
.../includes/navbar/navbar_items.html | 2 +-
.../includes/order/order_macros.html | 2 +-
erpnext/templates/includes/projects.css | 2 +-
.../includes/projects/project_search_box.html | 2 +-
.../templates/includes/salary_slip_log.html | 2 +-
.../templates/includes/topic/topic_row.html | 4 +-
erpnext/templates/pages/cart_terms.html | 2 +-
erpnext/templates/pages/courses.html | 2 +-
erpnext/templates/pages/courses.py | 1 -
erpnext/templates/pages/home.css | 2 +-
erpnext/templates/pages/home.html | 2 +-
.../integrations/gocardless_checkout.html | 2 +-
.../pages/integrations/gocardless_checkout.py | 2 +-
.../integrations/gocardless_confirmation.html | 2 +-
.../integrations/gocardless_confirmation.py | 2 +-
.../pages/material_request_info.html | 2 +-
.../templates/pages/material_request_info.py | 6 +-
.../pages/non_profit/join-chapter.html | 2 +-
.../pages/non_profit/leave-chapter.html | 2 +-
erpnext/templates/pages/order.py | 4 +-
erpnext/templates/pages/product_search.py | 1 -
erpnext/templates/pages/projects.js | 2 +-
erpnext/templates/pages/task_info.html | 2 +-
erpnext/templates/pages/task_info.py | 6 +-
erpnext/templates/pages/timelog_info.html | 2 +-
erpnext/templates/pages/timelog_info.py | 4 +-
.../includes/item_table_qty.html | 1 -
erpnext/tests/test_regional.py | 2 +-
erpnext/tests/test_subcontracting.py | 2 +-
erpnext/tests/ui/setup_wizard.js | 2 +-
erpnext/tests/ui_test_helpers.py | 2 +-
erpnext/utilities/activation.py | 26 +++----
erpnext/utilities/bot.py | 2 +-
.../doctype/rename_tool/rename_tool.py | 1 -
erpnext/utilities/doctype/video/video_list.js | 2 +-
.../doctype/video_settings/video_settings.py | 2 +-
erpnext/utilities/hierarchy_chart.py | 2 +-
.../youtube_interactions.py | 2 +-
.../utilities/web_form/addresses/addresses.js | 2 +-
erpnext/www/all-products/index.html | 2 +-
erpnext/www/all-products/item_row.html | 1 -
erpnext/www/all-products/not_found.html | 2 +-
erpnext/www/book_appointment/index.css | 2 +-
erpnext/www/book_appointment/index.html | 2 +-
.../www/book_appointment/verify/index.html | 4 +-
erpnext/www/book_appointment/verify/index.py | 2 +-
erpnext/www/lms/content.py | 2 +-
erpnext/www/lms/course.html | 2 +-
erpnext/www/lms/index.py | 2 +-
erpnext/www/lms/macros/card.html | 2 +-
erpnext/www/lms/macros/hero.html | 2 +-
erpnext/www/lms/profile.py | 2 +-
erpnext/www/lms/program.html | 2 +-
erpnext/www/lms/program.py | 2 +-
erpnext/www/lms/topic.html | 2 +-
erpnext/www/lms/topic.py | 2 +-
erpnext/www/support/index.html | 2 +-
erpnext/www/support/index.py | 24 +++---
1190 files changed, 1352 insertions(+), 1604 deletions(-)
diff --git a/erpnext/.stylelintrc b/erpnext/.stylelintrc
index 1e05d1fb41d..30075f13d04 100644
--- a/erpnext/.stylelintrc
+++ b/erpnext/.stylelintrc
@@ -6,4 +6,4 @@
"scss/at-rule-no-unknown": true,
"no-descending-specificity": null
}
-}
\ No newline at end of file
+}
diff --git a/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.js b/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.js
index e12eae9c1c1..d8a83e53dc0 100644
--- a/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.js
+++ b/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.js
@@ -19,4 +19,4 @@ frappe.dashboards.chart_sources["Account Balance Timeline"] = {
reqd: 1
},
]
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py
index 335e8a15ab0..0c81d83ed8e 100644
--- a/erpnext/accounts/deferred_revenue.py
+++ b/erpnext/accounts/deferred_revenue.py
@@ -450,5 +450,3 @@ def get_deferred_booking_accounts(doctype, voucher_detail_no, dr_or_cr):
return debit_account
else:
return credit_account
-
-
diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js
index 65c5ff1ceaf..2fa1d53c60c 100644
--- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js
+++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js
@@ -60,4 +60,4 @@ frappe.ui.form.on('Accounting Dimension Detail', {
let row = locals[cdt][cdn];
row.reference_document = frm.doc.document_type;
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py
index e657a9ae34b..4f3ee7643ab 100644
--- a/erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py
+++ b/erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py
@@ -113,5 +113,3 @@ def disable_dimension():
dimension2 = frappe.get_doc("Accounting Dimension", "Location")
dimension2.disabled = 1
dimension2.save()
-
-
diff --git a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.js b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.js
index 74b7b516763..9dd882a3119 100644
--- a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.js
+++ b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.js
@@ -79,4 +79,4 @@ frappe.ui.form.on('Allowed Dimension', {
row.accounting_dimension = frm.doc.accounting_dimension;
frm.refresh_field("dimensions");
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/accounting_period/accounting_period.py b/erpnext/accounts/doctype/accounting_period/accounting_period.py
index 63b5dbbd3e6..739d8f6bc63 100644
--- a/erpnext/accounts/doctype/accounting_period/accounting_period.py
+++ b/erpnext/accounts/doctype/accounting_period/accounting_period.py
@@ -56,4 +56,4 @@ class AccountingPeriod(Document):
self.append('closed_documents', {
"document_type": doctype_for_closing.document_type,
"closed": doctype_for_closing.closed
- })
\ No newline at end of file
+ })
diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.js b/erpnext/accounts/doctype/accounts_settings/accounts_settings.js
index 541901c9abf..e44af3a9167 100644
--- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.js
+++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.js
@@ -48,4 +48,4 @@ frappe.tour['Accounts Settings'] = [
title: "Unlink Advance Payment on Cancellation of Order",
description: __("Similar to the previous option, this unlinks any advance payments made against Purchase/Sales Orders.")
}
-];
\ No newline at end of file
+];
diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py
index 55449132928..62c97f24d5f 100644
--- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py
+++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py
@@ -37,7 +37,7 @@ class AccountsSettings(Document):
def toggle_discount_accounting_fields(self):
enable_discount_accounting = cint(self.enable_discount_accounting)
-
+
for doctype in ["Sales Invoice Item", "Purchase Invoice Item"]:
make_property_setter(doctype, "discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False)
if enable_discount_accounting:
@@ -52,4 +52,4 @@ class AccountsSettings(Document):
else:
make_property_setter(doctype, "additional_discount_account", "mandatory_depends_on", "", "Code", validate_fields_for_doctype=False)
- make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False)
\ No newline at end of file
+ make_property_setter("Item", "default_discount_account", "hidden", not(enable_discount_accounting), "Check", validate_fields_for_doctype=False)
diff --git a/erpnext/accounts/doctype/accounts_settings/regional/united_states.js b/erpnext/accounts/doctype/accounts_settings/regional/united_states.js
index d47d6e58039..3e38386481c 100644
--- a/erpnext/accounts/doctype/accounts_settings/regional/united_states.js
+++ b/erpnext/accounts/doctype/accounts_settings/regional/united_states.js
@@ -5,4 +5,4 @@ frappe.ui.form.on('Accounts Settings', {
frm.set_df_property("frozen_accounts_modifier", "label", "Role Allowed to Close Books & Make Changes to Closed Periods");
frm.set_df_property("credit_controller", "label", "Credit Manager");
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/bank/bank.js b/erpnext/accounts/doctype/bank/bank.js
index 19041a3f73d..059e1d31588 100644
--- a/erpnext/accounts/doctype/bank/bank.js
+++ b/erpnext/accounts/doctype/bank/bank.js
@@ -120,4 +120,4 @@ erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
plaid_success(token, response) {
frappe.show_alert({ message: __('Plaid Link Updated'), indicator: 'green' });
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/doctype/bank/bank.py b/erpnext/accounts/doctype/bank/bank.py
index 41aae14362f..99fa21c8f9a 100644
--- a/erpnext/accounts/doctype/bank/bank.py
+++ b/erpnext/accounts/doctype/bank/bank.py
@@ -13,4 +13,4 @@ class Bank(Document):
load_address_and_contact(self)
def on_trash(self):
- delete_contact_and_address('Bank', self.name)
\ No newline at end of file
+ delete_contact_and_address('Bank', self.name)
diff --git a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py
index a959cea98f2..c7ea1522993 100644
--- a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py
+++ b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py
@@ -26,4 +26,4 @@ def get_data():
'items': ['Journal Entry']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.js b/erpnext/accounts/doctype/bank_clearance/bank_clearance.js
index ba3f2face63..63cc46518ff 100644
--- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.js
+++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.js
@@ -8,7 +8,7 @@ frappe.ui.form.on("Bank Clearance", {
onload: function(frm) {
- let default_bank_account = frappe.defaults.get_user_default("Company")?
+ let default_bank_account = frappe.defaults.get_user_default("Company")?
locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"]: "";
frm.set_value("account", default_bank_account);
diff --git a/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py b/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py
index ecc536733f2..59299f81e50 100644
--- a/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py
+++ b/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py
@@ -6,4 +6,4 @@ import frappe
from frappe.model.document import Document
class BankClearanceDetail(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py
index 88e1055beb4..a0aac6ab170 100644
--- a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py
+++ b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py
@@ -25,6 +25,6 @@ class BankGuarantee(Document):
def get_vouchar_detials(column_list, doctype, docname):
column_list = json.loads(column_list)
for col in column_list:
- sanitize_searchfield(col)
+ sanitize_searchfield(col)
return frappe.db.sql(''' select {columns} from `tab{doctype}` where name=%s'''
.format(columns=", ".join(column_list), doctype=doctype), docname, as_dict=1)[0]
diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py
index 5246baa02b3..31cfb2da1da 100644
--- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py
+++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py
@@ -105,4 +105,3 @@ def unclear_reference_payment(doctype, docname):
frappe.db.set_value(doc.payment_document, doc.payment_entry, "clearance_date", None)
return doc.payment_entry
-
diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction_list.js b/erpnext/accounts/doctype/bank_transaction/bank_transaction_list.js
index 2ecc2b0cda3..bff41d5539b 100644
--- a/erpnext/accounts/doctype/bank_transaction/bank_transaction_list.js
+++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction_list.js
@@ -10,4 +10,4 @@ frappe.listview_settings['Bank Transaction'] = {
return [__("Reconciled"), "green", "unallocated_amount,=,0"];
}
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py
index 33ae45439e7..dc3b8674700 100644
--- a/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py
+++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py
@@ -77,4 +77,4 @@ def get_bank_mapping(bank_account):
mapping = {row.file_field:row.bank_transaction_field for row in bank.bank_transaction_mapping}
- return mapping
\ No newline at end of file
+ return mapping
diff --git a/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py b/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py
index ee5098bea12..20e423a610e 100644
--- a/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py
+++ b/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py
@@ -6,4 +6,4 @@ import frappe
from frappe.model.document import Document
class CFormInvoiceDetail(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py b/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py
index 28d84b4442f..b1ad2972beb 100644
--- a/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py
+++ b/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py
@@ -18,5 +18,3 @@ class CashFlowMapping(Document):
frappe._('You can only select a maximum of one option from the list of check boxes.'),
title='Error'
)
-
-
diff --git a/erpnext/accounts/doctype/cashier_closing/cashier_closing.py b/erpnext/accounts/doctype/cashier_closing/cashier_closing.py
index 7ad1d3ab831..081c6fa4718 100644
--- a/erpnext/accounts/doctype/cashier_closing/cashier_closing.py
+++ b/erpnext/accounts/doctype/cashier_closing/cashier_closing.py
@@ -33,4 +33,4 @@ class CashierClosing(Document):
def validate_time(self):
if self.from_time >= self.time:
- frappe.throw(_("From Time Should Be Less Than To Time"))
\ No newline at end of file
+ frappe.throw(_("From Time Should Be Less Than To Time"))
diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js
index 6a430eb02bf..d10c61858f1 100644
--- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js
+++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js
@@ -10,10 +10,10 @@ frappe.ui.form.on('Cheque Print Template', {
function() {
erpnext.cheque_print.view_cheque_print(frm);
}).addClass("btn-primary");
-
+
$(frm.fields_dict.cheque_print_preview.wrapper).empty()
-
-
+
+
var template = '
\
Signatory Name \
\
';
-
+
$(frappe.render(template, frm.doc)).appendTo(frm.fields_dict.cheque_print_preview.wrapper)
-
+
if (frm.doc.scanned_cheque) {
$(frm.fields_dict.cheque_print_preview.wrapper).find("#cheque_preview").css('background-image', 'url(' + frm.doc.scanned_cheque + ')');
}
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.py b/erpnext/accounts/doctype/cost_center/cost_center.py
index 8a5473f3a16..981fec308cc 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.py
+++ b/erpnext/accounts/doctype/cost_center/cost_center.py
@@ -129,4 +129,4 @@ def get_name_with_number(new_account, account_number):
def check_if_distributed_cost_center_enabled(cost_center_list):
value_list = frappe.get_list("Cost Center", {"name": ["in", cost_center_list]}, "enable_distributed_cost_center", as_list=1)
- return next((True for x in value_list if x[0]), False)
\ No newline at end of file
+ return next((True for x in value_list if x[0]), False)
diff --git a/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py b/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py
index 788ac8be83f..24cf3ea0689 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py
+++ b/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py
@@ -12,4 +12,4 @@ def get_data():
'items': ['Budget Variance Report', 'General Ledger']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/cost_center/cost_center_tree.js b/erpnext/accounts/doctype/cost_center/cost_center_tree.js
index fde41233c4d..1d482c58f1a 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center_tree.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center_tree.js
@@ -51,4 +51,4 @@ frappe.treeview_settings["Cost Center"] = {
}
-}
\ No newline at end of file
+}
diff --git a/erpnext/accounts/doctype/cost_center/test_cost_center.py b/erpnext/accounts/doctype/cost_center/test_cost_center.py
index b5fc7e3b497..7779ccefc20 100644
--- a/erpnext/accounts/doctype/cost_center/test_cost_center.py
+++ b/erpnext/accounts/doctype/cost_center/test_cost_center.py
@@ -62,6 +62,3 @@ def create_cost_center(**args):
cc.is_group = args.is_group or 0
cc.parent_cost_center = args.parent_cost_center or "_Test Company - _TC"
cc.insert()
-
-
-
diff --git a/erpnext/accounts/doctype/coupon_code/coupon_code.py b/erpnext/accounts/doctype/coupon_code/coupon_code.py
index 55c119315e0..92a816d25e9 100644
--- a/erpnext/accounts/doctype/coupon_code/coupon_code.py
+++ b/erpnext/accounts/doctype/coupon_code/coupon_code.py
@@ -17,7 +17,7 @@ class CouponCode(Document):
self.coupon_code =''.join(i for i in self.coupon_name if not i.isdigit())[0:8].upper()
elif self.coupon_type == "Gift Card":
self.coupon_code = frappe.generate_hash()[:10].upper()
-
+
def validate(self):
if self.coupon_type == "Gift Card":
self.maximum_use = 1
diff --git a/erpnext/accounts/doctype/coupon_code/test_coupon_code.py b/erpnext/accounts/doctype/coupon_code/test_coupon_code.py
index 5af12cde06d..06987a8a4a5 100644
--- a/erpnext/accounts/doctype/coupon_code/test_coupon_code.py
+++ b/erpnext/accounts/doctype/coupon_code/test_coupon_code.py
@@ -124,6 +124,3 @@ class TestCouponCode(unittest.TestCase):
so.submit()
self.assertEqual(frappe.db.get_value("Coupon Code", "SAVE30", "used"), 1)
-
-
-
diff --git a/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py b/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py
index 109737f7276..93dfcc14bda 100644
--- a/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py
+++ b/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py
@@ -7,4 +7,4 @@ from __future__ import unicode_literals
from frappe.model.document import Document
class DiscountedInvoice(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/accounts/doctype/dunning/dunning_dashboard.py b/erpnext/accounts/doctype/dunning/dunning_dashboard.py
index 19a73ddfa48..33c6ab080c9 100644
--- a/erpnext/accounts/doctype/dunning/dunning_dashboard.py
+++ b/erpnext/accounts/doctype/dunning/dunning_dashboard.py
@@ -14,4 +14,4 @@ def get_data():
'items': ['Payment Entry', 'Journal Entry']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/dunning/test_dunning.py b/erpnext/accounts/doctype/dunning/test_dunning.py
index 7fc2e4b3060..67692ecc472 100644
--- a/erpnext/accounts/doctype/dunning/test_dunning.py
+++ b/erpnext/accounts/doctype/dunning/test_dunning.py
@@ -143,4 +143,4 @@ def create_dunning_type_with_zero_interest_rate():
'closing_text': 'We kindly request that you pay the outstanding amount immediately, and late fees.'
}
)
- dunning_type.save()
+ dunning_type.save()
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.js b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.js
index b7b6020caa9..926a442f808 100644
--- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.js
+++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.js
@@ -31,7 +31,7 @@ frappe.ui.form.on('Exchange Rate Revaluation', {
}, __('Create'));
}
}
- });
+ });
}
},
@@ -128,4 +128,4 @@ var get_account_details = function(frm, cdt, cdn) {
frm.events.get_total_gain_loss(frm);
}
});
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
index f2b0a8c08a6..dbbcedcadfa 100644
--- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
+++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
@@ -44,7 +44,7 @@ class ExchangeRateRevaluation(Document):
if total_amt != total_debit:
return True
-
+
return False
@frappe.whitelist()
@@ -205,4 +205,4 @@ def get_account_details(account, company, posting_date, party_type=None, party=N
"new_balance_in_base_currency": new_balance_in_base_currency
}
- return account_details
\ No newline at end of file
+ return account_details
diff --git a/erpnext/accounts/doctype/finance_book/test_finance_book.py b/erpnext/accounts/doctype/finance_book/test_finance_book.py
index 502765812ae..cd8e204f4c8 100644
--- a/erpnext/accounts/doctype/finance_book/test_finance_book.py
+++ b/erpnext/accounts/doctype/finance_book/test_finance_book.py
@@ -19,7 +19,7 @@ class TestFinanceBook(unittest.TestCase):
finance_book = frappe.get_doc("Finance Book", "_Test Finance Book")
return finance_book
-
+
def test_finance_book(self):
finance_book = self.create_finance_book()
diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py
index 6523cd3cdb8..6d35ca24397 100644
--- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py
+++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py
@@ -17,4 +17,4 @@ def get_data():
'items': ['Payment Entry', 'Journal Entry']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_list.js b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_list.js
index a72023d8e12..4895efcd4cc 100644
--- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_list.js
+++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_list.js
@@ -18,4 +18,4 @@ frappe.listview_settings['Invoice Discounting'] = {
return [__("Canceled"), "red", "status,=,Canceled"];
}
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/doctype/journal_entry/regional/india.js b/erpnext/accounts/doctype/journal_entry/regional/india.js
index 75a69ac0cf3..c5f5520479f 100644
--- a/erpnext/accounts/doctype/journal_entry/regional/india.js
+++ b/erpnext/accounts/doctype/journal_entry/regional/india.js
@@ -14,4 +14,4 @@ frappe.ui.form.on("Journal Entry", {
};
});
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py
index 5f003e022a0..5835d462ae9 100644
--- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py
@@ -100,7 +100,7 @@ class TestJournalEntry(unittest.TestCase):
"debit_in_account_currency": 0 if diff > 0 else abs(diff),
"credit_in_account_currency": diff if diff > 0 else 0
})
-
+
jv.append("accounts", {
"account": "Stock Adjustment - TCP1",
"cost_center": "Main - TCP1",
diff --git a/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.js b/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.js
index cbb9fc4b0f9..1c19c1d2255 100644
--- a/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.js
+++ b/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.js
@@ -88,4 +88,4 @@ frappe.ui.form.on("Journal Entry Template", {
frappe.model.clear_table(frm.doc, "accounts");
frm.refresh_field("accounts");
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
index 7a06d3572a6..103fa96d02d 100644
--- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
+++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
@@ -14,4 +14,4 @@ frappe.ui.form.on('Mode of Payment', {
};
});
},
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py
index 32473694c80..cea921e999e 100644
--- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py
+++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py
@@ -39,4 +39,3 @@ class ModeofPayment(Document):
message = "POS Profile " + frappe.bold(", ".join(pos_profiles)) + " contains \
Mode of Payment " + frappe.bold(str(self.name)) + ". Please remove them to disable this mode."
frappe.throw(_(message), title="Not Allowed")
-
diff --git a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py
index bff64227325..ad8623fb4ee 100644
--- a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py
+++ b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py
@@ -55,4 +55,4 @@ def get_percentage(doc, start_date, period):
if d.month in months:
percentage += d.percentage_allocation
- return percentage
\ No newline at end of file
+ return percentage
diff --git a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py
index a6794998159..912bd9e331a 100644
--- a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py
+++ b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py
@@ -20,4 +20,4 @@ def get_data():
'items': ['Budget']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
index a8c07d6bb9b..7eb5c4234d1 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js
@@ -162,4 +162,4 @@ frappe.ui.form.on('Opening Invoice Creation Tool Item', {
invoices_add: (frm) => {
frm.trigger('update_invoice_table');
}
-});
\ No newline at end of file
+});
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 d76d9099628..9914b45dfc1 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
@@ -241,4 +241,3 @@ def get_temporary_opening_account(company=None):
frappe.throw(_("Please add a Temporary Opening account in Chart of Accounts"))
return accounts[0].name
-
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index 831b2708583..d2dffde5cdc 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -185,7 +185,7 @@ class PaymentEntry(AccountsController):
for field, value in iteritems(ref_details):
if d.exchange_gain_loss:
# for cases where gain/loss is booked into invoice
- # exchange_gain_loss is calculated from invoice & populated
+ # exchange_gain_loss is calculated from invoice & populated
# and row.exchange_rate is already set to payment entry's exchange rate
# refer -> `update_reference_in_payment_entry()` in utils.py
continue
@@ -417,7 +417,7 @@ class PaymentEntry(AccountsController):
net_total_for_tds = 0
if reference.reference_doctype == 'Purchase Order':
net_total_for_tds += flt(frappe.db.get_value('Purchase Order', reference.reference_name, 'net_total'))
-
+
if net_total_for_tds:
net_total = net_total_for_tds
@@ -841,7 +841,7 @@ class PaymentEntry(AccountsController):
if account_details:
row.update(account_details)
-
+
if not row.get('amount'):
# if no difference amount
return
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry_list.js b/erpnext/accounts/doctype/payment_entry/payment_entry_list.js
index e6d83b9f683..2d76fe69ef9 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry_list.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry_list.js
@@ -11,4 +11,4 @@ frappe.listview_settings['Payment Entry'] = {
};
}
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/doctype/payment_entry/tests/test_payment_against_purchase_invoice.js b/erpnext/accounts/doctype/payment_entry/tests/test_payment_against_purchase_invoice.js
index 14aa0736d40..e8db2c3159d 100644
--- a/erpnext/accounts/doctype/payment_entry/tests/test_payment_against_purchase_invoice.js
+++ b/erpnext/accounts/doctype/payment_entry/tests/test_payment_against_purchase_invoice.js
@@ -57,4 +57,4 @@ QUnit.test("test payment entry", function(assert) {
() => frappe.timeout(3),
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/payment_entry/tests/test_payment_entry.js b/erpnext/accounts/doctype/payment_entry/tests/test_payment_entry.js
index 0c76343fa90..34af79fcd10 100644
--- a/erpnext/accounts/doctype/payment_entry/tests/test_payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/tests/test_payment_entry.js
@@ -25,4 +25,4 @@ QUnit.test("test payment entry", function(assert) {
() => frappe.timeout(0.3),
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/payment_entry/tests/test_payment_entry_write_off.js b/erpnext/accounts/doctype/payment_entry/tests/test_payment_entry_write_off.js
index 9849d767271..8c7f6f47dd3 100644
--- a/erpnext/accounts/doctype/payment_entry/tests/test_payment_entry_write_off.js
+++ b/erpnext/accounts/doctype/payment_entry/tests/test_payment_entry_write_off.js
@@ -64,4 +64,4 @@ QUnit.test("test payment entry", function(assert) {
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py
index fd213a47a1e..3529c16a1c2 100644
--- a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py
+++ b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py
@@ -9,19 +9,19 @@ from frappe.model.document import Document
class PaymentGatewayAccount(Document):
def autoname(self):
self.name = self.payment_gateway + " - " + self.currency
-
+
def validate(self):
self.currency = frappe.db.get_value("Account", self.payment_account, "account_currency")
-
+
self.update_default_payment_gateway()
self.set_as_default_if_not_set()
-
+
def update_default_payment_gateway(self):
if self.is_default:
frappe.db.sql("""update `tabPayment Gateway Account` set is_default = 0
where is_default = 1 """)
-
+
def set_as_default_if_not_set(self):
- if not frappe.db.get_value("Payment Gateway Account",
+ if not frappe.db.get_value("Payment Gateway Account",
{"is_default": 1, "name": ("!=", self.name)}, "name"):
self.is_default = 1
diff --git a/erpnext/accounts/doctype/payment_order/payment_order.js b/erpnext/accounts/doctype/payment_order/payment_order.js
index d12e474c5b1..aa373bc2fcc 100644
--- a/erpnext/accounts/doctype/payment_order/payment_order.js
+++ b/erpnext/accounts/doctype/payment_order/payment_order.js
@@ -136,4 +136,4 @@ frappe.ui.form.on('Payment Order', {
dialog.show();
},
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py
index 6b93f926cdf..a4f335833ee 100644
--- a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py
+++ b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py
@@ -9,4 +9,4 @@ def get_data():
'items': ['Payment Entry', 'Journal Entry']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/payment_order/test_payment_order.py b/erpnext/accounts/doctype/payment_order/test_payment_order.py
index 5fdde07faa4..9ba57aef300 100644
--- a/erpnext/accounts/doctype/payment_order/test_payment_order.py
+++ b/erpnext/accounts/doctype/payment_order/test_payment_order.py
@@ -46,4 +46,4 @@ def create_payment_order_against_payment_entry(ref_doc, order_type):
doc = make_payment_order(ref_doc.name, payment_order)
doc.save()
doc.submit()
- return doc
\ No newline at end of file
+ return doc
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
index d788d91855e..acfe1fef2ee 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
@@ -307,4 +307,4 @@ def reconcile_dr_cr_note(dr_cr_notes, company):
]
})
jv.flags.ignore_mandatory = True
- jv.submit()
\ No newline at end of file
+ jv.submit()
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py
index 438951db627..f83cb375fcf 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.py
+++ b/erpnext/accounts/doctype/payment_request/payment_request.py
@@ -541,4 +541,4 @@ def make_payment_order(source_name, target_doc=None):
}
}, target_doc, set_missing_values)
- return doclist
\ No newline at end of file
+ return doclist
diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py
index 5eba62c0b31..ad6ff6f5553 100644
--- a/erpnext/accounts/doctype/payment_request/test_payment_request.py
+++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py
@@ -138,4 +138,4 @@ class TestPaymentRequest(unittest.TestCase):
# Try to make Payment Request more than SO amount, should give validation
pr2.grand_total = 900
- self.assertRaises(frappe.ValidationError, pr2.save)
\ No newline at end of file
+ self.assertRaises(frappe.ValidationError, pr2.save)
diff --git a/erpnext/accounts/doctype/payment_term/payment_term.js b/erpnext/accounts/doctype/payment_term/payment_term.js
index acd0144c2ea..feecf93484c 100644
--- a/erpnext/accounts/doctype/payment_term/payment_term.js
+++ b/erpnext/accounts/doctype/payment_term/payment_term.js
@@ -19,4 +19,4 @@ frappe.ui.form.on('Payment Term', {
frm.set_df_property("discount", "description", description);
}
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.js b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.js
index 84c8d09b164..ea18adefa35 100644
--- a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.js
+++ b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.js
@@ -3,6 +3,6 @@
frappe.ui.form.on('Payment Terms Template', {
setup: function(frm) {
-
+
}
});
diff --git a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py
index c705097ac66..5c8cb4fbdc1 100644
--- a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py
+++ b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py
@@ -30,4 +30,4 @@ def get_data():
'items': ['Customer Group', 'Supplier Group']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
index 9cfb47876c8..a6e3bd98e7c 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
@@ -51,7 +51,7 @@ class PeriodClosingVoucher(AccountsController):
def make_gl_entries(self):
gl_entries = []
- net_pl_balance = 0
+ net_pl_balance = 0
pl_accounts = self.get_pl_balances()
@@ -79,7 +79,7 @@ class PeriodClosingVoucher(AccountsController):
from erpnext.accounts.general_ledger import make_gl_entries
make_gl_entries(gl_entries)
-
+
def get_pnl_gl_entry(self, net_pl_balance):
cost_center = frappe.db.get_value("Company", self.company, "cost_center")
gl_entry = self.get_gl_dict({
diff --git a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
index 2f29372b01c..f17a5c51a08 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
+++ b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
@@ -139,7 +139,7 @@ def create_company():
'company_name': "Test PCV Company",
'country': 'United States',
'default_currency': 'USD'
- })
+ })
company.insert(ignore_if_duplicate = True)
return company.name
diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js
index 6418d730903..264d4a68b00 100644
--- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js
+++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js
@@ -20,9 +20,9 @@ frappe.ui.form.on('POS Closing Entry', {
frm.set_query("pos_opening_entry", function(doc) {
return { filters: { 'status': 'Open', 'docstatus': 1 } };
});
-
+
if (frm.doc.docstatus === 0 && !frm.doc.amended_from) frm.set_value("period_end_date", frappe.datetime.now_datetime());
-
+
frappe.realtime.on('closing_process_complete', async function(data) {
await frm.reload_doc();
if (frm.doc.status == 'Failed' && frm.doc.error_message && data.user == frappe.session.user) {
@@ -43,7 +43,7 @@ frappe.ui.form.on('POS Closing Entry', {
const issue = 'issue';
frm.dashboard.set_headline(
__('POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.', [issue]));
-
+
$('#jump_to_error').on('click', (e) => {
e.preventDefault();
frappe.utils.scroll_to(
diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.js b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.js
index cd08efc55fb..2f8081b95ce 100644
--- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.js
+++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.js
@@ -5,10 +5,10 @@ frappe.ui.form.on('POS Invoice Merge Log', {
setup: function(frm) {
frm.set_query("pos_invoice", "pos_invoices", doc => {
return{
- filters: {
+ filters: {
'docstatus': 1,
- 'customer': doc.customer,
- 'consolidated_invoice': ''
+ 'customer': doc.customer,
+ 'consolidated_invoice': ''
}
}
});
diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py
index 08e072e2049..e50d437ba6a 100644
--- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py
+++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py
@@ -354,4 +354,4 @@ def safe_load_json(message):
except Exception:
json_message = message
- return json_message
\ No newline at end of file
+ return json_message
diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py
index 040a815fab3..1b9659409c0 100644
--- a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py
+++ b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py
@@ -147,4 +147,3 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
frappe.set_user("Administrator")
frappe.db.sql("delete from `tabPOS Profile`")
frappe.db.sql("delete from `tabPOS Invoice`")
-
diff --git a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.js b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.js
index 372e75649b3..d23f348f04e 100644
--- a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.js
+++ b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.js
@@ -53,4 +53,4 @@ frappe.ui.form.on('POS Opening Entry', {
});
}
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py
index 0023a84a46e..3318fefab14 100644
--- a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py
+++ b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py
@@ -38,4 +38,4 @@ class POSOpeningEntry(StatusUpdater):
frappe.throw(msg.format(", ".join(invalid_modes)), title=_("Missing Account"))
def on_submit(self):
- self.set_status(update=True)
\ No newline at end of file
+ self.set_status(update=True)
diff --git a/erpnext/accounts/doctype/pos_opening_entry/test_pos_opening_entry.py b/erpnext/accounts/doctype/pos_opening_entry/test_pos_opening_entry.py
index 2e36391714b..c115be5ae94 100644
--- a/erpnext/accounts/doctype/pos_opening_entry/test_pos_opening_entry.py
+++ b/erpnext/accounts/doctype/pos_opening_entry/test_pos_opening_entry.py
@@ -21,8 +21,8 @@ def create_opening_entry(pos_profile, user):
balance_details.append(frappe._dict({
'mode_of_payment': d.mode_of_payment
}))
-
+
entry.set("balance_details", balance_details)
entry.submit()
-
- return entry.as_dict()
+
+ return entry.as_dict()
diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.py b/erpnext/accounts/doctype/pos_settings/pos_settings.py
index 913f49829c1..d925dd9d86e 100644
--- a/erpnext/accounts/doctype/pos_settings/pos_settings.py
+++ b/erpnext/accounts/doctype/pos_settings/pos_settings.py
@@ -8,4 +8,4 @@ from frappe.model.document import Document
class POSSettings(Document):
def validate(self):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
index 3173db13af3..680370b6af0 100644
--- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
@@ -615,4 +615,4 @@ def delete_existing_pricing_rules():
for doctype in ["Pricing Rule", "Pricing Rule Item Code",
"Pricing Rule Item Group", "Pricing Rule Brand"]:
- frappe.db.sql("delete from `tab{0}`".format(doctype))
\ No newline at end of file
+ frappe.db.sql("delete from `tab{0}`".format(doctype))
diff --git a/erpnext/accounts/doctype/pricing_rule/tests/test_pricing_rule.js b/erpnext/accounts/doctype/pricing_rule/tests/test_pricing_rule.js
index 8155e7d799a..8279b59cb41 100644
--- a/erpnext/accounts/doctype/pricing_rule/tests/test_pricing_rule.js
+++ b/erpnext/accounts/doctype/pricing_rule/tests/test_pricing_rule.js
@@ -26,4 +26,3 @@ QUnit.test("test pricing rule", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py b/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py
index 0eac73236e9..5e7583a9745 100644
--- a/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py
+++ b/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py
@@ -31,4 +31,4 @@ class ProcessDeferredAccounting(Document):
'against_voucher': self.name
})
- make_reverse_gl_entries(gl_entries=gl_entries)
\ No newline at end of file
+ make_reverse_gl_entries(gl_entries=gl_entries)
diff --git a/erpnext/accounts/doctype/process_deferred_accounting/test_process_deferred_accounting.py b/erpnext/accounts/doctype/process_deferred_accounting/test_process_deferred_accounting.py
index e08a0e5cc2b..03c269ac766 100644
--- a/erpnext/accounts/doctype/process_deferred_accounting/test_process_deferred_accounting.py
+++ b/erpnext/accounts/doctype/process_deferred_accounting/test_process_deferred_accounting.py
@@ -45,4 +45,4 @@ class TestProcessDeferredAccounting(unittest.TestCase):
["Sales - _TC", 0.0, 33.85, "2019-01-31"]
]
- check_gl_entries(self, si.name, expected_gle, "2019-01-10")
\ No newline at end of file
+ check_gl_entries(self, si.name, expected_gle, "2019-01-10")
diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py
index 500952e38ad..a12ea4033df 100644
--- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py
+++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py
@@ -284,4 +284,4 @@ def send_auto_email():
selected = frappe.get_list('Process Statement Of Accounts', filters={'to_date': format_date(today()), 'enable_auto_email': 1})
for entry in selected:
send_emails(entry.name, from_scheduler=True)
- return True
\ No newline at end of file
+ return True
diff --git a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.js b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.js
index 890a1871bdd..e840c79cd75 100644
--- a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.js
+++ b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.js
@@ -48,4 +48,4 @@ frappe.ui.form.on('Promotional Scheme', {
frm.doc.apply_on === key ? 1 : 0);
}
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme_dashboard.py b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme_dashboard.py
index 28c4c61b9fa..54fedb77387 100644
--- a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme_dashboard.py
+++ b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme_dashboard.py
@@ -9,4 +9,4 @@ def get_data():
'items': ['Pricing Rule']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py b/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py
index 7354ef036c5..286f7cf6edd 100644
--- a/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py
+++ b/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py
@@ -11,25 +11,25 @@ class TestPromotionalScheme(unittest.TestCase):
ps = make_promotional_scheme()
price_rules = frappe.get_all('Pricing Rule', fields = ["promotional_scheme_id", "name", "creation"],
filters = {'promotional_scheme': ps.name})
- self.assertTrue(len(price_rules),1)
+ self.assertTrue(len(price_rules),1)
price_doc_details = frappe.db.get_value('Pricing Rule', price_rules[0].name, ['customer', 'min_qty', 'discount_percentage'], as_dict = 1)
self.assertTrue(price_doc_details.customer, '_Test Customer')
self.assertTrue(price_doc_details.min_qty, 4)
self.assertTrue(price_doc_details.discount_percentage, 20)
ps.price_discount_slabs[0].min_qty = 6
- ps.append('customer', {
+ ps.append('customer', {
'customer': "_Test Customer 2"})
ps.save()
price_rules = frappe.get_all('Pricing Rule', fields = ["promotional_scheme_id", "name"],
filters = {'promotional_scheme': ps.name})
- self.assertTrue(len(price_rules), 2)
+ self.assertTrue(len(price_rules), 2)
price_doc_details = frappe.db.get_value('Pricing Rule', price_rules[1].name, ['customer', 'min_qty', 'discount_percentage'], as_dict = 1)
self.assertTrue(price_doc_details.customer, '_Test Customer 2')
self.assertTrue(price_doc_details.min_qty, 6)
self.assertTrue(price_doc_details.discount_percentage, 20)
-
+
price_doc_details = frappe.db.get_value('Pricing Rule', price_rules[0].name, ['customer', 'min_qty', 'discount_percentage'], as_dict = 1)
self.assertTrue(price_doc_details.customer, '_Test Customer')
self.assertTrue(price_doc_details.min_qty, 6)
@@ -38,7 +38,7 @@ class TestPromotionalScheme(unittest.TestCase):
price_rules = frappe.get_all('Pricing Rule', fields = ["promotional_scheme_id", "name"],
filters = {'promotional_scheme': ps.name})
self.assertEqual(price_rules, [])
-
+
def make_promotional_scheme():
ps = frappe.new_doc('Promotional Scheme')
ps.name = '_Test Scheme'
@@ -57,4 +57,4 @@ def make_promotional_scheme():
})
ps.save()
- return ps
\ No newline at end of file
+ return ps
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index 3b91118402c..6c74d2b438f 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -591,4 +591,4 @@ frappe.ui.form.on("Purchase Invoice", {
company: function(frm) {
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
},
-})
\ No newline at end of file
+})
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
index 173939df008..b6467a3d5ca 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
@@ -34,4 +34,4 @@ def get_data():
'items': ['Auto Repeat']
},
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
index 914a2457d45..771b49ac629 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
@@ -26,4 +26,4 @@ frappe.listview_settings['Purchase Invoice'] = {
return [__("Paid"), "green", "outstanding_amount,=,0"];
}
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.js
index b470051b51d..94b3b9ed338 100644
--- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.js
@@ -72,4 +72,3 @@ QUnit.test("test purchase invoice", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py
index bfaa849200e..d157837a7a5 100644
--- a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py
+++ b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class PurchaseInvoiceAdvance(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py
index a7489da316f..5854ddee940 100644
--- a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class PurchaseTaxesandCharges(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py
index 11c220bf2db..db9793d77a6 100644
--- a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py
@@ -19,4 +19,4 @@ def get_data():
'items': ['Supplier Quotation', 'Tax Rule']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.js b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.js
index c73f03b57bb..10b05d0594f 100644
--- a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.js
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.js
@@ -26,4 +26,3 @@ QUnit.test("test sales taxes and charges template", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/sales_invoice/regional/india_list.js b/erpnext/accounts/doctype/sales_invoice/regional/india_list.js
index ada665a0ca9..f01325d80bd 100644
--- a/erpnext/accounts/doctype/sales_invoice/regional/india_list.js
+++ b/erpnext/accounts/doctype/sales_invoice/regional/india_list.js
@@ -67,7 +67,7 @@ frappe.listview_settings['Sales Invoice'].onload = function (list_view) {
"default": "1-Duplicate",
"options": ["1-Duplicate", "2-Data Entry Error", "3-Order Cancelled", "4-Other"]
},
- {
+ {
"label": "Remark",
"fieldname": "remark",
"fieldtype": "Data",
@@ -82,7 +82,7 @@ frappe.listview_settings['Sales Invoice'].onload = function (list_view) {
const data = d.get_values();
frappe.call({
method: 'erpnext.regional.india.e_invoice.utils.cancel_irns',
- args: {
+ args: {
doctype: list_view.doctype,
docnames,
reason: data.reason.split('-')[0],
@@ -122,7 +122,7 @@ frappe.listview_settings['Sales Invoice'].onload = function (list_view) {
frappe.realtime.on("bulk_einvoice_generation_complete", (data) => {
const { failures, user, invoices } = data;
-
+
if (invoices.length != failures.length) {
frappe.msgprint({
message: __('{0} e-invoices generated successfully', [invoices.length]),
@@ -171,4 +171,4 @@ frappe.listview_settings['Sales Invoice'].onload = function (list_view) {
});
}
});
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/doctype/sales_invoice/regional/italy.js b/erpnext/accounts/doctype/sales_invoice/regional/italy.js
index 1c47d3ab9fd..21eb8ce6619 100644
--- a/erpnext/accounts/doctype/sales_invoice/regional/italy.js
+++ b/erpnext/accounts/doctype/sales_invoice/regional/italy.js
@@ -1,3 +1,3 @@
{% include "erpnext/regional/italy/sales_invoice.js" %}
-erpnext.setup_e_invoice_button('Sales Invoice')
\ No newline at end of file
+erpnext.setup_e_invoice_button('Sales Invoice')
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py
index f1069282edc..3238ead4316 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py
@@ -33,4 +33,4 @@ def get_data():
'items': ['Auto Repeat']
},
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice.js
index e12ac038500..61d78e1fe4b 100644
--- a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice.js
@@ -40,4 +40,3 @@ QUnit.test("test sales Invoice", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_margin.js b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_margin.js
index f1cb22a4976..cf2d0fbedba 100644
--- a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_margin.js
+++ b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_margin.js
@@ -33,4 +33,3 @@ QUnit.test("test sales invoice with margin", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment.js b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment.js
index 651bf0aa4ce..45d9a14bffb 100644
--- a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment.js
+++ b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment.js
@@ -54,4 +54,3 @@ QUnit.test("test sales Invoice with payment", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment_request.js b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment_request.js
index b959cf961b8..0464e4509f6 100644
--- a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment_request.js
+++ b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment_request.js
@@ -49,4 +49,3 @@ QUnit.test("test sales Invoice with payment request", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_serialize_item.js b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_serialize_item.js
index 2697758d7a3..af484d7899c 100644
--- a/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_serialize_item.js
+++ b/erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_serialize_item.js
@@ -42,4 +42,3 @@ QUnit.test("test sales Invoice with serialize item", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py
index 1ec517929ef..28aeef4d5e1 100644
--- a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py
+++ b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class SalesInvoiceAdvance(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py
index 8d1df5c19a3..b1de9d85fdb 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class SalesTaxesandCharges(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py
index d825c6fd325..522e282a170 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py
@@ -21,4 +21,4 @@ def get_data():
'items': ['POS Profile', 'Subscription', 'Restaurant', 'Tax Rule']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js b/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js
index d02e70b5419..8cd42f63a41 100644
--- a/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js
+++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js
@@ -26,4 +26,3 @@ QUnit.test("test sales taxes and charges template", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/share_transfer/share_transfer.js b/erpnext/accounts/doctype/share_transfer/share_transfer.js
index 1cad4dfae3d..6317c9c8c0d 100644
--- a/erpnext/accounts/doctype/share_transfer/share_transfer.js
+++ b/erpnext/accounts/doctype/share_transfer/share_transfer.js
@@ -115,4 +115,4 @@ erpnext.share_transfer.make_jv = function (frm) {
frappe.set_route("Form", doc.doctype, doc.name);
}
});
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/doctype/share_transfer/share_transfer.py b/erpnext/accounts/doctype/share_transfer/share_transfer.py
index 4024b8155a4..3d4543fb051 100644
--- a/erpnext/accounts/doctype/share_transfer/share_transfer.py
+++ b/erpnext/accounts/doctype/share_transfer/share_transfer.py
@@ -299,4 +299,4 @@ def make_jv_entry( company, account, amount, payment_account,\
"party": credit_applicant,
})
journal_entry.set("accounts", account_amt_list)
- return journal_entry.as_dict()
\ No newline at end of file
+ return journal_entry.as_dict()
diff --git a/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.js b/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.js
index 0201f762b37..63ea1bf35f4 100644
--- a/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.js
+++ b/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.js
@@ -34,4 +34,3 @@ QUnit.test("test Shipping Rule", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/shipping_rule/tests/test_shipping_rule_for_buying.js b/erpnext/accounts/doctype/shipping_rule/tests/test_shipping_rule_for_buying.js
index ab1b77cd5f5..f3668b8b406 100644
--- a/erpnext/accounts/doctype/shipping_rule/tests/test_shipping_rule_for_buying.js
+++ b/erpnext/accounts/doctype/shipping_rule/tests/test_shipping_rule_for_buying.js
@@ -34,4 +34,3 @@ QUnit.test("test Shipping Rule", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py b/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py
index dab59db70c3..db6ef117c22 100644
--- a/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py
+++ b/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py
@@ -9,4 +9,4 @@ import frappe
from frappe.model.document import Document
class ShippingRuleCondition(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/accounts/doctype/subscription/subscription_list.js b/erpnext/accounts/doctype/subscription/subscription_list.js
index c7325fb9f74..6490ff3776e 100644
--- a/erpnext/accounts/doctype/subscription/subscription_list.js
+++ b/erpnext/accounts/doctype/subscription/subscription_list.js
@@ -14,4 +14,4 @@ frappe.listview_settings['Subscription'] = {
return [__("Cancelled"), "gray"];
}
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/doctype/subscription/test_subscription.py b/erpnext/accounts/doctype/subscription/test_subscription.py
index 7c58e9865fd..4f2cf487a4f 100644
--- a/erpnext/accounts/doctype/subscription/test_subscription.py
+++ b/erpnext/accounts/doctype/subscription/test_subscription.py
@@ -630,5 +630,3 @@ class TestSubscription(unittest.TestCase):
subscription.process()
self.assertEqual(len(subscription.invoices), 1)
-
-
diff --git a/erpnext/accounts/doctype/subscription_plan/subscription_plan.js b/erpnext/accounts/doctype/subscription_plan/subscription_plan.js
index aaa32cfe7ef..7d6f2aed100 100644
--- a/erpnext/accounts/doctype/subscription_plan/subscription_plan.js
+++ b/erpnext/accounts/doctype/subscription_plan/subscription_plan.js
@@ -6,4 +6,4 @@ frappe.ui.form.on('Subscription Plan', {
frm.toggle_reqd("cost", frm.doc.price_determination === 'Fixed rate');
frm.toggle_reqd("price_list", frm.doc.price_determination === 'Based on price list');
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py
index 1ca442a4531..a341c2af6ac 100644
--- a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py
+++ b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py
@@ -54,4 +54,4 @@ def get_plan_rate(plan, quantity=1, customer=None, start_date=None, end_date=Non
cost -= (plan.cost * prorate_factor)
- return cost
\ No newline at end of file
+ return cost
diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py
index e4ebc6d12f9..58142318177 100644
--- a/erpnext/accounts/doctype/tax_rule/tax_rule.py
+++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py
@@ -188,4 +188,4 @@ def get_customer_group_condition(customer_group):
customer_groups = ["%s"%(frappe.db.escape(d.name)) for d in get_parent_customer_groups(customer_group)]
if customer_groups:
condition = ",".join(['%s'] * len(customer_groups))%(tuple(customer_groups))
- return condition
\ No newline at end of file
+ return condition
diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
index 481ef285e72..1536a237dec 100644
--- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
+++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
@@ -240,7 +240,7 @@ def get_deducted_tax(taxable_vouchers, fiscal_year, tax_details):
def get_tds_amount(ldc, parties, inv, tax_details, fiscal_year_details, tax_deducted, vouchers):
tds_amount = 0
invoice_filters = {
- 'name': ('in', vouchers),
+ 'name': ('in', vouchers),
'docstatus': 1
}
@@ -282,7 +282,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, fiscal_year_details, tax_dedu
tds_amount = get_ltds_amount(supp_credit_amt, 0, ldc.certificate_limit, ldc.rate, tax_details)
else:
tds_amount = supp_credit_amt * tax_details.rate / 100 if supp_credit_amt > 0 else 0
-
+
if cint(tax_details.round_off_tax_amount):
tds_amount = round(tds_amount)
diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py
index 2ba22ca4353..1c687e5cb15 100644
--- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py
+++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py
@@ -97,7 +97,7 @@ class TestTaxWithholdingCategory(unittest.TestCase):
pi.save()
pi.submit()
invoices.append(pi)
-
+
# Second Invoice will apply TDS checked
pi1 = create_purchase_invoice(supplier = "Test TDS Supplier3", rate = 20000)
pi1.submit()
diff --git a/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html b/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html
index e588ed6609e..4ac657d1ae6 100644
--- a/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html
+++ b/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html
@@ -73,4 +73,4 @@
-
\ No newline at end of file
+
diff --git a/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html b/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html
index 71c26e8c55a..7643eca7635 100644
--- a/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html
+++ b/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html
@@ -159,4 +159,4 @@
-
\ No newline at end of file
+
diff --git a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html
index 0ca940f8bd5..c1c611ee3a3 100644
--- a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html
+++ b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html
@@ -68,4 +68,4 @@
-
\ No newline at end of file
+
diff --git a/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html
index 283d505e3be..ae07582704c 100644
--- a/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html
+++ b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html
@@ -27,4 +27,3 @@
{{ _("Authorized Signatory") }}
-
diff --git a/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html b/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html
index 043ac254ed3..8696bffbfcb 100644
--- a/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html
+++ b/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html
@@ -103,4 +103,4 @@
-
\ No newline at end of file
+
diff --git a/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html b/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html
index a53b593a72a..efb2d00f0bf 100644
--- a/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html
+++ b/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html
@@ -93,4 +93,4 @@
-
\ No newline at end of file
+
diff --git a/erpnext/accounts/report/account_balance/test_account_balance.py b/erpnext/accounts/report/account_balance/test_account_balance.py
index 14ddf4a30fc..f5c9449e85d 100644
--- a/erpnext/accounts/report/account_balance/test_account_balance.py
+++ b/erpnext/accounts/report/account_balance/test_account_balance.py
@@ -62,8 +62,3 @@ def make_sales_invoice():
income_account = 'Sales - _TC2',
expense_account = 'Cost of Goods Sold - _TC2',
cost_center = 'Main - _TC2')
-
-
-
-
-
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js
index 6abd6e5cf77..b6c6689be0b 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.js
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js
@@ -136,4 +136,3 @@ frappe.query_reports["Accounts Payable"] = {
}
erpnext.utils.add_dimensions('Accounts Payable', 9);
-
diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js
index 9c6b0639c0a..ea200720dff 100644
--- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js
+++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js
@@ -105,4 +105,3 @@ frappe.query_reports["Accounts Payable Summary"] = {
}
erpnext.utils.add_dimensions('Accounts Payable Summary', 9);
-
diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.py b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.py
index 729eda9492f..c08582b564c 100644
--- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.py
+++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.py
@@ -12,4 +12,3 @@ def execute(filters=None):
"naming_by": ["Buying Settings", "supp_master_name"],
}
return AccountsReceivableSummary(filters).run(args)
-
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js
index 29c4f7d3941..1a32e2a8e06 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js
@@ -200,4 +200,3 @@ frappe.query_reports["Accounts Receivable"] = {
}
erpnext.utils.add_dimensions('Accounts Receivable', 9);
-
diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py
index 2ff5b531c51..cca67608238 100644
--- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py
@@ -93,4 +93,3 @@ def make_credit_note(docname):
cost_center = 'Main - _TC2',
is_return = 1,
return_against = docname)
-
diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
index 657b3e8f204..e94b30921f3 100644
--- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
+++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
@@ -134,4 +134,4 @@ class AccountsReceivableSummary(ReceivablePayableReport):
"{range2}-{range3}".format(range2=cint(self.filters["range2"])+ 1, range3=self.filters["range3"]),
"{range3}-{range4}".format(range3=cint(self.filters["range3"])+ 1, range4=self.filters["range4"]),
"{range4}-{above}".format(range4=cint(self.filters["range4"])+ 1, above=_("Above"))]):
- self.add_column(label=label, fieldname='range' + str(i+1))
\ No newline at end of file
+ self.add_column(label=label, fieldname='range' + str(i+1))
diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py
index 26bb44f4f7b..7838385dc56 100644
--- a/erpnext/accounts/report/balance_sheet/balance_sheet.py
+++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py
@@ -209,4 +209,4 @@ def get_chart_data(filters, columns, asset, liability, equity):
else:
chart["type"] = "line"
- return chart
\ No newline at end of file
+ return chart
diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js
index dbee0229737..f0b6c6b20ac 100644
--- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js
+++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js
@@ -22,7 +22,7 @@ frappe.query_reports["Bank Clearance Summary"] = {
"fieldtype": "Link",
"options": "Account",
"reqd": 1,
- "default": frappe.defaults.get_user_default("Company")?
+ "default": frappe.defaults.get_user_default("Company")?
locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"]: "",
"get_query": function() {
return {
diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py
index 79b0a6f30ec..95f724cc580 100644
--- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py
+++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py
@@ -74,19 +74,19 @@ def get_entries(filters):
journal_entries = frappe.db.sql("""SELECT
"Journal Entry", jv.name, jv.posting_date, jv.cheque_no,
jv.clearance_date, jvd.against_account, jvd.debit - jvd.credit
- FROM
+ FROM
`tabJournal Entry Account` jvd, `tabJournal Entry` jv
- WHERE
+ WHERE
jvd.parent = jv.name and jv.docstatus=1 and jvd.account = %(account)s {0}
order by posting_date DESC, jv.name DESC""".format(conditions), filters, as_list=1)
payment_entries = frappe.db.sql("""SELECT
- "Payment Entry", name, posting_date, reference_no, clearance_date, party,
+ "Payment Entry", name, posting_date, reference_no, clearance_date, party,
if(paid_from=%(account)s, paid_amount * -1, received_amount)
- FROM
+ FROM
`tabPayment Entry`
- WHERE
+ WHERE
docstatus=1 and (paid_from = %(account)s or paid_to = %(account)s) {0}
order by posting_date DESC, name DESC""".format(conditions), filters, as_list=1)
- return sorted(journal_entries + payment_entries, key=lambda k: k[2] or getdate(nowdate()))
\ No newline at end of file
+ return sorted(journal_entries + payment_entries, key=lambda k: k[2] or getdate(nowdate()))
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js
index 8f028496cd5..9bb6a14c677 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js
@@ -16,7 +16,7 @@ frappe.query_reports["Bank Reconciliation Statement"] = {
"label": __("Bank Account"),
"fieldtype": "Link",
"options": "Account",
- "default": frappe.defaults.get_user_default("Company")?
+ "default": frappe.defaults.get_user_default("Company")?
locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"]: "",
"reqd": 1,
"get_query": function() {
diff --git a/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py b/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py
index 2ce5d50edf4..2dcea22f7e6 100644
--- a/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py
+++ b/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py
@@ -104,4 +104,4 @@ def get_columns():
'fieldtype': 'Currency',
'width': 100
}
- ]
\ No newline at end of file
+ ]
diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js
index f547ca619bd..718b6e2fcb6 100644
--- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js
+++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js
@@ -92,4 +92,3 @@ frappe.query_reports["Budget Variance Report"] = {
erpnext.dimension_filters.forEach((dimension) => {
frappe.query_reports["Budget Variance Report"].filters[4].options.push(dimension["document_type"]);
});
-
diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py
index 9f0eee8aa5c..443126e4655 100644
--- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py
+++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py
@@ -78,7 +78,7 @@ def get_final_data(dimension, dimension_items, filters, period_month_ranges, dat
if filters["period"] != "Yearly" :
row += totals
data.append(row)
-
+
return data
@@ -388,7 +388,7 @@ def get_chart_data(filters, columns, data):
budget_values[i] += values[index]
actual_values[i] += values[index+1]
index += 3
-
+
return {
'data': {
'labels': labels,
@@ -399,4 +399,3 @@ def get_chart_data(filters, columns, data):
},
'type' : 'bar'
}
-
diff --git a/erpnext/accounts/report/cash_flow/cash_flow.html b/erpnext/accounts/report/cash_flow/cash_flow.html
index 40ba20c4ac6..d4ae54d4f38 100644
--- a/erpnext/accounts/report/cash_flow/cash_flow.html
+++ b/erpnext/accounts/report/cash_flow/cash_flow.html
@@ -1 +1 @@
-{% include "accounts/report/financial_statements.html" %}
\ No newline at end of file
+{% include "accounts/report/financial_statements.html" %}
diff --git a/erpnext/accounts/report/cash_flow/cash_flow.js b/erpnext/accounts/report/cash_flow/cash_flow.js
index a984bf46b50..a2c34c6ee26 100644
--- a/erpnext/accounts/report/cash_flow/cash_flow.js
+++ b/erpnext/accounts/report/cash_flow/cash_flow.js
@@ -21,4 +21,4 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
"default": 1
}
);
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js
index 1363b53746a..6a8301a6f91 100644
--- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js
+++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js
@@ -94,10 +94,10 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
"default": 1
}
],
- "formatter": function(value, row, column, data, default_formatter) {
+ "formatter": function(value, row, column, data, default_formatter) {
if (data && column.fieldname=="account") {
value = data.account_name || value;
-
+
column.link_onclick =
"erpnext.financial_statements.open_general_ledger(" + JSON.stringify(data) + ")";
column.is_tree = true;
@@ -126,4 +126,4 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
});
}
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py
index 515fd995e66..9953d8fcaf5 100644
--- a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py
+++ b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py
@@ -105,4 +105,4 @@ def get_column():
def get_args():
return {'doctype': 'Delivery Note', 'party': 'customer',
- 'date': 'posting_date', 'order': 'name', 'order_by': 'desc'}
\ No newline at end of file
+ 'date': 'posting_date', 'order': 'name', 'order_by': 'desc'}
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js
index 4a551b80124..095f5eda66a 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.js
+++ b/erpnext/accounts/report/general_ledger/general_ledger.js
@@ -176,4 +176,3 @@ frappe.query_reports["General Ledger"] = {
}
erpnext.utils.add_dimensions('General Ledger', 15)
-
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index 1759fa3a48f..5d8d49d6a65 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -48,7 +48,7 @@ def validate_filters(filters, account_details):
if not filters.get("from_date") and not filters.get("to_date"):
frappe.throw(_("{0} and {1} are mandatory").format(frappe.bold(_("From Date")), frappe.bold(_("To Date"))))
-
+
if filters.get('account'):
filters.account = frappe.parse_json(filters.get('account'))
for account in filters.account:
@@ -92,7 +92,7 @@ def set_account_currency(filters):
account_currency = None
if filters.get("account"):
- if len(filters.get("account")) == 1:
+ if len(filters.get("account")) == 1:
account_currency = get_account_currency(filters.account[0])
else:
currency = get_account_currency(filters.account[0])
diff --git a/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.html b/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.html
index 40ba20c4ac6..d4ae54d4f38 100644
--- a/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.html
+++ b/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.html
@@ -1 +1 @@
-{% include "accounts/report/financial_statements.html" %}
\ No newline at end of file
+{% include "accounts/report/financial_statements.html" %}
diff --git a/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.py b/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.py
index 714e48d279b..8e33af7ee8e 100644
--- a/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.py
+++ b/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.py
@@ -165,4 +165,4 @@ def get_net_profit(non_gross_income, gross_income, gross_expense, non_gross_expe
has_value=True
if has_value:
- return profit_loss
\ No newline at end of file
+ return profit_loss
diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
index 08065a204ef..c9c22c246ed 100644
--- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
+++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
@@ -626,7 +626,3 @@ def add_sub_total_row(item, total_row_map, group_by_value, tax_columns):
for tax in tax_columns:
total_row.setdefault(frappe.scrub(tax + ' Amount'), 0.0)
total_row[frappe.scrub(tax + ' Amount')] += flt(item[frappe.scrub(tax + ' Amount')])
-
-
-
-
diff --git a/erpnext/accounts/report/non_billed_report.py b/erpnext/accounts/report/non_billed_report.py
index 2e18ce11ddc..51735056896 100644
--- a/erpnext/accounts/report/non_billed_report.py
+++ b/erpnext/accounts/report/non_billed_report.py
@@ -44,4 +44,4 @@ def get_ordered_to_be_billed_data(args):
def get_project_field(doctype, party):
if party == "supplier": doctype = doctype + ' Item'
- return "`tab%s`.project"%(doctype)
\ No newline at end of file
+ return "`tab%s`.project"%(doctype)
diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py
index 7195c7e0b8b..556f5ad4f79 100644
--- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py
+++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py
@@ -40,7 +40,7 @@ def execute(filters=None):
row = [
d.voucher_type, d.voucher_no, d.party_type, d.party, d.posting_date, d.against_voucher,
- invoice.posting_date, invoice.due_date, d.debit, d.credit, d.remarks,
+ invoice.posting_date, invoice.due_date, d.debit, d.credit, d.remarks,
d.age, d.range1, d.range2, d.range3, d.range4
]
diff --git a/erpnext/accounts/report/pos_register/pos_register.py b/erpnext/accounts/report/pos_register/pos_register.py
index 6a42bb4fb65..b7e112c0c9a 100644
--- a/erpnext/accounts/report/pos_register/pos_register.py
+++ b/erpnext/accounts/report/pos_register/pos_register.py
@@ -10,7 +10,7 @@ from erpnext.accounts.report.sales_register.sales_register import get_mode_of_pa
def execute(filters=None):
if not filters:
return [], []
-
+
validate_filters(filters)
columns = get_columns(filters)
@@ -29,7 +29,7 @@ def execute(filters=None):
invoice_map, grouped_data = {}, []
for d in pos_entries:
invoice_map.setdefault(d[group_by_field], []).append(d)
-
+
for key in invoice_map:
invoices = invoice_map[key]
grouped_data += invoices
@@ -56,7 +56,7 @@ def get_pos_entries(filters, group_by_field):
return frappe.db.sql(
"""
- SELECT
+ SELECT
p.posting_date, p.name as pos_invoice, p.pos_profile,
p.owner, p.base_grand_total as grand_total, p.base_paid_amount as paid_amount,
p.customer, p.is_return {select_mop_field}
@@ -96,22 +96,22 @@ def add_subtotal_row(data, group_invoices, group_by_field, group_by_value):
def validate_filters(filters):
if not filters.get("company"):
frappe.throw(_("{0} is mandatory").format(_("Company")))
-
+
if not filters.get("from_date") and not filters.get("to_date"):
frappe.throw(_("{0} and {1} are mandatory").format(frappe.bold(_("From Date")), frappe.bold(_("To Date"))))
-
+
if filters.from_date > filters.to_date:
frappe.throw(_("From Date must be before To Date"))
if (filters.get("pos_profile") and filters.get("group_by") == _('POS Profile')):
frappe.throw(_("Can not filter based on POS Profile, if grouped by POS Profile"))
-
+
if (filters.get("customer") and filters.get("group_by") == _('Customer')):
frappe.throw(_("Can not filter based on Customer, if grouped by Customer"))
-
+
if (filters.get("owner") and filters.get("group_by") == _('Cashier')):
frappe.throw(_("Can not filter based on Cashier, if grouped by Cashier"))
-
+
if (filters.get("mode_of_payment") and filters.get("group_by") == _('Payment Method')):
frappe.throw(_("Can not filter based on Payment Method, if grouped by Payment Method"))
@@ -120,23 +120,23 @@ def get_conditions(filters):
if filters.get("pos_profile"):
conditions += " AND pos_profile = %(pos_profile)s"
-
+
if filters.get("owner"):
conditions += " AND owner = %(owner)s"
-
+
if filters.get("customer"):
conditions += " AND customer = %(customer)s"
-
+
if filters.get("is_return"):
conditions += " AND is_return = %(is_return)s"
-
+
if filters.get("mode_of_payment"):
conditions += """
AND EXISTS(
SELECT name FROM `tabSales Invoice Payment` sip
WHERE parent=p.name AND ifnull(sip.mode_of_payment, '') = %(mode_of_payment)s
)"""
-
+
return conditions
def get_group_by_field(group_by):
@@ -150,7 +150,7 @@ def get_group_by_field(group_by):
group_by_field = "customer"
elif group_by == "Payment Method":
group_by_field = "mode_of_payment"
-
+
return group_by_field
def get_columns(filters):
@@ -217,4 +217,4 @@ def get_columns(filters):
},
]
- return columns
\ No newline at end of file
+ return columns
diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.html b/erpnext/accounts/report/profitability_analysis/profitability_analysis.html
index 40ba20c4ac6..d4ae54d4f38 100644
--- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.html
+++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.html
@@ -1 +1 @@
-{% include "accounts/report/financial_statements.html" %}
\ No newline at end of file
+{% include "accounts/report/financial_statements.html" %}
diff --git a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js
index a95cfacaeef..feab96f2652 100644
--- a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js
+++ b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.js
@@ -5,4 +5,4 @@ frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() {
frappe.query_reports["Purchase Invoice Trends"] = {
filters: erpnext.get_purchase_trends_filters()
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py
index ad3783f0de1..ba236b9969d 100644
--- a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py
+++ b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py
@@ -11,4 +11,4 @@ def execute(filters=None):
conditions = get_columns(filters, "Purchase Invoice")
data = get_data(filters, conditions)
- return conditions["columns"], data
\ No newline at end of file
+ return conditions["columns"], data
diff --git a/erpnext/accounts/report/purchase_register/purchase_register.js b/erpnext/accounts/report/purchase_register/purchase_register.js
index f34ea571639..aaf76c42997 100644
--- a/erpnext/accounts/report/purchase_register/purchase_register.js
+++ b/erpnext/accounts/report/purchase_register/purchase_register.js
@@ -56,4 +56,4 @@ frappe.query_reports["Purchase Register"] = {
]
}
-erpnext.utils.add_dimensions('Purchase Register', 7);
\ No newline at end of file
+erpnext.utils.add_dimensions('Purchase Register', 7);
diff --git a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py
index e9e9c9c4e69..a5eced5f80b 100644
--- a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py
+++ b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py
@@ -105,4 +105,4 @@ def get_column():
def get_args():
return {'doctype': 'Purchase Receipt', 'party': 'supplier',
- 'date': 'posting_date', 'order': 'name', 'order_by': 'desc'}
\ No newline at end of file
+ 'date': 'posting_date', 'order': 'name', 'order_by': 'desc'}
diff --git a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.js b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.js
index 2d320f52cfa..e3d43a7de1e 100644
--- a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.js
+++ b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.js
@@ -5,4 +5,4 @@ frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
frappe.query_reports["Sales Invoice Trends"] = {
filters: erpnext.get_sales_trends_filters()
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js
index 068926b063d..44e20e83c50 100644
--- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js
+++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js
@@ -42,4 +42,4 @@ frappe.query_reports["Sales Payment Summary"] = {
"fieldtype": "Check"
},
]
-};
\ No newline at end of file
+};
diff --git a/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py
index a51c4276301..e4a3d3527fd 100644
--- a/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py
+++ b/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py
@@ -162,4 +162,4 @@ def create_records():
"price_list": "Standard Selling",
"item_code": item.item_code,
"price_list_rate": 10000
- }).insert()
\ No newline at end of file
+ }).insert()
diff --git a/erpnext/accounts/report/sales_register/sales_register.js b/erpnext/accounts/report/sales_register/sales_register.js
index 85bbceab827..2c9b01bbaa3 100644
--- a/erpnext/accounts/report/sales_register/sales_register.js
+++ b/erpnext/accounts/report/sales_register/sales_register.js
@@ -69,4 +69,3 @@ frappe.query_reports["Sales Register"] = {
}
erpnext.utils.add_dimensions('Sales Register', 7);
-
diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py
index d2c23ee4e78..fbd25b13bb5 100644
--- a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py
+++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py
@@ -10,4 +10,4 @@ def execute(filters=None):
"party_type": "Supplier",
"naming_by": ["Buying Settings", "supp_master_name"],
}
- return PartyLedgerSummaryReport(filters).run(args)
\ No newline at end of file
+ return PartyLedgerSummaryReport(filters).run(args)
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.js b/erpnext/accounts/report/trial_balance/trial_balance.js
index 8645d55d0fe..078b06519f1 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.js
+++ b/erpnext/accounts/report/trial_balance/trial_balance.js
@@ -110,6 +110,3 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
erpnext.utils.add_dimensions('Trial Balance', 6);
});
-
-
-
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py
index 33360e2b01e..1fc0faab3a7 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.py
+++ b/erpnext/accounts/report/trial_balance/trial_balance.py
@@ -321,4 +321,4 @@ def prepare_opening_closing(row):
row[reverse_col] = abs(row[valid_col])
row[valid_col] = 0.0
else:
- row[reverse_col] = 0.0
\ No newline at end of file
+ row[reverse_col] = 0.0
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 78c7e439d38..f034e7450ee 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
@@ -242,4 +242,4 @@ def is_party_name_visible(filters):
else:
show_party_name = True
- return show_party_name
\ No newline at end of file
+ return show_party_name
diff --git a/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py
index eee620b7cc8..1250d676a06 100644
--- a/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py
+++ b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py
@@ -20,11 +20,11 @@ def get_unclaimed_expese_claims(filters):
if filters.get("employee"):
cond = "ec.employee = %(employee)s"
- return frappe.db.sql("""
+ return frappe.db.sql("""
select
ec.employee, ec.employee_name, ec.name, ec.total_sanctioned_amount, ec.total_amount_reimbursed,
sum(gle.credit_in_account_currency - gle.debit_in_account_currency) as outstanding_amt
- from
+ from
`tabExpense Claim` ec, `tabGL Entry` gle
where
gle.against_voucher_type = "Expense Claim" and gle.against_voucher = ec.name
diff --git a/erpnext/agriculture/doctype/crop/crop.js b/erpnext/agriculture/doctype/crop/crop.js
index afd84fd9f66..550824636b6 100644
--- a/erpnext/agriculture/doctype/crop/crop.js
+++ b/erpnext/agriculture/doctype/crop/crop.js
@@ -52,4 +52,4 @@ erpnext.crop.update_item_qty_amount = function(frm, cdt, cdn) {
}
});
});
-};
\ No newline at end of file
+};
diff --git a/erpnext/agriculture/doctype/crop/crop_dashboard.py b/erpnext/agriculture/doctype/crop/crop_dashboard.py
index 9a8f26fe90c..8f37735c812 100644
--- a/erpnext/agriculture/doctype/crop/crop_dashboard.py
+++ b/erpnext/agriculture/doctype/crop/crop_dashboard.py
@@ -9,4 +9,4 @@ def get_data():
'items': ['Crop Cycle']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/agriculture/doctype/crop/test_crop.js b/erpnext/agriculture/doctype/crop/test_crop.js
index 138acbf85a3..40555634a2c 100644
--- a/erpnext/agriculture/doctype/crop/test_crop.js
+++ b/erpnext/agriculture/doctype/crop/test_crop.js
@@ -105,7 +105,7 @@ QUnit.test("test: Crop", function (assert) {
]
]}
]),
- // agriculture task list
+ // agriculture task list
() => {
assert.equal(cur_frm.doc.name, 'Basil from seed');
assert.equal(cur_frm.doc.period, 15);
diff --git a/erpnext/agriculture/doctype/crop/test_crop.py b/erpnext/agriculture/doctype/crop/test_crop.py
index c2e49174047..b3079837c35 100644
--- a/erpnext/agriculture/doctype/crop/test_crop.py
+++ b/erpnext/agriculture/doctype/crop/test_crop.py
@@ -11,4 +11,4 @@ test_dependencies = ["Fertilizer"]
class TestCrop(unittest.TestCase):
def test_crop_period(self):
basil = frappe.get_doc('Crop', 'Basil from seed')
- self.assertEqual(basil.period, 15)
\ No newline at end of file
+ self.assertEqual(basil.period, 15)
diff --git a/erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.js b/erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.js
index 464a3680baa..87184daedc9 100644
--- a/erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.js
+++ b/erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.js
@@ -19,7 +19,7 @@ QUnit.test("test: Crop Cycle", function (assert) {
{disease: 'Aphids'}
]
]},
- {linked_land_unit: [
+ {linked_land_unit: [
[
{land_unit: 'Basil Farm'}
]
diff --git a/erpnext/agriculture/doctype/disease/disease.py b/erpnext/agriculture/doctype/disease/disease.py
index c7707a54652..affa57046e5 100644
--- a/erpnext/agriculture/doctype/disease/disease.py
+++ b/erpnext/agriculture/doctype/disease/disease.py
@@ -17,4 +17,4 @@ class Disease(Document):
frappe.throw(_("Start day is greater than end day in task '{0}'").format(task.task_name))
# to calculate the period of the Crop Cycle
if task.end_day > max_period: max_period = task.end_day
- self.treatment_period = max_period
\ No newline at end of file
+ self.treatment_period = max_period
diff --git a/erpnext/agriculture/doctype/disease/test_disease.js b/erpnext/agriculture/doctype/disease/test_disease.js
index 57d62c16c25..33f60c4e152 100644
--- a/erpnext/agriculture/doctype/disease/test_disease.js
+++ b/erpnext/agriculture/doctype/disease/test_disease.js
@@ -36,4 +36,3 @@ QUnit.test("test: Disease", function (assert) {
]);
});
-
diff --git a/erpnext/agriculture/doctype/disease/test_disease.py b/erpnext/agriculture/doctype/disease/test_disease.py
index 54788a2c817..80861770b0d 100644
--- a/erpnext/agriculture/doctype/disease/test_disease.py
+++ b/erpnext/agriculture/doctype/disease/test_disease.py
@@ -9,4 +9,4 @@ import unittest
class TestDisease(unittest.TestCase):
def test_treatment_period(self):
disease = frappe.get_doc('Disease', 'Aphids')
- self.assertEqual(disease.treatment_period, 3)
\ No newline at end of file
+ self.assertEqual(disease.treatment_period, 3)
diff --git a/erpnext/agriculture/doctype/fertilizer/fertilizer.py b/erpnext/agriculture/doctype/fertilizer/fertilizer.py
index 9cb492aff1e..c475f002981 100644
--- a/erpnext/agriculture/doctype/fertilizer/fertilizer.py
+++ b/erpnext/agriculture/doctype/fertilizer/fertilizer.py
@@ -11,4 +11,4 @@ class Fertilizer(Document):
def load_contents(self):
docs = frappe.get_all("Agriculture Analysis Criteria", filters={'linked_doctype':'Fertilizer'})
for doc in docs:
- self.append('fertilizer_contents', {'title': str(doc.name)})
\ No newline at end of file
+ self.append('fertilizer_contents', {'title': str(doc.name)})
diff --git a/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py b/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py
index 3a25b3f0a7a..4c71d33fe80 100644
--- a/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py
+++ b/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py
@@ -8,4 +8,4 @@ import unittest
class TestFertilizer(unittest.TestCase):
def test_fertilizer_creation(self):
- self.assertEqual(frappe.db.exists('Fertilizer', 'Urea'), 'Urea')
\ No newline at end of file
+ self.assertEqual(frappe.db.exists('Fertilizer', 'Urea'), 'Urea')
diff --git a/erpnext/agriculture/doctype/plant_analysis/plant_analysis.py b/erpnext/agriculture/doctype/plant_analysis/plant_analysis.py
index 2806cc6523e..b65f93de0a0 100644
--- a/erpnext/agriculture/doctype/plant_analysis/plant_analysis.py
+++ b/erpnext/agriculture/doctype/plant_analysis/plant_analysis.py
@@ -12,4 +12,4 @@ class PlantAnalysis(Document):
def load_contents(self):
docs = frappe.get_all("Agriculture Analysis Criteria", filters={'linked_doctype':'Plant Analysis'})
for doc in docs:
- self.append('plant_analysis_criteria', {'title': str(doc.name)})
\ No newline at end of file
+ self.append('plant_analysis_criteria', {'title': str(doc.name)})
diff --git a/erpnext/agriculture/doctype/soil_analysis/soil_analysis.py b/erpnext/agriculture/doctype/soil_analysis/soil_analysis.py
index 37835f8c7b1..234d0d4b011 100644
--- a/erpnext/agriculture/doctype/soil_analysis/soil_analysis.py
+++ b/erpnext/agriculture/doctype/soil_analysis/soil_analysis.py
@@ -11,4 +11,4 @@ class SoilAnalysis(Document):
def load_contents(self):
docs = frappe.get_all("Agriculture Analysis Criteria", filters={'linked_doctype':'Soil Analysis'})
for doc in docs:
- self.append('soil_analysis_criteria', {'title': str(doc.name)})
\ No newline at end of file
+ self.append('soil_analysis_criteria', {'title': str(doc.name)})
diff --git a/erpnext/agriculture/doctype/soil_texture/test_soil_texture.py b/erpnext/agriculture/doctype/soil_texture/test_soil_texture.py
index 937c06ccadf..16d105c9c58 100644
--- a/erpnext/agriculture/doctype/soil_texture/test_soil_texture.py
+++ b/erpnext/agriculture/doctype/soil_texture/test_soil_texture.py
@@ -11,4 +11,4 @@ class TestSoilTexture(unittest.TestCase):
soil_tex = frappe.get_all('Soil Texture', fields=['name'], filters={'collection_datetime': '2017-11-08'})
doc = frappe.get_doc('Soil Texture', soil_tex[0].name)
self.assertEqual(doc.silt_composition, 50)
- self.assertEqual(doc.soil_type, 'Silt Loam')
\ No newline at end of file
+ self.assertEqual(doc.soil_type, 'Silt Loam')
diff --git a/erpnext/agriculture/doctype/water_analysis/water_analysis.py b/erpnext/agriculture/doctype/water_analysis/water_analysis.py
index d9f007cea13..cb2691d4555 100644
--- a/erpnext/agriculture/doctype/water_analysis/water_analysis.py
+++ b/erpnext/agriculture/doctype/water_analysis/water_analysis.py
@@ -24,4 +24,4 @@ class WaterAnalysis(Document):
if self.collection_datetime > self.laboratory_testing_datetime:
frappe.throw(_('Lab testing datetime cannot be before collection datetime'))
if self.laboratory_testing_datetime > self.result_datetime:
- frappe.throw(_('Lab result datetime cannot be before testing datetime'))
\ No newline at end of file
+ frappe.throw(_('Lab result datetime cannot be before testing datetime'))
diff --git a/erpnext/agriculture/setup.py b/erpnext/agriculture/setup.py
index ab91343d5d1..75f07be5de2 100644
--- a/erpnext/agriculture/setup.py
+++ b/erpnext/agriculture/setup.py
@@ -426,5 +426,5 @@ def create_agriculture_data():
title='Degree Days',
standard=1,
linked_doctype='Weather')
- ]
+ ]
insert_record(records)
diff --git a/erpnext/assets/dashboard_fixtures.py b/erpnext/assets/dashboard_fixtures.py
index 7f3c1de406a..2c701796072 100644
--- a/erpnext/assets/dashboard_fixtures.py
+++ b/erpnext/assets/dashboard_fixtures.py
@@ -176,4 +176,4 @@ def get_number_cards(fiscal_year, year_start_date, year_end_date):
"filters_json": "[]",
"doctype": "Number Card"
}
- ]
\ No newline at end of file
+ ]
diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js
index 922cc4a7b26..da5778ea3d5 100644
--- a/erpnext/assets/doctype/asset/asset.js
+++ b/erpnext/assets/doctype/asset/asset.js
@@ -103,11 +103,11 @@ frappe.ui.form.on('Asset', {
frm.trigger("create_asset_maintenance");
}, __("Manage"));
}
-
+
frm.add_custom_button(__("Repair Asset"), function() {
frm.trigger("create_asset_repair");
}, __("Manage"));
-
+
if (frm.doc.status != 'Fully Depreciated') {
frm.add_custom_button(__("Adjust Asset Value"), function() {
frm.trigger("create_asset_adjustment");
diff --git a/erpnext/assets/doctype/asset/asset_dashboard.py b/erpnext/assets/doctype/asset/asset_dashboard.py
index a5cf23803d2..62bb4be53aa 100644
--- a/erpnext/assets/doctype/asset/asset_dashboard.py
+++ b/erpnext/assets/doctype/asset/asset_dashboard.py
@@ -11,4 +11,4 @@ def get_data():
'items': ['Asset Movement']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/assets/doctype/asset/asset_list.js b/erpnext/assets/doctype/asset/asset_list.js
index 02f39e0e7f4..4302cb2c518 100644
--- a/erpnext/assets/doctype/asset/asset_list.js
+++ b/erpnext/assets/doctype/asset/asset_list.js
@@ -50,4 +50,4 @@ frappe.listview_settings['Asset'] = {
});
});
},
-}
\ No newline at end of file
+}
diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py
index e23a7154524..605ce2e2503 100644
--- a/erpnext/assets/doctype/asset/test_asset.py
+++ b/erpnext/assets/doctype/asset/test_asset.py
@@ -763,4 +763,4 @@ def set_depreciation_settings_in_company():
company.save()
# Enable booking asset depreciation entry automatically
- frappe.db.set_value("Accounts Settings", None, "book_asset_depreciation_entry_automatically", 1)
\ No newline at end of file
+ frappe.db.set_value("Accounts Settings", None, "book_asset_depreciation_entry_automatically", 1)
diff --git a/erpnext/assets/doctype/asset_category/asset_category.py b/erpnext/assets/doctype/asset_category/asset_category.py
index 46620d56e98..39032d637b5 100644
--- a/erpnext/assets/doctype/asset_category/asset_category.py
+++ b/erpnext/assets/doctype/asset_category/asset_category.py
@@ -20,7 +20,7 @@ class AssetCategory(Document):
for field in ("Total Number of Depreciations", "Frequency of Depreciation"):
if cint(d.get(frappe.scrub(field)))<1:
frappe.throw(_("Row {0}: {1} must be greater than 0").format(d.idx, field), frappe.MandatoryError)
-
+
def validate_account_currency(self):
account_types = [
'fixed_asset_account', 'accumulated_depreciation_account', 'depreciation_expense_account', 'capital_work_in_progress_account'
@@ -33,13 +33,13 @@ class AssetCategory(Document):
account_currency = frappe.get_value("Account", d.get(type_of_account), "account_currency")
if account_currency != company_currency:
invalid_accounts.append(frappe._dict({ 'type': type_of_account, 'idx': d.idx, 'account': d.get(type_of_account) }))
-
+
for d in invalid_accounts:
frappe.throw(_("Row #{}: Currency of {} - {} doesn't matches company currency.")
.format(d.idx, frappe.bold(frappe.unscrub(d.type)), frappe.bold(d.account)),
title=_("Invalid Account"))
-
+
def validate_account_types(self):
account_type_map = {
'fixed_asset_account': { 'account_type': 'Fixed Asset' },
@@ -59,12 +59,12 @@ class AssetCategory(Document):
frappe.throw(_("Row #{}: {} of {} should be {}. Please modify the account or select a different account.")
.format(d.idx, frappe.unscrub(key_to_match), frappe.bold(selected_account), frappe.bold(expected_key_type)),
title=_("Invalid Account"))
-
+
def valide_cwip_account(self):
if self.enable_cwip_accounting:
missing_cwip_accounts_for_company = []
for d in self.accounts:
- if (not d.capital_work_in_progress_account and
+ if (not d.capital_work_in_progress_account and
not frappe.db.get_value("Company", d.company_name, "capital_work_in_progress_account")):
missing_cwip_accounts_for_company.append(get_link_to_form("Company", d.company_name))
@@ -93,4 +93,4 @@ def get_asset_category_account(fieldname, item=None, asset=None, account=None, a
account = frappe.db.get_value("Asset Category Account",
filters={"parent": asset_category, "company_name": company}, fieldname=fieldname)
- return account
\ No newline at end of file
+ return account
diff --git a/erpnext/assets/doctype/asset_category/test_asset_category.py b/erpnext/assets/doctype/asset_category/test_asset_category.py
index 39b79d6c507..9f7ada65d82 100644
--- a/erpnext/assets/doctype/asset_category/test_asset_category.py
+++ b/erpnext/assets/doctype/asset_category/test_asset_category.py
@@ -10,9 +10,9 @@ class TestAssetCategory(unittest.TestCase):
def test_mandatory_fields(self):
asset_category = frappe.new_doc("Asset Category")
asset_category.asset_category_name = "Computers"
-
+
self.assertRaises(frappe.MandatoryError, asset_category.insert)
-
+
asset_category.total_number_of_depreciations = 3
asset_category.frequency_of_depreciation = 3
asset_category.append("accounts", {
@@ -21,7 +21,7 @@ class TestAssetCategory(unittest.TestCase):
"accumulated_depreciation_account": "_Test Accumulated Depreciations - _TC",
"depreciation_expense_account": "_Test Depreciations - _TC"
})
-
+
try:
asset_category.insert()
except frappe.DuplicateEntryError:
@@ -44,4 +44,4 @@ class TestAssetCategory(unittest.TestCase):
"depreciation_expense_account": "_Test Depreciations - _TC"
})
- self.assertRaises(frappe.ValidationError, asset_category.insert)
\ No newline at end of file
+ self.assertRaises(frappe.ValidationError, asset_category.insert)
diff --git a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.js b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.js
index 70b8654509f..52996e93475 100644
--- a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.js
+++ b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.js
@@ -97,4 +97,4 @@ var get_next_due_date = function (frm, cdt, cdn) {
}
});
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py
index a506deec93e..e14f1d88dcb 100644
--- a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py
+++ b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py
@@ -116,4 +116,4 @@ def get_maintenance_log(asset_name):
select maintenance_status, count(asset_name) as count, asset_name
from `tabAsset Maintenance Log`
where asset_name=%s group by maintenance_status""",
- (asset_name), as_dict=1)
\ No newline at end of file
+ (asset_name), as_dict=1)
diff --git a/erpnext/assets/doctype/asset_maintenance/test_asset_maintenance.py b/erpnext/assets/doctype/asset_maintenance/test_asset_maintenance.py
index 392fbdd2af7..7610152039d 100644
--- a/erpnext/assets/doctype/asset_maintenance/test_asset_maintenance.py
+++ b/erpnext/assets/doctype/asset_maintenance/test_asset_maintenance.py
@@ -73,7 +73,7 @@ def create_asset_data():
'doctype': 'Location',
'location_name': 'Test Location'
}).insert()
-
+
if not frappe.db.exists("Item", "Photocopier"):
meta = frappe.get_meta('Asset')
naming_series = meta.get_field("naming_series").options
@@ -157,6 +157,6 @@ def set_depreciation_settings_in_company():
company.disposal_account = "_Test Gain/Loss on Asset Disposal - _TC"
company.depreciation_cost_center = "_Test Cost Center - _TC"
company.save()
-
+
# Enable booking asset depreciation entry automatically
- frappe.db.set_value("Accounts Settings", None, "book_asset_depreciation_entry_automatically", 1)
\ No newline at end of file
+ frappe.db.set_value("Accounts Settings", None, "book_asset_depreciation_entry_automatically", 1)
diff --git a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.js b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.js
index c5db90ad370..bcdc3acf0ac 100644
--- a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.js
+++ b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.js
@@ -12,4 +12,4 @@ frappe.ui.form.on('Asset Maintenance Log', {
};
});
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/assets/doctype/asset_movement/asset_movement.js b/erpnext/assets/doctype/asset_movement/asset_movement.js
index 06d8879091c..2df7db97446 100644
--- a/erpnext/assets/doctype/asset_movement/asset_movement.js
+++ b/erpnext/assets/doctype/asset_movement/asset_movement.js
@@ -99,4 +99,4 @@ frappe.ui.form.on('Asset Movement Item', {
});
}
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/assets/doctype/asset_movement/asset_movement.py b/erpnext/assets/doctype/asset_movement/asset_movement.py
index b2de250b168..1771e27ddfe 100644
--- a/erpnext/assets/doctype/asset_movement/asset_movement.py
+++ b/erpnext/assets/doctype/asset_movement/asset_movement.py
@@ -40,14 +40,14 @@ class AssetMovement(Document):
if current_location != d.source_location:
frappe.throw(_("Asset {0} does not belongs to the location {1}").
format(d.asset, d.source_location))
-
+
if self.purpose == 'Issue':
if d.target_location:
frappe.throw(_("Issuing cannot be done to a location. \
Please enter employee who has issued Asset {0}").format(d.asset), title="Incorrect Movement Purpose")
if not d.to_employee:
frappe.throw(_("Employee is required while issuing Asset {0}").format(d.asset))
-
+
if self.purpose == 'Transfer':
if d.to_employee:
frappe.throw(_("Transferring cannot be done to an Employee. \
@@ -57,7 +57,7 @@ class AssetMovement(Document):
frappe.throw(_("Target Location is required while transferring Asset {0}").format(d.asset))
if d.source_location == d.target_location:
frappe.throw(_("Source and Target Location cannot be same"))
-
+
if self.purpose == 'Receipt':
# only when asset is bought and first entry is made
if not d.source_location and not (d.target_location or d.to_employee):
@@ -80,14 +80,14 @@ class AssetMovement(Document):
if current_custodian != d.from_employee:
frappe.throw(_("Asset {0} does not belongs to the custodian {1}").
format(d.asset, d.from_employee))
-
+
if d.to_employee and frappe.db.get_value("Employee", d.to_employee, "company") != self.company:
frappe.throw(_("Employee {0} does not belongs to the company {1}").
format(d.to_employee, self.company))
def on_submit(self):
self.set_latest_location_in_asset()
-
+
def on_cancel(self):
self.set_latest_location_in_asset()
@@ -105,12 +105,12 @@ class AssetMovement(Document):
# In case of cancellation it corresponds to previous latest document's location, employee
latest_movement_entry = frappe.db.sql(
"""
- SELECT asm_item.target_location, asm_item.to_employee
+ SELECT asm_item.target_location, asm_item.to_employee
FROM `tabAsset Movement Item` asm_item, `tabAsset Movement` asm
- WHERE
+ WHERE
asm_item.parent=asm.name and
asm_item.asset=%(asset)s and
- asm.company=%(company)s and
+ asm.company=%(company)s and
asm.docstatus=1 and {0}
ORDER BY
asm.transaction_date desc limit 1
diff --git a/erpnext/assets/doctype/asset_repair/asset_repair.js b/erpnext/assets/doctype/asset_repair/asset_repair.js
index 1cebfff66e5..18a56d33e6d 100644
--- a/erpnext/assets/doctype/asset_repair/asset_repair.js
+++ b/erpnext/assets/doctype/asset_repair/asset_repair.js
@@ -59,7 +59,7 @@ frappe.ui.form.on('Asset Repair', {
if (frm.doc.repair_status == "Completed") {
frm.set_value('completion_date', frappe.datetime.now_datetime());
- }
+ }
}
});
@@ -68,4 +68,4 @@ frappe.ui.form.on('Asset Repair Consumed Item', {
var row = locals[cdt][cdn];
frappe.model.set_value(cdt, cdn, 'total_value', row.consumed_quantity * row.valuation_rate);
},
-});
\ No newline at end of file
+});
diff --git a/erpnext/assets/doctype/asset_repair/asset_repair.py b/erpnext/assets/doctype/asset_repair/asset_repair.py
index d32fdf7054f..746f582fdcd 100644
--- a/erpnext/assets/doctype/asset_repair/asset_repair.py
+++ b/erpnext/assets/doctype/asset_repair/asset_repair.py
@@ -18,7 +18,7 @@ class AssetRepair(AccountsController):
if self.get('stock_items'):
self.set_total_value()
self.calculate_total_repair_cost()
-
+
def update_status(self):
if self.repair_status == 'Pending':
frappe.db.set_value('Asset', self.asset, 'status', 'Out of Order')
@@ -98,7 +98,7 @@ class AssetRepair(AccountsController):
if self.capitalize_repair_cost:
row.value_after_depreciation -= self.repair_cost
-
+
def get_total_value_of_stock_consumed(self):
total_value_of_stock_consumed = 0
if self.get('stock_consumption'):
@@ -141,7 +141,7 @@ class AssetRepair(AccountsController):
gl_entries = []
repair_and_maintenance_account = frappe.db.get_value('Company', self.company, 'repair_and_maintenance_account')
fixed_asset_account = get_asset_account("fixed_asset_account", asset=self.asset, company=self.company)
- expense_account = frappe.get_doc('Purchase Invoice', self.purchase_invoice).items[0].expense_account
+ expense_account = frappe.get_doc('Purchase Invoice', self.purchase_invoice).items[0].expense_account
gl_entries.append(
self.get_gl_dict({
@@ -149,7 +149,7 @@ class AssetRepair(AccountsController):
"credit": self.repair_cost,
"credit_in_account_currency": self.repair_cost,
"against": repair_and_maintenance_account,
- "voucher_type": self.doctype,
+ "voucher_type": self.doctype,
"voucher_no": self.name,
"cost_center": self.cost_center,
"posting_date": getdate(),
@@ -167,7 +167,7 @@ class AssetRepair(AccountsController):
"credit": item.amount,
"credit_in_account_currency": item.amount,
"against": repair_and_maintenance_account,
- "voucher_type": self.doctype,
+ "voucher_type": self.doctype,
"voucher_no": self.name,
"cost_center": self.cost_center,
"posting_date": getdate(),
diff --git a/erpnext/assets/doctype/asset_repair/asset_repair_list.js b/erpnext/assets/doctype/asset_repair/asset_repair_list.js
index f36fd2f8dcb..86376f40046 100644
--- a/erpnext/assets/doctype/asset_repair/asset_repair_list.js
+++ b/erpnext/assets/doctype/asset_repair/asset_repair_list.js
@@ -10,4 +10,3 @@ frappe.listview_settings['Asset Repair'] = {
}
}
};
-
diff --git a/erpnext/assets/doctype/asset_repair/test_asset_repair.py b/erpnext/assets/doctype/asset_repair/test_asset_repair.py
index 30bbb37851e..5e727d007a9 100644
--- a/erpnext/assets/doctype/asset_repair/test_asset_repair.py
+++ b/erpnext/assets/doctype/asset_repair/test_asset_repair.py
@@ -41,7 +41,7 @@ class TestAssetRepair(unittest.TestCase):
self.assertEqual(total_repair_cost, asset_repair.repair_cost)
for item in asset_repair.stock_items:
total_repair_cost += item.total_value
-
+
self.assertEqual(total_repair_cost, asset_repair.total_repair_cost)
def test_repair_status_after_submit(self):
@@ -99,7 +99,7 @@ class TestAssetRepair(unittest.TestCase):
initial_num_of_depreciations = num_of_depreciations(asset)
create_asset_repair(asset= asset, capitalize_repair_cost = 1, submit = 1)
asset.reload()
-
+
self.assertEqual((initial_num_of_depreciations + 1), num_of_depreciations(asset))
self.assertEqual(asset.schedules[-1].accumulated_depreciation_amount, asset.finance_books[0].value_after_depreciation)
@@ -139,7 +139,7 @@ def create_asset_repair(**args):
})
asset_repair.insert(ignore_if_duplicate=True)
-
+
if args.submit:
asset_repair.repair_status = "Completed"
asset_repair.cost_center = "_Test Cost Center - _TC"
@@ -165,4 +165,4 @@ def create_asset_repair(**args):
asset_repair.purchase_invoice = make_purchase_invoice().name
asset_repair.submit()
- return asset_repair
\ No newline at end of file
+ return asset_repair
diff --git a/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py b/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py
index 03dc47b0bba..a9dc9795ee3 100644
--- a/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py
+++ b/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py
@@ -91,4 +91,4 @@ def make_asset_value_adjustment(**args):
"cost_center": args.cost_center or "Main - _TC"
}).insert()
- return doc
\ No newline at end of file
+ return doc
diff --git a/erpnext/assets/doctype/location/location_tree.js b/erpnext/assets/doctype/location/location_tree.js
index b405afd1ddd..3e105f6ca49 100644
--- a/erpnext/assets/doctype/location/location_tree.js
+++ b/erpnext/assets/doctype/location/location_tree.js
@@ -30,4 +30,4 @@ frappe.treeview_settings["Location"] = {
onload: function (treeview) {
treeview.make_tree();
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js
index 1a6ef54a830..75f42a9f783 100644
--- a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js
+++ b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js
@@ -76,7 +76,7 @@ frappe.query_reports["Fixed Asset Register"] = {
fieldtype: "Link",
options: "Asset Category"
},
- {
+ {
fieldname:"finance_book",
label: __("Finance Book"),
fieldtype: "Link",
diff --git a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py
index d1457b9b85a..7d07397944b 100644
--- a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py
+++ b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py
@@ -99,7 +99,7 @@ def prepare_chart_data(data, filters):
labels_values_map = {}
date_field = frappe.scrub(filters.date_based_on)
- period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year,
+ period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year,
filters.from_date, filters.to_date, filters.filter_based_on, "Monthly", company=filters.company)
for d in period_list:
@@ -293,4 +293,4 @@ def get_columns(filters):
"options": "Location",
"width": 100
},
- ]
\ No newline at end of file
+ ]
diff --git a/erpnext/buying/doctype/buying_settings/buying_settings.js b/erpnext/buying/doctype/buying_settings/buying_settings.js
index e496e9628d1..944bb61cfeb 100644
--- a/erpnext/buying/doctype/buying_settings/buying_settings.js
+++ b/erpnext/buying/doctype/buying_settings/buying_settings.js
@@ -28,4 +28,4 @@ frappe.tour['Buying Settings'] = [
title: "Purchase Receipt Required for Purchase Invoice Creation",
description: __("If this option is configured 'Yes', ERPNext will prevent you from creating a Purchase Invoice without creating a Purchase Receipt first. This configuration can be overridden for a particular supplier by enabling the 'Allow Purchase Invoice Creation Without Purchase Receipt' checkbox in the Supplier master.")
}
-];
\ No newline at end of file
+];
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index a0b1e073cc6..ca3bd90960c 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -635,4 +635,4 @@ def add_items_in_ste(ste_doc, row, qty, po_details, batch_no=None):
'item_code': row.item_details['rm_item_code'],
'subcontracted_item': row.item_details['main_item_code'],
'serial_no': '\n'.join(row.serial_no) if row.serial_no else ''
- })
\ No newline at end of file
+ })
diff --git a/erpnext/buying/doctype/purchase_order/regional/india.js b/erpnext/buying/doctype/purchase_order/regional/india.js
index 42d3995907f..ef83f203e73 100644
--- a/erpnext/buying/doctype/purchase_order/regional/india.js
+++ b/erpnext/buying/doctype/purchase_order/regional/india.js
@@ -1,3 +1,3 @@
{% include "erpnext/regional/india/taxes.js" %}
-erpnext.setup_auto_gst_taxation('Purchase Order');
\ No newline at end of file
+erpnext.setup_auto_gst_taxation('Purchase Order');
diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py
index d668c76b6b9..fa174ba8fa8 100644
--- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py
@@ -485,7 +485,7 @@ class TestPurchaseOrder(unittest.TestCase):
def test_make_purchase_invoice_with_terms(self):
from erpnext.selling.doctype.sales_order.test_sales_order import automatically_fetch_payment_terms, compare_payment_schedules
-
+
automatically_fetch_payment_terms()
po = create_purchase_order(do_not_save=True)
diff --git a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order.js b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order.js
index 5d196874c98..012b0619cc9 100644
--- a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order.js
@@ -77,4 +77,4 @@ QUnit.test("test: purchase order", function(assert) {
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_get_items.js b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_get_items.js
index 8c0c1443144..bc3d767f95d 100644
--- a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_get_items.js
+++ b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_get_items.js
@@ -58,4 +58,4 @@ QUnit.test("test: purchase order with get items", function(assert) {
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_discount_on_grand_total.js b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_discount_on_grand_total.js
index 4e73ab8ef4f..83eb295010a 100644
--- a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_discount_on_grand_total.js
+++ b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_discount_on_grand_total.js
@@ -44,4 +44,4 @@ QUnit.test("test: purchase order with discount on grand total", function(assert)
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_item_wise_discount.js b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_item_wise_discount.js
index 1e54e50dda9..a729dd9839f 100644
--- a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_item_wise_discount.js
+++ b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_item_wise_discount.js
@@ -41,4 +41,4 @@ QUnit.test("test: purchase order with item wise discount", function(assert) {
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_multi_uom.js b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_multi_uom.js
index bf2dfeb37b7..b605e76ddf4 100644
--- a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_multi_uom.js
+++ b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_multi_uom.js
@@ -36,4 +36,4 @@ QUnit.test("test: purchase order with multi UOM", function(assert) {
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_shipping_rule.js b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_shipping_rule.js
index 96775eb0075..c258756b2a1 100644
--- a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_shipping_rule.js
+++ b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_shipping_rule.js
@@ -40,4 +40,4 @@ QUnit.test("test: purchase order with shipping rule", function(assert) {
() => frappe.timeout(0.3),
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_taxes_and_charges.js b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_taxes_and_charges.js
index 39716ed560c..ccc383fd74e 100644
--- a/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_taxes_and_charges.js
+++ b/erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_taxes_and_charges.js
@@ -41,4 +41,4 @@ QUnit.test("test: purchase order with taxes and charges", function(assert) {
() => frappe.timeout(0.3),
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py
index 8bdcd47e028..b6e28b6c674 100644
--- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py
+++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py
@@ -10,4 +10,4 @@ class PurchaseOrderItem(Document):
pass
def on_doctype_update():
- frappe.db.add_index("Purchase Order Item", ["item_code", "warehouse"])
\ No newline at end of file
+ frappe.db.add_index("Purchase Order Item", ["item_code", "warehouse"])
diff --git a/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py
index 6caffbda1f3..c85ca2fbafc 100644
--- a/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py
+++ b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class PurchaseOrderItemSupplied(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py
index 1a76f0ee7db..00c93ed1ea3 100644
--- a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py
+++ b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class PurchaseReceiptItemSupplied(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
index a4ce84e1cf9..8ed6c9e2a6d 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
@@ -425,4 +425,4 @@ def get_rfq_containing_supplier(doctype, txt, searchfield, start, page_len, filt
.format(filters.get("supplier"), filters.get("company"), conditions),
{"page_len": page_len, "start": start}, as_dict=1)
- return rfq_data
\ No newline at end of file
+ return rfq_data
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py
index 6efbc782252..751336dc4c6 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py
@@ -10,4 +10,4 @@ def get_data():
'items': ['Supplier Quotation']
},
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation.js
index 1fcfe75bb03..75f85f86d1d 100644
--- a/erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation.js
+++ b/erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation.js
@@ -73,4 +73,4 @@ QUnit.test("test: request_for_quotation", function(assert) {
() => frappe.click_button('Close'),
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation_for_status.js b/erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation_for_status.js
index 2e1652de733..f06c3f34c44 100644
--- a/erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation_for_status.js
+++ b/erpnext/buying/doctype/request_for_quotation/tests/test_request_for_quotation_for_status.js
@@ -125,4 +125,4 @@ QUnit.test("Test: Request for Quotation", function (assert) {
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/supplier/regional/india.js b/erpnext/buying/doctype/supplier/regional/india.js
index bd710e0df71..5f49a47e75e 100644
--- a/erpnext/buying/doctype/supplier/regional/india.js
+++ b/erpnext/buying/doctype/supplier/regional/india.js
@@ -1,3 +1,3 @@
{% include "erpnext/regional/india/party.js" %}
-erpnext.setup_gst_reminder_button('Supplier');
\ No newline at end of file
+erpnext.setup_gst_reminder_button('Supplier');
diff --git a/erpnext/buying/doctype/supplier/test_supplier.js b/erpnext/buying/doctype/supplier/test_supplier.js
index bf7c192c91c..eaa4d0989d2 100644
--- a/erpnext/buying/doctype/supplier/test_supplier.js
+++ b/erpnext/buying/doctype/supplier/test_supplier.js
@@ -74,4 +74,4 @@ QUnit.test("test: supplier", function(assert) {
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/supplier_item_group/supplier_item_group.py b/erpnext/buying/doctype/supplier_item_group/supplier_item_group.py
index 3a2e5d6dcef..4473ddea28e 100644
--- a/erpnext/buying/doctype/supplier_item_group/supplier_item_group.py
+++ b/erpnext/buying/doctype/supplier_item_group/supplier_item_group.py
@@ -15,4 +15,4 @@ class SupplierItemGroup(Document):
'item_group': self.item_group
})
if exists:
- frappe.throw(_("Item Group has already been linked to this supplier."))
\ No newline at end of file
+ frappe.throw(_("Item Group has already been linked to this supplier."))
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
index 6a4c02c075c..25e4e2a4dcf 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
@@ -166,4 +166,4 @@ def set_expired_status():
`tabSupplier Quotation` SET `status` = 'Expired'
WHERE
`status` not in ('Cancelled', 'Stopped') AND `valid_till` < %s
- """, (nowdate()))
\ No newline at end of file
+ """, (nowdate()))
diff --git a/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation.js
index 2d2b29cb916..20fb43026ab 100644
--- a/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation.js
+++ b/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation.js
@@ -71,4 +71,4 @@ QUnit.test("test: supplier quotation", function(assert) {
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_item_wise_discount.js b/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_item_wise_discount.js
index b151824ba68..0a51565b08e 100644
--- a/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_item_wise_discount.js
+++ b/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_item_wise_discount.js
@@ -31,4 +31,4 @@ QUnit.test("test: supplier quotation with item wise discount", function(assert){
() => frappe.timeout(0.3),
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_taxes_and_charges.js b/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_taxes_and_charges.js
index e37731eb579..7ea3e6079cd 100644
--- a/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_taxes_and_charges.js
+++ b/erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_taxes_and_charges.js
@@ -34,4 +34,4 @@ QUnit.test("test: supplier quotation with taxes and charges", function(assert) {
() => frappe.timeout(0.3),
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.js b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.js
index 5f5f54b79f5..b4cd852c32f 100644
--- a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.js
+++ b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.js
@@ -93,5 +93,3 @@ var loadAllStandings = function(frm) {
}
});
};
-
-
diff --git a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py
index 3d2305e2853..8e5cce5696b 100644
--- a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py
+++ b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py
@@ -13,4 +13,4 @@ def get_data():
'items': ['Supplier Scorecard Period']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py b/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py
index 25282405492..a5f05ea5258 100644
--- a/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py
+++ b/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py
@@ -128,4 +128,3 @@ valid_scorecard = [
"weighting_function":"{total_score} * max( 0, min ( 1 , (12 - {period_number}) / 12) )"
}
]
-
diff --git a/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py b/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py
index 4eef4b4e03e..3babfc8cab3 100644
--- a/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py
+++ b/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py
@@ -72,4 +72,4 @@ test_bad_criteria = [
"criteria_name":"Fake Criteria 3",
"max_score":100.0
},
-]
\ No newline at end of file
+]
diff --git a/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py b/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py
index 9938710e6e6..cc345e96bb8 100644
--- a/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py
+++ b/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py
@@ -109,4 +109,3 @@ def make_supplier_scorecard(source_name, target_doc=None):
}, target_doc, post_process, ignore_permissions=True)
return doc
-
diff --git a/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py b/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py
index 1ba5d06c536..678855a457b 100644
--- a/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py
+++ b/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py
@@ -26,4 +26,4 @@ def get_standings_list():
`tabSupplier Scorecard Standing` scs""",
{}, as_dict=1)
- return standings
\ No newline at end of file
+ return standings
diff --git a/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py b/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py
index 37fdc5724f5..89a6459bbab 100644
--- a/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py
+++ b/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py
@@ -493,4 +493,4 @@ def get_rfq_response_days(scorecard):
total_sq_days = 0
- return total_sq_days
\ No newline at end of file
+ return total_sq_days
diff --git a/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py b/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py
index fe6dde50489..14b87105e66 100644
--- a/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py
+++ b/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py
@@ -54,4 +54,4 @@ test_bad_variables = [
"variable_label":"Fake Variable 1",
"path":"get_fake_variable1"
},
-]
\ No newline at end of file
+]
diff --git a/erpnext/buying/report/procurement_tracker/procurement_tracker.py b/erpnext/buying/report/procurement_tracker/procurement_tracker.py
index beeca091c8a..99bcbe633cc 100644
--- a/erpnext/buying/report/procurement_tracker/procurement_tracker.py
+++ b/erpnext/buying/report/procurement_tracker/procurement_tracker.py
@@ -296,4 +296,4 @@ def get_po_entries(conditions):
{conditions}
GROUP BY
parent.name, child.item_code
- """.format(conditions=conditions), as_dict=1) #nosec
\ No newline at end of file
+ """.format(conditions=conditions), as_dict=1) #nosec
diff --git a/erpnext/buying/report/procurement_tracker/test_procurement_tracker.py b/erpnext/buying/report/procurement_tracker/test_procurement_tracker.py
index 44ab767c0a9..c36083f2aff 100644
--- a/erpnext/buying/report/procurement_tracker/test_procurement_tracker.py
+++ b/erpnext/buying/report/procurement_tracker/test_procurement_tracker.py
@@ -68,4 +68,4 @@ class TestProcurementTracker(unittest.TestCase):
"actual_delivery_date": date_obj
}
- return expected_data
\ No newline at end of file
+ return expected_data
diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py
index 89be62231b9..bda172769a9 100644
--- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py
+++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py
@@ -268,4 +268,3 @@ def get_columns(filters):
])
return columns
-
diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js
index 83d25d80ba2..90919dcc6a3 100644
--- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js
+++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js
@@ -5,4 +5,4 @@ frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() {
frappe.query_reports["Purchase Order Trends"] = {
filters: erpnext.get_purchase_trends_filters()
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py
index 1ed6cad6b46..095a44319d6 100644
--- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py
+++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py
@@ -55,4 +55,4 @@ def get_chart_data(data, conditions, filters):
"lineOptions": {
"regionFill": 1
}
- }
\ No newline at end of file
+ }
diff --git a/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.py b/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.py
index 0c0d4f0531d..9a45972837b 100644
--- a/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.py
+++ b/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.py
@@ -149,4 +149,4 @@ def get_columns():
"fieldtype": "Float",
"width": 110
}
- ]
\ No newline at end of file
+ ]
diff --git a/erpnext/buying/report/subcontracted_item_to_be_received/test_subcontracted_item_to_be_received.py b/erpnext/buying/report/subcontracted_item_to_be_received/test_subcontracted_item_to_be_received.py
index d8de701bf6e..cb304a1fdab 100644
--- a/erpnext/buying/report/subcontracted_item_to_be_received/test_subcontracted_item_to_be_received.py
+++ b/erpnext/buying/report/subcontracted_item_to_be_received/test_subcontracted_item_to_be_received.py
@@ -33,4 +33,4 @@ def make_purchase_receipt_against_po(po, quantity=5):
pr.items[0].qty = quantity
pr.supplier_warehouse = '_Test Warehouse 1 - _TC'
pr.insert()
- pr.submit()
\ No newline at end of file
+ pr.submit()
diff --git a/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.py b/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.py
index 68426abbb04..96cacb6f1b5 100644
--- a/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.py
+++ b/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.py
@@ -94,4 +94,4 @@ def get_po_items_to_supply(filters):
["Purchase Order", "transaction_date", ">=", filters.from_date],
["Purchase Order", "docstatus", "=", 1]
]
- )
\ No newline at end of file
+ )
diff --git a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html
index 098214d741c..015b31c2064 100644
--- a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html
+++ b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html
@@ -129,4 +129,4 @@
-
Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}
\ No newline at end of file
+
Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}
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 80e521a8bfa..7a8d08dd22d 100644
--- a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js
+++ b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js
@@ -174,4 +174,4 @@ frappe.query_reports["Supplier Quotation Comparison"] = {
});
dialog.show();
}
-}
\ No newline at end of file
+}
diff --git a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.py b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.py
index 2b371915f32..a5a3105a847 100644
--- a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.py
+++ b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.py
@@ -263,4 +263,4 @@ def get_message():
Expires today / Already Expired
- """
\ No newline at end of file
+ """
diff --git a/erpnext/buying/utils.py b/erpnext/buying/utils.py
index a73cb0d62ec..17928634e78 100644
--- a/erpnext/buying/utils.py
+++ b/erpnext/buying/utils.py
@@ -102,4 +102,3 @@ def get_linked_material_requests(items):
mr_list.append(material_request)
return mr_list
-
diff --git a/erpnext/commands/__init__.py b/erpnext/commands/__init__.py
index a991cf9881e..2276c738fbe 100644
--- a/erpnext/commands/__init__.py
+++ b/erpnext/commands/__init__.py
@@ -46,4 +46,4 @@ def make_demo(context, site, domain='Manufacturing', days=100,
commands = [
make_demo
-]
\ No newline at end of file
+]
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 26eb5bb337c..4c243d0cc46 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -842,7 +842,7 @@ class AccountsController(TransactionBase):
dr_or_cr = "credit"
rev_dr_cr = "debit"
supplier_or_customer = self.supplier
-
+
else:
dr_or_cr = "debit"
rev_dr_cr = "credit"
@@ -853,11 +853,11 @@ class AccountsController(TransactionBase):
discount_amount = item.discount_amount * item.qty
if self.doctype == "Purchase Invoice":
income_or_expense_account = (item.expense_account
- if (not item.enable_deferred_expense or self.is_return)
+ if (not item.enable_deferred_expense or self.is_return)
else item.deferred_expense_account)
else:
income_or_expense_account = (item.income_account
- if (not item.enable_deferred_revenue or self.is_return)
+ if (not item.enable_deferred_revenue or self.is_return)
else item.deferred_revenue_account)
account_currency = get_account_currency(item.discount_account)
@@ -866,7 +866,7 @@ class AccountsController(TransactionBase):
"account": item.discount_account,
"against": supplier_or_customer,
dr_or_cr: flt(discount_amount, item.precision('discount_amount')),
- dr_or_cr + "_in_account_currency": flt(discount_amount * self.get('conversion_rate'),
+ dr_or_cr + "_in_account_currency": flt(discount_amount * self.get('conversion_rate'),
item.precision('discount_amount')),
"cost_center": item.cost_center,
"project": item.project
@@ -879,7 +879,7 @@ class AccountsController(TransactionBase):
"account": income_or_expense_account,
"against": supplier_or_customer,
rev_dr_cr: flt(discount_amount, item.precision('discount_amount')),
- rev_dr_cr + "_in_account_currency": flt(discount_amount * self.get('conversion_rate'),
+ rev_dr_cr + "_in_account_currency": flt(discount_amount * self.get('conversion_rate'),
item.precision('discount_amount')),
"cost_center": item.cost_center,
"project": item.project or self.project
@@ -894,8 +894,8 @@ class AccountsController(TransactionBase):
dr_or_cr: self.discount_amount,
"cost_center": self.cost_center
}, item=self)
- )
-
+ )
+
def allocate_advance_taxes(self, gl_entries):
tax_map = self.get_tax_map()
for pe in self.get("advances"):
@@ -1223,7 +1223,7 @@ class AccountsController(TransactionBase):
po_or_so = self.get('items')[0].get('purchase_order')
po_or_so_doctype = "Purchase Order"
po_or_so_doctype_name = "purchase_order"
-
+
return po_or_so, po_or_so_doctype, po_or_so_doctype_name
def linked_order_has_payment_terms(self, po_or_so, fieldname, doctype):
@@ -1232,14 +1232,14 @@ class AccountsController(TransactionBase):
return True
elif self.linked_order_has_payment_schedule(po_or_so):
return True
-
+
return False
def all_items_have_same_po_or_so(self, po_or_so, fieldname):
for item in self.get('items'):
if item.get(fieldname) != po_or_so:
return False
-
+
return True
def linked_order_has_payment_terms_template(self, po_or_so, doctype):
@@ -1978,4 +1978,4 @@ def validate_regional(doc):
@erpnext.allow_regional
def validate_einvoice_fields(doc):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py
index 051481ff603..8c361a2e561 100644
--- a/erpnext/controllers/item_variant.py
+++ b/erpnext/controllers/item_variant.py
@@ -344,4 +344,3 @@ def create_variant_doc_for_quick_entry(template, args):
variant.name = variant.item_code
validate_item_variant_attributes(variant, args)
return variant.as_dict()
-
diff --git a/erpnext/controllers/subcontracting.py b/erpnext/controllers/subcontracting.py
index 36ae1102164..969829f9651 100644
--- a/erpnext/controllers/subcontracting.py
+++ b/erpnext/controllers/subcontracting.py
@@ -390,4 +390,4 @@ class Subcontracting():
incorrect_sn = "\n".join(incorrect_sn)
link = get_link_to_form('Purchase Order', row.purchase_order)
msg = f'The Serial Nos {incorrect_sn} has not supplied against the Purchase Order {link}'
- frappe.throw(_(msg), title=_("Incorrect Serial Number Consumed"))
\ No newline at end of file
+ frappe.throw(_(msg), title=_("Incorrect Serial Number Consumed"))
diff --git a/erpnext/crm/doctype/appointment/appointment.py b/erpnext/crm/doctype/appointment/appointment.py
index df73f09c493..f7c6b6c7993 100644
--- a/erpnext/crm/doctype/appointment/appointment.py
+++ b/erpnext/crm/doctype/appointment/appointment.py
@@ -235,4 +235,3 @@ def _get_employee_from_user(user):
# frappe.db.exists returns a tuple of a tuple
return frappe.get_doc('Employee', employee_docname[0][0])
return None
-
diff --git a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.js b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.js
index dc3ae8bf41a..0c64eb8e822 100644
--- a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.js
+++ b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.js
@@ -7,4 +7,4 @@ function check_times(frm) {
frappe.throw(__('In row {0} of Appointment Booking Slots: "To Time" must be later than "From Time".', [i + 1]));
}
});
-}
\ No newline at end of file
+}
diff --git a/erpnext/crm/doctype/contract/contract.js b/erpnext/crm/doctype/contract/contract.js
index 99688551630..7848de7a727 100644
--- a/erpnext/crm/doctype/contract/contract.js
+++ b/erpnext/crm/doctype/contract/contract.js
@@ -15,7 +15,7 @@ frappe.ui.form.on("Contract", {
let contract_template = r.message.contract_template;
frm.set_value("contract_terms", r.message.contract_terms);
frm.set_value("requires_fulfilment", contract_template.requires_fulfilment);
-
+
if (frm.doc.requires_fulfilment) {
// Populate the fulfilment terms table from a contract template, if any
r.message.contract_template.fulfilment_terms.forEach(element => {
@@ -23,7 +23,7 @@ frappe.ui.form.on("Contract", {
d.requirement = element.requirement;
});
frm.refresh_field("fulfilment_terms");
- }
+ }
}
}
});
diff --git a/erpnext/crm/doctype/contract/contract_list.js b/erpnext/crm/doctype/contract/contract_list.js
index 26a2907c7cc..7d5609651a1 100644
--- a/erpnext/crm/doctype/contract/contract_list.js
+++ b/erpnext/crm/doctype/contract/contract_list.js
@@ -9,4 +9,4 @@ frappe.listview_settings['Contract'] = {
return [__(doc.status), "gray", "status,=," + doc.status];
}
},
-};
\ No newline at end of file
+};
diff --git a/erpnext/crm/doctype/contract_template/contract_template.py b/erpnext/crm/doctype/contract_template/contract_template.py
index 69fd86f7fb5..9281220eef4 100644
--- a/erpnext/crm/doctype/contract_template/contract_template.py
+++ b/erpnext/crm/doctype/contract_template/contract_template.py
@@ -24,8 +24,8 @@ def get_contract_template(template_name, doc):
if contract_template.contract_terms:
contract_terms = frappe.render_template(contract_template.contract_terms, doc)
-
+
return {
- 'contract_template': contract_template,
+ 'contract_template': contract_template,
'contract_terms': contract_terms
- }
\ No newline at end of file
+ }
diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index 7f028cb3160..c0ce6badbf5 100644
--- a/erpnext/crm/doctype/lead/lead.py
+++ b/erpnext/crm/doctype/lead/lead.py
@@ -34,7 +34,7 @@ class Lead(SellingController):
"ends_on": frappe.db.get_value("Lead", self.name, "ends_on") if (not cint(self.is_new())) else None,
"contact_by": frappe.db.get_value("Lead", self.name, "contact_by") if (not cint(self.is_new())) else None,
})
-
+
def set_full_name(self):
self.lead_name = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name]))
diff --git a/erpnext/crm/doctype/lead/lead_dashboard.py b/erpnext/crm/doctype/lead/lead_dashboard.py
index 69d8ca70926..3950d063f22 100644
--- a/erpnext/crm/doctype/lead/lead_dashboard.py
+++ b/erpnext/crm/doctype/lead/lead_dashboard.py
@@ -16,4 +16,4 @@ def get_data():
'items': ['Opportunity', 'Quotation']
},
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/crm/doctype/lead/test_lead.py b/erpnext/crm/doctype/lead/test_lead.py
index d4886d35067..d7bc46165fd 100644
--- a/erpnext/crm/doctype/lead/test_lead.py
+++ b/erpnext/crm/doctype/lead/test_lead.py
@@ -82,4 +82,4 @@ def make_lead(**args):
"email_id": args.email_id or "new_lead_{}@example.com".format(random_string(5)),
}).insert()
- return lead_doc
\ No newline at end of file
+ return lead_doc
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index e9a7a95fc7d..632012b31d3 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -57,7 +57,7 @@ frappe.ui.form.on("Opportunity", {
if (frm.doc.status == "Lost"){
frm.trigger('set_as_lost_dialog');
}
-
+
},
customer_address: function(frm, cdt, cdn) {
diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py
index 23ad98a2828..8ce482a3f9f 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.py
+++ b/erpnext/crm/doctype/opportunity/opportunity.py
@@ -372,4 +372,4 @@ def get_events(start, end, filters=None):
"start": start,
"end": end
}, as_dict=True, update={"allDay": 0})
- return data
\ No newline at end of file
+ return data
diff --git a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py
index 68f0104fd6c..b8c53f077ae 100644
--- a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py
+++ b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py
@@ -9,4 +9,4 @@ def get_data():
'items': ['Quotation', 'Supplier Quotation']
},
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/crm/doctype/opportunity/test_opportunity.py b/erpnext/crm/doctype/opportunity/test_opportunity.py
index 04cd8a26cad..52aa0b036ae 100644
--- a/erpnext/crm/doctype/opportunity/test_opportunity.py
+++ b/erpnext/crm/doctype/opportunity/test_opportunity.py
@@ -87,4 +87,4 @@ def make_opportunity(**args):
})
opp_doc.insert()
- return opp_doc
\ No newline at end of file
+ return opp_doc
diff --git a/erpnext/crm/doctype/social_media_post/social_media_post.js b/erpnext/crm/doctype/social_media_post/social_media_post.js
index 0ce8b44e19b..6fb0f975f46 100644
--- a/erpnext/crm/doctype/social_media_post/social_media_post.js
+++ b/erpnext/crm/doctype/social_media_post/social_media_post.js
@@ -19,7 +19,7 @@ frappe.ui.form.on('Social Media Post', {
refresh: function(frm){
if (frm.doc.docstatus === 1){
if (frm.doc.post_status != "Posted"){
- add_post_btn(frm);
+ add_post_btn(frm);
}
else if (frm.doc.post_status == "Posted"){
frm.set_df_property('sheduled_time', 'read_only', 1);
@@ -63,5 +63,5 @@ var post = function(frm){
frappe.dom.unfreeze();
}
})
-
-}
\ No newline at end of file
+
+}
diff --git a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js
index 0bc77a3f2a8..f29c2c64e14 100644
--- a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js
+++ b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js
@@ -16,4 +16,3 @@ frappe.query_reports["Campaign Efficiency"] = {
}
]
};
-
diff --git a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py
index ec498837f5e..238884b5190 100644
--- a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py
+++ b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py
@@ -132,4 +132,4 @@ def get_order_amount(leads):
where prevdoc_docname in (
select name from `tabQuotation` where status = 'Ordered'
and quotation_to = 'Lead' and party_name in (%s)
- )""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0]
\ No newline at end of file
+ )""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0]
diff --git a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.js b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.js
index 0325de9b8d9..eeb8984513e 100644
--- a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.js
+++ b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.js
@@ -20,5 +20,3 @@ frappe.query_reports["Lead Conversion Time"] = {
},
]
};
-
-
diff --git a/erpnext/crm/report/lead_details/lead_details.js b/erpnext/crm/report/lead_details/lead_details.js
index f92070daf3f..2f6d24224fb 100644
--- a/erpnext/crm/report/lead_details/lead_details.js
+++ b/erpnext/crm/report/lead_details/lead_details.js
@@ -49,4 +49,4 @@ frappe.query_reports["Lead Details"] = {
"options": "Territory",
}
]
-};
\ No newline at end of file
+};
diff --git a/erpnext/crm/report/lead_details/lead_details.py b/erpnext/crm/report/lead_details/lead_details.py
index eeaaec2bce2..072a47611b7 100644
--- a/erpnext/crm/report/lead_details/lead_details.py
+++ b/erpnext/crm/report/lead_details/lead_details.py
@@ -107,7 +107,7 @@ def get_columns():
"options": "Country",
"width": 100
},
-
+
]
return columns
@@ -142,7 +142,7 @@ def get_data(filters):
company = %(company)s
AND `tabLead`.creation BETWEEN %(from_date)s AND %(to_date)s
{conditions}
- ORDER BY
+ ORDER BY
`tabLead`.creation asc """.format(conditions=get_conditions(filters)), filters, as_dict=1)
def get_conditions(filters) :
@@ -153,6 +153,5 @@ def get_conditions(filters) :
if filters.get("status"):
conditions.append(" and `tabLead`.status=%(status)s")
-
- return " ".join(conditions) if conditions else ""
+ return " ".join(conditions) if conditions else ""
diff --git a/erpnext/crm/report/lost_opportunity/lost_opportunity.js b/erpnext/crm/report/lost_opportunity/lost_opportunity.js
index d79f8c8480f..97c56f8c434 100644
--- a/erpnext/crm/report/lost_opportunity/lost_opportunity.js
+++ b/erpnext/crm/report/lost_opportunity/lost_opportunity.js
@@ -64,4 +64,4 @@ frappe.query_reports["Lost Opportunity"] = {
"options": "User"
},
]
-};
\ No newline at end of file
+};
diff --git a/erpnext/crm/report/lost_opportunity/lost_opportunity.py b/erpnext/crm/report/lost_opportunity/lost_opportunity.py
index 1aa4afe1865..858dcc4da81 100644
--- a/erpnext/crm/report/lost_opportunity/lost_opportunity.py
+++ b/erpnext/crm/report/lost_opportunity/lost_opportunity.py
@@ -87,17 +87,17 @@ def get_data(filters):
`tabOpportunity`.sales_stage,
`tabOpportunity`.territory
FROM
- `tabOpportunity`
+ `tabOpportunity`
{join}
WHERE
`tabOpportunity`.status = 'Lost' and `tabOpportunity`.company = %(company)s
- AND `tabOpportunity`.modified BETWEEN %(from_date)s AND %(to_date)s
- {conditions}
- GROUP BY
- `tabOpportunity`.name
- ORDER BY
+ AND `tabOpportunity`.modified BETWEEN %(from_date)s AND %(to_date)s
+ {conditions}
+ GROUP BY
+ `tabOpportunity`.name
+ ORDER BY
`tabOpportunity`.creation asc """.format(conditions=get_conditions(filters), join=get_join(filters)), filters, as_dict=1)
-
+
def get_conditions(filters):
conditions = []
@@ -117,15 +117,15 @@ def get_conditions(filters):
return " ".join(conditions) if conditions else ""
def get_join(filters):
- join = """LEFT JOIN `tabOpportunity Lost Reason Detail`
- ON `tabOpportunity Lost Reason Detail`.parenttype = 'Opportunity' and
+ join = """LEFT JOIN `tabOpportunity Lost Reason Detail`
+ ON `tabOpportunity Lost Reason Detail`.parenttype = 'Opportunity' and
`tabOpportunity Lost Reason Detail`.parent = `tabOpportunity`.name"""
if filters.get("lost_reason"):
- join = """JOIN `tabOpportunity Lost Reason Detail`
- ON `tabOpportunity Lost Reason Detail`.parenttype = 'Opportunity' and
+ join = """JOIN `tabOpportunity Lost Reason Detail`
+ ON `tabOpportunity Lost Reason Detail`.parenttype = 'Opportunity' and
`tabOpportunity Lost Reason Detail`.parent = `tabOpportunity`.name and
`tabOpportunity Lost Reason Detail`.lost_reason = '{0}'
""".format(filters.get("lost_reason"))
-
- return join
\ No newline at end of file
+
+ return join
diff --git a/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py b/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py
index 3a9d57d6075..425b7a8fdd7 100644
--- a/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py
+++ b/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py
@@ -106,4 +106,4 @@ def get_lead_filters(filters):
return lead_filters
def get_creation_date_based_on_lead_age(filters):
- return add_days(now(), (filters.get('lead_age') * -1))
\ No newline at end of file
+ return add_days(now(), (filters.get('lead_age') * -1))
diff --git a/erpnext/demo/domains.py b/erpnext/demo/domains.py
index d5c2bfd2f02..b1db7b57b17 100644
--- a/erpnext/demo/domains.py
+++ b/erpnext/demo/domains.py
@@ -25,4 +25,4 @@ data = {
'Non Profit': {
'company_name': 'Erpnext Foundation'
}
-}
\ No newline at end of file
+}
diff --git a/erpnext/demo/user/education.py b/erpnext/demo/user/education.py
index fc31176e1e5..883a6d88cf2 100644
--- a/erpnext/demo/user/education.py
+++ b/erpnext/demo/user/education.py
@@ -19,7 +19,7 @@ def work():
approve_random_student_applicant()
enroll_random_student(frappe.flags.current_date)
# if frappe.flags.current_date.weekday()== 0:
- # make_course_schedule(frappe.flags.current_date, frappe.utils.add_days(frappe.flags.current_date, 5))
+ # make_course_schedule(frappe.flags.current_date, frappe.utils.add_days(frappe.flags.current_date, 5))
mark_student_attendance(frappe.flags.current_date)
# make_assessment_plan()
make_fees()
@@ -48,7 +48,7 @@ def enroll_random_student(current_date):
frappe.db.commit()
assign_student_group(enrollment.student, enrollment.student_name, enrollment.program,
enrolled_courses, enrollment.student_batch_name)
-
+
def assign_student_group(student, student_name, program, courses, batch):
course_list = [d["course"] for d in courses]
for d in frappe.get_list("Student Group", fields=("name"), filters={"program": program, "course":("in", course_list), "disabled": 0}):
@@ -69,11 +69,11 @@ def mark_student_attendance(current_date):
students = get_student_group_students(d.name)
for stud in students:
make_attendance_records(stud.student, stud.student_name, status[weighted_choice([9,4])], None, d.name, current_date)
-
+
def make_fees():
for d in range(1,10):
random_fee = get_random("Fees", {"paid_amount": 0})
- collect_fees(random_fee, frappe.db.get_value("Fees", random_fee, "outstanding_amount"))
+ collect_fees(random_fee, frappe.db.get_value("Fees", random_fee, "outstanding_amount"))
def make_assessment_plan(date):
for d in range(1,4):
@@ -84,7 +84,7 @@ def make_assessment_plan(date):
doc.assessment_group = get_random("Assessment Group", {"is_group": 0, "parent": "2017-18 (Semester 2)"})
doc.grading_scale = get_random("Grading Scale")
doc.maximum_assessment_score = 100
-
+
def make_course_schedule(start_date, end_date):
for d in frappe.db.get_list("Student Group"):
cs = frappe.new_doc("Scheduling Tool")
@@ -114,4 +114,4 @@ def weighted_choice(weights):
rnd = random.random() * running_total
for i, total in enumerate(totals):
if rnd < total:
- return i
\ No newline at end of file
+ return i
diff --git a/erpnext/domains/agriculture.py b/erpnext/domains/agriculture.py
index 8c7427ab2d1..9212d2ea719 100644
--- a/erpnext/domains/agriculture.py
+++ b/erpnext/domains/agriculture.py
@@ -25,4 +25,4 @@ data = {
],
'default_portal_role': 'System Manager',
'on_setup': 'erpnext.agriculture.setup.setup_agriculture'
-}
\ No newline at end of file
+}
diff --git a/erpnext/domains/education.py b/erpnext/domains/education.py
index bbaa6e55d99..870624ab3b2 100644
--- a/erpnext/domains/education.py
+++ b/erpnext/domains/education.py
@@ -26,4 +26,4 @@ data = {
],
'on_setup': 'erpnext.education.setup.setup_education'
-}
\ No newline at end of file
+}
diff --git a/erpnext/domains/manufacturing.py b/erpnext/domains/manufacturing.py
index 259ee9238e5..b9ad49e772b 100644
--- a/erpnext/domains/manufacturing.py
+++ b/erpnext/domains/manufacturing.py
@@ -21,4 +21,4 @@ data = {
['Stock Settings', None, 'show_barcode_field', 1]
],
'default_portal_role': 'Customer'
-}
\ No newline at end of file
+}
diff --git a/erpnext/domains/non_profit.py b/erpnext/domains/non_profit.py
index b6772c53153..7c4f6b1f9de 100644
--- a/erpnext/domains/non_profit.py
+++ b/erpnext/domains/non_profit.py
@@ -21,4 +21,4 @@ data = {
'Non Profit'
],
'default_portal_role': 'Non Profit Manager'
-}
\ No newline at end of file
+}
diff --git a/erpnext/domains/services.py b/erpnext/domains/services.py
index 7a4ffc4993f..89213720767 100644
--- a/erpnext/domains/services.py
+++ b/erpnext/domains/services.py
@@ -18,4 +18,4 @@ data = {
['Stock Settings', None, 'show_barcode_field', 0]
],
'default_portal_role': 'Customer'
-}
\ 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
index 3aa0be157bc..fa7f2899dcb 100644
--- a/erpnext/education/doctype/academic_term/academic_term.py
+++ b/erpnext/education/doctype/academic_term/academic_term.py
@@ -22,9 +22,9 @@ class AcademicTerm(Document):
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
+ # 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))
diff --git a/erpnext/education/doctype/academic_term/academic_term_dashboard.py b/erpnext/education/doctype/academic_term/academic_term_dashboard.py
index 871e0f32845..eb2f90742ce 100644
--- a/erpnext/education/doctype/academic_term/academic_term_dashboard.py
+++ b/erpnext/education/doctype/academic_term/academic_term_dashboard.py
@@ -22,4 +22,4 @@ def get_data():
'items': ['Assessment Plan', 'Assessment Result']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/academic_term/test_academic_term.js b/erpnext/education/doctype/academic_term/test_academic_term.js
index 6d91e977c63..383b65a7032 100644
--- a/erpnext/education/doctype/academic_term/test_academic_term.js
+++ b/erpnext/education/doctype/academic_term/test_academic_term.js
@@ -21,4 +21,4 @@ QUnit.test('Test: Academic Term', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/academic_year/academic_year.js b/erpnext/education/doctype/academic_year/academic_year.js
index 0e8619849cd..20e25281ffc 100644
--- a/erpnext/education/doctype/academic_year/academic_year.js
+++ b/erpnext/education/doctype/academic_year/academic_year.js
@@ -1,2 +1,2 @@
frappe.ui.form.on("Academic Year", {
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/academic_year/academic_year_dashboard.py b/erpnext/education/doctype/academic_year/academic_year_dashboard.py
index f27f7d14cf6..d3734df8036 100644
--- a/erpnext/education/doctype/academic_year/academic_year_dashboard.py
+++ b/erpnext/education/doctype/academic_year/academic_year_dashboard.py
@@ -22,4 +22,4 @@ def get_data():
'items': ['Assessment Plan', 'Assessment Result']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/academic_year/test_academic_year.js b/erpnext/education/doctype/academic_year/test_academic_year.js
index ec2f49c5a1b..51e9cf307d8 100644
--- a/erpnext/education/doctype/academic_year/test_academic_year.js
+++ b/erpnext/education/doctype/academic_year/test_academic_year.js
@@ -20,4 +20,4 @@ QUnit.test('Test: Academic Year', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/article/article.js b/erpnext/education/doctype/article/article.js
index edfec26273b..85b387f6217 100644
--- a/erpnext/education/doctype/article/article.js
+++ b/erpnext/education/doctype/article/article.js
@@ -53,4 +53,4 @@ let get_topics_without_article = function(article) {
method: 'erpnext.education.doctype.article.article.get_topics_without_article',
args: {'article': article}
});
-};
\ No newline at end of file
+};
diff --git a/erpnext/education/doctype/article/article.py b/erpnext/education/doctype/article/article.py
index 8ba367da76e..b5cc5cbc7a6 100644
--- a/erpnext/education/doctype/article/article.py
+++ b/erpnext/education/doctype/article/article.py
@@ -18,4 +18,4 @@ def get_topics_without_article(article):
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
\ No newline at end of file
+ return data
diff --git a/erpnext/education/doctype/assessment_criteria/assessment_criteria.py b/erpnext/education/doctype/assessment_criteria/assessment_criteria.py
index 1ea37023b24..bfbf26cf6c1 100644
--- a/erpnext/education/doctype/assessment_criteria/assessment_criteria.py
+++ b/erpnext/education/doctype/assessment_criteria/assessment_criteria.py
@@ -12,4 +12,4 @@ STD_CRITERIA = ["total", "total score", "total grade", "maximum score", "score",
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"))
\ No newline at end of file
+ frappe.throw(_("Can't create standard criteria. Please rename the criteria"))
diff --git a/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.js b/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.js
index db4a4cf5a8d..724c4dac499 100644
--- a/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.js
+++ b/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.js
@@ -13,4 +13,4 @@ QUnit.test('Test: Assessment Criteria', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.js b/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.js
index bcfcaf82e63..ab27e637239 100644
--- a/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.js
+++ b/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.js
@@ -12,4 +12,4 @@ QUnit.test('Test: Assessment Criteria Group', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py b/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py
index 2649d4b90c9..1a23606a61d 100644
--- a/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py
+++ b/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py
@@ -12,4 +12,4 @@ def get_data():
'items': ['Assessment Plan', 'Assessment Result']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/assessment_group/assessment_group_tree.js b/erpnext/education/doctype/assessment_group/assessment_group_tree.js
index e4676831a3b..e0dfaa31fd7 100644
--- a/erpnext/education/doctype/assessment_group/assessment_group_tree.js
+++ b/erpnext/education/doctype/assessment_group/assessment_group_tree.js
@@ -1,3 +1,3 @@
frappe.treeview_settings["Assessment Group"] = {
-
-}
\ No newline at end of file
+
+}
diff --git a/erpnext/education/doctype/assessment_group/test_assessment_group.js b/erpnext/education/doctype/assessment_group/test_assessment_group.js
index a127fd4adf5..00e6309837d 100644
--- a/erpnext/education/doctype/assessment_group/test_assessment_group.js
+++ b/erpnext/education/doctype/assessment_group/test_assessment_group.js
@@ -62,4 +62,4 @@ frappe.map_group = {
() => frappe.click_button('Create New'),
]);
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/education/doctype/assessment_plan/assessment_plan.js b/erpnext/education/doctype/assessment_plan/assessment_plan.js
index 726c0fcecd4..cf545c41afb 100644
--- a/erpnext/education/doctype/assessment_plan/assessment_plan.js
+++ b/erpnext/education/doctype/assessment_plan/assessment_plan.js
@@ -75,4 +75,4 @@ frappe.ui.form.on('Assessment Plan', {
maximum_assessment_score: function(frm) {
frm.trigger('course');
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py b/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py
index 5e6c29dcdf3..8ac3faf6dde 100644
--- a/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py
+++ b/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py
@@ -18,4 +18,4 @@ def get_data():
'items': ['Assessment Plan Status']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/assessment_result/assessment_result.js b/erpnext/education/doctype/assessment_result/assessment_result.js
index c35f607a99d..b6d28817b5d 100644
--- a/erpnext/education/doctype/assessment_result/assessment_result.js
+++ b/erpnext/education/doctype/assessment_result/assessment_result.js
@@ -122,4 +122,4 @@ frappe.ui.form.on('Assessment Result Detail', {
});
}
}
-});
\ 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
index 6b873ecf97a..7dfe0cf6c27 100644
--- a/erpnext/education/doctype/assessment_result/assessment_result.py
+++ b/erpnext/education/doctype/assessment_result/assessment_result.py
@@ -42,7 +42,3 @@ class AssessmentResult(Document):
"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
index 438379d08e4..2526076d308 100644
--- a/erpnext/education/doctype/assessment_result/assessment_result_dashboard.py
+++ b/erpnext/education/doctype/assessment_result/assessment_result_dashboard.py
@@ -11,4 +11,4 @@ def get_data():
'items': ['Final Assessment Grades', 'Course wise Assessment Report']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/assessment_result/test_assessment_result.js b/erpnext/education/doctype/assessment_result/test_assessment_result.js
index b7adfacb1a2..d4eb4b8ba66 100644
--- a/erpnext/education/doctype/assessment_result/test_assessment_result.js
+++ b/erpnext/education/doctype/assessment_result/test_assessment_result.js
@@ -70,4 +70,4 @@ QUnit.test('Test: Assessment Result', function(assert){
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/assessment_result/test_assessment_result.py b/erpnext/education/doctype/assessment_result/test_assessment_result.py
index e5535d6085a..adce57769dd 100644
--- a/erpnext/education/doctype/assessment_result/test_assessment_result.py
+++ b/erpnext/education/doctype/assessment_result/test_assessment_result.py
@@ -16,4 +16,3 @@ class TestAssessmentResult(unittest.TestCase):
grade = get_grade("_Test Grading Scale", 70)
self.assertEqual("B", grade)
-
\ 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
index 649f420d41f..a0d286ccbe9 100644
--- a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.py
+++ b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class AssessmentResultTool(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.js b/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.js
index 0bbe33194a3..7ef5c688fb9 100644
--- a/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.js
+++ b/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.js
@@ -26,4 +26,4 @@ QUnit.test('Test: Assessment Result Tool', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/course/course.js b/erpnext/education/doctype/course/course.js
index 81e4a8c08d3..bd8d62c8d2a 100644
--- a/erpnext/education/doctype/course/course.js
+++ b/erpnext/education/doctype/course/course.js
@@ -76,4 +76,4 @@ let get_programs_without_course = function(course) {
method: 'erpnext.education.doctype.course.course.get_programs_without_course',
args: {'course': course}
});
-}
\ No newline at end of file
+}
diff --git a/erpnext/education/doctype/course/course.py b/erpnext/education/doctype/course/course.py
index 06efa54e770..92f92ed9f3e 100644
--- a/erpnext/education/doctype/course/course.py
+++ b/erpnext/education/doctype/course/course.py
@@ -53,4 +53,4 @@ def get_programs_without_course(course):
courses = [c.course for c in program.courses]
if not courses or course not in courses:
data.append(program.name)
- return data
\ No newline at end of file
+ return data
diff --git a/erpnext/education/doctype/course/course_dashboard.py b/erpnext/education/doctype/course/course_dashboard.py
index 8a570bdc579..8de91b1c092 100644
--- a/erpnext/education/doctype/course/course_dashboard.py
+++ b/erpnext/education/doctype/course/course_dashboard.py
@@ -20,4 +20,4 @@ def get_data():
'items': ['Assessment Plan', 'Assessment Result']
},
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/course/test_course.js b/erpnext/education/doctype/course/test_course.js
index 88fddc2bb6d..2b6860cb7f4 100644
--- a/erpnext/education/doctype/course/test_course.js
+++ b/erpnext/education/doctype/course/test_course.js
@@ -33,4 +33,4 @@ QUnit.test('test course', function(assert) {
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/course_activity/course_activity.py b/erpnext/education/doctype/course_activity/course_activity.py
index e7fc08a1d7f..3aa1ea0c5b3 100644
--- a/erpnext/education/doctype/course_activity/course_activity.py
+++ b/erpnext/education/doctype/course_activity/course_activity.py
@@ -16,4 +16,4 @@ class CourseActivity(Document):
if frappe.db.exists("Course Enrollment", self.enrollment):
return True
else:
- frappe.throw(_("Course Enrollment {0} does not exists").format(self.enrollment))
\ No newline at end of file
+ frappe.throw(_("Course Enrollment {0} does not exists").format(self.enrollment))
diff --git a/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py b/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py
index b9dd457b61c..37972fe354c 100644
--- a/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py
+++ b/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py
@@ -12,4 +12,4 @@ def get_data():
'items': ['Course Activity', 'Quiz Activity']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/course_enrollment/test_course_enrollment.py b/erpnext/education/doctype/course_enrollment/test_course_enrollment.py
index e22c7ce0bab..874bf121f47 100644
--- a/erpnext/education/doctype/course_enrollment/test_course_enrollment.py
+++ b/erpnext/education/doctype/course_enrollment/test_course_enrollment.py
@@ -39,6 +39,3 @@ class TestCourseEnrollment(unittest.TestCase):
doc = frappe.get_doc("Program Enrollment", entry.name)
doc.cancel()
doc.delete()
-
-
-
diff --git a/erpnext/education/doctype/course_schedule/course_schedule.js b/erpnext/education/doctype/course_schedule/course_schedule.js
index 4275f6ef2a6..366bbd8b0d4 100644
--- a/erpnext/education/doctype/course_schedule/course_schedule.js
+++ b/erpnext/education/doctype/course_schedule/course_schedule.js
@@ -13,4 +13,4 @@ frappe.ui.form.on("Course Schedule", {
}).addClass("btn-primary");
}
}
-});
\ 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
index 5083ff6589d..748728d104e 100644
--- a/erpnext/education/doctype/course_schedule/course_schedule.py
+++ b/erpnext/education/doctype/course_schedule/course_schedule.py
@@ -14,11 +14,11 @@ class CourseSchedule(Document):
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":
@@ -28,23 +28,22 @@ class CourseSchedule(Document):
"""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."))
-
+
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_dashboard.py b/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py
index 0866cd65357..22ce7e1ec24 100644
--- a/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py
+++ b/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py
@@ -12,4 +12,4 @@ def get_data():
'items': ['Student Attendance']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/course_schedule/test_course_schedule.py b/erpnext/education/doctype/course_schedule/test_course_schedule.py
index a901f1e467a..5bb4de85846 100644
--- a/erpnext/education/doctype/course_schedule/test_course_schedule.py
+++ b/erpnext/education/doctype/course_schedule/test_course_schedule.py
@@ -17,28 +17,28 @@ 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,
+ 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,
+
+ 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,
+
+ 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,
+
+ 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 make_course_schedule_test_record(**args):
@@ -49,12 +49,12 @@ def make_course_schedule_test_record(**args):
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:
diff --git a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js
index d57f46ab98e..7b0e4ab47c8 100644
--- a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js
+++ b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js
@@ -41,4 +41,4 @@ frappe.ui.form.on('Course Scheduling Tool', {
});
});
}
-});
\ 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
index 658380ea429..6c7e95c80da 100644
--- a/erpnext/education/doctype/education_settings/education_settings.py
+++ b/erpnext/education/doctype/education_settings/education_settings.py
@@ -36,4 +36,4 @@ class EducationSettings(Document):
make_property_setter('Instructor', "naming_series", "hidden", 1, "Check", validate_fields_for_doctype=False)
def update_website_context(context):
- context["lms_enabled"] = frappe.get_doc("Education Settings").enable_lms
\ No newline at end of file
+ context["lms_enabled"] = frappe.get_doc("Education Settings").enable_lms
diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule.js b/erpnext/education/doctype/fee_schedule/fee_schedule.js
index 0089957df40..97691a5b62a 100644
--- a/erpnext/education/doctype/fee_schedule/fee_schedule.js
+++ b/erpnext/education/doctype/fee_schedule/fee_schedule.js
@@ -130,4 +130,4 @@ frappe.ui.form.on('Fee Schedule Student Group', {
});
}
}
-})
\ No newline at end of file
+})
diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py b/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py
index acfe4002193..4d7da21ea17 100644
--- a/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py
+++ b/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py
@@ -10,4 +10,4 @@ def get_data():
'items': ['Fees']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/fee_structure/fee_structure.js b/erpnext/education/doctype/fee_structure/fee_structure.js
index 310c4105f47..d9ab99f8180 100644
--- a/erpnext/education/doctype/fee_structure/fee_structure.js
+++ b/erpnext/education/doctype/fee_structure/fee_structure.js
@@ -69,4 +69,4 @@ frappe.ui.form.on('Fee Component', {
}
frm.set_value('total_amount', total_amount);
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/fee_structure/fee_structure.py b/erpnext/education/doctype/fee_structure/fee_structure.py
index 781382b51be..9755717ee94 100644
--- a/erpnext/education/doctype/fee_structure/fee_structure.py
+++ b/erpnext/education/doctype/fee_structure/fee_structure.py
@@ -11,13 +11,13 @@ from frappe.model.mapper import get_mapped_doc
class FeeStructure(Document):
def validate(self):
self.calculate_total()
-
+
def calculate_total(self):
"""Calculates total amount."""
self.total_amount = 0
for d in self.components:
self.total_amount += d.amount
-
+
@frappe.whitelist()
def make_fee_schedule(source_name, target_doc=None):
@@ -31,4 +31,4 @@ def make_fee_schedule(source_name, target_doc=None):
"Fee Component": {
"doctype": "Fee Component"
}
- }, target_doc)
\ No newline at end of file
+ }, target_doc)
diff --git a/erpnext/education/doctype/fee_structure/fee_structure_dashboard.py b/erpnext/education/doctype/fee_structure/fee_structure_dashboard.py
index 73e314f3512..fdf7df7aa26 100644
--- a/erpnext/education/doctype/fee_structure/fee_structure_dashboard.py
+++ b/erpnext/education/doctype/fee_structure/fee_structure_dashboard.py
@@ -12,4 +12,4 @@ def get_data():
'items': ['Fees', 'Fee Schedule']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/fees/fees.py b/erpnext/education/doctype/fees/fees.py
index 25d67d2d5f6..7e867049047 100644
--- a/erpnext/education/doctype/fees/fees.py
+++ b/erpnext/education/doctype/fees/fees.py
@@ -132,4 +132,4 @@ def get_list_context(context=None):
"title": _("Fees"),
"get_list": get_fee_list,
"row_template": "templates/includes/fee/fee_row.html"
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/fees/fees_list.js b/erpnext/education/doctype/fees/fees_list.js
index 52e1c4beb5a..ee8e1e382e9 100644
--- a/erpnext/education/doctype/fees/fees_list.js
+++ b/erpnext/education/doctype/fees/fees_list.js
@@ -9,4 +9,4 @@ frappe.listview_settings['Fees'] = {
return [__("Overdue"), "red", "outstanding_amount,>,0|due_date,<=,Today"];
}
}
-};
\ 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
index 6309d02c155..0e732971619 100644
--- a/erpnext/education/doctype/grading_scale/grading_scale.py
+++ b/erpnext/education/doctype/grading_scale/grading_scale.py
@@ -17,4 +17,4 @@ class GradingScale(Document):
else:
thresholds.append(cint(d.threshold))
if 0 not in thresholds:
- frappe.throw(_("Please define grade for Threshold 0%"))
\ No newline at end of file
+ frappe.throw(_("Please define grade for Threshold 0%"))
diff --git a/erpnext/education/doctype/grading_scale/test_grading_scale.js b/erpnext/education/doctype/grading_scale/test_grading_scale.js
index e363545ff8d..fb56918fdb8 100644
--- a/erpnext/education/doctype/grading_scale/test_grading_scale.js
+++ b/erpnext/education/doctype/grading_scale/test_grading_scale.js
@@ -99,4 +99,4 @@ QUnit.test('Test: Grading Scale', function(assert){
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/guardian/test_guardian.js b/erpnext/education/doctype/guardian/test_guardian.js
index 9bbfacd5802..1ea6dc290bd 100644
--- a/erpnext/education/doctype/guardian/test_guardian.js
+++ b/erpnext/education/doctype/guardian/test_guardian.js
@@ -31,4 +31,4 @@ QUnit.test('Test: Guardian', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/instructor/instructor.js b/erpnext/education/doctype/instructor/instructor.js
index 24e80fa9378..034b0aaf5dd 100644
--- a/erpnext/education/doctype/instructor/instructor.js
+++ b/erpnext/education/doctype/instructor/instructor.js
@@ -61,4 +61,4 @@ frappe.ui.form.on("Instructor", {
};
});
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/instructor/instructor_dashboard.py b/erpnext/education/doctype/instructor/instructor_dashboard.py
index a404fc56c54..c19c85947d6 100644
--- a/erpnext/education/doctype/instructor/instructor_dashboard.py
+++ b/erpnext/education/doctype/instructor/instructor_dashboard.py
@@ -21,4 +21,4 @@ def get_data():
'items': ['Student Group']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/program/program.js b/erpnext/education/doctype/program/program.js
index 98263b55a1f..2d89351504b 100644
--- a/erpnext/education/doctype/program/program.js
+++ b/erpnext/education/doctype/program/program.js
@@ -4,5 +4,5 @@
cur_frm.add_fetch('fee_structure', 'total_amount', 'amount');
frappe.ui.form.on("Program", "refresh", function(frm) {
-
-});
\ No newline at end of file
+
+});
diff --git a/erpnext/education/doctype/program/program.py b/erpnext/education/doctype/program/program.py
index d24df5d6142..9d886b7b9e6 100644
--- a/erpnext/education/doctype/program/program.py
+++ b/erpnext/education/doctype/program/program.py
@@ -11,4 +11,4 @@ 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
\ No newline at end of file
+ return course_list
diff --git a/erpnext/education/doctype/program/program_dashboard.py b/erpnext/education/doctype/program/program_dashboard.py
index c5d249451f2..6c503e1bf1f 100644
--- a/erpnext/education/doctype/program/program_dashboard.py
+++ b/erpnext/education/doctype/program/program_dashboard.py
@@ -21,4 +21,4 @@ def get_data():
'items': ['Assessment Plan', 'Assessment Result']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/program/test_program.js b/erpnext/education/doctype/program/test_program.js
index dc347cf1b06..b9ca41ae3f9 100644
--- a/erpnext/education/doctype/program/test_program.js
+++ b/erpnext/education/doctype/program/test_program.js
@@ -31,4 +31,4 @@ QUnit.test('Test: Program', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/program/test_program.py b/erpnext/education/doctype/program/test_program.py
index d7530365117..204f2961e7f 100644
--- a/erpnext/education/doctype/program/test_program.py
+++ b/erpnext/education/doctype/program/test_program.py
@@ -88,4 +88,4 @@ def setup_program():
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
\ No newline at end of file
+ return program
diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment.js b/erpnext/education/doctype/program_enrollment/program_enrollment.js
index f9c65fbbfb3..e92d063602d 100644
--- a/erpnext/education/doctype/program_enrollment/program_enrollment.js
+++ b/erpnext/education/doctype/program_enrollment/program_enrollment.js
@@ -101,4 +101,4 @@ frappe.ui.form.on('Program Enrollment Course', {
return { filters: [['Course', 'name', 'not in', course_list]] };
};
}
-});
\ 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
index b282babd0fc..dd4aa576ac0 100644
--- a/erpnext/education/doctype/program_enrollment/program_enrollment.py
+++ b/erpnext/education/doctype/program_enrollment/program_enrollment.py
@@ -174,4 +174,3 @@ def get_students(doctype, txt, searchfield, start, page_len, filters):
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
index 18d307cdf07..c47f8666898 100644
--- a/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py
+++ b/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py
@@ -16,4 +16,4 @@ def get_data():
'items': ['Student and Guardian Contact Details']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/program_enrollment/test_program_enrollment.py b/erpnext/education/doctype/program_enrollment/test_program_enrollment.py
index fec6422e75f..497ee288aac 100644
--- a/erpnext/education/doctype/program_enrollment/test_program_enrollment.py
+++ b/erpnext/education/doctype/program_enrollment/test_program_enrollment.py
@@ -32,4 +32,4 @@ class TestProgramEnrollment(unittest.TestCase):
for entry in frappe.db.get_all("Program Enrollment"):
doc = frappe.get_doc("Program Enrollment", entry.name)
doc.cancel()
- doc.delete()
\ No newline at end of file
+ doc.delete()
diff --git a/erpnext/education/doctype/question/question.py b/erpnext/education/doctype/question/question.py
index a7deeab6f65..fb3b50478c8 100644
--- a/erpnext/education/doctype/question/question.py
+++ b/erpnext/education/doctype/question/question.py
@@ -43,4 +43,4 @@ class Question(Document):
elif len(answers) == 1:
return answers[0]
else:
- return answers
\ No newline at end of file
+ return answers
diff --git a/erpnext/education/doctype/quiz/quiz.js b/erpnext/education/doctype/quiz/quiz.js
index 01bcf732360..320869be31e 100644
--- a/erpnext/education/doctype/quiz/quiz.js
+++ b/erpnext/education/doctype/quiz/quiz.js
@@ -68,4 +68,4 @@ let get_topics_without_quiz = function(quiz) {
method: 'erpnext.education.doctype.quiz.quiz.get_topics_without_quiz',
args: {'quiz': quiz}
});
-};
\ No newline at end of file
+};
diff --git a/erpnext/education/doctype/quiz/quiz.py b/erpnext/education/doctype/quiz/quiz.py
index a774b88579a..a128e1f3427 100644
--- a/erpnext/education/doctype/quiz/quiz.py
+++ b/erpnext/education/doctype/quiz/quiz.py
@@ -68,4 +68,4 @@ def get_topics_without_quiz(quiz):
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
\ No newline at end of file
+ return data
diff --git a/erpnext/education/doctype/room/room.js b/erpnext/education/doctype/room/room.js
index 20cee6b2a61..1263b60ced2 100644
--- a/erpnext/education/doctype/room/room.js
+++ b/erpnext/education/doctype/room/room.js
@@ -1,2 +1,2 @@
frappe.ui.form.on("Room", {
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/room/room_dashboard.py b/erpnext/education/doctype/room/room_dashboard.py
index 99aac3393e6..7bcb97f709f 100644
--- a/erpnext/education/doctype/room/room_dashboard.py
+++ b/erpnext/education/doctype/room/room_dashboard.py
@@ -16,4 +16,4 @@ def get_data():
'items': ['Assessment Plan']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/student/student.js b/erpnext/education/doctype/student/student.js
index fd23ae41ef1..aead556dc9f 100644
--- a/erpnext/education/doctype/student/student.js
+++ b/erpnext/education/doctype/student/student.js
@@ -60,4 +60,4 @@ frappe.ui.form.on('Student Sibling', {
return { filters: [['Student', 'name', 'not in', sibling_list]] };
};
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/student/student_list.js b/erpnext/education/doctype/student/student_list.js
index 763f120f417..c1bce24d153 100644
--- a/erpnext/education/doctype/student/student_list.js
+++ b/erpnext/education/doctype/student/student_list.js
@@ -1,3 +1,3 @@
frappe.listview_settings['Student'] = {
add_fields: [ "image"]
-}
\ No newline at end of file
+}
diff --git a/erpnext/education/doctype/student/test_student.py b/erpnext/education/doctype/student/test_student.py
index 2e5263788f7..fcb2b5fb930 100644
--- a/erpnext/education/doctype/student/test_student.py
+++ b/erpnext/education/doctype/student/test_student.py
@@ -68,4 +68,4 @@ def get_student(email):
student_id = frappe.get_all("Student", {"student_email_id": email}, ["name"])[0].name
return frappe.get_doc("Student", student_id)
except IndexError:
- return None
\ No newline at end of file
+ return None
diff --git a/erpnext/education/doctype/student_admission/templates/student_admission_row.html b/erpnext/education/doctype/student_admission/templates/student_admission_row.html
index 99868d5f020..529d65184a8 100644
--- a/erpnext/education/doctype/student_admission/templates/student_admission_row.html
+++ b/erpnext/education/doctype/student_admission/templates/student_admission_row.html
@@ -41,4 +41,4 @@
-
\ No newline at end of file
+
diff --git a/erpnext/education/doctype/student_admission/test_student_admission.js b/erpnext/education/doctype/student_admission/test_student_admission.js
index 3a0bb0b2f23..e01791a78ac 100644
--- a/erpnext/education/doctype/student_admission/test_student_admission.js
+++ b/erpnext/education/doctype/student_admission/test_student_admission.js
@@ -37,4 +37,4 @@ QUnit.test('Test: Student Admission', function(assert) {
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/student_applicant/student_applicant.js b/erpnext/education/doctype/student_applicant/student_applicant.js
index b4cfdf16e0d..7b41a721748 100644
--- a/erpnext/education/doctype/student_applicant/student_applicant.js
+++ b/erpnext/education/doctype/student_applicant/student_applicant.js
@@ -59,4 +59,4 @@ frappe.ui.form.on('Student Sibling', {
frm.add_fetch("student", "gender", "gender");
frm.add_fetch("student", "date_of_birth", "date_of_birth");
}
-});
\ 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
index 211348201e3..193b6d32977 100644
--- a/erpnext/education/doctype/student_applicant/student_applicant.py
+++ b/erpnext/education/doctype/student_applicant/student_applicant.py
@@ -49,7 +49,7 @@ class StudentApplicant(Document):
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 \
diff --git a/erpnext/education/doctype/student_applicant/student_applicant_list.js b/erpnext/education/doctype/student_applicant/student_applicant_list.js
index 817a728f696..c39d46ec63a 100644
--- a/erpnext/education/doctype/student_applicant/student_applicant_list.js
+++ b/erpnext/education/doctype/student_applicant/student_applicant_list.js
@@ -18,4 +18,4 @@ frappe.listview_settings['Student Applicant'] = {
return [__("Admitted"), "blue", "application_status,=,Admitted"];
}
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/education/doctype/student_applicant/tests/test_student_applicant.js b/erpnext/education/doctype/student_applicant/tests/test_student_applicant.js
index a69ad8a5646..fa679779858 100644
--- a/erpnext/education/doctype/student_applicant/tests/test_student_applicant.js
+++ b/erpnext/education/doctype/student_applicant/tests/test_student_applicant.js
@@ -92,4 +92,4 @@ QUnit.test('Test: Student Applicant', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/student_applicant/tests/test_student_applicant_dummy_data.js b/erpnext/education/doctype/student_applicant/tests/test_student_applicant_dummy_data.js
index 26244ab1845..03101e41e00 100644
--- a/erpnext/education/doctype/student_applicant/tests/test_student_applicant_dummy_data.js
+++ b/erpnext/education/doctype/student_applicant/tests/test_student_applicant_dummy_data.js
@@ -84,4 +84,4 @@ QUnit.test('Make Students', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/student_applicant/tests/test_student_applicant_options.js b/erpnext/education/doctype/student_applicant/tests/test_student_applicant_options.js
index 114358f32a1..daa36e75ce4 100644
--- a/erpnext/education/doctype/student_applicant/tests/test_student_applicant_options.js
+++ b/erpnext/education/doctype/student_applicant/tests/test_student_applicant_options.js
@@ -107,4 +107,4 @@ QUnit.test('test student applicant', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/student_attendance/student_attendance.js b/erpnext/education/doctype/student_attendance/student_attendance.js
index f025a1a5397..2bbecb911f6 100644
--- a/erpnext/education/doctype/student_attendance/student_attendance.js
+++ b/erpnext/education/doctype/student_attendance/student_attendance.js
@@ -2,4 +2,4 @@
// 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")
\ No newline at end of file
+cur_frm.add_fetch("course_schedule", "student_group", "student_group")
diff --git a/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py b/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py
index 9c41b8f3dc6..e405b8aed9d 100644
--- a/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py
+++ b/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py
@@ -9,4 +9,4 @@ def get_data():
'items': ['Student Monthly Attendance Sheet', 'Student Batch-Wise Attendance']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/student_attendance/student_attendance_list.js b/erpnext/education/doctype/student_attendance/student_attendance_list.js
index 0d3e7ade152..e89b76c8d55 100644
--- a/erpnext/education/doctype/student_attendance/student_attendance_list.js
+++ b/erpnext/education/doctype/student_attendance/student_attendance_list.js
@@ -8,4 +8,4 @@ frappe.listview_settings['Student Attendance'] = {
return [__("Present"), "green", "status,=,Present"];
}
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/education/doctype/student_attendance/test_student_attendance.js b/erpnext/education/doctype/student_attendance/test_student_attendance.js
index c7da6f6b246..3d30b090ba0 100644
--- a/erpnext/education/doctype/student_attendance/test_student_attendance.js
+++ b/erpnext/education/doctype/student_attendance/test_student_attendance.js
@@ -28,4 +28,4 @@ QUnit.test('Test: Student Attendance', function(assert){
() => done()
]);
-});
\ 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
index 028db918812..972973fbadb 100644
--- a/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.py
+++ b/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.py
@@ -38,4 +38,4 @@ def get_student_attendance_records(based_on, date=None, student_group=None, cour
if student.student == attendance.student:
student.status = attendance.status
- return student_list
\ No newline at end of file
+ return student_list
diff --git a/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.js b/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.js
index cea0761ae8b..b66d8397ba2 100644
--- a/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.js
+++ b/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.js
@@ -82,4 +82,4 @@ QUnit.test('Test: Student Attendace Tool', function(assert){
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/education/doctype/student_group/student_group.js b/erpnext/education/doctype/student_group/student_group.js
index 51e3b74a5cf..39ee9cebd10 100644
--- a/erpnext/education/doctype/student_group/student_group.js
+++ b/erpnext/education/doctype/student_group/student_group.js
@@ -142,4 +142,4 @@ frappe.ui.form.on('Student Group Instructor', {
return { filters: [['Instructor', 'name', 'not in', instructor_list]] };
};
}
-});
\ 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
index 0260b808646..3d4572abf70 100644
--- a/erpnext/education/doctype/student_group/student_group.py
+++ b/erpnext/education/doctype/student_group/student_group.py
@@ -128,4 +128,3 @@ def fetch_students(doctype, txt, searchfield, start, page_len, filters):
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
index ad7a6de7b3c..d37445f7b98 100644
--- a/erpnext/education/doctype/student_group/student_group_dashboard.py
+++ b/erpnext/education/doctype/student_group/student_group_dashboard.py
@@ -16,4 +16,4 @@ def get_data():
'items': ['Course Schedule']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/student_group/test_student_group.js b/erpnext/education/doctype/student_group/test_student_group.js
index 6673343be7e..4c7e47bc38f 100644
--- a/erpnext/education/doctype/student_group/test_student_group.js
+++ b/erpnext/education/doctype/student_group/test_student_group.js
@@ -53,4 +53,4 @@ QUnit.test('Test: Student Group', function(assert){
() => done()
]);
-});
\ No newline at end of file
+});
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
index d0d7afd701c..c189e2763c8 100644
--- 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
@@ -37,4 +37,4 @@ frappe.ui.form.on("Student Group Creation Tool", "onload", function(frm){
}
};
});
-});
\ 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
index dc8667ec065..28ff7d618c1 100644
--- 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
@@ -76,4 +76,4 @@ class StudentGroupCreationTool(Document):
student_group.append('students', student)
student_group.save()
- frappe.msgprint(_("{0} Student Groups created.").format(l))
\ No newline at end of file
+ frappe.msgprint(_("{0} Student Groups created.").format(l))
diff --git a/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.js b/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.js
index 34c10930b57..fa612ba2727 100644
--- a/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.js
+++ b/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.js
@@ -81,4 +81,4 @@ QUnit.test('Test: Student Group Creation Tool', function(assert){
() => done()
]);
-});
\ 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
index 820e30118dc..1fe4ea1dc35 100644
--- a/erpnext/education/doctype/student_group_student/student_group_student.py
+++ b/erpnext/education/doctype/student_group_student/student_group_student.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class StudentGroupStudent(Document):
- pass
\ No newline at end of file
+ pass
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
index fdcc1474797..0ff6d1a76ea 100644
--- a/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py
+++ b/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py
@@ -8,4 +8,4 @@ def get_data():
'items': ['Student Attendance']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/education/doctype/student_leave_application/test_student_leave_application.js b/erpnext/education/doctype/student_leave_application/test_student_leave_application.js
index 5af9f5d50f7..6bbf17babfa 100644
--- a/erpnext/education/doctype/student_leave_application/test_student_leave_application.js
+++ b/erpnext/education/doctype/student_leave_application/test_student_leave_application.js
@@ -66,4 +66,4 @@ QUnit.test('Test: Student Leave Application', function(assert){
() => done()
]);
-});
\ No newline at end of file
+});
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
index fcdd42825f3..9cae2577481 100644
--- a/erpnext/education/doctype/student_leave_application/test_student_leave_application.py
+++ b/erpnext/education/doctype/student_leave_application/test_student_leave_application.py
@@ -112,4 +112,4 @@ def create_holiday_list():
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
\ No newline at end of file
+ return holiday_list
diff --git a/erpnext/education/doctype/student_log/test_student_log.js b/erpnext/education/doctype/student_log/test_student_log.js
index 5775369e52e..4c90c5f6ef2 100644
--- a/erpnext/education/doctype/student_log/test_student_log.js
+++ b/erpnext/education/doctype/student_log/test_student_log.js
@@ -32,4 +32,4 @@ QUnit.test('Test: Student Log', function(assert){
},
() => done()
]);
-});
\ No newline at end of file
+});
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
index 72772b7b32c..a9e84e6e277 100644
--- 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
@@ -12,67 +12,67 @@
padding: 0.75in;
margin: auto;
}
-
+
.print-format.landscape {
max-width: 11.69in;
padding: 0.2in;
}
-
+
.page-break {
padding: 30px 0px;
border-bottom: 1px dashed #888;
}
-
+
.page-break:first-child {
padding-top: 0px;
}
-
+
.page-break:last-child {
border-bottom: 0px;
}
-
+
/* mozilla hack for images in table */
body:last-child .print-format td img {
width: 100% !important;
}
-
+
@media(max-width: 767px) {
.print-format {
padding: 0.2in;
}
}
}
-
+
@media print {
.print-format p {
margin-left: 1px;
margin-right: 1px;
}
}
-
+
.data-field {
margin-top: 5px;
margin-bottom: 5px;
}
-
+
.data-field .value {
word-wrap: break-word;
}
-
+
.important .value {
font-size: 120%;
font-weight: bold;
}
-
+
.important label {
line-height: 1.8;
margin: 0px;
}
-
+
.table {
margin: 20px 0px;
}
-
+
.square-image {
width: 100%;
height: 0;
@@ -83,88 +83,88 @@
background-position: center center;
border-radius: 4px;
}
-
+
.print-item-image {
object-fit: contain;
}
-
+
.pdf-variables,
.pdf-variable,
.visible-pdf {
display: none !important;
}
-
+
.print-format {
font-size: 9pt;
font-family: "Helvetica Neue", Helvetica, Arial, "Open Sans", sans-serif;
-webkit-print-color-adjust:exact;
}
-
+
.page-break {
page-break-after: always;
}
-
+
.print-heading {
border-bottom: 1px solid #aaa;
margin-bottom: 10px;
}
-
+
.print-heading h2 {
margin: 0px;
}
.print-heading h4 {
margin-top: 5px;
}
-
+
table.no-border, table.no-border td {
border: 0px;
}
-
+
.print-format label {
/* wkhtmltopdf breaks label into multiple lines when it is inline-block */
display: block;
}
-
+
.print-format img {
max-width: 100%;
}
-
+
.print-format table td > .primary:first-child {
font-weight: bold;
}
-
+
.print-format td, .print-format th {
vertical-align: top !important;
padding: 6px !important;
}
-
+
.print-format p {
margin: 3px 0px 3px;
}
-
+
table td div {
-
+
/* needed to avoid partial cutting of text between page break in wkhtmltopdf */
page-break-inside: avoid !important;
-
+
}
-
+
/* hack for webkit specific browser */
@media (-webkit-min-device-pixel-ratio:0) {
thead, tfoot { display: table-row-group; }
}
-
+
[document-status] {
margin-bottom: 5mm;
}
-
+
.signature-img {
background: #fff;
border-radius: 3px;
margin-top: 5px;
max-height: 150px;
}
-
+
.print-heading {
text-align: right;
text-transform: uppercase;
@@ -173,16 +173,16 @@
margin-bottom: 20px;
border-bottom: 1px solid #d1d8dd;
}
-
+
.print-heading h2 {
font-size: 24px;
}
-
+
.print-format th {
background-color: #eee !important;
border-bottom: 0px !important;
}
-
+
/* modern format: for-test */
.pbi_avoid {
@@ -344,7 +344,7 @@
-
+
{{ _("Student Attendance")}}
Present {{ doc.attendance.get("Present") if doc.attendance.get("Present") != None else '0' }} days
@@ -352,7 +352,7 @@
-
+
{{ _("Parents Teacher Meeting Attendance")}}
Present {{ doc.parents_attendance if doc.parents_attendance != None else '0' }}
diff --git a/erpnext/education/doctype/topic/topic.js b/erpnext/education/doctype/topic/topic.js
index 2002b0c8e3b..0c903c5a56a 100644
--- a/erpnext/education/doctype/topic/topic.js
+++ b/erpnext/education/doctype/topic/topic.js
@@ -52,4 +52,4 @@ let get_courses_without_topic = function(topic) {
method: 'erpnext.education.doctype.topic.topic.get_courses_without_topic',
args: {'topic': topic}
});
-};
\ No newline at end of file
+};
diff --git a/erpnext/education/doctype/topic/topic.py b/erpnext/education/doctype/topic/topic.py
index a5253e93294..fb680d725b0 100644
--- a/erpnext/education/doctype/topic/topic.py
+++ b/erpnext/education/doctype/topic/topic.py
@@ -56,4 +56,4 @@ def add_content_to_topics(content_type, content, topics):
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')
\ No newline at end of file
+ title=_('Topics updated'), indicator='green')
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
index c145359129e..c0ec0357cc6 100644
--- 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
@@ -121,4 +121,3 @@ def get_chart_data(data):
},
'type': 'bar'
}
-
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
index ad04356201e..9f1fcbc8162 100644
--- 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
@@ -9,4 +9,4 @@ frappe.query_reports["Student Batch-Wise Attendance"] = {
"default": frappe.datetime.get_today(),
"reqd": 1
}]
-}
\ 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
index 7793dcf3953..e2576a0c710 100644
--- 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
@@ -67,4 +67,4 @@ def get_student_attendance(student_group, date):
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
\ No newline at end of file
+ return student_attendance
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
index 104d3ec06f9..62c94557d7e 100644
--- 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
@@ -39,4 +39,4 @@ frappe.query_reports["Student Monthly Attendance Sheet"] = {
}
});
}
-}
\ No newline at end of file
+}
diff --git a/erpnext/education/web_form/student_applicant/student_applicant.js b/erpnext/education/web_form/student_applicant/student_applicant.js
index 699703c5792..ffc5e984253 100644
--- a/erpnext/education/web_form/student_applicant/student_applicant.js
+++ b/erpnext/education/web_form/student_applicant/student_applicant.js
@@ -1,3 +1,3 @@
frappe.ready(function() {
// bind events here
-})
\ No newline at end of file
+})
diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.js b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.js
index a9925adee7a..f5ea8047c6a 100644
--- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.js
+++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.js
@@ -1,3 +1,2 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-
diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py
index a25a29f9e5f..99ede8f31de 100644
--- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py
+++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py
@@ -103,4 +103,4 @@ class xml2dict(object):
"""parse a string"""
t = ET.fromstring(s)
root_tag, root_tree = self._namespace_split(t.tag, self._parse_node(t))
- return object_dict({root_tag: root_tree})
\ No newline at end of file
+ return object_dict({root_tag: root_tree})
diff --git a/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py b/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py
index 6a846efad70..bff928c1c96 100644
--- a/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py
+++ b/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py
@@ -17,4 +17,4 @@ class ExotelSettings(Document):
response = requests.get('https://api.exotel.com/v1/Accounts/{sid}'
.format(sid = self.account_sid), auth=(self.api_key, self.api_token))
if response.status_code != 200:
- frappe.throw(_("Invalid credentials"))
\ No newline at end of file
+ frappe.throw(_("Invalid credentials"))
diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/account_balance.html b/erpnext/erpnext_integrations/doctype/mpesa_settings/account_balance.html
index 2c4d4bbdecf..b74a7187f0c 100644
--- a/erpnext/erpnext_integrations/doctype/mpesa_settings/account_balance.html
+++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/account_balance.html
@@ -25,4 +25,4 @@
{% else %}
Account Balance Information Not Available.
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_connector.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_connector.py
index 554c6b0eb0f..d1adeeee072 100644
--- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_connector.py
+++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_connector.py
@@ -115,4 +115,4 @@ class MpesaConnector():
saf_url = "{0}{1}".format(self.base_url, "/mpesa/stkpush/v1/processrequest")
r = requests.post(saf_url, headers=headers, json=payload)
- return r.json()
\ No newline at end of file
+ return r.json()
diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_custom_fields.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_custom_fields.py
index 0499e88b5e7..139e2fb192b 100644
--- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_custom_fields.py
+++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_custom_fields.py
@@ -50,4 +50,4 @@ def create_pos_settings(record_dict):
for record in record_dict:
if frappe.db.exists("POS Field", {"fieldname": record.get("fieldname")}):
continue
- frappe.get_doc(record).insert()
\ No newline at end of file
+ frappe.get_doc(record).insert()
diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py
index fdfaa1b0540..de933578613 100644
--- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py
+++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py
@@ -276,4 +276,4 @@ def fetch_param_value(response, key, key_field):
"""Fetch the specified key from list of dictionary. Key is identified via the key field."""
for param in response:
if param[key_field] == key:
- return param["Value"]
\ No newline at end of file
+ return param["Value"]
diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/test_mpesa_settings.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/test_mpesa_settings.py
index b0e662d3f32..d4cb6b982bb 100644
--- a/erpnext/erpnext_integrations/doctype/mpesa_settings/test_mpesa_settings.py
+++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/test_mpesa_settings.py
@@ -355,4 +355,4 @@ def get_account_balance_callback_payload():
}
}
}
- }
\ No newline at end of file
+ }
diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py
index 42d4b9b2b43..73f5927df40 100644
--- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py
+++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py
@@ -50,7 +50,7 @@ class PlaidConnector():
"secret": self.settings.plaid_secret,
"products": self.products,
})
-
+
return args
def get_link_token(self, update_mode=False):
diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js
index 37bf2824505..3740d049839 100644
--- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js
+++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js
@@ -135,4 +135,4 @@ erpnext.integrations.plaidLink = class plaidLink {
});
}, __("Select a company"), __("Continue"));
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py
index 3ef069b5e20..eddcb3401f6 100644
--- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py
+++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py
@@ -110,7 +110,7 @@ def add_bank_accounts(response, bank, company):
frappe.msgprint(_("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.throw(_("There was an error creating Bank Account while linking with Plaid."),
+ frappe.throw(_("There was an error creating Bank Account while linking with Plaid."),
title=_("Plaid Link Failed"))
else:
diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js
index 5482b9cc695..af06b3451e0 100644
--- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js
+++ b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js
@@ -346,4 +346,4 @@ erpnext.tally_migration.get_html_rows = (logs, field) => {
}).join("");
return rows
-}
\ No newline at end of file
+}
diff --git a/erpnext/erpnext_integrations/doctype/woocommerce_settings/woocommerce_settings.py b/erpnext/erpnext_integrations/doctype/woocommerce_settings/woocommerce_settings.py
index bd072f40a19..45f261007f8 100644
--- a/erpnext/erpnext_integrations/doctype/woocommerce_settings/woocommerce_settings.py
+++ b/erpnext/erpnext_integrations/doctype/woocommerce_settings/woocommerce_settings.py
@@ -27,7 +27,7 @@ class WoocommerceSettings(Document):
for doctype in ["Customer", "Address"]:
df = dict(fieldname='woocommerce_email', label='Woocommerce Email', fieldtype='Data', read_only=1, print_hide=1)
create_custom_field(doctype, df)
-
+
if not frappe.get_value("Item Group", {"name": _("WooCommerce Products")}):
item_group = frappe.new_doc("Item Group")
item_group.item_group_name = _("WooCommerce Products")
@@ -74,4 +74,4 @@ def generate_secret():
def get_series():
return {
"sales_order_series" : frappe.get_meta("Sales Order").get_options("naming_series") or "SO-WOO-",
- }
\ No newline at end of file
+ }
diff --git a/erpnext/erpnext_integrations/stripe_integration.py b/erpnext/erpnext_integrations/stripe_integration.py
index a35ca28e0a3..108b4c0dd81 100644
--- a/erpnext/erpnext_integrations/stripe_integration.py
+++ b/erpnext/erpnext_integrations/stripe_integration.py
@@ -50,4 +50,4 @@ def create_subscription_on_stripe(stripe_settings):
stripe_settings.integration_request.db_set('status', 'Failed', update_modified=False)
frappe.log_error(frappe.get_traceback())
- return stripe_settings.finalize_request()
\ No newline at end of file
+ return stripe_settings.finalize_request()
diff --git a/erpnext/erpnext_integrations/utils.py b/erpnext/erpnext_integrations/utils.py
index a5e162f8b5d..caafc0821e1 100644
--- a/erpnext/erpnext_integrations/utils.py
+++ b/erpnext/erpnext_integrations/utils.py
@@ -52,7 +52,7 @@ def create_mode_of_payment(gateway, payment_type="General"):
"payment_gateway": gateway
}, ['payment_account'])
- mode_of_payment = frappe.db.exists("Mode of Payment", gateway)
+ mode_of_payment = frappe.db.exists("Mode of Payment", gateway)
if not mode_of_payment and payment_gateway_account:
mode_of_payment = frappe.get_doc({
"doctype": "Mode of Payment",
diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js
index dd6dc666d23..e494489d21a 100644
--- a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js
+++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.js
@@ -11,4 +11,4 @@ frappe.dashboards.chart_sources["Department wise Patient Appointments"] = {
default: frappe.defaults.get_user_default("Company")
}
]
-};
\ No newline at end of file
+};
diff --git a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py
index 062da6e4654..eca7143e689 100644
--- a/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py
+++ b/erpnext/healthcare/dashboard_chart_source/department_wise_patient_appointments/department_wise_patient_appointments.py
@@ -69,4 +69,4 @@ def get(chart_name = None, chart = None, no_cache = None, filters = None, from_d
}
],
'type': 'bar'
- }
\ No newline at end of file
+ }
diff --git a/erpnext/healthcare/doctype/appointment_type/appointment_type.js b/erpnext/healthcare/doctype/appointment_type/appointment_type.js
index 861675acea3..99b7cb295a9 100644
--- a/erpnext/healthcare/doctype/appointment_type/appointment_type.js
+++ b/erpnext/healthcare/doctype/appointment_type/appointment_type.js
@@ -80,4 +80,4 @@ frappe.ui.form.on('Appointment Type Service Item', {
});
}
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/healthcare/doctype/clinical_procedure/test_clinical_procedure.py b/erpnext/healthcare/doctype/clinical_procedure/test_clinical_procedure.py
index 03e96a4b3be..81a3982c4bf 100644
--- a/erpnext/healthcare/doctype/clinical_procedure/test_clinical_procedure.py
+++ b/erpnext/healthcare/doctype/clinical_procedure/test_clinical_procedure.py
@@ -63,4 +63,4 @@ def create_procedure(procedure_template, patient, practitioner):
procedure.company = "_Test Company"
procedure.warehouse = "_Test Warehouse - _TC"
procedure.submit()
- return procedure
\ No newline at end of file
+ return procedure
diff --git a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js
index 1ef110dc6f4..ae6b39bb181 100644
--- a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js
+++ b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.js
@@ -188,4 +188,3 @@ frappe.tour['Clinical Procedure Template'] = [
description: __('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.')
}
];
-
diff --git a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.py b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.py
index f32b7cf9d8d..58194f10a8c 100644
--- a/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.py
+++ b/erpnext/healthcare/doctype/clinical_procedure_template/clinical_procedure_template.py
@@ -118,4 +118,3 @@ def change_item_code_from_template(item_code, doc):
rename_doc('Item', doc.item_code, item_code, ignore_permissions=True)
frappe.db.set_value('Clinical Procedure Template', doc.name, 'item_code', item_code)
return
-
diff --git a/erpnext/healthcare/doctype/exercise_type/exercise_type.py b/erpnext/healthcare/doctype/exercise_type/exercise_type.py
index fb635c85788..ae44a2b77b5 100644
--- a/erpnext/healthcare/doctype/exercise_type/exercise_type.py
+++ b/erpnext/healthcare/doctype/exercise_type/exercise_type.py
@@ -12,4 +12,3 @@ class ExerciseType(Document):
self.name = ' - '.join(filter(None, [self.exercise_name, self.difficulty_level]))
else:
self.name = self.exercise_name
-
diff --git a/erpnext/healthcare/doctype/fee_validity/fee_validity.py b/erpnext/healthcare/doctype/fee_validity/fee_validity.py
index 058bc971929..5b9c17934fa 100644
--- a/erpnext/healthcare/doctype/fee_validity/fee_validity.py
+++ b/erpnext/healthcare/doctype/fee_validity/fee_validity.py
@@ -60,4 +60,4 @@ def check_is_new_patient(appointment):
})
if len(appointment_exists) and appointment_exists[0]:
return False
- return True
\ No newline at end of file
+ return True
diff --git a/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py b/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py
index 7e7fd824119..6ae3e12d50e 100644
--- a/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py
+++ b/erpnext/healthcare/doctype/fee_validity/test_fee_validity.py
@@ -47,4 +47,4 @@ class TestFeeValidity(unittest.TestCase):
# appointment should be invoiced as it is not within fee validity and the max_visits are exceeded
appointment = create_appointment(patient, practitioner, add_days(nowdate(), 10), invoice=1)
invoiced = frappe.db.get_value("Patient Appointment", appointment.name, "invoiced")
- self.assertEqual(invoiced, 1)
\ No newline at end of file
+ self.assertEqual(invoiced, 1)
diff --git a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js
index fc0b24122ae..44c399856c8 100644
--- a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js
+++ b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner.js
@@ -142,4 +142,3 @@ frappe.tour['Healthcare Practitioner'] = [
description: __('If this Healthcare Practitioner also works for the In-Patient Department, set the inpatient visit charge for this Practitioner.')
}
];
-
diff --git a/erpnext/healthcare/doctype/healthcare_service_unit_type/test_healthcare_service_unit_type.py b/erpnext/healthcare/doctype/healthcare_service_unit_type/test_healthcare_service_unit_type.py
index 01cf4b0a494..3ee3377b004 100644
--- a/erpnext/healthcare/doctype/healthcare_service_unit_type/test_healthcare_service_unit_type.py
+++ b/erpnext/healthcare/doctype/healthcare_service_unit_type/test_healthcare_service_unit_type.py
@@ -30,4 +30,4 @@ def get_unit_type():
unit_type.no_of_hours = 1
unit_type.rate = 4000
unit_type.save()
- return unit_type
\ No newline at end of file
+ return unit_type
diff --git a/erpnext/healthcare/doctype/inpatient_medication_entry/test_inpatient_medication_entry.py b/erpnext/healthcare/doctype/inpatient_medication_entry/test_inpatient_medication_entry.py
index 7cb5a4814e8..ff9e21252a1 100644
--- a/erpnext/healthcare/doctype/inpatient_medication_entry/test_inpatient_medication_entry.py
+++ b/erpnext/healthcare/doctype/inpatient_medication_entry/test_inpatient_medication_entry.py
@@ -153,4 +153,4 @@ def make_stock_entry(warehouse=None):
# in stock uom
se_child.conversion_factor = 1.0
se_child.expense_account = expense_account
- stock_entry.submit()
\ No newline at end of file
+ stock_entry.submit()
diff --git a/erpnext/healthcare/doctype/inpatient_medication_order/test_inpatient_medication_order.py b/erpnext/healthcare/doctype/inpatient_medication_order/test_inpatient_medication_order.py
index 21776d2380a..798976283b3 100644
--- a/erpnext/healthcare/doctype/inpatient_medication_order/test_inpatient_medication_order.py
+++ b/erpnext/healthcare/doctype/inpatient_medication_order/test_inpatient_medication_order.py
@@ -140,4 +140,3 @@ def create_ipme(filters, update_stock=0):
ipme = ipme.get_medication_orders()
return ipme
-
diff --git a/erpnext/healthcare/doctype/patient_appointment/test_patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/test_patient_appointment.py
index 5f2dc480a1b..9dd4a2c73c0 100644
--- a/erpnext/healthcare/doctype/patient_appointment/test_patient_appointment.py
+++ b/erpnext/healthcare/doctype/patient_appointment/test_patient_appointment.py
@@ -295,4 +295,4 @@ def create_appointment_type(args=None):
'color': args.get('color') or '#7575ff',
'price_list': args.get('price_list') or frappe.db.get_value("Price List", {"selling": 1}),
'items': args.get('items') or items
- }).insert()
\ No newline at end of file
+ }).insert()
diff --git a/erpnext/healthcare/doctype/patient_assessment/patient_assessment.py b/erpnext/healthcare/doctype/patient_assessment/patient_assessment.py
index 3033a3e6ac9..7bad20dffdc 100644
--- a/erpnext/healthcare/doctype/patient_assessment/patient_assessment.py
+++ b/erpnext/healthcare/doctype/patient_assessment/patient_assessment.py
@@ -31,6 +31,3 @@ def create_patient_assessment(source_name, target_doc=None):
}, target_doc)
return doc
-
-
-
diff --git a/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py b/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py
index cc2141790f7..2b3029efdeb 100644
--- a/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py
+++ b/erpnext/healthcare/doctype/patient_encounter/patient_encounter.py
@@ -99,4 +99,4 @@ def create_therapy_plan(encounter):
def delete_ip_medication_order(encounter):
record = frappe.db.exists('Inpatient Medication Order', {'patient_encounter': encounter.name})
if record:
- frappe.delete_doc('Inpatient Medication Order', record, force=1)
\ No newline at end of file
+ frappe.delete_doc('Inpatient Medication Order', record, force=1)
diff --git a/erpnext/healthcare/doctype/patient_history_settings/patient_history_settings.py b/erpnext/healthcare/doctype/patient_history_settings/patient_history_settings.py
index 887d58a2e04..63b00859d71 100644
--- a/erpnext/healthcare/doctype/patient_history_settings/patient_history_settings.py
+++ b/erpnext/healthcare/doctype/patient_history_settings/patient_history_settings.py
@@ -187,4 +187,4 @@ def get_module(doc):
if not module:
module = frappe.db.get_value('DocType', doc.doctype, 'module')
- return module
\ No newline at end of file
+ return module
diff --git a/erpnext/healthcare/doctype/patient_medical_record/test_patient_medical_record.py b/erpnext/healthcare/doctype/patient_medical_record/test_patient_medical_record.py
index c1d9872a019..f8ccc8a002a 100644
--- a/erpnext/healthcare/doctype/patient_medical_record/test_patient_medical_record.py
+++ b/erpnext/healthcare/doctype/patient_medical_record/test_patient_medical_record.py
@@ -88,4 +88,4 @@ def create_lab_test(template, patient):
lab_test.template = template
lab_test.save()
lab_test.submit()
- return lab_test
\ No newline at end of file
+ return lab_test
diff --git a/erpnext/healthcare/doctype/therapy_plan_template/therapy_plan_template.py b/erpnext/healthcare/doctype/therapy_plan_template/therapy_plan_template.py
index 748c12c6896..635d4beb8df 100644
--- a/erpnext/healthcare/doctype/therapy_plan_template/therapy_plan_template.py
+++ b/erpnext/healthcare/doctype/therapy_plan_template/therapy_plan_template.py
@@ -70,4 +70,4 @@ class TherapyPlanTemplate(Document):
item_price.item_name = self.item_name
item_price.price_list_rate = self.total_amount
item_price.ignore_mandatory = True
- item_price.save(ignore_permissions=True)
\ No newline at end of file
+ item_price.save(ignore_permissions=True)
diff --git a/erpnext/healthcare/doctype/therapy_session/therapy_session.js b/erpnext/healthcare/doctype/therapy_session/therapy_session.js
index fd200036935..fbfa774c91c 100644
--- a/erpnext/healthcare/doctype/therapy_session/therapy_session.js
+++ b/erpnext/healthcare/doctype/therapy_session/therapy_session.js
@@ -168,4 +168,4 @@ frappe.ui.form.on('Therapy Session', {
});
}
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/healthcare/doctype/therapy_type/test_therapy_type.py b/erpnext/healthcare/doctype/therapy_type/test_therapy_type.py
index 21f63699753..a5dad293e31 100644
--- a/erpnext/healthcare/doctype/therapy_type/test_therapy_type.py
+++ b/erpnext/healthcare/doctype/therapy_type/test_therapy_type.py
@@ -47,4 +47,4 @@ def create_exercise_type():
'description': 'Squat and Rise'
})
exercise_type.save()
- return exercise_type
\ No newline at end of file
+ return exercise_type
diff --git a/erpnext/healthcare/doctype/vital_signs/vital_signs.py b/erpnext/healthcare/doctype/vital_signs/vital_signs.py
index 35c823d739c..4bb3940ae0f 100644
--- a/erpnext/healthcare/doctype/vital_signs/vital_signs.py
+++ b/erpnext/healthcare/doctype/vital_signs/vital_signs.py
@@ -15,4 +15,3 @@ class VitalSigns(Document):
def set_title(self):
self.title = _('{0} on {1}').format(self.patient_name or self.patient,
frappe.utils.format_date(self.signs_date))[:100]
-
diff --git a/erpnext/healthcare/page/patient_history/patient_history.html b/erpnext/healthcare/page/patient_history/patient_history.html
index be486c62d1e..f1706557f45 100644
--- a/erpnext/healthcare/page/patient_history/patient_history.html
+++ b/erpnext/healthcare/page/patient_history/patient_history.html
@@ -23,4 +23,4 @@
More..
-
\ No newline at end of file
+
diff --git a/erpnext/stock/doctype/item/tests/test_item.js b/erpnext/stock/doctype/item/tests/test_item.js
index 5e3524e5b6d..7f7e72d5c0f 100644
--- a/erpnext/stock/doctype/item/tests/test_item.js
+++ b/erpnext/stock/doctype/item/tests/test_item.js
@@ -118,4 +118,4 @@ QUnit.test("test: item", function (assert) {
),
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/stock/doctype/item_attribute/test_item_attribute.py b/erpnext/stock/doctype/item_attribute/test_item_attribute.py
index 61e53d24a46..07af176a944 100644
--- a/erpnext/stock/doctype/item_attribute/test_item_attribute.py
+++ b/erpnext/stock/doctype/item_attribute/test_item_attribute.py
@@ -28,4 +28,3 @@ class TestItemAttribute(unittest.TestCase):
item_attribute.increment = 0.5
item_attribute.save()
-
diff --git a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py
index a9183ce5866..3e4e8500467 100644
--- a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py
+++ b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class ItemCustomerDetail(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py b/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py
index c27d1be7892..939abf8d324 100644
--- a/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py
+++ b/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py
@@ -65,4 +65,4 @@ class ItemManufacturer(Document):
@frappe.whitelist()
def get_item_manufacturer_part_no(item_code, manufacturer):
return frappe.db.get_value("Item Manufacturer",
- {'item_code': item_code, 'manufacturer': manufacturer}, 'manufacturer_part_no')
\ No newline at end of file
+ {'item_code': item_code, 'manufacturer': manufacturer}, 'manufacturer_part_no')
diff --git a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py
index 92aefc8d9e9..785737b267f 100644
--- a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py
+++ b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class ItemQualityInspectionParameter(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/item_reorder/item_reorder.py b/erpnext/stock/doctype/item_reorder/item_reorder.py
index 0f9c593d36a..5cdaa229565 100644
--- a/erpnext/stock/doctype/item_reorder/item_reorder.py
+++ b/erpnext/stock/doctype/item_reorder/item_reorder.py
@@ -9,4 +9,4 @@ import frappe
from frappe.model.document import Document
class ItemReorder(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/item_supplier/item_supplier.py b/erpnext/stock/doctype/item_supplier/item_supplier.py
index 1a07f03ec58..5dda535f810 100644
--- a/erpnext/stock/doctype/item_supplier/item_supplier.py
+++ b/erpnext/stock/doctype/item_supplier/item_supplier.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class ItemSupplier(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/item_tax/item_tax.py b/erpnext/stock/doctype/item_tax/item_tax.py
index 1fe2f454681..7c9e8115758 100644
--- a/erpnext/stock/doctype/item_tax/item_tax.py
+++ b/erpnext/stock/doctype/item_tax/item_tax.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class ItemTax(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/item_website_specification/item_website_specification.py b/erpnext/stock/doctype/item_website_specification/item_website_specification.py
index 6d0dbad2a5e..e3041cf3eef 100644
--- a/erpnext/stock/doctype/item_website_specification/item_website_specification.py
+++ b/erpnext/stock/doctype/item_website_specification/item_website_specification.py
@@ -9,4 +9,4 @@ import frappe
from frappe.model.document import Document
class ItemWebsiteSpecification(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py
index 0521a7ad1cb..493e8b239a4 100644
--- a/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py
+++ b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class LandedCostItem(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py
index f7ccb9b6e29..38f4eafc3aa 100644
--- a/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py
+++ b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class LandedCostPurchaseReceipt(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py
index e4458207dbb..0dc396aefac 100644
--- a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py
+++ b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py
@@ -6,4 +6,4 @@ import frappe
from frappe.model.document import Document
class LandedCostTaxesandCharges(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/material_request/material_request_dashboard.py b/erpnext/stock/doctype/material_request/material_request_dashboard.py
index f3e5e5db250..e1e4faf6825 100644
--- a/erpnext/stock/doctype/material_request/material_request_dashboard.py
+++ b/erpnext/stock/doctype/material_request/material_request_dashboard.py
@@ -20,4 +20,4 @@ def get_data():
'items': ['Work Order']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/stock/doctype/material_request/tests/test_material_request.js b/erpnext/stock/doctype/material_request/tests/test_material_request.js
index bf26cd117f8..a2cd03b6495 100644
--- a/erpnext/stock/doctype/material_request/tests/test_material_request.js
+++ b/erpnext/stock/doctype/material_request/tests/test_material_request.js
@@ -37,4 +37,3 @@ QUnit.test("test material request", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/material_request/tests/test_material_request_from_bom.js b/erpnext/stock/doctype/material_request/tests/test_material_request_from_bom.js
index d8b39fe5aaf..6fb55ae02ac 100644
--- a/erpnext/stock/doctype/material_request/tests/test_material_request_from_bom.js
+++ b/erpnext/stock/doctype/material_request/tests/test_material_request_from_bom.js
@@ -25,4 +25,3 @@ QUnit.test("test material request get items from BOM", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/material_request/tests/test_material_request_type_manufacture.js b/erpnext/stock/doctype/material_request/tests/test_material_request_type_manufacture.js
index 91b47bac4d9..137079b9838 100644
--- a/erpnext/stock/doctype/material_request/tests/test_material_request_type_manufacture.js
+++ b/erpnext/stock/doctype/material_request/tests/test_material_request_type_manufacture.js
@@ -27,4 +27,3 @@ QUnit.test("test material request", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/material_request/tests/test_material_request_type_material_issue.js b/erpnext/stock/doctype/material_request/tests/test_material_request_type_material_issue.js
index 050e0f0d1c9..b03a8543c6f 100644
--- a/erpnext/stock/doctype/material_request/tests/test_material_request_type_material_issue.js
+++ b/erpnext/stock/doctype/material_request/tests/test_material_request_type_material_issue.js
@@ -27,4 +27,3 @@ QUnit.test("test material request for issue", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/material_request/tests/test_material_request_type_material_transfer.js b/erpnext/stock/doctype/material_request/tests/test_material_request_type_material_transfer.js
index d6f9b661414..7c62c2e63a1 100644
--- a/erpnext/stock/doctype/material_request/tests/test_material_request_type_material_transfer.js
+++ b/erpnext/stock/doctype/material_request/tests/test_material_request_type_material_transfer.js
@@ -27,4 +27,3 @@ QUnit.test("test material request for transfer", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.py b/erpnext/stock/doctype/material_request_item/material_request_item.py
index 16f007f6a20..e0066e65d2c 100644
--- a/erpnext/stock/doctype/material_request_item/material_request_item.py
+++ b/erpnext/stock/doctype/material_request_item/material_request_item.py
@@ -12,4 +12,4 @@ class MaterialRequestItem(Document):
pass
def on_doctype_update():
- frappe.db.add_index("Material Request Item", ["item_code", "warehouse"])
\ No newline at end of file
+ frappe.db.add_index("Material Request Item", ["item_code", "warehouse"])
diff --git a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py
index 694ab384bf6..b0a855961f9 100644
--- a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py
+++ b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py
@@ -9,4 +9,4 @@ import frappe
from frappe.model.document import Document
class PackingSlipItem(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/pick_list/pick_list.js b/erpnext/stock/doctype/pick_list/pick_list.js
index ee218f2f685..730fd7a829c 100644
--- a/erpnext/stock/doctype/pick_list/pick_list.js
+++ b/erpnext/stock/doctype/pick_list/pick_list.js
@@ -201,4 +201,4 @@ function get_item_details(item_code, uom=null) {
uom
});
}
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/pick_list/pick_list_dashboard.py b/erpnext/stock/doctype/pick_list/pick_list_dashboard.py
index 6e007df5e6b..7c321c450a6 100644
--- a/erpnext/stock/doctype/pick_list/pick_list_dashboard.py
+++ b/erpnext/stock/doctype/pick_list/pick_list_dashboard.py
@@ -9,4 +9,4 @@ def get_data():
'items': ['Stock Entry', 'Delivery Note']
},
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/stock/doctype/price_list/price_list.css b/erpnext/stock/doctype/price_list/price_list.css
index 61b069442f8..6832954a811 100644
--- a/erpnext/stock/doctype/price_list/price_list.css
+++ b/erpnext/stock/doctype/price_list/price_list.css
@@ -4,4 +4,4 @@
.table-grid thead tr {
height: 50px;
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/price_list/price_list.js b/erpnext/stock/doctype/price_list/price_list.js
index c362b5a765c..9291498e863 100644
--- a/erpnext/stock/doctype/price_list/price_list.js
+++ b/erpnext/stock/doctype/price_list/price_list.js
@@ -11,4 +11,4 @@ frappe.ui.form.on("Price List", {
frappe.set_route("Report", "Item Price");
}, "fa fa-money");
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/stock/doctype/price_list/price_list.py b/erpnext/stock/doctype/price_list/price_list.py
index 33713faf696..10abde17eb2 100644
--- a/erpnext/stock/doctype/price_list/price_list.py
+++ b/erpnext/stock/doctype/price_list/price_list.py
@@ -62,4 +62,4 @@ def get_price_list_details(price_list):
frappe.cache().hset("price_list_details", price_list, price_list_details)
- return price_list_details or {}
\ No newline at end of file
+ return price_list_details or {}
diff --git a/erpnext/stock/doctype/price_list/test_price_list.py b/erpnext/stock/doctype/price_list/test_price_list.py
index 5979c861294..2c287c9033c 100644
--- a/erpnext/stock/doctype/price_list/test_price_list.py
+++ b/erpnext/stock/doctype/price_list/test_price_list.py
@@ -6,4 +6,4 @@ import frappe
# test_ignore = ["Item"]
-test_records = frappe.get_test_records('Price List')
\ No newline at end of file
+test_records = frappe.get_test_records('Price List')
diff --git a/erpnext/stock/doctype/price_list/test_price_list_uom.js b/erpnext/stock/doctype/price_list/test_price_list_uom.js
index 7fbce7d59d2..3896c0e59ea 100644
--- a/erpnext/stock/doctype/price_list/test_price_list_uom.js
+++ b/erpnext/stock/doctype/price_list/test_price_list_uom.js
@@ -55,4 +55,4 @@ QUnit.test("test price list with uom dependancy", function(assert) {
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/stock/doctype/purchase_receipt/regional/india.js b/erpnext/stock/doctype/purchase_receipt/regional/india.js
index b4f1201f36c..2d982cc1bb3 100644
--- a/erpnext/stock/doctype/purchase_receipt/regional/india.js
+++ b/erpnext/stock/doctype/purchase_receipt/regional/india.js
@@ -1,3 +1,3 @@
{% include "erpnext/regional/india/taxes.js" %}
-erpnext.setup_auto_gst_taxation('Purchase Receipt');
\ No newline at end of file
+erpnext.setup_auto_gst_taxation('Purchase Receipt');
diff --git a/erpnext/stock/doctype/putaway_rule/putaway_rule.py b/erpnext/stock/doctype/putaway_rule/putaway_rule.py
index 0f50bcd6ea8..315e723fabc 100644
--- a/erpnext/stock/doctype/putaway_rule/putaway_rule.py
+++ b/erpnext/stock/doctype/putaway_rule/putaway_rule.py
@@ -232,4 +232,4 @@ def get_serial_nos_to_allocate(serial_nos, to_allocate):
allocated_serial_nos = serial_nos[0: cint(to_allocate)]
serial_nos[:] = serial_nos[cint(to_allocate):] # pop out allocated serial nos and modify list
return "\n".join(allocated_serial_nos) if allocated_serial_nos else ""
- else: return ""
\ No newline at end of file
+ else: return ""
diff --git a/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py b/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py
index 86f7dc3e084..0590ae1abeb 100644
--- a/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py
+++ b/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py
@@ -386,4 +386,4 @@ def create_putaway_rule(**args):
if not args.do_not_save:
putaway.save()
- return putaway
\ No newline at end of file
+ return putaway
diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.js b/erpnext/stock/doctype/quality_inspection/quality_inspection.js
index f7565fd505c..d08dc3e8b76 100644
--- a/erpnext/stock/doctype/quality_inspection/quality_inspection.js
+++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.js
@@ -81,4 +81,4 @@ frappe.ui.form.on("Quality Inspection", {
});
}
},
-});
\ No newline at end of file
+});
diff --git a/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py b/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py
index 65188a22c6e..b10fa310d66 100644
--- a/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py
+++ b/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class QualityInspectionReading(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py b/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py
index 01d2031b3a4..971b3c29825 100644
--- a/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py
+++ b/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py
@@ -16,4 +16,4 @@ def get_template_details(template):
fields=["specification", "value", "acceptance_formula",
"numeric", "formula_based_criteria", "min_value", "max_value"],
filters={'parenttype': 'Quality Inspection Template', 'parent': template},
- order_by="idx")
\ No newline at end of file
+ order_by="idx")
diff --git a/erpnext/stock/doctype/serial_no/test_serial_no.py b/erpnext/stock/doctype/serial_no/test_serial_no.py
index b9a58cf43e4..0eccce3a58e 100644
--- a/erpnext/stock/doctype/serial_no/test_serial_no.py
+++ b/erpnext/stock/doctype/serial_no/test_serial_no.py
@@ -193,4 +193,4 @@ class TestSerialNo(unittest.TestCase):
frappe.db.rollback()
def tearDown(self):
- frappe.db.rollback()
\ No newline at end of file
+ frappe.db.rollback()
diff --git a/erpnext/stock/doctype/shipment/shipment.js b/erpnext/stock/doctype/shipment/shipment.js
index ce2906ecbe9..13a17a25913 100644
--- a/erpnext/stock/doctype/shipment/shipment.js
+++ b/erpnext/stock/doctype/shipment/shipment.js
@@ -150,8 +150,8 @@ frappe.ui.form.on('Shipment', {
frm.set_value('pickup_contact_name', '');
frm.set_value('pickup_contact', '');
}
- frappe.throw(__("Email or Phone/Mobile of the Contact are mandatory to continue.")
- + "" + __("Please set Email/Phone for the contact")
+ frappe.throw(__("Email or Phone/Mobile of the Contact are mandatory to continue.")
+ + "" + __("Please set Email/Phone for the contact")
+ ` ${contact_name}`);
}
let contact_display = r.message.contact_display;
@@ -244,8 +244,8 @@ frappe.ui.form.on('Shipment', {
frm.set_value('pickup_company', '');
frm.set_value('pickup_contact', '');
}
- frappe.throw(__("Last Name, Email or Phone/Mobile of the user are mandatory to continue.") + ""
- + __("Please first set Last Name, Email and Phone for the user")
+ frappe.throw(__("Last Name, Email or Phone/Mobile of the user are mandatory to continue.") + ""
+ + __("Please first set Last Name, Email and Phone for the user")
+ ` ${frappe.session.user}`);
}
let contact_display = r.full_name;
diff --git a/erpnext/stock/doctype/shipment/shipment_list.js b/erpnext/stock/doctype/shipment/shipment_list.js
index 52b052c81f3..ae6a3c154e8 100644
--- a/erpnext/stock/doctype/shipment/shipment_list.js
+++ b/erpnext/stock/doctype/shipment/shipment_list.js
@@ -5,4 +5,4 @@ frappe.listview_settings['Shipment'] = {
return [__("Booked"), "green"];
}
}
-};
\ No newline at end of file
+};
diff --git a/erpnext/stock/doctype/shipment/test_shipment.py b/erpnext/stock/doctype/shipment/test_shipment.py
index 9c3e22f0231..db2f1161743 100644
--- a/erpnext/stock/doctype/shipment/test_shipment.py
+++ b/erpnext/stock/doctype/shipment/test_shipment.py
@@ -24,7 +24,7 @@ def create_test_delivery_note():
customer = get_shipment_customer()
item = get_shipment_item(company.name)
posting_date = date.today() + timedelta(days=1)
-
+
create_material_receipt(item, company.name)
delivery_note = frappe.new_doc("Delivery Note")
delivery_note.company = company.name
@@ -73,7 +73,7 @@ def create_test_shipment(delivery_notes = None):
shipment.pickup_to = '17:00'
shipment.description_of_content = 'unit test entry'
for delivery_note in delivery_notes:
- shipment.append('shipment_delivery_note',
+ shipment.append('shipment_delivery_note',
{
"delivery_note": delivery_note.name
}
@@ -222,7 +222,7 @@ def create_material_receipt(item, company):
)
stock.insert()
stock.submit()
-
+
def create_shipment_item(item_name, company_name):
item = frappe.new_doc("Item")
diff --git a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue.js b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue.js
index 3cf4861ccb8..a87a7fb7fd8 100644
--- a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue.js
+++ b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue.js
@@ -28,4 +28,3 @@ QUnit.test("test material request", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue_with_serialize_item.js b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue_with_serialize_item.js
index aac09c30cd5..cae318d8f2c 100644
--- a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue_with_serialize_item.js
+++ b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_issue_with_serialize_item.js
@@ -32,4 +32,3 @@ QUnit.test("test material issue", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt.js b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt.js
index 828738eb6ca..ef0286fe1b9 100644
--- a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt.js
+++ b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt.js
@@ -29,4 +29,3 @@ QUnit.test("test material request", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt_for_serialize_item.js b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt_for_serialize_item.js
index ffd06642bf0..54e1ac81211 100644
--- a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt_for_serialize_item.js
+++ b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_receipt_for_serialize_item.js
@@ -32,4 +32,3 @@ QUnit.test("test material receipt", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer.js b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer.js
index cdeb4ab04a7..fac0b4b8922 100644
--- a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer.js
+++ b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer.js
@@ -31,4 +31,3 @@ QUnit.test("test material request", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer_for_manufacture.js b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer_for_manufacture.js
index e8b2973c457..9f853072709 100644
--- a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer_for_manufacture.js
+++ b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_material_transfer_for_manufacture.js
@@ -31,4 +31,3 @@ QUnit.test("test material Transfer to manufacture", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_repack.js b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_repack.js
index 699634df6d2..20f119ad617 100644
--- a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_repack.js
+++ b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_repack.js
@@ -39,4 +39,3 @@ QUnit.test("test repack", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_subcontract.js b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_subcontract.js
index 770f886d043..8243426032d 100644
--- a/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_subcontract.js
+++ b/erpnext/stock/doctype/stock_entry/tests/test_stock_entry_for_subcontract.js
@@ -31,4 +31,3 @@ QUnit.test("test material Transfer to manufacture", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py
index f9e062f8516..a5623fded23 100644
--- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py
+++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class StockEntryDetail(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js
index 80001d63fd4..666d2c7144f 100644
--- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js
@@ -29,4 +29,3 @@ QUnit.test("test Stock Reconciliation", function(assert) {
() => done()
]);
});
-
diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
index c192582531a..94b006c8944 100644
--- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
@@ -458,4 +458,3 @@ def set_valuation_method(item_code, valuation_method):
}, allow_negative_stock=1)
test_dependencies = ["Item", "Warehouse"]
-
diff --git a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py
index 67fe20bd379..fdead205670 100644
--- a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py
+++ b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py
@@ -7,4 +7,4 @@ import frappe
from frappe.model.document import Document
class UOMConversionDetail(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/stock/doctype/warehouse/test_warehouse.js b/erpnext/stock/doctype/warehouse/test_warehouse.js
index 8ea280cc59e..850da1ee45f 100644
--- a/erpnext/stock/doctype/warehouse/test_warehouse.js
+++ b/erpnext/stock/doctype/warehouse/test_warehouse.js
@@ -16,4 +16,4 @@ QUnit.test("test: warehouse", function (assert) {
() => done()
]);
-});
\ No newline at end of file
+});
diff --git a/erpnext/stock/doctype/warehouse/test_warehouse.py b/erpnext/stock/doctype/warehouse/test_warehouse.py
index e3981c913e1..6e429a22552 100644
--- a/erpnext/stock/doctype/warehouse/test_warehouse.py
+++ b/erpnext/stock/doctype/warehouse/test_warehouse.py
@@ -180,4 +180,4 @@ def get_group_stock_account(company, company_abbr=None):
if not company_abbr:
company_abbr = frappe.get_cached_value("Company", company, 'abbr')
group_stock_account = "Current Assets - " + company_abbr
- return group_stock_account
\ No newline at end of file
+ return group_stock_account
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index 1f172504a7f..9243e1ed84f 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -48,11 +48,11 @@ frappe.ui.form.on("Warehouse", {
frm.add_custom_button(__('Non-Group to Group'),
function() { convert_to_group_or_ledger(frm); }, 'fa fa-retweet', 'btn-default')
}
-
+
frm.toggle_enable(['is_group', 'company'], false);
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Warehouse'};
-
+
frm.fields_dict['parent_warehouse'].get_query = function(doc) {
return {
filters: {
@@ -83,6 +83,6 @@ function convert_to_group_or_ledger(frm){
callback: function(){
frm.refresh();
}
-
+
})
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/warehouse/warehouse_tree.js b/erpnext/stock/doctype/warehouse/warehouse_tree.js
index 407d7d1ccd5..e9e14c72466 100644
--- a/erpnext/stock/doctype/warehouse/warehouse_tree.js
+++ b/erpnext/stock/doctype/warehouse/warehouse_tree.js
@@ -24,4 +24,4 @@ frappe.treeview_settings['Warehouse'] = {
+ '').insertBefore(node.$ul);
}
}
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/landed_taxes_and_charges_common.js b/erpnext/stock/landed_taxes_and_charges_common.js
index f3f61963a88..ff8a69fb033 100644
--- a/erpnext/stock/landed_taxes_and_charges_common.js
+++ b/erpnext/stock/landed_taxes_and_charges_common.js
@@ -59,4 +59,3 @@ document_list.forEach((doctype) => {
}
});
});
-
diff --git a/erpnext/stock/page/warehouse_capacity_summary/warehouse_capacity_summary.html b/erpnext/stock/page/warehouse_capacity_summary/warehouse_capacity_summary.html
index 90112c78a83..de7e38e7d3e 100644
--- a/erpnext/stock/page/warehouse_capacity_summary/warehouse_capacity_summary.html
+++ b/erpnext/stock/page/warehouse_capacity_summary/warehouse_capacity_summary.html
@@ -37,4 +37,4 @@
{% endif %}
-{% endfor %}
\ No newline at end of file
+{% endfor %}
diff --git a/erpnext/stock/page/warehouse_capacity_summary/warehouse_capacity_summary_header.html b/erpnext/stock/page/warehouse_capacity_summary/warehouse_capacity_summary_header.html
index acaf180a903..7ac5e640302 100644
--- a/erpnext/stock/page/warehouse_capacity_summary/warehouse_capacity_summary_header.html
+++ b/erpnext/stock/page/warehouse_capacity_summary/warehouse_capacity_summary_header.html
@@ -16,4 +16,4 @@
% Occupied
-
\ No newline at end of file
+
diff --git a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.py b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.py
index 7354eee4130..29689b1a912 100644
--- a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.py
+++ b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.py
@@ -24,7 +24,7 @@ def execute(filters=None):
data.append([item, item_map[item]["item_name"], item_map[item]["description"], wh, batch,
frappe.db.get_value('Batch', batch, 'expiry_date'), qty_dict.expiry_status
])
-
+
return columns, data
@@ -70,7 +70,7 @@ def get_item_warehouse_batch_map(filters, float_precision):
"expires_on": None, "expiry_status": None}))
qty_dict = iwb_map[d.item_code][d.warehouse][d.batch_no]
-
+
expiry_date_unicode = frappe.db.get_value('Batch', d.batch_no, 'expiry_date')
qty_dict.expires_on = expiry_date_unicode
diff --git a/erpnext/stock/report/cogs_by_item_group/cogs_by_item_group.py b/erpnext/stock/report/cogs_by_item_group/cogs_by_item_group.py
index 9e5e63e37e2..da593a40d68 100644
--- a/erpnext/stock/report/cogs_by_item_group/cogs_by_item_group.py
+++ b/erpnext/stock/report/cogs_by_item_group/cogs_by_item_group.py
@@ -64,7 +64,7 @@ def get_data(filters: Filters) -> Data:
assign_self_values(leveled_dict, svd_list)
assign_agg_values(leveled_dict)
-
+
data = []
for item in leveled_dict.items():
i = item[1]
@@ -160,7 +160,7 @@ def get_row(name:str, value:float, is_bold:int, indent:int) -> Row:
if is_bold:
item_group = frappe.bold(item_group)
return frappe._dict(item_group=item_group, cogs_debit=value, indent=indent)
-
+
def assign_item_groups_to_svd_list(svd_list: SVDList) -> None:
ig_map = get_item_groups_map(svd_list)
diff --git a/erpnext/stock/report/delayed_item_report/delayed_item_report.py b/erpnext/stock/report/delayed_item_report/delayed_item_report.py
index 4fc4027200d..61306662c0d 100644
--- a/erpnext/stock/report/delayed_item_report/delayed_item_report.py
+++ b/erpnext/stock/report/delayed_item_report/delayed_item_report.py
@@ -174,4 +174,4 @@ class DelayedItemReport(object):
"fieldname": "po_no",
"fieldtype": "Data",
"width": 100
- }]
\ No newline at end of file
+ }]
diff --git a/erpnext/stock/report/delayed_order_report/delayed_order_report.py b/erpnext/stock/report/delayed_order_report/delayed_order_report.py
index 79dc5d88219..d9151606884 100644
--- a/erpnext/stock/report/delayed_order_report/delayed_order_report.py
+++ b/erpnext/stock/report/delayed_order_report/delayed_order_report.py
@@ -87,4 +87,4 @@ class DelayedOrderReport(DelayedItemReport):
"fieldname": "po_no",
"fieldtype": "Data",
"width": 110
- }]
\ No newline at end of file
+ }]
diff --git a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.js b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.js
index ade004cde42..8a04565c197 100644
--- a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.js
+++ b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.js
@@ -6,4 +6,3 @@ frappe.require("assets/erpnext/js/sales_trends_filters.js", function() {
filters: erpnext.get_sales_trends_filters()
}
});
-
diff --git a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.py b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.py
index 446d3049b71..77fd2ff2447 100644
--- a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.py
+++ b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.py
@@ -47,4 +47,4 @@ def get_chart_data(data, filters):
]
},
"type" : "bar"
- }
\ No newline at end of file
+ }
diff --git a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py
index cf174c93682..00125e71a9a 100644
--- a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py
+++ b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py
@@ -108,4 +108,4 @@ def get_columns():
'fieldtype': 'Float',
'fieldname': 'differnce',
'width': 110
- }]
\ No newline at end of file
+ }]
diff --git a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.py b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.py
index e54cf4c66c7..b3b7594ffd7 100644
--- a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.py
+++ b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.py
@@ -145,4 +145,4 @@ def get_columns():
'fieldtype': 'Currency',
'fieldname': 'valuation_rate',
'width': 110
- }]
\ No newline at end of file
+ }]
diff --git a/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py b/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py
index a7243878eb8..c8f60a15d64 100644
--- a/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py
+++ b/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py
@@ -138,4 +138,4 @@ def get_columns(filters):
"fieldtype": "Currency",
"width": "150"
}
- ]
\ No newline at end of file
+ ]
diff --git a/erpnext/stock/report/item_price_stock/item_price_stock.js b/erpnext/stock/report/item_price_stock/item_price_stock.js
index 0bbc61b9dbf..7af1dab6a0b 100644
--- a/erpnext/stock/report/item_price_stock/item_price_stock.js
+++ b/erpnext/stock/report/item_price_stock/item_price_stock.js
@@ -11,4 +11,4 @@ frappe.query_reports["Item Price Stock"] = {
"options": "Item"
}
]
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/report/item_shortage_report/item_shortage_report.py b/erpnext/stock/report/item_shortage_report/item_shortage_report.py
index 086d833bbc4..c67eed7e926 100644
--- a/erpnext/stock/report/item_shortage_report/item_shortage_report.py
+++ b/erpnext/stock/report/item_shortage_report/item_shortage_report.py
@@ -158,5 +158,3 @@ def get_columns():
]
return columns
-
-
diff --git a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js
index c0535bf0efa..173aad6d5a9 100644
--- a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js
+++ b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js
@@ -29,4 +29,4 @@ frappe.query_reports["Itemwise Recommended Reorder Level"] = {
"options": "Brand"
}
]
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js
index d16485e8cc6..695efacb694 100644
--- a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js
+++ b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.js
@@ -6,4 +6,3 @@ frappe.require("assets/erpnext/js/purchase_trends_filters.js", function() {
filters: erpnext.get_purchase_trends_filters()
}
});
-
diff --git a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py
index 8227f1548c1..0d96ea6aa8e 100644
--- a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py
+++ b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py
@@ -48,4 +48,4 @@ def get_chart_data(data, filters):
},
"type" : "bar",
"colors":["#5e64ff"]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/stock/report/serial_no_ledger/serial_no_ledger.py b/erpnext/stock/report/serial_no_ledger/serial_no_ledger.py
index c3339fd341e..cc3aa3522d8 100644
--- a/erpnext/stock/report/serial_no_ledger/serial_no_ledger.py
+++ b/erpnext/stock/report/serial_no_ledger/serial_no_ledger.py
@@ -50,4 +50,3 @@ def get_columns(filters):
def get_data(filters):
return get_stock_ledger_entries(filters, '<=', order="asc") or []
-
diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.js b/erpnext/stock/report/stock_ageing/stock_ageing.js
index 8495142ba5b..b22788f7a29 100644
--- a/erpnext/stock/report/stock_ageing/stock_ageing.js
+++ b/erpnext/stock/report/stock_ageing/stock_ageing.js
@@ -64,4 +64,4 @@ frappe.query_reports["Stock Ageing"] = {
"default": 0
}
]
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/report/stock_analytics/stock_analytics.py b/erpnext/stock/report/stock_analytics/stock_analytics.py
index fde934b1339..d62abed91f3 100644
--- a/erpnext/stock/report/stock_analytics/stock_analytics.py
+++ b/erpnext/stock/report/stock_analytics/stock_analytics.py
@@ -208,7 +208,3 @@ def get_chart_data(columns):
chart["type"] = "line"
return chart
-
-
-
-
diff --git a/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.py b/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.py
index bfc4471b9af..7e0c0e8ab35 100644
--- a/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.py
+++ b/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.py
@@ -128,4 +128,4 @@ def get_columns(filters):
"fieldtype": "Currency",
"width": "120"
}
- ]
\ No newline at end of file
+ ]
diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py
index 808d2791709..7956f2e8648 100644
--- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py
+++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py
@@ -32,7 +32,7 @@ def execute(filters=None):
if filters.brand and filters.brand != item.brand:
continue
-
+
elif filters.item_group and filters.item_group != item.item_group:
continue
diff --git a/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.py b/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.py
index 78e95df9898..fa19eeba58b 100644
--- a/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.py
+++ b/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.py
@@ -58,14 +58,14 @@ def get_data(warehouse):
serial_item_list = frappe.get_all("Item", filters={
'has_serial_no': True,
}, fields=['item_code', 'item_name'])
-
+
status_list = ['Active', 'Expired']
data = []
for item in serial_item_list:
- total_serial_no = frappe.db.count("Serial No",
+ total_serial_no = frappe.db.count("Serial No",
filters={"item_code": item.item_code, "status": ("in", status_list), "warehouse": warehouse})
- actual_qty = frappe.db.get_value('Bin', fieldname=['actual_qty'],
+ actual_qty = frappe.db.get_value('Bin', fieldname=['actual_qty'],
filters={"warehouse": warehouse, "item_code": item.item_code})
# frappe.db.get_value returns null if no record exist.
@@ -84,4 +84,4 @@ def get_data(warehouse):
data.append(row)
- return data
\ No newline at end of file
+ return data
diff --git a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.js b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.js
index cdc9895917c..5b006470756 100644
--- a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.js
+++ b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.js
@@ -25,4 +25,4 @@ frappe.query_reports["Supplier-Wise Sales Analytics"] = {
"default": frappe.datetime.month_end()
},
]
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/report/total_stock_summary/total_stock_summary.js b/erpnext/stock/report/total_stock_summary/total_stock_summary.js
index 264642856da..90648f1b249 100644
--- a/erpnext/stock/report/total_stock_summary/total_stock_summary.js
+++ b/erpnext/stock/report/total_stock_summary/total_stock_summary.js
@@ -38,4 +38,4 @@ frappe.query_reports["Total Stock Summary"] = {
"reqd": 1
},
]
-}
\ No newline at end of file
+}
diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js
index 9ac1efa268d..d4daacd4ea4 100644
--- a/erpnext/support/doctype/issue/issue.js
+++ b/erpnext/support/doctype/issue/issue.js
@@ -145,4 +145,4 @@ frappe.ui.form.on("Issue", {
// frm.timeline.wrapper.data("help-article-event-attached", true);
// }
},
-});
\ No newline at end of file
+});
diff --git a/erpnext/support/doctype/issue/test_issue.py b/erpnext/support/doctype/issue/test_issue.py
index 739324f5620..4146e488629 100644
--- a/erpnext/support/doctype/issue/test_issue.py
+++ b/erpnext/support/doctype/issue/test_issue.py
@@ -182,7 +182,7 @@ class TestFirstResponseTime(TestSetUp):
# issue creation and first response are on consecutive days
def test_first_response_time_case6(self):
"""
- Test frt when the issue was created before working hours and the first response is also sent before working hours, but on the next day.
+ Test frt when the issue was created before working hours and the first response is also sent before working hours, but on the next day.
"""
issue = create_issue_and_communication(get_datetime("06-28-2021 6:00"), get_datetime("06-29-2021 6:00"))
self.assertEqual(issue.first_response_time, 28800.0)
@@ -204,7 +204,7 @@ class TestFirstResponseTime(TestSetUp):
def test_first_response_time_case9(self):
"""
Test frt when the issue was created before working hours and the first response is sent on the next day, which is not a work day.
- """
+ """
issue = create_issue_and_communication(get_datetime("06-25-2021 6:00"), get_datetime("06-26-2021 11:00"))
self.assertEqual(issue.first_response_time, 28800.0)
@@ -232,7 +232,7 @@ class TestFirstResponseTime(TestSetUp):
def test_first_response_time_case13(self):
"""
Test frt when the issue was created during working hours and the first response is sent on the next day, which is not a work day.
- """
+ """
issue = create_issue_and_communication(get_datetime("06-25-2021 12:00"), get_datetime("06-26-2021 11:00"))
self.assertEqual(issue.first_response_time, 21600.0)
@@ -348,7 +348,7 @@ class TestFirstResponseTime(TestSetUp):
"""
issue = create_issue_and_communication(get_datetime("06-25-2021 20:00"), get_datetime("06-27-2021 11:00"))
self.assertEqual(issue.first_response_time, 1.0)
-
+
def create_issue_and_communication(issue_creation, first_responded_on):
issue = make_issue(issue_creation, index=1)
sender = create_user("test@admin.com")
@@ -422,4 +422,4 @@ def create_communication(reference_name, sender, sent_or_received, creation):
"creation": creation,
"reference_name": reference_name
})
- communication.save()
\ No newline at end of file
+ communication.save()
diff --git a/erpnext/support/doctype/issue_priority/issue_priority.py b/erpnext/support/doctype/issue_priority/issue_priority.py
index 7c8925ebc30..514b6cc26ba 100644
--- a/erpnext/support/doctype/issue_priority/issue_priority.py
+++ b/erpnext/support/doctype/issue_priority/issue_priority.py
@@ -8,4 +8,4 @@ from frappe import _
from frappe.model.document import Document
class IssuePriority(Document):
- pass
\ No newline at end of file
+ pass
diff --git a/erpnext/support/doctype/issue_priority/test_issue_priority.py b/erpnext/support/doctype/issue_priority/test_issue_priority.py
index a7b55f8a74c..618c93ea9d8 100644
--- a/erpnext/support/doctype/issue_priority/test_issue_priority.py
+++ b/erpnext/support/doctype/issue_priority/test_issue_priority.py
@@ -25,4 +25,4 @@ def insert_priority(name):
frappe.get_doc({
"doctype": "Issue Priority",
"name": name
- }).insert(ignore_permissions=True)
\ No newline at end of file
+ }).insert(ignore_permissions=True)
diff --git a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py
index 472e96c059e..8c1c1ef0de0 100644
--- a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py
+++ b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py
@@ -246,7 +246,7 @@ def get_active_service_level_agreement_for(doc):
filters += [["Service Level Agreement", "default_service_level_agreement", "=", 0]]
agreements = frappe.get_all("Service Level Agreement", filters=filters, or_filters=or_filters,
fields=["name", "default_priority", "apply_sla_for_resolution", "condition"])
-
+
# check if the current document on which SLA is to be applied fulfills all the conditions
filtered_agreements = []
for agreement in agreements:
diff --git a/erpnext/support/doctype/service_level_agreement/service_level_agreement_dashboard.py b/erpnext/support/doctype/service_level_agreement/service_level_agreement_dashboard.py
index f2bd6813965..7e7a405d6e7 100644
--- a/erpnext/support/doctype/service_level_agreement/service_level_agreement_dashboard.py
+++ b/erpnext/support/doctype/service_level_agreement/service_level_agreement_dashboard.py
@@ -9,4 +9,4 @@ def get_data():
'items': ['Issue']
}
]
- }
\ No newline at end of file
+ }
diff --git a/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py
index 1a5ff27d2a4..a81516ec116 100644
--- a/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py
+++ b/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py
@@ -511,4 +511,4 @@ def make_lead(creation=None, index=0):
"creation": creation,
"service_level_agreement_creation": creation,
"priority": "Medium"
- }).insert(ignore_permissions=True)
\ No newline at end of file
+ }).insert(ignore_permissions=True)
diff --git a/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.py b/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.py
index 922da2b33de..69bf2730d35 100644
--- a/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.py
+++ b/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.py
@@ -32,4 +32,4 @@ def execute(filters=None):
ORDER BY creation_date desc
''', (filters.from_date, filters.to_date))
- return columns, data
\ No newline at end of file
+ return columns, data
diff --git a/erpnext/support/report/issue_analytics/issue_analytics.py b/erpnext/support/report/issue_analytics/issue_analytics.py
index 3fdb10ddf38..54fce0b3592 100644
--- a/erpnext/support/report/issue_analytics/issue_analytics.py
+++ b/erpnext/support/report/issue_analytics/issue_analytics.py
@@ -218,4 +218,4 @@ class IssueAnalytics(object):
'datasets': []
},
'type': 'line'
- }
\ No newline at end of file
+ }
diff --git a/erpnext/support/report/issue_analytics/test_issue_analytics.py b/erpnext/support/report/issue_analytics/test_issue_analytics.py
index 77483198ecc..a9d961a4592 100644
--- a/erpnext/support/report/issue_analytics/test_issue_analytics.py
+++ b/erpnext/support/report/issue_analytics/test_issue_analytics.py
@@ -22,7 +22,7 @@ class TestIssueAnalytics(unittest.TestCase):
if current_month_date.year != last_month_date.year:
self.current_month += '_' + str(current_month_date.year)
self.last_month += '_' + str(last_month_date.year)
-
+
def test_issue_analytics(self):
create_service_level_agreements_for_issues()
create_issue_types()
@@ -211,4 +211,4 @@ def create_records():
"assign_to": ["test@example.com", "test1@example.com"],
"doctype": "Issue",
"name": issue.name
- })
\ No newline at end of file
+ })
diff --git a/erpnext/support/report/issue_summary/issue_summary.py b/erpnext/support/report/issue_summary/issue_summary.py
index bba25b8bed6..7c4af39f104 100644
--- a/erpnext/support/report/issue_summary/issue_summary.py
+++ b/erpnext/support/report/issue_summary/issue_summary.py
@@ -362,4 +362,3 @@ class IssueSummary(object):
'datatype': 'Int',
}
]
-
diff --git a/erpnext/support/web_form/issues/issues.js b/erpnext/support/web_form/issues/issues.js
index 699703c5792..ffc5e984253 100644
--- a/erpnext/support/web_form/issues/issues.js
+++ b/erpnext/support/web_form/issues/issues.js
@@ -1,3 +1,3 @@
frappe.ready(function() {
// bind events here
-})
\ No newline at end of file
+})
diff --git a/erpnext/telephony/doctype/call_log/call_log.py b/erpnext/telephony/doctype/call_log/call_log.py
index c00dfa90566..6f8e4116956 100644
--- a/erpnext/telephony/doctype/call_log/call_log.py
+++ b/erpnext/telephony/doctype/call_log/call_log.py
@@ -173,4 +173,3 @@ def get_linked_call_logs(doctype, docname):
})
return timeline_contents
-
diff --git a/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.js b/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.js
index 1bcc8461323..b80acdb3760 100644
--- a/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.js
+++ b/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.js
@@ -99,4 +99,3 @@ frappe.ui.form.on('Incoming Call Settings', {
validate_call_schedule(frm.doc.call_handling_schedule);
}
});
-
diff --git a/erpnext/templates/emails/birthday_reminder.html b/erpnext/templates/emails/birthday_reminder.html
index 12cdf1ec600..1f57b4969c0 100644
--- a/erpnext/templates/emails/birthday_reminder.html
+++ b/erpnext/templates/emails/birthday_reminder.html
@@ -22,4 +22,4 @@
{{ reminder_text }}
{{ message }}
-
\ No newline at end of file
+
diff --git a/erpnext/templates/emails/daily_project_summary.html b/erpnext/templates/emails/daily_project_summary.html
index 8b60830db62..5ccc6101665 100644
--- a/erpnext/templates/emails/daily_project_summary.html
+++ b/erpnext/templates/emails/daily_project_summary.html
@@ -43,4 +43,4 @@
-{% endfor %}
\ No newline at end of file
+{% endfor %}
diff --git a/erpnext/templates/emails/daily_work_summary.html b/erpnext/templates/emails/daily_work_summary.html
index a22e09cb8de..1764e8f7038 100644
--- a/erpnext/templates/emails/daily_work_summary.html
+++ b/erpnext/templates/emails/daily_work_summary.html
@@ -52,4 +52,4 @@
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/erpnext/templates/emails/request_for_quotation.html b/erpnext/templates/emails/request_for_quotation.html
index 812939a5538..3283987fab0 100644
--- a/erpnext/templates/emails/request_for_quotation.html
+++ b/erpnext/templates/emails/request_for_quotation.html
@@ -21,4 +21,4 @@
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/erpnext/templates/emails/training_event.html b/erpnext/templates/emails/training_event.html
index 51c232d8e87..8a2414a3c92 100644
--- a/erpnext/templates/emails/training_event.html
+++ b/erpnext/templates/emails/training_event.html
@@ -11,7 +11,7 @@
{{_("Update Response")}}
{% if not self_study %}
{{_("Please update your status for this training event")}}:
-
+
{% else %}
{{_("Please confirm once you have completed your training")}}:
diff --git a/erpnext/templates/generators/item/item_inquiry.js b/erpnext/templates/generators/item/item_inquiry.js
index e7db3a368df..4724b681196 100644
--- a/erpnext/templates/generators/item/item_inquiry.js
+++ b/erpnext/templates/generators/item/item_inquiry.js
@@ -74,4 +74,4 @@ frappe.ready(() => {
d.show();
});
-});
\ No newline at end of file
+});
diff --git a/erpnext/templates/generators/item/item_specifications.html b/erpnext/templates/generators/item/item_specifications.html
index 469a45fd7d4..d4dfa8e591a 100644
--- a/erpnext/templates/generators/item/item_specifications.html
+++ b/erpnext/templates/generators/item/item_specifications.html
@@ -11,4 +11,4 @@
-{%- endif %}
\ No newline at end of file
+{%- endif %}
diff --git a/erpnext/templates/generators/item_group.html b/erpnext/templates/generators/item_group.html
index 9050cc388ae..b5f18ba66d1 100644
--- a/erpnext/templates/generators/item_group.html
+++ b/erpnext/templates/generators/item_group.html
@@ -159,4 +159,4 @@
});
});
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/erpnext/templates/generators/job_opening.html b/erpnext/templates/generators/job_opening.html
index c562db3c25a..135fb3643d3 100644
--- a/erpnext/templates/generators/job_opening.html
+++ b/erpnext/templates/generators/job_opening.html
@@ -14,17 +14,17 @@
{{ description }}
{% endif %}
-{%- if publish_salary_range -%}
+{%- if publish_salary_range -%}
{{_("Salary range per month")}}: {{ frappe.format_value(frappe.utils.flt(lower_range), currency=currency) }} - {{ frappe.format_value(frappe.utils.flt(upper_range), currency=currency) }}
`
- );
-
- frappe.call({
- method: "frappe.www.printview.get_html_and_style",
- args: {
- doc: frm.doc,
- print_format: "GST E-Invoice",
- no_letterhead: 1
- },
- callback: function (r) {
- if (!r.exc) {
- $preview_wrapper.find(".print-format").html(r.message.html);
- const style = `
- .print-format { box-shadow: 0px 0px 5px rgba(0,0,0,0.2); padding: 0.30in; min-height: 80vh; }
- .print-preview { min-height: 0px; }
- .modal-dialog { width: 720px; }`;
-
- frappe.dom.set_style(style, "custom-print-style");
- preview_dialog.show();
- }
- }
- });
-};
diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py
index 2d6b9133900..a6ab6aba774 100644
--- a/erpnext/regional/india/setup.py
+++ b/erpnext/regional/india/setup.py
@@ -61,7 +61,7 @@ def create_hsn_codes(data, code_field):
def add_custom_roles_for_reports():
for report_name in ('GST Sales Register', 'GST Purchase Register',
- 'GST Itemised Sales Register', 'GST Itemised Purchase Register', 'Eway Bill', 'E-Invoice Summary'):
+ 'GST Itemised Sales Register', 'GST Itemised Purchase Register', 'Eway Bill'):
if not frappe.db.get_value('Custom Role', dict(report=report_name)):
frappe.get_doc(dict(
@@ -100,7 +100,7 @@ def add_custom_roles_for_reports():
)).insert()
def add_permissions():
- for doctype in ('GST HSN Code', 'GST Settings', 'GSTR 3B Report', 'Lower Deduction Certificate', 'E Invoice Settings'):
+ for doctype in ('GST HSN Code', 'GST Settings', 'GSTR 3B Report', 'Lower Deduction Certificate'):
add_permission(doctype, 'All', 0)
for role in ('Accounts Manager', 'Accounts User', 'System Manager'):
add_permission(doctype, role, 0)
@@ -116,11 +116,9 @@ def add_permissions():
def add_print_formats():
frappe.reload_doc("regional", "print_format", "gst_tax_invoice")
frappe.reload_doc("accounts", "print_format", "gst_pos_invoice")
- frappe.reload_doc("accounts", "print_format", "GST E-Invoice")
frappe.db.set_value("Print Format", "GST POS Invoice", "disabled", 0)
frappe.db.set_value("Print Format", "GST Tax Invoice", "disabled", 0)
- frappe.db.set_value("Print Format", "GST E-Invoice", "disabled", 0)
def make_property_setters(patch=False):
# GST rules do not allow for an invoice no. bigger than 16 characters
@@ -445,53 +443,13 @@ def make_custom_fields(update=True):
'fieldname': 'ewaybill',
'label': 'E-Way Bill No.',
'fieldtype': 'Data',
- 'depends_on': 'eval:((doc.docstatus === 1 || doc.ewaybill) && doc.eway_bill_cancelled === 0)',
+ 'depends_on': 'eval:(doc.docstatus === 1)',
'allow_on_submit': 1,
'insert_after': 'tax_id',
'translatable': 0
}
]
- si_einvoice_fields = [
- dict(fieldname='irn', label='IRN', fieldtype='Data', read_only=1, 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'),
-
- dict(fieldname='irn_cancelled', label='IRN Cancelled', fieldtype='Check', no_copy=1, print_hide=1,
- depends_on='eval: doc.irn', allow_on_submit=1, insert_after='customer'),
-
- dict(fieldname='eway_bill_validity', label='E-Way Bill Validity', fieldtype='Data', no_copy=1, print_hide=1,
- depends_on='ewaybill', read_only=1, allow_on_submit=1, insert_after='ewaybill'),
-
- dict(fieldname='eway_bill_cancelled', label='E-Way Bill Cancelled', fieldtype='Check', no_copy=1, print_hide=1,
- depends_on='eval:(doc.eway_bill_cancelled === 1)', read_only=1, allow_on_submit=1, insert_after='customer'),
-
- dict(fieldname='einvoice_section', label='E-Invoice Fields', fieldtype='Section Break', insert_after='gst_vehicle_type',
- print_hide=1, hidden=1),
-
- dict(fieldname='ack_no', label='Ack. No.', fieldtype='Data', read_only=1, hidden=1, insert_after='einvoice_section',
- no_copy=1, print_hide=1),
-
- dict(fieldname='ack_date', label='Ack. Date', fieldtype='Data', read_only=1, hidden=1, insert_after='ack_no', no_copy=1, print_hide=1),
-
- dict(fieldname='irn_cancel_date', label='Cancel Date', fieldtype='Data', read_only=1, hidden=1, insert_after='ack_date',
- no_copy=1, print_hide=1),
-
- dict(fieldname='signed_einvoice', label='Signed E-Invoice', fieldtype='Code', options='JSON', hidden=1, insert_after='irn_cancel_date',
- no_copy=1, print_hide=1, read_only=1),
-
- dict(fieldname='signed_qr_code', label='Signed QRCode', fieldtype='Code', options='JSON', hidden=1, insert_after='signed_einvoice',
- no_copy=1, print_hide=1, read_only=1),
-
- dict(fieldname='qrcode_image', label='QRCode', fieldtype='Attach Image', hidden=1, insert_after='signed_qr_code',
- no_copy=1, print_hide=1, read_only=1),
-
- dict(fieldname='einvoice_status', label='E-Invoice Status', fieldtype='Select', insert_after='qrcode_image',
- options='\nPending\nGenerated\nCancelled\nFailed', default=None, hidden=1, no_copy=1, print_hide=1, read_only=1),
-
- dict(fieldname='failure_description', label='E-Invoice Failure Description', fieldtype='Code', options='JSON',
- hidden=1, insert_after='einvoice_status', no_copy=1, print_hide=1, read_only=1)
- ]
-
custom_fields = {
'Address': [
dict(fieldname='gstin', label='Party GSTIN', fieldtype='Data',
@@ -504,7 +462,7 @@ def make_custom_fields(update=True):
'Purchase Invoice': purchase_invoice_gst_category + invoice_gst_fields + purchase_invoice_itc_fields + purchase_invoice_gst_fields,
'Purchase Order': purchase_invoice_gst_fields,
'Purchase Receipt': purchase_invoice_gst_fields,
- 'Sales Invoice': sales_invoice_gst_category + invoice_gst_fields + sales_invoice_shipping_fields + sales_invoice_gst_fields + si_ewaybill_fields + si_einvoice_fields,
+ 'Sales Invoice': sales_invoice_gst_category + invoice_gst_fields + sales_invoice_shipping_fields + sales_invoice_gst_fields + si_ewaybill_fields,
'Delivery Note': sales_invoice_gst_fields + ewaybill_fields + sales_invoice_shipping_fields + delivery_note_gst_category,
'Journal Entry': journal_entry_fields,
'Sales Order': sales_invoice_gst_fields,
diff --git a/erpnext/regional/report/e_invoice_summary/__init__.py b/erpnext/regional/report/e_invoice_summary/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/erpnext/regional/report/e_invoice_summary/e_invoice_summary.js b/erpnext/regional/report/e_invoice_summary/e_invoice_summary.js
deleted file mode 100644
index 4713217d83c..00000000000
--- a/erpnext/regional/report/e_invoice_summary/e_invoice_summary.js
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
-// For license information, please see license.txt
-/* eslint-disable */
-
-frappe.query_reports["E-Invoice Summary"] = {
- "filters": [
- {
- "fieldtype": "Link",
- "options": "Company",
- "reqd": 1,
- "fieldname": "company",
- "label": __("Company"),
- "default": frappe.defaults.get_user_default("Company"),
- },
- {
- "fieldtype": "Link",
- "options": "Customer",
- "fieldname": "customer",
- "label": __("Customer")
- },
- {
- "fieldtype": "Date",
- "reqd": 1,
- "fieldname": "from_date",
- "label": __("From Date"),
- "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
- },
- {
- "fieldtype": "Date",
- "reqd": 1,
- "fieldname": "to_date",
- "label": __("To Date"),
- "default": frappe.datetime.get_today(),
- },
- {
- "fieldtype": "Select",
- "fieldname": "status",
- "label": __("Status"),
- "options": "\nPending\nGenerated\nCancelled\nFailed"
- }
- ],
-
- "formatter": function (value, row, column, data, default_formatter) {
- value = default_formatter(value, row, column, data);
-
- if (column.fieldname == "einvoice_status" && value) {
- if (value == 'Pending') value = `${value}`;
- else if (value == 'Generated') value = `${value}`;
- else if (value == 'Cancelled') value = `${value}`;
- else if (value == 'Failed') value = `${value}`;
- }
-
- return value;
- }
-};
diff --git a/erpnext/regional/report/e_invoice_summary/e_invoice_summary.json b/erpnext/regional/report/e_invoice_summary/e_invoice_summary.json
deleted file mode 100644
index d0000ad50df..00000000000
--- a/erpnext/regional/report/e_invoice_summary/e_invoice_summary.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "add_total_row": 0,
- "columns": [],
- "creation": "2021-03-12 11:23:37.312294",
- "disable_prepared_report": 0,
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Report",
- "filters": [],
- "idx": 0,
- "is_standard": "Yes",
- "json": "{}",
- "letter_head": "Logo",
- "modified": "2021-03-13 12:36:48.689413",
- "modified_by": "Administrator",
- "module": "Regional",
- "name": "E-Invoice Summary",
- "owner": "Administrator",
- "prepared_report": 0,
- "ref_doctype": "Sales Invoice",
- "report_name": "E-Invoice Summary",
- "report_type": "Script Report",
- "roles": [
- {
- "role": "Administrator"
- }
- ]
-}
\ No newline at end of file
diff --git a/erpnext/regional/report/e_invoice_summary/e_invoice_summary.py b/erpnext/regional/report/e_invoice_summary/e_invoice_summary.py
deleted file mode 100644
index 66ffceae539..00000000000
--- a/erpnext/regional/report/e_invoice_summary/e_invoice_summary.py
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe import _
-
-def execute(filters=None):
- validate_filters(filters)
-
- columns = get_columns()
- data = get_data(filters)
-
- return columns, data
-
-def validate_filters(filters={}):
- filters = frappe._dict(filters)
-
- if not filters.company:
- frappe.throw(_('{} is mandatory for generating E-Invoice Summary Report').format(_('Company')), title=_('Invalid Filter'))
- if filters.company:
- # validate if company has e-invoicing enabled
- pass
- if not filters.from_date or not filters.to_date:
- frappe.throw(_('From Date & To Date is mandatory for generating E-Invoice Summary Report'), title=_('Invalid Filter'))
- if filters.from_date > filters.to_date:
- frappe.throw(_('From Date must be before To Date'), title=_('Invalid Filter'))
-
-def get_data(filters={}):
- query_filters = {
- 'posting_date': ['between', [filters.from_date, filters.to_date]],
- 'einvoice_status': ['is', 'set'],
- 'company': filters.company
- }
- if filters.customer:
- query_filters['customer'] = filters.customer
- if filters.status:
- query_filters['einvoice_status'] = filters.status
-
- data = frappe.get_all(
- 'Sales Invoice',
- filters=query_filters,
- fields=[d.get('fieldname') for d in get_columns()]
- )
-
- return data
-
-def get_columns():
- return [
- {
- "fieldtype": "Date",
- "fieldname": "posting_date",
- "label": _("Posting Date"),
- "width": 0
- },
- {
- "fieldtype": "Link",
- "fieldname": "name",
- "label": _("Sales Invoice"),
- "options": "Sales Invoice",
- "width": 140
- },
- {
- "fieldtype": "Data",
- "fieldname": "einvoice_status",
- "label": _("Status"),
- "width": 100
- },
- {
- "fieldtype": "Link",
- "fieldname": "customer",
- "options": "Customer",
- "label": _("Customer")
- },
- {
- "fieldtype": "Check",
- "fieldname": "is_return",
- "label": _("Is Return"),
- "width": 85
- },
- {
- "fieldtype": "Data",
- "fieldname": "ack_no",
- "label": "Ack. No.",
- "width": 145
- },
- {
- "fieldtype": "Data",
- "fieldname": "ack_date",
- "label": "Ack. Date",
- "width": 165
- },
- {
- "fieldtype": "Data",
- "fieldname": "irn",
- "label": _("IRN No."),
- "width": 250
- },
- {
- "fieldtype": "Currency",
- "options": "Company:company:default_currency",
- "fieldname": "base_grand_total",
- "label": _("Grand Total"),
- "width": 120
- }
- ]
From 6ef16ee4fb3d07526dcb81e6277bc9f5d5e9911e Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Fri, 20 Aug 2021 12:24:13 +0530
Subject: [PATCH 35/87] fix: update scrap table item details; typo
---
erpnext/manufacturing/doctype/bom/bom.py | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 0ba85078ead..eb1dfc8cae8 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -148,6 +148,7 @@ class BOM(WebsiteGenerator):
self.set_plc_conversion_rate()
self.validate_uom_is_interger()
self.set_bom_material_details()
+ self.set_bom_scrap_items_detail()
self.validate_materials()
self.set_routing_operations()
self.validate_operations()
@@ -200,7 +201,7 @@ class BOM(WebsiteGenerator):
def set_bom_material_details(self):
for item in self.get("items"):
- self.validate_bom_currecny(item)
+ self.validate_bom_currency(item)
ret = self.get_bom_material_detail({
"company": self.company,
@@ -219,6 +220,19 @@ class BOM(WebsiteGenerator):
if not item.get(r):
item.set(r, ret[r])
+ def set_bom_scrap_items_detail(self):
+ for item in self.get("scrap_items"):
+ args = {
+ "item_code": item.item_code,
+ "company": self.company,
+ "scrap_items": True,
+ "bom_no": '',
+ }
+ ret = self.get_bom_material_detail(args)
+ for key, value in ret.items():
+ if not item.get(key):
+ item.set(key, value)
+
@frappe.whitelist()
def get_bom_material_detail(self, args=None):
""" Get raw material details like uom, desc and rate"""
@@ -255,7 +269,7 @@ class BOM(WebsiteGenerator):
return ret_item
- def validate_bom_currecny(self, item):
+ def validate_bom_currency(self, item):
if item.get('bom_no') and frappe.db.get_value('BOM', item.get('bom_no'), 'currency') != self.currency:
frappe.throw(_("Row {0}: Currency of the BOM #{1} should be equal to the selected currency {2}")
.format(item.idx, item.bom_no, self.currency))
From 2b2572b9b997eaeaae86e23f8b74803db85daf5a Mon Sep 17 00:00:00 2001
From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Date: Fri, 20 Aug 2021 14:40:12 +0530
Subject: [PATCH 36/87] fix: Cascade deletion for Company (#26923)
* fix: Cascade deletion for Company
---
erpnext/hooks.py | 3 +++
erpnext/regional/india/utils.py | 17 +++++++++++++++++
erpnext/setup/doctype/company/company.py | 4 ++++
3 files changed, 24 insertions(+)
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 73831bf9af0..74977cd8bca 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -308,6 +308,9 @@ doc_events = {
},
('Quotation', 'Sales Order', 'Sales Invoice'): {
'validate': ["erpnext.erpnext_integrations.taxjar_integration.set_sales_tax"]
+ },
+ "Company": {
+ "on_trash": "erpnext.regional.india.utils.delete_gst_settings_for_company"
}
}
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py
index 949733e0ad8..4e4dcf85859 100644
--- a/erpnext/regional/india/utils.py
+++ b/erpnext/regional/india/utils.py
@@ -871,3 +871,20 @@ def set_item_tax_from_hsn_code(item):
'tax_category': tax.tax_category,
'valid_from': tax.valid_from
})
+
+def delete_gst_settings_for_company(doc, method):
+ if doc.country != 'India':
+ return
+
+ gst_settings = frappe.get_doc("GST Settings")
+ records_to_delete = []
+
+ for d in reversed(gst_settings.get('gst_accounts')):
+ if d.company == doc.name:
+ records_to_delete.append(d)
+
+ for d in records_to_delete:
+ gst_settings.remove(d)
+
+ gst_settings.save()
+
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index 54c67538aef..45d5ce0c1c7 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -393,6 +393,10 @@ class Company(NestedSet):
frappe.db.sql("delete from `tabPurchase Taxes and Charges Template` where company=%s", self.name)
frappe.db.sql("delete from `tabItem Tax Template` where company=%s", self.name)
+ # delete Process Deferred Accounts if no GL Entry found
+ if not frappe.db.get_value('GL Entry', {'company': self.name}):
+ frappe.db.sql("delete from `tabProcess Deferred Accounting` where company=%s", self.name)
+
@frappe.whitelist()
def enqueue_replace_abbr(company, old, new):
kwargs = dict(queue="long", company=company, old=old, new=new)
From 77ebbdd172c355f8598dcdc92cd1340cb8ad1f29 Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Fri, 20 Aug 2021 16:21:33 +0530
Subject: [PATCH 37/87] fix: minor changes
- remove Is Group from warehouse
- change stock entry type
- link to stock entry type
- add posting date to stock reco
- change report to Stock Projected Qty
- highlight quality inspection action
- remove allow neg highlight
---
.../stock/doctype/stock_entry/stock_entry.js | 12 ++++------
.../stock_reconciliation.js | 5 ++++
.../doctype/stock_settings/stock_settings.js | 12 +++++-----
erpnext/stock/doctype/warehouse/warehouse.js | 8 ++-----
.../stock/module_onboarding/stock/stock.json | 4 ++--
.../create_a_warehouse.json | 2 +-
.../stock_settings/stock_settings.json | 2 +-
.../view_stock_ledger/view_stock_ledger.json | 24 -------------------
.../view_stock_projected_qty.json} | 14 +++++------
9 files changed, 29 insertions(+), 54 deletions(-)
delete mode 100644 erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json
rename erpnext/stock/onboarding_step/{view_stock_balance/view_stock_balance.json => view_stock_projected_qty/view_stock_projected_qty.json} (69%)
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index ecd3fee8286..5ea733c66d3 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1106,18 +1106,16 @@ frappe.tour['Stock Entry'] = [
{
fieldname: "stock_entry_type",
title: __("Stock Entry Type"),
- description: __("Select the type of Stock Entry to be made.") + " " +
- __("For now, to move stock between warehouses select Material Transfer.")
+ description: __("Select the type of Stock Entry to be made. For now, to receive stock into a warehouses select") + ' ' + __("Material Receipt.") + ""
},
{
- fieldname: "from_warehouse",
- title: __("Default Source Warehouse"),
- description: __("Select a source warehouse, where you have stock available.")
+ fieldname: "to_warehouse",
+ title: __("Default Target Warehouse"),
+ description: __("Select a target warehouse where the stock will be received.")
},
{
fieldname: "items",
title: __("Items"),
- description: __("Select an item and entry quantity to be delivered.") + " " +
- __("Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.")
+ description: __("Select an item and entry quantity to be delivered.")
},
]
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 49c85401ace..f91d0a740d8 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -309,6 +309,11 @@ frappe.tour['Stock Reconciliation'] = [
title: __("Purpose"),
description: __("Set Purpose to Opening Stock to set the stock opening balance.")
},
+ {
+ fieldname: "posting_date",
+ title: __("Posting Date"),
+ description: __("Edit the Posting Date by clicking on the Edit Posting Date and Time checkbox below.")
+ },
{
fieldname: "items",
title: __("Items"),
diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.js b/erpnext/stock/doctype/stock_settings/stock_settings.js
index 6a919309f54..08606fdcaa6 100644
--- a/erpnext/stock/doctype/stock_settings/stock_settings.js
+++ b/erpnext/stock/doctype/stock_settings/stock_settings.js
@@ -36,17 +36,17 @@ frappe.tour['Stock Settings'] = [
"here" + " " +
__("to know more about them.")
},
- {
- fieldname: "allow_negative_stock",
- title: __("Allow Negative Stock"),
- description: __("This will allow stock items to be displayed in negative values. Using this option depends on your use case. With this option unchecked, the system warns before obstructing a transaction that is causing negative stock.")
-
- },
{
fieldname: "show_barcode_field",
title: __("Show Barcode Field"),
description: __("Show 'Scan Barcode' field above every child table to insert Items with ease.")
},
+ {
+ fieldname: "action_if_quality_inspection_is_not_submitted",
+ title: __("Action if Quality Inspection Is Not Submitted"),
+ description: __("Quality inspection is performed on the inward and outward movement of goods. Receipt and delivery transactions will be stopped or the user will be warned if the quality inspection is not performed.")
+
+ },
{
fieldname: "automatically_set_serial_nos_based_on_fifo",
title: __("Automatically Set Serial Nos based on FIFO"),
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index 30575a7c933..8b925bebf9e 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -91,21 +91,17 @@ frappe.tour['Warehouse'] = [
{
fieldname: "warehouse_name",
title: __("Warehouse Name"),
- description: __("Select a name for the warehouse. This should reflect its location or purpose.")
+ description: __("Select name for the warehouse. This should reflect its location or purpose.")
},
{
fieldname: "warehouse_type",
title: __("Warehouse Type"),
description: __("Select a warehouse type to categorize the warehouse into a sub-group.")
},
- {
- fieldname: "is_group",
- title: __("Is Group"),
- description: __("Check this field to group warehouses under this warehouse.")
- },
{
fieldname: "account",
title: __("Account"),
description: __("Select an account to set a default account for all transactions with this warehouse.")
},
];
+
diff --git a/erpnext/stock/module_onboarding/stock/stock.json b/erpnext/stock/module_onboarding/stock/stock.json
index 4503f534c7c..c246747a5b3 100644
--- a/erpnext/stock/module_onboarding/stock/stock.json
+++ b/erpnext/stock/module_onboarding/stock/stock.json
@@ -19,7 +19,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/stock",
"idx": 0,
"is_complete": 0,
- "modified": "2021-06-18 14:41:24.286683",
+ "modified": "2021-08-20 14:38:55.570067",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock",
@@ -38,7 +38,7 @@
"step": "Stock Opening Balance"
},
{
- "step": "View Stock Balance"
+ "step": "View Stock Projected Qty"
}
],
"subtitle": "Inventory, Warehouses, Analysis, and more.",
diff --git a/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json b/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json
index 0ef6c3615c4..22c88bf10ea 100644
--- a/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json
+++ b/erpnext/stock/onboarding_step/create_a_warehouse/create_a_warehouse.json
@@ -9,7 +9,7 @@
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-06-18 13:52:51.126984",
+ "modified": "2021-08-18 12:23:36.675572",
"modified_by": "Administrator",
"name": "Create a Warehouse",
"owner": "Administrator",
diff --git a/erpnext/stock/onboarding_step/stock_settings/stock_settings.json b/erpnext/stock/onboarding_step/stock_settings/stock_settings.json
index f7238da3348..2cf90e806cd 100644
--- a/erpnext/stock/onboarding_step/stock_settings/stock_settings.json
+++ b/erpnext/stock/onboarding_step/stock_settings/stock_settings.json
@@ -9,7 +9,7 @@
"is_complete": 0,
"is_single": 1,
"is_skipped": 0,
- "modified": "2021-06-18 14:13:12.678178",
+ "modified": "2021-08-18 12:06:51.139387",
"modified_by": "Administrator",
"name": "Stock Settings",
"owner": "Administrator",
diff --git a/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json b/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json
deleted file mode 100644
index 7a5f164e016..00000000000
--- a/erpnext/stock/onboarding_step/view_stock_ledger/view_stock_ledger.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "action": "View Report",
- "action_label": "Check Stock Ledger",
- "creation": "2021-05-17 16:16:10.727959",
- "description": "# Check Stock Reports\nBased on the various stock transactions, you can get a host of one-click Stock Reports in ERPNext like Stock Ledger, Stock Balance, Projected Quantity, and Ageing analysis.",
- "docstatus": 0,
- "doctype": "Onboarding Step",
- "idx": 0,
- "is_complete": 0,
- "is_single": 0,
- "is_skipped": 0,
- "modified": "2021-06-18 14:09:39.399311",
- "modified_by": "Administrator",
- "name": "View Stock Ledger",
- "owner": "Administrator",
- "reference_report": "Stock Ledger",
- "report_description": "You can set the filters to see entries specific to the previous steps.",
- "report_reference_doctype": "Stock Ledger Entry",
- "report_type": "Script Report",
- "show_form_tour": 0,
- "show_full_form": 0,
- "title": "Check Stock Reports",
- "validate_action": 1
-}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/view_stock_balance/view_stock_balance.json b/erpnext/stock/onboarding_step/view_stock_projected_qty/view_stock_projected_qty.json
similarity index 69%
rename from erpnext/stock/onboarding_step/view_stock_balance/view_stock_balance.json
rename to erpnext/stock/onboarding_step/view_stock_projected_qty/view_stock_projected_qty.json
index ed5fe369459..e684780751f 100644
--- a/erpnext/stock/onboarding_step/view_stock_balance/view_stock_balance.json
+++ b/erpnext/stock/onboarding_step/view_stock_projected_qty/view_stock_projected_qty.json
@@ -1,7 +1,7 @@
{
"action": "View Report",
- "action_label": "Check Stock Balance",
- "creation": "2021-05-17 16:15:54.617572",
+ "action_label": "Check Stock Projected Qty",
+ "creation": "2021-08-20 14:38:41.649103",
"description": "# Check Stock Reports\nBased on the various stock transactions, you can get a host of one-click Stock Reports in ERPNext like Stock Ledger, Stock Balance, Projected Quantity, and Ageing analysis.",
"docstatus": 0,
"doctype": "Onboarding Step",
@@ -9,16 +9,16 @@
"is_complete": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2021-06-18 14:41:18.499215",
+ "modified": "2021-08-20 14:38:41.649103",
"modified_by": "Administrator",
- "name": "View Stock Balance",
+ "name": "View Stock Projected Qty",
"owner": "Administrator",
- "reference_report": "Stock Balance",
+ "reference_report": "Stock Projected Qty",
"report_description": "You can set the filters to narrow the results, then click on Generate New Report to see the updated report.",
- "report_reference_doctype": "Stock Ledger Entry",
+ "report_reference_doctype": "Item",
"report_type": "Script Report",
"show_form_tour": 0,
"show_full_form": 0,
- "title": "Check Stock Reports",
+ "title": "Check Stock Projected Qty",
"validate_action": 1
}
\ No newline at end of file
From f4487c3ae540c7afa790a0a906e63ca95e736fde Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Fri, 20 Aug 2021 16:25:20 +0530
Subject: [PATCH 38/87] refactor: use Form Tour doc instead of controller form
tour
note - keeping controller form tours as a fallback, new form tours
seem to work only for Stock Settings
---
.../create_a_stock_entry.json | 56 ++++++++++++
.../create_a_warehouse.json | 54 +++++++++++
.../create_warehouse/create_warehouse.json | 54 +++++++++++
.../stock_opening_balance.json | 55 ++++++++++++
.../stock_settings/stock_settings.json | 89 +++++++++++++++++++
5 files changed, 308 insertions(+)
create mode 100644 erpnext/stock/form_tour/create_a_stock_entry/create_a_stock_entry.json
create mode 100644 erpnext/stock/form_tour/create_a_warehouse/create_a_warehouse.json
create mode 100644 erpnext/stock/form_tour/create_warehouse/create_warehouse.json
create mode 100644 erpnext/stock/form_tour/stock_opening_balance/stock_opening_balance.json
create mode 100644 erpnext/stock/form_tour/stock_settings/stock_settings.json
diff --git a/erpnext/stock/form_tour/create_a_stock_entry/create_a_stock_entry.json b/erpnext/stock/form_tour/create_a_stock_entry/create_a_stock_entry.json
new file mode 100644
index 00000000000..fbc4b558bc1
--- /dev/null
+++ b/erpnext/stock/form_tour/create_a_stock_entry/create_a_stock_entry.json
@@ -0,0 +1,56 @@
+{
+ "creation": "2021-08-20 16:02:59.314742",
+ "docstatus": 0,
+ "doctype": "Form Tour",
+ "idx": 0,
+ "is_standard": 1,
+ "modified": "2021-08-20 16:05:40.593997",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Create a Stock Entry",
+ "owner": "Administrator",
+ "reference_doctype": "Stock Entry",
+ "save_on_complete": 1,
+ "steps": [
+ {
+ "description": "Select the type of Stock Entry to be made. For now, to receive stock into a warehouses select Material Receipt.",
+ "field": "",
+ "fieldname": "stock_entry_type",
+ "fieldtype": "Link",
+ "has_next_condition": 1,
+ "is_table_field": 0,
+ "label": "Stock Entry Type",
+ "next_step_condition": "eval: doc.stock_entry_type === \"Material Receipt\"",
+ "parent_field": "",
+ "position": "Top",
+ "title": "Stock Entry Type"
+ },
+ {
+ "description": "Select a target warehouse where the stock will be received.",
+ "field": "",
+ "fieldname": "to_warehouse",
+ "fieldtype": "Link",
+ "has_next_condition": 1,
+ "is_table_field": 0,
+ "label": "Default Target Warehouse",
+ "next_step_condition": "eval: doc.to_warehouse",
+ "parent_field": "",
+ "position": "Top",
+ "title": "Default Target Warehouse"
+ },
+ {
+ "description": "Select an item and entry quantity to be delivered.",
+ "field": "",
+ "fieldname": "items",
+ "fieldtype": "Table",
+ "has_next_condition": 1,
+ "is_table_field": 0,
+ "label": "Items",
+ "next_step_condition": "eval: doc.items[0]?.item_code",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Items"
+ }
+ ],
+ "title": "Create a Stock Entry"
+}
\ No newline at end of file
diff --git a/erpnext/stock/form_tour/create_a_warehouse/create_a_warehouse.json b/erpnext/stock/form_tour/create_a_warehouse/create_a_warehouse.json
new file mode 100644
index 00000000000..e9a598b4b1a
--- /dev/null
+++ b/erpnext/stock/form_tour/create_a_warehouse/create_a_warehouse.json
@@ -0,0 +1,54 @@
+{
+ "creation": "2021-08-20 15:56:10.157109",
+ "docstatus": 0,
+ "doctype": "Form Tour",
+ "idx": 0,
+ "is_standard": 1,
+ "modified": "2021-08-20 15:56:10.157109",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Create a Warehouse",
+ "owner": "Administrator",
+ "reference_doctype": "Warehouse",
+ "save_on_complete": 1,
+ "steps": [
+ {
+ "description": "Select a name for the warehouse. This should reflect its location or purpose.",
+ "field": "",
+ "fieldname": "warehouse_name",
+ "fieldtype": "Data",
+ "has_next_condition": 1,
+ "is_table_field": 0,
+ "label": "Warehouse Name",
+ "next_step_condition": "eval: doc.warehouse_name",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Warehouse Name"
+ },
+ {
+ "description": "Select a warehouse type to categorize the warehouse into a sub-group.",
+ "field": "",
+ "fieldname": "warehouse_type",
+ "fieldtype": "Link",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Warehouse Type",
+ "parent_field": "",
+ "position": "Top",
+ "title": "Warehouse Type"
+ },
+ {
+ "description": "Select an account to set a default account for all transactions with this warehouse.",
+ "field": "",
+ "fieldname": "account",
+ "fieldtype": "Link",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Account",
+ "parent_field": "",
+ "position": "Top",
+ "title": "Account"
+ }
+ ],
+ "title": "Create a Warehouse"
+}
\ No newline at end of file
diff --git a/erpnext/stock/form_tour/create_warehouse/create_warehouse.json b/erpnext/stock/form_tour/create_warehouse/create_warehouse.json
new file mode 100644
index 00000000000..f25e3a1cf3a
--- /dev/null
+++ b/erpnext/stock/form_tour/create_warehouse/create_warehouse.json
@@ -0,0 +1,54 @@
+{
+ "creation": "2021-08-20 15:42:47.059290",
+ "docstatus": 0,
+ "doctype": "Form Tour",
+ "idx": 0,
+ "is_standard": 1,
+ "modified": "2021-08-20 15:54:58.440497",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Create Warehouse",
+ "owner": "Administrator",
+ "reference_doctype": "Warehouse",
+ "save_on_complete": 1,
+ "steps": [
+ {
+ "description": "Select a name for the warehouse. This should reflect its location or purpose.",
+ "field": "",
+ "fieldname": "warehouse_name",
+ "fieldtype": "Data",
+ "has_next_condition": 1,
+ "is_table_field": 0,
+ "label": "Warehouse Name",
+ "next_step_condition": "eval: doc.warehouse_name",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Warehouse Name"
+ },
+ {
+ "description": "Select a warehouse type to categorize the warehouse into a sub-group.",
+ "field": "",
+ "fieldname": "warehouse_type",
+ "fieldtype": "Link",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Warehouse Type",
+ "parent_field": "",
+ "position": "Top",
+ "title": "Warehouse Type"
+ },
+ {
+ "description": "Select an account to set a default account for all transactions with this warehouse.",
+ "field": "",
+ "fieldname": "account",
+ "fieldtype": "Link",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Account",
+ "parent_field": "",
+ "position": "Top",
+ "title": "Account"
+ }
+ ],
+ "title": "Create Warehouse"
+}
\ No newline at end of file
diff --git a/erpnext/stock/form_tour/stock_opening_balance/stock_opening_balance.json b/erpnext/stock/form_tour/stock_opening_balance/stock_opening_balance.json
new file mode 100644
index 00000000000..94bdbbc442c
--- /dev/null
+++ b/erpnext/stock/form_tour/stock_opening_balance/stock_opening_balance.json
@@ -0,0 +1,55 @@
+{
+ "creation": "2021-08-20 16:08:39.298267",
+ "docstatus": 0,
+ "doctype": "Form Tour",
+ "idx": 0,
+ "is_standard": 1,
+ "modified": "2021-08-20 16:08:39.298267",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Stock Opening Balance",
+ "owner": "Administrator",
+ "reference_doctype": "Stock Reconciliation",
+ "save_on_complete": 1,
+ "steps": [
+ {
+ "description": "Set Purpose to Opening Stock to set the stock opening balance.",
+ "field": "",
+ "fieldname": "purpose",
+ "fieldtype": "Select",
+ "has_next_condition": 1,
+ "is_table_field": 0,
+ "label": "Purpose",
+ "next_step_condition": "eval: doc.purpose === \"Opening Stock\"",
+ "parent_field": "",
+ "position": "Top",
+ "title": "Purpose"
+ },
+ {
+ "description": "Edit the Posting Date by clicking on the Edit Posting Date and Time checkbox below.",
+ "field": "",
+ "fieldname": "posting_date",
+ "fieldtype": "Date",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Posting Date",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Posting Date"
+ },
+ {
+ "description": "Select the items for which the opening stock has to be set.",
+ "field": "",
+ "fieldname": "items",
+ "fieldtype": "Table",
+ "has_next_condition": 1,
+ "is_table_field": 0,
+ "label": "Items",
+ "next_step_condition": "eval: doc.items[0]?.item_code",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Items"
+ }
+ ],
+ "title": "Stock Opening Balance"
+}
\ No newline at end of file
diff --git a/erpnext/stock/form_tour/stock_settings/stock_settings.json b/erpnext/stock/form_tour/stock_settings/stock_settings.json
new file mode 100644
index 00000000000..282b87c21fc
--- /dev/null
+++ b/erpnext/stock/form_tour/stock_settings/stock_settings.json
@@ -0,0 +1,89 @@
+{
+ "creation": "2021-08-20 15:20:59.336585",
+ "docstatus": 0,
+ "doctype": "Form Tour",
+ "idx": 0,
+ "is_standard": 1,
+ "modified": "2021-08-20 15:37:36.151783",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Stock Settings",
+ "owner": "Administrator",
+ "reference_doctype": "Stock Settings",
+ "save_on_complete": 1,
+ "steps": [
+ {
+ "description": "By default, the Item Name is set as per the Item Code entered. If you want Items to be named by a Naming Series choose the 'Naming Series' option.",
+ "field": "",
+ "fieldname": "item_naming_by",
+ "fieldtype": "Select",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Item Naming By",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Item Naming By"
+ },
+ {
+ "description": "Set a Default Warehouse for Inventory Transactions. This will be fetched into the Default Warehouse in the Item master.",
+ "field": "",
+ "fieldname": "default_warehouse",
+ "fieldtype": "Link",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Default Warehouse",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Default Warehouse"
+ },
+ {
+ "description": "Choose between FIFO and Moving Average Valuation Methods. Click here to know more about them.",
+ "field": "",
+ "fieldname": "valuation_method",
+ "fieldtype": "Select",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Default Valuation Method",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Default Valuation Method"
+ },
+ {
+ "description": "Show 'Scan Barcode' field above every child table to insert Items with ease.",
+ "field": "",
+ "fieldname": "show_barcode_field",
+ "fieldtype": "Check",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Show Barcode Field in Stock Transactions",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Show Barcode Field"
+ },
+ {
+ "description": "Quality inspection is performed on the inward and outward movement of goods. Receipt and delivery transactions will be stopped or the user will be warned if the quality inspection is not performed.",
+ "field": "",
+ "fieldname": "action_if_quality_inspection_is_not_submitted",
+ "fieldtype": "Select",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Action If Quality Inspection Is Not Submitted",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Action if Quality Inspection Is Not Submitted"
+ },
+ {
+ "description": "Serial numbers for stock will be set automatically based on the Items entered based on first in first out in transactions like Purchase/Sales Invoices, Delivery Notes, etc.",
+ "field": "",
+ "fieldname": "automatically_set_serial_nos_based_on_fifo",
+ "fieldtype": "Check",
+ "has_next_condition": 0,
+ "is_table_field": 0,
+ "label": "Automatically Set Serial Nos Based on FIFO",
+ "parent_field": "",
+ "position": "Bottom",
+ "title": "Automatically Set Serial Nos based on FIFO"
+ }
+ ],
+ "title": "Stock Settings"
+}
\ No newline at end of file
From 62c590261c5c7cc96d1cad29bc44615229a0f83a Mon Sep 17 00:00:00 2001
From: Alan <2.alan.tom@gmail.com>
Date: Fri, 20 Aug 2021 18:21:09 +0530
Subject: [PATCH 39/87] refactor: rectify typo (#27057)
[skip ci]
---
erpnext/manufacturing/doctype/work_order/work_order.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py
index 69a4b95c9ac..5fe9fec2af1 100644
--- a/erpnext/manufacturing/doctype/work_order/work_order.py
+++ b/erpnext/manufacturing/doctype/work_order/work_order.py
@@ -602,7 +602,7 @@ class WorkOrder(Document):
if self.docstatus==1:
# calculate transferred qty based on submitted stock entries
- self.update_transaferred_qty_for_required_items()
+ self.update_transferred_qty_for_required_items()
# update in bin
self.update_reserved_qty_for_production()
@@ -671,7 +671,7 @@ class WorkOrder(Document):
self.set_available_qty()
- def update_transaferred_qty_for_required_items(self):
+ def update_transferred_qty_for_required_items(self):
'''update transferred qty from submitted stock entries for that item against
the work order'''
From ec258551bf48c93ce7190397ec34adee6eee66e6 Mon Sep 17 00:00:00 2001
From: Saqib
Date: Fri, 20 Aug 2021 19:09:31 +0530
Subject: [PATCH 40/87] fix: flaky test for SLA (#27051)
---
.../test_service_level_agreement.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py
index a81516ec116..d9c671e9a21 100644
--- a/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py
+++ b/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py
@@ -267,11 +267,15 @@ class TestServiceLevelAgreement(unittest.TestCase):
)
creation = datetime.datetime(2019, 3, 4, 12, 0)
lead = make_lead(creation=creation, index=4)
- self.assertFalse(lead.service_level_agreement)
+ applied_sla = frappe.db.get_value('Lead', lead.name, 'service_level_agreement')
+ self.assertFalse(applied_sla)
+ source = frappe.get_doc(doctype='Lead Source', source_name='Test Source')
+ source.insert(ignore_if_duplicate=True)
lead.source = "Test Source"
lead.save()
- self.assertEqual(lead.service_level_agreement, lead_sla.name)
+ applied_sla = frappe.db.get_value('Lead', lead.name, 'service_level_agreement')
+ self.assertEqual(applied_sla, lead_sla.name)
def tearDown(self):
for d in frappe.get_all("Service Level Agreement"):
From 57e326e7d0ad1a1053ac2d987aacd540353ef47d Mon Sep 17 00:00:00 2001
From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Date: Sat, 21 Aug 2021 17:59:11 +0530
Subject: [PATCH 41/87] fix: Consolidated balance sheet showing incorrect
values (#26975)
---
.../consolidated_financial_statement.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py
index 56a67bb0989..fc4212733a3 100644
--- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py
+++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py
@@ -210,10 +210,10 @@ def get_data(companies, root_type, balance_must_be, fiscal_year, filters=None, i
company_currency = get_company_currency(filters)
if filters.filter_based_on == 'Fiscal Year':
- start_date = fiscal_year.year_start_date
+ start_date = fiscal_year.year_start_date if filters.report != 'Balance Sheet' else None
end_date = fiscal_year.year_end_date
else:
- start_date = filters.period_start_date
+ start_date = filters.period_start_date if filters.report != 'Balance Sheet' else None
end_date = filters.period_end_date
gl_entries_by_account = {}
From 496bff5136c7a72c3346361af7b7e41e787cff1b Mon Sep 17 00:00:00 2001
From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Date: Sun, 22 Aug 2021 18:10:51 +0530
Subject: [PATCH 42/87] feat: Column for total amount due in Accounts
Receivable/Payable Summary (#27069)
---
.../report/accounts_receivable/accounts_receivable.py | 2 ++
.../accounts_receivable_summary.py | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index b54646fd27a..cedfc0f58b8 100755
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -535,6 +535,8 @@ class ReceivablePayableReport(object):
if getdate(entry_date) > getdate(self.filters.report_date):
row.range1 = row.range2 = row.range3 = row.range4 = row.range5 = 0.0
+ row.total_due = row.range1 + row.range2 + row.range3 + row.range4 + row.range5
+
def get_ageing_data(self, entry_date, row):
# [0-30, 30-60, 60-90, 90-120, 120-above]
row.range1 = row.range2 = row.range3 = row.range4 = row.range5 = 0.0
diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
index e94b30921f3..4bfb022c4ee 100644
--- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
+++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
@@ -82,6 +82,7 @@ class AccountsReceivableSummary(ReceivablePayableReport):
"range3": 0.0,
"range4": 0.0,
"range5": 0.0,
+ "total_due": 0.0,
"sales_person": []
}))
@@ -135,3 +136,6 @@ class AccountsReceivableSummary(ReceivablePayableReport):
"{range3}-{range4}".format(range3=cint(self.filters["range3"])+ 1, range4=self.filters["range4"]),
"{range4}-{above}".format(range4=cint(self.filters["range4"])+ 1, above=_("Above"))]):
self.add_column(label=label, fieldname='range' + str(i+1))
+
+ # Add column for total due amount
+ self.add_column(label="Total Amount Due", fieldname='total_due')
From 7d627df4dbe15b3db16da031945ab98ccaae71ea Mon Sep 17 00:00:00 2001
From: Subin Tom <36098155+nemesis189@users.noreply.github.com>
Date: Mon, 23 Aug 2021 11:05:07 +0530
Subject: [PATCH 43/87] fix: pos return payment mode issue (#26872)
---
erpnext/controllers/taxes_and_totals.py | 9 ++++-----
erpnext/public/js/controllers/taxes_and_totals.js | 2 --
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index 05edb2530c2..7c6d3552f12 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -595,7 +595,8 @@ class calculate_taxes_and_totals(object):
self.doc.precision("outstanding_amount"))
if self.doc.doctype == 'Sales Invoice' and self.doc.get('is_pos') and self.doc.get('is_return'):
- self.update_paid_amount_for_return(total_amount_to_pay)
+ self.set_total_amount_to_default_mop(total_amount_to_pay)
+ self.calculate_paid_amount()
def calculate_paid_amount(self):
@@ -675,7 +676,7 @@ class calculate_taxes_and_totals(object):
def set_item_wise_tax_breakup(self):
self.doc.other_charges_calculation = get_itemised_tax_breakup_html(self.doc)
- def update_paid_amount_for_return(self, total_amount_to_pay):
+ def set_total_amount_to_default_mop(self, total_amount_to_pay):
default_mode_of_payment = frappe.db.get_value('POS Payment Method',
{'parent': self.doc.pos_profile, 'default': 1}, ['mode_of_payment'], as_dict=1)
@@ -685,9 +686,7 @@ class calculate_taxes_and_totals(object):
'mode_of_payment': default_mode_of_payment.mode_of_payment,
'amount': total_amount_to_pay,
'default': 1
- })
-
- self.calculate_paid_amount()
+ })
def get_itemised_tax_breakup_html(doc):
if not doc.taxes:
diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js
index e8f31225ba6..702064fe556 100644
--- a/erpnext/public/js/controllers/taxes_and_totals.js
+++ b/erpnext/public/js/controllers/taxes_and_totals.js
@@ -754,8 +754,6 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
}
});
this.frm.refresh_fields();
-
- this.calculate_paid_amount();
}
set_default_payment(total_amount_to_pay, update_paid_amount) {
From 8b2fe9e793e226339bbcec554d8c57a09f87b5c5 Mon Sep 17 00:00:00 2001
From: Subin Tom <36098155+nemesis189@users.noreply.github.com>
Date: Mon, 23 Aug 2021 11:17:31 +0530
Subject: [PATCH 44/87] fix: eway bill version changed to 1.0.0421 (#27044)
---
erpnext/regional/india/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py
index 4e4dcf85859..ce5aa10902e 100644
--- a/erpnext/regional/india/utils.py
+++ b/erpnext/regional/india/utils.py
@@ -475,7 +475,7 @@ def get_ewb_data(dt, dn):
ewaybills.append(data)
data = {
- 'version': '1.0.1118',
+ 'version': '1.0.0421',
'billLists': ewaybills
}
From 098d349bf4181100111e2b01025ce7d939b96392 Mon Sep 17 00:00:00 2001
From: Rohit Waghchaure
Date: Mon, 23 Aug 2021 13:36:13 +0530
Subject: [PATCH 45/87] fix: stock ledger report not working if include uom
selected in filter
---
erpnext/stock/report/stock_ledger/stock_ledger.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py
index 8909f217f49..b6923e97c4f 100644
--- a/erpnext/stock/report/stock_ledger/stock_ledger.py
+++ b/erpnext/stock/report/stock_ledger/stock_ledger.py
@@ -23,6 +23,7 @@ def execute(filters=None):
conversion_factors = []
if opening_row:
data.append(opening_row)
+ conversion_factors.append(0)
actual_qty = stock_value = 0
From e1f070437ae5869ac43896730cccb4b4c904e7de Mon Sep 17 00:00:00 2001
From: Rohit Waghchaure
Date: Mon, 23 Aug 2021 14:27:55 +0530
Subject: [PATCH 46/87] fix: selected batch no changed on updation of qty
---
erpnext/selling/sales_common.js | 4 ++++
erpnext/stock/get_item_details.py | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index 22bf3fc94fd..2de57c87f18 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -394,6 +394,10 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran
}
_set_batch_number(doc) {
+ if (doc.batch_no) {
+ return
+ }
+
let args = {'item_code': doc.item_code, 'warehouse': doc.warehouse, 'qty': flt(doc.qty) * flt(doc.conversion_factor)};
if (doc.has_serial_no && doc.serial_no) {
args['serial_no'] = doc.serial_no
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index a0fbcecc5de..c72073c6143 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -278,6 +278,10 @@ def get_basic_details(args, item, overwrite_warehouse=True):
else:
args.uom = item.stock_uom
+ if (args.get("batch_no") and
+ item.name != frappe.get_cached_value('Batch', args.get("batch_no"), 'item')):
+ args['batch_no'] = ''
+
out = frappe._dict({
"item_code": item.name,
"item_name": item.item_name,
From 47b63a627d7d8b6d32cc5ff5713af9eb973001d3 Mon Sep 17 00:00:00 2001
From: Subin Tom <36098155+nemesis189@users.noreply.github.com>
Date: Mon, 23 Aug 2021 15:38:26 +0530
Subject: [PATCH 47/87] fix: Eway bill test update to check ver 1.0.0421
(#27083)
---
erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index 984a6522489..01a6b027322 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -2014,7 +2014,7 @@ class TestSalesInvoice(unittest.TestCase):
data = get_ewb_data("Sales Invoice", [si.name])
- self.assertEqual(data['version'], '1.0.1118')
+ self.assertEqual(data['version'], '1.0.0421')
self.assertEqual(data['billLists'][0]['fromGstin'], '27AAECE4835E1ZR')
self.assertEqual(data['billLists'][0]['fromTrdName'], '_Test Company')
self.assertEqual(data['billLists'][0]['toTrdName'], '_Test Customer')
From bd709f8ab07529b3cb8fec35655040e619f11c9e Mon Sep 17 00:00:00 2001
From: Deepesh Garg
Date: Mon, 23 Aug 2021 19:05:52 +0530
Subject: [PATCH 48/87] fix: Ignore due date validations if payment terms are
copied from orders/receipts
---
erpnext/controllers/accounts_controller.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 8addbeb98f8..e710a65891b 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -159,7 +159,8 @@ class AccountsController(TransactionBase):
self.set_due_date()
self.set_payment_schedule()
self.validate_payment_schedule_amount()
- self.validate_due_date()
+ if not self.get('ignore_default_payment_terms_template'):
+ self.validate_due_date()
self.validate_advance_entries()
def validate_non_invoice_documents_schedule(self):
From 49e0a4f28714b468ba5edad296b30f22991210f3 Mon Sep 17 00:00:00 2001
From: Rushabh Mehta
Date: Tue, 24 Aug 2021 08:33:57 +0530
Subject: [PATCH 49/87] Revert "fix: Salary component account filter (#26604)"
This reverts commit ae9d1d9617015b6e2714a9fcd027a2957053d99a.
---
.../doctype/salary_component/salary_component.js | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/erpnext/payroll/doctype/salary_component/salary_component.js b/erpnext/payroll/doctype/salary_component/salary_component.js
index e9e6f81862c..dbf75140ac1 100644
--- a/erpnext/payroll/doctype/salary_component/salary_component.js
+++ b/erpnext/payroll/doctype/salary_component/salary_component.js
@@ -4,18 +4,11 @@
frappe.ui.form.on('Salary Component', {
setup: function(frm) {
frm.set_query("account", "accounts", function(doc, cdt, cdn) {
- let d = frappe.get_doc(cdt, cdn);
-
- let root_type = "Liability";
- if (frm.doc.type == "Deduction") {
- root_type = "Expense";
- }
-
+ var d = locals[cdt][cdn];
return {
filters: {
"is_group": 0,
- "company": d.company,
- "root_type": root_type
+ "company": d.company
}
};
});
From 332ac105b5ffec04009539eba94b153a8b93c0c4 Mon Sep 17 00:00:00 2001
From: Pruthvi Patel
Date: Tue, 24 Aug 2021 12:07:38 +0530
Subject: [PATCH 50/87] refactor: use `read_only_depends_on` instead of code
(#27008)
---
erpnext/accounts/doctype/pos_invoice/pos_invoice.js | 6 +-----
erpnext/accounts/doctype/pos_invoice/pos_invoice.json | 5 +++--
erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 8 +-------
erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 5 +++--
4 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js
index 181e9f8ec09..e3175464813 100644
--- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js
+++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js
@@ -111,16 +111,12 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex
}
write_off_outstanding_amount_automatically() {
- if(cint(this.frm.doc.write_off_outstanding_amount_automatically)) {
+ if (cint(this.frm.doc.write_off_outstanding_amount_automatically)) {
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
// this will make outstanding amount 0
this.frm.set_value("write_off_amount",
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount - this.frm.doc.total_advance, precision("write_off_amount"))
);
- this.frm.toggle_enable("write_off_amount", false);
-
- } else {
- this.frm.toggle_enable("write_off_amount", true);
}
this.calculate_outstanding_amount(false);
diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json
index fcccb39b70c..3e22b9e00a8 100644
--- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json
+++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json
@@ -1183,7 +1183,8 @@
"label": "Write Off Amount",
"no_copy": 1,
"options": "currency",
- "print_hide": 1
+ "print_hide": 1,
+ "read_only_depends_on": "eval: doc.write_off_outstanding_amount_automatically"
},
{
"fieldname": "base_write_off_amount",
@@ -1554,7 +1555,7 @@
"icon": "fa fa-file-text",
"is_submittable": 1,
"links": [],
- "modified": "2021-08-17 20:13:44.255437",
+ "modified": "2021-08-18 16:13:52.080543",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Invoice",
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 8d65101b3ba..2071827d994 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -324,16 +324,12 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
}
write_off_outstanding_amount_automatically() {
- if(cint(this.frm.doc.write_off_outstanding_amount_automatically)) {
+ if (cint(this.frm.doc.write_off_outstanding_amount_automatically)) {
frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]);
// this will make outstanding amount 0
this.frm.set_value("write_off_amount",
flt(this.frm.doc.grand_total - this.frm.doc.paid_amount - this.frm.doc.total_advance, precision("write_off_amount"))
);
- this.frm.toggle_enable("write_off_amount", false);
-
- } else {
- this.frm.toggle_enable("write_off_amount", true);
}
this.calculate_outstanding_amount(false);
@@ -787,8 +783,6 @@ frappe.ui.form.on('Sales Invoice', {
if (frappe.boot.sysdefaults.country == 'India') unhide_field(['c_form_applicable', 'c_form_no']);
else hide_field(['c_form_applicable', 'c_form_no']);
- frm.toggle_enable("write_off_amount", !!!cint(doc.write_off_outstanding_amount_automatically));
-
frm.refresh_fields();
},
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index e317443b91a..5023c9c61a3 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -1444,7 +1444,8 @@
"label": "Write Off Amount",
"no_copy": 1,
"options": "currency",
- "print_hide": 1
+ "print_hide": 1,
+ "read_only_depends_on": "eval:doc.write_off_outstanding_amount_automatically"
},
{
"fieldname": "base_write_off_amount",
@@ -2014,7 +2015,7 @@
"link_fieldname": "consolidated_invoice"
}
],
- "modified": "2021-08-17 20:16:12.737743",
+ "modified": "2021-08-18 16:07:45.122570",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
From 0dff0beabaa937e397eae2f930bae337cfe8af82 Mon Sep 17 00:00:00 2001
From: Ankush Menat
Date: Tue, 24 Aug 2021 12:16:46 +0530
Subject: [PATCH 51/87] fix: stock analytics report date range issues and add
company filter (#27014)
* test: tests for correct get_period_date_ranges
* fix: stock analytics report date range issues
- Upon selecting second half of month with Monthly filter, data from
that period was missing.
- Solution: "round down" the date as per expected frequency.
* chore: drop py2 and fix misleading docstring
* test: fix test to avoid FY clash
* feat: add company filter in stock analytics report
[skip ci]
Co-authored-by: Marica
---
.../report/stock_analytics/stock_analytics.js | 16 +++++++-
.../report/stock_analytics/stock_analytics.py | 37 ++++++++++++++++---
.../stock_analytics/test_stock_analytics.py | 35 ++++++++++++++++++
3 files changed, 82 insertions(+), 6 deletions(-)
create mode 100644 erpnext/stock/report/stock_analytics/test_stock_analytics.py
diff --git a/erpnext/stock/report/stock_analytics/stock_analytics.js b/erpnext/stock/report/stock_analytics/stock_analytics.js
index 6b384e28611..78afe6d2642 100644
--- a/erpnext/stock/report/stock_analytics/stock_analytics.js
+++ b/erpnext/stock/report/stock_analytics/stock_analytics.js
@@ -36,12 +36,26 @@ frappe.query_reports["Stock Analytics"] = {
options:"Brand",
default: "",
},
+ {
+ fieldname: "company",
+ label: __("Company"),
+ fieldtype: "Link",
+ options: "Company",
+ default: frappe.defaults.get_user_default("Company"),
+ reqd: 1,
+ },
{
fieldname: "warehouse",
label: __("Warehouse"),
fieldtype: "Link",
- options:"Warehouse",
+ options: "Warehouse",
default: "",
+ get_query: function() {
+ const company = frappe.query_report.get_filter_value('company');
+ return {
+ filters: { 'company': company }
+ }
+ }
},
{
fieldname: "from_date",
diff --git a/erpnext/stock/report/stock_analytics/stock_analytics.py b/erpnext/stock/report/stock_analytics/stock_analytics.py
index d62abed91f3..a1e1e7fce7c 100644
--- a/erpnext/stock/report/stock_analytics/stock_analytics.py
+++ b/erpnext/stock/report/stock_analytics/stock_analytics.py
@@ -1,14 +1,15 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
+import datetime
-from __future__ import unicode_literals
import frappe
from frappe import _, scrub
-from frappe.utils import getdate, flt
+from frappe.utils import getdate, get_quarter_start, get_first_day_of_week
+from frappe.utils import get_first_day as get_first_day_of_month
+
from erpnext.stock.report.stock_balance.stock_balance import (get_items, get_stock_ledger_entries, get_item_details)
from erpnext.accounts.utils import get_fiscal_year
from erpnext.stock.utils import is_reposting_item_valuation_in_progress
-from six import iteritems
def execute(filters=None):
is_reposting_item_valuation_in_progress()
@@ -71,7 +72,8 @@ def get_columns(filters):
def get_period_date_ranges(filters):
from dateutil.relativedelta import relativedelta
- from_date, to_date = getdate(filters.from_date), getdate(filters.to_date)
+ from_date = round_down_to_nearest_frequency(filters.from_date, filters.range)
+ to_date = getdate(filters.to_date)
increment = {
"Monthly": 1,
@@ -97,6 +99,31 @@ def get_period_date_ranges(filters):
return periodic_daterange
+
+def round_down_to_nearest_frequency(date: str, frequency: str) -> datetime.datetime:
+ """Rounds down the date to nearest frequency unit.
+ example:
+
+ >>> round_down_to_nearest_frequency("2021-02-21", "Monthly")
+ datetime.datetime(2021, 2, 1)
+
+ >>> round_down_to_nearest_frequency("2021-08-21", "Yearly")
+ datetime.datetime(2021, 1, 1)
+ """
+
+ def _get_first_day_of_fiscal_year(date):
+ fiscal_year = get_fiscal_year(date)
+ return fiscal_year and fiscal_year[1] or date
+
+ round_down_function = {
+ "Monthly": get_first_day_of_month,
+ "Quarterly": get_quarter_start,
+ "Weekly": get_first_day_of_week,
+ "Yearly": _get_first_day_of_fiscal_year,
+ }.get(frequency, getdate)
+ return round_down_function(date)
+
+
def get_period(posting_date, filters):
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
@@ -177,7 +204,7 @@ def get_data(filters):
periodic_data = get_periodic_data(sle, filters)
ranges = get_period_date_ranges(filters)
- for dummy, item_data in iteritems(item_details):
+ for dummy, item_data in item_details.items():
row = {
"name": item_data.name,
"item_name": item_data.item_name,
diff --git a/erpnext/stock/report/stock_analytics/test_stock_analytics.py b/erpnext/stock/report/stock_analytics/test_stock_analytics.py
new file mode 100644
index 00000000000..00e268b4e0e
--- /dev/null
+++ b/erpnext/stock/report/stock_analytics/test_stock_analytics.py
@@ -0,0 +1,35 @@
+import datetime
+import unittest
+
+from frappe import _dict
+from erpnext.accounts.utils import get_fiscal_year
+
+from erpnext.stock.report.stock_analytics.stock_analytics import get_period_date_ranges
+
+
+class TestStockAnalyticsReport(unittest.TestCase):
+ def test_get_period_date_ranges(self):
+
+ filters = _dict(range="Monthly", from_date="2020-12-28", to_date="2021-02-06")
+
+ ranges = get_period_date_ranges(filters)
+
+ expected_ranges = [
+ [datetime.date(2020, 12, 1), datetime.date(2020, 12, 31)],
+ [datetime.date(2021, 1, 1), datetime.date(2021, 1, 31)],
+ [datetime.date(2021, 2, 1), datetime.date(2021, 2, 6)],
+ ]
+
+ self.assertEqual(ranges, expected_ranges)
+
+ def test_get_period_date_ranges_yearly(self):
+
+ filters = _dict(range="Yearly", from_date="2021-01-28", to_date="2021-02-06")
+
+ ranges = get_period_date_ranges(filters)
+ first_date = get_fiscal_year("2021-01-28")[1]
+ expected_ranges = [
+ [first_date, datetime.date(2021, 2, 6)],
+ ]
+
+ self.assertEqual(ranges, expected_ranges)
From 6de7b8ea93e3ffe621976ebf3b613406a379216d Mon Sep 17 00:00:00 2001
From: Ankush Menat
Date: Tue, 24 Aug 2021 12:18:40 +0530
Subject: [PATCH 52/87] fix: discard empty rows from update items (#27021)
---
erpnext/controllers/accounts_controller.py | 5 +++++
erpnext/public/js/utils.js | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 8addbeb98f8..01d354df81f 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -1836,6 +1836,11 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
for d in data:
new_child_flag = False
+
+ if not d.get("item_code"):
+ # ignore empty rows
+ continue
+
if not d.get("docname"):
new_child_flag = True
check_doc_permissions(parent, 'create')
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index f1b9235fe3a..f240b8ca91f 100755
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -563,7 +563,7 @@ erpnext.utils.update_child_items = function(opts) {
},
],
primary_action: function() {
- const trans_items = this.get_values()["trans_items"];
+ const trans_items = this.get_values()["trans_items"].filter((item) => !!item.item_code);
frappe.call({
method: 'erpnext.controllers.accounts_controller.update_child_qty_rate',
freeze: true,
From c09d8a28098ca2963122373ae18f0c8c1954fcf3 Mon Sep 17 00:00:00 2001
From: Ankush Menat
Date: Tue, 24 Aug 2021 12:20:34 +0530
Subject: [PATCH 53/87] fix(ux): keep stock entry title & purpose in sync
(#27043)
Co-authored-by: rohitwaghchaure
---
erpnext/stock/doctype/stock_entry/stock_entry.json | 4 +---
erpnext/stock/doctype/stock_entry/stock_entry.py | 9 +++++++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json
index e6ce3c851ff..2f377788961 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.json
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.json
@@ -84,8 +84,6 @@
"oldfieldtype": "Section Break"
},
{
- "allow_on_submit": 1,
- "default": "{purpose}",
"fieldname": "title",
"fieldtype": "Data",
"hidden": 1,
@@ -630,7 +628,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
- "modified": "2021-08-17 20:16:12.737743",
+ "modified": "2021-08-20 19:19:31.514846",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry",
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 90a33d3617e..0b4592c12f9 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -58,6 +58,7 @@ class StockEntry(StockController):
self.validate_posting_time()
self.validate_purpose()
+ self.set_title()
self.validate_item()
self.validate_customer_provided_item()
self.validate_qty()
@@ -1608,6 +1609,14 @@ class StockEntry(StockController):
return sorted(list(set(get_serial_nos(self.pro_doc.serial_no)) - set(used_serial_nos)))
+ def set_title(self):
+ if frappe.flags.in_import and self.title:
+ # Allow updating title during data import/update
+ return
+
+ self.title = self.purpose
+
+
@frappe.whitelist()
def move_sample_to_retention_warehouse(company, items):
if isinstance(items, string_types):
From 1e05c9467bc5fa9315a67c7f8ed9ff5b17baa3e6 Mon Sep 17 00:00:00 2001
From: Suraj Shetty
Date: Tue, 24 Aug 2021 14:21:14 +0530
Subject: [PATCH 54/87] fix: Use remove_all from file_manager
---
erpnext/regional/italy/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py
index ba1aeafc3e9..024f8205686 100644
--- a/erpnext/regional/italy/utils.py
+++ b/erpnext/regional/italy/utils.py
@@ -6,7 +6,7 @@ import frappe
from frappe.utils import flt, cstr
from erpnext.controllers.taxes_and_totals import get_itemised_tax
from frappe import _
-from frappe.core.doctype.file.file import remove_file
+from frappe.utils.file_manager import remove_file
from six import string_types
from frappe.desk.form.load import get_attachments
from erpnext.regional.italy import state_codes
From ad735522cb777431c9e85a900a24d38b6633a377 Mon Sep 17 00:00:00 2001
From: 18alantom <2.alan.tom@gmail.com>
Date: Tue, 24 Aug 2021 14:54:38 +0530
Subject: [PATCH 55/87] fix: rename form tours to doctype names, remove tours
from js controllers
---
.../stock/doctype/stock_entry/stock_entry.js | 17 ------
.../stock_reconciliation.js | 17 ------
.../doctype/stock_settings/stock_settings.js | 37 -------------
erpnext/stock/doctype/warehouse/warehouse.js | 18 -------
.../create_a_warehouse.json | 54 -------------------
.../stock_entry.json} | 8 +--
.../stock_reconciliation.json} | 8 +--
.../warehouse.json} | 8 +--
8 files changed, 12 insertions(+), 155 deletions(-)
delete mode 100644 erpnext/stock/form_tour/create_a_warehouse/create_a_warehouse.json
rename erpnext/stock/form_tour/{create_a_stock_entry/create_a_stock_entry.json => stock_entry/stock_entry.json} (91%)
rename erpnext/stock/form_tour/{stock_opening_balance/stock_opening_balance.json => stock_reconciliation/stock_reconciliation.json} (89%)
rename erpnext/stock/form_tour/{create_warehouse/create_warehouse.json => warehouse/warehouse.json} (89%)
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 5ea733c66d3..8f34794db9a 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1102,20 +1102,3 @@ function check_should_not_attach_bom_items(bom_no) {
$.extend(cur_frm.cscript, new erpnext.stock.StockEntry({frm: cur_frm}));
-frappe.tour['Stock Entry'] = [
- {
- fieldname: "stock_entry_type",
- title: __("Stock Entry Type"),
- description: __("Select the type of Stock Entry to be made. For now, to receive stock into a warehouses select") + ' ' + __("Material Receipt.") + ""
- },
- {
- fieldname: "to_warehouse",
- title: __("Default Target Warehouse"),
- description: __("Select a target warehouse where the stock will be received.")
- },
- {
- fieldname: "items",
- title: __("Items"),
- description: __("Select an item and entry quantity to be delivered.")
- },
-]
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index f91d0a740d8..aa502a432df 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -303,20 +303,3 @@ erpnext.stock.StockReconciliation = class StockReconciliation extends erpnext.st
cur_frm.cscript = new erpnext.stock.StockReconciliation({frm: cur_frm});
-frappe.tour['Stock Reconciliation'] = [
- {
- fieldname: "purpose",
- title: __("Purpose"),
- description: __("Set Purpose to Opening Stock to set the stock opening balance.")
- },
- {
- fieldname: "posting_date",
- title: __("Posting Date"),
- description: __("Edit the Posting Date by clicking on the Edit Posting Date and Time checkbox below.")
- },
- {
- fieldname: "items",
- title: __("Items"),
- description: __("Select the items for which the opening stock has to be set.")
- },
-];
diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.js b/erpnext/stock/doctype/stock_settings/stock_settings.js
index 08606fdcaa6..6167becdaac 100644
--- a/erpnext/stock/doctype/stock_settings/stock_settings.js
+++ b/erpnext/stock/doctype/stock_settings/stock_settings.js
@@ -16,40 +16,3 @@ frappe.ui.form.on('Stock Settings', {
}
});
-frappe.tour['Stock Settings'] = [
- {
- fieldname: "item_naming_by",
- title: __("Item Naming By"),
- description: __("By default, the Item Name is set as per the Item Code entered. If you want Items to be named by a") + " " +
- "Naming Series" + " " +
- __("choose the 'Naming Series' option."),
- },
- {
- fieldname: "default_warehouse",
- title: __("Default Warehouse"),
- description: __("Set a Default Warehouse for Inventory Transactions. This will be fetched into the Default Warehouse in the Item master.")
- },
- {
- fieldname: "valuation_method",
- title: __("Valuation Method"),
- description: __("Choose between FIFO and Moving Average Valuation Methods. Click") + " " +
- "here" + " " +
- __("to know more about them.")
- },
- {
- fieldname: "show_barcode_field",
- title: __("Show Barcode Field"),
- description: __("Show 'Scan Barcode' field above every child table to insert Items with ease.")
- },
- {
- fieldname: "action_if_quality_inspection_is_not_submitted",
- title: __("Action if Quality Inspection Is Not Submitted"),
- description: __("Quality inspection is performed on the inward and outward movement of goods. Receipt and delivery transactions will be stopped or the user will be warned if the quality inspection is not performed.")
-
- },
- {
- fieldname: "automatically_set_serial_nos_based_on_fifo",
- title: __("Automatically Set Serial Nos based on FIFO"),
- description: __("Serial numbers for stock will be set automatically based on the Items entered based on first in first out in transactions like Purchase/Sales Invoices, Delivery Notes, etc.")
- }
-];
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index b0c1c033a3b..4e1679c4116 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -87,21 +87,3 @@ function convert_to_group_or_ledger(frm){
})
}
-frappe.tour['Warehouse'] = [
- {
- fieldname: "warehouse_name",
- title: __("Warehouse Name"),
- description: __("Select name for the warehouse. This should reflect its location or purpose.")
- },
- {
- fieldname: "warehouse_type",
- title: __("Warehouse Type"),
- description: __("Select a warehouse type to categorize the warehouse into a sub-group.")
- },
- {
- fieldname: "account",
- title: __("Account"),
- description: __("Select an account to set a default account for all transactions with this warehouse.")
- },
-];
-
diff --git a/erpnext/stock/form_tour/create_a_warehouse/create_a_warehouse.json b/erpnext/stock/form_tour/create_a_warehouse/create_a_warehouse.json
deleted file mode 100644
index e9a598b4b1a..00000000000
--- a/erpnext/stock/form_tour/create_a_warehouse/create_a_warehouse.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "creation": "2021-08-20 15:56:10.157109",
- "docstatus": 0,
- "doctype": "Form Tour",
- "idx": 0,
- "is_standard": 1,
- "modified": "2021-08-20 15:56:10.157109",
- "modified_by": "Administrator",
- "module": "Stock",
- "name": "Create a Warehouse",
- "owner": "Administrator",
- "reference_doctype": "Warehouse",
- "save_on_complete": 1,
- "steps": [
- {
- "description": "Select a name for the warehouse. This should reflect its location or purpose.",
- "field": "",
- "fieldname": "warehouse_name",
- "fieldtype": "Data",
- "has_next_condition": 1,
- "is_table_field": 0,
- "label": "Warehouse Name",
- "next_step_condition": "eval: doc.warehouse_name",
- "parent_field": "",
- "position": "Bottom",
- "title": "Warehouse Name"
- },
- {
- "description": "Select a warehouse type to categorize the warehouse into a sub-group.",
- "field": "",
- "fieldname": "warehouse_type",
- "fieldtype": "Link",
- "has_next_condition": 0,
- "is_table_field": 0,
- "label": "Warehouse Type",
- "parent_field": "",
- "position": "Top",
- "title": "Warehouse Type"
- },
- {
- "description": "Select an account to set a default account for all transactions with this warehouse.",
- "field": "",
- "fieldname": "account",
- "fieldtype": "Link",
- "has_next_condition": 0,
- "is_table_field": 0,
- "label": "Account",
- "parent_field": "",
- "position": "Top",
- "title": "Account"
- }
- ],
- "title": "Create a Warehouse"
-}
\ No newline at end of file
diff --git a/erpnext/stock/form_tour/create_a_stock_entry/create_a_stock_entry.json b/erpnext/stock/form_tour/stock_entry/stock_entry.json
similarity index 91%
rename from erpnext/stock/form_tour/create_a_stock_entry/create_a_stock_entry.json
rename to erpnext/stock/form_tour/stock_entry/stock_entry.json
index fbc4b558bc1..98c5d62f10a 100644
--- a/erpnext/stock/form_tour/create_a_stock_entry/create_a_stock_entry.json
+++ b/erpnext/stock/form_tour/stock_entry/stock_entry.json
@@ -1,13 +1,13 @@
{
- "creation": "2021-08-20 16:02:59.314742",
+ "creation": "2021-08-24 14:44:22.292652",
"docstatus": 0,
"doctype": "Form Tour",
"idx": 0,
"is_standard": 1,
- "modified": "2021-08-20 16:05:40.593997",
+ "modified": "2021-08-24 14:50:48.017420",
"modified_by": "Administrator",
"module": "Stock",
- "name": "Create a Stock Entry",
+ "name": "Stock Entry",
"owner": "Administrator",
"reference_doctype": "Stock Entry",
"save_on_complete": 1,
@@ -52,5 +52,5 @@
"title": "Items"
}
],
- "title": "Create a Stock Entry"
+ "title": "Stock Entry"
}
\ No newline at end of file
diff --git a/erpnext/stock/form_tour/stock_opening_balance/stock_opening_balance.json b/erpnext/stock/form_tour/stock_reconciliation/stock_reconciliation.json
similarity index 89%
rename from erpnext/stock/form_tour/stock_opening_balance/stock_opening_balance.json
rename to erpnext/stock/form_tour/stock_reconciliation/stock_reconciliation.json
index 94bdbbc442c..83083b639a1 100644
--- a/erpnext/stock/form_tour/stock_opening_balance/stock_opening_balance.json
+++ b/erpnext/stock/form_tour/stock_reconciliation/stock_reconciliation.json
@@ -1,13 +1,13 @@
{
- "creation": "2021-08-20 16:08:39.298267",
+ "creation": "2021-08-24 14:44:46.770952",
"docstatus": 0,
"doctype": "Form Tour",
"idx": 0,
"is_standard": 1,
- "modified": "2021-08-20 16:08:39.298267",
+ "modified": "2021-08-24 14:50:41.512219",
"modified_by": "Administrator",
"module": "Stock",
- "name": "Stock Opening Balance",
+ "name": "Stock Reconciliation",
"owner": "Administrator",
"reference_doctype": "Stock Reconciliation",
"save_on_complete": 1,
@@ -51,5 +51,5 @@
"title": "Items"
}
],
- "title": "Stock Opening Balance"
+ "title": "Stock Reconciliation"
}
\ No newline at end of file
diff --git a/erpnext/stock/form_tour/create_warehouse/create_warehouse.json b/erpnext/stock/form_tour/warehouse/warehouse.json
similarity index 89%
rename from erpnext/stock/form_tour/create_warehouse/create_warehouse.json
rename to erpnext/stock/form_tour/warehouse/warehouse.json
index f25e3a1cf3a..23ff2aebbaa 100644
--- a/erpnext/stock/form_tour/create_warehouse/create_warehouse.json
+++ b/erpnext/stock/form_tour/warehouse/warehouse.json
@@ -1,13 +1,13 @@
{
- "creation": "2021-08-20 15:42:47.059290",
+ "creation": "2021-08-24 14:43:44.465237",
"docstatus": 0,
"doctype": "Form Tour",
"idx": 0,
"is_standard": 1,
- "modified": "2021-08-20 15:54:58.440497",
+ "modified": "2021-08-24 14:50:31.988256",
"modified_by": "Administrator",
"module": "Stock",
- "name": "Create Warehouse",
+ "name": "Warehouse",
"owner": "Administrator",
"reference_doctype": "Warehouse",
"save_on_complete": 1,
@@ -50,5 +50,5 @@
"title": "Account"
}
],
- "title": "Create Warehouse"
+ "title": "Warehouse"
}
\ No newline at end of file
From 6cf9254ee5d6599f3dfe1b696dbb51edc33b965c Mon Sep 17 00:00:00 2001
From: Saqib
Date: Tue, 24 Aug 2021 15:26:44 +0530
Subject: [PATCH 56/87] fix: invalid imports (#27101)
---
erpnext/regional/italy/utils.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py
index ba1aeafc3e9..56f609eb234 100644
--- a/erpnext/regional/italy/utils.py
+++ b/erpnext/regional/italy/utils.py
@@ -6,9 +6,8 @@ import frappe
from frappe.utils import flt, cstr
from erpnext.controllers.taxes_and_totals import get_itemised_tax
from frappe import _
-from frappe.core.doctype.file.file import remove_file
+from frappe.utils.file_manager import remove_file
from six import string_types
-from frappe.desk.form.load import get_attachments
from erpnext.regional.italy import state_codes
From 9e82c24b277d09b61dc94f345b173603bee97a02 Mon Sep 17 00:00:00 2001
From: Saqib
Date: Tue, 24 Aug 2021 15:37:00 +0530
Subject: [PATCH 57/87] fix: pos closing entry cancellation test (#27099)
* fix: pos closing entry cancellation test
* fix: invalid imports
* fix: sider issue
---
.../pos_closing_entry/test_pos_closing_entry.py | 10 ++++++++--
erpnext/accounts/doctype/pos_invoice/pos_invoice.js | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py
index b596c0cf25a..5b18ebb40dd 100644
--- a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py
+++ b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py
@@ -85,9 +85,15 @@ class TestPOSClosingEntry(unittest.TestCase):
pcv_doc.load_from_db()
pcv_doc.cancel()
- si_doc.load_from_db()
+
+ cancelled_invoice = frappe.db.get_value(
+ 'POS Invoice Merge Log', {'pos_closing_entry': pcv_doc.name},
+ 'consolidated_invoice'
+ )
+ docstatus = frappe.db.get_value("Sales Invoice", cancelled_invoice, 'docstatus')
+ self.assertEqual(docstatus, 2)
+
pos_inv1.load_from_db()
- self.assertEqual(si_doc.docstatus, 2)
self.assertEqual(pos_inv1.status, 'Paid')
diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js
index e3175464813..15c292211c0 100644
--- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js
+++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js
@@ -16,7 +16,7 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex
onload(doc) {
super.onload();
- this.frm.ignore_doctypes_on_cancel_all = ['POS Invoice Merge Log'];
+ this.frm.ignore_doctypes_on_cancel_all = ['POS Invoice Merge Log', 'POS Closing Entry'];
if(doc.__islocal && doc.is_pos && frappe.get_route_str() !== 'point-of-sale') {
this.frm.script_manager.trigger("is_pos");
this.frm.refresh_fields();
From d4d5a4221a00771864d3b27eeb9a4f9580614c04 Mon Sep 17 00:00:00 2001
From: Subin Tom <36098155+nemesis189@users.noreply.github.com>
Date: Tue, 24 Aug 2021 16:22:46 +0530
Subject: [PATCH 58/87] feat: coupon code discount in pos invoice (#27004)
---
.../doctype/pos_invoice/pos_invoice.json | 9 +++++++++
.../doctype/pos_invoice/pos_invoice.py | 11 +++++++++++
.../doctype/pricing_rule/pricing_rule.py | 9 ++++++++-
erpnext/public/js/controllers/transaction.js | 19 +++++++++++++------
erpnext/public/scss/point-of-sale.scss | 2 ++
5 files changed, 43 insertions(+), 7 deletions(-)
diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json
index 3e22b9e00a8..b8195374002 100644
--- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json
+++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json
@@ -99,6 +99,7 @@
"loyalty_redemption_account",
"loyalty_redemption_cost_center",
"section_break_49",
+ "coupon_code",
"apply_discount_on",
"base_discount_amount",
"column_break_51",
@@ -1550,6 +1551,14 @@
"no_copy": 1,
"options": "Sales Invoice",
"read_only": 1
+ },
+ {
+ "depends_on": "coupon_code",
+ "fieldname": "coupon_code",
+ "fieldtype": "Link",
+ "label": "Coupon Code",
+ "options": "Coupon Code",
+ "print_hide": 1
}
],
"icon": "fa fa-file-text",
diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py
index 8ec4ef224cd..759cad53d4a 100644
--- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py
+++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py
@@ -44,6 +44,9 @@ class POSInvoice(SalesInvoice):
self.validate_pos()
self.validate_payment_amount()
self.validate_loyalty_transaction()
+ if self.coupon_code:
+ from erpnext.accounts.doctype.pricing_rule.utils import validate_coupon_code
+ validate_coupon_code(self.coupon_code)
def on_submit(self):
# create the loyalty point ledger entry if the customer is enrolled in any loyalty program
@@ -58,6 +61,10 @@ class POSInvoice(SalesInvoice):
self.check_phone_payments()
self.set_status(update=True)
+ if self.coupon_code:
+ from erpnext.accounts.doctype.pricing_rule.utils import update_coupon_code_count
+ update_coupon_code_count(self.coupon_code,'used')
+
def before_cancel(self):
if self.consolidated_invoice and frappe.db.get_value('Sales Invoice', self.consolidated_invoice, 'docstatus') == 1:
pos_closing_entry = frappe.get_all(
@@ -84,6 +91,10 @@ class POSInvoice(SalesInvoice):
against_psi_doc.delete_loyalty_point_entry()
against_psi_doc.make_loyalty_point_entry()
+ if self.coupon_code:
+ from erpnext.accounts.doctype.pricing_rule.utils import update_coupon_code_count
+ update_coupon_code_count(self.coupon_code,'cancelled')
+
def check_phone_payments(self):
for pay in self.payments:
if pay.type == "Phone" and pay.amount >= 0:
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index 556f49d34c0..4903c50e17b 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -198,12 +198,19 @@ def apply_pricing_rule(args, doc=None):
set_serial_nos_based_on_fifo = frappe.db.get_single_value("Stock Settings",
"automatically_set_serial_nos_based_on_fifo")
+ item_code_list = tuple(item.get('item_code') for item in item_list)
+ query_items = frappe.get_all('Item', fields=['item_code','has_serial_no'], filters=[['item_code','in',item_code_list]],as_list=1)
+ serialized_items = dict()
+ for item_code, val in query_items:
+ serialized_items.setdefault(item_code, val)
+
for item in item_list:
args_copy = copy.deepcopy(args)
args_copy.update(item)
data = get_pricing_rule_for_item(args_copy, item.get('price_list_rate'), doc=doc)
out.append(data)
- if not item.get("serial_no") and set_serial_nos_based_on_fifo and not args.get('is_return'):
+
+ if serialized_items.get(item.get('item_code')) and not item.get("serial_no") and set_serial_nos_based_on_fifo and not args.get('is_return'):
out[0].update(get_serial_no_for_item(args_copy))
return out
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 9375e358a97..2538852bfa5 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -2242,12 +2242,19 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
coupon_code() {
var me = this;
- frappe.run_serially([
- () => this.frm.doc.ignore_pricing_rule=1,
- () => me.ignore_pricing_rule(),
- () => this.frm.doc.ignore_pricing_rule=0,
- () => me.apply_pricing_rule()
- ]);
+ if (this.frm.doc.coupon_code) {
+ frappe.run_serially([
+ () => this.frm.doc.ignore_pricing_rule=1,
+ () => me.ignore_pricing_rule(),
+ () => this.frm.doc.ignore_pricing_rule=0,
+ () => me.apply_pricing_rule()
+ ]);
+ } else {
+ frappe.run_serially([
+ () => this.frm.doc.ignore_pricing_rule=1,
+ () => me.ignore_pricing_rule()
+ ]);
+ }
}
};
diff --git a/erpnext/public/scss/point-of-sale.scss b/erpnext/public/scss/point-of-sale.scss
index c77b2ce3dfa..1677e9b3de4 100644
--- a/erpnext/public/scss/point-of-sale.scss
+++ b/erpnext/public/scss/point-of-sale.scss
@@ -860,6 +860,8 @@
.invoice-fields {
overflow-y: scroll;
+ height: 100%;
+ padding-right: var(--padding-sm);
}
}
From ce129a141447f701240265e50c1de88b1ef46e12 Mon Sep 17 00:00:00 2001
From: Saqib
Date: Tue, 24 Aug 2021 17:23:14 +0530
Subject: [PATCH 59/87] feat: re-arrange company doctype fields (#27091)
---
erpnext/regional/india/setup.py | 2 +
erpnext/setup/doctype/company/company.js | 78 +++++++-------
erpnext/setup/doctype/company/company.json | 113 ++++++++++-----------
3 files changed, 99 insertions(+), 94 deletions(-)
diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py
index a6ab6aba774..4db5551cb30 100644
--- a/erpnext/regional/india/setup.py
+++ b/erpnext/regional/india/setup.py
@@ -531,6 +531,7 @@ def make_custom_fields(update=True):
fieldtype='Link', options='Salary Component', insert_after='hra_section'),
dict(fieldname='hra_component', label='HRA Component',
fieldtype='Link', options='Salary Component', insert_after='basic_component'),
+ dict(fieldname='hra_column_break', fieldtype='Column Break', insert_after='hra_component'),
dict(fieldname='arrear_component', label='Arrear Component',
fieldtype='Link', options='Salary Component', insert_after='hra_component'),
dict(fieldname='non_profit_section', label='Non Profit Settings',
@@ -539,6 +540,7 @@ def make_custom_fields(update=True):
fieldtype='Data', insert_after='non_profit_section'),
dict(fieldname='with_effect_from', label='80G With Effect From',
fieldtype='Date', insert_after='company_80g_number'),
+ dict(fieldname='non_profit_column_break', fieldtype='Column Break', insert_after='with_effect_from'),
dict(fieldname='pan_details', label='PAN Number',
fieldtype='Data', insert_after='with_effect_from')
],
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index 8f83d3cd73a..56700af79e9 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -46,6 +46,43 @@ frappe.ui.form.on("Company", {
});
},
+ change_abbreviation(frm) {
+ var dialog = new frappe.ui.Dialog({
+ title: "Replace Abbr",
+ fields: [
+ {"fieldtype": "Data", "label": "New Abbreviation", "fieldname": "new_abbr",
+ "reqd": 1 },
+ {"fieldtype": "Button", "label": "Update", "fieldname": "update"},
+ ]
+ });
+
+ dialog.fields_dict.update.$input.click(function() {
+ var args = dialog.get_values();
+ if (!args) return;
+ frappe.show_alert(__("Update in progress. It might take a while."));
+ return frappe.call({
+ method: "erpnext.setup.doctype.company.company.enqueue_replace_abbr",
+ args: {
+ "company": frm.doc.name,
+ "old": frm.doc.abbr,
+ "new": args.new_abbr
+ },
+ callback: function(r) {
+ if (r.exc) {
+ frappe.msgprint(__("There were errors."));
+ return;
+ } else {
+ frm.set_value("abbr", args.new_abbr);
+ }
+ dialog.hide();
+ frm.refresh();
+ },
+ btn: this
+ });
+ });
+ dialog.show();
+ },
+
company_name: function(frm) {
if(frm.doc.__islocal) {
// add missing " " arg in split method
@@ -127,6 +164,10 @@ frappe.ui.form.on("Company", {
}, __('Manage'));
}
}
+
+ frm.add_custom_button(__('Change Abbreviation'), () => {
+ frm.trigger('change_abbreviation');
+ }, __('Manage'));
}
erpnext.company.set_chart_of_accounts_options(frm.doc);
@@ -204,43 +245,6 @@ erpnext.company.set_chart_of_accounts_options = function(doc) {
}
}
-cur_frm.cscript.change_abbr = function() {
- var dialog = new frappe.ui.Dialog({
- title: "Replace Abbr",
- fields: [
- {"fieldtype": "Data", "label": "New Abbreviation", "fieldname": "new_abbr",
- "reqd": 1 },
- {"fieldtype": "Button", "label": "Update", "fieldname": "update"},
- ]
- });
-
- dialog.fields_dict.update.$input.click(function() {
- var args = dialog.get_values();
- if(!args) return;
- frappe.show_alert(__("Update in progress. It might take a while."));
- return frappe.call({
- method: "erpnext.setup.doctype.company.company.enqueue_replace_abbr",
- args: {
- "company": cur_frm.doc.name,
- "old": cur_frm.doc.abbr,
- "new": args.new_abbr
- },
- callback: function(r) {
- if(r.exc) {
- frappe.msgprint(__("There were errors."));
- return;
- } else {
- cur_frm.set_value("abbr", args.new_abbr);
- }
- dialog.hide();
- cur_frm.refresh();
- },
- btn: this
- })
- });
- dialog.show();
-}
-
erpnext.company.setup_queries = function(frm) {
$.each([
["default_bank_account", {"account_type": "Bank"}],
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index e6ec496a65e..e4ee3ecea7c 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -12,33 +12,48 @@
"details",
"company_name",
"abbr",
- "change_abbr",
+ "default_currency",
+ "country",
"is_group",
"cb0",
- "domain",
- "parent_company",
- "charts_section",
- "default_currency",
"default_letter_head",
- "default_holiday_list",
- "default_finance_book",
- "default_selling_terms",
- "default_buying_terms",
- "default_warehouse_for_sales_return",
- "default_in_transit_warehouse",
- "column_break_10",
- "country",
- "create_chart_of_accounts_based_on",
- "chart_of_accounts",
- "existing_company",
"tax_id",
+ "domain",
"date_of_establishment",
+ "parent_company",
+ "company_info",
+ "company_logo",
+ "date_of_incorporation",
+ "phone_no",
+ "email",
+ "company_description",
+ "column_break1",
+ "date_of_commencement",
+ "fax",
+ "website",
+ "address_html",
+ "section_break_28",
+ "create_chart_of_accounts_based_on",
+ "existing_company",
+ "column_break_26",
+ "chart_of_accounts",
+ "charts_section",
"sales_settings",
- "monthly_sales_target",
+ "default_buying_terms",
"sales_monthly_history",
- "column_break_goals",
- "transactions_annual_history",
+ "monthly_sales_target",
"total_monthly_sales",
+ "column_break_goals",
+ "default_selling_terms",
+ "default_warehouse_for_sales_return",
+ "credit_limit",
+ "transactions_annual_history",
+ "hr_settings_section",
+ "default_holiday_list",
+ "default_expense_claim_payable_account",
+ "column_break_10",
+ "default_employee_advance_account",
+ "default_payroll_payable_account",
"default_settings",
"default_bank_account",
"default_cash_account",
@@ -52,24 +67,20 @@
"column_break0",
"allow_account_creation_against_child_company",
"default_payable_account",
- "default_employee_advance_account",
"default_expense_account",
"default_income_account",
"default_deferred_revenue_account",
"default_deferred_expense_account",
- "default_payroll_payable_account",
- "default_expense_claim_payable_account",
"default_discount_account",
- "section_break_22",
- "cost_center",
- "column_break_26",
- "credit_limit",
"payment_terms",
+ "cost_center",
+ "default_finance_book",
"auto_accounting_for_stock_settings",
"enable_perpetual_inventory",
"enable_perpetual_inventory_for_non_stock_items",
"default_inventory_account",
"stock_adjustment_account",
+ "default_in_transit_warehouse",
"column_break_32",
"stock_received_but_not_billed",
"service_received_but_not_billed",
@@ -79,25 +90,14 @@
"depreciation_expense_account",
"series_for_depreciation_entry",
"expenses_included_in_asset_valuation",
+ "repair_and_maintenance_account",
"column_break_40",
"disposal_account",
"depreciation_cost_center",
"capital_work_in_progress_account",
- "repair_and_maintenance_account",
"asset_received_but_not_billed",
"budget_detail",
"exception_budget_approver_role",
- "company_info",
- "company_logo",
- "date_of_incorporation",
- "address_html",
- "date_of_commencement",
- "phone_no",
- "fax",
- "email",
- "website",
- "column_break1",
- "company_description",
"registration_info",
"registration_details",
"lft",
@@ -127,12 +127,6 @@
"oldfieldtype": "Data",
"reqd": 1
},
- {
- "depends_on": "eval:!doc.__islocal && in_list(frappe.user_roles, \"System Manager\")",
- "fieldname": "change_abbr",
- "fieldtype": "Button",
- "label": "Change Abbreviation"
- },
{
"bold": 1,
"default": "0",
@@ -176,10 +170,9 @@
"label": "Company Description"
},
{
- "collapsible": 1,
"fieldname": "sales_settings",
"fieldtype": "Section Break",
- "label": "Sales Settings"
+ "label": "Buying & Selling Settings"
},
{
"fieldname": "sales_monthly_history",
@@ -442,10 +435,6 @@
"no_copy": 1,
"options": "Account"
},
- {
- "fieldname": "section_break_22",
- "fieldtype": "Section Break"
- },
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "cost_center",
@@ -455,10 +444,6 @@
"no_copy": 1,
"options": "Cost Center"
},
- {
- "fieldname": "column_break_26",
- "fieldtype": "Column Break"
- },
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "credit_limit",
@@ -589,10 +574,10 @@
},
{
"collapsible": 1,
- "description": "For reference only.",
+ "depends_on": "eval: doc.docstatus == 0 && doc.__islocal != 1",
"fieldname": "company_info",
"fieldtype": "Section Break",
- "label": "Company Info"
+ "label": "Address & Contact"
},
{
"fieldname": "date_of_incorporation",
@@ -741,6 +726,20 @@
"fieldtype": "Link",
"label": "Repair and Maintenance Account",
"options": "Account"
+ },
+ {
+ "fieldname": "section_break_28",
+ "fieldtype": "Section Break",
+ "label": "Chart of Accounts"
+ },
+ {
+ "fieldname": "hr_settings_section",
+ "fieldtype": "Section Break",
+ "label": "HR & Payroll Settings"
+ },
+ {
+ "fieldname": "column_break_26",
+ "fieldtype": "Column Break"
}
],
"icon": "fa fa-building",
@@ -748,7 +747,7 @@
"image_field": "company_logo",
"is_tree": 1,
"links": [],
- "modified": "2021-05-12 16:51:08.187233",
+ "modified": "2021-07-12 11:27:06.353860",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",
From 2e5525aba9073010374e193ed2c6ac5e66d6ddc9 Mon Sep 17 00:00:00 2001
From: Subin Tom <36098155+nemesis189@users.noreply.github.com>
Date: Tue, 24 Aug 2021 17:24:41 +0530
Subject: [PATCH 60/87] fix: Correct price list rate value in return si
(#27097)
---
erpnext/controllers/sales_and_purchase_return.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py
index 80ccc6d75b2..5ee1f2f7fb5 100644
--- a/erpnext/controllers/sales_and_purchase_return.py
+++ b/erpnext/controllers/sales_and_purchase_return.py
@@ -329,7 +329,6 @@ def make_return_doc(doctype, source_name, target_doc=None):
target_doc.po_detail = source_doc.po_detail
target_doc.pr_detail = source_doc.pr_detail
target_doc.purchase_invoice_item = source_doc.name
- target_doc.price_list_rate = 0
elif doctype == "Delivery Note":
returned_qty_map = get_returned_qty_map_for_row(source_doc.name, doctype)
@@ -360,7 +359,6 @@ def make_return_doc(doctype, source_name, target_doc=None):
else:
target_doc.pos_invoice_item = source_doc.name
- target_doc.price_list_rate = 0
if default_warehouse_for_sales_return:
target_doc.warehouse = default_warehouse_for_sales_return
From 9198caa5e71ce06d8e4e4af4f006ef9520e50944 Mon Sep 17 00:00:00 2001
From: Saqib
Date: Tue, 24 Aug 2021 17:26:23 +0530
Subject: [PATCH 61/87] fix: incorrect gl entry on period closing involving
finance books (#26921)
---
.../doctype/finance_book/test_finance_book.py | 24 ++++-----
.../period_closing_voucher.py | 46 ++++++----------
.../test_period_closing_voucher.py | 53 +++++++++++++++++++
erpnext/accounts/general_ledger.py | 2 +-
4 files changed, 81 insertions(+), 44 deletions(-)
diff --git a/erpnext/accounts/doctype/finance_book/test_finance_book.py b/erpnext/accounts/doctype/finance_book/test_finance_book.py
index cd8e204f4c8..2ba21397ad0 100644
--- a/erpnext/accounts/doctype/finance_book/test_finance_book.py
+++ b/erpnext/accounts/doctype/finance_book/test_finance_book.py
@@ -9,19 +9,8 @@ import frappe
import unittest
class TestFinanceBook(unittest.TestCase):
- def create_finance_book(self):
- if not frappe.db.exists("Finance Book", "_Test Finance Book"):
- finance_book = frappe.get_doc({
- "doctype": "Finance Book",
- "finance_book_name": "_Test Finance Book"
- }).insert()
- else:
- finance_book = frappe.get_doc("Finance Book", "_Test Finance Book")
-
- return finance_book
-
def test_finance_book(self):
- finance_book = self.create_finance_book()
+ finance_book = create_finance_book()
# create jv entry
jv = make_journal_entry("_Test Bank - _TC",
@@ -41,3 +30,14 @@ class TestFinanceBook(unittest.TestCase):
for gl_entry in gl_entries:
self.assertEqual(gl_entry.finance_book, finance_book.name)
+
+def create_finance_book():
+ if not frappe.db.exists("Finance Book", "_Test Finance Book"):
+ finance_book = frappe.get_doc({
+ "doctype": "Finance Book",
+ "finance_book_name": "_Test Finance Book"
+ }).insert()
+ else:
+ finance_book = frappe.get_doc("Finance Book", "_Test Finance Book")
+
+ return finance_book
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
index a6e3bd98e7c..289278ea8d5 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
@@ -50,9 +50,13 @@ class PeriodClosingVoucher(AccountsController):
.format(pce[0][0], self.posting_date))
def make_gl_entries(self):
+ gl_entries = self.get_gl_entries()
+ if gl_entries:
+ from erpnext.accounts.general_ledger import make_gl_entries
+ make_gl_entries(gl_entries)
+
+ def get_gl_entries(self):
gl_entries = []
- net_pl_balance = 0
-
pl_accounts = self.get_pl_balances()
for acc in pl_accounts:
@@ -60,6 +64,7 @@ class PeriodClosingVoucher(AccountsController):
gl_entries.append(self.get_gl_dict({
"account": acc.account,
"cost_center": acc.cost_center,
+ "finance_book": acc.finance_book,
"account_currency": acc.account_currency,
"debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) if flt(acc.bal_in_account_currency) < 0 else 0,
"debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) < 0 else 0,
@@ -67,35 +72,13 @@ class PeriodClosingVoucher(AccountsController):
"credit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) > 0 else 0
}, item=acc))
- net_pl_balance += flt(acc.bal_in_company_currency)
+ if gl_entries:
+ gle_for_net_pl_bal = self.get_pnl_gl_entry(pl_accounts)
+ gl_entries += gle_for_net_pl_bal
- if net_pl_balance:
- if self.cost_center_wise_pnl:
- costcenter_wise_gl_entries = self.get_costcenter_wise_pnl_gl_entries(pl_accounts)
- gl_entries += costcenter_wise_gl_entries
- else:
- gl_entry = self.get_pnl_gl_entry(net_pl_balance)
- gl_entries.append(gl_entry)
-
- from erpnext.accounts.general_ledger import make_gl_entries
- make_gl_entries(gl_entries)
-
- def get_pnl_gl_entry(self, net_pl_balance):
- cost_center = frappe.db.get_value("Company", self.company, "cost_center")
- gl_entry = self.get_gl_dict({
- "account": self.closing_account_head,
- "debit_in_account_currency": abs(net_pl_balance) if net_pl_balance > 0 else 0,
- "debit": abs(net_pl_balance) if net_pl_balance > 0 else 0,
- "credit_in_account_currency": abs(net_pl_balance) if net_pl_balance < 0 else 0,
- "credit": abs(net_pl_balance) if net_pl_balance < 0 else 0,
- "cost_center": cost_center
- })
-
- self.update_default_dimensions(gl_entry)
-
- return gl_entry
-
- def get_costcenter_wise_pnl_gl_entries(self, pl_accounts):
+ return gl_entries
+
+ def get_pnl_gl_entry(self, pl_accounts):
company_cost_center = frappe.db.get_value("Company", self.company, "cost_center")
gl_entries = []
@@ -104,6 +87,7 @@ class PeriodClosingVoucher(AccountsController):
gl_entry = self.get_gl_dict({
"account": self.closing_account_head,
"cost_center": acc.cost_center or company_cost_center,
+ "finance_book": acc.finance_book,
"account_currency": acc.account_currency,
"debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) if flt(acc.bal_in_account_currency) > 0 else 0,
"debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) > 0 else 0,
@@ -130,7 +114,7 @@ class PeriodClosingVoucher(AccountsController):
def get_pl_balances(self):
"""Get balance for dimension-wise pl accounts"""
- dimension_fields = ['t1.cost_center']
+ dimension_fields = ['t1.cost_center', 't1.finance_book']
self.accounting_dimensions = get_accounting_dimensions()
for dimension in self.accounting_dimensions:
diff --git a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
index f17a5c51a08..2d1939131c3 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
+++ b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
@@ -8,6 +8,7 @@ import frappe
from frappe.utils import flt, today
from erpnext.accounts.utils import get_fiscal_year, now
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
+from erpnext.accounts.doctype.finance_book.test_finance_book import create_finance_book
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
class TestPeriodClosingVoucher(unittest.TestCase):
@@ -118,6 +119,58 @@ class TestPeriodClosingVoucher(unittest.TestCase):
self.assertTrue(pcv_gle, expected_gle)
+ def test_period_closing_with_finance_book_entries(self):
+ frappe.db.sql("delete from `tabGL Entry` where company='Test PCV Company'")
+
+ company = create_company()
+ surplus_account = create_account()
+ cost_center = create_cost_center("Test Cost Center 1")
+
+ create_sales_invoice(
+ company=company,
+ income_account="Sales - TPC",
+ expense_account="Cost of Goods Sold - TPC",
+ cost_center=cost_center,
+ rate=400,
+ debit_to="Debtors - TPC"
+ )
+ jv = make_journal_entry(
+ account1="Cash - TPC",
+ account2="Sales - TPC",
+ amount=400,
+ cost_center=cost_center,
+ posting_date=now()
+ )
+ jv.company = company
+ jv.finance_book = create_finance_book().name
+ jv.save()
+ jv.submit()
+
+ pcv = frappe.get_doc({
+ "transaction_date": today(),
+ "posting_date": today(),
+ "fiscal_year": get_fiscal_year(today())[0],
+ "company": company,
+ "closing_account_head": surplus_account,
+ "remarks": "Test",
+ "doctype": "Period Closing Voucher"
+ })
+ pcv.insert()
+ pcv.submit()
+
+ expected_gle = (
+ (surplus_account, 0.0, 400.0, ''),
+ (surplus_account, 0.0, 400.0, jv.finance_book),
+ ('Sales - TPC', 400.0, 0.0, ''),
+ ('Sales - TPC', 400.0, 0.0, jv.finance_book)
+ )
+
+ pcv_gle = frappe.db.sql("""
+ select account, debit, credit, finance_book from `tabGL Entry` where voucher_no=%s
+ """, (pcv.name))
+
+ self.assertTrue(pcv_gle, expected_gle)
+
def make_period_closing_voucher(self):
pcv = frappe.get_doc({
"doctype": "Period Closing Voucher",
diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py
index 4c7c567b42a..31261384080 100644
--- a/erpnext/accounts/general_ledger.py
+++ b/erpnext/accounts/general_ledger.py
@@ -101,7 +101,7 @@ def merge_similar_entries(gl_map, precision=None):
def check_if_in_list(gle, gl_map, dimensions=None):
account_head_fieldnames = ['voucher_detail_no', 'party', 'against_voucher',
- 'cost_center', 'against_voucher_type', 'party_type', 'project']
+ 'cost_center', 'against_voucher_type', 'party_type', 'project', 'finance_book']
if dimensions:
account_head_fieldnames = account_head_fieldnames + dimensions
From f47cbae5e07ba7f0e48e5fe11b807632f206bd45 Mon Sep 17 00:00:00 2001
From: Saqib
Date: Tue, 24 Aug 2021 17:27:27 +0530
Subject: [PATCH 62/87] feat: allow draft pos invoices even if no stock
available (#27078)
---
erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py
index 759cad53d4a..034a217a26d 100644
--- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py
+++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py
@@ -138,7 +138,7 @@ class POSInvoice(SalesInvoice):
.format(item.idx, bold_delivered_serial_nos), title=_("Item Unavailable"))
def validate_stock_availablility(self):
- if self.is_return:
+ if self.is_return or self.docstatus != 1:
return
allow_negative_stock = frappe.db.get_single_value('Stock Settings', 'allow_negative_stock')
From ad06fb2179e69fc732e73f235a7f17b68134ef19 Mon Sep 17 00:00:00 2001
From: Afshan <33727827+AfshanKhan@users.noreply.github.com>
Date: Tue, 24 Aug 2021 17:35:01 +0530
Subject: [PATCH 63/87] fix: calculation of gross profit percentage in Gross
Profit Report (#27045)
---
.../report/gross_profit/gross_profit.json | 8 +++--
.../report/gross_profit/gross_profit.py | 30 ++++++++++++++++---
2 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.json b/erpnext/accounts/report/gross_profit/gross_profit.json
index cd6bac2d77d..5fff3fdba77 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.json
+++ b/erpnext/accounts/report/gross_profit/gross_profit.json
@@ -1,16 +1,20 @@
{
- "add_total_row": 1,
+ "add_total_row": 0,
+ "columns": [],
"creation": "2013-02-25 17:03:34",
+ "disable_prepared_report": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
+ "filters": [],
"idx": 3,
"is_standard": "Yes",
- "modified": "2020-08-13 11:26:39.112352",
+ "modified": "2021-08-19 18:57:07.468202",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Gross Profit",
"owner": "Administrator",
+ "prepared_report": 0,
"ref_doctype": "Sales Invoice",
"report_name": "Gross Profit",
"report_type": "Script Report",
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index 6d8623c189d..c949d9b74e5 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -41,12 +41,14 @@ def execute(filters=None):
columns = get_columns(group_wise_columns, filters)
- for src in gross_profit_data.grouped_data:
+ for idx, src in enumerate(gross_profit_data.grouped_data):
row = []
for col in group_wise_columns.get(scrub(filters.group_by)):
row.append(src.get(col))
row.append(filters.currency)
+ if idx == len(gross_profit_data.grouped_data)-1:
+ row[0] = frappe.bold("Total")
data.append(row)
return columns, data
@@ -154,6 +156,15 @@ class GrossProfitGenerator(object):
def get_average_rate_based_on_group_by(self):
# sum buying / selling totals for group
+ self.totals = frappe._dict(
+ qty=0,
+ base_amount=0,
+ buying_amount=0,
+ gross_profit=0,
+ gross_profit_percent=0,
+ base_rate=0,
+ buying_rate=0
+ )
for key in list(self.grouped):
if self.filters.get("group_by") != "Invoice":
for i, row in enumerate(self.grouped[key]):
@@ -165,6 +176,7 @@ class GrossProfitGenerator(object):
new_row.base_amount += flt(row.base_amount, self.currency_precision)
new_row = self.set_average_rate(new_row)
self.grouped_data.append(new_row)
+ self.add_to_totals(new_row)
else:
for i, row in enumerate(self.grouped[key]):
if row.parent in self.returned_invoices \
@@ -177,15 +189,25 @@ class GrossProfitGenerator(object):
if row.qty or row.base_amount:
row = self.set_average_rate(row)
self.grouped_data.append(row)
+ self.add_to_totals(row)
+ self.set_average_gross_profit(self.totals)
+ self.grouped_data.append(self.totals)
def set_average_rate(self, new_row):
+ self.set_average_gross_profit(new_row)
+ new_row.buying_rate = flt(new_row.buying_amount / new_row.qty, self.float_precision) if new_row.qty else 0
+ new_row.base_rate = flt(new_row.base_amount / new_row.qty, self.float_precision) if new_row.qty else 0
+ return new_row
+
+ def set_average_gross_profit(self, new_row):
new_row.gross_profit = flt(new_row.base_amount - new_row.buying_amount, self.currency_precision)
new_row.gross_profit_percent = flt(((new_row.gross_profit / new_row.base_amount) * 100.0), self.currency_precision) \
if new_row.base_amount else 0
- new_row.buying_rate = flt(new_row.buying_amount / new_row.qty, self.float_precision) if new_row.qty else 0
- new_row.base_rate = flt(new_row.base_amount / new_row.qty, self.float_precision) if new_row.qty else 0
- return new_row
+ def add_to_totals(self, new_row):
+ for key in self.totals:
+ if new_row.get(key):
+ self.totals[key] += new_row[key]
def get_returned_invoice_items(self):
returned_invoices = frappe.db.sql("""
From 164acc845a0b1aa1473bfa475c6728834933c260 Mon Sep 17 00:00:00 2001
From: Anupam Kumar
Date: Tue, 24 Aug 2021 19:15:56 +0530
Subject: [PATCH 64/87] refactor: social media post fixes (#24664)
* fix: social media post fixes
* feat: post metrics and some fixes
* fix: sider issues
* fix: sider issue
* fix: reverting optional chaning statements
* fix: sider issues
* fix: review chnages
* fix: text trigger check
* fix: sider issue
(cherry picked from commit f7e0edecc9ce45ba7baa4c17b2b35f487dffccf2)
---
.../linkedin_settings/linkedin_settings.js | 11 +-
.../linkedin_settings/linkedin_settings.json | 3 +-
.../linkedin_settings/linkedin_settings.py | 112 +++++++---
.../social_media_post/social_media_post.js | 196 ++++++++++++------
.../social_media_post/social_media_post.json | 92 +++-----
.../social_media_post/social_media_post.py | 54 +++--
.../social_media_post_list.js | 17 +-
.../twitter_settings/twitter_settings.js | 13 +-
.../twitter_settings/twitter_settings.json | 3 +-
.../twitter_settings/twitter_settings.py | 50 +++--
10 files changed, 349 insertions(+), 202 deletions(-)
diff --git a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.js b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.js
index 263005ef6c5..7aa0b777596 100644
--- a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.js
+++ b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.js
@@ -2,8 +2,8 @@
// For license information, please see license.txt
frappe.ui.form.on('LinkedIn Settings', {
- onload: function(frm){
- if (frm.doc.session_status == 'Expired' && frm.doc.consumer_key && frm.doc.consumer_secret){
+ onload: function(frm) {
+ if (frm.doc.session_status == 'Expired' && frm.doc.consumer_key && frm.doc.consumer_secret) {
frappe.confirm(
__('Session not valid, Do you want to login?'),
function(){
@@ -14,8 +14,9 @@ frappe.ui.form.on('LinkedIn Settings', {
}
);
}
+ frm.dashboard.set_headline(__("For more information, {0}.", [`${__('Click here')}`]));
},
- refresh: function(frm){
+ refresh: function(frm) {
if (frm.doc.session_status=="Expired"){
let msg = __("Session Not Active. Save doc to login.");
frm.dashboard.set_headline_alert(
@@ -53,7 +54,7 @@ frappe.ui.form.on('LinkedIn Settings', {
);
}
},
- login: function(frm){
+ login: function(frm) {
if (frm.doc.consumer_key && frm.doc.consumer_secret){
frappe.dom.freeze();
frappe.call({
@@ -67,7 +68,7 @@ frappe.ui.form.on('LinkedIn Settings', {
});
}
},
- after_save: function(frm){
+ after_save: function(frm) {
frm.trigger("login");
}
});
diff --git a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.json b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.json
index 9eacb0011c5..f882e36c32a 100644
--- a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.json
+++ b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.json
@@ -2,6 +2,7 @@
"actions": [],
"creation": "2020-01-30 13:36:39.492931",
"doctype": "DocType",
+ "documentation": "https://docs.erpnext.com/docs/user/manual/en/CRM/linkedin-settings",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
@@ -87,7 +88,7 @@
],
"issingle": 1,
"links": [],
- "modified": "2020-04-16 23:22:51.966397",
+ "modified": "2021-02-18 15:19:21.920725",
"modified_by": "Administrator",
"module": "CRM",
"name": "LinkedIn Settings",
diff --git a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py
index d8c6fb4f90f..9b88d78c1ff 100644
--- a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py
+++ b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py
@@ -3,11 +3,12 @@
# For license information, please see license.txt
from __future__ import unicode_literals
-import frappe, requests, json
+import frappe
+import requests
from frappe import _
-from frappe.utils import get_site_url, get_url_to_form, get_link_to_form
+from frappe.utils import get_url_to_form
from frappe.model.document import Document
-from frappe.utils.file_manager import get_file, get_file_path
+from frappe.utils.file_manager import get_file_path
from six.moves.urllib.parse import urlencode
class LinkedInSettings(Document):
@@ -42,11 +43,7 @@ class LinkedInSettings(Document):
self.db_set("access_token", response["access_token"])
def get_member_profile(self):
- headers = {
- "Authorization": "Bearer {}".format(self.access_token)
- }
- url = "https://api.linkedin.com/v2/me"
- response = requests.get(url=url, headers=headers)
+ response = requests.get(url="https://api.linkedin.com/v2/me", headers=self.get_headers())
response = frappe.parse_json(response.content.decode())
frappe.db.set_value(self.doctype, self.name, {
@@ -55,16 +52,16 @@ class LinkedInSettings(Document):
"session_status": "Active"
})
frappe.local.response["type"] = "redirect"
- frappe.local.response["location"] = get_url_to_form("LinkedIn Settings","LinkedIn Settings")
+ frappe.local.response["location"] = get_url_to_form("LinkedIn Settings", "LinkedIn Settings")
- def post(self, text, media=None):
+ def post(self, text, title, media=None):
if not media:
- return self.post_text(text)
+ return self.post_text(text, title)
else:
media_id = self.upload_image(media)
if media_id:
- return self.post_text(text, media_id=media_id)
+ return self.post_text(text, title, media_id=media_id)
else:
frappe.log_error("Failed to upload media.","LinkedIn Upload Error")
@@ -82,9 +79,7 @@ class LinkedInSettings(Document):
}]
}
}
- headers = {
- "Authorization": "Bearer {}".format(self.access_token)
- }
+ headers = self.get_headers()
response = self.http_post(url=register_url, body=body, headers=headers)
if response.status_code == 200:
@@ -100,24 +95,33 @@ class LinkedInSettings(Document):
return None
- def post_text(self, text, media_id=None):
+ def post_text(self, text, title, media_id=None):
url = "https://api.linkedin.com/v2/shares"
- headers = {
- "X-Restli-Protocol-Version": "2.0.0",
- "Authorization": "Bearer {}".format(self.access_token),
- "Content-Type": "application/json; charset=UTF-8"
- }
+ headers = self.get_headers()
+ headers["X-Restli-Protocol-Version"] = "2.0.0"
+ headers["Content-Type"] = "application/json; charset=UTF-8"
+
body = {
"distribution": {
"linkedInDistributionTarget": {}
},
"owner":"urn:li:organization:{0}".format(self.company_id),
- "subject": "Test Share Subject",
+ "subject": title,
"text": {
"text": text
}
}
+ reference_url = self.get_reference_url(text)
+ if reference_url:
+ body["content"] = {
+ "contentEntities": [
+ {
+ "entityLocation": reference_url
+ }
+ ]
+ }
+
if media_id:
body["content"]= {
"contentEntities": [{
@@ -141,20 +145,60 @@ class LinkedInSettings(Document):
raise
except Exception as e:
- content = json.loads(response.content)
-
- if response.status_code == 401:
- self.db_set("session_status", "Expired")
- frappe.db.commit()
- frappe.throw(content["message"], title="LinkedIn Error - Unauthorized")
- elif response.status_code == 403:
- frappe.msgprint(_("You Didn't have permission to access this API"))
- frappe.throw(content["message"], title="LinkedIn Error - Access Denied")
- else:
- frappe.throw(response.reason, title=response.status_code)
-
+ self.api_error(response)
+
return response
+ def get_headers(self):
+ return {
+ "Authorization": "Bearer {}".format(self.access_token)
+ }
+
+ def get_reference_url(self, text):
+ import re
+ regex_url = r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+"
+ urls = re.findall(regex_url, text)
+ if urls:
+ return urls[0]
+
+ def delete_post(self, post_id):
+ try:
+ response = requests.delete(url="https://api.linkedin.com/v2/shares/urn:li:share:{0}".format(post_id), headers=self.get_headers())
+ if response.status_code !=200:
+ raise
+ except Exception:
+ self.api_error(response)
+
+ def get_post(self, post_id):
+ url = "https://api.linkedin.com/v2/organizationalEntityShareStatistics?q=organizationalEntity&organizationalEntity=urn:li:organization:{0}&shares[0]=urn:li:share:{1}".format(self.company_id, post_id)
+
+ try:
+ response = requests.get(url=url, headers=self.get_headers())
+ if response.status_code !=200:
+ raise
+
+ except Exception:
+ self.api_error(response)
+
+ response = frappe.parse_json(response.content.decode())
+ if len(response.elements):
+ return response.elements[0]
+
+ return None
+
+ def api_error(self, response):
+ content = frappe.parse_json(response.content.decode())
+
+ if response.status_code == 401:
+ self.db_set("session_status", "Expired")
+ frappe.db.commit()
+ frappe.throw(content["message"], title=_("LinkedIn Error - Unauthorized"))
+ elif response.status_code == 403:
+ frappe.msgprint(_("You didn't have permission to access this API"))
+ frappe.throw(content["message"], title=_("LinkedIn Error - Access Denied"))
+ else:
+ frappe.throw(response.reason, title=response.status_code)
+
@frappe.whitelist(allow_guest=True)
def callback(code=None, error=None, error_description=None):
if not error:
diff --git a/erpnext/crm/doctype/social_media_post/social_media_post.js b/erpnext/crm/doctype/social_media_post/social_media_post.js
index 6fb0f975f46..a8f5deea535 100644
--- a/erpnext/crm/doctype/social_media_post/social_media_post.js
+++ b/erpnext/crm/doctype/social_media_post/social_media_post.js
@@ -1,67 +1,139 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Social Media Post', {
- validate: function(frm){
- if (frm.doc.twitter === 0 && frm.doc.linkedin === 0){
- frappe.throw(__("Select atleast one Social Media from Share on."))
- }
- if (frm.doc.scheduled_time) {
- let scheduled_time = new Date(frm.doc.scheduled_time);
- let date_time = new Date();
- if (scheduled_time.getTime() < date_time.getTime()){
- frappe.throw(__("Invalid Scheduled Time"));
- }
- }
- if (frm.doc.text?.length > 280){
- frappe.throw(__("Length Must be less than 280."))
- }
- },
- refresh: function(frm){
- if (frm.doc.docstatus === 1){
- if (frm.doc.post_status != "Posted"){
- add_post_btn(frm);
- }
- else if (frm.doc.post_status == "Posted"){
- frm.set_df_property('sheduled_time', 'read_only', 1);
- }
+ validate: function(frm) {
+ if (frm.doc.twitter === 0 && frm.doc.linkedin === 0) {
+ frappe.throw(__("Select atleast one Social Media Platform to Share on."));
+ }
+ if (frm.doc.scheduled_time) {
+ let scheduled_time = new Date(frm.doc.scheduled_time);
+ let date_time = new Date();
+ if (scheduled_time.getTime() < date_time.getTime()) {
+ frappe.throw(__("Scheduled Time must be a future time."));
+ }
+ }
+ frm.trigger('validate_tweet_length');
+ },
- let html='';
- if (frm.doc.twitter){
- let color = frm.doc.twitter_post_id ? "green" : "red";
- let status = frm.doc.twitter_post_id ? "Posted" : "Not Posted";
- html += `
- Twitter : ${status}
-
` ;
- }
- if (frm.doc.linkedin){
- let color = frm.doc.linkedin_post_id ? "green" : "red";
- let status = frm.doc.linkedin_post_id ? "Posted" : "Not Posted";
- html += `
@@ -38,7 +39,7 @@ frappe.ui.form.on('Twitter Settings', {
);
}
},
- login: function(frm){
+ login: function(frm) {
if (frm.doc.consumer_key && frm.doc.consumer_secret){
frappe.dom.freeze();
frappe.call({
@@ -52,7 +53,7 @@ frappe.ui.form.on('Twitter Settings', {
});
}
},
- after_save: function(frm){
+ after_save: function(frm) {
frm.trigger("login");
}
});
diff --git a/erpnext/crm/doctype/twitter_settings/twitter_settings.json b/erpnext/crm/doctype/twitter_settings/twitter_settings.json
index 36776e5c202..8d05877f060 100644
--- a/erpnext/crm/doctype/twitter_settings/twitter_settings.json
+++ b/erpnext/crm/doctype/twitter_settings/twitter_settings.json
@@ -2,6 +2,7 @@
"actions": [],
"creation": "2020-01-30 10:29:08.562108",
"doctype": "DocType",
+ "documentation": "https://docs.erpnext.com/docs/user/manual/en/CRM/twitter-settings",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
@@ -77,7 +78,7 @@
"image_field": "profile_pic",
"issingle": 1,
"links": [],
- "modified": "2020-05-13 17:50:47.934776",
+ "modified": "2021-02-18 15:18:07.900031",
"modified_by": "Administrator",
"module": "CRM",
"name": "Twitter Settings",
diff --git a/erpnext/crm/doctype/twitter_settings/twitter_settings.py b/erpnext/crm/doctype/twitter_settings/twitter_settings.py
index 1e1beab2d25..47756560ec5 100644
--- a/erpnext/crm/doctype/twitter_settings/twitter_settings.py
+++ b/erpnext/crm/doctype/twitter_settings/twitter_settings.py
@@ -32,7 +32,9 @@ class TwitterSettings(Document):
try:
auth.get_access_token(oauth_verifier)
- api = self.get_api(auth.access_token, auth.access_token_secret)
+ self.access_token = auth.access_token
+ self.access_token_secret = auth.access_token_secret
+ api = self.get_api()
user = api.me()
profile_pic = (user._json["profile_image_url"]).replace("_normal","")
@@ -50,11 +52,11 @@ class TwitterSettings(Document):
frappe.msgprint(_("Error! Failed to get access token."))
frappe.throw(_('Invalid Consumer Key or Consumer Secret Key'))
- def get_api(self, access_token, access_token_secret):
- # authentication of consumer key and secret
- auth = tweepy.OAuthHandler(self.consumer_key, self.get_password(fieldname="consumer_secret"))
- # authentication of access token and secret
- auth.set_access_token(access_token, access_token_secret)
+ def get_api(self):
+ # authentication of consumer key and secret
+ auth = tweepy.OAuthHandler(self.consumer_key, self.get_password(fieldname="consumer_secret"))
+ # authentication of access token and secret
+ auth.set_access_token(self.access_token, self.access_token_secret)
return tweepy.API(auth)
@@ -68,13 +70,13 @@ class TwitterSettings(Document):
def upload_image(self, media):
media = get_file_path(media)
- api = self.get_api(self.access_token, self.access_token_secret)
+ api = self.get_api()
media = api.media_upload(media)
return media.media_id
def send_tweet(self, text, media_id=None):
- api = self.get_api(self.access_token, self.access_token_secret)
+ api = self.get_api()
try:
if media_id:
response = api.update_status(status = text, media_ids = [media_id])
@@ -84,12 +86,32 @@ class TwitterSettings(Document):
return response
except TweepError as e:
- content = json.loads(e.response.content)
- content = content["errors"][0]
- if e.response.status_code == 401:
- self.db_set("session_status", "Expired")
- frappe.db.commit()
- frappe.throw(content["message"],title="Twitter Error {0} {1}".format(e.response.status_code, e.response.reason))
+ self.api_error(e)
+
+ def delete_tweet(self, tweet_id):
+ api = self.get_api()
+ try:
+ api.destroy_status(tweet_id)
+ except TweepError as e:
+ self.api_error(e)
+
+ def get_tweet(self, tweet_id):
+ api = self.get_api()
+ try:
+ response = api.get_status(tweet_id, trim_user=True, include_entities=True)
+ except TweepError as e:
+ self.api_error(e)
+
+ return response._json
+
+ def api_error(self, e):
+ content = json.loads(e.response.content)
+ content = content["errors"][0]
+ if e.response.status_code == 401:
+ self.db_set("session_status", "Expired")
+ frappe.db.commit()
+ frappe.throw(content["message"],title=_("Twitter Error {0} : {1}").format(e.response.status_code, e.response.reason))
+
@frappe.whitelist(allow_guest=True)
def callback(oauth_token = None, oauth_verifier = None):
From f1313302c98f8a1a63d222aca4321fbbfb30ba03 Mon Sep 17 00:00:00 2001
From: Saqib
Date: Tue, 24 Aug 2021 19:45:21 +0530
Subject: [PATCH 65/87] fix: pos invoice test (#27113)
---
erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py
index 6172796129f..d2527fb2e50 100644
--- a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py
+++ b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py
@@ -320,7 +320,8 @@ class TestPOSInvoice(unittest.TestCase):
pos2.get("items")[0].serial_no = serial_nos[0]
pos2.append("payments", {'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - _TC', 'amount': 1000})
- self.assertRaises(frappe.ValidationError, pos2.insert)
+ pos2.insert()
+ self.assertRaises(frappe.ValidationError, pos2.submit)
def test_delivered_serialized_item_transaction(self):
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_serialized_item
@@ -348,7 +349,8 @@ class TestPOSInvoice(unittest.TestCase):
pos2.get("items")[0].serial_no = serial_nos[0]
pos2.append("payments", {'mode_of_payment': 'Bank Draft', 'account': '_Test Bank - _TC', 'amount': 1000})
- self.assertRaises(frappe.ValidationError, pos2.insert)
+ pos2.insert()
+ self.assertRaises(frappe.ValidationError, pos2.submit)
def test_loyalty_points(self):
from erpnext.accounts.doctype.loyalty_program.test_loyalty_program import create_records
From 1c279af0b30b4dcafe091d5183fbf13532c05e60 Mon Sep 17 00:00:00 2001
From: Anupam Kumar
Date: Tue, 24 Aug 2021 20:06:04 +0530
Subject: [PATCH 66/87] fix: lead name issue (#26999)
* fix: lead name issue
* fix: change lead name wrt first name, middle and last name
Co-authored-by: Jannat Patel <31363128+pateljannat@users.noreply.github.com>
---
erpnext/crm/doctype/lead/lead.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index c0ce6badbf5..cad17a3bee8 100644
--- a/erpnext/crm/doctype/lead/lead.py
+++ b/erpnext/crm/doctype/lead/lead.py
@@ -36,7 +36,8 @@ class Lead(SellingController):
})
def set_full_name(self):
- self.lead_name = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name]))
+ if self.first_name:
+ self.lead_name = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name]))
def validate_email_id(self):
if self.email_id:
From 255b99ebdc1ce3be6de02d9641fc72685de1a6a6 Mon Sep 17 00:00:00 2001
From: Frappe PR Bot
Date: Tue, 24 Aug 2021 20:19:22 +0530
Subject: [PATCH 67/87] feat: Employee reminders (#25735) (#27115)
* feat: Add reminders section to HR Settings
* refactor: Extract generic function for getting Employees
* feat: Employee Work Anniversary Reminder
* feat: Daily Holiday Reminder
* fix: Unnecessary params and replace [] with .get()
* test: Daily Holiday Reminders
* test: is_holiday basic tests
* refactor: Move employee reminders code to separate module
* feat: Add advance reminder to HR settings
* feat: Advance Holiday Reminders
* refactor: get_holidays_for_employee
* feat: Email holiday reminders in advance + tests
* fix: Remove unused import
* refactor: HR Setting Reminder Section
* refactor: Remove Daily Holiday Reminders feat
* feat: Reminder miss warning
* fix: Failing test and function name change
* chore: Add patch for field rename
* chore: Rename frequency label
* fix: Failing patch test
* fix: sider and removed description of fields
* fix: email alignment
Co-authored-by: pateljannat
Co-authored-by: Jannat Patel <31363128+pateljannat@users.noreply.github.com>
(cherry picked from commit 24b2a315818d08ad4cb03347ccf5297df916a5ac)
Co-authored-by: Mohammad Hussain Nagaria <34810212+NagariaHussain@users.noreply.github.com>
Co-authored-by: Jannat Patel <31363128+pateljannat@users.noreply.github.com>
---
erpnext/hooks.py | 9 +-
.../compensatory_leave_request.py | 4 +-
erpnext/hr/doctype/employee/employee.py | 127 +++------
.../hr/doctype/employee/employee_reminders.py | 247 ++++++++++++++++++
erpnext/hr/doctype/employee/test_employee.py | 25 --
.../employee/test_employee_reminders.py | 173 ++++++++++++
.../hr/doctype/hr_settings/hr_settings.json | 57 +++-
erpnext/hr/doctype/hr_settings/hr_settings.py | 66 ++++-
.../upload_attendance/upload_attendance.py | 4 +-
erpnext/hr/utils.py | 47 +++-
erpnext/patches.txt | 1 +
.../rename_stop_to_send_birthday_reminders.py | 23 ++
.../employee_benefit_application.py | 4 +-
.../doctype/payroll_period/payroll_period.py | 4 +-
.../doctype/salary_slip/salary_slip.py | 16 +-
erpnext/public/js/utils.js | 11 +
.../emails/anniversary_reminder.html | 25 ++
.../templates/emails/holiday_reminder.html | 16 ++
18 files changed, 691 insertions(+), 168 deletions(-)
create mode 100644 erpnext/hr/doctype/employee/employee_reminders.py
create mode 100644 erpnext/hr/doctype/employee/test_employee_reminders.py
create mode 100644 erpnext/patches/v13_0/rename_stop_to_send_birthday_reminders.py
create mode 100644 erpnext/templates/emails/anniversary_reminder.html
create mode 100644 erpnext/templates/emails/holiday_reminder.html
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 74977cd8bca..4854bfd1e16 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -355,7 +355,8 @@ scheduler_events = {
"erpnext.crm.doctype.opportunity.opportunity.auto_close_opportunity",
"erpnext.controllers.accounts_controller.update_invoice_status",
"erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year",
- "erpnext.hr.doctype.employee.employee.send_birthday_reminders",
+ "erpnext.hr.doctype.employee.employee_reminders.send_work_anniversary_reminders",
+ "erpnext.hr.doctype.employee.employee_reminders.send_birthday_reminders",
"erpnext.projects.doctype.task.task.set_tasks_as_overdue",
"erpnext.assets.doctype.asset.depreciation.post_depreciation_entries",
"erpnext.hr.doctype.daily_work_summary_group.daily_work_summary_group.send_summary",
@@ -387,6 +388,12 @@ scheduler_events = {
"erpnext.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual.process_loan_interest_accrual_for_term_loans",
"erpnext.crm.doctype.lead.lead.daily_open_lead"
],
+ "weekly": [
+ "erpnext.hr.doctype.employee.employee_reminders.send_reminders_in_advance_weekly"
+ ],
+ "monthly": [
+ "erpnext.hr.doctype.employee.employee_reminders.send_reminders_in_advance_monthly"
+ ],
"monthly_long": [
"erpnext.accounts.deferred_revenue.process_deferred_accounting",
"erpnext.loan_management.doctype.process_loan_interest_accrual.process_loan_interest_accrual.process_loan_interest_accrual_for_demand_loans"
diff --git a/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py b/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py
index 0d7fded921b..3db81654a65 100644
--- a/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py
+++ b/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py
@@ -8,7 +8,7 @@ from frappe import _
from frappe.utils import date_diff, add_days, getdate, cint, format_date
from frappe.model.document import Document
from erpnext.hr.utils import validate_dates, validate_overlap, get_leave_period, validate_active_employee, \
- get_holidays_for_employee, create_additional_leave_ledger_entry
+ create_additional_leave_ledger_entry, get_holiday_dates_for_employee
class CompensatoryLeaveRequest(Document):
@@ -39,7 +39,7 @@ class CompensatoryLeaveRequest(Document):
frappe.throw(_("You are not present all day(s) between compensatory leave request days"))
def validate_holidays(self):
- holidays = get_holidays_for_employee(self.employee, self.work_from_date, self.work_end_date)
+ holidays = get_holiday_dates_for_employee(self.employee, self.work_from_date, self.work_end_date)
if len(holidays) < date_diff(self.work_end_date, self.work_from_date) + 1:
if date_diff(self.work_end_date, self.work_from_date):
msg = _("The days between {0} to {1} are not valid holidays.").format(frappe.bold(format_date(self.work_from_date)), frappe.bold(format_date(self.work_end_date)))
diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py
index f4280152c5c..643f3da2ff7 100755
--- a/erpnext/hr/doctype/employee/employee.py
+++ b/erpnext/hr/doctype/employee/employee.py
@@ -1,7 +1,5 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
import frappe
from frappe.utils import getdate, validate_email_address, today, add_years, cstr
@@ -9,7 +7,6 @@ from frappe.model.naming import set_name_by_naming_series
from frappe import throw, _, scrub
from frappe.permissions import add_user_permission, remove_user_permission, \
set_user_permission_if_allowed, has_permission, get_doc_permissions
-from frappe.model.document import Document
from erpnext.utilities.transaction_base import delete_events
from frappe.utils.nestedset import NestedSet
@@ -286,94 +283,8 @@ def update_user_permissions(doc, method):
employee = frappe.get_doc("Employee", {"user_id": doc.name})
employee.update_user_permissions()
-def send_birthday_reminders():
- """Send Employee birthday reminders if no 'Stop Birthday Reminders' is not set."""
- if int(frappe.db.get_single_value("HR Settings", "stop_birthday_reminders") or 0):
- return
-
- employees_born_today = get_employees_who_are_born_today()
-
- for company, birthday_persons in employees_born_today.items():
- employee_emails = get_all_employee_emails(company)
- birthday_person_emails = [get_employee_email(doc) for doc in birthday_persons]
- recipients = list(set(employee_emails) - set(birthday_person_emails))
-
- reminder_text, message = get_birthday_reminder_text_and_message(birthday_persons)
- send_birthday_reminder(recipients, reminder_text, birthday_persons, message)
-
- if len(birthday_persons) > 1:
- # special email for people sharing birthdays
- for person in birthday_persons:
- person_email = person["user_id"] or person["personal_email"] or person["company_email"]
- others = [d for d in birthday_persons if d != person]
- reminder_text, message = get_birthday_reminder_text_and_message(others)
- send_birthday_reminder(person_email, reminder_text, others, message)
-
def get_employee_email(employee_doc):
- return employee_doc["user_id"] or employee_doc["personal_email"] or employee_doc["company_email"]
-
-def get_birthday_reminder_text_and_message(birthday_persons):
- if len(birthday_persons) == 1:
- birthday_person_text = birthday_persons[0]['name']
- else:
- # converts ["Jim", "Rim", "Dim"] to Jim, Rim & Dim
- person_names = [d['name'] for d in birthday_persons]
- last_person = person_names[-1]
- birthday_person_text = ", ".join(person_names[:-1])
- birthday_person_text = _("{} & {}").format(birthday_person_text, last_person)
-
- reminder_text = _("Today is {0}'s birthday 🎉").format(birthday_person_text)
- message = _("A friendly reminder of an important date for our team.")
- message += " "
- message += _("Everyone, let’s congratulate {0} on their birthday.").format(birthday_person_text)
-
- return reminder_text, message
-
-def send_birthday_reminder(recipients, reminder_text, birthday_persons, message):
- frappe.sendmail(
- recipients=recipients,
- subject=_("Birthday Reminder"),
- template="birthday_reminder",
- args=dict(
- reminder_text=reminder_text,
- birthday_persons=birthday_persons,
- message=message,
- ),
- header=_("Birthday Reminder 🎂")
- )
-
-def get_employees_who_are_born_today():
- """Get all employee born today & group them based on their company"""
- from collections import defaultdict
- employees_born_today = frappe.db.multisql({
- "mariadb": """
- SELECT `personal_email`, `company`, `company_email`, `user_id`, `employee_name` AS 'name', `image`
- FROM `tabEmployee`
- WHERE
- DAY(date_of_birth) = DAY(%(today)s)
- AND
- MONTH(date_of_birth) = MONTH(%(today)s)
- AND
- `status` = 'Active'
- """,
- "postgres": """
- SELECT "personal_email", "company", "company_email", "user_id", "employee_name" AS 'name', "image"
- FROM "tabEmployee"
- WHERE
- DATE_PART('day', "date_of_birth") = date_part('day', %(today)s)
- AND
- DATE_PART('month', "date_of_birth") = date_part('month', %(today)s)
- AND
- "status" = 'Active'
- """,
- }, dict(today=today()), as_dict=1)
-
- grouped_employees = defaultdict(lambda: [])
-
- for employee_doc in employees_born_today:
- grouped_employees[employee_doc.get('company')].append(employee_doc)
-
- return grouped_employees
+ return employee_doc.get("user_id") or employee_doc.get("personal_email") or employee_doc.get("company_email")
def get_holiday_list_for_employee(employee, raise_exception=True):
if employee:
@@ -390,17 +301,40 @@ def get_holiday_list_for_employee(employee, raise_exception=True):
return holiday_list
-def is_holiday(employee, date=None, raise_exception=True):
- '''Returns True if given Employee has an holiday on the given date
- :param employee: Employee `name`
- :param date: Date to check. Will check for today if None'''
+def is_holiday(employee, date=None, raise_exception=True, only_non_weekly=False, with_description=False):
+ '''
+ Returns True if given Employee has an holiday on the given date
+ :param employee: Employee `name`
+ :param date: Date to check. Will check for today if None
+ :param raise_exception: Raise an exception if no holiday list found, default is True
+ :param only_non_weekly: Check only non-weekly holidays, default is False
+ '''
holiday_list = get_holiday_list_for_employee(employee, raise_exception)
if not date:
date = today()
- if holiday_list:
- return frappe.get_all('Holiday List', dict(name=holiday_list, holiday_date=date)) and True or False
+ if not holiday_list:
+ return False
+
+ filters = {
+ 'parent': holiday_list,
+ 'holiday_date': date
+ }
+ if only_non_weekly:
+ filters['weekly_off'] = False
+
+ holidays = frappe.get_all(
+ 'Holiday',
+ fields=['description'],
+ filters=filters,
+ pluck='description'
+ )
+
+ if with_description:
+ return len(holidays) > 0, holidays
+
+ return len(holidays) > 0
@frappe.whitelist()
def deactivate_sales_person(status = None, employee = None):
@@ -503,7 +437,6 @@ def get_children(doctype, parent=None, company=None, is_root=False, is_tree=Fals
return employees
-
def on_doctype_update():
frappe.db.add_index("Employee", ["lft", "rgt"])
diff --git a/erpnext/hr/doctype/employee/employee_reminders.py b/erpnext/hr/doctype/employee/employee_reminders.py
new file mode 100644
index 00000000000..2155c027a9b
--- /dev/null
+++ b/erpnext/hr/doctype/employee/employee_reminders.py
@@ -0,0 +1,247 @@
+# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+import frappe
+from frappe import _
+from frappe.utils import comma_sep, getdate, today, add_months, add_days
+from erpnext.hr.doctype.employee.employee import get_all_employee_emails, get_employee_email
+from erpnext.hr.utils import get_holidays_for_employee
+
+# -----------------
+# HOLIDAY REMINDERS
+# -----------------
+def send_reminders_in_advance_weekly():
+ to_send_in_advance = int(frappe.db.get_single_value("HR Settings", "send_holiday_reminders") or 1)
+ frequency = frappe.db.get_single_value("HR Settings", "frequency")
+ if not (to_send_in_advance and frequency == "Weekly"):
+ return
+
+ send_advance_holiday_reminders("Weekly")
+
+def send_reminders_in_advance_monthly():
+ to_send_in_advance = int(frappe.db.get_single_value("HR Settings", "send_holiday_reminders") or 1)
+ frequency = frappe.db.get_single_value("HR Settings", "frequency")
+ if not (to_send_in_advance and frequency == "Monthly"):
+ return
+
+ send_advance_holiday_reminders("Monthly")
+
+def send_advance_holiday_reminders(frequency):
+ """Send Holiday Reminders in Advance to Employees
+ `frequency` (str): 'Weekly' or 'Monthly'
+ """
+ if frequency == "Weekly":
+ start_date = getdate()
+ end_date = add_days(getdate(), 7)
+ elif frequency == "Monthly":
+ # Sent on 1st of every month
+ start_date = getdate()
+ end_date = add_months(getdate(), 1)
+ else:
+ return
+
+ employees = frappe.db.get_all('Employee', pluck='name')
+ for employee in employees:
+ holidays = get_holidays_for_employee(
+ employee,
+ start_date, end_date,
+ only_non_weekly=True,
+ raise_exception=False
+ )
+
+ if not (holidays is None):
+ send_holidays_reminder_in_advance(employee, holidays)
+
+def send_holidays_reminder_in_advance(employee, holidays):
+ employee_doc = frappe.get_doc('Employee', employee)
+ employee_email = get_employee_email(employee_doc)
+ frequency = frappe.db.get_single_value("HR Settings", "frequency")
+
+ email_header = _("Holidays this Month.") if frequency == "Monthly" else _("Holidays this Week.")
+ frappe.sendmail(
+ recipients=[employee_email],
+ subject=_("Upcoming Holidays Reminder"),
+ template="holiday_reminder",
+ args=dict(
+ reminder_text=_("Hey {}! This email is to remind you about the upcoming holidays.").format(employee_doc.get('first_name')),
+ message=_("Below is the list of upcoming holidays for you:"),
+ advance_holiday_reminder=True,
+ holidays=holidays,
+ frequency=frequency[:-2]
+ ),
+ header=email_header
+ )
+
+# ------------------
+# BIRTHDAY REMINDERS
+# ------------------
+def send_birthday_reminders():
+ """Send Employee birthday reminders if no 'Stop Birthday Reminders' is not set."""
+ to_send = int(frappe.db.get_single_value("HR Settings", "send_birthday_reminders") or 1)
+ if not to_send:
+ return
+
+ employees_born_today = get_employees_who_are_born_today()
+
+ for company, birthday_persons in employees_born_today.items():
+ employee_emails = get_all_employee_emails(company)
+ birthday_person_emails = [get_employee_email(doc) for doc in birthday_persons]
+ recipients = list(set(employee_emails) - set(birthday_person_emails))
+
+ reminder_text, message = get_birthday_reminder_text_and_message(birthday_persons)
+ send_birthday_reminder(recipients, reminder_text, birthday_persons, message)
+
+ if len(birthday_persons) > 1:
+ # special email for people sharing birthdays
+ for person in birthday_persons:
+ person_email = person["user_id"] or person["personal_email"] or person["company_email"]
+ others = [d for d in birthday_persons if d != person]
+ reminder_text, message = get_birthday_reminder_text_and_message(others)
+ send_birthday_reminder(person_email, reminder_text, others, message)
+
+def get_birthday_reminder_text_and_message(birthday_persons):
+ if len(birthday_persons) == 1:
+ birthday_person_text = birthday_persons[0]['name']
+ else:
+ # converts ["Jim", "Rim", "Dim"] to Jim, Rim & Dim
+ person_names = [d['name'] for d in birthday_persons]
+ birthday_person_text = comma_sep(person_names, frappe._("{0} & {1}"), False)
+
+ reminder_text = _("Today is {0}'s birthday 🎉").format(birthday_person_text)
+ message = _("A friendly reminder of an important date for our team.")
+ message += " "
+ message += _("Everyone, let’s congratulate {0} on their birthday.").format(birthday_person_text)
+
+ return reminder_text, message
+
+def send_birthday_reminder(recipients, reminder_text, birthday_persons, message):
+ frappe.sendmail(
+ recipients=recipients,
+ subject=_("Birthday Reminder"),
+ template="birthday_reminder",
+ args=dict(
+ reminder_text=reminder_text,
+ birthday_persons=birthday_persons,
+ message=message,
+ ),
+ header=_("Birthday Reminder 🎂")
+ )
+
+def get_employees_who_are_born_today():
+ """Get all employee born today & group them based on their company"""
+ return get_employees_having_an_event_today("birthday")
+
+def get_employees_having_an_event_today(event_type):
+ """Get all employee who have `event_type` today
+ & group them based on their company. `event_type`
+ can be `birthday` or `work_anniversary`"""
+
+ from collections import defaultdict
+
+ # Set column based on event type
+ if event_type == 'birthday':
+ condition_column = 'date_of_birth'
+ elif event_type == 'work_anniversary':
+ condition_column = 'date_of_joining'
+ else:
+ return
+
+ employees_born_today = frappe.db.multisql({
+ "mariadb": f"""
+ SELECT `personal_email`, `company`, `company_email`, `user_id`, `employee_name` AS 'name', `image`, `date_of_joining`
+ FROM `tabEmployee`
+ WHERE
+ DAY({condition_column}) = DAY(%(today)s)
+ AND
+ MONTH({condition_column}) = MONTH(%(today)s)
+ AND
+ `status` = 'Active'
+ """,
+ "postgres": f"""
+ SELECT "personal_email", "company", "company_email", "user_id", "employee_name" AS 'name', "image"
+ FROM "tabEmployee"
+ WHERE
+ DATE_PART('day', {condition_column}) = date_part('day', %(today)s)
+ AND
+ DATE_PART('month', {condition_column}) = date_part('month', %(today)s)
+ AND
+ "status" = 'Active'
+ """,
+ }, dict(today=today(), condition_column=condition_column), as_dict=1)
+
+ grouped_employees = defaultdict(lambda: [])
+
+ for employee_doc in employees_born_today:
+ grouped_employees[employee_doc.get('company')].append(employee_doc)
+
+ return grouped_employees
+
+
+# --------------------------
+# WORK ANNIVERSARY REMINDERS
+# --------------------------
+def send_work_anniversary_reminders():
+ """Send Employee Work Anniversary Reminders if 'Send Work Anniversary Reminders' is checked"""
+ to_send = int(frappe.db.get_single_value("HR Settings", "send_work_anniversary_reminders") or 1)
+ if not to_send:
+ return
+
+ employees_joined_today = get_employees_having_an_event_today("work_anniversary")
+
+ for company, anniversary_persons in employees_joined_today.items():
+ employee_emails = get_all_employee_emails(company)
+ anniversary_person_emails = [get_employee_email(doc) for doc in anniversary_persons]
+ recipients = list(set(employee_emails) - set(anniversary_person_emails))
+
+ reminder_text, message = get_work_anniversary_reminder_text_and_message(anniversary_persons)
+ send_work_anniversary_reminder(recipients, reminder_text, anniversary_persons, message)
+
+ if len(anniversary_persons) > 1:
+ # email for people sharing work anniversaries
+ for person in anniversary_persons:
+ person_email = person["user_id"] or person["personal_email"] or person["company_email"]
+ others = [d for d in anniversary_persons if d != person]
+ reminder_text, message = get_work_anniversary_reminder_text_and_message(others)
+ send_work_anniversary_reminder(person_email, reminder_text, others, message)
+
+def get_work_anniversary_reminder_text_and_message(anniversary_persons):
+ if len(anniversary_persons) == 1:
+ anniversary_person = anniversary_persons[0]['name']
+ persons_name = anniversary_person
+ # Number of years completed at the company
+ completed_years = getdate().year - anniversary_persons[0]['date_of_joining'].year
+ anniversary_person += f" completed {completed_years} years"
+ else:
+ person_names_with_years = []
+ names = []
+ for person in anniversary_persons:
+ person_text = person['name']
+ names.append(person_text)
+ # Number of years completed at the company
+ completed_years = getdate().year - person['date_of_joining'].year
+ person_text += f" completed {completed_years} years"
+ person_names_with_years.append(person_text)
+
+ # converts ["Jim", "Rim", "Dim"] to Jim, Rim & Dim
+ anniversary_person = comma_sep(person_names_with_years, frappe._("{0} & {1}"), False)
+ persons_name = comma_sep(names, frappe._("{0} & {1}"), False)
+
+ reminder_text = _("Today {0} at our Company! 🎉").format(anniversary_person)
+ message = _("A friendly reminder of an important date for our team.")
+ message += " "
+ message += _("Everyone, let’s congratulate {0} on their work anniversary!").format(persons_name)
+
+ return reminder_text, message
+
+def send_work_anniversary_reminder(recipients, reminder_text, anniversary_persons, message):
+ frappe.sendmail(
+ recipients=recipients,
+ subject=_("Work Anniversary Reminder"),
+ template="anniversary_reminder",
+ args=dict(
+ reminder_text=reminder_text,
+ anniversary_persons=anniversary_persons,
+ message=message,
+ ),
+ header=_("🎊️🎊️ Work Anniversary Reminder 🎊️🎊️")
+ )
diff --git a/erpnext/hr/doctype/employee/test_employee.py b/erpnext/hr/doctype/employee/test_employee.py
index 8fc7cf19343..5feb6de8f2b 100644
--- a/erpnext/hr/doctype/employee/test_employee.py
+++ b/erpnext/hr/doctype/employee/test_employee.py
@@ -1,7 +1,5 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
-from __future__ import unicode_literals
-
import frappe
import erpnext
@@ -12,29 +10,6 @@ from erpnext.hr.doctype.employee.employee import InactiveEmployeeStatusError
test_records = frappe.get_test_records('Employee')
class TestEmployee(unittest.TestCase):
- def test_birthday_reminders(self):
- employee = frappe.get_doc("Employee", frappe.db.sql_list("select name from tabEmployee limit 1")[0])
- employee.date_of_birth = "1992" + frappe.utils.nowdate()[4:]
- employee.company_email = "test@example.com"
- employee.company = "_Test Company"
- employee.save()
-
- from erpnext.hr.doctype.employee.employee import get_employees_who_are_born_today, send_birthday_reminders
-
- employees_born_today = get_employees_who_are_born_today()
- self.assertTrue(employees_born_today.get("_Test Company"))
-
- frappe.db.sql("delete from `tabEmail Queue`")
-
- hr_settings = frappe.get_doc("HR Settings", "HR Settings")
- hr_settings.stop_birthday_reminders = 0
- hr_settings.save()
-
- send_birthday_reminders()
-
- email_queue = frappe.db.sql("""select * from `tabEmail Queue`""", as_dict=True)
- self.assertTrue("Subject: Birthday Reminder" in email_queue[0].message)
-
def test_employee_status_left(self):
employee1 = make_employee("test_employee_1@company.com")
employee2 = make_employee("test_employee_2@company.com")
diff --git a/erpnext/hr/doctype/employee/test_employee_reminders.py b/erpnext/hr/doctype/employee/test_employee_reminders.py
new file mode 100644
index 00000000000..7e560f512d1
--- /dev/null
+++ b/erpnext/hr/doctype/employee/test_employee_reminders.py
@@ -0,0 +1,173 @@
+# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+import frappe
+import unittest
+
+from frappe.utils import getdate
+from datetime import timedelta
+from erpnext.hr.doctype.employee.test_employee import make_employee
+from erpnext.hr.doctype.hr_settings.hr_settings import set_proceed_with_frequency_change
+
+
+class TestEmployeeReminders(unittest.TestCase):
+ @classmethod
+ def setUpClass(cls):
+ from erpnext.hr.doctype.holiday_list.test_holiday_list import make_holiday_list
+
+ # Create a test holiday list
+ test_holiday_dates = cls.get_test_holiday_dates()
+ test_holiday_list = make_holiday_list(
+ 'TestHolidayRemindersList',
+ holiday_dates=[
+ {'holiday_date': test_holiday_dates[0], 'description': 'test holiday1'},
+ {'holiday_date': test_holiday_dates[1], 'description': 'test holiday2'},
+ {'holiday_date': test_holiday_dates[2], 'description': 'test holiday3', 'weekly_off': 1},
+ {'holiday_date': test_holiday_dates[3], 'description': 'test holiday4'},
+ {'holiday_date': test_holiday_dates[4], 'description': 'test holiday5'},
+ {'holiday_date': test_holiday_dates[5], 'description': 'test holiday6'},
+ ],
+ from_date=getdate()-timedelta(days=10),
+ to_date=getdate()+timedelta(weeks=5)
+ )
+
+ # Create a test employee
+ test_employee = frappe.get_doc(
+ 'Employee',
+ make_employee('test@gopher.io', company="_Test Company")
+ )
+
+ # Attach the holiday list to employee
+ test_employee.holiday_list = test_holiday_list.name
+ test_employee.save()
+
+ # Attach to class
+ cls.test_employee = test_employee
+ cls.test_holiday_dates = test_holiday_dates
+
+ @classmethod
+ def get_test_holiday_dates(cls):
+ today_date = getdate()
+ return [
+ today_date,
+ today_date-timedelta(days=4),
+ today_date-timedelta(days=3),
+ today_date+timedelta(days=1),
+ today_date+timedelta(days=3),
+ today_date+timedelta(weeks=3)
+ ]
+
+ def setUp(self):
+ # Clear Email Queue
+ frappe.db.sql("delete from `tabEmail Queue`")
+
+ def test_is_holiday(self):
+ from erpnext.hr.doctype.employee.employee import is_holiday
+
+ self.assertTrue(is_holiday(self.test_employee.name))
+ self.assertTrue(is_holiday(self.test_employee.name, date=self.test_holiday_dates[1]))
+ self.assertFalse(is_holiday(self.test_employee.name, date=getdate()-timedelta(days=1)))
+
+ # Test weekly_off holidays
+ self.assertTrue(is_holiday(self.test_employee.name, date=self.test_holiday_dates[2]))
+ self.assertFalse(is_holiday(self.test_employee.name, date=self.test_holiday_dates[2], only_non_weekly=True))
+
+ # Test with descriptions
+ has_holiday, descriptions = is_holiday(self.test_employee.name, with_description=True)
+ self.assertTrue(has_holiday)
+ self.assertTrue('test holiday1' in descriptions)
+
+ def test_birthday_reminders(self):
+ employee = frappe.get_doc("Employee", frappe.db.sql_list("select name from tabEmployee limit 1")[0])
+ employee.date_of_birth = "1992" + frappe.utils.nowdate()[4:]
+ employee.company_email = "test@example.com"
+ employee.company = "_Test Company"
+ employee.save()
+
+ from erpnext.hr.doctype.employee.employee_reminders import get_employees_who_are_born_today, send_birthday_reminders
+
+ employees_born_today = get_employees_who_are_born_today()
+ self.assertTrue(employees_born_today.get("_Test Company"))
+
+ hr_settings = frappe.get_doc("HR Settings", "HR Settings")
+ hr_settings.send_birthday_reminders = 1
+ hr_settings.save()
+
+ send_birthday_reminders()
+
+ email_queue = frappe.db.sql("""select * from `tabEmail Queue`""", as_dict=True)
+ self.assertTrue("Subject: Birthday Reminder" in email_queue[0].message)
+
+ def test_work_anniversary_reminders(self):
+ employee = frappe.get_doc("Employee", frappe.db.sql_list("select name from tabEmployee limit 1")[0])
+ employee.date_of_joining = "1998" + frappe.utils.nowdate()[4:]
+ employee.company_email = "test@example.com"
+ employee.company = "_Test Company"
+ employee.save()
+
+ from erpnext.hr.doctype.employee.employee_reminders import get_employees_having_an_event_today, send_work_anniversary_reminders
+
+ employees_having_work_anniversary = get_employees_having_an_event_today('work_anniversary')
+ self.assertTrue(employees_having_work_anniversary.get("_Test Company"))
+
+ hr_settings = frappe.get_doc("HR Settings", "HR Settings")
+ hr_settings.send_work_anniversary_reminders = 1
+ hr_settings.save()
+
+ send_work_anniversary_reminders()
+
+ email_queue = frappe.db.sql("""select * from `tabEmail Queue`""", as_dict=True)
+ self.assertTrue("Subject: Work Anniversary Reminder" in email_queue[0].message)
+
+ def test_send_holidays_reminder_in_advance(self):
+ from erpnext.hr.utils import get_holidays_for_employee
+ from erpnext.hr.doctype.employee.employee_reminders import send_holidays_reminder_in_advance
+
+ # Get HR settings and enable advance holiday reminders
+ hr_settings = frappe.get_doc("HR Settings", "HR Settings")
+ hr_settings.send_holiday_reminders = 1
+ set_proceed_with_frequency_change()
+ hr_settings.frequency = 'Weekly'
+ hr_settings.save()
+
+ holidays = get_holidays_for_employee(
+ self.test_employee.get('name'),
+ getdate(), getdate() + timedelta(days=3),
+ only_non_weekly=True,
+ raise_exception=False
+ )
+
+ send_holidays_reminder_in_advance(
+ self.test_employee.get('name'),
+ holidays
+ )
+
+ email_queue = frappe.db.sql("""select * from `tabEmail Queue`""", as_dict=True)
+ self.assertEqual(len(email_queue), 1)
+
+ def test_advance_holiday_reminders_monthly(self):
+ from erpnext.hr.doctype.employee.employee_reminders import send_reminders_in_advance_monthly
+ # Get HR settings and enable advance holiday reminders
+ hr_settings = frappe.get_doc("HR Settings", "HR Settings")
+ hr_settings.send_holiday_reminders = 1
+ set_proceed_with_frequency_change()
+ hr_settings.frequency = 'Monthly'
+ hr_settings.save()
+
+ send_reminders_in_advance_monthly()
+
+ email_queue = frappe.db.sql("""select * from `tabEmail Queue`""", as_dict=True)
+ self.assertTrue(len(email_queue) > 0)
+
+ def test_advance_holiday_reminders_weekly(self):
+ from erpnext.hr.doctype.employee.employee_reminders import send_reminders_in_advance_weekly
+ # Get HR settings and enable advance holiday reminders
+ hr_settings = frappe.get_doc("HR Settings", "HR Settings")
+ hr_settings.send_holiday_reminders = 1
+ hr_settings.frequency = 'Weekly'
+ hr_settings.save()
+
+ send_reminders_in_advance_weekly()
+
+ email_queue = frappe.db.sql("""select * from `tabEmail Queue`""", as_dict=True)
+ self.assertTrue(len(email_queue) > 0)
diff --git a/erpnext/hr/doctype/hr_settings/hr_settings.json b/erpnext/hr/doctype/hr_settings/hr_settings.json
index 2396a8eee92..8aa3c0ca9f1 100644
--- a/erpnext/hr/doctype/hr_settings/hr_settings.json
+++ b/erpnext/hr/doctype/hr_settings/hr_settings.json
@@ -11,8 +11,14 @@
"emp_created_by",
"column_break_4",
"standard_working_hours",
- "stop_birthday_reminders",
"expense_approver_mandatory_in_expense_claim",
+ "reminders_section",
+ "send_birthday_reminders",
+ "column_break_9",
+ "send_work_anniversary_reminders",
+ "column_break_11",
+ "send_holiday_reminders",
+ "frequency",
"leave_settings",
"send_leave_notification",
"leave_approval_notification_template",
@@ -50,13 +56,6 @@
"fieldname": "column_break_4",
"fieldtype": "Column Break"
},
- {
- "default": "0",
- "description": "Don't send employee birthday reminders",
- "fieldname": "stop_birthday_reminders",
- "fieldtype": "Check",
- "label": "Stop Birthday Reminders"
- },
{
"default": "1",
"fieldname": "expense_approver_mandatory_in_expense_claim",
@@ -142,13 +141,53 @@
"fieldname": "standard_working_hours",
"fieldtype": "Int",
"label": "Standard Working Hours"
+ },
+ {
+ "collapsible": 1,
+ "fieldname": "reminders_section",
+ "fieldtype": "Section Break",
+ "label": "Reminders"
+ },
+ {
+ "default": "1",
+ "fieldname": "send_holiday_reminders",
+ "fieldtype": "Check",
+ "label": "Holidays"
+ },
+ {
+ "default": "1",
+ "fieldname": "send_work_anniversary_reminders",
+ "fieldtype": "Check",
+ "label": "Work Anniversaries "
+ },
+ {
+ "default": "Weekly",
+ "depends_on": "eval:doc.send_holiday_reminders",
+ "fieldname": "frequency",
+ "fieldtype": "Select",
+ "label": "Set the frequency for holiday reminders",
+ "options": "Weekly\nMonthly"
+ },
+ {
+ "default": "1",
+ "fieldname": "send_birthday_reminders",
+ "fieldtype": "Check",
+ "label": "Birthdays"
+ },
+ {
+ "fieldname": "column_break_9",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "column_break_11",
+ "fieldtype": "Column Break"
}
],
"icon": "fa fa-cog",
"idx": 1,
"issingle": 1,
"links": [],
- "modified": "2021-05-11 10:52:56.192773",
+ "modified": "2021-08-24 14:54:12.834162",
"modified_by": "Administrator",
"module": "HR",
"name": "HR Settings",
diff --git a/erpnext/hr/doctype/hr_settings/hr_settings.py b/erpnext/hr/doctype/hr_settings/hr_settings.py
index c99df269cc9..a47409363c7 100644
--- a/erpnext/hr/doctype/hr_settings/hr_settings.py
+++ b/erpnext/hr/doctype/hr_settings/hr_settings.py
@@ -1,17 +1,79 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
-from __future__ import unicode_literals
import frappe
+
from frappe.model.document import Document
+from frappe.utils import format_date
+
+# Wether to proceed with frequency change
+PROCEED_WITH_FREQUENCY_CHANGE = False
class HRSettings(Document):
def validate(self):
self.set_naming_series()
+ # Based on proceed flag
+ global PROCEED_WITH_FREQUENCY_CHANGE
+ if not PROCEED_WITH_FREQUENCY_CHANGE:
+ self.validate_frequency_change()
+ PROCEED_WITH_FREQUENCY_CHANGE = False
+
def set_naming_series(self):
from erpnext.setup.doctype.naming_series.naming_series import set_by_naming_series
set_by_naming_series("Employee", "employee_number",
self.get("emp_created_by")=="Naming Series", hide_name_field=True)
+
+ def validate_frequency_change(self):
+ weekly_job, monthly_job = None, None
+
+ try:
+ weekly_job = frappe.get_doc(
+ 'Scheduled Job Type',
+ 'employee_reminders.send_reminders_in_advance_weekly'
+ )
+
+ monthly_job = frappe.get_doc(
+ 'Scheduled Job Type',
+ 'employee_reminders.send_reminders_in_advance_monthly'
+ )
+ except frappe.DoesNotExistError:
+ return
+
+ next_weekly_trigger = weekly_job.get_next_execution()
+ next_monthly_trigger = monthly_job.get_next_execution()
+
+ if self.freq_changed_from_monthly_to_weekly():
+ if next_monthly_trigger < next_weekly_trigger:
+ self.show_freq_change_warning(next_monthly_trigger, next_weekly_trigger)
+
+ elif self.freq_changed_from_weekly_to_monthly():
+ if next_monthly_trigger > next_weekly_trigger:
+ self.show_freq_change_warning(next_weekly_trigger, next_monthly_trigger)
+
+ def freq_changed_from_weekly_to_monthly(self):
+ return self.has_value_changed("frequency") and self.frequency == "Monthly"
+
+ def freq_changed_from_monthly_to_weekly(self):
+ return self.has_value_changed("frequency") and self.frequency == "Weekly"
+
+ def show_freq_change_warning(self, from_date, to_date):
+ from_date = frappe.bold(format_date(from_date))
+ to_date = frappe.bold(format_date(to_date))
+ frappe.msgprint(
+ msg=frappe._('Employees will miss holiday reminders from {} until {}. Do you want to proceed with this change?').format(from_date, to_date),
+ title='Confirm change in Frequency',
+ primary_action={
+ 'label': frappe._('Yes, Proceed'),
+ 'client_action': 'erpnext.proceed_save_with_reminders_frequency_change'
+ },
+ raise_exception=frappe.ValidationError
+ )
+
+@frappe.whitelist()
+def set_proceed_with_frequency_change():
+ '''Enables proceed with frequency change'''
+ global PROCEED_WITH_FREQUENCY_CHANGE
+ PROCEED_WITH_FREQUENCY_CHANGE = True
diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.py b/erpnext/hr/doctype/upload_attendance/upload_attendance.py
index 674c8e3eb45..9c765d73716 100644
--- a/erpnext/hr/doctype/upload_attendance/upload_attendance.py
+++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.py
@@ -10,7 +10,7 @@ from frappe import _
from frappe.utils.csvutils import UnicodeWriter
from frappe.model.document import Document
from erpnext.hr.doctype.employee.employee import get_holiday_list_for_employee
-from erpnext.hr.utils import get_holidays_for_employee
+from erpnext.hr.utils import get_holiday_dates_for_employee
class UploadAttendance(Document):
pass
@@ -94,7 +94,7 @@ def get_holidays_for_employees(employees, from_date, to_date):
holidays = {}
for employee in employees:
holiday_list = get_holiday_list_for_employee(employee)
- holiday = get_holidays_for_employee(employee, getdate(from_date), getdate(to_date))
+ holiday = get_holiday_dates_for_employee(employee, getdate(from_date), getdate(to_date))
if holiday_list not in holidays:
holidays[holiday_list] = holiday
diff --git a/erpnext/hr/utils.py b/erpnext/hr/utils.py
index a1026ce055b..15b237d93cd 100644
--- a/erpnext/hr/utils.py
+++ b/erpnext/hr/utils.py
@@ -335,21 +335,44 @@ def get_sal_slip_total_benefit_given(employee, payroll_period, component=False):
total_given_benefit_amount = sum_of_given_benefit[0].total_amount
return total_given_benefit_amount
-def get_holidays_for_employee(employee, start_date, end_date):
- holiday_list = get_holiday_list_for_employee(employee)
+def get_holiday_dates_for_employee(employee, start_date, end_date):
+ """return a list of holiday dates for the given employee between start_date and end_date"""
+ # return only date
+ holidays = get_holidays_for_employee(employee, start_date, end_date)
+
+ return [cstr(h.holiday_date) for h in holidays]
- holidays = frappe.db.sql_list('''select holiday_date from `tabHoliday`
- where
- parent=%(holiday_list)s
- and holiday_date >= %(start_date)s
- and holiday_date <= %(end_date)s''', {
- "holiday_list": holiday_list,
- "start_date": start_date,
- "end_date": end_date
- })
- holidays = [cstr(i) for i in holidays]
+def get_holidays_for_employee(employee, start_date, end_date, raise_exception=True, only_non_weekly=False):
+ """Get Holidays for a given employee
+ `employee` (str)
+ `start_date` (str or datetime)
+ `end_date` (str or datetime)
+ `raise_exception` (bool)
+ `only_non_weekly` (bool)
+
+ return: list of dicts with `holiday_date` and `description`
+ """
+ holiday_list = get_holiday_list_for_employee(employee, raise_exception=raise_exception)
+
+ if not holiday_list:
+ return []
+
+ filters = {
+ 'parent': holiday_list,
+ 'holiday_date': ('between', [start_date, end_date])
+ }
+
+ if only_non_weekly:
+ filters['weekly_off'] = False
+
+ holidays = frappe.get_all(
+ 'Holiday',
+ fields=['description', 'holiday_date'],
+ filters=filters
+ )
+
return holidays
@erpnext.allow_regional
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index b86c236a7fb..bf0446bb686 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -275,6 +275,7 @@ erpnext.patches.v13_0.remove_attribute_field_from_item_variant_setting
erpnext.patches.v13_0.germany_make_custom_fields
erpnext.patches.v13_0.germany_fill_debtor_creditor_number
erpnext.patches.v13_0.set_pos_closing_as_failed
+erpnext.patches.v13_0.rename_stop_to_send_birthday_reminders
execute:frappe.rename_doc("Workspace", "Loan Management", "Loans", force=True)
erpnext.patches.v13_0.update_timesheet_changes
erpnext.patches.v13_0.add_doctype_to_sla #14-06-2021
diff --git a/erpnext/patches/v13_0/rename_stop_to_send_birthday_reminders.py b/erpnext/patches/v13_0/rename_stop_to_send_birthday_reminders.py
new file mode 100644
index 00000000000..1787a560254
--- /dev/null
+++ b/erpnext/patches/v13_0/rename_stop_to_send_birthday_reminders.py
@@ -0,0 +1,23 @@
+import frappe
+from frappe.model.utils.rename_field import rename_field
+
+def execute():
+ frappe.reload_doc('hr', 'doctype', 'hr_settings')
+
+ try:
+ # Rename the field
+ rename_field('HR Settings', 'stop_birthday_reminders', 'send_birthday_reminders')
+
+ # Reverse the value
+ old_value = frappe.db.get_single_value('HR Settings', 'send_birthday_reminders')
+
+ frappe.db.set_value(
+ 'HR Settings',
+ 'HR Settings',
+ 'send_birthday_reminders',
+ 1 if old_value == 0 else 0
+ )
+
+ except Exception as e:
+ if e.args[0] != 1054:
+ raise
\ No newline at end of file
diff --git a/erpnext/payroll/doctype/employee_benefit_application/employee_benefit_application.py b/erpnext/payroll/doctype/employee_benefit_application/employee_benefit_application.py
index c7fbb06b100..a1cde08a74c 100644
--- a/erpnext/payroll/doctype/employee_benefit_application/employee_benefit_application.py
+++ b/erpnext/payroll/doctype/employee_benefit_application/employee_benefit_application.py
@@ -9,7 +9,7 @@ from frappe.utils import date_diff, getdate, rounded, add_days, cstr, cint, flt
from frappe.model.document import Document
from erpnext.payroll.doctype.payroll_period.payroll_period import get_payroll_period_days, get_period_factor
from erpnext.payroll.doctype.salary_structure_assignment.salary_structure_assignment import get_assigned_salary_structure
-from erpnext.hr.utils import get_sal_slip_total_benefit_given, get_holidays_for_employee, get_previous_claimed_amount, validate_active_employee
+from erpnext.hr.utils import get_sal_slip_total_benefit_given, get_holiday_dates_for_employee, get_previous_claimed_amount, validate_active_employee
class EmployeeBenefitApplication(Document):
def validate(self):
@@ -139,7 +139,7 @@ def get_max_benefits_remaining(employee, on_date, payroll_period):
# Then the sum multiply with the no of lwp in that period
# Include that amount to the prev_sal_slip_flexi_total to get the actual
if have_depends_on_payment_days and per_day_amount_total > 0:
- holidays = get_holidays_for_employee(employee, payroll_period_obj.start_date, on_date)
+ holidays = get_holiday_dates_for_employee(employee, payroll_period_obj.start_date, on_date)
working_days = date_diff(on_date, payroll_period_obj.start_date) + 1
leave_days = calculate_lwp(employee, payroll_period_obj.start_date, holidays, working_days)
leave_days_amount = leave_days * per_day_amount_total
diff --git a/erpnext/payroll/doctype/payroll_period/payroll_period.py b/erpnext/payroll/doctype/payroll_period/payroll_period.py
index ef3a6cc0061..66dec075d8f 100644
--- a/erpnext/payroll/doctype/payroll_period/payroll_period.py
+++ b/erpnext/payroll/doctype/payroll_period/payroll_period.py
@@ -7,7 +7,7 @@ import frappe
from frappe import _
from frappe.utils import date_diff, getdate, formatdate, cint, month_diff, flt, add_months
from frappe.model.document import Document
-from erpnext.hr.utils import get_holidays_for_employee
+from erpnext.hr.utils import get_holiday_dates_for_employee
class PayrollPeriod(Document):
def validate(self):
@@ -65,7 +65,7 @@ def get_payroll_period_days(start_date, end_date, employee, company=None):
actual_no_of_days = date_diff(getdate(payroll_period[0][2]), getdate(payroll_period[0][1])) + 1
working_days = actual_no_of_days
if not cint(frappe.db.get_value("Payroll Settings", None, "include_holidays_in_total_working_days")):
- holidays = get_holidays_for_employee(employee, getdate(payroll_period[0][1]), getdate(payroll_period[0][2]))
+ holidays = get_holiday_dates_for_employee(employee, getdate(payroll_period[0][1]), getdate(payroll_period[0][2]))
working_days -= len(holidays)
return payroll_period[0][0], working_days, actual_no_of_days
return False, False, False
diff --git a/erpnext/payroll/doctype/salary_slip/salary_slip.py b/erpnext/payroll/doctype/salary_slip/salary_slip.py
index 5f5fdd5c830..6325351debc 100644
--- a/erpnext/payroll/doctype/salary_slip/salary_slip.py
+++ b/erpnext/payroll/doctype/salary_slip/salary_slip.py
@@ -11,6 +11,7 @@ from frappe.model.naming import make_autoname
from frappe import msgprint, _
from erpnext.payroll.doctype.payroll_entry.payroll_entry import get_start_end_dates
from erpnext.hr.doctype.employee.employee import get_holiday_list_for_employee
+from erpnext.hr.utils import get_holiday_dates_for_employee
from erpnext.utilities.transaction_base import TransactionBase
from frappe.utils.background_jobs import enqueue
from erpnext.payroll.doctype.additional_salary.additional_salary import get_additional_salaries
@@ -337,20 +338,7 @@ class SalarySlip(TransactionBase):
return payment_days
def get_holidays_for_employee(self, start_date, end_date):
- holiday_list = get_holiday_list_for_employee(self.employee)
- holidays = frappe.db.sql_list('''select holiday_date from `tabHoliday`
- where
- parent=%(holiday_list)s
- and holiday_date >= %(start_date)s
- and holiday_date <= %(end_date)s''', {
- "holiday_list": holiday_list,
- "start_date": start_date,
- "end_date": end_date
- })
-
- holidays = [cstr(i) for i in holidays]
-
- return holidays
+ return get_holiday_dates_for_employee(self.employee, start_date, end_date)
def calculate_lwp_or_ppl_based_on_leave_application(self, holidays, working_days):
lwp = 0
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index f240b8ca91f..9caf1defe97 100755
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -82,6 +82,17 @@ $.extend(erpnext, {
});
frappe.set_route('Form','Journal Entry', journal_entry.name);
});
+ },
+
+ proceed_save_with_reminders_frequency_change: () => {
+ frappe.ui.hide_open_dialog();
+
+ frappe.call({
+ method: 'erpnext.hr.doctype.hr_settings.hr_settings.set_proceed_with_frequency_change',
+ callback: () => {
+ cur_frm.save();
+ }
+ });
}
});
diff --git a/erpnext/templates/emails/anniversary_reminder.html b/erpnext/templates/emails/anniversary_reminder.html
new file mode 100644
index 00000000000..ac9f7e4993a
--- /dev/null
+++ b/erpnext/templates/emails/anniversary_reminder.html
@@ -0,0 +1,25 @@
+
+
+ {% for person in anniversary_persons %}
+ {% if person.image %}
+
+
+ {% else %}
+
+ {{ frappe.utils.get_abbr(person.name) }}
+
+ {% endif %}
+ {% endfor %}
+
+
+ {{ reminder_text }}
+
{{ message }}
+
+
\ No newline at end of file
diff --git a/erpnext/templates/emails/holiday_reminder.html b/erpnext/templates/emails/holiday_reminder.html
new file mode 100644
index 00000000000..e38d27bf8bc
--- /dev/null
+++ b/erpnext/templates/emails/holiday_reminder.html
@@ -0,0 +1,16 @@
+
+ {{ reminder_text }}
+
{{ message }}
+
+
+{% if advance_holiday_reminder %}
+ {% if holidays | len > 0 %}
+
+ {% for holiday in holidays %}
+
You don't have no upcoming holidays this {{ frequency }}.
+ {% endif %}
+{% endif %}
From 7c957d72b362fbe9f74b5bee7409c7fb0fa33773 Mon Sep 17 00:00:00 2001
From: Pruthvi Patel
Date: Tue, 24 Aug 2021 21:24:25 +0530
Subject: [PATCH 68/87] perf: reduce number of queries to validate selling
price (#26225)
* perf: reduce number of queries to validate selling price
* fix: improved flow and formatting
* fix: improve condition and use of `as_dict`
Co-authored-by: Sagar Vora
---
erpnext/controllers/selling_controller.py | 112 ++++++++++++++++------
1 file changed, 84 insertions(+), 28 deletions(-)
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index da2765deded..fc2cc97e0a5 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, flt, cstr, get_link_to_form, nowtime
-from frappe import _, throw
+from frappe import _, bold, throw
from erpnext.stock.get_item_details import get_bin_details
from erpnext.stock.utils import get_incoming_rate
from erpnext.stock.get_item_details import get_conversion_factor
@@ -16,7 +16,6 @@ from erpnext.controllers.stock_controller import StockController
from erpnext.controllers.sales_and_purchase_return import get_rate_for_return
class SellingController(StockController):
-
def get_feed(self):
return _("To {0} | {1} {2}").format(self.customer_name, self.currency,
self.grand_total)
@@ -169,39 +168,96 @@ class SellingController(StockController):
def validate_selling_price(self):
def throw_message(idx, item_name, rate, ref_rate_field):
- bold_net_rate = frappe.bold("net rate")
- msg = (_("""Row #{}: Selling rate for item {} is lower than its {}. Selling {} should be atleast {}""")
- .format(idx, frappe.bold(item_name), frappe.bold(ref_rate_field), bold_net_rate, frappe.bold(rate)))
- msg += "
"
- msg += (_("""You can alternatively disable selling price validation in {} to bypass this validation.""")
- .format(get_link_to_form("Selling Settings", "Selling Settings")))
- frappe.throw(msg, title=_("Invalid Selling Price"))
+ throw(_("""Row #{0}: Selling rate for item {1} is lower than its {2}.
+ Selling {3} should be atleast {4}.
Alternatively,
+ you can disable selling price validation in {5} to bypass
+ this validation.""").format(
+ idx,
+ bold(item_name),
+ bold(ref_rate_field),
+ bold("net rate"),
+ bold(rate),
+ get_link_to_form("Selling Settings", "Selling Settings"),
+ ), title=_("Invalid Selling Price"))
- if not frappe.db.get_single_value("Selling Settings", "validate_selling_price"):
- return
- if hasattr(self, "is_return") and self.is_return:
+ if (
+ self.get("is_return")
+ or not frappe.db.get_single_value("Selling Settings", "validate_selling_price")
+ ):
return
- for it in self.get("items"):
- if not it.item_code:
+ is_internal_customer = self.get('is_internal_customer')
+ valuation_rate_map = {}
+
+ for item in self.items:
+ if not item.item_code:
continue
- last_purchase_rate, is_stock_item = frappe.get_cached_value("Item", it.item_code, ["last_purchase_rate", "is_stock_item"])
- last_purchase_rate_in_sales_uom = last_purchase_rate * (it.conversion_factor or 1)
- if flt(it.base_net_rate) < flt(last_purchase_rate_in_sales_uom):
- throw_message(it.idx, frappe.bold(it.item_name), last_purchase_rate_in_sales_uom, "last purchase rate")
+ last_purchase_rate, is_stock_item = frappe.get_cached_value(
+ "Item", item.item_code, ("last_purchase_rate", "is_stock_item")
+ )
- last_valuation_rate = frappe.db.sql("""
- SELECT valuation_rate FROM `tabStock Ledger Entry` WHERE item_code = %s
- AND warehouse = %s AND valuation_rate > 0
- ORDER BY posting_date DESC, posting_time DESC, creation DESC LIMIT 1
- """, (it.item_code, it.warehouse))
- if last_valuation_rate:
- last_valuation_rate_in_sales_uom = last_valuation_rate[0][0] * (it.conversion_factor or 1)
- if is_stock_item and flt(it.base_net_rate) < flt(last_valuation_rate_in_sales_uom) \
- and not self.get('is_internal_customer'):
- throw_message(it.idx, frappe.bold(it.item_name), last_valuation_rate_in_sales_uom, "valuation rate")
+ last_purchase_rate_in_sales_uom = (
+ last_purchase_rate * (item.conversion_factor or 1)
+ )
+ if flt(item.base_net_rate) < flt(last_purchase_rate_in_sales_uom):
+ throw_message(
+ item.idx,
+ item.item_name,
+ last_purchase_rate_in_sales_uom,
+ "last purchase rate"
+ )
+
+ if is_internal_customer or not is_stock_item:
+ continue
+
+ valuation_rate_map[(item.item_code, item.warehouse)] = None
+
+ if not valuation_rate_map:
+ return
+
+ or_conditions = (
+ f"""(item_code = {frappe.db.escape(valuation_rate[0])}
+ and warehouse = {frappe.db.escape(valuation_rate[1])})"""
+ for valuation_rate in valuation_rate_map
+ )
+
+ valuation_rates = frappe.db.sql(f"""
+ select
+ item_code, warehouse, valuation_rate
+ from
+ `tabBin`
+ where
+ ({" or ".join(or_conditions)})
+ and valuation_rate > 0
+ """, as_dict=True)
+
+ for rate in valuation_rates:
+ valuation_rate_map[(rate.item_code, rate.warehouse)] = rate.valuation_rate
+
+ for item in self.items:
+ if not item.item_code:
+ continue
+
+ last_valuation_rate = valuation_rate_map.get(
+ (item.item_code, item.warehouse)
+ )
+
+ if not last_valuation_rate:
+ continue
+
+ last_valuation_rate_in_sales_uom = (
+ last_valuation_rate * (item.conversion_factor or 1)
+ )
+
+ if flt(item.base_net_rate) < flt(last_valuation_rate_in_sales_uom):
+ throw_message(
+ item.idx,
+ item.item_name,
+ last_valuation_rate_in_sales_uom,
+ "valuation rate"
+ )
def get_item_list(self):
il = []
From c30fb04e960c944cda3ea84865f2563bc50b29ed Mon Sep 17 00:00:00 2001
From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Date: Tue, 24 Aug 2021 21:57:25 +0530
Subject: [PATCH 69/87] fix(minor): Update GSTR-1 json version (#27074)
---
erpnext/regional/report/gstr_1/gstr_1.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py
index 4b7309440ce..9d4f9206f50 100644
--- a/erpnext/regional/report/gstr_1/gstr_1.py
+++ b/erpnext/regional/report/gstr_1/gstr_1.py
@@ -588,7 +588,7 @@ def get_json(filters, report_name, data):
fp = "%02d%s" % (getdate(filters["to_date"]).month, getdate(filters["to_date"]).year)
- gst_json = {"version": "GST2.2.9",
+ gst_json = {"version": "GST3.0.4",
"hash": "hash", "gstin": gstin, "fp": fp}
res = {}
@@ -765,7 +765,7 @@ def get_cdnr_reg_json(res, gstin):
"ntty": invoice[0]["document_type"],
"pos": "%02d" % int(invoice[0]["place_of_supply"].split('-')[0]),
"rchrg": invoice[0]["reverse_charge"],
- "inv_type": get_invoice_type_for_cdnr(invoice[0])
+ "inv_typ": get_invoice_type_for_cdnr(invoice[0])
}
inv_item["itms"] = []
From 512ddc589f07cb9a938f0ef742db5a2e075ce55d Mon Sep 17 00:00:00 2001
From: Frappe PR Bot
Date: Tue, 24 Aug 2021 22:00:32 +0530
Subject: [PATCH 70/87] fix: timesheet amount issue (#25993) (#26889)
* fix: timesheet amount issue
* fix: timesheet detail rate conversion
* fix: condition to check timesheet currency
* fix: removing console statement
(cherry picked from commit a6aa6cd7d63eb426b986d995985985c2aae4f553)
Co-authored-by: Anupam Kumar
Co-authored-by: Nabin Hait
---
erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 2071827d994..d8dee99b992 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -443,6 +443,15 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
this.frm.refresh_field("outstanding_amount");
this.frm.refresh_field("paid_amount");
this.frm.refresh_field("base_paid_amount");
+ },
+
+ currency() {
+ this._super();
+ $.each(cur_frm.doc.timesheets, function(i, d) {
+ let row = frappe.get_doc(d.doctype, d.name)
+ set_timesheet_detail_rate(row.doctype, row.name, cur_frm.doc.currency, row.timesheet_detail)
+ });
+ calculate_total_billing_amount(cur_frm)
}
currency() {
From 1d6ef4b0d3dd84ad84c64c602a919f6776c62eb4 Mon Sep 17 00:00:00 2001
From: Anupam Kumar
Date: Tue, 24 Aug 2021 22:06:19 +0530
Subject: [PATCH 71/87] fix: replacing $.each -> forEach in SI (#26995)
* fix: replacing $.each -> forEach in SI
* fix: removed console log
Co-authored-by: Nabin Hait
---
.../doctype/sales_invoice/sales_invoice.js | 23 +++++++++++--------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index d8dee99b992..1e37e4b2070 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -154,9 +154,9 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
return
}
- $.each(doc["items"], function(i, row) {
+ doc.items.forEach((row) => {
if(row.delivery_note) frappe.model.clear_doc("Delivery Note", row.delivery_note)
- })
+ });
}
set_default_print_format() {
@@ -455,12 +455,15 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
}
currency() {
+ var me = this;
super.currency();
- $.each(cur_frm.doc.timesheets, function(i, d) {
- let row = frappe.get_doc(d.doctype, d.name)
- set_timesheet_detail_rate(row.doctype, row.name, cur_frm.doc.currency, row.timesheet_detail)
- });
- calculate_total_billing_amount(cur_frm)
+ if (this.frm.doc.timesheets) {
+ this.frm.doc.timesheets.forEach((d) => {
+ let row = frappe.get_doc(d.doctype, d.name)
+ set_timesheet_detail_rate(row.doctype, row.name, me.frm.doc.currency, row.timesheet_detail)
+ });
+ calculate_total_billing_amount(this.frm);
+ }
}
};
@@ -983,9 +986,9 @@ var calculate_total_billing_amount = function(frm) {
doc.total_billing_amount = 0.0
if (doc.timesheets) {
- $.each(doc.timesheets, function(index, data){
- doc.total_billing_amount += flt(data.billing_amount)
- })
+ doc.timesheets.forEach((d) => {
+ doc.total_billing_amount += flt(d.billing_amount)
+ });
}
refresh_field('total_billing_amount')
From c7bad657b1f73aa2d1232b416752128afc5f77e8 Mon Sep 17 00:00:00 2001
From: Dany Robert
Date: Tue, 24 Aug 2021 22:10:14 +0530
Subject: [PATCH 72/87] fix: broken URL in supplier portal (#26823)
* fix: broken URL
The quotations are supplier quotations, not sales quotation.
* fix: remove erpnext from path
---
erpnext/templates/includes/rfq/rfq_items.html | 2 +-
erpnext/templates/pages/rfq.html | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/erpnext/templates/includes/rfq/rfq_items.html b/erpnext/templates/includes/rfq/rfq_items.html
index caa15f386b0..04cf922664b 100644
--- a/erpnext/templates/includes/rfq/rfq_items.html
+++ b/erpnext/templates/includes/rfq/rfq_items.html
@@ -1,4 +1,4 @@
-{% from "erpnext/templates/includes/rfq/rfq_macros.html" import item_name_and_description %}
+{% from "templates/includes/rfq/rfq_macros.html" import item_name_and_description %}
{% for d in doc.items %}