option explicit
This commit is contained in:
@@ -2753,7 +2753,7 @@ Partial Class AF_AF
|
||||
Dim ObjAFCaracteristicas As New ClsAF
|
||||
If ObjAFCaracteristicas.GetActivosFijosValores(CveActivoFijo, CveEmpresaActual) Then
|
||||
|
||||
Dim Filtro = If(DdlSubTipoActivoFijo.SelectedValue.ToEntero > 0, String.Format("CveSubTipoActivoFijo = {0} OR (CveTipoActivoFijo = {1} AND CveSubTipoActivoFijo IS NULL)", DdlSubTipoActivoFijo.SelectedValue, DdlTipoActivoFijo.SelectedValue), String.Format("CveTipoActivoFijo = {0}", DdlTipoActivoFijo.SelectedValue))
|
||||
Dim Filtro As String = If(DdlSubTipoActivoFijo.SelectedValue.ToEntero > 0, String.Format("CveSubTipoActivoFijo = {0} OR (CveTipoActivoFijo = {1} AND CveSubTipoActivoFijo IS NULL)", DdlSubTipoActivoFijo.SelectedValue, DdlTipoActivoFijo.SelectedValue), String.Format("CveTipoActivoFijo = {0}", DdlTipoActivoFijo.SelectedValue))
|
||||
GvC.DataSource = ObjAFCaracteristicas.DtResultados.FiltraParametros(Filtro, "CaracteristicaClasificacion, Orden")
|
||||
|
||||
If ObjAFCaracteristicas.GetCaracteristicasOpcionesSubTipo(-1, DdlSubTipoActivoFijo.SelectedValue.ToEntero, CveEmpresaActual) Then
|
||||
@@ -3168,21 +3168,21 @@ Partial Class AF_AF
|
||||
Private Sub BtnCtaContable_Click(sender As Object, e As EventArgs) Handles BtnCtaContable.Click
|
||||
Dim IdCuentaContable As Integer = -1
|
||||
Dim CtaCodigo As String = ""
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim CuentaPadre = UsuarioActual.Empresa.Funcionalidad(221).ToEntero
|
||||
Dim CuentaPadre As Integer = UsuarioActual.Empresa.Funcionalidad(221).ToEntero
|
||||
|
||||
Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjAF As New ClsAF()
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
ObjAF.IniciaTransacSQL()
|
||||
|
||||
Dim NombreCuenta = If(TxtDescripcion.Text.Trim.Length > 50, TxtDescripcion.Text.Trim.Substring(0, 50), TxtDescripcion.Text.Trim)
|
||||
Dim NombreCuenta As String = If(TxtDescripcion.Text.Trim.Length > 50, TxtDescripcion.Text.Trim.Substring(0, 50), TxtDescripcion.Text.Trim)
|
||||
|
||||
IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(CuentaPadre, NombreCuenta, "D", 2)
|
||||
If IdCuentaContable > 0 Then
|
||||
ObjContaAC.GetCuentas(IdCuentaContable, "-1", -1)
|
||||
Dim dt = ObjContaAC.DtResultados
|
||||
Dim dt As DataTable = ObjContaAC.DtResultados
|
||||
|
||||
If dt.Rows.Count = 1 Then
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ Partial Class AF_RepDepreciacion
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim ConceptoPoliza As String = String.Format("Depreciación - {0}", txtFechaI.Text)
|
||||
Dim CveSubProyecto As Integer ' = DdlSubProyecto.SelectedValue.ToEntero
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Depreciacion", 74, 0, 0, 1, txtFechaI.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Depreciacion", 74, 0, 0, 1, txtFechaI.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
For Each RowsDt As GridViewRow In GvDatos.Rows
|
||||
CveActivoFijo = RowsDt.DataKey("CveActivoFijo").ToEntero
|
||||
|
||||
@@ -1277,7 +1277,7 @@ Namespace Modelos
|
||||
End Function
|
||||
|
||||
Public Shared Function CrearVentaNueva(UsuarioActual As Usuario, CveSubProyecto As Integer, CveCliente As Integer, CveMoneda As Integer) As Modelos.Factura
|
||||
Dim ObjFactura = New Modelos.Factura(UsuarioActual)
|
||||
Dim ObjFactura As New Modelos.Factura(UsuarioActual)
|
||||
Try
|
||||
ObjFactura.DirectorioServidor = HttpContext.Current.Server.MapPath("/")
|
||||
|
||||
@@ -1382,7 +1382,7 @@ Namespace Modelos
|
||||
End Function
|
||||
|
||||
Private Shared Function CreaDTFactura() As DataTable
|
||||
Dim TmpDT = New DataTable
|
||||
Dim TmpDT As New DataTable
|
||||
TmpDT.Columns.Add("CveVenta", GetType(Integer))
|
||||
TmpDT.Columns.Add("Consec", GetType(Integer))
|
||||
TmpDT.Columns.Add("Cantidad", GetType(Decimal))
|
||||
@@ -1548,8 +1548,8 @@ Namespace Modelos
|
||||
Row("Consec") = ConsecutivoActual + 1
|
||||
|
||||
|
||||
Dim ClienteRetIVA = Me.Cliente.RetIVA
|
||||
Dim ClienteRetISR = Me.Cliente.RetISR
|
||||
Dim ClienteRetIVA As Decimal = Me.Cliente.RetIVA
|
||||
Dim ClienteRetISR As Decimal = Me.Cliente.RetISR
|
||||
|
||||
If ClienteRetIVA <= 0 AndAlso DrPS("RetIVA").ToString.ToDecimal > 0 Then
|
||||
ClienteRetIVA = DrPS("RetIVA").ToString.ToDecimal
|
||||
@@ -2102,8 +2102,8 @@ Namespace Modelos
|
||||
Dim CveCamionRemolque1 As Integer = -1
|
||||
Dim CveCamionRemolque2 As Integer = -1
|
||||
|
||||
If ObjVentas.GetFacturacionAcarreos(ObjFactura.CveFacturacionAcarreo, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim Row = ObjVentas.DtResultados.Rows(0)
|
||||
If ObjVentas.GetFacturacionAcarreos(ObjFactura.CveFacturacionAcarreo, -1, -1, -1, MinFecha, UsuarioActual.CveEmpresa) Then
|
||||
Dim Row As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
|
||||
If Row IsNot Nothing Then
|
||||
CveDireccionOrigen = Row("CveDireccionOrigen").ToString().ToEntero()
|
||||
@@ -2517,20 +2517,20 @@ Namespace Modelos
|
||||
End Sub
|
||||
Private Function SalidaAlmacenMateriales(ByRef ObjInventario As ClsInventarios, CveOS As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
||||
Dim TieneError As Boolean = False
|
||||
Dim CveMovimientoSalida = 0
|
||||
Dim CveMovimientoEntrada = 0
|
||||
Dim CveMovimientoSalida As Integer = 0
|
||||
Dim CveMovimientoEntrada As Integer = 0
|
||||
|
||||
Dim CveMovimientoSalida2 = 0
|
||||
Dim CveMovimientoEntrada2 = 0
|
||||
Dim CveMovimientoSalida2 As Integer = 0
|
||||
Dim CveMovimientoEntrada2 As Integer = 0
|
||||
|
||||
Dim CveMovimientoSalida3 = 0
|
||||
Dim CveMovimientoEntrada3 = 0
|
||||
Dim CveMovimientoSalida3 As Integer = 0
|
||||
Dim CveMovimientoEntrada3 As Integer = 0
|
||||
|
||||
Dim AlmacenEntrada = -1
|
||||
Dim FolioSalida = 0
|
||||
Dim FolioEntrada = 0
|
||||
Dim AlmacenEntrada As Integer = -1
|
||||
Dim FolioSalida As Integer = 0
|
||||
Dim FolioEntrada As Integer = 0
|
||||
|
||||
Dim TextoError = ""
|
||||
Dim TextoError As String = ""
|
||||
Dim TextoExistencia As StringBuilder = New StringBuilder
|
||||
|
||||
'Obtenemos los movimientos detalle
|
||||
@@ -2636,9 +2636,9 @@ Namespace Modelos
|
||||
Return True
|
||||
End If
|
||||
|
||||
Dim CveMovimientoSalidaConsignacion = -1
|
||||
Dim CveMovimientoEntradaGeneral = -1
|
||||
Dim CveMovimientoSalidaGeneral = -1
|
||||
Dim CveMovimientoSalidaConsignacion As Integer = -1
|
||||
Dim CveMovimientoEntradaGeneral As Integer = -1
|
||||
Dim CveMovimientoSalidaGeneral As Integer = -1
|
||||
|
||||
|
||||
'MOVIMIENTO DE SALIDA POR TRASPASO DEL ALMACEN DE CONSIGNACION
|
||||
@@ -2800,7 +2800,7 @@ Namespace Modelos
|
||||
Dim ImporteCargo As Decimal = RowSalida("ImporteCargo").ToString().ToDecimal() * -1
|
||||
Dim ImporteBonificacion As Decimal = RowSalida("ImporteBonificacion").ToString().ToDecimal() * -1
|
||||
|
||||
Dim FacturadoBonificacion = False
|
||||
Dim FacturadoBonificacion As Boolean = False
|
||||
Dim CveVentaBonificacion As Integer = -1
|
||||
|
||||
If factura.TipoDocto = "RNC" Then
|
||||
@@ -2868,7 +2868,7 @@ Namespace Modelos
|
||||
'SI ES UNA RNC DE CARGO GENERA EL MOVIMIENTO DE ALMACEN AQUI
|
||||
If factura.TipoDocto = "RNC" AndAlso factura.Num1 = 1 AndAlso factura.DtMovimientosUsados IsNot Nothing AndAlso ObjAcum IsNot Nothing Then
|
||||
'Dim Mensaje As String = ""
|
||||
Dim CveMovimiento = ObjInventario.AddMovimiento(factura.CveAlmacen, factura.CveConceptoMovimiento, 1, factura.Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta,
|
||||
Dim CveMovimiento As Integer = ObjInventario.AddMovimiento(factura.CveAlmacen, factura.CveConceptoMovimiento, 1, factura.Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta,
|
||||
CveSubProyecto, CveActivoFijo:=-1,
|
||||
Observaciones:=factura.MovimientoObservaciones, Recibio:=factura.MovimientoRecibio, CvePersonal:=-1, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, Modulo:="RU/GModel")
|
||||
If CveMovimiento <= 0 Then
|
||||
@@ -4302,7 +4302,7 @@ Namespace Modelos
|
||||
|
||||
'SI ES UNA RNC DE CARGO GENERA EL MOVIMIENTO DE ALMACEN AQUI
|
||||
If factura.TipoDocto = "RNC" AndAlso factura.Num3 = 10 Then
|
||||
Dim CveMovimiento = GenerarMovimientoAlmacenDevolucionRNC(ObjInventario, factura, DtInventario, factura.CveAlmacen, factura.CveConceptoMovimiento, factura.CveMoneda, factura.CveVenta, "Modelos/RNC1")
|
||||
Dim CveMovimiento As Integer = GenerarMovimientoAlmacenDevolucionRNC(ObjInventario, factura, DtInventario, factura.CveAlmacen, factura.CveConceptoMovimiento, factura.CveMoneda, factura.CveVenta, "Modelos/RNC1")
|
||||
If CveMovimiento <= 0 Then
|
||||
OcurrioError = True
|
||||
Else
|
||||
@@ -4336,11 +4336,11 @@ Namespace Modelos
|
||||
'SI TIENE UNA GARANTIA, GENERAR EL MOVIMIENTO DE ALMACEN
|
||||
If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then
|
||||
Dim TotalGarantia As Decimal = 0
|
||||
Dim CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, CveConceptoMovimiento, 1, FechaMovimiento, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, -1, -1, Observaciones:="", Guia:="", Modulo:=Modulo)
|
||||
Dim FolioGarantia = ObjInventario.Folio
|
||||
Dim CveMovimientoGarantia As Integer = ObjInventario.AddMovimiento(CveAlmacenGarantia, CveConceptoMovimiento, 1, FechaMovimiento, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, -1, -1, Observaciones:="", Guia:="", Modulo:=Modulo)
|
||||
Dim FolioGarantia As Integer = ObjInventario.Folio
|
||||
|
||||
For Each RowGarantia As DataRow In DtGarantias.Rows
|
||||
Dim CvePS = RowGarantia("CvePS").ToString().ToEntero()
|
||||
Dim CvePS As Integer = RowGarantia("CvePS").ToString().ToEntero()
|
||||
Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero()
|
||||
Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero()
|
||||
Dim PU As Decimal = 0 ' el valor de garántía debe de ser cero, tema contable
|
||||
@@ -4482,7 +4482,7 @@ Namespace Modelos
|
||||
|
||||
If ErrorList.Count = 0 Then
|
||||
If MovDetalle.Rows.Count > 0 Then
|
||||
Dim CveMovimientoSalidaPorTraspaso = -1
|
||||
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
|
||||
|
||||
'Le damos salida de apartado por traspaso
|
||||
CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision)
|
||||
@@ -4537,7 +4537,7 @@ Namespace Modelos
|
||||
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 = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1) As Integer
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ContadorMovtosDetalles = 0
|
||||
Dim ContadorMovtosDetalles As Integer = 0
|
||||
|
||||
'Creamos el movimiento
|
||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Mod/M2")
|
||||
@@ -4565,7 +4565,7 @@ Namespace Modelos
|
||||
|
||||
'COMIENZA: VENTADETALLE
|
||||
'CUANDO SEA SALIDA VA POR LA VENTA DETALLE DE LA FACTURA DE LA REMISION - OJO!! SOLO FUNCIONA HASTA ORITA QUE SE HACE SALIDA SOLO CUANDO SE FACTURA LA REMISION
|
||||
Dim CveVentaDetalle = If(ConceptoEntrada.Contiene(3, 40), DtDetalle.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero)
|
||||
Dim CveVentaDetalle As Integer = If(ConceptoEntrada.Contiene(3, 40), DtDetalle.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero, MovDet("CveVentaDetalle").ToString.ToEntero)
|
||||
|
||||
Dim CveVentaDetalleRemision As Integer = -1
|
||||
If ConceptoEntrada = 40 AndAlso MovDet("CveVentaDetalle").ToString().ToEntero() > 0 Then
|
||||
@@ -5398,7 +5398,7 @@ Namespace Modelos
|
||||
'VERIFICA SI DEBE VALIDAR ANTE EL SAT
|
||||
If ValidarSAT AndAlso Not (UsuarioActual.Empresa.Funcionalidad(529) = "1") Then
|
||||
|
||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), UsuarioActual.Empresa.FacturaProduccion)
|
||||
Dim Vigencia As Timbrado.AcuseCancelacionSAT = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), UsuarioActual.Empresa.FacturaProduccion)
|
||||
|
||||
If Vigencia IsNot Nothing Then
|
||||
|
||||
@@ -5602,7 +5602,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
'SI ES CANCELACION EN PROCESO CANCELA EL PROCESO DE LAS REMISIONES
|
||||
Dim SeCancelaRemisionProceso = (CveEstatus.Contiene(20, 23) AndAlso TieneRemisionesRelacionadas AndAlso CancelarRemisiones)
|
||||
Dim SeCancelaRemisionProceso As Boolean = (CveEstatus.Contiene(20, 23) AndAlso TieneRemisionesRelacionadas AndAlso CancelarRemisiones)
|
||||
|
||||
Retorno.CveEstatus = CveEstatus
|
||||
|
||||
@@ -5985,7 +5985,7 @@ Namespace Modelos
|
||||
|
||||
Dim DtDevRemision As DataTable = DtDevoluciones.FiltraParametros($"CveRemision={CveRemision}")
|
||||
|
||||
Dim DtDevMovs = DtDevRemision.FiltraParametros("", DistinctColumns:={"CveMovimiento", "CveRemision", "CveAlmacen", "CveAlmacenDestino"})
|
||||
Dim DtDevMovs As DataTable = DtDevRemision.FiltraParametros("", DistinctColumns:={"CveMovimiento", "CveRemision", "CveAlmacen", "CveAlmacenDestino"})
|
||||
|
||||
For Each RowDevolucion As DataRow In DtDevMovs.Rows
|
||||
CveAlmacen = RowDevolucion("CveAlmacen").ToString().ToEntero()
|
||||
@@ -6118,7 +6118,7 @@ Namespace Modelos
|
||||
'DEBE REGRESAR LA EXISTENCIA DE (ENTREGA POR ADELANTADO) AL ALMACEN ORGINAL (GENERAL,SIN COSTO)
|
||||
If Not ErrorCancelar AndAlso DtMovRemision IsNot Nothing AndAlso DtMovRemision.Rows.Count > 0 AndAlso SaldoAlmacenExA <> 0 Then
|
||||
|
||||
Dim DtDevMovs = DtMovRemision.FiltraParametros("", DistinctColumns:={"CveMovimiento", "CveAlmacen"})
|
||||
Dim DtDevMovs As DataTable = DtMovRemision.FiltraParametros("", DistinctColumns:={"CveMovimiento", "CveAlmacen"})
|
||||
|
||||
For Each RowDevolucion As DataRow In DtDevMovs.Rows
|
||||
CveAlmacen = RowDevolucion("CveAlmacen").ToString().ToEntero()
|
||||
@@ -6395,7 +6395,7 @@ Namespace Modelos
|
||||
Try
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Dim CveMovimientoVirtual As Integer = -1
|
||||
Dim ValidaVirtual = True
|
||||
Dim ValidaVirtual As Boolean = True
|
||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
@@ -6431,7 +6431,7 @@ Namespace Modelos
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CvePS As Integer = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
@@ -6470,7 +6470,7 @@ Namespace Modelos
|
||||
Try
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Dim CveMovimientoVirtual As Integer = -1
|
||||
Dim ValidaVirtual = True
|
||||
Dim ValidaVirtual As Boolean = True
|
||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
@@ -6510,7 +6510,7 @@ Namespace Modelos
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CvePS As Integer = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowUsado("PU").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
@@ -6549,9 +6549,9 @@ Namespace Modelos
|
||||
Dim ErrorCancelar As Boolean = False
|
||||
|
||||
Dim DtMovtosDev As New DataTable
|
||||
Dim CveAlmacenTraspasoDestinoDevRem = -1
|
||||
Dim CveAlmacenTraspasoDestinoDevRem As Integer = -1
|
||||
|
||||
Dim CveVentaDetalleRem = -1
|
||||
Dim CveVentaDetalleRem As Integer = -1
|
||||
Dim CantidadDevolver As Decimal = 0
|
||||
Dim CantidadRem As Decimal = 0
|
||||
Dim CveMovimientoSalidaDevRem As Integer = 0
|
||||
@@ -6691,8 +6691,8 @@ Namespace Modelos
|
||||
'SALIDA DE (ENTREGA POR ADELANTADO)
|
||||
If Not ErrorCancelar Then
|
||||
For Each DrRem As DataRow In DtMovDetalle.Rows
|
||||
Dim CveVentaDetalleRem = DrRem("CveVentaDetalleRemision").ToString.ToEntero
|
||||
Dim CantidadRem = DrRem("Cantidad").ToString.ToDecimal
|
||||
Dim CveVentaDetalleRem As Integer = DrRem("CveVentaDetalleRemision").ToString.ToEntero
|
||||
Dim CantidadRem As Decimal = DrRem("Cantidad").ToString.ToDecimal
|
||||
|
||||
'SI NO UTILIZA EL CAMPO DEBE TOMAR DE LA VENTA
|
||||
If Not CveVentaDetalleRem > 0 Then
|
||||
@@ -6735,8 +6735,8 @@ Namespace Modelos
|
||||
Dim ValorInventario As Decimal = DtEntradaDetalle.SUMD("Total")
|
||||
Dim EsContabilizable As Boolean = False
|
||||
Dim Concepto As String = "Cancelación"
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancExAR1", 74, DtEntradaDetalle.SUMD("Total"), DtEntradaDetalle.SUMD("Total"), 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Mod/CancExAR1", 74, DtEntradaDetalle.SUMD("Total"), DtEntradaDetalle.SUMD("Total"), 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim tCveSubProyecto As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorInventario, ValorInventario, 68, Concepto, Concepto, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoSalidaDevRem, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then
|
||||
ErrorCancelar = True
|
||||
@@ -6772,11 +6772,11 @@ Namespace Modelos
|
||||
DtTraspasos.Columns.Add("CveMovimientoEntrada", GetType(Integer))
|
||||
DtTraspasos.Columns.Add("FolioEntrada", GetType(Integer))
|
||||
|
||||
Dim DtTempApartados = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 9", "CveAlmacen")
|
||||
Dim CveMovimientoSalidaApartado = -1
|
||||
Dim CveAlmacenApartado = -1
|
||||
Dim CveAlmacenOrigen = CveAlmacenDevolucion
|
||||
Dim FolioSalida As Integer = 0, FolioEntrada = 0, CveMovimientoSalida = 0, CveMovimientoEntradaApartado = 0
|
||||
Dim DtTempApartados As DataTable = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 9", "CveAlmacen")
|
||||
Dim CveMovimientoSalidaApartado As Integer = -1
|
||||
Dim CveAlmacenApartado As Integer = -1
|
||||
Dim CveAlmacenOrigen As Integer = CveAlmacenDevolucion
|
||||
Dim FolioSalida As Integer = 0, FolioEntrada As Integer = 0, CveMovimientoSalida As Integer = 0, CveMovimientoEntradaApartado As Integer = 0
|
||||
|
||||
For Each Dr As DataRow In DtTempApartados.Rows
|
||||
|
||||
@@ -6785,7 +6785,7 @@ Namespace Modelos
|
||||
FolioSalida = ObjInventario.Folio
|
||||
CveAlmacenApartado = Dr("CveAlmacen").ToString.ToEntero
|
||||
|
||||
Dim DrMovto = DtTraspasos.NewRow
|
||||
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||
DrMovto("Almacen") = Dr("Almacen").ToString.ToEntero
|
||||
DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString.ToEntero
|
||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado
|
||||
|
||||
@@ -1064,7 +1064,7 @@ Partial Class RegPoliza
|
||||
Dim TipoMovto As Boolean = Not Row("Cargo").ToString.ToDouble <> 0
|
||||
|
||||
If Row("Id").ToString.ToEntero <> -1 Then
|
||||
Dim Id = Row("Id").ToString
|
||||
Dim Id As String = Row("Id").ToString
|
||||
|
||||
'Agrega a la Bitacora
|
||||
If Row("Estado").ToString.Trim = "U" Then
|
||||
@@ -1186,24 +1186,24 @@ Partial Class RegPoliza
|
||||
'If tCveSub <= 0 AndAlso drt("IdSegNeg").ToString.ToEntero = 0 Then 'toma el primero
|
||||
' tCveSub = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
'End If ' Now, drt("IdCuenta").ToString.ToEntero, 0,
|
||||
'If ObjConta.AddPrePolizasDetalle(tCvePrePoliza, drt("TipoMovto").ToString = "True",
|
||||
' drt("Importe").ToString.ToDecimal,
|
||||
' drt("Importe").ToString.ToDecimal, 299,
|
||||
' drt("Concepto").ToString,
|
||||
' drt("Concepto").ToString,
|
||||
' CveSubProyecto:=tCveSub,
|
||||
' CveCuenta:=tCveCuenta) Then
|
||||
' 'registro
|
||||
' If Not ObjContaq.UpdateMovimientoPrePolizaDetalle(drt("IdPoliza").ToString.ToEntero,
|
||||
' drt("Id").ToString.ToEntero,
|
||||
' ObjConta.CvePrePolizaDetalle) Then
|
||||
' ErrorRegistro = True
|
||||
' Exit For
|
||||
' End If
|
||||
'Else
|
||||
' ErrorRegistro = True
|
||||
' Exit For
|
||||
'End If
|
||||
If ObjConta.AddPrePolizasDetalle(tCvePrePoliza, drt("TipoMovto").ToString = "True",
|
||||
drt("Importe").ToString.ToDecimal,
|
||||
drt("Importe").ToString.ToDecimal, 299,
|
||||
drt("Concepto").ToString,
|
||||
drt("Concepto").ToString,
|
||||
CveSubProyecto:=tCveSub,
|
||||
CveCuenta:=tCveCuenta) Then
|
||||
'registro
|
||||
If Not ObjContaq.UpdateMovimientoPrePolizaDetalle(drt("IdPoliza").ToString.ToEntero,
|
||||
drt("Id").ToString.ToEntero,
|
||||
ObjConta.CvePrePolizaDetalle) Then
|
||||
ErrorRegistro = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
ErrorRegistro = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorRegistro AndAlso tCvePrePolizaOriginal <= 0 AndAlso Not ObjConta.UpdatePrePoliza(dr("FechaPol").ToString.ToDate, dr("Folio").ToString.ToEntero, -1, tIdPoliza, tCvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
@@ -1276,7 +1276,7 @@ Partial Class RegPoliza
|
||||
UpDevoluciones.Update()
|
||||
End Sub
|
||||
Protected Sub GvDevoluciones_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDevoluciones.RowDeleting
|
||||
Dim ErrorEliminar = False
|
||||
Dim ErrorEliminar As Boolean = False
|
||||
|
||||
If IDPoliza > 0 Then
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
@@ -1303,7 +1303,7 @@ Partial Class RegPoliza
|
||||
CargaGridDevoluciones("", 0)
|
||||
End Sub
|
||||
Protected Sub GvDevoluciones_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvDevoluciones.RowUpdating
|
||||
Dim ErrorDevolucion = False
|
||||
Dim ErrorDevolucion As Boolean = False
|
||||
|
||||
If IDPoliza > 0 Then
|
||||
Dim gvr As GridViewRow = GvDevoluciones.Rows(e.RowIndex)
|
||||
@@ -1327,7 +1327,7 @@ Partial Class RegPoliza
|
||||
CargaDevoluciones()
|
||||
End If
|
||||
Else
|
||||
Dim row() = DtDevoluciones.Select(String.Format("Id = {0}", e.Keys("Id")))
|
||||
Dim row As DataRow() = DtDevoluciones.Select(String.Format("Id = {0}", e.Keys("Id")))
|
||||
|
||||
' row(0)("IdCuenta") = GvDevoluciones.Rows(e.RowIndex).FCDropDownList("DdlProveedor").SelectedValue
|
||||
row(0)("IdProveedor") = GvDevoluciones.Rows(e.RowIndex).FCDropDownList("DdlProveedor").SelectedValue
|
||||
@@ -1354,7 +1354,7 @@ Partial Class RegPoliza
|
||||
|
||||
#Region "D E V O L U C I O N E S - I V A"
|
||||
Protected Sub LbAgregarDevolucion_Click(sender As Object, e As EventArgs)
|
||||
Dim ErrorDevolucion = False
|
||||
Dim ErrorDevolucion As Boolean = False
|
||||
|
||||
If IDPoliza > 0 Then
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
@@ -1373,7 +1373,7 @@ Partial Class RegPoliza
|
||||
CargaDevoluciones()
|
||||
End If
|
||||
Else
|
||||
Dim row = DtDevoluciones.NewRow
|
||||
Dim row As DataRow = DtDevoluciones.NewRow
|
||||
|
||||
row("ID") = (DtDevoluciones.Rows.Count + 1).ToString
|
||||
'row("IdCuenta") = DdlProveedor.SelectedValue
|
||||
@@ -1399,7 +1399,7 @@ Partial Class RegPoliza
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregarCausacion_Click(sender As Object, e As EventArgs)
|
||||
Dim ErrorDevolucion = False
|
||||
Dim ErrorDevolucion As Boolean = False
|
||||
|
||||
If IDPoliza > 0 Then
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
@@ -90,7 +90,7 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
Dim ErrorParametros = True
|
||||
Dim ErrorParametros As Boolean = True
|
||||
|
||||
CargaTipoCuentas()
|
||||
CargaMoneda()
|
||||
|
||||
@@ -86,7 +86,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
' Response.Redirect($"/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx")
|
||||
'End If
|
||||
|
||||
Dim ErrorParametros = True
|
||||
Dim ErrorParametros As Boolean = True
|
||||
|
||||
CargaTipoCuentas()
|
||||
'TxtCuenta.Enabled = False
|
||||
@@ -226,8 +226,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
#End Region
|
||||
|
||||
Private Sub InsertaTotales()
|
||||
Dim i = 0
|
||||
Dim Aumento = 0
|
||||
Dim i As Integer = 0
|
||||
Dim Aumento As Integer = 0
|
||||
Dim Row As DataRow
|
||||
Dim Row2 As DataRow
|
||||
|
||||
@@ -260,7 +260,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
End If
|
||||
|
||||
If dr("CtaMayor").ToString = "2" Then
|
||||
For index = dr("Clasificacion").ToString.ToEntero + Aumento To DtDatos.Rows.Count
|
||||
For index As Integer = dr("Clasificacion").ToString.ToEntero + Aumento To DtDatos.Rows.Count
|
||||
If DtDatos.Rows(index)("Nombre").ToString <> dr("Nombre").ToString Then
|
||||
i = index
|
||||
Exit For
|
||||
|
||||
Reference in New Issue
Block a user