Manual invoice numbering and by naming series both using at same time in sales invoice

Need a manual invoice number for invoice through api, Also for back office sales need invoice number from naming series, How to achieve this