mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
fix(je): preserve account on duplicate row when party row exists (#55180)
(cherry picked from commit 57dbac712f)
Co-authored-by: Gajendra Nishad <75714258+gajjug004@users.noreply.github.com>
This commit is contained in:
@@ -433,15 +433,17 @@ erpnext.accounts.JournalEntry = class JournalEntry extends frappe.ui.form.Contro
|
|||||||
|
|
||||||
accounts_add(doc, cdt, cdn) {
|
accounts_add(doc, cdt, cdn) {
|
||||||
var row = frappe.get_doc(cdt, cdn);
|
var row = frappe.get_doc(cdt, cdn);
|
||||||
row.exchange_rate = 1;
|
if (!row.exchange_rate) row.exchange_rate = 1;
|
||||||
$.each(doc.accounts, function (i, d) {
|
if (!row.account) {
|
||||||
if (d.account && d.party && d.party_type) {
|
$.each(doc.accounts, function (i, d) {
|
||||||
row.account = d.account;
|
if (d.account && d.party && d.party_type) {
|
||||||
row.party = d.party;
|
row.account = d.account;
|
||||||
row.party_type = d.party_type;
|
row.party = d.party;
|
||||||
row.exchange_rate = d.exchange_rate;
|
row.party_type = d.party_type;
|
||||||
}
|
row.exchange_rate = d.exchange_rate;
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// set difference
|
// set difference
|
||||||
if (doc.difference) {
|
if (doc.difference) {
|
||||||
|
|||||||
Reference in New Issue
Block a user