first stage for saving invoices