POS create button and function is to get all unpaid invoices from sales invoice and display it into POS customers queue

how can I create a button on POS and the function is will get all unpaid sales invoices in Sales Invoice and display it on Customers Queue in POS? Any tips or idea on how I can achieve this?