[lint] fixes
This commit is contained in:
parent
ae450fc23b
commit
89d001caf3
@ -273,7 +273,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
|
||||
} else if((this.frm.doc.doctype === 'Purchase Receipt' && me.frm.doc.is_return) ||
|
||||
this.frm.doc.doctype === 'Delivery Note') {
|
||||
show_batch_dialog = 1;
|
||||
show_batch_dialog = 1;
|
||||
}
|
||||
|
||||
// clear barcode if setting item (else barcode will take priority)
|
||||
@ -1186,7 +1186,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
|
||||
erpnext.show_serial_batch_selector = function(frm, d) {
|
||||
frappe.require("assets/erpnext/js/utils/serial_no_batch_selector.js", function() {
|
||||
let serial_no_batch_selector = new erpnext.SerialNoBatchSelector({
|
||||
new erpnext.SerialNoBatchSelector({
|
||||
frm: frm,
|
||||
item: d,
|
||||
warehouse_details: {
|
||||
|
@ -124,8 +124,6 @@ erpnext.SerialNoBatchSelector = Class.extend({
|
||||
},
|
||||
|
||||
set_items: function() {
|
||||
var me = this;
|
||||
|
||||
if(this.has_batch) {
|
||||
this.values.batches.map((batch, i) => {
|
||||
let row = (i !== 0) ? this.frm.add_child("items") : this.item;
|
||||
@ -135,6 +133,7 @@ erpnext.SerialNoBatchSelector = Class.extend({
|
||||
// let grid_row = me.frm.fields_dict.items.grid.grid_rows[index];
|
||||
// grid_row.toggle_editable_row();
|
||||
// grid_row.on_grid_fields_dict.item_code.set_value(this.item_code);
|
||||
|
||||
row.item_code = this.item_code;
|
||||
}
|
||||
this.map_row_values(row, batch, 'batch_no',
|
||||
@ -165,7 +164,6 @@ erpnext.SerialNoBatchSelector = Class.extend({
|
||||
let batches_field = this.dialog.fields_dict.batches;
|
||||
|
||||
let qty_field = this.dialog.fields_dict.qty;
|
||||
let item_code = this.item_code;
|
||||
|
||||
let update_quantity = (batch) => {
|
||||
if(batch) {
|
||||
@ -181,7 +179,7 @@ erpnext.SerialNoBatchSelector = Class.extend({
|
||||
.replace(/\n/g, ' ').match(/\S+/g) || [];
|
||||
qty_field.set_input(serial_numbers.length);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if(serial_no_link) {
|
||||
let serial_list = [];
|
||||
@ -304,9 +302,10 @@ erpnext.SerialNoBatchSelector = Class.extend({
|
||||
}
|
||||
if(me.warehouse_details.type === 'Source Warehouse' &&
|
||||
parseFloat(available_qty) < parseFloat(selected_qty)) {
|
||||
this.set_value('0');
|
||||
frappe.throw(__(`For transfer from source, selected quantity cannot be
|
||||
greater than available quantity`));
|
||||
|
||||
this.set_value('0');
|
||||
frappe.throw(__(`For transfer from source, selected quantity cannot be
|
||||
greater than available quantity`));
|
||||
} else {
|
||||
this.grid.refresh();
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ erpnext.stock.select_batch_and_serial_no = (frm, item) => {
|
||||
}
|
||||
|
||||
frappe.require("assets/erpnext/js/utils/serial_no_batch_selector.js", function() {
|
||||
let serial_no_batch_selector = new erpnext.SerialNoBatchSelector({
|
||||
new erpnext.SerialNoBatchSelector({
|
||||
frm: frm,
|
||||
item: item,
|
||||
warehouse_details: get_warehouse_type_and_name(item),
|
||||
|
Loading…
x
Reference in New Issue
Block a user