refactoring template facturacion