Merge pull request #18570 from rohitwaghchaure/add_serial_no_button_not_working
fix: add serial no button not working for the delivery note
diff --git a/erpnext/accounts/doctype/bank/bank_dashboard.py b/erpnext/accounts/doctype/bank/bank_dashboard.py
index e047b9a..4a1dad8 100644
--- a/erpnext/accounts/doctype/bank/bank_dashboard.py
+++ b/erpnext/accounts/doctype/bank/bank_dashboard.py
@@ -6,16 +6,10 @@
def get_data():
return {
'fieldname': 'bank',
- 'non_standard_fieldnames': {
- 'Paymnet Order': 'company_bank'
- },
'transactions': [
{
'label': _('Bank Deatils'),
'items': ['Bank Account', 'Bank Guarantee']
- },
- {
- 'items': ['Payment Order']
}
]
}
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index b774037..d2db9d0 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -82,7 +82,7 @@
item.net_rate = item.rate
- if not item.qty and self.doc.is_return:
+ if not item.qty and self.doc.get("is_return"):
item.amount = flt(-1 * item.rate, item.precision("amount"))
else:
item.amount = flt(item.rate * item.qty, item.precision("amount"))
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 39dda92..2e5f255 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -255,27 +255,44 @@
});
return;
} else {
- var fields = [
- {fieldtype:'Table', fieldname: 'items',
- description: __('Select BOM and Qty for Production'),
- fields: [
- {fieldtype:'Read Only', fieldname:'item_code',
- label: __('Item Code'), in_list_view:1},
- {fieldtype:'Link', fieldname:'bom', options: 'BOM', reqd: 1,
- label: __('Select BOM'), in_list_view:1, get_query: function(doc) {
- return {filters: {item: doc.item_code}};
- }},
- {fieldtype:'Float', fieldname:'pending_qty', reqd: 1,
- label: __('Qty'), in_list_view:1},
- {fieldtype:'Data', fieldname:'sales_order_item', reqd: 1,
- label: __('Sales Order Item'), hidden:1}
- ],
- data: r.message,
- get_data: function() {
- return r.message
+ const fields = [{
+ label: 'Items',
+ fieldtype: 'Table',
+ fieldname: 'items',
+ description: __('Select BOM and Qty for Production'),
+ fields: [{
+ fieldtype: 'Read Only',
+ fieldname: 'item_code',
+ label: __('Item Code'),
+ in_list_view: 1
+ }, {
+ fieldtype: 'Link',
+ fieldname: 'bom',
+ options: 'BOM',
+ reqd: 1,
+ label: __('Select BOM'),
+ in_list_view: 1,
+ get_query: function (doc) {
+ return { filters: { item: doc.item_code } };
}
+ }, {
+ fieldtype: 'Float',
+ fieldname: 'pending_qty',
+ reqd: 1,
+ label: __('Qty'),
+ in_list_view: 1
+ }, {
+ fieldtype: 'Data',
+ fieldname: 'sales_order_item',
+ reqd: 1,
+ label: __('Sales Order Item'),
+ hidden: 1
+ }],
+ data: r.message,
+ get_data: () => {
+ return r.message
}
- ]
+ }]
var d = new frappe.ui.Dialog({
title: __('Select Items to Manufacture'),
fields: fields,