Merge branch 'version-13-hotfix' into redisearch-app-install-v13

This commit is contained in:
Marica
2022-04-04 18:01:36 +05:30
committed by GitHub
3 changed files with 5 additions and 11 deletions

View File

@@ -243,7 +243,7 @@ erpnext.PointOfSale.ItemSelector = class {
value: "+1",
item: { item_code, batch_no, serial_no, uom, rate }
});
me.set_search_value('');
me.search_field.set_focus();
});
this.search_field.$input.on('input', (e) => {
@@ -328,6 +328,7 @@ erpnext.PointOfSale.ItemSelector = class {
add_filtered_item_to_cart() {
this.$items_container.find(".item-wrapper").click();
this.set_search_value('');
}
resize_selector(minimize) {

View File

@@ -631,7 +631,7 @@ frappe.ui.form.on('Stock Entry Detail', {
// set allow_zero_valuation_rate to 0 if s_warehouse is selected.
let item = frappe.get_doc(cdt, cdn);
if (item.s_warehouse) {
item.allow_zero_valuation_rate = 0;
frappe.model.set_value(cdt, cdn, "allow_zero_valuation_rate", 0);
}
},

View File

@@ -866,16 +866,9 @@ class update_entries_after(object):
index = i
break
# If no entry found with outgoing rate, collapse stack
# If no entry found with outgoing rate, consume as per FIFO
if index is None: # nosemgrep
new_stock_value = (
sum((d[0] * d[1] for d in self.wh_data.stock_queue)) - qty_to_pop * outgoing_rate
)
new_stock_qty = sum((d[0] for d in self.wh_data.stock_queue)) - qty_to_pop
self.wh_data.stock_queue = [
[new_stock_qty, new_stock_value / new_stock_qty if new_stock_qty > 0 else outgoing_rate]
]
break
index = 0
else:
index = 0