diff --git a/App_Code/ClsFinanzas.vb b/App_Code/ClsFinanzas.vb
index 66843a690..a5d52f0f9 100644
--- a/App_Code/ClsFinanzas.vb
+++ b/App_Code/ClsFinanzas.vb
@@ -223,7 +223,7 @@ Public Class ClsFinanzas
End Try
Return Retorno
End Function
- Public Function GetRazonesFinancierasRep(CveEmpresa As Integer, Tipo As String, FechaI As String, FechaF As String, CveCuenta As Integer, CveSubProyecto As Integer) As Boolean
+ Public Function GetRazonesFinancierasRep(CveEmpresa As Integer, Tipo As String, FechaI As Date, FechaF As Date, CveCuenta As Integer, CveSubProyecto As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Finan_RazonesFinancierasRepGet")
diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb
index 6e8075370..b859e5ddb 100644
--- a/Contabilidad/RegPrePoliza.aspx.vb
+++ b/Contabilidad/RegPrePoliza.aspx.vb
@@ -215,9 +215,9 @@ Partial Class ContabilidadC_RegPrePoliza
If Not Page.IsPostBack Then
Tick = DateTime.Now.Ticks.ToString()
- 'If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then
- ' Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS"))
- 'End If
+ If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then
+ Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS"))
+ End If
CveMoneda = 1
ViewState("CvePrePoliza") = 0
@@ -245,7 +245,6 @@ Partial Class ContabilidadC_RegPrePoliza
Conta.Dispose()
End If
-
If IfNull(Request("Tipo"), "").ToString() = "NOMPROV" Then
DivTipoGasto.Visible = True
ThTipoGasto.Visible = True
diff --git a/Edoc/CatDocumentos.aspx.vb b/Edoc/CatDocumentos.aspx.vb
index f4a6cd1aa..e2afe6520 100644
--- a/Edoc/CatDocumentos.aspx.vb
+++ b/Edoc/CatDocumentos.aspx.vb
@@ -92,7 +92,7 @@ Partial Class RH_CatDocumentos
Property Estatus As Boolean
Get
If ViewState("Estatus") Is Nothing Then
- Return 0
+ Return False
Else
Return DirectCast(ViewState("Estatus"), Boolean)
End If
@@ -213,24 +213,23 @@ Partial Class RH_CatDocumentos
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- CveDocumentacion = GvRow.DataKey("CveDocumentacion")
+ CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToEntero
Documentacion = GvRow.DataKey("Documentacion")
DocumentacionFormato = GvRow.DataKey("DocumentacionFormato")
- CveDocumentacionTipo = GvRow.DataKey("CveDocumentacionTipo")
+ CveDocumentacionTipo = GvRow.DataKey("CveDocumentacionTipo").ToEntero
DocumentacionTipo = GvRow.DataKey("DocumentacionTipo")
- Orden = GvRow.DataKey("Orden")
- Estatus = GvRow.DataKey("Estatus")
- Requerido = GvRow.DataKey("Requerido")
-
+ Orden = GvRow.DataKey("Orden").ToEntero
+ Estatus = GvRow.DataKey("Estatus") = "True"
+ Requerido = GvRow.DataKey("Requerido") = "True"
Txtdocumentacion.Text = Documentacion
- TxtOrden.Text = Orden
+ TxtOrden.Text = GvRow.DataKey("Orden")
TxtDiasLimite.Text = GvRow.DataKey("DiasLimite")
- ChkAplicaDiasLimite.Checked = GvRow.DataKey("AplicaDiasLimite")
+ ChkAplicaDiasLimite.Checked = GvRow.DataKey("AplicaDiasLimite") = "True"
TxtPeriodicidad.Text = GvRow.DataKey("Periodicidad")
- ChkAplicaFechaVencimiento.Checked = GvRow.DataKey("AplicaFechaVencimiento")
+ ChkAplicaFechaVencimiento.Checked = GvRow.DataKey("AplicaFechaVencimiento") = "True"
DdlDocumentacionTipo.SelectedValueExist(CveDocumentacionTipo)
chkEstatus.Checked = Estatus
@@ -296,7 +295,7 @@ Partial Class RH_CatDocumentos
Public Sub Remove_ClickDocumentacion(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion")
+ Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero
Dim _documetacionFormato As String = GvRow.DataKey("DocumentacionFormato")
@@ -378,7 +377,7 @@ Partial Class RH_CatDocumentos
Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero
Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
- Dim separado As Char() = {"."}
+ Dim separado As Char() = {"."c}
Dim array() As String = DocumetacionFormato.Split(separado)
Dim extencion As String = ""
diff --git a/Finanzas/RepRazonesFinancieras.aspx.vb b/Finanzas/RepRazonesFinancieras.aspx.vb
index 6bdb3cefa..c60ee1df3 100644
--- a/Finanzas/RepRazonesFinancieras.aspx.vb
+++ b/Finanzas/RepRazonesFinancieras.aspx.vb
@@ -360,7 +360,7 @@ Partial Class Finanzas_RepRazonesFinancieras
Else
For Each col As DataRow In data.Rows
- grafica.xAxis.categories.Add(col(0))
+ grafica.xAxis.categories.Add(col(0).ToString)
contador += 1
Next
diff --git a/Flotillas/RepLicencias.aspx.vb b/Flotillas/RepLicencias.aspx.vb
index 9b9ed58fb..1eaca00c1 100644
--- a/Flotillas/RepLicencias.aspx.vb
+++ b/Flotillas/RepLicencias.aspx.vb
@@ -39,11 +39,11 @@ Partial Class AF_RepLicencias
Private Sub CargaDatos()
Dim ObjAF As New ClsAF
- Dim Finicial As String = ""
- Dim FFinal As String = ""
+ Dim Finicial As Date
+ Dim FFinal As Date
- Dim FiniciaVl As String = ""
- Dim FFinalVl As String = ""
+ Dim FiniciaVl As Date
+ Dim FFinalVl As Date
Try
@@ -53,8 +53,8 @@ Partial Class AF_RepLicencias
FFinalVl = TxtFechaVF.Text.ToDateTime
Catch ex As Exception
- Finicial = "-1"
- FFinal = "-1"
+ Finicial = MinFecha
+ FFinal = MaxFecha
End Try
If ObjAF.GetLicenciasRep(-1, -1, -1, Finicial, FFinal, FiniciaVl, FFinalVl, DdlDispositivo.SelectedValue.ToEntero, UsuarioActual.CveCliente) Then
diff --git a/Flotillas/RepPolizaSeguro.aspx.vb b/Flotillas/RepPolizaSeguro.aspx.vb
index f129f0efa..040b2c5d6 100644
--- a/Flotillas/RepPolizaSeguro.aspx.vb
+++ b/Flotillas/RepPolizaSeguro.aspx.vb
@@ -80,7 +80,7 @@ Partial Class AF_RepPolizaSeguro
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim Filtros As String = $"Filtros: Fecha Expedicion: {txtFechaEI.Text} y {txtFechaEF.Text} Fecha Vencimiento: {txtFechaVI.Text} y {txtFechaVF.Text}"
- If DdlDispositivo.SelectedValue > 0 Then
+ If DdlDispositivo.SelectedValue.ToEntero > 0 Then
Filtros = Filtros & $" Vehiculo: {DdlDispositivo.SelectedItem.Text}"
End If
diff --git a/General/CatPaqueterias.aspx.vb b/General/CatPaqueterias.aspx.vb
index 4a2f5a1c1..1689de489 100644
--- a/General/CatPaqueterias.aspx.vb
+++ b/General/CatPaqueterias.aspx.vb
@@ -75,8 +75,8 @@ Partial Class Inventarios_CatPaqueterias
Private Sub BtnAgregarPaqueteria_Click(sender As Object, e As EventArgs) Handles BtnAgregarPaqueteria.Click
Dim ObjGral As New ClsGenerales
Dim TieneError = False
- Dim Estatus = 0
- If ChkEstatus.Checked Then Estatus = 1
+ Dim Estatus As Boolean = False
+ If ChkEstatus.Checked Then Estatus = True
If HdnModalidad.Value = "A" Then
If ObjGral.AddGralPaqueterias(TxtPaqueteria.Text.Trim, TxtLiga.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
diff --git a/General/FolioFechaCancelacion.aspx.vb b/General/FolioFechaCancelacion.aspx.vb
index ff029dd38..006ef7a49 100644
--- a/General/FolioFechaCancelacion.aspx.vb
+++ b/General/FolioFechaCancelacion.aspx.vb
@@ -75,7 +75,7 @@ Partial Class Generales_FolioFechaCancelacion
Dim resp As New WSGF.StructXml()
Try
- resp = solicitud.GetAcuse(DRow("RFCEmisor").ToString, "rene.molina@adsistemas.mx", "rene2018", DRow("FolioFiscal"))
+ resp = solicitud.GetAcuse(DRow("RFCEmisor").ToString, "rene.molina@adsistemas.mx", "rene2018", DRow("FolioFiscal").ToString)
If (resp.Estado = 0) Then
Dim xmlDoc As New System.Xml.XmlDocument()
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index 4e5fd5a69..51539abc1 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -1,4 +1,7 @@
-Imports System.Data
+'Option Explicit On
+'Option Strict On
+
+Imports System.Data
Imports Extensiones
Partial Class Ventas_ClientesAbonar
@@ -340,8 +343,8 @@ Partial Class Ventas_ClientesAbonar
Private Sub CargaDatos(pCveMoneda As Integer)
Dim Mov As New ClsMovimientos
- Dim FechaI As String = IfNull(Request("FechaI"), "-1")
- Dim FechaF As String = IfNull(Request("FechaF"), "-1")
+ Dim FechaI As String = IfNull(Request("FechaI"), "-1").ToString
+ Dim FechaF As String = IfNull(Request("FechaF"), "-1").ToString
Dim FechaCorte As Date = DateTime.Now.AddYears(1).ToShortDateString.ToString.ToDate
@@ -374,7 +377,7 @@ Partial Class Ventas_ClientesAbonar
'recargo la moneda con la que se va a pagar
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue)
Dim moneda As Integer = 0
- If DdlCuenta.SelectedValue > 0 Then
+ If DdlCuenta.SelectedValue.ToEntero > 0 Then
moneda = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero}").ToEntero
End If
@@ -426,7 +429,7 @@ Partial Class Ventas_ClientesAbonar
If ObjFolios.GetFolios("RMF", UsuarioActual.CveEmpresa) Then
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo'"))
If DT.Rows.Count > 0 Then
- TxtFolio.Text = DT.Rows(0)("FActual").ToString.ToEntero
+ TxtFolio.Text = DT.Rows(0)("FActual").ToString
End If
ObjFolios.Dispose()
End If
@@ -500,7 +503,7 @@ Partial Class Ventas_ClientesAbonar
Select Case RblTipoPago.SelectedValue
Case "1"
- If DdlCuenta.SelectedValue > 0 Then
+ If DdlCuenta.SelectedValue.ToEntero > 0 Then
moneda = CveMonedaPago
ElseIf RblTipoPago.SelectedValue = "1" Then
e.Row.FCCheckBox("Chk").Enabled = False
@@ -530,13 +533,13 @@ Partial Class Ventas_ClientesAbonar
e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format("FnCambia({0},this,{1},1,{2},{3});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), CveMonedaFiltro, moneda))
If UsuarioActual.Empresa.Funcionalidad(157).ToDecimal <> 0 Then
- e.Row.FCTextBox("TxtComision").Attributes.Add("onblur", String.Format("FnLimites({0},this,{1},{2},2);", e.Row.FCCheckBox("Chk").ClientID, -UsuarioActual.Empresa.Funcionalidad(157), UsuarioActual.Empresa.Funcionalidad(157).ToString.ToDecimal))
- e.Row.FCRangeValidator("RVComision").MinimumValue = -UsuarioActual.Empresa.Funcionalidad(157).ToString.ToDecimal
- e.Row.FCRangeValidator("RVComision").MaximumValue = UsuarioActual.Empresa.Funcionalidad(157).ToString.ToDecimal
+ e.Row.FCTextBox("TxtComision").Attributes.Add("onblur", String.Format("FnLimites({0},this,{1},{2},2);", e.Row.FCCheckBox("Chk").ClientID, (-UsuarioActual.Empresa.Funcionalidad(157).ToDecimal).ToString, UsuarioActual.Empresa.Funcionalidad(157).ToString.ToDecimal))
+ e.Row.FCRangeValidator("RVComision").MinimumValue = (-UsuarioActual.Empresa.Funcionalidad(157).ToDecimal).ToString
+ e.Row.FCRangeValidator("RVComision").MaximumValue = UsuarioActual.Empresa.Funcionalidad(157).ToString
e.Row.FCRangeValidator("RVComision").Enabled = True
Else
e.Row.FCTextBox("TxtComision").Attributes.Add("onblur", String.Format("FnCambia({0},this,{1},2,{2},{3});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), CveMonedaFiltro, moneda))
- e.Row.FCRangeValidator("RVComision").MinimumValue = 0.00
+ e.Row.FCRangeValidator("RVComision").MinimumValue = "0.00"
e.Row.FCRangeValidator("RVComision").MaximumValue = e.Row.DBCampo("Saldo")
End If
@@ -741,7 +744,7 @@ Partial Class Ventas_ClientesAbonar
Dim ConceptoPoliza As String = String.Format("{0} {1}", TxtAboneA.Text, TxtObservaciones.Text)
- If DdlCuenta.SelectedValue > 0 Then
+ If DdlCuenta.SelectedValue.ToEntero > 0 Then
CveMoneda = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero}").ToEntero
Else
CveMoneda = IfNull(Request("CveMoneda"), "1").ToString.ToEntero
@@ -908,7 +911,7 @@ Partial Class Ventas_ClientesAbonar
If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
Pago.TCPago = TxtTC.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
- Pago.TCPago = IIf(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal)
+ Pago.TCPago = If(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal)
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
Pago.TCPago = TxtTCDolares.Text.ToDecimal
End If
@@ -951,55 +954,55 @@ Partial Class Ventas_ClientesAbonar
End If
If ImporteLiq2 <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, ImporteLiq2 * tipoCambioPago, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, ImporteLiq2 * tipoCambioPago, CveConceptoLiquidacion, gvr.DataKey("SerieFolio"), ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
If ImporteLiq3 <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, ImporteLiq3 * tipoCambioPago, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, ImporteLiq3 * tipoCambioPago, CveConceptoLiquidacion, gvr.DataKey("SerieFolio"), ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
If ImporteLiq4 <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, ImporteLiq4 * tipoCambioPago, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, ImporteLiq4 * tipoCambioPago, CveConceptoLiquidacion, gvr.DataKey("SerieFolio"), ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
If ImporteLiq5 <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, ImporteLiq5 * tipoCambioPago, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, ImporteLiq5 * tipoCambioPago, CveConceptoLiquidacion, gvr.DataKey("SerieFolio"), ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
If ImporteLiq6 <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, ImporteLiq6 * tipoCambioPago, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, ImporteLiq6 * tipoCambioPago, CveConceptoLiquidacion, gvr.DataKey("SerieFolio"), ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
If ImporteLiq7 <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, ImporteLiq7 * tipoCambioPago, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, ImporteLiq7 * tipoCambioPago, CveConceptoLiquidacion, gvr.DataKey("SerieFolio"), ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
If ImporteLiq8 <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, ImporteLiq8 * tipoCambioPago, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, ImporteLiq8 * tipoCambioPago, CveConceptoLiquidacion, gvr.DataKey("SerieFolio"), ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
If ImporteLiq9 <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq9, ImporteLiq9 * tipoCambioPago, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol9, ImporteME:=If(CveMoneda > 1, ImporteLiq9, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq9, ImporteLiq9 * tipoCambioPago, CveConceptoLiquidacion, gvr.DataKey("SerieFolio"), ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol9, ImporteME:=If(CveMoneda > 1, ImporteLiq9, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
If ImporteLiq10 <> 0 Then
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq10, ImporteLiq10 * tipoCambioPago, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol10, ImporteME:=If(CveMoneda > 1, ImporteLiq10, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq10, ImporteLiq10 * tipoCambioPago, CveConceptoLiquidacion, gvr.DataKey("SerieFolio"), ConceptoPartida, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoLiquidacion, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol10, ImporteME:=If(CveMoneda > 1, ImporteLiq10, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
@@ -1008,8 +1011,8 @@ Partial Class Ventas_ClientesAbonar
Dim TCP As Decimal = 0
Dim FolioPago As String = " "
If DtIngresos IsNot Nothing Then
- TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue))
- FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue))
+ TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)).ToDecimal
+ FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue))
Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)).ToDate
'considera fluctuación
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
@@ -1028,7 +1031,7 @@ Partial Class Ventas_ClientesAbonar
Dim TCP As Decimal = 0
Dim FolioPago As String = " "
If DtIngresos IsNot Nothing Then
- TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue))
+ TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)).ToDecimal
FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue))
Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)).ToDate
'considera fluctuación
@@ -1399,9 +1402,9 @@ Partial Class Ventas_ClientesAbonar
ObjFacturaDevolucion.ClaveMetodoPagoSAT = "PUE"
Dim drtt As DataRow = GlobalDTTipoTransacciones.FiltroPrimero("CveTipoTransaccion =" & DdlTipoTransaccion.SelectedValue)
- Dim dra As DataRow = GlobalDTVtaFormaPago.FiltroPrimero("CveFormaPago = " & drtt("CveFormaPago"))
+ Dim dra As DataRow = GlobalDTVtaFormaPago.FiltroPrimero("CveFormaPago = " & drtt("CveFormaPago").ToString)
- ObjFacturaDevolucion.CveFormaPago33 = dra("CveFormaPago").ToString
+ ObjFacturaDevolucion.CveFormaPago33 = dra("CveFormaPago").ToString.ToEntero
ObjFacturaDevolucion.FormaPago33 = dra("FormaPagoSAT").ToString
ObjFacturaDevolucion.FormaPagoSAT33 = dra("ClaveFormaPagoSAT").ToString
@@ -1421,7 +1424,7 @@ Partial Class Ventas_ClientesAbonar
ObjFacturaDevolucion.DtDetalle = CreaDTDetalleNC()
- CargaImpuestos(ObjFacturaDevolucion, ListaVentasGenerarNC, ObjCliente.DesglosaIEPS, ObjCliente.RetIVA, ObjCliente.RetISR)
+ CargaImpuestos(ObjFacturaDevolucion, ListaVentasGenerarNC, ObjCliente.DesglosaIEPS, ObjCliente.RetIVA.ToDecimal, ObjCliente.RetISR.ToDecimal)
End If
End If
@@ -1516,7 +1519,7 @@ Partial Class Ventas_ClientesAbonar
ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion, ListaVentasGenerarNC)
Try
- Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=SqlTransaccion, ObjContPaqTransac:=ObjConta)
+ Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=SqlTransaccion)
Retorno.Respuesta = Resp
Catch ex As Exception
OnError("Ocurrió un error al guardar la NC de pronto pago", ex)
@@ -2135,7 +2138,7 @@ Partial Class Ventas_ClientesAbonar
#Region " CUENTAS DEPOSITOS"
Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear()
- If DdlTipoTransaccion.SelectedValue > 0 Then ' transferencias y layout
+ If DdlTipoTransaccion.SelectedValue.ToEntero > 0 Then ' transferencias y layout
trCuentaDeposito.Visible = False
Dim dtc As DataTable = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
@@ -2304,7 +2307,7 @@ Partial Class Ventas_ClientesAbonar
Dim TCVenta As Decimal = gr.DataKey("TipoCambio").ToDecimal
Dim FechaVenta As Date = gr.DataKey("Fecha").ToDate
Dim tCveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
- Dim TCPago As Decimal = GlobalTipoCambio(TxtFechaIncobrable.Text.ToDate).FormatoNumero(4)
+ Dim TCPago As Decimal = GlobalTipoCambio(TxtFechaIncobrable.Text.ToDate).FormatoNumero(4).ToDecimal
Dim CveConceptoDeduccion As Integer = DdlTipoDeduccion.SelectedValue.ToEntero
'si la fecha del documento es anterior a su ultima fluctuación. toma el Tc de la fluctuacion
@@ -2379,10 +2382,10 @@ Partial Class Ventas_ClientesAbonar
End If
- If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, PorcentajeImpuesto:=gr.DataKey("PorcentajeIVA").ToDecimal, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
+ If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), 13, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, PorcentajeImpuesto:=gr.DataKey("PorcentajeIVA").ToDecimal, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
- If (RETIVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And RETIVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, RETIVA, If(CveMonedaFiltro = 1, RETIVA, RETIVA * TCVenta), gr.DataKey("SerieFolio").ToString, 8, ConceptoPartida, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
+ If (RETIVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And RETIVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, RETIVA, If(CveMonedaFiltro = 1, RETIVA, RETIVA * TCVenta), 8, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), 38, gr.DataKey("SerieFolio").ToString, ConceptoPartida, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
@@ -2515,12 +2518,9 @@ Partial Class Ventas_ClientesAbonar
Case Else
-
-
End Select
LblValidaCeuntaTipoTransaccion.Text = Mensaje
-
If Not Mensaje.Length = 0 Then
'Alert(Mensaje, TipoMensaje.MsgAdvertencia)
LblValidaCeuntaTipoTransaccion.Visible = True
@@ -2565,7 +2565,7 @@ Partial Class Ventas_ClientesAbonar
Private Sub DdlIngreso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlIngreso.SelectedIndexChanged
'saco la moneda de la selección
- HdnIngresoImporte.Value = 0
+ HdnIngresoImporte.Value = "0"
If DdlIngreso.SelectedValue.ToEntero > 0 Then
Dim Banco As New ClsBancos
@@ -2575,7 +2575,7 @@ Partial Class Ventas_ClientesAbonar
If Deudores.GetIngresosSaldosDetalle(CveCliente, -1, UsuarioActual.CveEmpresa) Then
HdnIngresoImporte.Value = Deudores.DtResultados.FiltroPrimeroValor("Saldo", String.Format("CveIE = {0}", DdlIngreso.SelectedValue))
TxtTCDolares.Text = Deudores.DtResultados.FiltroPrimeroValor("TipoCambio", String.Format("CveIE = {0}", DdlIngreso.SelectedValue))
- FechaIngreso = Deudores.DtResultados.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE = {0}", DdlIngreso.SelectedValue))
+ FechaIngreso = Deudores.DtResultados.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE = {0}", DdlIngreso.SelectedValue)).ToDate
End If
Deudores.Dispose()
End If
diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb
index be5aee11d..3d7b18770 100644
--- a/Ventas/PV.aspx.vb
+++ b/Ventas/PV.aspx.vb
@@ -2121,7 +2121,7 @@ Partial Class PV
'REGENERAR LOS SALDOS
If Not OcurrioError Then
- OcurrioError = Not ObjFactura.RegenerarPrePolizas(ObjVentas.IniciaTransacSQL(), ObjAC)
+ OcurrioError = Not ObjFactura.RegenerarPrePolizas(ObjVentas.IniciaTransacSQL())
End If
Catch ex As Exception
@@ -3454,7 +3454,7 @@ Partial Class PV
Dim SbAlert As New StringBuilder
Try
- Retorno = ObjFactura.EmitirFactura(Transac:=ObjAcum.IniciaTransacSQL(), ObjContPaqTransac:=ObjContPaq)
+ Retorno = ObjFactura.EmitirFactura(Transac:=ObjAcum.IniciaTransacSQL())
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 4e49e131a..16b544d0b 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -15936,7 +15936,6 @@ Partial Class Ventas
Dim ObjVenta As New ClsVentas(ObjConta.IniciaTransacSQL())
Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL())
Dim ObjCliente As New ClsClientes(ObjConta.IniciaTransacSQL())
- Dim ObjContpaq As ClsContPAQi = Nothing
Dim CvePrePoliza As Integer
Dim ErrorConta As Boolean
@@ -16157,7 +16156,6 @@ Partial Class Ventas
If ErrorConta Then
Alert("Ocurrió un error al amortizar el documento. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
ObjConta.RollBack()
- If ObjContpaq IsNot Nothing Then ObjContpaq.RollBack()
Else
Dim Msg As New StringBuilder
Msg.Append("Se ha amortizado correctamente")
@@ -16169,11 +16167,7 @@ Partial Class Ventas
ObjConta.Commit()
BtnAceptarAnticipos.Enabled = False
- If ObjContpaq IsNot Nothing Then
- ObjContpaq.AjustaPoliza(ContaIdPoliza)
- ObjContpaq.Commit()
- End If
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
End If
@@ -19842,50 +19836,50 @@ Partial Class Ventas
End Sub
Private Sub EliminaPoliza()
- If UsuarioActual.Empresa.TipoContabilidad = 2 Then
+ 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
- Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
- ObjAC.IniciaTransacSQL()
- Dim ObjConta As New ClsContabilidad
- ObjConta.IniciaTransacSQL()
+ ' Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
+ ' ObjAC.IniciaTransacSQL()
+ ' Dim ObjConta As New ClsContabilidad
+ ' ObjConta.IniciaTransacSQL()
- Dim ErrorMovimiento = False
+ ' Dim ErrorMovimiento = False
- 'Elimina la poliza
- If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IdPoliza > 0 Then
- If Not ObjAC.RemovePoliza(IdPoliza) Then
- ErrorMovimiento = True
- End If
- End If
+ ' 'Elimina la poliza
+ ' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IdPoliza > 0 Then
+ ' If Not ObjAC.RemovePoliza(IdPoliza) Then
+ ' ErrorMovimiento = True
+ ' End If
+ ' End If
- 'Desasocia la poliza
- If Not ErrorMovimiento Then
- If Not ObjConta.DesasociarPoliza(IdPoliza, UsuarioActual.CveEmpresa) Then
- ErrorMovimiento = True
- End If
- End If
+ ' 'Desasocia la poliza
+ ' If Not ErrorMovimiento Then
+ ' If Not ObjConta.DesasociarPoliza(IdPoliza, UsuarioActual.CveEmpresa) Then
+ ' ErrorMovimiento = True
+ ' End If
+ ' End If
- If Not ErrorMovimiento Then
- If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
- ErrorMovimiento = True
- End If
- End If
+ ' If Not ErrorMovimiento Then
+ ' If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
+ ' ErrorMovimiento = True
+ ' End If
+ ' End If
- If Not ErrorMovimiento Then
- Alert("La póliza ha sido desvinculada y eliminada con éxito.", TipoMensaje.MsgInformacion)
- ObjAC.Commit()
- ObjConta.Commit()
- BtnDescontabilizar.Visible = False
- Else
- Alert("Ocurrió un error al desvincular y/o eliminar la póliza. Por favor intente de nuevo ", TipoMensaje.MsgError)
- ObjAC.RollBack()
- ObjConta.RollBack()
- End If
+ ' If Not ErrorMovimiento Then
+ ' Alert("La póliza ha sido desvinculada y eliminada con éxito.", TipoMensaje.MsgInformacion)
+ ' ObjAC.Commit()
+ ' ObjConta.Commit()
+ ' BtnDescontabilizar.Visible = False
+ ' Else
+ ' Alert("Ocurrió un error al desvincular y/o eliminar la póliza. Por favor intente de nuevo ", TipoMensaje.MsgError)
+ ' ObjAC.RollBack()
+ ' ObjConta.RollBack()
+ ' End If
- ObjAC.Dispose()
- ObjConta.Dispose()
+ ' ObjAC.Dispose()
+ ' ObjConta.Dispose()
- End If
+ 'End If
@@ -20196,7 +20190,7 @@ Partial Class Ventas
Return Not OcurrioError
End Function
Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = True,
- Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False, Optional ObjContPaq As ClsContPAQi = Nothing,
+ Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False,
Optional CveAlmacenDestino As Integer = -1) As Integer
Dim OcurrioError As Boolean = False
Dim ContadorMovtosDetalles = 0
@@ -21491,7 +21485,6 @@ Partial Class Ventas
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
- Dim ObjAC As ClsContPAQi = Nothing
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero()
Dim TipoCambio As Double = TxtTipoCambio.Text.ToDouble
@@ -21649,7 +21642,7 @@ Partial Class Ventas
End If
If Not OcurrioError Then
- If RegeneracionPolizas(ObjVentas, ObjAC, ObjConta, ObjBancos) Then
+ If RegeneracionPolizas(ObjVentas, ObjConta, ObjBancos) Then
OcurrioError = True
End If
End If
@@ -21673,14 +21666,12 @@ Partial Class Ventas
Alert("Ocurrió un error al guardar los cambios. Por favor intente de nuevo.", TipoMensaje.MsgError)
Else
ObjVentas.Commit()
- If ObjAC IsNot Nothing Then ObjAC.Commit()
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();")
End If
ObjVentas.Dispose()
ObjConta.Dispose()
ObjBancos.Dispose()
- If ObjAC IsNot Nothing Then ObjAC.Dispose()
'REGENERAR EL PDF
If Not OcurrioError Then
@@ -23050,16 +23041,16 @@ Partial Class Ventas
End Sub
- Private Function RegeneracionPolizas(ByRef ObjVentas As ClsVentas, ByRef ObjAC As ClsContPAQi, ByRef ObjConta As ClsContabilidad, ObjBancos As ClsBancos) As Boolean
+ Private Function RegeneracionPolizas(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ObjBancos As ClsBancos) As Boolean
Dim ErrorCancelar As Boolean = False
Dim Mensaje As String = ""
CreaObjetosVenta()
- If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
- ObjAC = New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
- End If
+ 'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
+ ' ObjAC = New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
+ 'End If
'REMOVEMOS LOS CONCEPTOS DE LA PREPOLIZA
ErrorCancelar = Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, -1, CveVenta, 2)