public void Anular() { if (this.Existe && this.Anulado == false) { this.Estado = 90; // Marco el recibo como anulado qGen.Update Act = new qGen.Update(this.TablaDatos); Act.ColumnValues.AddWithValue("estado", this.Estado); Act.WhereClause = new qGen.Where(this.CampoId, this.Id); this.Connection.ExecuteNonQuery(Act); Lbl.Sys.Config.ActionLog(this.Connection, Lbl.Sys.Log.Acciones.Delete, this, null); if (this.DePago) { foreach (Pago Pg in this.Pagos) { Pg.Anular(); } } else { foreach (Cobro Cb in this.Cobros) { Cb.Anular(); } } DescancelarImpagos(this.Cliente, this.Facturas, this, this.DePago ? -this.Total : this.Total); this.Cliente.CuentaCorriente.Movimiento(true, this.Concepto, "Anulación de " + this.ToString(), this.DePago ? -this.Total : this.Total, this.Obs, null, this, null); } }