Click on the Item Name of the product you're wanting to add a code for.

The manage item screen will show.

Under the supplier codes section type in the supplier name.

Make sure the Unit & Cost for the item are correct.

Enter a Brand if necessary.

Type in the Stock Code under the supplier codes section for this item, then click Save.

Now the code will automatically show when you add this item to a purchase order. (Please note you can add as many suppliers as you would like under the supplier codes section in case you order this item from more than one supplier.)