fix: Merge conflict
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 38d8a62..530a6e4 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
-__version__ = '13.0.0-dev'
+__version__ = '13.0.0-beta.2'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/change_log/v13/v13_0_0-beta_1.md b/erpnext/change_log/v13/v13_0_0-beta_1.md
new file mode 100644
index 0000000..5bd13dd
--- /dev/null
+++ b/erpnext/change_log/v13/v13_0_0-beta_1.md
@@ -0,0 +1,52 @@
+# Version 13.0.0 Beta 1 Release Notes
+
+## Accounting
+- [Loan Management and Accounting](https://docs.erpnext.com/docs/user/manual/en/loan-management)
+- [Accounting Dimensions in Budget Variance Report](https://github.com/frappe/erpnext/pull/19973)
+- [Tax Category in POS Profile](https://docs.erpnext.com/docs/user/manual/en/accounts/pos-profile)
+- [Custom Fields in POS](https://github.com/frappe/erpnext/pull/19876)
+- [HSN Code Wise Item Tax](https://github.com/frappe/erpnext/pull/19478)
+- Auto State-wise Taxation for GST India
+ - The Accounts entered in CGST and SGST accounts in GST Settings will be automatically skipped for Interstate Transaction and the Accounts in IGST Account will be skipped in Intrastate transaction.
+
+## Stock
+- [Fetch Items from BOM in Stock Entry](https://github.com/frappe/erpnext/pull/19498)
+- [Inter Warehouse Stock Transfer in Purchase Receipt](https://docs.erpnext.com/docs/user/manual/en/stock/articles/material-transfer-from-delivery-note)
+
+## HR
+- [Work From Home in Attendance](https://github.com/frappe/erpnext/pull/20464)
+- [Bulk Mark Attendance](https://github.com/frappe/erpnext/pull/20062)
+
+## Healthcare
+- [Refactored Healthcare Module](https://docs.erpnext.com/docs/user/manual/en/healthcare)
+- [Rehabilitation Module](https://docs.erpnext.com/docs/user/manual/en/healthcare/exercise_type)
+
+## CRM
+- [Social Media Post](https://docs.erpnext.com/docs/user/manual/en/CRM/social-media-post)
+- [Make Quotation against Blanket Order](https://docs.erpnext.com/docs/user/manual/en/selling/blanket-order)
+- [Calendar View for Opportunity](https://github.com/frappe/erpnext/pull/21280)
+
+## New Reports
+- [Item-wise Sales Register](https://docs.erpnext.com/docs/user/manual/en/accounts/accounting-reports)
+- [Territory-wise Sales](https://github.com/frappe/erpnext/pull/20428)
+
+## Regional
+
+- Germany
+
+ - [Update report DATEV Export to version 7.0](https://github.com/frappe/erpnext/pull/20582) and [allow to filter by voucher type](https://github.com/frappe/erpnext/pull/21060).
+
+- [Use any available Address Template](https://github.com/frappe/erpnext/pull/19862), not just your country's.
+
+## Other Changes
+- [Report Summary in Financial Statement](https://github.com/frappe/erpnext/pull/20876)
+- [Accounts Payable Report based on Payment Terms](https://docs.erpnext.com/docs/user/manual/en/accounts/accounting-reports)
+- [Allow Purchase Invoice Creation Without Purchase Receipt Checkbox in Supplier](https://github.com/frappe/erpnext/pull/20864)
+- [Allow Purchase Invoice Creation Without Purchase Order Checkbox in Supplier](https://github.com/frappe/erpnext/pull/20864)
+- Add / Delete Items in submitted Sales / Purchase Order
+- Provision to edit Item Details from Marketplace
+- Nested Set filtering for Accounting Dimension
+- UX changes and better validation message in all Modules
+- Scan Barcode in Purchase Receipt
+- Disable Rounded Totals Checkbox for Salary Slips in HR Settings
+
diff --git a/erpnext/change_log/v13/v13_0_0-beta_2.md b/erpnext/change_log/v13/v13_0_0-beta_2.md
new file mode 100644
index 0000000..05c52c9
--- /dev/null
+++ b/erpnext/change_log/v13/v13_0_0-beta_2.md
@@ -0,0 +1,68 @@
+### Version 13.0.0 Beta 2 Release Notes
+
+#### Accounting
+- Onboarding and Dashboard ([#21677](https://github.com/frappe/erpnext/pull/21677))
+- Immutable Ledger ([#18740](https://github.com/frappe/erpnext/pull/18740))
+- Process Deferred Accounting document ([#19658](https://github.com/frappe/erpnext/pull/19658))
+- Journal Entry Template ([#21404](https://github.com/frappe/erpnext/pull/21404))
+
+
+#### Buying
+- Onboarding and Dashboard ([#21611](https://github.com/frappe/erpnext/pull/21611))
+- New Reports
+ - Requested Items To Order ([#21611](https://github.com/frappe/erpnext/pull/21611))
+ - Purchase Order Analysis ([#21611](https://github.com/frappe/erpnext/pull/21611))
+ - Refactored Quoted Item Comparison report ([#21273](https://github.com/frappe/erpnext/pull/21273))
+
+#### Stock
+- Onboarding and Dashboard ([#21727](https://github.com/frappe/erpnext/pull/21727))
+- Invoice from Purchase Receipt with duplicate items which has been partially returned ([#20724](https://github.com/frappe/erpnext/pull/20724))
+- Report Enhancements ([#21727](https://github.com/frappe/erpnext/pull/21727))
+ - Item Shortage Report
+ - Stock Ageing
+ - Purchase Receipt Trends
+ - Delivery Note Trends
+
+#### Manufacturing
+- Onboarding and Dashboard ([#21430](https://github.com/frappe/erpnext/pull/21430))
+- Production forecasting using exponential smoothing method ([#21724](https://github.com/frappe/erpnext/pull/21724))
+- BOM Template ([#21262](https://github.com/frappe/erpnext/pull/21262))
+- Run MRP at parent level in the production plan and make material transfer based upon materials availability ([#21545](https://github.com/frappe/erpnext/pull/21545))
+- Downtime Entry ([#21430](https://github.com/frappe/erpnext/pull/21430))
+- New Reports
+ - Production Planning Report ([#21763](https://github.com/frappe/erpnext/pull/21763))
+ - BOM Operations Time ([#21763](https://github.com/frappe/erpnext/pull/21763))
+ - Work Order Summary ([#21430](https://github.com/frappe/erpnext/pull/21430))
+ - Job card Summary ([#21430](https://github.com/frappe/erpnext/pull/21430))
+ - Downtime Analysis ([#21430](https://github.com/frappe/erpnext/pull/21430))
+ - Quality Inspection ([#21430](https://github.com/frappe/erpnext/pull/21430))
+
+
+#### HR
+- Onboarding and Dashboard ([#21705](https://github.com/frappe/erpnext/pull/21705))
+- Recurring Additional Salary and reference fields ([#20936](https://github.com/frappe/erpnext/pull/20936))
+- Payroll based on employee cost center ([#21609](https://github.com/frappe/erpnext/pull/21609))
+- Payroll based on attendance ([#21258](https://github.com/frappe/erpnext/pull/21258))
+- Monthly attendance sheet report enhancements, group by Department, Designation, Employee Grade and Branch ([#21331](https://github.com/frappe/erpnext/pull/21331))
+- Upload Attendance template now have pre-filled holiday status ([#20947](https://github.com/frappe/erpnext/pull/20947))
+- New and enhanced reports
+ - Employee Analytics report ([#21705](https://github.com/frappe/erpnext/pull/21705))
+ - Employee Leave Balance ([#20754](https://github.com/frappe/erpnext/pull/20754))
+ - Employee Leave Balance Summary ([#20754](https://github.com/frappe/erpnext/pull/20754))
+
+#### Healthcare
+- Onboarding and Dashboard ([#21774](https://github.com/frappe/erpnext/pull/21774))
+- Multi company support in Healthcare ([#21290](https://github.com/frappe/erpnext/pull/21290))
+
+#### CRM
+- Onboarding and Dashboard ([#21733](https://github.com/frappe/erpnext/pull/21733))
+
+#### Selling
+- Territory tree in Customer Acquisition and Loyalty report ([#21668](https://github.com/frappe/erpnext/pull/21668))
+
+#### Project
+- Onboarding and Dashboard ([#21587](https://github.com/frappe/erpnext/pull/21587))
+- Project Summary Report ([#21587](https://github.com/frappe/erpnext/pull/21587))
+
+#### Integrations
+- Woocommerce Integration ([#13217](https://github.com/frappe/erpnext/pull/13217))
\ No newline at end of file
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index f6a8d27..9bba71d 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -384,6 +384,19 @@
fields = ["name", "parent_account"],
limit_start=start, limit_page_length=page_len, as_list=True)
+def get_blanket_orders(doctype, txt, searchfield, start, page_len, filters):
+ return frappe.db.sql("""select distinct bo.name, bo.blanket_order_type, bo.to_date
+ from `tabBlanket Order` bo, `tabBlanket Order Item` boi
+ where
+ boi.parent = bo.name
+ and boi.item_code = {item_code}
+ and bo.blanket_order_type = '{blanket_order_type}'
+ and bo.company = {company}
+ and bo.docstatus = 1"""
+ .format(item_code = frappe.db.escape(filters.get("item")),
+ blanket_order_type = filters.get("blanket_order_type"),
+ company = frappe.db.escape(filters.get("company"))
+ ))
def get_blanket_orders(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select distinct bo.name, bo.blanket_order_type, bo.to_date
diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py
index 759c6cd..6af6fee 100644
--- a/erpnext/controllers/stock_controller.py
+++ b/erpnext/controllers/stock_controller.py
@@ -227,10 +227,8 @@
def check_expense_account(self, item):
if not item.get("expense_account"):
- frappe.throw(_("Row #{0}: Expense Account not set for Item {1}. Please set an Expense \
- Account in the Items table").format(item.idx, frappe.bold(item.item_code)),
- title=_("Expense Account Missing"))
-
+ frappe.throw(_("Row #{0}: Expense Account not set for Item {1}. Please set an Expense Account in the Items table")
+ .format(item.idx, frappe.bold(item.item_code)), title=_("Expense Account Missing"))
else:
is_expense_account = frappe.db.get_value("Account",
item.get("expense_account"), "report_type")=="Profit and Loss"
diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py
index 45b7060..e8eca03 100644
--- a/erpnext/hr/doctype/attendance/attendance.py
+++ b/erpnext/hr/doctype/attendance/attendance.py
@@ -35,7 +35,8 @@
and docstatus != 2
""", (self.employee, getdate(self.attendance_date), self.name))
if res:
- frappe.throw(_("Attendance for employee {0} is already marked").format(self.employee))
+ frappe.throw(_("Attendance for employee {0} is already marked for the date {1}").format(
+ frappe.bold(self.employee), frappe.bold(self.attendance_date)))
def check_leave_record(self):
leave_record = frappe.db.sql("""
diff --git a/erpnext/loan_management/desk_page/loan/loan.json b/erpnext/loan_management/desk_page/loan/loan.json
index 48193b0..23671ea 100644
--- a/erpnext/loan_management/desk_page/loan/loan.json
+++ b/erpnext/loan_management/desk_page/loan/loan.json
@@ -34,6 +34,7 @@
"docstatus": 0,
"doctype": "Desk Page",
"extends_another_page": 0,
+ "hide_custom": 0,
"idx": 0,
"is_standard": 1,
"label": "Loan",
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index 2359648..88a6dc0 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -7,7 +7,6 @@
from frappe import _
from frappe.utils import cstr, now_datetime, cint, flt, get_time, get_datetime, get_link_to_form
from erpnext.controllers.status_updater import StatusUpdater
-from erpnext.accounts.utils import get_fiscal_year
from six import string_types