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 0c266ce7947..a602e0d7df3 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
@@ -104,7 +104,7 @@ def set_ageing(doc, entry):
ageing_filters = frappe._dict(
{
"company": doc.company,
- "report_date": doc.to_date,
+ "report_date": doc.posting_date,
"ageing_based_on": doc.ageing_based_on,
"range1": 30,
"range2": 60,
diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html
index 647600a9fea..bf8de073853 100644
--- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html
+++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html
@@ -340,10 +340,11 @@
- | 30 Days |
- 60 Days |
- 90 Days |
- 120 Days |
+ 0 - 30 Days |
+ 30 - 60 Days |
+ 60 - 90 Days |
+ 90 - 120 Days |
+ Above 120 Days |
@@ -352,6 +353,7 @@
{{ frappe.utils.fmt_money(ageing.range2, currency=data[0]["currency"]) }} |
{{ frappe.utils.fmt_money(ageing.range3, currency=data[0]["currency"]) }} |
{{ frappe.utils.fmt_money(ageing.range4, currency=data[0]["currency"]) }} |
+ {{ frappe.utils.fmt_money(ageing.range5, currency=filters.presentation_currency) }} |
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 25f11b65e49..cf7d01c4035 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -2030,7 +2030,7 @@
{
"fieldname": "contact_and_address_tab",
"fieldtype": "Tab Break",
- "label": "Contact & Address"
+ "label": "Address & Contact"
},
{
"fieldname": "payments_tab",
@@ -2184,7 +2184,7 @@
"link_fieldname": "consolidated_invoice"
}
],
- "modified": "2024-03-22 17:50:34.395602",
+ "modified": "2024-05-08 18:02:28.549041",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 2b95e16f356..8240b79bfdc 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -188,7 +188,9 @@ def set_address_details(
*,
ignore_permissions=False,
):
- billing_address_field = "customer_address" if party_type == "Lead" else party_type.lower() + "_address"
+ billing_address_field = (
+ "customer_address" if party_type in ["Lead", "Prospect"] else party_type.lower() + "_address"
+ )
party_details[billing_address_field] = party_address or get_default_address(party_type, party.name)
if doctype:
party_details.update(
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index 25143e555d3..be42da8423f 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -1028,20 +1028,6 @@ class ReceivablePayableReport:
fieldtype="Link",
options="Contact",
)
- if self.filters.party_type == "Customer":
- self.add_column(
- _("Customer Name"),
- fieldname="customer_name",
- fieldtype="Link",
- options="Customer",
- )
- elif self.filters.party_type == "Supplier":
- self.add_column(
- _("Supplier Name"),
- fieldname="supplier_name",
- fieldtype="Link",
- options="Supplier",
- )
self.add_column(label=_("Cost Center"), fieldname="cost_center", fieldtype="Data")
self.add_column(label=_("Voucher Type"), fieldname="voucher_type", fieldtype="Data")
diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js
index 215d431e786..88ec0881585 100644
--- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js
+++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js
@@ -15,14 +15,14 @@ frappe.query_reports["Asset Depreciations and Balances"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
reqd: 1,
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
reqd: 1,
},
{
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 c15d43012db..e8ae2a1dabe 100644
--- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js
+++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js
@@ -7,7 +7,7 @@ frappe.query_reports["Bank Clearance Summary"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
width: "80",
},
{
diff --git a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js
index 27c0c660f01..149b258248c 100644
--- a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js
+++ b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js
@@ -38,14 +38,14 @@ frappe.require("assets/erpnext/js/financial_statements.js", function () {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
reqd: 1,
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
reqd: 1,
},
{
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.js b/erpnext/accounts/report/gross_profit/gross_profit.js
index 890befe8596..64a9838f54b 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.js
+++ b/erpnext/accounts/report/gross_profit/gross_profit.js
@@ -15,14 +15,14 @@ frappe.query_reports["Gross Profit"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
reqd: 1,
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
reqd: 1,
},
{
diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js
index 8625c57d46b..528246cd370 100644
--- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js
+++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js
@@ -15,7 +15,7 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
fieldname: "to_date",
diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js
index dcecf7bb47f..816adfaf916 100644
--- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.js
+++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.js
@@ -59,13 +59,13 @@ frappe.require("assets/erpnext/js/financial_statements.js", function () {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
},
{
fieldname: "show_zero_values",
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.js b/erpnext/accounts/report/trial_balance/trial_balance.js
index 59b366a3dca..7337fd477e7 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.js
+++ b/erpnext/accounts/report/trial_balance/trial_balance.js
@@ -37,13 +37,13 @@ frappe.require("assets/erpnext/js/financial_statements.js", function () {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
},
{
fieldname: "cost_center",
diff --git a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js
index ab1508bebd0..50578d314e3 100644
--- a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js
+++ b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js
@@ -36,13 +36,13 @@ frappe.query_reports["Trial Balance for Party"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
},
{
fieldname: "party_type",
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 8fc47b0b679..377eeae7cff 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -55,6 +55,9 @@ GL_REPOSTING_CHUNK = 100
def get_fiscal_year(
date=None, fiscal_year=None, label="Date", verbose=1, company=None, as_dict=False, boolean=False
):
+ if isinstance(boolean, str):
+ boolean = frappe.json.loads(boolean)
+
fiscal_years = get_fiscal_years(
date, fiscal_year, label, verbose, company, as_dict=as_dict, boolean=boolean
)
diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json
index 5ac8cde50fe..944eb985246 100644
--- a/erpnext/buying/doctype/supplier/supplier.json
+++ b/erpnext/buying/doctype/supplier/supplier.json
@@ -402,7 +402,7 @@
{
"fieldname": "contact_and_address_tab",
"fieldtype": "Tab Break",
- "label": "Contact & Address"
+ "label": "Address & Contact"
},
{
"fieldname": "accounting_tab",
@@ -457,7 +457,7 @@
"link_fieldname": "party"
}
],
- "modified": "2023-10-19 16:55:15.148325",
+ "modified": "2024-05-08 18:02:57.342931",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",
diff --git a/erpnext/buying/report/procurement_tracker/procurement_tracker.js b/erpnext/buying/report/procurement_tracker/procurement_tracker.js
index 7127c60b286..df8dc9c6902 100644
--- a/erpnext/buying/report/procurement_tracker/procurement_tracker.js
+++ b/erpnext/buying/report/procurement_tracker/procurement_tracker.js
@@ -27,13 +27,13 @@ frappe.query_reports["Procurement Tracker"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
},
],
};
diff --git a/erpnext/buying/report/purchase_analytics/purchase_analytics.js b/erpnext/buying/report/purchase_analytics/purchase_analytics.js
index 91958d520a7..7de965a4586 100644
--- a/erpnext/buying/report/purchase_analytics/purchase_analytics.js
+++ b/erpnext/buying/report/purchase_analytics/purchase_analytics.js
@@ -35,14 +35,14 @@ frappe.query_reports["Purchase Analytics"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
reqd: 1,
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
reqd: 1,
},
{
diff --git a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js
index d2c52938bde..a1e51f0654d 100644
--- a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js
+++ b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.js
@@ -6,13 +6,13 @@ frappe.query_reports["Campaign Efficiency"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
},
],
};
diff --git a/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js b/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js
index c140567fed5..bd64641dcc2 100644
--- a/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js
+++ b/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.js
@@ -6,13 +6,13 @@ frappe.query_reports["Lead Owner Efficiency"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
},
],
};
diff --git a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js
index 0d6a52f4b8e..aac687c1413 100644
--- a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js
+++ b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js
@@ -37,14 +37,14 @@ frappe.query_reports["Job Card Summary"] = {
label: __("From Posting Date"),
fieldname: "from_date",
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
reqd: 1,
},
{
label: __("To Posting Date"),
fieldname: "to_date",
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
reqd: 1,
},
{
diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.js b/erpnext/manufacturing/report/production_analytics/production_analytics.js
index 6f2c38295e9..da8e4926a45 100644
--- a/erpnext/manufacturing/report/production_analytics/production_analytics.js
+++ b/erpnext/manufacturing/report/production_analytics/production_analytics.js
@@ -16,14 +16,14 @@ frappe.query_reports["Production Analytics"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
reqd: 1,
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
reqd: 1,
},
{
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index f6ba4ae9fab..4d886d47f4e 100755
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -410,11 +410,13 @@ $.extend(erpnext.utils, {
method: "erpnext.accounts.utils.get_fiscal_year",
args: {
date: date,
+ boolean: boolean,
},
async: false,
callback: function (r) {
if (r.message) {
- fiscal_year = r.message[0];
+ if (with_dates) fiscal_year = r.message;
+ else fiscal_year = r.message[0];
}
},
});
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index 9844e0902c4..e272f09679c 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -481,7 +481,7 @@
{
"fieldname": "contact_and_address_tab",
"fieldtype": "Tab Break",
- "label": "Contact & Address"
+ "label": "Address & Contact"
},
{
"fieldname": "defaults_tab",
@@ -567,7 +567,7 @@
"link_fieldname": "party"
}
],
- "modified": "2023-12-28 13:15:36.298369",
+ "modified": "2024-05-08 18:03:20.716169",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer",
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index 2d5c3fa961d..d2f565ef70e 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -45,6 +45,8 @@ frappe.ui.form.on('Quotation', {
frm.trigger("set_label");
frm.trigger("toggle_reqd_lead_customer");
frm.trigger("set_dynamic_field_label");
+ frm.set_value("party_name", "");
+ frm.set_value("customer_name", "");
},
set_label: function(frm) {
@@ -71,7 +73,7 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext.
frappe.dynamic_link = {
doc: this.frm.doc,
fieldname: 'party_name',
- doctype: doc.quotation_to == 'Customer' ? 'Customer' : 'Lead',
+ doctype: doc.quotation_to,
};
var me = this;
@@ -170,6 +172,7 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext.
}
} else if (this.frm.doc.quotation_to == "Prospect") {
this.frm.set_df_property("party_name", "label", "Prospect");
+ this.frm.fields_dict.party_name.get_query = null;
}
}
diff --git a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js
index 04891301d7b..745550b57c6 100644
--- a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js
+++ b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js
@@ -23,14 +23,14 @@ frappe.query_reports["Customer Acquisition and Loyalty"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
reqd: 1,
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
reqd: 1,
},
],
diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.js b/erpnext/selling/report/sales_analytics/sales_analytics.js
index 9274586c3e3..0f87923949f 100644
--- a/erpnext/selling/report/sales_analytics/sales_analytics.js
+++ b/erpnext/selling/report/sales_analytics/sales_analytics.js
@@ -43,14 +43,14 @@ frappe.query_reports["Sales Analytics"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
reqd: 1,
},
{
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
reqd: 1,
},
{
diff --git a/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js b/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js
index ebbf9cf2dd2..7944453a1b0 100644
--- a/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js
+++ b/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js
@@ -21,7 +21,7 @@ frappe.query_reports["Sales Person Commission Summary"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
fieldname: "to_date",
diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js
index a02d0711128..828e9e74f23 100644
--- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js
+++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js
@@ -20,7 +20,7 @@ frappe.query_reports["Sales Person-wise Transaction Summary"] = {
fieldname: "from_date",
label: __("From Date"),
fieldtype: "Date",
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
fieldname: "to_date",
diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.py b/erpnext/setup/doctype/authorization_rule/authorization_rule.py
index 1bf9aa61c33..e232271cadb 100644
--- a/erpnext/setup/doctype/authorization_rule/authorization_rule.py
+++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.py
@@ -53,8 +53,6 @@ class AuthorizationRule(Document):
frappe.throw(_("Discount must be less than 100"))
elif self.based_on == "Customerwise Discount" and not self.master_name:
frappe.throw(_("Customer required for 'Customerwise Discount'"))
- else:
- self.based_on = "Not Applicable"
def validate(self):
self.check_duplicate_entry()
diff --git a/erpnext/stock/doctype/delivery_trip/delivery_trip.js b/erpnext/stock/doctype/delivery_trip/delivery_trip.js
index 77eae534d17..4f8649c0bfa 100755
--- a/erpnext/stock/doctype/delivery_trip/delivery_trip.js
+++ b/erpnext/stock/doctype/delivery_trip/delivery_trip.js
@@ -51,7 +51,6 @@ frappe.ui.form.on("Delivery Trip", {
frm.add_custom_button(
__("Delivery Note"),
() => {
- frm.clear_table("delivery_stops");
erpnext.utils.map_current_doc({
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_delivery_trip",
source_doctype: "Delivery Note",
diff --git a/erpnext/stock/doctype/pick_list/pick_list.json b/erpnext/stock/doctype/pick_list/pick_list.json
index 948011cce69..b4aadbd7987 100644
--- a/erpnext/stock/doctype/pick_list/pick_list.json
+++ b/erpnext/stock/doctype/pick_list/pick_list.json
@@ -18,6 +18,7 @@
"parent_warehouse",
"consider_rejected_warehouses",
"get_item_locations",
+ "pick_manually",
"section_break_6",
"scan_barcode",
"column_break_13",
@@ -192,11 +193,18 @@
"fieldname": "consider_rejected_warehouses",
"fieldtype": "Check",
"label": "Consider Rejected Warehouses"
+ },
+ {
+ "default": "0",
+ "description": "If enabled then system won't override the picked qty / batches / serial numbers.",
+ "fieldname": "pick_manually",
+ "fieldtype": "Check",
+ "label": "Pick Manually"
}
],
"is_submittable": 1,
"links": [],
- "modified": "2024-01-24 17:05:20.317180",
+ "modified": "2024-03-27 22:49:16.954637",
"modified_by": "Administrator",
"module": "Stock",
"name": "Pick List",
@@ -268,4 +276,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py
index ef7dc710b13..99858835fed 100644
--- a/erpnext/stock/doctype/pick_list/pick_list.py
+++ b/erpnext/stock/doctype/pick_list/pick_list.py
@@ -29,7 +29,8 @@ class PickList(Document):
def before_save(self):
self.update_status()
- self.set_item_locations()
+ if not self.pick_manually:
+ self.set_item_locations()
if self.get("locations"):
self.validate_sales_order_percentage()
diff --git a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js
index 4d0472ceaa8..cde502ad738 100644
--- a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js
+++ b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js
@@ -22,14 +22,14 @@ frappe.query_reports["Incorrect Serial No Valuation"] = {
fieldtype: "Date",
fieldname: "from_date",
reqd: 1,
- default: frappe.defaults.get_user_default("year_start_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
},
{
label: __("To Date"),
fieldtype: "Date",
fieldname: "to_date",
reqd: 1,
- default: frappe.defaults.get_user_default("year_end_date"),
+ default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
},
],
};