Merge pull request #6384 from saurabh6790/v7.1_Journal_Entry_Opening_Entry
[fix] #5992
This commit is contained in:
commit
b1bb1727ff
@ -259,7 +259,6 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
|
|||||||
if(!doc.company) return;
|
if(!doc.company) return;
|
||||||
|
|
||||||
var update_jv_details = function(doc, r) {
|
var update_jv_details = function(doc, r) {
|
||||||
var jvdetail = frappe.model.add_child(doc, "Journal Entry Account", "accounts");
|
|
||||||
$.each(r, function(i, d) {
|
$.each(r, function(i, d) {
|
||||||
var row = frappe.model.add_child(doc, "Journal Entry Account", "accounts");
|
var row = frappe.model.add_child(doc, "Journal Entry Account", "accounts");
|
||||||
row.account = d.account;
|
row.account = d.account;
|
||||||
@ -268,7 +267,7 @@ cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {
|
|||||||
refresh_field("accounts");
|
refresh_field("accounts");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(doc.accounts || []).length) {
|
if((!(doc.accounts || []).length) || ((doc.accounts || []).length==1 && !doc.accounts[0].account)) {
|
||||||
if(in_list(["Bank Entry", "Cash Entry"], doc.voucher_type)) {
|
if(in_list(["Bank Entry", "Cash Entry"], doc.voucher_type)) {
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user