[pos] moved pos realted code from sales_invoice.js to transaction.js