Customer Show in Serial No doctype

I want that when any serialised no. Item delivered to a customer then that customer show in that serial no.
For this i can identify that Serial No Item sold to this customer

Server-side logic is required when submitting the delivery doc and updating the serial no doctype.

Thank you,

Could you give some logic , How can i handle it

For now i write script for ‘Serial and Batch Bundle’ doctype i take serial no. from here and doctype, voucher no. and take customer name from that voucher and then update in serial no. doctype