diff --git a/.github/helper/documentation.py b/.github/helper/documentation.py index 83346045f89..d07c880684e 100644 --- a/.github/helper/documentation.py +++ b/.github/helper/documentation.py @@ -10,6 +10,7 @@ WEBSITE_REPOS = [ DOCUMENTATION_DOMAINS = [ "docs.erpnext.com", + "docs.frappe.io", "frappeframework.com", ] diff --git a/erpnext/accounts/doctype/bank_account/bank_account.py b/erpnext/accounts/doctype/bank_account/bank_account.py index 28a4a41e28e..e51c792e8ea 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.py +++ b/erpnext/accounts/doctype/bank_account/bank_account.py @@ -21,7 +21,7 @@ class BankAccount(Document): self.name = self.account_name + " - " + self.bank def on_trash(self): - delete_contact_and_address("BankAccount", self.name) + delete_contact_and_address("Bank Account", self.name) def validate(self): self.validate_company() diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index e9e4ffea804..e131b01f9f3 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1443,7 +1443,12 @@ class PurchaseInvoice(BuyingController): if pi: pi = pi[0][0] - frappe.throw(_("Supplier Invoice No exists in Purchase Invoice {0}").format(pi)) + + frappe.throw( + _("Supplier Invoice No exists in Purchase Invoice {0}").format( + get_link_to_form("Purchase Invoice", pi) + ) + ) def update_billing_status_in_pr(self, update_modified=True): if self.is_return and not self.update_billed_amount_in_purchase_receipt: 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 798e264a532..15287f200fb 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -215,14 +215,14 @@ def get_tax_row_for_tds(tax_details, tax_amount): } -def get_lower_deduction_certificate(company, tax_details, pan_no): +def get_lower_deduction_certificate(company, posting_date, tax_details, pan_no): ldc_name = frappe.db.get_value( "Lower Deduction Certificate", { "pan_no": pan_no, "tax_withholding_category": tax_details.tax_withholding_category, - "valid_from": (">=", tax_details.from_date), - "valid_upto": ("<=", tax_details.to_date), + "valid_from": ("<=", posting_date), + "valid_upto": (">=", posting_date), "company": company, }, "name", @@ -270,7 +270,7 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N tax_amount = 0 if party_type == "Supplier": - ldc = get_lower_deduction_certificate(inv.company, tax_details, pan_no) + ldc = get_lower_deduction_certificate(inv.company, posting_date, tax_details, pan_no) if tax_deducted: net_total = inv.tax_withholding_net_total if ldc: @@ -507,7 +507,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): ) supp_credit_amt = supp_jv_credit_amt - supp_credit_amt += inv.tax_withholding_net_total + supp_credit_amt += inv.get("tax_withholding_net_total", 0) for type in payment_entry_amounts: if type.payment_type == "Pay": @@ -519,9 +519,9 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): cumulative_threshold = tax_details.get("cumulative_threshold", 0) if inv.doctype != "Payment Entry": - tax_withholding_net_total = inv.base_tax_withholding_net_total + tax_withholding_net_total = inv.get("base_tax_withholding_net_total", 0) else: - tax_withholding_net_total = inv.tax_withholding_net_total + tax_withholding_net_total = inv.get("tax_withholding_net_total", 0) if (threshold and tax_withholding_net_total >= threshold) or ( cumulative_threshold and (supp_credit_amt + supp_inv_credit_amt) >= cumulative_threshold diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index f488b1a5832..eeff456291a 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -129,7 +129,6 @@ class ReceivablePayableReport: paid_in_account_currency=0.0, credit_note_in_account_currency=0.0, outstanding_in_account_currency=0.0, - cost_center=ple.cost_center, ) def init_voucher_balance(self): @@ -145,6 +144,9 @@ class ReceivablePayableReport: if key not in self.voucher_balance: self.voucher_balance[key] = self.build_voucher_dict(ple) + if ple.voucher_type == ple.against_voucher_type and ple.voucher_no == ple.against_voucher_no: + self.voucher_balance[key].cost_center = ple.cost_center + self.get_invoices(ple) if self.filters.get("group_by_party"): @@ -270,9 +272,6 @@ class ReceivablePayableReport: row.paid -= amount row.paid_in_account_currency -= amount_in_account_currency - if not row.cost_center and ple.cost_center: - row.cost_center = str(ple.cost_center) - def update_sub_total_row(self, row, party): total_row = self.total_row_map.get(party) 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 388b7d8fe86..fb340453229 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -355,7 +355,7 @@ def get_data(companies, root_type, balance_must_be, fiscal_year, filters=None, i gl_entries_by_account, accounts_by_name, accounts, - ignore_closing_entries=False, + ignore_closing_entries=ignore_closing_entries, root_type=root_type, ) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 15617a53cdf..5539954231a 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -726,12 +726,13 @@ class GrossProfitGenerator: .inner_join(purchase_invoice) .on(purchase_invoice.name == purchase_invoice_item.parent) .select( - purchase_invoice.name, purchase_invoice_item.base_rate / purchase_invoice_item.conversion_factor, ) .where(purchase_invoice.docstatus == 1) .where(purchase_invoice.posting_date <= self.filters.to_date) .where(purchase_invoice_item.item_code == item_code) + .where(purchase_invoice.is_return == 0) + .where(purchase_invoice_item.parenttype == "Purchase Invoice") ) if row.project: diff --git a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py index 03a5259b96f..3c03005b1cb 100644 --- a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py +++ b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py @@ -405,7 +405,7 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None): "paid_amount_after_tax", "base_paid_amount", ], - "Journal Entry": ["total_debit"], + "Journal Entry": ["tax_withholding_category", "total_debit"], } entries = frappe.get_all( diff --git a/erpnext/crm/doctype/competitor/competitor.json b/erpnext/crm/doctype/competitor/competitor.json index fd6da239212..021488ab99b 100644 --- a/erpnext/crm/doctype/competitor/competitor.json +++ b/erpnext/crm/doctype/competitor/competitor.json @@ -38,7 +38,7 @@ "table_fieldname": "competitors" } ], - "modified": "2023-11-23 19:33:54.284279", + "modified": "2024-12-10 08:26:38.496003", "modified_by": "Administrator", "module": "CRM", "name": "Competitor", @@ -53,20 +53,25 @@ "print": 1, "read": 1, "report": 1, - "role": "System Manager", + "role": "Sales Master Manager", "share": 1, "write": 1 }, { - "create": 1, - "email": 1, - "export": 1, - "print": 1, "read": 1, - "report": 1, - "role": "Sales User", - "share": 1, - "write": 1 + "role": "Sales User" + }, + { + "read": 1, + "role": "Sales Manager" + }, + { + "read": 1, + "role": "Maintenance Manager" + }, + { + "read": 1, + "role": "Maintenance User" } ], "quick_entry": 1, diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js index dae16f46663..a3b401e090a 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js @@ -25,7 +25,12 @@ frappe.ui.form.on("Plaid Settings", { method: "erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.enqueue_synchronization", freeze: true, callback: () => { - let bank_transaction_link = 'Bank Transaction'; + let bank_transaction_link = frappe.utils.get_form_link( + "Bank Transaction", + "", + true, + "Bank Transaction" + ); frappe.msgprint({ title: __("Sync Started"), diff --git a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json index 0eae08e8707..a0e0f176ddf 100644 --- a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json +++ b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json @@ -32,7 +32,7 @@ "table_fieldname": "lost_reasons" } ], - "modified": "2023-11-23 19:31:02.743353", + "modified": "2024-12-10 08:21:38.280627", "modified_by": "Administrator", "module": "Setup", "name": "Quotation Lost Reason", @@ -49,6 +49,22 @@ "role": "Sales Master Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "role": "Sales User" + }, + { + "read": 1, + "role": "Sales Manager" + }, + { + "read": 1, + "role": "Maintenance User" + }, + { + "read": 1, + "role": "Maintenance Manager" } ], "quick_entry": 1, diff --git a/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json b/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json index a07b55382ca..400ec5e0e64 100644 --- a/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json +++ b/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json @@ -1,19 +1,37 @@ { "chart_name": "Warehouse wise Stock Value", "chart_type": "Custom", - "creation": "2020-07-20 21:01:04.296157", + "creation": "2022-03-30 00:58:02.018824", "docstatus": 0, "doctype": "Dashboard Chart", "filters_json": "{}", "idx": 0, "is_public": 1, "is_standard": 1, - "modified": "2020-07-22 13:01:01.815123", + "last_synced_on": "2024-12-23 18:44:46.822164", + "modified": "2024-12-23 19:31:17.003946", "modified_by": "Administrator", "module": "Stock", "name": "Warehouse wise Stock Value", "number_of_groups": 0, "owner": "Administrator", + "roles": [ + { + "role": "Sales Manager" + }, + { + "role": "Accounts Manager" + }, + { + "role": "Stock Manager" + }, + { + "role": "Stock User" + }, + { + "role": "Accounts User" + } + ], "source": "Warehouse wise Stock Value", "timeseries": 0, "type": "Bar", diff --git a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json index 0c4757ffadb..c1e5878a439 100644 --- a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json +++ b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json @@ -113,7 +113,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-05-17 11:46:04.448220", + "modified": "2024-12-19 13:48:46.618066", "modified_by": "Administrator", "module": "Stock", "name": "Closing Stock Balance", @@ -121,6 +121,7 @@ "owner": "Administrator", "permissions": [ { + "cancel": 1, "create": 1, "delete": 1, "email": 1, @@ -130,6 +131,35 @@ "report": 1, "role": "System Manager", "share": 1, + "submit": 1, + "write": 1 + }, + { + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock User", + "share": 1, + "submit": 1, "write": 1 } ], diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 523a1d15cee..c0c72d9b3ee 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -41,6 +41,7 @@ class StockLedgerEntry(Document): self.flags.ignore_submit_comment = True from erpnext.stock.utils import validate_disabled_warehouse, validate_warehouse_company + self.set_posting_datetime() self.validate_mandatory() self.validate_item() self.validate_batch() @@ -56,7 +57,6 @@ class StockLedgerEntry(Document): from erpnext.stock.utils import get_combine_datetime self.posting_datetime = get_combine_datetime(self.posting_date, self.posting_time) - self.db_set("posting_datetime", self.posting_datetime) def validate_inventory_dimension_negative_stock(self): if self.is_cancelled: @@ -128,7 +128,6 @@ class StockLedgerEntry(Document): return inv_dimension_dict def on_submit(self): - self.set_posting_datetime() self.check_stock_frozen_date() self.calculate_batch_qty()