fix: set pos data if not return doc

This commit is contained in:
ljain112
2024-07-18 17:40:19 +05:30
parent 57f928da55
commit 65d672da65

View File

@@ -505,11 +505,12 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
frappe.msgprint(__("Please specify Company to proceed")); frappe.msgprint(__("Please specify Company to proceed"));
} else { } else {
var me = this; var me = this;
const for_validate = me.frm.doc.is_return ? true : false;
return this.frm.call({ return this.frm.call({
doc: me.frm.doc, doc: me.frm.doc,
method: "set_missing_values", method: "set_missing_values",
args: { args: {
for_validate: true, for_validate: for_validate,
}, },
callback: function (r) { callback: function (r) {
if (!r.exc) { if (!r.exc) {