diff --git a/Bancos/RepIE.aspx.vb b/Bancos/RepIE.aspx.vb index 86d45e51d..9abca51fc 100644 --- a/Bancos/RepIE.aspx.vb +++ b/Bancos/RepIE.aspx.vb @@ -159,7 +159,7 @@ Partial Class Bancos_RepIE If ChkTotalizar.Checked Then Dim SaldoDolares = DtDatos.SUM("Importe", "CveMoneda = 2") * GlobalTipoCambio(Now) - SaldoTotal.Text = (DtDatos.SUM("Importe") + SaldoDolares).ToString.FormatoNumero + SaldoTotal.Text = DtDatos.SUM("ImporteMN").ToString.FormatoNumero '(DtDatos.SUM("Importe") + SaldoDolares).ToString.FormatoNumero LtlSaldo.Text = DtDatos.SUM("Importe", "CveMoneda = 1").ToString.FormatoNumero LtlSaldoDolares.Text = DtDatos.SUM("Importe", "CveMoneda = 2").ToString.FormatoNumero DivIndicador.Visible = True diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 62d1d7386..d096c8df3 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1353,7 +1353,7 @@ Partial Class Compras_Compras ''End If 'Carga Compra - If UsuarioActual.Empresa.Funcionalidad(123).ToEntero > 0 And Not UsuarioActual.TienePermisoProceso(156) Then + If UsuarioActual.Empresa.Funcionalidad(123) <> "" And Not UsuarioActual.TienePermisoProceso(156) Then If Not ValidaCierrePeriodo() Then Alert("El periodo de la compra actual ya se encuentra cerrado. No podra registrar la compra.", TipoMensaje.MsgAdvertencia) BtnGuardar.Visible = False @@ -14224,7 +14224,7 @@ Partial Class Compras_Compras Protected Sub BtnRefacturacionVer_Click(sender As Object, e As EventArgs) Handles BtnRefacturacionVer.Click Dim Opcion As Integer = 1 - If UsuarioActual.CveEmpresa.Contiene(119, 72) Then Opcion = 2 + If UsuarioActual.CveEmpresa.Contiene(119, 72, 1) Then Opcion = 2 Dim ObjCompras As New ClsCompras diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 9fd43424e..20e4db652 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -4040,7 +4040,7 @@ Partial Class PopUpVerFactura Dim Mov As New ClsContabilidad If Mov.GetPrePolizasDetalle(-1, CveIE) Then - dtMovs = Mov.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,312)") + dtMovs = Mov.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,308,309,312)") If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then 'CONVIERTO A PESOS CUANDO SE PAGA CON PESOS FACTURAS DE DOLARES diff --git a/General/PopUpPaqueteriasGuias.aspx b/General/PopUpPaqueteriasGuias.aspx index 3d8060faf..f1de891ee 100644 --- a/General/PopUpPaqueteriasGuias.aspx +++ b/General/PopUpPaqueteriasGuias.aspx @@ -208,7 +208,7 @@ - Poliza de Seguro: + Póliza de Seguro: diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 396b7a045..6d6e99153 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -1612,13 +1612,17 @@ Partial Class Inventarios_EntregaAlmacen End If If EsDevolucionVenta = 1 Or TipoDocto.Contiene({"Ped"}) Then - For Each Gvr As GridViewRow In GvDatos.Rows - If Not Gvr.FCCheckBox("cbInv").Checked Or (Gvr.FCCheckBox("cbInv").Checked AndAlso Gvr.FCTextBox("TbCantidadF").Text.ToDecimal <> Gvr.DataKey("CantidadC").ToString.ToDecimal) Then - Alert("Es necesario surtir todos los productos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - Exit Sub - End If - Next + If Not (EsDevolucionVenta = 1 And TipoDocto.Contiene("Rem")) Then ' condicion si hay una devolucion de remision, no verifique la totalidad surtido + For Each Gvr As GridViewRow In GvDatos.Rows + If Not Gvr.FCCheckBox("cbInv").Checked Or (Gvr.FCCheckBox("cbInv").Checked AndAlso Gvr.FCTextBox("TbCantidadF").Text.ToDecimal <> Gvr.DataKey("CantidadC").ToString.ToDecimal) Then + Alert("Es necesario surtir todos los productos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") + Exit Sub + End If + Next + + End If + End If @@ -2304,7 +2308,7 @@ Partial Class Inventarios_EntregaAlmacen CantidadPendientePorSalir = CantidadPendientePorSalir - CantidadEntradaSinCosto End If 'si el alamcen del que salio, es el mismo que entra, no hay traspasos. - If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero Then CveAlmacenTraspasoDestino = 0 + If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero And TipoDocto <> "Rem" Then CveAlmacenTraspasoDestino = 0 If Not ErrorMovInv AndAlso CantidadPendientePorSalir > 0 Then Dim ConceptoMovimiento = 3 @@ -2810,7 +2814,7 @@ Partial Class Inventarios_EntregaAlmacen Dim Fecha As Date = TxtFecha.Text.ToDate ' If(TipoMovimiento <> 1, TxtFecha.Text.ToDate, ObjVentas.DtResultados(0)("Fecha").ToString.ToDate) Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString.ToEntero Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString - Dim Serie As String = ObjVentas.DtResultados(0)("Serie").ToString + Dim Serie As String = ObjVentas.DtResultados(0)("SerieFolio").ToString Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL() Dim TotalCostoAcumulado As Decimal = 0 Dim cont As Integer = 1 diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 341ce617d..59800645b 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3948,6 +3948,10 @@ Partial Class Clientes If DtCxCFact2 IsNot Nothing AndAlso DtCxCFact2.Rows.Count > 0 Then Dim dr As DataRow = DtCxCFact2.Rows(0) Dim lista = New List(Of CrystalParametro) + Dim SaldoDisponible As String = "0.00" + If TxtLimiteCredito.Text.ToDouble > 0 Then + SaldoDisponible = (TxtLimiteCredito.Text.ToDouble - DtCxCFact2.SUM("Saldo", "Tipo = 'Act'").ToString.ToDouble).FormatoNumero + End If lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa)) lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxC.SelectedItem.Text)) lista.Add(New CrystalParametro("NombreCliente", LtlCliente.Text)) @@ -3961,7 +3965,7 @@ Partial Class Clientes lista.Add(New CrystalParametro("ClienteTelefono", TxtTelefono.Text)) lista.Add(New CrystalParametro("DiasCredito", TxtPlazoCobranza.Text)) lista.Add(New CrystalParametro("LimiteCredito", TxtLimiteCredito.Text)) - lista.Add(New CrystalParametro("SaldoDisponible", (TxtLimiteCredito.Text.ToDouble - DtCxCFact2(0)("Saldo").ToString.ToDouble).FormatoNumero)) + lista.Add(New CrystalParametro("SaldoDisponible", SaldoDisponible)) lista.Add(New CrystalParametro("SaldoIngDolares", SaldoIngDolares.FormatoNumero)) lista.Add(New CrystalParametro("SaldoIngPesos", SaldoIngPesos.FormatoNumero)) @@ -3971,9 +3975,7 @@ Partial Class Clientes lista.Add(New CrystalParametro("TotalAnt", TotalAnt.FormatoNumero)) lista.Add(New CrystalParametro("ContaIng", ContaIng)) lista.Add(New CrystalParametro("ContaAnt", ContaAnt)) - - - + If Imagen.Exists Then lista.Add(New CrystalParametro("LogoPath", logouri)) Else diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 029f871b0..cb5ec3879 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -3016,53 +3016,7 @@ - - + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 56ab2f9d3..122b2b6c1 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1710,30 +1710,30 @@ Partial Class Ventas #End Region -#Region "AuxiliarConta" - Property CvePrePolizaNegativa As Integer - Get - If ViewState("CvePrePolizaNegativa") Is Nothing Then - Return -1 - Else - Return ViewState("CvePrePolizaNegativa").ToString.ToEntero - End If + '#Region "AuxiliarConta" + ' Property CvePrePolizaNegativa As Integer + ' Get + ' If ViewState("CvePrePolizaNegativa") Is Nothing Then + ' Return -1 + ' Else + ' Return ViewState("CvePrePolizaNegativa").ToString.ToEntero + ' End If - End Get - Set(value As Integer) - ViewState("CvePrePolizaNegativa") = value - End Set - End Property + ' End Get + ' Set(value As Integer) + ' ViewState("CvePrePolizaNegativa") = value + ' End Set + ' End Property - Private Property DTDatos As DataTable - Get - Return CType(ViewState("DTDatos"), DataTable) - End Get - Set(value As DataTable) - ViewState("DTDatos") = value - End Set - End Property -#End Region + ' Private Property DTDatos As DataTable + ' Get + ' Return CType(ViewState("DTDatos"), DataTable) + ' End Get + ' Set(value As DataTable) + ' ViewState("DTDatos") = value + ' End Set + ' End Property + '#End Region #Region " A C U M U L A D O R E S" @@ -2214,6 +2214,7 @@ Partial Class Ventas If DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then TrAlmacenAsignado.Visible = True + TrAlmacenOrigen.Visible = True End If Dim CveAlmacenDestino As Integer = DtContratos.FiltroPrimeroValor("CveAlmacenDestino", $"CveContrato = {If(DdlContratosModal.Items.Count > 0, DdlContratosModal.SelectedValue, "0")}").ToEntero() @@ -2232,6 +2233,7 @@ Partial Class Ventas Else RequiereAlmacenDestino = False TrAlmacenAsignado.Visible = False + TrAlmacenOrigen.Visible = False End If 'ENVIO DE FACTURA @@ -2244,11 +2246,12 @@ Partial Class Ventas 'Modalidad Contrato If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero() > 0 AndAlso Request("Tipo") IsNot Nothing AndAlso IsNumeric(Request("Tipo")) AndAlso Request("Tipo").Contiene("0", "1") Then - TrAlmacenOrigen.Visible = False + If DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then TrAlmacenAsignado.Visible = True - + TrAlmacenOrigen.Visible = True End If + UPCondicionesPago.Visible = False RequiereAlmacenDestino = True CveContrato = Request("CveContrato").ToEntero() @@ -2477,7 +2480,9 @@ Partial Class Ventas CargaFletes() CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto, AplicaTodos:="") + DdlSubProyecto.SelectedValueExist(DdlSubProyectoDatos.SelectedValue) CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME, AplicaTodos:="") + DdlProyectoPyME.SelectedValueExist(DdlSubProyectoDatos.SelectedValue) BrSubProyecto.Visible = DdlProyecto.Visible divProyectoPyME.Visible = DdlProyecto.Visible @@ -3014,11 +3019,28 @@ Partial Class Ventas DdlAlmacenAsignado.DataBind() End If + Dim CveAlmacenOrigen As Integer = DrContrato("CveAlmacenOrigen").ToString().ToEntero() + + If CveAlmacenOrigen > 0 Then + 'TrAlmacenOrigen.Visible = True + + DdlAlmacenOrigen.Items.Clear() + DdlAlmacenOrigen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1, CveAlmacen:=CveAlmacenOrigen) '.FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}") + DdlAlmacenOrigen.DataBind() + DdlAlmacenOrigen.SelectedValueExist(CveAlmacenOrigen.ToString()) + + End If + If DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then DdlAlmacenAsignado.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}") DdlAlmacenAsignado.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlAlmacenAsignado.SelectedValueExist(CveAlmacenDestino.ToString()) DdlAlmacenAsignado.DataBind() + + DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}") + DdlAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlAlmacenOrigen.SelectedValueExist(CveAlmacenOrigen.ToString()) + DdlAlmacenOrigen.DataBind() End If UpParametros.Update() @@ -3272,7 +3294,10 @@ Partial Class Ventas DdlAlmacenAsignado.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()} {If(DdlTipoComprobante.SelectedValue = "Ped", "", "AND CveTipoAlmacen IN (4,10)")}") DdlAlmacenAsignado.DataBind() DdlAlmacenAsignado.Enabled = True + TrAlmacenAsignado.Visible = True + TrAlmacenOrigen.Visible = True + TrTipoPedido.Visible = True TrObs.InnerText = "No. Serie" SpObs.InnerText = "Contrato" @@ -4078,6 +4103,8 @@ Partial Class Ventas DdlSubProyectoDatos.Items.Insert(0, New ListItem("Seleccione", "-1")) End If DdlSubProyectoDatos.SelectedValueExistInsert(DbRowVenta("CveSubProyecto").ToString(), DbRowVenta("SubProyecto").ToString()) + DdlSubProyecto.SelectedValueExist(DbRowVenta("CveSubProyecto").ToString()) + CargarAlmacenes() If DdlSubProyectoCobranza.Items.Count = 0 Then @@ -7353,16 +7380,20 @@ Partial Class Ventas If ObjContr.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then If ObjContr.DtResultados.Rows.Count > 0 Then - ' si es flexible que notifique el monto maximo, si no lo es que notifique el porcentaje alcanzado... flexible = 2, no flexible = 1 - Dim PorcentajeAvance As Double = ObjContr.DtResultados.Rows(0)("ContratoAvance").ToString().ToDouble + + 'SI ES FLEXIBLE QUE NOTIFIQUE EL MONTO MAXIMO, SI NO LO ES QUE NOTIFIQUE EL PORCENTAJE ALCANZADO... FLEXIBLE = 2, NO FLEXIBLE = 1 If ObjContr.DtResultados.Rows(0)("ModalidadDetalle").ToString() = "1" Then + Dim PorcentajeAvance As Double = ObjContr.DtResultados.Rows(0)("ContratoAvance").ToString().ToDouble If PorcentajeAvance >= 100 Then EnviarNotificacionAvance(ObjContr.DtResultados.Rows(0)("NumeroContrato").ToString(), ObjContr.DtResultados.Rows(0)("DescripcionContrato").ToString(), ObjContr.DtResultados.Rows(0)("ContratoTipo").ToString(), ObjContr.DtResultados.Rows(0)("NombreComercial").ToString(), ObjContr.DtResultados.Rows(0)("CorreoVendedor").ToString()) End If Else Dim MontoMaximo As Double = ObjContr.DtResultados.Rows(0)("ImporteMax").ToString().ToDouble + Dim Avance As Double = ObjContr.DtResultados.Rows(0)("Avance").ToString().ToDouble + + Dim PorcentajeAvance As Double = (Avance / MontoMaximo) * 100 If PorcentajeAvance >= 100 And MontoMaximo > 0 Then EnviarNotificacionAvance(ObjContr.DtResultados.Rows(0)("NumeroContrato").ToString(), ObjContr.DtResultados.Rows(0)("DescripcionContrato").ToString(), ObjContr.DtResultados.Rows(0)("ContratoTipo").ToString(), ObjContr.DtResultados.Rows(0)("NombreComercial").ToString(), ObjContr.DtResultados.Rows(0)("CorreoVendedor").ToString(), MontoMaximo) @@ -7550,7 +7581,6 @@ Partial Class Ventas End If End Sub - Private Sub CreaObjetosVentaAmortizacion(ObjVentas As ClsVentas, FolioFiscalRelacionado As String, CveAnticipoPadre As Integer, Optional CveVentasPadre As Integer = -1, Optional NCDescuento As Boolean = False) ObjFacturaDevolucion = New Modelos.Factura @@ -12239,7 +12269,9 @@ Partial Class Ventas End If If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then - DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo sobre factura en cero", "3")) + If Not DdlTipoAmortizacionAnticipo.Items.Cast(Of ListItem).Any(Function(x) x.Value = "3") Then + DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo sobre factura en cero", "3")) + End If End If If UsuarioActual.Empresa.Funcionalidad(343) = "1" Then @@ -13098,6 +13130,7 @@ Partial Class Ventas If DdlTipoComprobante.SelectedValue = "Rem" Then DdlTipoComprobante.Enabled = False TrAlmacenAsignado.Visible = False + TrAlmacenOrigen.Visible = False UpParametros.Update() End If @@ -14192,6 +14225,7 @@ Partial Class Ventas 'REINICIALIZA VALORES DE ENTREGA POR ADELANTADO RequiereAlmacenDestino = False TrAlmacenAsignado.Visible = False + TrAlmacenOrigen.Visible = False If DdlTipoComprobante.SelectedValue = "Cot" And UsuarioActual.Empresa.Funcionalidad(135) = "1" Then Alert("Se ocupa una autorización.", TipoMensaje.MsgAdvertencia) @@ -14283,10 +14317,21 @@ Partial Class Ventas DdlAlmacenAsignado.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()} AND CveTipoAlmacen IN (10)") DdlAlmacenAsignado.DataBind() End If + + Dim CveAlmacenOrigen As Integer = DtContratos.FiltroPrimeroValor("CveAlmacenOrigen", $"CveContrato = {If(DdlContratosModal.Items.Count > 0, DdlContratosModal.SelectedValue, "0")}").ToEntero() + + If CveAlmacenOrigen > 0 Then + DdlAlmacenOrigen.Items.Clear() + DdlAlmacenOrigen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1, CveAlmacen:=CveAlmacenOrigen) '.FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}") + DdlAlmacenOrigen.DataBind() + DdlAlmacenOrigen.SelectedValueExist(CveAlmacenOrigen.ToString()) + End If + UpParametros.Update() Else RequiereAlmacenDestino = False TrAlmacenAsignado.Visible = False + TrAlmacenOrigen.Visible = False End If 'ENVIO DE FACTURA @@ -18708,6 +18753,11 @@ Partial Class Ventas If ObjInv.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then If ObjInv.DtResultados.Rows.Count > 0 Then CargaGVInv(ObjInv.DtResultados) + Else + 'si es la empresa 119, Candado, no permiter refacturar, si no se ha surtido, para que cancele la factura mejor. + If UsuarioActual.CveEmpresa = 119 AndAlso LkRefacturacion.Visible AndAlso ObjInv.DtResultados.Rows.Count = 0 Then + LkRefacturacion.Visible = False + End If End If End If ObjInv.Dispose() @@ -26165,7 +26215,7 @@ Partial Class Ventas Private Sub CargaAuxiliarClienteCxC(CveCliente As Integer, CveVenta As Integer) Dim ObjMovtos As New ClsMovimientos() If ObjMovtos.GetCxCClienteAuxiliar(CveCliente, CveVenta) Then - DTDatos = ObjMovtos.DtResultados + ' DTDatos = ObjMovtos.DtResultados GVAuxiliar.DataSource = ObjMovtos.DtResultados Else GVAuxiliar.DataSource = Nothing @@ -26174,48 +26224,48 @@ Partial Class Ventas GVAuxiliar.DataBind() End Sub - Protected Sub BtnCancelarAux_Click(sender As Object, e As EventArgs) - AgregaPolizaNegativo(CvePrePolizaNegativa) - End Sub + ''Protected Sub BtnCancelarAux_Click(sender As Object, e As EventArgs) + '' 'AgregaPolizaNegativo(CvePrePolizaNegativa) + ''End Sub - Private Sub AgregaPolizaNegativo(CvePrePoliza As Integer) + ''Private Sub AgregaPolizaNegativo(CvePrePoliza As Integer) - Dim ObjContabilidad As New ClsContabilidad - Dim TieneError As Boolean = False - ObjContabilidad.IniciaTransacSQL() + '' Dim ObjContabilidad As New ClsContabilidad + '' Dim TieneError As Boolean = False + '' ObjContabilidad.IniciaTransacSQL() - Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) + '' Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) - If Not CvePrePolizaNueva > 0 Then + '' If Not CvePrePolizaNueva > 0 Then - TieneError = True - End If + '' TieneError = True + '' End If - If Not TieneError Then + '' If Not TieneError Then - ObjContabilidad.Commit() - Dim Str As New StringBuilder - Str.Append("Se agrego la póliza de cancelación correctamente.
") - RegistraScript(" $('#DivCancelar').modal('hide'); ") - If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then - If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - Str.AppendFormat("Ver Poliza", ObjContabilidad.ContaIdPoliza) + '' ObjContabilidad.Commit() + '' Dim Str As New StringBuilder + '' Str.Append("Se agrego la póliza de cancelación correctamente.
") + '' RegistraScript(" $('#DivCancelar').modal('hide'); ") + '' If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then + '' If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then + '' Str.AppendFormat("Ver Poliza", ObjContabilidad.ContaIdPoliza) - End If - End If - Alert(Str.ToString) - Else - ObjContabilidad.RollBack() + '' End If + '' End If + '' Alert(Str.ToString) + '' Else + '' ObjContabilidad.RollBack() - End If + '' End If - ObjContabilidad.Dispose() - CargarSaldoAuxiliar(CveCliente) + '' ObjContabilidad.Dispose() + '' CargarSaldoAuxiliar(CveCliente) - End Sub + ''End Sub Protected Sub GVAuxiliar_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAuxiliar.RowDataBound