merge manual

This commit is contained in:
Antonio Gonzalez
2020-10-12 19:23:59 -07:00
30 changed files with 2115 additions and 510 deletions

View File

@@ -2135,12 +2135,12 @@ Partial Class AF_AF
'PREPOLIZA DE IMPORTACION DESDE ALMACEN
If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then
Dim IDCtaContableInv = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={AFInvCveAlmacen}").ToEntero
Dim CveCuentaInv = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen={AFInvCveAlmacen}").ToEntero
'Dim CveCuentaInv = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen={AFInvCveAlmacen}").ToEntero
If Not ErrorGuardar Then
Dim CvePrePoliza As Integer = ObjContabilidad.AddPrePolizas("AF/ImportadoInv", 4, TxtValorCompra.Text.ToDouble, TxtValorCompra.Text.ToDouble, 1, Now, $"AF importado de Almacén {TxtCodigo.Text.Trim}", UsuarioActual.CveUsuario, CveEmpresaActual)
If ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, False, TxtValorCompra.Text.ToDecimal, $"{TxtCodigo.Text.Trim} - {TxtDescripcion.Text.Trim}", 49, $"{TxtCodigo.Text.Trim} - {TxtDescripcion.Text.Trim}", Now, DdlCtaContable.SelectedValue.Trim.ToEntero, -1, CveActivoFijo:=CveActivoFijo, ImporteMX:=TxtValorCompra.Text.ToDecimal, CveCuenta:=If(UsuarioActual.Empresa.UsaContabilidad AndAlso UsuarioActual.Empresa.UsaContabilidadSIG, ObtenerCuentaDobleConta(DdlCtaContable.SelectedValue.Trim.ToEntero, UsuarioActual.CveEmpresa), -1)) Then
If Not ErrorGuardar Then
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, True, TxtValorCompra.Text.ToDecimal, TxtCodigo.Text.Trim, 68, TxtCodigo.Text.Trim, Now, IDCtaContableInv, -1, CveMovimientoAlmacen:=CveMovimientoSalidaInv, ImporteMX:=TxtValorCompra.Text.ToDecimal, CveCuenta:=CveCuentaInv) Then
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, True, TxtValorCompra.Text.ToDecimal, TxtCodigo.Text.Trim, 68, TxtCodigo.Text.Trim, Now, IDCtaContableInv, -1, CveMovimientoAlmacen:=CveMovimientoSalidaInv, ImporteMX:=TxtValorCompra.Text.ToDecimal) Then
ErrorGuardar = True
End If
End If

View File

@@ -417,8 +417,8 @@ Public Class ClsBancos
Me.FFinal = Data.Rows(0)("FFinal").ToString.ToEntero
Me.IdCtaContable = Data.Rows(0)("IdCtaContable").ToString.ToEntero
Me.IdCtaContableComplementaria = Data.Rows(0)("IdCtaContableComplementaria").ToString.ToEntero
Me.CveCuentaConta = Data.Rows(0)("IdCtaContableSIG").ToString.ToEntero
Me.CveCuentaContaComplementaria = Data.Rows(0)("IdCtaContableComplementariaSIG").ToString.ToEntero
Me.CveCuentaConta = Data.Rows(0)("CveCuentaContable").ToString.ToEntero
Me.CveCuentaContaComplementaria = Data.Rows(0)("CveCuentaComplementaria").ToString.ToEntero
Me.FormatoCheque = Data.Rows(0)("FormatoCheque").ToString
Me.Estatus = Data.Rows(0)("Estatus").ToString
Me.Fecha = Data.Rows(0)("Fecha").ToString.ToDate

View File

@@ -2183,13 +2183,14 @@ Public Class ClsCompras
#Region " ESTATUS ALMACEN "
Public Function UpdateEstatusAlmacen(CveCompra As Integer, ValorEstatus As Integer) As Boolean
Public Function UpdateEstatusAlmacen(CveCompra As Integer, ValorEstatus As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComprasEstatusAlmacenUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@Estatus", SqlDbType.Int).Value = ValorEstatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
@@ -2201,13 +2202,14 @@ Public Class ClsCompras
Return Retorno
End Function
Public Function UpdateEstatusAlmacenDetalle(CveCompraDetalle As Integer, ValorEstatus As Integer) As Boolean
Public Function UpdateEstatusAlmacenDetalle(CveCompraDetalle As Integer, ValorEstatus As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComprasDetalleEstatusAlmacenUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
.Add("@Estatus", SqlDbType.Int).Value = ValorEstatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
@@ -2445,6 +2447,30 @@ Public Class ClsCompras
Return Retorno
End Function
Public Function GetComprasPagosConciliados(CveCompra As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComprasPagosConciliadosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los de pagos de compra", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function RemoveComplementoPagoDesVincular(CveFactura As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_CompraComplementoDesVincular")

View File

@@ -62,7 +62,7 @@ Public Class ClsContabilidad
Public Property CveEmpresa As Integer
Public Property CveTipoPlantillaPoliza As Integer
Public Property ContaIdPoliza As Integer
Public Property ContaIdPoliza As Integer = 0
Public Property ContaFolio As Integer
Public Property ValorPolizaDescuadre As Integer
@@ -153,22 +153,22 @@ Public Class ClsContabilidad
Public Function CuentasContablesSigGet(cveEmpresa As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Conta_CuentasContablesSigGet", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex1 As SqlException
OnError("Ocurrió un error al obtener las Cuentas Contables", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Catch ex As Exception
OnError("Ocurrió un error al obtener las Cuentas Contables", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
'Public Function CuentasContablesSigGet(cveEmpresa As Int32) As Boolean
' Dim retorno As Boolean = False
' DataAdapter("PA_Conta_CuentasContablesSigGet", CommandType.StoredProcedure)
' With SqlAdapter.SelectCommand.Parameters
' .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
' End With
' Try
' SqlAdapter.Fill(Data)
' retorno = True
' Catch ex1 As SqlException
' OnError("Ocurrió un error al obtener las Cuentas Contables", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
' Catch ex As Exception
' OnError("Ocurrió un error al obtener las Cuentas Contables", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
' End Try
' Return retorno
'End Function
#Region " C O N T A B I L I D A D - P R E P O L I Z A"
Public Function ObtenerTipoPoliza(Valor1 As String, Valor2 As String, CveEmpresa As Integer) As Integer
@@ -1118,8 +1118,9 @@ Public Class ClsContabilidad
Public Function ContabilizarPrePoliza(CvePrePoliza As Integer, CveUsuario As Integer, Empresa As Empresa, Optional Fecha As Date = MinFecha, Optional Concepto As String = "",
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
Dim StrLog As New StringBuilder
Dim Retorno As Boolean = False
StrLog.AppendFormat("CvePrep:{0} - Inicio", CvePrePoliza)
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
@@ -1396,6 +1397,8 @@ Public Class ClsContabilidad
If Not ContaCompartida Then ObjConta.Dispose()
End If
StrLog.AppendFormat(" - Fin")
StrLog.ToString.GuardaLogAD("LogContabilidazacion")
Return Retorno
End Function
@@ -4645,25 +4648,25 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function GetSaldoCuenta(IdCuenta As Integer, TipoMovto As Integer, Ejercicio As Integer) As Boolean
Dim Retorno As Boolean
'Public Function GetSaldoCuenta(IdCuenta As Integer, TipoMovto As Integer, Ejercicio As Integer) As Boolean
' Dim Retorno As Boolean
If TipoMovto = 0 Then
DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 1 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0}", IdCuenta, Ejercicio), CommandType.Text)
Else
DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 0 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0} ", IdCuenta, Ejercicio), CommandType.Text)
End If
' If TipoMovto = 0 Then
' DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 1 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0}", IdCuenta, Ejercicio), CommandType.Text)
' Else
' DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 0 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0} ", IdCuenta, Ejercicio), CommandType.Text)
' End If
Try
SqlAdapter.Fill(Data)
'Retorno = Math.Round(SqlCommand.ExecuteScalar.ToString.ToDouble, 2)
Retorno = True
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener eL saldo de la cuenta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
' Try
' SqlAdapter.Fill(Data)
' 'Retorno = Math.Round(SqlCommand.ExecuteScalar.ToString.ToDouble, 2)
' Retorno = True
' Catch ex As Exception
' Me.OnError("Ocurrió un error al obtener eL saldo de la cuenta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
Return Retorno
End Function
' Return Retorno
'End Function
Public Function GetRepPresupuestosEgresosSaldos(Ejercicio As Integer, Fecha As Date, Capitulo As String, CveClasificacion As Integer, CveFuenteFinanciamiento As Integer, CveProgramaOperativo As Integer, CveUnidadAdministrativa As Integer, CveTipoGasto As Integer, Gpo As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_PresupuestosEgresosSaldosRep")
@@ -4742,138 +4745,138 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function Conta_ContabilizaPrePoliza(CvePrepoliza As Integer, Ejercicio As Integer) As Boolean
Dim Retorno = False
'Public Function Conta_ContabilizaPrePoliza(CvePrepoliza As Integer, Ejercicio As Integer) As Boolean
' Dim Retorno = False
DataAdapter("PA_Conta_ContabilizaPrepolizas")
' DataAdapter("PA_Conta_ContabilizaPrepolizas")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrepoliza", SqlDbType.Int).Value = CvePrepoliza
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
.Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
End With
' With SqlAdapter.SelectCommand.Parameters
' .Add("@CvePrepoliza", SqlDbType.Int).Value = CvePrepoliza
' .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
' .Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
' End With
Try
SqlAdapter.Fill(Data)
If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
Retorno = True
Else
Retorno = False
End If
Catch ex As Exception
Me.OnError("Ocurrió un error al contabilizar la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
' Try
' SqlAdapter.Fill(Data)
' If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
' Retorno = True
' Else
' Retorno = False
' End If
' Catch ex As Exception
' Me.OnError("Ocurrió un error al contabilizar la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
Return Retorno
End Function
Public Function Conta_CompactaPrePoliza(CvePrepoliza As Integer) As Boolean
Dim Retorno = False
' Return Retorno
'End Function
'Public Function Conta_CompactaPrePoliza(CvePrepoliza As Integer) As Boolean
' Dim Retorno = False
DataAdapter("PA_Comp_CompactaPrepoliza")
' DataAdapter("PA_Comp_CompactaPrepoliza")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrepoliza
.Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
End With
' With SqlAdapter.SelectCommand.Parameters
' .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrepoliza
' .Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
' End With
Try
SqlAdapter.Fill(Data)
If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
Retorno = True
Else
Retorno = False
End If
Catch ex As Exception
Me.OnError("Ocurrió un error al contabilizar la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
' Try
' SqlAdapter.Fill(Data)
' If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
' Retorno = True
' Else
' Retorno = False
' End If
' Catch ex As Exception
' Me.OnError("Ocurrió un error al contabilizar la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
Return Retorno
End Function
Public Function Conta_GeneraPptarias(CveCompra As Integer) As Boolean
Dim Retorno = False
' Return Retorno
'End Function
'Public Function Conta_GeneraPptarias(CveCompra As Integer) As Boolean
' Dim Retorno = False
DataAdapter("PA_Conta_GeneraPptarias")
' DataAdapter("PA_Conta_GeneraPptarias")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
End With
' With SqlAdapter.SelectCommand.Parameters
' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra
' .Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
' End With
Try
SqlAdapter.Fill(Data)
If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
Retorno = True
Else
Retorno = False
End If
Catch ex As Exception
Me.OnError("Ocurrió un error al Generar las Cuentas Presupuestarias", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
' Try
' SqlAdapter.Fill(Data)
' If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
' Retorno = True
' Else
' Retorno = False
' End If
' Catch ex As Exception
' Me.OnError("Ocurrió un error al Generar las Cuentas Presupuestarias", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
Return Retorno
End Function
' Return Retorno
'End Function
Public Function AddConta_Poliza(CveTipoPoliza As Integer, CveEjercicio As Integer, Folio As Integer, FechaPoliza As Date, Concepto As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
Dim Retorno As Integer = 0
'Public Function AddConta_Poliza(CveTipoPoliza As Integer, CveEjercicio As Integer, Folio As Integer, FechaPoliza As Date, Concepto As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
' Dim Retorno As Integer = 0
DataAdapter("PA_Add_Conta_Polizas")
' DataAdapter("PA_Add_Conta_Polizas")
With SqlAdapter.SelectCommand.Parameters
.Add("@Folio", SqlDbType.Int).Value = Folio
' .Add("@CveTipoPoliza", SqlDbType.Int).Value = CveTipoPoliza
.Add("@Ejercicio", SqlDbType.Int).Value = CveEjercicio
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
.Add("@FechaPoliza", SqlDbType.DateTime).Value = FechaPoliza
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePoliza", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePoliza").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error al agregar la poliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
' With SqlAdapter.SelectCommand.Parameters
' .Add("@Folio", SqlDbType.Int).Value = Folio
' ' .Add("@CveTipoPoliza", SqlDbType.Int).Value = CveTipoPoliza
' .Add("@Ejercicio", SqlDbType.Int).Value = CveEjercicio
' .Add("@Concepto", SqlDbType.VarChar).Value = Concepto
' .Add("@FechaPoliza", SqlDbType.DateTime).Value = FechaPoliza
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
' .Add("@CvePoliza", SqlDbType.Int).Direction = ParameterDirection.Output
' End With
' Try
' SqlAdapter.Fill(Data)
' Retorno = SqlAdapter.SelectCommand.Parameters("@CvePoliza").Value.ToString.ToEntero
' Catch ex As Exception
' OnError("Ocurrió un error al agregar la poliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
Return Retorno
End Function
Public Function AddConta_PolizaDetalle(CvePoliza As Integer, CveCuenta As Integer, TipoMovto As Boolean, Importe As Double, Referencia As String,
Concepto As String, FechaMovto As Date, CveUsuario As Integer, Optional ImporteMonedaExtranjera As Double = 0) As Boolean
Dim Retorno As Boolean = False
' Return Retorno
'End Function
'Public Function AddConta_PolizaDetalle(CvePoliza As Integer, CveCuenta As Integer, TipoMovto As Boolean, Importe As Double, Referencia As String,
' Concepto As String, FechaMovto As Date, CveUsuario As Integer, Optional ImporteMonedaExtranjera As Double = 0) As Boolean
' Dim Retorno As Boolean = False
If CvePoliza <= 0 Or CveCuenta <= 0 Then
Return False
End If
' If CvePoliza <= 0 Or CveCuenta <= 0 Then
' Return False
' End If
DataAdapter("PA_Add_Conta_PolizasDetalles")
'DataAdapter("PA_Conta_PolizasDetalleAdd")
' DataAdapter("PA_Add_Conta_PolizasDetalles")
' 'DataAdapter("PA_Conta_PolizasDetalleAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePoliza", SqlDbType.Int).Value = CvePoliza
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@TipoMovto", SqlDbType.Int).Value = TipoMovto
.Add("@Total", SqlDbType.Money).Value = Math.Round(Importe, 2)
.Add("@ImporteME", SqlDbType.Money).Value = ImporteMonedaExtranjera
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
End With
' With SqlAdapter.SelectCommand.Parameters
' .Add("@CvePoliza", SqlDbType.Int).Value = CvePoliza
' .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
' .Add("@TipoMovto", SqlDbType.Int).Value = TipoMovto
' .Add("@Total", SqlDbType.Money).Value = Math.Round(Importe, 2)
' .Add("@ImporteME", SqlDbType.Money).Value = ImporteMonedaExtranjera
' .Add("@Referencia", SqlDbType.VarChar).Value = Referencia
' .Add("@Concepto", SqlDbType.VarChar).Value = Concepto
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
' .Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
' End With
Try
SqlAdapter.Fill(Data)
If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero <> 0 Then
Retorno = False
Else
Retorno = True
End If
Catch ex As Exception
OnError("Ocurrió un error al agregar el movimiento en la póliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
' Try
' SqlAdapter.Fill(Data)
' If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero <> 0 Then
' Retorno = False
' Else
' Retorno = True
' End If
' Catch ex As Exception
' OnError("Ocurrió un error al agregar el movimiento en la póliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
Return Retorno
End Function
' Return Retorno
'End Function
Public Function GetSaldoCuentaAC(TipoMovto As Integer, CveCuentaAprobado As Integer, CveCuentaDevengado As Integer, Ejercicio As Integer) As Decimal
Dim Retorno As Decimal
DataAdapter("PA_Conta_CalculaSaldo")
@@ -4895,51 +4898,51 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function GetSegmentosNegocio(Id As Integer, Codigo As String) As Boolean
Dim Retorno As Boolean = False
Dim StrSQl = New StringBuilder
'Public Function GetSegmentosNegocio(Id As Integer, Codigo As String) As Boolean
' Dim Retorno As Boolean = False
' Dim StrSQl = New StringBuilder
StrSQl.Clear()
StrSQl.Append(" SELECT Id, RTRIM (LTRIM (Codigo)) AS Codigo, Nombre, '' AS CveProyecto, '' AS CveSubProyecto ")
StrSQl.Append(" FROM SegmentosNegocio ")
StrSQl.Append(" WHERE (@Id = -1 OR Id = @Id) ")
StrSQl.Append(" AND (@Codigo = '-1' OR Codigo = @Codigo) ")
' StrSQl.Clear()
' StrSQl.Append(" SELECT Id, RTRIM (LTRIM (Codigo)) AS Codigo, Nombre, '' AS CveProyecto, '' AS CveSubProyecto ")
' StrSQl.Append(" FROM SegmentosNegocio ")
' StrSQl.Append(" WHERE (@Id = -1 OR Id = @Id) ")
' StrSQl.Append(" AND (@Codigo = '-1' OR Codigo = @Codigo) ")
DataAdapter(StrSQl.ToString, CommandType.Text)
SqlAdapter.SelectCommand.Parameters.Add("@Id", SqlDbType.Int).Value = Id
SqlAdapter.SelectCommand.Parameters.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
' DataAdapter(StrSQl.ToString, CommandType.Text)
' SqlAdapter.SelectCommand.Parameters.Add("@Id", SqlDbType.Int).Value = Id
' SqlAdapter.SelectCommand.Parameters.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar los Segmentos de Negocio.", ex)
End Try
' Try
' SqlAdapter.Fill(Data)
' Retorno = True
' Catch ex As Exception
' OnError("Ocurrió un error al consultar los Segmentos de Negocio.", ex)
' End Try
Return Retorno
End Function
' Return Retorno
'End Function
Public Function GetSubProyectos(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
Dim StrSQl = New StringBuilder
'Public Function GetSubProyectos(CveEmpresa As Integer) As Boolean
' Dim Retorno As Boolean = False
' Dim StrSQl = New StringBuilder
DataAdapter("PA_Comp_Compras_Pptarias")
' DataAdapter("PA_Comp_Compras_Pptarias")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
' With SqlAdapter.SelectCommand.Parameters
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
' End With
SqlAdapter.Fill(Data)
Retorno = True
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar los Segmentos de Negocio.", ex)
End Try
' SqlAdapter.Fill(Data)
' Retorno = True
' Try
' SqlAdapter.Fill(Data)
' Retorno = True
' Catch ex As Exception
' OnError("Ocurrió un error al consultar los Segmentos de Negocio.", ex)
' End Try
Return Retorno
End Function
' Return Retorno
'End Function
Public Function GetNumeroPoliza(CveTipoPoliza As Integer, Tipo As String, Fecha As DateTime, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -4962,29 +4965,29 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function Compras_Pptarias(CveCompra As Integer, Importe As Decimal, CveConceptoContable As Integer) As Boolean
'Public Function Compras_Pptarias(CveCompra As Integer, Importe As Decimal, CveConceptoContable As Integer) As Boolean
Dim Retorno As Boolean = False
' Dim Retorno As Boolean = False
DataAdapter("PA_Comp_Compras_Pptarias")
' DataAdapter("PA_Comp_Compras_Pptarias")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@Importe", SqlDbType.Decimal).Value = Importe
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
End With
' With SqlAdapter.SelectCommand.Parameters
' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra
' .Add("@Importe", SqlDbType.Decimal).Value = Importe
' .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
' End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex1 As SqlException
OnError("Ocurrió un error al obtener las Plantillas", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Catch ex As Exception
OnError("Ocurrió un error al obtener las Plantillas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
' Try
' SqlAdapter.Fill(Data)
' Retorno = True
' Catch ex1 As SqlException
' OnError("Ocurrió un error al obtener las Plantillas", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
' Catch ex As Exception
' OnError("Ocurrió un error al obtener las Plantillas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
' End Try
Return Retorno
End Function
' Return Retorno
'End Function
#End Region
#Region "FIS IMPUESTOS"
@@ -5878,7 +5881,7 @@ Public Class ClsContabilidad
End Function
Public Function GetPrePolizasImpresion(CveEmpresa As Integer, FechaI As String, FechaF As String, Optional CveTipoPoliza As Integer = -1, Optional FolioI As Integer = -1,
Optional FolioF As Integer = -1, Optional CveUsuario As Integer = -1, Optional IdSegNegocio As Integer = -1,
Optional FolioF As Integer = -1, Optional CveUsuario As Integer = -1, Optional CveSubProyecto As Integer = -1,
Optional CveCuenta As Integer = -1, Optional CvePlantillaPoliza As Integer = -1, Optional CveProveedor As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -5892,7 +5895,7 @@ Public Class ClsContabilidad
.Add("@FolioI", SqlDbType.Int).Value = FolioI
.Add("@FolioF", SqlDbType.Int).Value = FolioF
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@IdSegNegocio", SqlDbType.Int).Value = IdSegNegocio
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CvePlantillaPoliza", SqlDbType.Int).Value = CvePlantillaPoliza
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor

View File

@@ -4386,6 +4386,9 @@ Public Class ClsPaginas
PaginaDict.Add("/Finanzas/RazonesFinancierasCuentas.aspx".ToUpper(), -1)
PaginaDict.Add("/Finanzas/RepRotacionCartera.aspx".ToUpper(), 649)
PaginaDict.Add("/Finanzas/RepRotacionCarteraDetalle.aspx".ToUpper(), 649)
PaginaDict.Add("/Finanzas/RepBalanceGeneralHorizontal2.aspx".ToUpper(), -1)
#End Region
#Region "Flotillas"

View File

@@ -4631,7 +4631,7 @@ Namespace Modelos
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenDevolucion}").ToEntero
Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {CveAlmacenDevolucion}").ToEntero
'Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {CveAlmacenDevolucion}").ToEntero
Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
If tmpCostos.Rows.Count > 0 Then
@@ -4668,7 +4668,7 @@ Namespace Modelos
cont += 1
Next
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, True, -1 * TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=-1 * TotalCosto, CveCuenta:=CveCuentaAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, True, -1 * TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=-1 * TotalCosto) Then
ErrorCancelar = True
End If

View File

@@ -41,9 +41,8 @@ Partial Class Bancos_CuentasBancariasDetalle
ViewState("CveCuenta") = Request("CveCuenta")
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
trCuentaContable.Visible = True
trCuentaContableComplementaria.Visible = True
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
CargaCuentasContables()
End If
@@ -60,9 +59,8 @@ Partial Class Bancos_CuentasBancariasDetalle
ViewState("CveCuenta") = -1
BtnEliminar.Visible = False
CreaDTUsuarios()
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
trCuentaContable.Visible = True
trCuentaContableComplementaria.Visible = True
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
CargaCuentasContables()
End If
'LbAgregarSucursal.Enabled = False
@@ -98,37 +96,69 @@ Partial Class Bancos_CuentasBancariasDetalle
DdlMoneda.DataSource = GlobalDTMonedas
DdlMoneda.DataBind()
End Sub
Private Sub CargaCuentasContables()
Dim IdPadre As Integer
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
If DdlTipoCuenta.SelectedValue.ToEntero = 1 Then 'Caja Chica
IdPadre = UsuarioActual.Empresa.Funcionalidad(218).ToEntero
Else
Dim tesstr = UsuarioActual.Empresa.Funcionalidad(209)
IdPadre = UsuarioActual.Empresa.Funcionalidad(209).ToEntero
End If
If IdPadre = 0 Then IdPadre = -1
Private Sub CargaCuentasContables()
Dim dt As DataTable = Nothing
If Conta.GetCuentasRecursiva(IdPadre, 1) Then
dt = Conta.DtResultados
End If
Conta.Dispose()
DDlCuentaContable.DataSource = dt
DDlCuentaContable.DataBind()
DDlCuentaContable.Items.Insert(0, New ListItem("-", "-1"))
DdlCuentaContableComplementaria.DataSource = dt
DdlCuentaContableComplementaria.DataBind()
DdlCuentaContableComplementaria.Items.Insert(0, New ListItem("-", "-1"))
If dt IsNot Nothing Then dt.Dispose()
End Sub
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
Using ObjContabilidad As New ClsContabilidad
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
DDlCuentaContable.DataSource = ObjContabilidad.DtResultados
DDlCuentaContable.DataBind()
DDlCuentaContable.Items.Insert(0, New ListItem("Selecione", "-1"))
DDlCuentaContable.DataTextField = "Cuenta"
DDlCuentaContable.DataValueField = "CveCuenta"
End If
End Using
DDlCuentaContable.DataSource = dt
DDlCuentaContable.DataBind()
DDlCuentaContable.Items.Insert(0, New ListItem("-", "-1"))
DdlCuentaContableComplementaria.DataSource = dt
DdlCuentaContableComplementaria.DataBind()
DdlCuentaContableComplementaria.Items.Insert(0, New ListItem("-", "-1"))
If dt IsNot Nothing Then dt.Dispose()
trCuentaContable.Visible = True
trCuentaContableComplementaria.Visible = True
Else
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
Dim IdPadre As Integer
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
If DdlTipoCuenta.SelectedValue.ToEntero = 1 Then 'Caja Chica
IdPadre = UsuarioActual.Empresa.Funcionalidad(218).ToEntero
Else
Dim tesstr = UsuarioActual.Empresa.Funcionalidad(209)
IdPadre = UsuarioActual.Empresa.Funcionalidad(209).ToEntero
End If
If IdPadre = 0 Then IdPadre = -1
If Conta.GetCuentasRecursiva(IdPadre, 1) Then
dt = Conta.DtResultados
End If
Conta.Dispose()
DDlCuentaContable.DataSource = dt
DDlCuentaContable.DataBind()
DDlCuentaContable.Items.Insert(0, New ListItem("-", "-1"))
DdlCuentaContableComplementaria.DataSource = dt
DdlCuentaContableComplementaria.DataBind()
DdlCuentaContableComplementaria.Items.Insert(0, New ListItem("-", "-1"))
If dt IsNot Nothing Then dt.Dispose()
trCuentaContable.Visible = True
trCuentaContableComplementaria.Visible = True
End If
End If
End Sub
#End Region
#End Region
#Region " CARGA DATOS "
Private Sub CargaDatos()
Dim ObjCuentasBancariasDetalle As New ClsBancos()
@@ -164,8 +194,14 @@ Partial Class Bancos_CuentasBancariasDetalle
DdlTipoCuenta.SelectedValue = ObjCuentasBancariasDetalle.CveTipoCuenta.ToString
DdlTipoCuenta_SelectedIndexChanged(DdlTipoCuenta, EventArgs.Empty)
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContableComplementaria.ToString)
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaConta.ToString)
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaContaComplementaria.ToString)
Else
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContableComplementaria.ToString)
End If
Else
Alert("El Banco Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False

View File

@@ -1266,10 +1266,6 @@ Partial Class Compras_Compras
TieneOC = False
CveMoneda = -1
'[IPP] Eliminar 22Junio2018
'If UsuarioActual.Empresa.UsaInventarios Then
' TabAlmacen.Enabled = Not UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0
'End If
ImgAnticiposPendientes.Attributes.Add("OnClick", "MuestraAnticipos();")
'ImgCerrar.Attributes.Add("OnClick", "$('#DivAnticipos').hide(200);")
@@ -4001,23 +3997,23 @@ Partial Class Compras_Compras
End If
End If
'VERIFICA SI LOS PRODUCTOS/SERVICIOS EXISTEN EN EL CATALOGO DEL SAT
If UsuarioActual.CveEmpresa = 72 Then
''VERIFICA SI LOS PRODUCTOS/SERVICIOS EXISTEN EN EL CATALOGO DEL SAT
'If UsuarioActual.CveEmpresa = 72 Then
Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(CveSATPS,0) = 46920 ")
If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
Dim StrNoEncontrados As New StringBuilder
StrNoEncontrados.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
For Each drt As DataRow In DtNoEncontrados.Rows
StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
Next
Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
DtNoEncontrados.Dispose()
StrNoEncontrados.Clear()
Exit Sub
End If
DtNoEncontrados.Dispose()
End If
' Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(CveSATPS,0) = 46920 ")
' If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
' Dim StrNoEncontrados As New StringBuilder
' StrNoEncontrados.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
' For Each drt As DataRow In DtNoEncontrados.Rows
' StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
' Next
' Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
' DtNoEncontrados.Dispose()
' StrNoEncontrados.Clear()
' Exit Sub
' End If
' DtNoEncontrados.Dispose()
'End If
'Verifica funcionalidad 702 "Require orden de compra para factura de compra"
@@ -4650,7 +4646,7 @@ Partial Class Compras_Compras
ErrorOC = True
End If
'actualiza la compra para que no se surta en almacen. sino por el flete o importación
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2) Then
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2, UsuarioActual.CveUsuario) Then
ErrorOC = True
End If
End Select
@@ -4665,7 +4661,7 @@ Partial Class Compras_Compras
ErrorOC = True
End If
'actualiza la compra para que no se surta en almacen. sino por el flete o importación
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2) Then
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2, UsuarioActual.CveUsuario) Then
ErrorOC = True
End If
End Select
@@ -14641,6 +14637,35 @@ Partial Class Compras_Compras
Protected Sub BtnCancelarCompra2_Click(sender As Object, e As EventArgs)
RegistraScript("$('#DivCancelarCompra').modal('hide');")
Dim ObjComprasComprobacion As New ClsCompras
If ObjComprasComprobacion.GetComprasPagosConciliados(CveCompra, UsuarioActual.CveEmpresa) Then
Dim TienePagosConciliados As Boolean = False
If ObjComprasComprobacion.DtResultados.Rows.Count > 0 Then
TienePagosConciliados = True
Dim PagosConciliados As New StringBuilder
For Each Drow As DataRow In ObjComprasComprobacion.DtResultados.Rows
PagosConciliados.AppendLine($"<a target='_blank' class='Texto' href=../Bancos/IE.aspx?CveIE={Drow("CveIE").ToString}>{Drow("Folio").ToString} </a> <br>")
Next
Alert($"La compra no se puede cancelar, tiene pagos conciliados: <br> {PagosConciliados.ToString}", TipoMensaje.MsgAdvertencia)
End If
If TienePagosConciliados Then
ObjComprasComprobacion.Dispose()
Exit Sub
End If
End If
ObjComprasComprobacion.Dispose()
Dim ObjAC As ClsContPAQi = Nothing
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
@@ -15176,12 +15201,7 @@ Partial Class Compras_Compras
Dr("RetISRTC") = Dr("RetISR")
Dr("TotalTC") = Dr("ImporteAjustadoDescuento")
'[IPP] - JAMEntregaAdelantado | AJUSTE DE CANITDAD POR RECIBIR EN BASE A SALDOS DE INV-COMPRAS
'If UsuarioActual.CveUsuario = 100 Then
'If Dr("CveTipoPS").ToString.ToEntero = 2 And UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0 Then
' Dr("CantidadDisponible") = If(Dr("CantidadDisponible").ToString.ToDouble > Dr("CantidadPendienteVincular").ToString.ToDouble, Dr("CantidadPendienteVincular"), Dr("CantidadDisponible"))
'End If
'End If
Next
'DESCRIPCION DE OC CUANDO NO ES COMPRA REGISTRADA
@@ -15213,7 +15233,7 @@ Partial Class Compras_Compras
'SI PUEDE RECIBIR POR OC Y COMPRA
If UsuarioActual.CveEmpresa.Contiene(119) Then
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 And Not UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0 Then
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then
Select Case DdlOCVinculaInv.SelectedValue.ToEntero
Case 176
DTOCGV = DTOCGV.FiltraParametros("((EstatusInventario IN (3,5) AND CveTipoPS = 2) OR CveTipoPS = 1)")
@@ -18706,14 +18726,14 @@ Partial Class Compras_Compras
For Each gvr As GridViewRow In GvSolDev.Rows
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
'actualiza el estatus del detalle
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0)
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0, UsuarioActual.CveUsuario)
Else
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1)
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1, UsuarioActual.CveUsuario)
End If
Next
End If
If ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1)) Then
If ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1), UsuarioActual.CveUsuario) Then
EstatusAlmacen = If(EstatusAlmacen = 1, 0, 1)
Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente."))
End If
@@ -19076,7 +19096,7 @@ Partial Class Compras_Compras
End If
CveMovimientoInventario = DtInv.MAX("CveMovimiento", $"CveCompraDetalle = {Row2("CveCompraDetalle")}").ToEntero
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DtInv.MIN("CveAlmacen", $"CveCompraDetalle = {Row2("CveCompraDetalle")}")}").ToEntero
CveCuenta = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DtInv.MIN("CveAlmacen", $"CveCompraDetalle = {Row2("CveCompraDetalle")}")}").ToEntero
' CveCuenta = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DtInv.MIN("CveAlmacen", $"CveCompraDetalle = {Row2("CveCompraDetalle")}")}").ToEntero
ImporteMovimiento = DtInv.SUM(If(DdlMoneda.SelectedValue = "1", "Total", "TotalExtranjero"), $"CveCompraDetalle = {Row2("CveCompraDetalle")}").ToDecimal
ImporteMovimiento = If(ImporteMovimiento > Row2("Total").ToString.ToDecimal, Row2("Total").ToString.ToDecimal, ImporteMovimiento) * Multiplicador
@@ -19106,15 +19126,15 @@ Partial Class Compras_Compras
If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
End If
If CveCuenta = 0 Then
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
End If
'If CveCuenta = 0 Then
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
'End If
Dim SeContabiliza As Boolean = True
'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
If DdlTipoCompra.SelectedValue = "10" Then
SeContabiliza = False
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 68, Concepto, FechaMovimiento, Row("IdCtaContable").ToString.ToEntero, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveMovimientoAlmacen:=Row("CveMovimiento").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(TipoCambioActual = 1, 0, ImporteMovimiento), CveCuenta:=Row("CveCuenta").ToString.ToEntero, Contabilizable:=SeContabiliza) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 68, Concepto, FechaMovimiento, Row("IdCtaContable").ToString.ToEntero, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveMovimientoAlmacen:=Row("CveMovimiento").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(TipoCambioActual = 1, 0, ImporteMovimiento), Contabilizable:=SeContabiliza) Then
TieneError = True
Exit For
End If
@@ -19471,7 +19491,7 @@ Partial Class Compras_Compras
ErrorTrans = True
End If
'actualiza la compra para que no se surta en almacen. sino por el flete o importación
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2) Then
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2, UsuarioActual.CveUsuario) Then
ErrorTrans = True
End If
End Select
@@ -19486,7 +19506,7 @@ Partial Class Compras_Compras
ErrorTrans = True
End If
'actualiza la compra para que no se surta en almacen. sino por el flete o importación
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2) Then
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2, UsuarioActual.CveUsuario) Then
ErrorTrans = True
End If
End Select
@@ -20260,33 +20280,33 @@ Partial Class Compras_Compras
End Sub
Private Function VerificarProductosSATPS() As Boolean
Dim CvePSGRuposAux As New StringBuilder("")
For Each gvr As GridViewRow In GvPS.Rows
Dim CvePSIndividual As String = gvr.DataKey("CvePS")
CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
Next
'Private Function VerificarProductosSATPS() As Boolean
' Dim CvePSGRuposAux As New StringBuilder("")
' For Each gvr As GridViewRow In GvPS.Rows
' Dim CvePSIndividual As String = gvr.DataKey("CvePS")
' CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
' Next
Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1)
'Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1)
Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux))
'Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux))
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
For Each PS As GridViewRow In GvPS.Rows
Dim PSIndividual As String = PS.DataKey("PS")
Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual))
If ClavePSSAT = "46920" Then
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", PSIndividual)
End If
Next
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
'For Each PS As GridViewRow In GvPS.Rows
'Dim PSIndividual As String = PS.DataKey("PS")
'Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual))
'If ClavePSSAT = "46920" Then
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", PSIndividual)
' End If
'Next
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
Return False
End If
'If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
'Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
' Return False
'End If
Return True
Return True
End Function

View File

@@ -1275,10 +1275,23 @@ Partial Class PopUpVerFactura
Dim FechaMovimiento As Date = ObjInventarios.FechaRegistro
Dim CveMovimientoRelacionado As Integer = -1
Dim FolioRelacionado As String = ""
Dim CveConceptoMovtoRelacionado As Integer = -1
'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO
If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero()
End If
If CveConcepto.Contiene(3, 26) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual")
CveConceptoMovtoRelacionado = 37
ElseIf CveConcepto = 37 Then
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
CveConceptoMovtoRelacionado = 3
End If
End If
Dim CantidadProductos As Decimal = 0
Dim CantidadUsados As Decimal = 0
@@ -1345,7 +1358,8 @@ Partial Class PopUpVerFactura
EstadoOrigen, PaisOrigen, CPOrigen, CalleDestino, NoExtDestino, ColoniaDestino, LocalidadDestino,
MunicipioDestino, EstadoDestino, PaisDestino, CPDestino, FechaMovimiento, NombreCapturo, PuestoRecibio,
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego)
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego,
CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado)
End Sub
Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera
@@ -1362,7 +1376,8 @@ Partial Class PopUpVerFactura
Remision As String, Proveedor As String, CalleOrigen As String, NoExtOrigen As String, ColoniaOrigen As String, LocalidadOrigen As String, MunicipioOrigen As String,
EstadoOrigen As String, PaisOrigen As String, CPOrigen As String, CalleDestino As String, NoExtDestino As String, ColoniaDestino As String, LocalidadDestino As String, MunicipioDestino As String,
EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "")
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0,
Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "")
Select Case CveConcepto
@@ -1542,7 +1557,7 @@ Partial Class PopUpVerFactura
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
End If
Case 3, 16 ' S A L I D A S
Case 3, 16, 37 ' S A L I D A S
'Dim Archivo As New System.IO.FileInfo(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72))
'Dim Imagen As New System.IO.FileInfo(String.Format("Empresas/{0}/Logo.png", 72))
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Salidas.rdlc", UsuarioActual.Empresa.Ruta))
@@ -1552,6 +1567,8 @@ Partial Class PopUpVerFactura
Dim concepto As String = ""
If CveConcepto = 3 Then
concepto = "SALIDA DE ALMACÉN"
ElseIf CveConcepto = 37 Then
concepto = "SALIDA VIRTUAL"
Else
concepto = "SALIDA DE ALMACÉN POR RECONSTRUCCIÓN"
End If
@@ -1688,6 +1705,34 @@ Partial Class PopUpVerFactura
'ImprimirPDF(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72), DtMovimientos, params, "ReporteSalidas", RDSName:="DsInventarios")
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
ElseIf UsuarioActual.CveEmpresa = 140 Then
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Concepto", concepto))
params.Add(New ReportParameter("Almacen", Almacen))
params.Add(New ReportParameter("Fecha", Fecha))
params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente)))
params.Add(New ReportParameter("Observaciones", Observaciones))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("Folio", Folio))
params.Add(New ReportParameter("Descuentos", ""))
params.Add(New ReportParameter("IVA", ""))
params.Add(New ReportParameter("Total", ""))
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
params.Add(New ReportParameter("NombreRecibio", Recibio))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
Else
params.Add(New ReportParameter("Folio", Folio))
params.Add(New ReportParameter("Fecha", Fecha))
@@ -2124,7 +2169,9 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("CantidadProductos", CantidadProductos.ToString()))
params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString()))
params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString()))
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
Else
params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text
params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString))
@@ -2469,19 +2516,19 @@ Partial Class PopUpVerFactura
If (UsuarioActual.CveEmpresa = 72) Then
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
End If
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
'Else
' params.Add(New ReportParameter("Folio", Folio))
' params.Add(New ReportParameter("Fecha", Fecha))
' params.Add(New ReportParameter("Almacen", Almacen))
' params.Add(New ReportParameter("SubProyecto", SubProyecto))
' params.Add(New ReportParameter("Observaciones", Observaciones))
' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
'End If
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
'Else
' params.Add(New ReportParameter("Folio", Folio))
' params.Add(New ReportParameter("Fecha", Fecha))
' params.Add(New ReportParameter("Almacen", Almacen))
' params.Add(New ReportParameter("SubProyecto", SubProyecto))
' params.Add(New ReportParameter("Observaciones", Observaciones))
' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
'End If
Case 18 'D E V O L U C I O N D E L C L I E N T E
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DevolucionCliente.rdlc", UsuarioActual.Empresa.Ruta))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -2658,36 +2705,36 @@ Partial Class PopUpVerFactura
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
ElseIf CveConcepto = 22 Then
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
End If
'Case 22 'ENTRADA POR PRESTAMO
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
' Dim params As New List(Of ReportParameter)
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
' If Imagen.Exists Then
' params.Add(New ReportParameter("LogoPath", logouri))
' Else
' params.Add(New ReportParameter("LogoPath", ""))
' End If
' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
' params.Add(New ReportParameter("Almacen", Almacen))
' params.Add(New ReportParameter("Fecha", Fecha))
' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
' params.Add(New ReportParameter("Folio", Folio))
' params.Add(New ReportParameter("Descuentos", ""))
' params.Add(New ReportParameter("IVA", ""))
' params.Add(New ReportParameter("Total", ""))
' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
' params.Add(New ReportParameter("FacturadoA", NombreCliente))
' If (UsuarioActual.CveEmpresa = 72) Then
' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
' End If
' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
End If
'Case 22 'ENTRADA POR PRESTAMO
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
' Dim params As New List(Of ReportParameter)
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
' If Imagen.Exists Then
' params.Add(New ReportParameter("LogoPath", logouri))
' Else
' params.Add(New ReportParameter("LogoPath", ""))
' End If
' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
' params.Add(New ReportParameter("Almacen", Almacen))
' params.Add(New ReportParameter("Fecha", Fecha))
' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
' params.Add(New ReportParameter("Folio", Folio))
' params.Add(New ReportParameter("Descuentos", ""))
' params.Add(New ReportParameter("IVA", ""))
' params.Add(New ReportParameter("Total", ""))
' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
' params.Add(New ReportParameter("FacturadoA", NombreCliente))
' If (UsuarioActual.CveEmpresa = 72) Then
' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
' End If
' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
Case 24 'SALIDA POR RESGUARDO
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -3170,11 +3217,11 @@ Partial Class PopUpVerFactura
If CveConcepto = 2 Then
ElseIf CveConcepto = 3 Then
End If
End Sub
End Sub
#End Region
#Region "OP = 'OC' - IMPRIME PDF OC"
Private Sub ImprimePDFOC(CveOrdenCompra As Integer)
Dim reporte As Byte() = NewGeneraBytesOC(CveOrdenCompra, ConBitacora:=(UsuarioActual.Empresa.Funcionalidad(119) = "1"))

View File

@@ -42,7 +42,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
TienePermisoVerPoliza = true;
}
if (UsuarioActual.Empresa.TipoContabilidad == 2 && UsuarioActual.Empresa.UsaContabilidad)
if (UsuarioActual.Empresa.TipoContabilizacion != 1 )
{
ClsContPAQi ObjCont = new ClsContPAQi(UsuarioActual.Empresa);

View File

@@ -266,11 +266,15 @@
</div>
</div>
<div class="row" visible="false" runat="server" id="divContabilziada">
<div class="row" visible="false" runat="server" id="divContabilizada">
<label class="col-md-1">Contabilizada:</label>
<div class="col-md-2">
<asp:HyperLink ID="HplContabilizada" runat="server" Target="_blank">Si</asp:HyperLink>
</div>
<label class="col-md-1">Folio:</label>
<div class="col-md-1">
<asp:Label ID="LblFolio" Font-Bold="true" Font-Size="Large" runat="server" ></asp:Label>
</div>
</div>
<div class="row" visible="false" runat="server" id="DivTipoGasto">
<label class="col-md-1">Tipo Gasto:</label>
@@ -575,7 +579,7 @@
</div>
<div class="chequesie2">
<div class="row">
<asp:Label ID="LblFolio" runat="server" Text="Número:" class="col-md-2"></asp:Label>
<asp:Label ID="LblFolioDoc" runat="server" Text="Número:" class="col-md-2"></asp:Label>
<div class="col-md-4">
<asp:TextBox ID="TxtDocumentoFolio" CssClass="form-control input-sm" runat="server" MaxLength="12"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDocumentoFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>

View File

@@ -388,14 +388,23 @@ Partial Class ContabilidadC_RegPrePolizaS
LnkComplementoPago.Visible = True
End If
If dr("IdPoliza").ToString.ToEntero > 0 Then
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
divContabilziada.Visible = True
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
'sino está contabilizada, se activa el botón
BtnContabilizar.Visible = True
End If
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
If dr("FolioPoliza").ToString.ToEntero > 0 Then
divContabilizada.Visible = True
LblFolio.Text = dr("FolioPoliza").ToString
End If
Else
If dr("IdPoliza").ToString.ToEntero > 0 Then
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
divContabilizada.Visible = True
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
'sino está contabilizada, se activa el botón
BtnContabilizar.Visible = True
End If
End If
divDatosPrincipales.Visible = False
divObservaciones.Visible = False
UPMovs.Visible = False

View File

@@ -73,9 +73,9 @@
<div class="col-md-2 ">
<asp:DropDownList ID="DdlUsuarioRegistro" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
</div>
<label class="col-md-1 truncate" data-toggle="tooltip" data-placement="top" title="Segmento de Negocio">Segmento de Neg.:</label>
<label class="col-md-1 truncate" data-toggle="tooltip" data-placement="top" title="Centro de Costo">Centro de costo:</label>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlSegmentoNeg" DataTextField="Nombre" DataValueField="Id" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
<asp:DropDownList ID="DdlSubProyectos" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
</div>
</div>

View File

@@ -18,7 +18,7 @@ Partial Class Contabilidad2_PolizasImpresion
DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
DdlUsuarioRegistro.DataBind()
cargaddlpolizas()
CargaSegmentoNeg()
CargaSubProyectos()
CargaCuentas()
End If
End Sub
@@ -34,13 +34,13 @@ Partial Class Contabilidad2_PolizasImpresion
Dim ArchivoReporte As String = "Empresas/Grales/Formatos/Polizas.rdlc"
'If IO.File.Exists(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)) Then
' ArchivoReporte = String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)
'End If
If IO.File.Exists(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)) Then
ArchivoReporte = String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)
End If
Dim ObjConta As New ClsContabilidad
If ObjConta.GetPrePolizasImpresion(UsuarioActual.CveEmpresa, TxtFechaInicio.Text, TxtFechaFin.Text, CveTipoPoliza:=ddlTipoPoliza.SelectedValue.ToEntero, FolioI:=foli,
FolioF:=folf, CveUsuario:=DdlUsuarioRegistro.SelectedValue.ToEntero, IdSegNegocio:=DdlSegmentoNeg.SelectedValue.ToEntero,
FolioF:=folf, CveUsuario:=DdlUsuarioRegistro.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero,
CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CvePlantillaPoliza:=DdlGrupoPlantilla.SelectedValue.ToEntero,
CveProveedor:=DdlTipoProveedor.SelectedValue.ToEntero) Then
If ObjConta.DtResultados.Rows.Count < 10000 Then
@@ -60,9 +60,9 @@ Partial Class Contabilidad2_PolizasImpresion
params.Add(New ReportParameter("Moneda", ""))
params.Add(New ReportParameter("CodigoPostal", ""))
'If UsuarioActual.CveEmpresa = 119 Then
' params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("IdUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
'End If
If UsuarioActual.CveEmpresa = 119 Then
params.Add(New ReportParameter("UsuarioRegistro", dr("NombreUsuario").ToString))
End If
ImprimirPDF(ArchivoReporte, ObjConta.DtResultados, params)
@@ -89,15 +89,11 @@ Partial Class Contabilidad2_PolizasImpresion
DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Private Sub CargaSegmentoNeg()
Dim objtcont As New ClsContabilidad
If objtcont.GetSegmentosNegocio(-1, "-1") Then
DdlSegmentoNeg.DataSource = objtcont.DtResultados
DdlSegmentoNeg.DataBind()
End If
objtcont.Dispose()
DdlSegmentoNeg.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSegmentoNeg.Items.Insert(1, New ListItem("Sin Asignar", "-2"))
Private Sub CargaSubProyectos()
DdlSubProyectos.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
DdlSubProyectos.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSubProyectos.Items.Insert(1, New ListItem("Sin Asignar", "-2"))
End Sub
Private Sub CargaCuentas()

File diff suppressed because it is too large Load Diff

View File

@@ -904,6 +904,76 @@
</Border>
</Style>
</Image>
<Textbox Name="Textbox41">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!FolioRelacionado.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Top>1.94386cm</Top>
<Left>17.07518cm</Left>
<Height>0.6cm</Height>
<Width>1.2347cm</Width>
<ZIndex>9</ZIndex>
<Visibility>
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
</Visibility>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox42">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=IIF(Parameters!CveConceptoMovRelacionado.Value = 37,"Folio Virtual:","Folio Relacionado:")</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>1.34386cm</Top>
<Left>17.07518cm</Left>
<Height>0.6cm</Height>
<Width>2.07667cm</Width>
<ZIndex>10</ZIndex>
<Visibility>
<Hidden>=IIF(Parameters!FolioRelacionado.Value = "",true,false)</Hidden>
</Visibility>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Style>
<Border>
@@ -1692,6 +1762,17 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="FolioRelacionado">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="CveConceptoMovRelacionado">
<DataType>Integer</DataType>
<Nullable>true</Nullable>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="compuproveedores">

View File

@@ -722,7 +722,7 @@ Partial Class Inventarios_Apartados
Dim CveSec As Integer = 0
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
CveSec = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
CveSec = -3 'GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSec, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then
ErrorMovInv = True

View File

@@ -175,7 +175,7 @@
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Cuenta Contable">
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlCuentaContable" runat="server" Text='<%# Eval("IdCtaContable") %>'></asp:Literal>
&nbsp;<asp:Literal ID="LtlCuentaContable" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Modalidad">
@@ -265,7 +265,7 @@
</div>
</div>
<div class="col-md-6">
<asp:Panel CssClass="" ID="divddlcc" Visible="false" runat="server">
<asp:Panel CssClass="" ID="divddlcc" runat="server">
<asp:Panel CssClass="form-group form-md-line-input input-iconright" ID="divCuentasCompac" Visible="false" runat="server">
<asp:DropDownList ID="DdlCuentasContables" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="100%" ValidationGroup="GrpObligatorio" CssClass="form-control input-sm select2me"></asp:DropDownList>
<asp:Label AssociatedControlID="DdlCuentasContables" runat="server" Text="Cuenta Contable:"></asp:Label>

View File

@@ -99,31 +99,34 @@ Partial Class Inventarios_CatAlmacenes
End Sub
Private Sub CargaCuentasContables()
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
divCuentasCompac.Visible = False
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
divCuentasCompac.Visible = False
pnlCuentassig.Visible = True
Using ObjContabilidad As New ClsContabilidad
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
If ObjContabilidad.CuentasContablesSigGet(UsuarioActual.CveEmpresa) Then
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
DdlCuentasSig.DataSource = ObjContabilidad.DtResultados
DdlCuentasSig.DataBind()
DdlCuentasSig.Items.Insert(0, New ListItem("Selecione", "-1"))
End If
End Using
Else
divCuentasCompac.Visible = True
pnlCuentassig.Visible = False
Using ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
If ObjContabilidad.GetCuentasRecursiva(UsuarioActual.Empresa.Funcionalidad(208).ToEntero, 1) Then
DtCuentasContables = ObjContabilidad.DtResultados
Else
DtCuentasContables = Nothing
End If
End Using
DdlCuentasContables.DataSource = DtCuentasContables
DdlCuentasContables.DataBind()
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
divCuentasCompac.Visible = True
pnlCuentassig.Visible = False
Using ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
If ObjContabilidad.GetCuentasRecursiva(UsuarioActual.Empresa.Funcionalidad(208).ToEntero, 1) Then
DtCuentasContables = ObjContabilidad.DtResultados
Else
DtCuentasContables = Nothing
End If
End Using
DdlCuentasContables.DataSource = DtCuentasContables
DdlCuentasContables.DataBind()
End If
End If
UpAddAlmacen.Update()
@@ -156,9 +159,9 @@ Partial Class Inventarios_CatAlmacenes
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
If e.Row.DBCampo("IdCtaContable").ToEntero > 0 Then
e.Row.FCLiteral("LtlCuentaContable").Text = DtCuentasContables.FiltroPrimeroValor("CtaCodigo", $"Id = {e.Row.DBCampo("IdCtaContable")}")
Else
e.Row.FCLiteral("LtlCuentaContable").Text = "Sin Cuenta"
e.Row.FCLiteral("LtlCuentaContable").Text = DtCuentasContables.FiltroPrimeroValor("CtaCodigo", $"Id = {e.Row.DBCampo("IdCtaContable")}")
'Else
' e.Row.FCLiteral("LtlCuentaContable").Text = "Sin Cuenta"
End If
End If
@@ -181,15 +184,14 @@ Partial Class Inventarios_CatAlmacenes
e.Row.FCDropDownList("DdlTipoAlmacen").DataSource = GlobalDTTipoAlmacen(-1)
e.Row.FCDropDownList("DdlTipoAlmacen").DataBind()
e.Row.FCDropDownList("DdlTipoAlmacen").SelectedValue = e.Row.DBCampo("CveTipoAlmacen")
e.Row.FCDropDownList("DdlCuentasContables").DataSource = DtCuentasContables
e.Row.FCDropDownList("DdlCuentasContables").DataBind()
e.Row.FCDropDownList("DdlCuentasContables").Items.Add(New ListItem("Seleccione", "-1"))
e.Row.FCDropDownList("DdlCuentasContables").SelectedValue = e.Row.DBCampo("IdCtaContable")
'e.Row.FCDropDownList("DdlModalidad").DataSource =
'e.Row.FCDropDownList("DdlModalidad").DataBind()
e.Row.FCDropDownList("DdlTipoAlmacen").SelectedValue = e.Row.DBCampo("CveTipoAlmacen")
'e.Row.FCDropDownList("DdlModalidad").DataSource =
'e.Row.FCDropDownList("DdlModalidad").DataBind()
e.Row.FCDropDownList("DdlModalidad").Items.Add(New ListItem("Solo Existencia", "0"))
e.Row.FCDropDownList("DdlModalidad").Items.Add(New ListItem("Contable", "1"))
e.Row.FCDropDownList("DdlModalidad").SelectedValue = If(e.Row.DBCampo("Modalidad").ToString = "Contable", "1", "0")
@@ -197,26 +199,27 @@ Partial Class Inventarios_CatAlmacenes
End If
End If
End Sub
End Sub
#End Region
#Region "O R D E N A M I E N T O"
'Private Sub OrdenaDatos()
' If (GvDatos.Rows.Count > 0) Then
' GvDatos.UseAccessibleHeader = True
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
' RegistraScript("OrdenarGV();")
' End If
'End Sub
'Private Sub OrdenaDatos()
' If (GvDatos.Rows.Count > 0) Then
' GvDatos.UseAccessibleHeader = True
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
' RegistraScript("OrdenarGV();")
' End If
'End Sub
#End Region
Private Sub RecargaGlobalAlmacenes()
Dim ObjAlmacen As New ClsInventarios
If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then
GlobalDTAlmacen(-1) = ObjAlmacen.DtResultados
End If
ObjAlmacen.Dispose()
GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing
'Dim ObjAlmacen As New ClsInventarios
'If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then
' GlobalDTAlmacen(-1) = ObjAlmacen.DtResultados
'End If
'ObjAlmacen.Dispose()
End Sub
Private Sub RecargaGlobalAlmacenesUsuarios()
@@ -238,14 +241,15 @@ Partial Class Inventarios_CatAlmacenes
Dim CuentaContable As Integer = 0
Dim CveCuenta As Integer = 0
If divddlcc.Visible Then
If pnlCuentassig.Visible Then
CveCuenta = DdlCuentasSig.SelectedValue.ToEntero()
Else
CuentaContable = DdlCuentasContables.SelectedValue.ToEntero()
End If
End If
If pnlCuentassig.Visible Then
CveCuenta = DdlCuentasSig.SelectedValue.ToEntero()
End If
If divCuentasCompac.Visible Then
CuentaContable = DdlCuentasContables.SelectedValue.ToEntero()
End If
If HdnModalidad.Value = "A" Then
If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero) Then
Alert("El nuevo Almacen se guardó correctamente.", TipoMensaje.MsgInformacion)

View File

@@ -1153,8 +1153,8 @@ Partial Class Inventarios_Consignaciones
End If
Next
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacenCI}").ToEntero
CveCuenta = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen={CveAlmacenCI}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DtCostos.SUM("Total").ToDecimal * TipoMovto, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoCI, ImporteMX:=DtCostos.SUM("Total").ToDecimal * TipoMovto, CveCuenta:=CveCuenta) Then
'CveCuenta = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen={CveAlmacenCI}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DtCostos.SUM("Total").ToDecimal * TipoMovto, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoCI, ImporteMX:=DtCostos.SUM("Total").ToDecimal * TipoMovto) Then
ErrorMovInv = True
End If
Else

View File

@@ -2816,7 +2816,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
'Dim CveCuentaAlmacen As Integer = 0 'GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
If tmpCostos.Rows.Count > 0 Then
@@ -2868,7 +2868,7 @@ Partial Class Inventarios_EntregaAlmacen
cont += 1
Next
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, Serie, 68, Serie, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, ImporteMX:=ValorMultiplicador * TotalCosto, CveCuenta:=CveCuentaAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, Serie, 68, Serie, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, ImporteMX:=ValorMultiplicador * TotalCosto) Then
ErrorMovInv = True
End If

View File

@@ -386,6 +386,15 @@ Partial Class Inventarios_RecepcionAlmacen
End Set
End Property
Private Property RealizarMovimientoVirtual As Boolean
Get
Return If(IsNothing(ViewState("RealizarMovimientoVirtual")), False, CBool(ViewState("RealizarMovimientoVirtual")))
End Get
Set
ViewState("RealizarMovimientoVirtual") = Value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -535,11 +544,9 @@ Partial Class Inventarios_RecepcionAlmacen
If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then
DdlTipo.Items.Insert(1, New ListItem("OC", "2"))
If UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0 Then
DdlTipo.Items.RemoveAt(0)
DdlTipo.SelectedValue = "2"
ModalidadRecepcion()
End If
End If
If UsuarioActual.Empresa.Funcionalidad(155).ToEntero > 0 Then
@@ -839,6 +846,7 @@ Partial Class Inventarios_RecepcionAlmacen
CveAlmacenApartado = -1
CveAlmacenDevolucionProveedor = -1
RealizarTraspasoAlmacenDevolucion = False
RealizarMovimientoVirtual = False
BtnGuardar.Enabled = True
CargaAlmacenes(-1)
@@ -891,6 +899,7 @@ Partial Class Inventarios_RecepcionAlmacen
'CargaAlmacenes(-1)
RealizarTraspasoAlmacenDevolucion = False
RealizarMovimientoVirtual = False
CveAlmacenDevolucionProveedor = -1
Dim ObjCompras As New ClsCompras
@@ -962,6 +971,11 @@ Partial Class Inventarios_RecepcionAlmacen
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso (DtRecepcion.COUNT("CveTamaño", "CveTamaño > 0") > 0 OrElse CargaSoloUsados) Then
RealizarMovimientoVirtual = True
DivVirtualAdvertencia.Visible = True
End If
If TipoMovimiento = 2 AndAlso CveAlmacenDevolucionProveedor > 0 Then
RealizarTraspasoAlmacenDevolucion = True
@@ -1079,10 +1093,6 @@ Partial Class Inventarios_RecepcionAlmacen
DivCodigoSeriePS.Visible = False
End If
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
DivVirtualAdvertencia.Visible = True
End If
End If
Else
BtnGuardar.Visible = False
@@ -2659,7 +2669,7 @@ Partial Class Inventarios_RecepcionAlmacen
End If
'VIRTUAL
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
If RealizarMovimientoVirtual Then
Dim DtPSVirtual As New DataTable("DtTamanios")
@@ -2774,7 +2784,7 @@ Partial Class Inventarios_RecepcionAlmacen
Else
'VIRTUAL
If CveTipoCompra = 9 And UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
If CveTipoCompra = 9 And RealizarMovimientoVirtual Then
Dim DtPSVirtual As New DataTable("DtTamanios")
DtPSVirtual.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
@@ -2863,7 +2873,7 @@ Partial Class Inventarios_RecepcionAlmacen
'ACTUALIZA ESTATUS ALMACEN
If TipoMovimiento = 2 Then
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 0) Then
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 0, UsuarioActual.CveUsuario) Then
ErrorMovInv = True
End If
End If
@@ -2885,7 +2895,7 @@ Partial Class Inventarios_RecepcionAlmacen
'VARIABLES
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
' Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
Dim IdCtaContableRecepcion = -1
Dim IdCtaContableRecepcionME = -1
Dim IdCtaContableRecepcionComplementaria = -1
@@ -2959,7 +2969,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen", 74, TotalCosto, TotalCosto, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza > 0 Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveSubProyecto:=CveSubProyecto, CveOC:=CveOCSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto, CveCuenta:=CveCuentaAlmacen, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveSubProyecto:=CveSubProyecto, CveOC:=CveOCSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
'AGREGA POR CONCEPTO POR CVEOCDETALLE
If CveOCSurtir > 0 Then
@@ -3099,7 +3109,7 @@ Partial Class Inventarios_RecepcionAlmacen
'VARIABLES
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
'Dim CveCuentaAlmacen As Integer = 0 'GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
Dim Fecha As Date = TxtFecha.Text.ToDate
Dim CveProveedor As Integer = -1
Dim ProveedorNombre As String = ""
@@ -3132,7 +3142,7 @@ Partial Class Inventarios_RecepcionAlmacen
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen-NC", 74, TotalCosto, TotalCosto, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza > 0 Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalNC, SerieFolio, CveConceptoContableNC, SerieFolio, Fecha, IdCtaContableNC, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalNC, Contabilizable:=EsContabilizable) Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto * -1, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto * -1, CveCuenta:=CveCuentaAlmacen, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto * -1, SerieFolio, 68, SerieFolio, Fecha, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto * -1, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
If DifCostoNC <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DifCostoNC * -1, SerieFolio, 69, SerieFolio, Fecha, IdCtaContableClasificacion, -1, CveClasificacion:=CveClasificacionDifCostoNC, CveCompra:=CveCompraSurtir, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DifCostoNC * -1, CveCuenta:=CveCuentaClasificacion, Contabilizable:=EsContabilizable, CveSubProyecto:=CveSubProyecto) Then
ErrorMovInv = True
@@ -3542,7 +3552,7 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If CvePrePoliza > 0 Then
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
Dim TotalCosto As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL()
Dim IdCtaContableCostoInd As Integer = 0
@@ -3550,7 +3560,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim PorcentajeRecepcionCompras As Decimal = TotalCosto / DtTempCompras.SUMD("SubTotalTC")
Dim ConceptoPartida As String = String.Format("{0}- Inv#{1}", HLFolio.Text, InvFolio)
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto, InvFolio, 68, InvFolio, FechaMovto, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto, CveCuenta:=CveCuentaAlmacen, Contabilizable:=If(CveTipoCompra = 10, False, True)) Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, TotalCosto, InvFolio, 68, InvFolio, FechaMovto, IdCtaContableAlmacen, -1, CveCompra:=CveCompraSurtir, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=TotalCosto, Contabilizable:=If(CveTipoCompra = 10, False, True)) Then
'se recorren las facturas a descontar el recepción
If DtTempCompras IsNot Nothing AndAlso DtTempCompras.Rows.Count > 0 Then
@@ -3750,7 +3760,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim ObjOC As New ClsOC
If ObjOC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, -1, -1, FolioOC, -1, -1, UsuarioActual.CveEmpresa, -1) Then
'If ObjOC.DtResultados.FiltraParametros("TipoTermino = 3").Rows.Count = 1 Then
If ObjOC.DtResultados.Rows(0)("TieneCompra").ToString.ToEntero > 0 And UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0 Then 'Or UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0
If ObjOC.DtResultados.Rows(0)("TieneCompra").ToString.ToEntero > 0 Then 'Or UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0
MensajeCompra = String.Format("<a href=""/Inventarios/RecepcionAlmacen.aspx?CveCompra={0}"">{1}</a>", ObjOC.DtResultados.Rows(0)("CveCompraVinculada").ToString, ObjOC.DtResultados.Rows(0)("SerieFolioCompraVinculada").ToString)
Else
CveOC = ObjOC.DtResultados.FiltroPrimeroValor("CveOrdenCompra").ToString.ToEntero

View File

@@ -300,7 +300,7 @@ Partial Class RepNotasSinAlmacen
Dim ObjCompras As New ClsCompras
Dim ObjEventos As New ClsOIEventos
If ObjCompras.UpdateEstatusAlmacenDetalle(CveCompraDetalle, 1) Then
If ObjCompras.UpdateEstatusAlmacenDetalle(CveCompraDetalle, 1, Usuarioactual.CveUsuario) Then
If ObjEventos.AddEventoBitacora(String.Format("El producto: {0} se marcó como no recibido", PS), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then
Alert("El producto se marcó como 'no recibido' correctamente.")
End If

View File

@@ -1125,8 +1125,8 @@ Partial Class Inventarios_TraspasoAlmacen
Next
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacenCI}").ToEntero
CveCuenta = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen={CveAlmacenCI}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DtCostos.SUM("Total").ToDecimal * TipoMovto, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUM("Total").ToDecimal * TipoMovto, CveCuenta:=CveCuenta) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DtCostos.SUM("Total").ToDecimal * TipoMovto, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUM("Total").ToDecimal * TipoMovto) Then
ErrorMovInv = True
End If

View File

@@ -2747,7 +2747,6 @@ Partial Class OC
Dim CveOCDetalle = -1
Dim CveAlmacen = -1
Dim IdCtaContableAlmacen As Integer = -1
Dim CveCuentaAlmacen As Integer = -1
Dim IdCtaContableRecepcionOC = -1
Dim IdCtaContableRecepcionOCME = -1
Dim IdCtaContableRecepcionOCComplementaria = -1
@@ -2813,7 +2812,6 @@ Partial Class OC
DiferenciaInvOC = DrDiferencias("Diferencia").ToString.ToDecimal ' DtInvOCDiferencias.SUMD("Diferencia", $"CveAlmacen = {CveAlmacen} AND CveMovimiento = {CveMovimientoAlmacen} AND ConceptoSalida = {ConceptoSalida}")
TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal ' DtInvOCDiferencias.FiltroPrimeroValor("TipoCambioAjuste", $"CveAlmacen = {CveAlmacen} AND CveMovimiento = {CveMovimientoAlmacen} AND ConceptoSalida = {ConceptoSalida}").ToDecimal
IdCtaContableAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero
CveCuentaAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero
If DiferenciaInvOC.RoundSQL() <> 0 Then
@@ -2858,7 +2856,7 @@ Partial Class OC
'2018.11.24 se cambia concepto 176, de cargo a abono negativo., petición MALL
'2019.03.26 se cambia concepto 177, de abono a cargo., petición MALL
'2019.04.10 se cambia concepto 177, de cargo a abono., petición MALL
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, SerieFolio, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then
TieneError = True
Exit For
@@ -2896,7 +2894,6 @@ Partial Class OC
' DiferenciaInvOC = DtInvOCDiferencias.SUMD("Diferencia", $"CveAlmacen = {CveAlmacen} And CveMovimiento = {CveMovimientoAlmacen} And ConceptoSalida = {ConceptoSalida}")
' TCInvOC = DtInvOCDiferencias.FiltroPrimeroValor("TipoCambioAjuste", $"CveAlmacen = {CveAlmacen} And CveMovimiento = {CveMovimientoAlmacen} And ConceptoSalida = {ConceptoSalida}").ToDecimal
' IdCtaContableAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero
' CveCuentaAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero
' 'MODIFICACIÓN CONCEPTO
' If ConceptoSalida = 0 Then

View File

@@ -263,14 +263,14 @@ Partial Class Sistemas_PopUpAddUsuario
'Nota, permitir, tiene 3 valores, ''(Vacio), no se ha estipulado, '0' que se denego, '1' permitido(aplicado solo cuando no viene del rol
If Row.DataKey("CveModuloAcceso") <> "" Then
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkDenegar").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkDenegar").Checked = False Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked) Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked, UsuarioActual.CveUsuario) Then
HuboError = True
Exit For
End If
End If
Else
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkPermitir").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkPermitir").Checked = False Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Row.FCCheckBox("ChkPermitir").Checked) Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Row.FCCheckBox("ChkPermitir").Checked, UsuarioActual.CveUsuario) Then
HuboError = True
Exit For
End If
@@ -417,14 +417,14 @@ Partial Class Sistemas_PopUpAddUsuario
'Nota, permitir, tiene 3 valores, ''(Vacio), no se ha estipulado, '0' que se denego, '1' permitido(aplicado solo cuando no viene del rol
If Row.DataKey("CveModuloAcceso") <> "" Then
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkDenegar").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkDenegar").Checked = False Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked) Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked, UsuarioActual.CveUsuario) Then
HuboError = True
Exit For
End If
End If
Else
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkPermitir").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkPermitir").Checked = False Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Row.FCCheckBox("ChkPermitir").Checked) Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Row.FCCheckBox("ChkPermitir").Checked, UsuarioActual.CveUsuario) Then
HuboError = True
Exit For
End If
@@ -435,14 +435,14 @@ Partial Class Sistemas_PopUpAddUsuario
'Nota, permitir, tiene 3 valores, ''(Vacio), no se ha estipulado, '0' que se denego, '1' permitido(aplicado solo cuando no viene del rol
If Row.DataKey("CveModuloAcceso") <> "" Then
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkDenegar").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkDenegar").Checked = False Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked) Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked, UsuarioActual.CveUsuario) Then
HuboError = True
Exit For
End If
End If
Else
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkPermitir").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkPermitir").Checked = False Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Row.FCCheckBox("ChkPermitir").Checked) Then
If Not ObjUsuarios.UpdateUsuariosModulos(CveUsuario, Row.DataKey("CveModulo").ToEntero, Row.FCCheckBox("ChkPermitir").Checked, UsuarioActual.CveUsuario) Then
HuboError = True
Exit For
End If

View File

@@ -109,7 +109,7 @@ Partial Class CatClasificaciones
End If
UpModalClasif.Update()
If UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
''COMENTADO DF 30 JUNIO 2017
'Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
@@ -118,13 +118,16 @@ Partial Class CatClasificaciones
'End If
'Cuenta.Dispose()
Else
DivCuentaIngresos.Visible = False
DivCuentaCostos.Visible = False
DivCuentaGasto.Visible = False
If UsuarioActual.Empresa.TipoContabilizacion = 2 Then
DivCuentaIngresos.Visible = False
DivCuentaCostos.Visible = False
DivCuentaGasto.Visible = False
GvDatos.Columns(1).Visible = False
GvDatos.Columns(2).Visible = False
GvDatos.Columns(3).Visible = False
End If
GvDatos.Columns(1).Visible = False
GvDatos.Columns(2).Visible = False
GvDatos.Columns(3).Visible = False
End If
DdlCuentaGasto.Items.Insert(0, New ListItem("-", "-1"))

View File

@@ -412,7 +412,7 @@
<td>
<asp:UpdatePanel ID="UPPVentas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
<asp:ListItem Selected="true" Text="Sin asignar" Value="0"></asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
@@ -557,7 +557,7 @@
<tr align="left">
<td><b>Vendedor:</b>&nbsp;</td>
<td>
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="150px">
<asp:DropDownList ID="DdlVendedorEstatus" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="150px">
<asp:ListItem Selected="true" Text="Sin asignar" Value="0"></asp:ListItem>
</asp:DropDownList>
</td>

View File

@@ -5591,13 +5591,13 @@ Partial Class PV
Private Sub BtnAgregarCliente_Click(sender As Object, e As EventArgs) Handles BtnAgregarCliente.Click
Dim CvePrecioLista As Integer = -1
If DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0)
If Dr IsNot Nothing Then
If Dr("CvePrecioLista").ToString.ToEntero > 0 Then
CvePrecioLista = Dr("CvePrecioLista").ToString.ToEntero
End If
End If
If DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0)
If Dr IsNot Nothing Then
If Dr("CvePrecioLista").ToString.ToEntero > 0 Then
CvePrecioLista = Dr("CvePrecioLista").ToString.ToEntero
End If
End If
End If
Dim ObjCliente As New ClsClientes
@@ -5803,18 +5803,18 @@ Partial Class PV
'ObjPS.Dispose()
End Sub
Private Sub RecargaGlobalCliente()
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDTCliente)
'Hilo.Start()
GeneraGlobalDTCliente()
End Sub
Private Sub RecargaGlobalCliente()
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDTCliente)
'Hilo.Start()
GeneraGlobalDTCliente()
End Sub
Private Sub GeneraGlobalDTCliente()
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
'Dim Objclientes As New ClsClientes
'If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1, TipoCliente:=-1) Then
' Application("GlobalDTCliente") = Objclientes.DtResultados
'End If
'Objclientes.Dispose()
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
'Dim Objclientes As New ClsClientes
'If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1, TipoCliente:=-1) Then
' Application("GlobalDTCliente") = Objclientes.DtResultados
'End If
'Objclientes.Dispose()
End Sub
#End Region
@@ -6815,7 +6815,7 @@ Partial Class PV
MarcaPS = ObjPS.DtResultados.FiltroPrimeroValor("Marca", String.Format("CvePS = {0}", DdlPSAjuste.SelectedValue.ToEntero))
End If
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim DtDatos As New DataTable

View File

@@ -2157,7 +2157,7 @@ Partial Class Ventas
DdlSubProyectoDatos.Enabled = False
BtnEmitirImprimir.Visible = False
BtnCrearApartirDe.Visible = True
If UsuarioActual.TienePermisoProceso(302) Then BtnEditar.Visible = True
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue <> "Cot" Then BtnEditar.Visible = True
'DdlEstatus.Enabled = True
DivFechaAnticipoCliente.Visible = True
@@ -14252,14 +14252,13 @@ Partial Class Ventas
End If
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {ddlAlmacen.SelectedValue}").ToEntero()
CveCuenta = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {ddlAlmacen.SelectedValue}").ToEntero()
ValorInventario = DTMovimientosDetalles.SUMD("Total", $"CveMovimiento = {Mov("CveMovimiento")}").RoundSQL()
If ValorInventario <> 0 Then
'Entrada
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveDevolucion, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimientoInventarioEntrada, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveDevolucion, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimientoInventarioEntrada, ImporteMX:=ValorInventario) Then
'Salida
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, ValorInventario, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimientoInventarioSalida, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, ValorInventario, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimientoInventarioSalida, ImporteMX:=ValorInventario) Then
OcurrioError = True
Exit For
End If
@@ -24749,6 +24748,10 @@ Partial Class Ventas
GvImpuestosLocales2.Enabled = True
If DdlTipoComprobante.SelectedValue = "Cot" Then
DdlIVA.Visible = True
End If
BloqueaCondiconesPago()
UpPS.Update()
@@ -26541,6 +26544,11 @@ Partial Class Ventas
#Region "PORCENTAJE IVA"
Protected Sub DdlIVA_SelectedIndexChanged(sender As Object, e As EventArgs)
If Not CveVenta > 0 Or EsCreaApartirDe Or CveDevolucion > 0 Then RecalculaIVA()
If ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
RecalculaIVA()
End If
End Sub
Private Sub RecalculaIVA()