Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
a399486
fix: manage advance payment allocation form Advance Payment Ledger Entry
ljain112 Jul 1, 2025
ea4c75a
chore: fix test case for expected gl entry in advance adjustment
ljain112 Jul 1, 2025
0b0f4b0
chore: removed redundant code
ljain112 Jul 2, 2025
ce987ec
fix: Merge branch 'develop' into fix-advance-payment
ljain112 Jul 3, 2025
d4cc07a
fix: reposting for advance payment ledger entry
ljain112 Jul 3, 2025
c7b5333
fix: ignore linked doctypes `Advance Payment Ledger Entry` on cancel
ljain112 Jul 3, 2025
86d41d4
fix: update payment request before making gl entries
ljain112 Jul 3, 2025
27d3e7c
fix(test): on unreconcile of order advance paid amount will get updated
ljain112 Jul 3, 2025
5844892
fix: set advance_payment_status for advance_doctypes
ljain112 Jul 3, 2025
b35a14c
fix(test): for orders also outstanding is now updated and remove redu…
ljain112 Jul 4, 2025
90b4ca3
chore: revert unnecessary changes
ljain112 Jul 4, 2025
cd43b82
fix: delete linked Advance payment ledger entries on reposting
ljain112 Jul 4, 2025
c573399
fix: update payment request before creating gl entries
ljain112 Jul 4, 2025
3b2b871
fix: patch to create Advance Payment Ledger Entry
ljain112 Jul 4, 2025
dd00f08
fix: update unadjusted amount in Advance Payment Ledger Entry
ljain112 Jul 5, 2025
e4ba9e1
fix: Merge branch 'develop' into fix-advance-payment
ljain112 Jul 9, 2025
e5f9baf
fix: patch for updating existing payment ledger entries
ljain112 Jul 10, 2025
f5beda4
fix(pick list): make warehouse editable
ravibharathi656 Jul 23, 2025
d3253d7
revert: do not save when set email campaign status
ravibharathi656 Jul 23, 2025
f6b3796
fix: Merge branch 'develop' into fix-advance-payment
ljain112 Jul 24, 2025
dc841fe
fix: attribute error in payment entry
ljain112 Jul 26, 2025
b5a87ed
fix: update advance doctype outstanding
ljain112 Jul 29, 2025
e820729
fix: Merge branch 'develop' into fix-advance-payment
ljain112 Jul 29, 2025
c59b97d
fix: delink payment entry on cancellation of payment entry
ljain112 Jul 29, 2025
e6b6452
refactor: use function to get advance doctypes
ljain112 Jul 29, 2025
2a95f3a
fix: set party currency in advance doctype and remove unused import
ljain112 Jul 29, 2025
ac47b42
Merge pull request #48759 from aerele/revert-39776
khushi8112 Jul 29, 2025
f13d98f
fix: include empty values in user permission
l0gesh29 Jul 29, 2025
f7ee9ee
chore: added test case for reconciliation_effect_date
ljain112 Jul 29, 2025
4c08165
Merge pull request #48782 from ljain112/fix-silly
ruthra-kumar Jul 29, 2025
cf70147
fix: ignore is overridden by transaction.js upon clicking cancel
ruthra-kumar Jul 29, 2025
b8015d1
Merge pull request #48837 from ruthra-kumar/fix_link_error_on_po_canc…
ruthra-kumar Jul 29, 2025
c18d565
fix: change modified timestamp so migrations work
the-bokya Jul 29, 2025
1deedc7
fix: serial no warehouse for backdated stock reco
rohitwaghchaure Jul 29, 2025
a7a6ca1
Merge pull request #48841 from rohitwaghchaure/fixed-support-45167
rohitwaghchaure Jul 29, 2025
f6212f7
fix: set mandatory field for pos search fields
Jul 29, 2025
7970819
Merge pull request #48743 from aerele/pick-list-location-warehouse
rohitwaghchaure Jul 29, 2025
3eda12b
fix: do not set cancel as event
ljain112 Jul 29, 2025
45323f4
fix: remove validation and set_advance_payment_status
ljain112 Jul 29, 2025
140698d
feat: list view on item selector in pos
diptanilsaha Jul 29, 2025
bb129b7
Merge pull request #48835 from aerele/user-permission-report
ruthra-kumar Jul 29, 2025
99f7eb3
fix: update advance paid amount on unreconcile
ravibharathi656 Jul 29, 2025
c41adc4
Merge pull request #48845 from diptanilsaha/feat_item_selector_list_view
diptanilsaha Jul 29, 2025
89564bd
Merge pull request #48844 from aerele/pos-search-fields
diptanilsaha Jul 29, 2025
9c14aa0
Merge pull request #48839 from frappe/mihirs_fault
diptanilsaha Jul 29, 2025
b9b3302
Update CODEOWNERS
mihir-kandoi Jul 29, 2025
30b3570
Merge pull request #48851 from mihir-kandoi/develop
mihir-kandoi Jul 29, 2025
f646372
fix: Merge branch 'develop' into fix-advance-payment
ljain112 Jul 30, 2025
6da0e1e
chore: remove redundant code
ljain112 Jul 30, 2025
b2bd580
chore: remove unused import
ljain112 Jul 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ erpnext/assets/ @khushi8112
erpnext/regional @ruthra-kumar
erpnext/selling @ruthra-kumar
erpnext/support/ @ruthra-kumar
pos*
pos* @diptanilsaha

erpnext/buying/ @rohitwaghchaure
erpnext/buying/ @rohitwaghchaure @mihir-kandoi
erpnext/maintenance/ @rohitwaghchaure
erpnext/manufacturing/ @rohitwaghchaure
erpnext/manufacturing/ @rohitwaghchaure @mihir-kandoi
erpnext/quality_management/ @rohitwaghchaure
erpnext/stock/ @rohitwaghchaure
erpnext/subcontracting @rohitwaghchaure
erpnext/stock/ @rohitwaghchaure @mihir-kandoi
erpnext/subcontracting @mihir-kandoi

erpnext/controllers/ @ruthra-kumar @rohitwaghchaure
erpnext/controllers/ @ruthra-kumar @rohitwaghchaure @mihir-kandoi
erpnext/patches/ @ruthra-kumar

.github/ @ruthra-kumar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"against_voucher_no",
"amount",
"currency",
"event"
"event",
"delinked"
],
"fields": [
{
Expand Down Expand Up @@ -68,12 +69,20 @@
"label": "Company",
"options": "Company",
"read_only": 1
},
{
"default": "0",
"fieldname": "delinked",
"fieldtype": "Check",
"label": "DeLinked",
"read_only": 1
}
],
"grid_page_length": 50,
"in_create": 1,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-11-05 10:31:28.736671",
"modified": "2025-07-29 11:37:42.678556",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Advance Payment Ledger Entry",
Expand Down Expand Up @@ -107,7 +116,8 @@
"share": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt

# import frappe
import frappe
from frappe.model.document import Document

from erpnext.accounts.utils import update_voucher_outstanding


class AdvancePaymentLedgerEntry(Document):
# begin: auto-generated types
Expand All @@ -19,9 +21,16 @@ class AdvancePaymentLedgerEntry(Document):
amount: DF.Currency
company: DF.Link | None
currency: DF.Link | None
delinked: DF.Check
event: DF.Data | None
voucher_no: DF.DynamicLink | None
voucher_type: DF.Link | None
# end: auto-generated types

pass
def on_update(self):
if (
self.against_voucher_type in ["Purchase Order", "Sales Order"]
and self.flags.update_outstanding == "Yes"
and not frappe.flags.is_reverse_depr_entry
):
update_voucher_outstanding(self.against_voucher_type, self.against_voucher_no, None, None, None)
102 changes: 51 additions & 51 deletions erpnext/accounts/doctype/journal_entry/journal_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ def on_submit(self):
self.validate_cheque_info()
self.check_credit_limit()
self.make_gl_entries()
self.make_advance_payment_ledger_entries()
self.update_advance_paid()
self.update_asset_value()
self.update_inter_company_jv()
self.update_invoice_discounting()
Expand Down Expand Up @@ -298,8 +296,6 @@ def on_cancel(self):
"Advance Payment Ledger Entry",
)
self.make_gl_entries(1)
self.make_advance_payment_ledger_entries()
self.update_advance_paid()
self.unlink_advance_entry_reference()
self.unlink_asset_reference()
self.unlink_inter_company_jv()
Expand All @@ -309,18 +305,6 @@ def on_cancel(self):
def get_title(self):
return self.pay_to_recd_from or self.accounts[0].account

def update_advance_paid(self):
advance_paid = frappe._dict()
advance_payment_doctypes = get_advance_payment_doctypes()
for d in self.get("accounts"):
if d.is_advance:
if d.reference_type in advance_payment_doctypes:
advance_paid.setdefault(d.reference_type, []).append(d.reference_name)

for voucher_type, order_list in advance_paid.items():
for voucher_no in list(set(order_list)):
frappe.get_doc(voucher_type, voucher_no).set_total_advance_paid()

def validate_inter_company_accounts(self):
if self.voucher_type == "Inter Company Journal Entry" and self.inter_company_journal_entry_reference:
doc = frappe.db.get_value(
Expand Down Expand Up @@ -1195,49 +1179,65 @@ def build_gl_map(self):
self.transaction_exchange_rate = row.exchange_rate
break

advance_doctypes = get_advance_payment_doctypes()

for d in self.get("accounts"):
if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"):
r = [d.user_remark, self.remark]
r = [x for x in r if x]
remarks = "\n".join(r)

row = {
"account": d.account,
"party_type": d.party_type,
"due_date": self.due_date,
"party": d.party,
"against": d.against_account,
"debit": flt(d.debit, d.precision("debit")),
"credit": flt(d.credit, d.precision("credit")),
"account_currency": d.account_currency,
"debit_in_account_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
),
"credit_in_account_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
),
"transaction_currency": self.transaction_currency,
"transaction_exchange_rate": self.transaction_exchange_rate,
"debit_in_transaction_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.debit, d.precision("debit")) / self.transaction_exchange_rate,
"credit_in_transaction_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.credit, d.precision("credit")) / self.transaction_exchange_rate,
"against_voucher_type": d.reference_type,
"against_voucher": d.reference_name,
"remarks": remarks,
"voucher_detail_no": d.reference_detail_no,
"cost_center": d.cost_center,
"project": d.project,
"finance_book": self.finance_book,
"advance_voucher_type": d.advance_voucher_type,
"advance_voucher_no": d.advance_voucher_no,
}

if d.reference_type in advance_doctypes:
row.update(
{
"against_voucher_type": self.doctype,
"against_voucher": self.name,
"advance_voucher_type": d.reference_type,
"advance_voucher_no": d.reference_name,
}
)

gl_map.append(
self.get_gl_dict(
{
"account": d.account,
"party_type": d.party_type,
"due_date": self.due_date,
"party": d.party,
"against": d.against_account,
"debit": flt(d.debit, d.precision("debit")),
"credit": flt(d.credit, d.precision("credit")),
"account_currency": d.account_currency,
"debit_in_account_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
),
"credit_in_account_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
),
"transaction_currency": self.transaction_currency,
"transaction_exchange_rate": self.transaction_exchange_rate,
"debit_in_transaction_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.debit, d.precision("debit")) / self.transaction_exchange_rate,
"credit_in_transaction_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.credit, d.precision("credit")) / self.transaction_exchange_rate,
"against_voucher_type": d.reference_type,
"against_voucher": d.reference_name,
"remarks": remarks,
"voucher_detail_no": d.reference_detail_no,
"cost_center": d.cost_center,
"project": d.project,
"finance_book": self.finance_book,
},
row,
item=d,
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"reference_name",
"reference_due_date",
"reference_detail_no",
"advance_voucher_type",
"advance_voucher_no",
"col_break3",
"is_advance",
"user_remark",
Expand Down Expand Up @@ -262,20 +264,37 @@
"hidden": 1,
"label": "Reference Detail No",
"no_copy": 1
},
{
"fieldname": "advance_voucher_type",
"fieldtype": "Link",
"label": "Advance Voucher Type",
"no_copy": 1,
"options": "DocType",
"read_only": 1
},
{
"fieldname": "advance_voucher_no",
"fieldtype": "Dynamic Link",
"label": "Advance Voucher No",
"no_copy": 1,
"options": "advance_voucher_type",
"read_only": 1
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2024-03-27 13:09:58.647732",
"modified": "2025-07-25 04:45:28.117715",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",
"naming_rule": "Random",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ class JournalEntryAccount(Document):
account: DF.Link
account_currency: DF.Link | None
account_type: DF.Data | None
advance_voucher_no: DF.DynamicLink | None
advance_voucher_type: DF.Link | None
against_account: DF.Text | None
balance: DF.Currency
bank_account: DF.Link | None
cost_center: DF.Link | None
credit: DF.Currency
Expand All @@ -31,7 +32,6 @@ class JournalEntryAccount(Document):
parentfield: DF.Data
parenttype: DF.Data
party: DF.DynamicLink | None
party_balance: DF.Currency
party_type: DF.Link | None
project: DF.Link | None
reference_detail_no: DF.Data | None
Expand Down
Loading
Loading