Item - what the "Customer Details"? for?

there is a section “Customer Details” in the Item master. Can anybody explain what effect those have if used?

  • Does it limit the item to the customers listed in that table?
  • also what is the ‘Ref Code’ field (which apparently is mandatory) refer to? Something like the “Item Code” for that item on the customer’s side?

Hi

I take this to mean a reference code or part number that only a particular customer uses which may be different to it’s normal item code or supplier code (if it has one)

you would imagine something of that sort. But it does not show on any document (SO/SINV), so I am wondering what it actually does.

tested. Answer is ‘no’, still an item with listings in the “Customer Details” can be chosen in PO/SINV for any costumer (listed or not).

Its a field used to track the customer’s item code. It doesn’t automatically appear on sales invoices, but you can customize the forms to make it appear.

This is used when the customer wants a supplier to use their item code reference instead of supplier’s in the sales/purchase documents.

2 Likes

I want to use this customer details section as for the limitation of items in PO SO SIN ect
like when i have selected the customer in Sales order only items should be display where customer is selected in the item form. im using this script but problem is only 1 item is comming and i have selected this customer in multiple items.

frappe.ui.form.on('Sales Order', {
customer(frm) {
	frappe.call({
method:"erpnext.selling.doctype.sales_order.func.custitems",
args:{
	cust: frm.doc.customer
},
callback: function(r) {
	if (r.message) {
		
	  cur_frm.set_query("item_code", "items", function(doc, cdt, cdn) {
        var d = locals[cdt][cdn];
return{
	filters: [
		['Item', 'name', 'in' , r.message[0]]
	]
};
    });  
		
	}
}
});



}
});

.js

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt

from _future_ import unicode_literals
import frappe, erpnext
import frappe.defaults
from frappe import _
from frappe.utils import cstr, cint, flt, comma_or, getdate, nowdate, formatdate,         format_time




@frappe.whitelist()
def custitems(cust):
items = []	
scrapitems = frappe.db.sql("select parent from `tabItem Customer Detail` where customer_name = %s", cust)
for item in scrapitems:
	items.append(item[0])
	

return items

.py