Skip to content

Commit

Permalink
fix: set pos data if not return doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ljain112 committed Jul 18, 2024
1 parent 57f928d commit 65d672d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/accounts/doctype/sales_invoice/sales_invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,12 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
frappe.msgprint(__("Please specify Company to proceed"));
} else {
var me = this;
const for_validate = me.frm.doc.is_return ? true : false;
return this.frm.call({
doc: me.frm.doc,
method: "set_missing_values",
args: {
for_validate: true,
for_validate: for_validate,
},
callback: function (r) {
if (!r.exc) {
Expand Down

0 comments on commit 65d672d

Please sign in to comment.