public List<UltimoNumeroComprobante> NumeracionPorComprobantesExportacion( Autorizacion autorizacion, int puntoDeVenta ) { List<UltimoNumeroComprobante> retorno = new List<UltimoNumeroComprobante>(); ConsultasWSFex consulta = new ConsultasWSFex( this.wsfex ); try { List<Comprobante> comprobantes = consulta.ObtenerTiposDeComprobante( autorizacion ); foreach ( Comprobante comprobante in comprobantes ) { long ultimoNumero = consulta.UltimoComprobante( autorizacion, puntoDeVenta, comprobante.Id ); retorno.Add( new UltimoNumeroComprobante() { TipoComprobante = comprobante.Id, UltimoNumero = (int) ultimoNumero } ); } } catch ( ExcepcionFe error ) { ValidacionException ex = new ValidacionException( "NumeracionPorComprobantes", error.Message ); this.MensajeDeError = error.Message; throw ex; } return retorno; }
private long UltimoComprobanteFex( Autorizacion autorizacion, int pventa, int tipoComprobante ) { ConsultasWSFex consulta = new ConsultasWSFex( this.wsfex, this.logueador ); return consulta.UltimoComprobante( autorizacion, pventa, tipoComprobante ); }