How to save stock transfer if the following error ‘Null pointer exception’ occurs on done button click ?

Suggestion:
When we are transferring any material one location to another location then using this option we can transfer the materials. This option is used for material to move from one physical location to another location. In details, after entering location code where the user wants to move the stock. System will set the total quantity for the item from stock. The user will then have to enter the required quantity which is required to move the stock in new location code. Users have to select the lot number and lot Sl before saving the transaction.