Barcode in purchase

you mean create PO and PI items via scan barcode?
refer to this

the most updated code is here