Merge branch 'develop' into subcontracting

This commit is contained in:
Sagar Sharma 2022-06-29 17:29:24 +05:30 committed by GitHub
commit 6589c5f5e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 2 deletions

View File

@ -128,6 +128,7 @@ class ReceivablePayableReport(object):
credit_note_in_account_currency=0.0, credit_note_in_account_currency=0.0,
outstanding_in_account_currency=0.0, outstanding_in_account_currency=0.0,
) )
self.get_invoices(ple)
if self.filters.get("group_by_party"): if self.filters.get("group_by_party"):
self.init_subtotal_row(ple.party) self.init_subtotal_row(ple.party)

View File

@ -455,7 +455,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends e
company: me.frm.doc.company company: me.frm.doc.company
}, },
allow_child_item_selection: true, allow_child_item_selection: true,
child_fielname: "items", child_fieldname: "items",
child_columns: ["item_code", "qty"] child_columns: ["item_code", "qty"]
}) })
}, __("Get Items From")); }, __("Get Items From"));

View File

@ -717,7 +717,7 @@ erpnext.utils.map_current_doc = function(opts) {
get_query: opts.get_query, get_query: opts.get_query,
add_filters_group: 1, add_filters_group: 1,
allow_child_item_selection: opts.allow_child_item_selection, allow_child_item_selection: opts.allow_child_item_selection,
child_fieldname: opts.child_fielname, child_fieldname: opts.child_fieldname,
child_columns: opts.child_columns, child_columns: opts.child_columns,
size: opts.size, size: opts.size,
action: function(selections, args) { action: function(selections, args) {

View File

@ -260,6 +260,16 @@ erpnext.stock.move_item = function (item, source, target, actual_qty, rate, call
} }
dialog.set_primary_action(__('Create Stock Entry'), function () { 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 () { frappe.model.with_doctype('Stock Entry', function () {
let doc = frappe.model.get_new_doc('Stock Entry'); let doc = frappe.model.get_new_doc('Stock Entry');
doc.from_warehouse = dialog.get_value('source'); doc.from_warehouse = dialog.get_value('source');