Merge branch 'develop' into subcontracting
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index 1911152..411b313 100755
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -128,6 +128,7 @@
credit_note_in_account_currency=0.0,
outstanding_in_account_currency=0.0,
)
+ self.get_invoices(ple)
if self.filters.get("group_by_party"):
self.init_subtotal_row(ple.party)
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index c635a7f..2b1e3ce 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -455,7 +455,7 @@
company: me.frm.doc.company
},
allow_child_item_selection: true,
- child_fielname: "items",
+ child_fieldname: "items",
child_columns: ["item_code", "qty"]
})
}, __("Get Items From"));
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index 68b3e2e..62abb74 100755
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -717,7 +717,7 @@
get_query: opts.get_query,
add_filters_group: 1,
allow_child_item_selection: opts.allow_child_item_selection,
- child_fieldname: opts.child_fielname,
+ child_fieldname: opts.child_fieldname,
child_columns: opts.child_columns,
size: opts.size,
action: function(selections, args) {
diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js
index c9d5f61..6e7622c 100644
--- a/erpnext/stock/dashboard/item_dashboard.js
+++ b/erpnext/stock/dashboard/item_dashboard.js
@@ -260,6 +260,16 @@
}
dialog.set_primary_action(__('Create Stock Entry'), function () {
+ if (source && (dialog.get_value("qty") == 0 || dialog.get_value("qty") > actual_qty)) {
+ frappe.msgprint(__("Quantity must be greater than zero, and less or equal to {0}", [actual_qty]));
+ return;
+ }
+
+ if (dialog.get_value("source") === dialog.get_value("target")) {
+ frappe.msgprint(__("Source and target warehouse must be different"));
+ return;
+ }
+
frappe.model.with_doctype('Stock Entry', function () {
let doc = frappe.model.get_new_doc('Stock Entry');
doc.from_warehouse = dialog.get_value('source');