Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -2135,12 +2135,12 @@ Partial Class AF_AF
|
|||||||
'PREPOLIZA DE IMPORTACION DESDE ALMACEN
|
'PREPOLIZA DE IMPORTACION DESDE ALMACEN
|
||||||
If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then
|
If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then
|
||||||
Dim IDCtaContableInv = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={AFInvCveAlmacen}").ToEntero
|
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
|
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)
|
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 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 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
|
ErrorGuardar = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -417,8 +417,8 @@ Public Class ClsBancos
|
|||||||
Me.FFinal = Data.Rows(0)("FFinal").ToString.ToEntero
|
Me.FFinal = Data.Rows(0)("FFinal").ToString.ToEntero
|
||||||
Me.IdCtaContable = Data.Rows(0)("IdCtaContable").ToString.ToEntero
|
Me.IdCtaContable = Data.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||||
Me.IdCtaContableComplementaria = Data.Rows(0)("IdCtaContableComplementaria").ToString.ToEntero
|
Me.IdCtaContableComplementaria = Data.Rows(0)("IdCtaContableComplementaria").ToString.ToEntero
|
||||||
Me.CveCuentaConta = Data.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
Me.CveCuentaConta = Data.Rows(0)("CveCuentaContable").ToString.ToEntero
|
||||||
Me.CveCuentaContaComplementaria = Data.Rows(0)("IdCtaContableComplementariaSIG").ToString.ToEntero
|
Me.CveCuentaContaComplementaria = Data.Rows(0)("CveCuentaComplementaria").ToString.ToEntero
|
||||||
Me.FormatoCheque = Data.Rows(0)("FormatoCheque").ToString
|
Me.FormatoCheque = Data.Rows(0)("FormatoCheque").ToString
|
||||||
Me.Estatus = Data.Rows(0)("Estatus").ToString
|
Me.Estatus = Data.Rows(0)("Estatus").ToString
|
||||||
Me.Fecha = Data.Rows(0)("Fecha").ToString.ToDate
|
Me.Fecha = Data.Rows(0)("Fecha").ToString.ToDate
|
||||||
|
|||||||
@@ -2183,13 +2183,14 @@ Public Class ClsCompras
|
|||||||
|
|
||||||
#Region " ESTATUS ALMACEN "
|
#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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_ComprasEstatusAlmacenUpdate")
|
DataAdapter("PA_Comp_ComprasEstatusAlmacenUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
.Add("@Estatus", SqlDbType.Int).Value = ValorEstatus
|
.Add("@Estatus", SqlDbType.Int).Value = ValorEstatus
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -2201,13 +2202,14 @@ Public Class ClsCompras
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_ComprasDetalleEstatusAlmacenUpdate")
|
DataAdapter("PA_Comp_ComprasDetalleEstatusAlmacenUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
|
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
|
||||||
.Add("@Estatus", SqlDbType.Int).Value = ValorEstatus
|
.Add("@Estatus", SqlDbType.Int).Value = ValorEstatus
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -2445,6 +2447,30 @@ Public Class ClsCompras
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
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
|
Public Function RemoveComplementoPagoDesVincular(CveFactura As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_CompraComplementoDesVincular")
|
DataAdapter("PA_Comp_CompraComplementoDesVincular")
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Public Class ClsContabilidad
|
|||||||
Public Property CveEmpresa As Integer
|
Public Property CveEmpresa As Integer
|
||||||
Public Property CveTipoPlantillaPoliza 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 ContaFolio As Integer
|
||||||
|
|
||||||
Public Property ValorPolizaDescuadre As Integer
|
Public Property ValorPolizaDescuadre As Integer
|
||||||
@@ -153,22 +153,22 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function CuentasContablesSigGet(cveEmpresa As Int32) As Boolean
|
'Public Function CuentasContablesSigGet(cveEmpresa As Int32) As Boolean
|
||||||
Dim retorno As Boolean = False
|
' Dim retorno As Boolean = False
|
||||||
DataAdapter("PA_Conta_CuentasContablesSigGet", CommandType.StoredProcedure)
|
' DataAdapter("PA_Conta_CuentasContablesSigGet", CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||||
End With
|
' End With
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
retorno = True
|
' retorno = True
|
||||||
Catch ex1 As SqlException
|
' Catch ex1 As SqlException
|
||||||
OnError("Ocurrió un error al obtener las Cuentas Contables", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió un error al obtener las Cuentas Contables", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener las Cuentas Contables", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió un error al obtener las Cuentas Contables", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
' End Try
|
||||||
Return retorno
|
' Return retorno
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
#Region " C O N T A B I L I D A D - P R E P O L I Z A"
|
#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
|
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 = "",
|
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
|
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
|
||||||
|
Dim StrLog As New StringBuilder
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
StrLog.AppendFormat("CvePrep:{0} - Inicio", CvePrePoliza)
|
||||||
|
|
||||||
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
|
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
|
||||||
|
|
||||||
@@ -1396,6 +1397,8 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
If Not ContaCompartida Then ObjConta.Dispose()
|
If Not ContaCompartida Then ObjConta.Dispose()
|
||||||
End If
|
End If
|
||||||
|
StrLog.AppendFormat(" - Fin")
|
||||||
|
StrLog.ToString.GuardaLogAD("LogContabilidazacion")
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -4645,25 +4648,25 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetSaldoCuenta(IdCuenta As Integer, TipoMovto As Integer, Ejercicio As Integer) As Boolean
|
'Public Function GetSaldoCuenta(IdCuenta As Integer, TipoMovto As Integer, Ejercicio As Integer) As Boolean
|
||||||
Dim Retorno As Boolean
|
' Dim Retorno As Boolean
|
||||||
|
|
||||||
If TipoMovto = 0 Then
|
' 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)
|
' 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
|
' 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)
|
' 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
|
' End If
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
'Retorno = Math.Round(SqlCommand.ExecuteScalar.ToString.ToDouble, 2)
|
' 'Retorno = Math.Round(SqlCommand.ExecuteScalar.ToString.ToDouble, 2)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al obtener eL saldo de la cuenta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' Me.OnError("Ocurrió un error al obtener eL saldo de la cuenta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'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
|
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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_PresupuestosEgresosSaldosRep")
|
DataAdapter("PA_PresupuestosEgresosSaldosRep")
|
||||||
@@ -4742,138 +4745,138 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function Conta_ContabilizaPrePoliza(CvePrepoliza As Integer, Ejercicio As Integer) As Boolean
|
'Public Function Conta_ContabilizaPrePoliza(CvePrepoliza As Integer, Ejercicio As Integer) As Boolean
|
||||||
Dim Retorno = False
|
' Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_ContabilizaPrepolizas")
|
' DataAdapter("PA_Conta_ContabilizaPrepolizas")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePrepoliza", SqlDbType.Int).Value = CvePrepoliza
|
' .Add("@CvePrepoliza", SqlDbType.Int).Value = CvePrepoliza
|
||||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
' .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||||
.Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
|
' .Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
|
' If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Else
|
' Else
|
||||||
Retorno = False
|
' Retorno = False
|
||||||
End If
|
' End If
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al contabilizar la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' Me.OnError("Ocurrió un error al contabilizar la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
Public Function Conta_CompactaPrePoliza(CvePrepoliza As Integer) As Boolean
|
'Public Function Conta_CompactaPrePoliza(CvePrepoliza As Integer) As Boolean
|
||||||
Dim Retorno = False
|
' Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Comp_CompactaPrepoliza")
|
' DataAdapter("PA_Comp_CompactaPrepoliza")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrepoliza
|
' .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrepoliza
|
||||||
.Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
|
' .Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
|
' If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Else
|
' Else
|
||||||
Retorno = False
|
' Retorno = False
|
||||||
End If
|
' End If
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al contabilizar la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' Me.OnError("Ocurrió un error al contabilizar la prepoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
Public Function Conta_GeneraPptarias(CveCompra As Integer) As Boolean
|
'Public Function Conta_GeneraPptarias(CveCompra As Integer) As Boolean
|
||||||
Dim Retorno = False
|
' Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_GeneraPptarias")
|
' DataAdapter("PA_Conta_GeneraPptarias")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
.Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
|
' .Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
|
' If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero = 0 Then
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Else
|
' Else
|
||||||
Retorno = False
|
' Retorno = False
|
||||||
End If
|
' End If
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al Generar las Cuentas Presupuestarias", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' Me.OnError("Ocurrió un error al Generar las Cuentas Presupuestarias", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'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
|
'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
|
' Dim Retorno As Integer = 0
|
||||||
|
|
||||||
DataAdapter("PA_Add_Conta_Polizas")
|
' DataAdapter("PA_Add_Conta_Polizas")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Folio", SqlDbType.Int).Value = Folio
|
' .Add("@Folio", SqlDbType.Int).Value = Folio
|
||||||
' .Add("@CveTipoPoliza", SqlDbType.Int).Value = CveTipoPoliza
|
' ' .Add("@CveTipoPoliza", SqlDbType.Int).Value = CveTipoPoliza
|
||||||
.Add("@Ejercicio", SqlDbType.Int).Value = CveEjercicio
|
' .Add("@Ejercicio", SqlDbType.Int).Value = CveEjercicio
|
||||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
' .Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||||
.Add("@FechaPoliza", SqlDbType.DateTime).Value = FechaPoliza
|
' .Add("@FechaPoliza", SqlDbType.DateTime).Value = FechaPoliza
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CvePoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
' .Add("@CvePoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
' End With
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePoliza").Value.ToString.ToEntero
|
' Retorno = SqlAdapter.SelectCommand.Parameters("@CvePoliza").Value.ToString.ToEntero
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al agregar la poliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al agregar la poliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
Public Function AddConta_PolizaDetalle(CvePoliza As Integer, CveCuenta As Integer, TipoMovto As Boolean, Importe As Double, Referencia As String,
|
'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
|
' Concepto As String, FechaMovto As Date, CveUsuario As Integer, Optional ImporteMonedaExtranjera As Double = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
|
|
||||||
If CvePoliza <= 0 Or CveCuenta <= 0 Then
|
' If CvePoliza <= 0 Or CveCuenta <= 0 Then
|
||||||
Return False
|
' Return False
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
|
|
||||||
DataAdapter("PA_Add_Conta_PolizasDetalles")
|
' DataAdapter("PA_Add_Conta_PolizasDetalles")
|
||||||
'DataAdapter("PA_Conta_PolizasDetalleAdd")
|
' 'DataAdapter("PA_Conta_PolizasDetalleAdd")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePoliza", SqlDbType.Int).Value = CvePoliza
|
' .Add("@CvePoliza", SqlDbType.Int).Value = CvePoliza
|
||||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
' .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@TipoMovto", SqlDbType.Int).Value = TipoMovto
|
' .Add("@TipoMovto", SqlDbType.Int).Value = TipoMovto
|
||||||
.Add("@Total", SqlDbType.Money).Value = Math.Round(Importe, 2)
|
' .Add("@Total", SqlDbType.Money).Value = Math.Round(Importe, 2)
|
||||||
.Add("@ImporteME", SqlDbType.Money).Value = ImporteMonedaExtranjera
|
' .Add("@ImporteME", SqlDbType.Money).Value = ImporteMonedaExtranjera
|
||||||
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
' .Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
||||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
' .Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
|
' .Add("@Error", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero <> 0 Then
|
' If SqlAdapter.SelectCommand.Parameters("@Error").Value.ToString.ToEntero <> 0 Then
|
||||||
Retorno = False
|
' Retorno = False
|
||||||
Else
|
' Else
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
End If
|
' End If
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al agregar el movimiento en la póliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al agregar el movimiento en la póliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
Public Function GetSaldoCuentaAC(TipoMovto As Integer, CveCuentaAprobado As Integer, CveCuentaDevengado As Integer, Ejercicio As Integer) As Decimal
|
Public Function GetSaldoCuentaAC(TipoMovto As Integer, CveCuentaAprobado As Integer, CveCuentaDevengado As Integer, Ejercicio As Integer) As Decimal
|
||||||
Dim Retorno As Decimal
|
Dim Retorno As Decimal
|
||||||
DataAdapter("PA_Conta_CalculaSaldo")
|
DataAdapter("PA_Conta_CalculaSaldo")
|
||||||
@@ -4895,51 +4898,51 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetSegmentosNegocio(Id As Integer, Codigo As String) As Boolean
|
'Public Function GetSegmentosNegocio(Id As Integer, Codigo As String) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
Dim StrSQl = New StringBuilder
|
' Dim StrSQl = New StringBuilder
|
||||||
|
|
||||||
StrSQl.Clear()
|
' StrSQl.Clear()
|
||||||
StrSQl.Append(" SELECT Id, RTRIM (LTRIM (Codigo)) AS Codigo, Nombre, '' AS CveProyecto, '' AS CveSubProyecto ")
|
' StrSQl.Append(" SELECT Id, RTRIM (LTRIM (Codigo)) AS Codigo, Nombre, '' AS CveProyecto, '' AS CveSubProyecto ")
|
||||||
StrSQl.Append(" FROM SegmentosNegocio ")
|
' StrSQl.Append(" FROM SegmentosNegocio ")
|
||||||
StrSQl.Append(" WHERE (@Id = -1 OR Id = @Id) ")
|
' StrSQl.Append(" WHERE (@Id = -1 OR Id = @Id) ")
|
||||||
StrSQl.Append(" AND (@Codigo = '-1' OR Codigo = @Codigo) ")
|
' StrSQl.Append(" AND (@Codigo = '-1' OR Codigo = @Codigo) ")
|
||||||
|
|
||||||
DataAdapter(StrSQl.ToString, CommandType.Text)
|
' DataAdapter(StrSQl.ToString, CommandType.Text)
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@Id", SqlDbType.Int).Value = Id
|
' SqlAdapter.SelectCommand.Parameters.Add("@Id", SqlDbType.Int).Value = Id
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
|
' SqlAdapter.SelectCommand.Parameters.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al consultar los Segmentos de Negocio.", ex)
|
' OnError("Ocurrió un error al consultar los Segmentos de Negocio.", ex)
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
Public Function GetSubProyectos(CveEmpresa As Integer) As Boolean
|
'Public Function GetSubProyectos(CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
Dim StrSQl = New StringBuilder
|
' Dim StrSQl = New StringBuilder
|
||||||
|
|
||||||
DataAdapter("PA_Comp_Compras_Pptarias")
|
' DataAdapter("PA_Comp_Compras_Pptarias")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al consultar los Segmentos de Negocio.", ex)
|
' OnError("Ocurrió un error al consultar los Segmentos de Negocio.", ex)
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
Public Function GetNumeroPoliza(CveTipoPoliza As Integer, Tipo As String, Fecha As DateTime, CveEmpresa As Integer) As Boolean
|
Public Function GetNumeroPoliza(CveTipoPoliza As Integer, Tipo As String, Fecha As DateTime, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -4962,29 +4965,29 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
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
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
.Add("@Importe", SqlDbType.Decimal).Value = Importe
|
' .Add("@Importe", SqlDbType.Decimal).Value = Importe
|
||||||
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
' .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex1 As SqlException
|
' Catch ex1 As SqlException
|
||||||
OnError("Ocurrió un error al obtener las Plantillas", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió un error al obtener las Plantillas", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener las Plantillas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió un error al obtener las Plantillas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "FIS IMPUESTOS"
|
#Region "FIS IMPUESTOS"
|
||||||
@@ -5878,7 +5881,7 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetPrePolizasImpresion(CveEmpresa As Integer, FechaI As String, FechaF As String, Optional CveTipoPoliza As Integer = -1, Optional FolioI As Integer = -1,
|
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
|
Optional CveCuenta As Integer = -1, Optional CvePlantillaPoliza As Integer = -1, Optional CveProveedor As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -5892,7 +5895,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@FolioI", SqlDbType.Int).Value = FolioI
|
.Add("@FolioI", SqlDbType.Int).Value = FolioI
|
||||||
.Add("@FolioF", SqlDbType.Int).Value = FolioF
|
.Add("@FolioF", SqlDbType.Int).Value = FolioF
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.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("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@CvePlantillaPoliza", SqlDbType.Int).Value = CvePlantillaPoliza
|
.Add("@CvePlantillaPoliza", SqlDbType.Int).Value = CvePlantillaPoliza
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
|||||||
@@ -4386,6 +4386,9 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Finanzas/RazonesFinancierasCuentas.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Finanzas/RazonesFinancierasCuentas.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Finanzas/RepRotacionCartera.aspx".ToUpper(), 649)
|
PaginaDict.Add("/Finanzas/RepRotacionCartera.aspx".ToUpper(), 649)
|
||||||
PaginaDict.Add("/Finanzas/RepRotacionCarteraDetalle.aspx".ToUpper(), 649)
|
PaginaDict.Add("/Finanzas/RepRotacionCarteraDetalle.aspx".ToUpper(), 649)
|
||||||
|
|
||||||
|
|
||||||
|
PaginaDict.Add("/Finanzas/RepBalanceGeneralHorizontal2.aspx".ToUpper(), -1)
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Flotillas"
|
#Region "Flotillas"
|
||||||
|
|
||||||
|
|||||||
@@ -4631,7 +4631,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||||
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {CveAlmacenDevolucion}").ToEntero
|
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 IdCtaContable As Integer = 0
|
||||||
Dim CveCuenta As Integer = 0
|
Dim CveCuenta As Integer = 0
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
@@ -4668,7 +4668,7 @@ Namespace Modelos
|
|||||||
cont += 1
|
cont += 1
|
||||||
Next
|
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
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ Partial Class Bancos_CuentasBancariasDetalle
|
|||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||||
trCuentaContable.Visible = True
|
|
||||||
trCuentaContableComplementaria.Visible = True
|
|
||||||
CargaCuentasContables()
|
CargaCuentasContables()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -61,8 +60,7 @@ Partial Class Bancos_CuentasBancariasDetalle
|
|||||||
BtnEliminar.Visible = False
|
BtnEliminar.Visible = False
|
||||||
CreaDTUsuarios()
|
CreaDTUsuarios()
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||||
trCuentaContable.Visible = True
|
|
||||||
trCuentaContableComplementaria.Visible = True
|
|
||||||
CargaCuentasContables()
|
CargaCuentasContables()
|
||||||
End If
|
End If
|
||||||
'LbAgregarSucursal.Enabled = False
|
'LbAgregarSucursal.Enabled = False
|
||||||
@@ -99,30 +97,62 @@ Partial Class Bancos_CuentasBancariasDetalle
|
|||||||
DdlMoneda.DataBind()
|
DdlMoneda.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaCuentasContables()
|
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
|
|
||||||
Dim dt As DataTable = Nothing
|
Dim dt As DataTable = Nothing
|
||||||
If Conta.GetCuentasRecursiva(IdPadre, 1) Then
|
|
||||||
dt = Conta.DtResultados
|
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 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
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -164,8 +194,14 @@ Partial Class Bancos_CuentasBancariasDetalle
|
|||||||
DdlTipoCuenta.SelectedValue = ObjCuentasBancariasDetalle.CveTipoCuenta.ToString
|
DdlTipoCuenta.SelectedValue = ObjCuentasBancariasDetalle.CveTipoCuenta.ToString
|
||||||
|
|
||||||
DdlTipoCuenta_SelectedIndexChanged(DdlTipoCuenta, EventArgs.Empty)
|
DdlTipoCuenta_SelectedIndexChanged(DdlTipoCuenta, EventArgs.Empty)
|
||||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||||
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContableComplementaria.ToString)
|
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaConta.ToString)
|
||||||
|
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaContaComplementaria.ToString)
|
||||||
|
Else
|
||||||
|
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
||||||
|
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContableComplementaria.ToString)
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("El Banco Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
Alert("El Banco Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
|
|||||||
@@ -333,7 +333,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtConceptoVentas" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoVentas" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoVentas" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoVentas"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoVentas" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoVentas"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarVentas"></asp:RequiredFieldValidator>
|
||||||
@@ -341,7 +341,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlsubProyectoVentas" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
<asp:DropDownList ID="DdlsubProyectoVentas" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlsubProyectoVentas.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoVentas"></asp:Label> </label>
|
<label for="<%= DdlsubProyectoVentas.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoVentas"></asp:Label> </label>
|
||||||
@@ -385,7 +385,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtConceptoBancos" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoBancos" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoBancos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoBancos"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoBancos" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoBancos"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
|
||||||
@@ -393,7 +393,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlSubproyectoBancos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
<asp:DropDownList ID="DdlSubproyectoBancos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSubproyectoBancos.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoBancos"></asp:Label> </label>
|
<label for="<%= DdlSubproyectoBancos.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoBancos"></asp:Label> </label>
|
||||||
@@ -443,7 +443,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtConceptoDeudores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoDeudores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoDeudores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoDeudores"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoDeudores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoDeudores"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarDeudores"></asp:RequiredFieldValidator>
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarDeudores"></asp:RequiredFieldValidator>
|
||||||
@@ -451,7 +451,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlSubProyectoDeudores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
<asp:DropDownList ID="DdlSubProyectoDeudores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSubProyectoDeudores.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoDeudores"></asp:Label> </label>
|
<label for="<%= DdlSubProyectoDeudores.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoDeudores"></asp:Label> </label>
|
||||||
@@ -492,7 +492,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtConceptoAcreedores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoAcreedores" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoAcreedores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoAcreedores"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoAcreedores" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoAcreedores"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
||||||
@@ -500,7 +500,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlSubProyectoAcreedores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
<asp:DropDownList ID="DdlSubProyectoAcreedores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSubProyectoAcreedores.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoAcreedores"></asp:Label> </label>
|
<label for="<%= DdlSubProyectoAcreedores.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoAcreedores"></asp:Label> </label>
|
||||||
@@ -539,7 +539,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtConceptoFiliales" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoFiliales" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control " Width="90%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoFiliales" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoFiliales"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoFiliales" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoFiliales"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarFiliales"></asp:RequiredFieldValidator>
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarFiliales"></asp:RequiredFieldValidator>
|
||||||
@@ -547,7 +547,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 form-group form-md-line-input input-iconright">
|
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlSubProyectoFiliales" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
<asp:DropDownList ID="DdlSubProyectoFiliales" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSubProyectoFiliales.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoFiliales"></asp:Label> </label>
|
<label for="<%= DdlSubProyectoFiliales.ClientID.ToString()%>"> <asp:Label runat="server" ID="LblSubProyectoFiliales"></asp:Label> </label>
|
||||||
|
|||||||
@@ -1291,7 +1291,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:GridView ID="GvComplementoPagos" runat="server"
|
<asp:GridView ID="GvComplementoPagos" runat="server"
|
||||||
DataKeyNames="CveComplementoPago,FolioFiscal,CveIE,Folio,RFCReceptor,CvePAC,Estatus"
|
DataKeyNames="CveComplementoPago,FolioFiscal,CveIE,Folio,RFCReceptor,CvePAC,Estatus,Tipo"
|
||||||
AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
|
AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
|
|||||||
@@ -1945,7 +1945,7 @@ Partial Class Bancos_IE
|
|||||||
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "003",
|
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "003",
|
||||||
.Clave = "003",
|
.Clave = "003",
|
||||||
.Concepto = "Viáticos (entregados al trabajador).",
|
.Concepto = "Viáticos (entregados al trabajador).",
|
||||||
.Importe = TxtImporte.Text.ToString.ToDouble
|
.Importe = TxtImporte.Text.ToString.ToDecimal
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
If ObjOtrosPagos IsNot Nothing AndAlso ObjOtrosPagos.Count > 0 Then cfdi.Nomina.OtrosPagos = ObjOtrosPagos
|
If ObjOtrosPagos IsNot Nothing AndAlso ObjOtrosPagos.Count > 0 Then cfdi.Nomina.OtrosPagos = ObjOtrosPagos
|
||||||
@@ -5678,15 +5678,31 @@ Partial Class Bancos_IE
|
|||||||
Protected Sub GvComplementoPagos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvComplementoPagos.RowDataBound
|
Protected Sub GvComplementoPagos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvComplementoPagos.RowDataBound
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
e.Row.Cells(3).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-excel""></i></a>", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
|
||||||
e.Row.Cells(4).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
|
||||||
|
|
||||||
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
|
If e.Row.DataKey("Tipo") = "Ing" Then
|
||||||
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = True
|
e.Row.Cells(3).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-excel""></i></a>", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
||||||
Else
|
e.Row.Cells(4).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
||||||
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = False
|
|
||||||
|
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
|
||||||
|
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = True
|
||||||
|
Else
|
||||||
|
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
ElseIf e.Row.DataKey("Tipo") = "Egs" Then
|
||||||
|
|
||||||
|
e.Row.Cells(3).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-excel""></i></a>", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo(("RFCde").ToString.Replace("&", "%26%")))))
|
||||||
|
e.Row.Cells(4).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=Fact&EXT=pdf&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo("RFCde").ToString.Replace("&", "%26%"))))
|
||||||
|
|
||||||
|
GvComplementoPagos.Columns(6).Visible = False
|
||||||
|
GvComplementoPagos.Columns(7).Visible = False
|
||||||
|
GvComplementoPagos.Columns(8).Visible = False
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -3732,11 +3732,18 @@
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" />
|
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" visible="false" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
<div style="text-align:left;width: 85%;margin-left: 7.5%" runat="server" id="DivReembolsoModal" visible="false">
|
||||||
|
<asp:label runat="server" ID="LblReembolsoModal" Text="Num. Reembolso "/><asp:TextBox ID="TxtRembolsoModal" Width="80px" runat="server"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtRembolsoModal" runat="server" ControlToValidate="TxtRembolsoModal" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Num. Reembolso''</b> es necesario, por favor ingreselo." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VceTxtRembolsoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtRembolsoModal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
<div runat="server" id="DivReembolso">
|
<div runat="server" id="DivReembolso">
|
||||||
<asp:Panel ID="Panel1" CssClass="text-small" runat="server" Width="100%" Visible="true" BorderStyle="Solid" BorderColor="#6A92AD" BorderWidth="2px">
|
<asp:Panel ID="Panel1" CssClass="text-small" runat="server" Width="100%" Visible="true" BorderStyle="Solid" BorderColor="#6A92AD" BorderWidth="2px">
|
||||||
<div class="chequesie1">
|
<div class="chequesie1">
|
||||||
@@ -4142,7 +4149,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:Button ID="BtnContado" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpContado" data-dismiss="modal" />
|
<asp:Button ID="BtnContado" OnClick="BtnContado_Click" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpContado" />
|
||||||
<button id="Button2" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
<button id="Button2" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||||
</div>
|
</div>
|
||||||
<asp:HiddenField ID="HiddenField1" runat="server" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField ID="HiddenField1" runat="server" Value="-1" ClientIDMode="Static" />
|
||||||
|
|||||||
@@ -1266,10 +1266,6 @@ Partial Class Compras_Compras
|
|||||||
TieneOC = False
|
TieneOC = False
|
||||||
CveMoneda = -1
|
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();")
|
ImgAnticiposPendientes.Attributes.Add("OnClick", "MuestraAnticipos();")
|
||||||
'ImgCerrar.Attributes.Add("OnClick", "$('#DivAnticipos').hide(200);")
|
'ImgCerrar.Attributes.Add("OnClick", "$('#DivAnticipos').hide(200);")
|
||||||
@@ -1333,9 +1329,9 @@ Partial Class Compras_Compras
|
|||||||
ViewState("CveFactura") = Request("CveFactura").ToEntero
|
ViewState("CveFactura") = Request("CveFactura").ToEntero
|
||||||
|
|
||||||
Dim RFC As String = CargaFactura(CveFactura)
|
Dim RFC As String = CargaFactura(CveFactura)
|
||||||
If Not VerificarProductosSATPS() Then
|
'If Not VerificarProductosSATPS() Then
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
'End If
|
||||||
If RFC.Trim <> String.Empty Then
|
If RFC.Trim <> String.Empty Then
|
||||||
DdlProveedor.Visible = False
|
DdlProveedor.Visible = False
|
||||||
HplProveedor.Visible = True
|
HplProveedor.Visible = True
|
||||||
@@ -1663,14 +1659,10 @@ Partial Class Compras_Compras
|
|||||||
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
||||||
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
|
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim SWatch As New Stopwatch
|
Dim SWatch As New Stopwatch
|
||||||
SWatch.Start()
|
SWatch.Start()
|
||||||
Dim ts As New TimeSpan
|
Dim ts As New TimeSpan
|
||||||
|
|
||||||
|
|
||||||
Dim Valida As New ClsValidaCFDi(dr("UUID").ToString(), dr("RFCDe").ToString, dr("RFCPara").ToString(), dr("Total").ToString.ToDecimal)
|
Dim Valida As New ClsValidaCFDi(dr("UUID").ToString(), dr("RFCDe").ToString, dr("RFCPara").ToString(), dr("Total").ToString.ToDecimal)
|
||||||
|
|
||||||
SWatch.Stop()
|
SWatch.Stop()
|
||||||
@@ -1764,6 +1756,21 @@ Partial Class Compras_Compras
|
|||||||
SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal
|
SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal
|
||||||
AddPS2(False)
|
AddPS2(False)
|
||||||
|
|
||||||
|
|
||||||
|
'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101
|
||||||
|
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||||
|
For Each drr As DataRow In TmpDT.FiltraParametros("ClaveProdServ = '01010101'").Rows
|
||||||
|
|
||||||
|
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", drr("PS"))
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||||
|
Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||||
|
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
CargaConceptosXML(XMLDoc)
|
CargaConceptosXML(XMLDoc)
|
||||||
@@ -1785,8 +1792,6 @@ Partial Class Compras_Compras
|
|||||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
|
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
|
||||||
ChkAplicaNotaCredito.Enabled = False
|
ChkAplicaNotaCredito.Enabled = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DdlTipoCompra.Items.Clear()
|
DdlTipoCompra.Items.Clear()
|
||||||
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
|
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
|
||||||
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
|
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
|
||||||
@@ -3946,6 +3951,15 @@ Partial Class Compras_Compras
|
|||||||
Dim EstatusCredito As Integer = 0
|
Dim EstatusCredito As Integer = 0
|
||||||
Dim CveSubProyecto As Integer = 0
|
Dim CveSubProyecto As Integer = 0
|
||||||
'Credito Multiple
|
'Credito Multiple
|
||||||
|
If RBLPago.SelectedValue.ToEntero = 2 Then
|
||||||
|
If RBLContado.SelectedValue.ToEntero = 6 Or RBLContado.SelectedValue.ToEntero = 2 Then
|
||||||
|
If Not TxtRembolsoNumero.Text.Length > 0 Then
|
||||||
|
Alert("Falta especificar un número de reembolso", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||||
|
|
||||||
Dim DifCreCompra As Decimal = 0
|
Dim DifCreCompra As Decimal = 0
|
||||||
@@ -3983,30 +3997,30 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'VERIFICA SI LOS PRODUCTOS/SERVICIOS EXISTEN EN EL CATALOGO DEL SAT
|
''VERIFICA SI LOS PRODUCTOS/SERVICIOS EXISTEN EN EL CATALOGO DEL SAT
|
||||||
If UsuarioActual.CveEmpresa = 72 Then
|
'If UsuarioActual.CveEmpresa = 72 Then
|
||||||
|
|
||||||
Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(CveSATPS,0) = 46920 ")
|
' Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(CveSATPS,0) = 46920 ")
|
||||||
If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
|
' If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
|
||||||
Dim StrNoEncontrados As New StringBuilder
|
' Dim StrNoEncontrados As New StringBuilder
|
||||||
StrNoEncontrados.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
|
' 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
|
' For Each drt As DataRow In DtNoEncontrados.Rows
|
||||||
StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
' StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
||||||
Next
|
' Next
|
||||||
Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
|
' Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
|
||||||
DtNoEncontrados.Dispose()
|
' DtNoEncontrados.Dispose()
|
||||||
StrNoEncontrados.Clear()
|
' StrNoEncontrados.Clear()
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
DtNoEncontrados.Dispose()
|
' DtNoEncontrados.Dispose()
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
'Verifica funcionalidad 702 "Require orden de compra para factura de compra"
|
'Verifica funcionalidad 702 "Require orden de compra para factura de compra"
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
||||||
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
|
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
|
||||||
If Not CompraEstaVinculadaOC Then
|
If Not CompraEstaVinculadaOC Then
|
||||||
Alert("Debe de vincular una orden de compra para realizar esta factura")
|
Alert("Debe de vincular una orden de compra para registrar la factura")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -4632,7 +4646,7 @@ Partial Class Compras_Compras
|
|||||||
ErrorOC = True
|
ErrorOC = True
|
||||||
End If
|
End If
|
||||||
'actualiza la compra para que no se surta en almacen. sino por el flete o importación
|
'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
|
ErrorOC = True
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
@@ -4647,7 +4661,7 @@ Partial Class Compras_Compras
|
|||||||
ErrorOC = True
|
ErrorOC = True
|
||||||
End If
|
End If
|
||||||
'actualiza la compra para que no se surta en almacen. sino por el flete o importación
|
'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
|
ErrorOC = True
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
@@ -12827,7 +12841,6 @@ Partial Class Compras_Compras
|
|||||||
Select Case RBLPago.SelectedValue
|
Select Case RBLPago.SelectedValue
|
||||||
Case "1" 'Credito
|
Case "1" 'Credito
|
||||||
PnlContado.Visible = False
|
PnlContado.Visible = False
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.UsaAC Then
|
If Not UsuarioActual.Empresa.UsaAC Then
|
||||||
TxtNumeroReembolso.Text = ""
|
TxtNumeroReembolso.Text = ""
|
||||||
tdNumeroReembolso.Visible = False
|
tdNumeroReembolso.Visible = False
|
||||||
@@ -12836,7 +12849,6 @@ Partial Class Compras_Compras
|
|||||||
romCreditosTabla.Visible = False
|
romCreditosTabla.Visible = False
|
||||||
Case "2" 'Contado
|
Case "2" 'Contado
|
||||||
PnlContado.Visible = True
|
PnlContado.Visible = True
|
||||||
|
|
||||||
TxtNumeroReembolso.Text = ""
|
TxtNumeroReembolso.Text = ""
|
||||||
tdNumeroReembolso.Visible = False
|
tdNumeroReembolso.Visible = False
|
||||||
|
|
||||||
@@ -12870,7 +12882,6 @@ Partial Class Compras_Compras
|
|||||||
Case "3" 'Reembolso/Comprobacion
|
Case "3" 'Reembolso/Comprobacion
|
||||||
PnlContado.Visible = True
|
PnlContado.Visible = True
|
||||||
|
|
||||||
|
|
||||||
''AGARRA VALORES DE SESSION PARA REEMBOLSO -- SI YA ESTA REGISTRADA LA COMPRA IGNORA DATOS DE REEMBOLSO
|
''AGARRA VALORES DE SESSION PARA REEMBOLSO -- SI YA ESTA REGISTRADA LA COMPRA IGNORA DATOS DE REEMBOLSO
|
||||||
If Not CveCompra > 0 Then
|
If Not CveCompra > 0 Then
|
||||||
If UsuarioActual.Sesion("Comp-NumeroReembolso") <> Nothing AndAlso UsuarioActual.Sesion("Comp-NumeroReembolso").ToString <> "" Then
|
If UsuarioActual.Sesion("Comp-NumeroReembolso") <> Nothing AndAlso UsuarioActual.Sesion("Comp-NumeroReembolso").ToString <> "" Then
|
||||||
@@ -12998,26 +13009,61 @@ Partial Class Compras_Compras
|
|||||||
Case "1" ' Bancos
|
Case "1" ' Bancos
|
||||||
PnlContadoBancos.Visible = True
|
PnlContadoBancos.Visible = True
|
||||||
TxtDocumentoImporte.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
|
TxtDocumentoImporte.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
|
||||||
|
ChkCreditoMultiple.Visible = False
|
||||||
|
DivReembolsoModal.Visible = False
|
||||||
|
RfvTxtRembolsoModal.Enabled = False
|
||||||
|
TxtRembolsoModal.Text = ""
|
||||||
|
TxtRembolsoNumero.Text = ""
|
||||||
Case "2" ' F y E
|
Case "2" ' F y E
|
||||||
PnlContadoFyE.Visible = True
|
PnlContadoFyE.Visible = True
|
||||||
CargaFuncionariosEmpleados()
|
CargaFuncionariosEmpleados()
|
||||||
|
ChkCreditoMultiple.Visible = False
|
||||||
|
DivReembolsoModal.Visible = True
|
||||||
|
RfvTxtRembolsoModal.Enabled = True
|
||||||
|
TxtRembolsoNumero.Text = ""
|
||||||
|
TxtRembolsoModal.Text = ""
|
||||||
Case "3" ' Creditos
|
Case "3" ' Creditos
|
||||||
PnlContadoCreditos.Visible = True
|
PnlContadoCreditos.Visible = True
|
||||||
|
ChkCreditoMultiple.Visible = True
|
||||||
CargaCreditos()
|
CargaCreditos()
|
||||||
|
DivReembolsoModal.Visible = False
|
||||||
|
RfvTxtRembolsoModal.Enabled = False
|
||||||
|
TxtRembolsoModal.Text = ""
|
||||||
|
TxtRembolsoNumero.Text = ""
|
||||||
Case "4" ' Deudores
|
Case "4" ' Deudores
|
||||||
PnlContadoDeudores.Visible = True
|
PnlContadoDeudores.Visible = True
|
||||||
CargaDeudores()
|
CargaDeudores()
|
||||||
|
ChkCreditoMultiple.Visible = False
|
||||||
|
DivReembolsoModal.Visible = False
|
||||||
|
RfvTxtRembolsoModal.Enabled = False
|
||||||
|
TxtRembolsoModal.Text = ""
|
||||||
|
TxtRembolsoNumero.Text = ""
|
||||||
Case "5" ' ACREEDORES
|
Case "5" ' ACREEDORES
|
||||||
PnlContadoAcreedores.Visible = True
|
PnlContadoAcreedores.Visible = True
|
||||||
|
ChkCreditoMultiple.Visible = True
|
||||||
CargaAcreedores()
|
CargaAcreedores()
|
||||||
|
DivReembolsoModal.Visible = False
|
||||||
|
RfvTxtRembolsoModal.Enabled = False
|
||||||
|
TxtRembolsoModal.Text = ""
|
||||||
|
TxtRembolsoNumero.Text = ""
|
||||||
Case "6" ' Caja Chica
|
Case "6" ' Caja Chica
|
||||||
PnlContadoCajaChica.Visible = True
|
PnlContadoCajaChica.Visible = True
|
||||||
TxtDocumentoImporteCaja.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
|
TxtDocumentoImporteCaja.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
|
||||||
|
ChkCreditoMultiple.Visible = False
|
||||||
|
DivReembolsoModal.Visible = True
|
||||||
|
RfvTxtRembolsoModal.Enabled = True
|
||||||
|
TxtRembolsoModal.Text = ""
|
||||||
|
TxtRembolsoNumero.Text = ""
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnContado_Click(sender As Object, e As EventArgs)
|
||||||
|
TxtRembolsoNumero.Text = TxtRembolsoModal.Text
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Protected Sub RblRembolso_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub RblRembolso_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
TrRembolsoCajaChica.Visible = False
|
TrRembolsoCajaChica.Visible = False
|
||||||
TrRembolsoPersonal.Visible = False
|
TrRembolsoPersonal.Visible = False
|
||||||
@@ -14591,6 +14637,35 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub BtnCancelarCompra2_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCancelarCompra2_Click(sender As Object, e As EventArgs)
|
||||||
RegistraScript("$('#DivCancelarCompra').modal('hide');")
|
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
|
Dim ObjAC As ClsContPAQi = Nothing
|
||||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
@@ -15126,12 +15201,7 @@ Partial Class Compras_Compras
|
|||||||
Dr("RetISRTC") = Dr("RetISR")
|
Dr("RetISRTC") = Dr("RetISR")
|
||||||
Dr("TotalTC") = Dr("ImporteAjustadoDescuento")
|
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
|
Next
|
||||||
|
|
||||||
'DESCRIPCION DE OC CUANDO NO ES COMPRA REGISTRADA
|
'DESCRIPCION DE OC CUANDO NO ES COMPRA REGISTRADA
|
||||||
@@ -15163,7 +15233,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'SI PUEDE RECIBIR POR OC Y COMPRA
|
'SI PUEDE RECIBIR POR OC Y COMPRA
|
||||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
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
|
Select Case DdlOCVinculaInv.SelectedValue.ToEntero
|
||||||
Case 176
|
Case 176
|
||||||
DTOCGV = DTOCGV.FiltraParametros("((EstatusInventario IN (3,5) AND CveTipoPS = 2) OR CveTipoPS = 1)")
|
DTOCGV = DTOCGV.FiltraParametros("((EstatusInventario IN (3,5) AND CveTipoPS = 2) OR CveTipoPS = 1)")
|
||||||
@@ -15428,21 +15498,21 @@ Partial Class Compras_Compras
|
|||||||
Dim DiferenciaPermitida = 1
|
Dim DiferenciaPermitida = 1
|
||||||
Dim Cont = 0
|
Dim Cont = 0
|
||||||
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||||
'For Each gvr As GridViewRow In GvOC1.Rows
|
For Each gvr As GridViewRow In GvOC1.Rows
|
||||||
' SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
||||||
' If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
|
If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
|
||||||
' Cont = 1
|
Cont = 1
|
||||||
' If GvOC1.Columns(6).Visible Then
|
' If GvOC1.Columns(6).Visible Then
|
||||||
' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
|
' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
|
||||||
' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
|
' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
|
||||||
' If SatPS.Contains("01010101") Then
|
' If SatPS.Contains("01010101") Then
|
||||||
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", NombreProducto)
|
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", NombreProducto)
|
||||||
' 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto)
|
' 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto)
|
||||||
' 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
' 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
'Next
|
Next
|
||||||
'If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
'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)
|
' 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)
|
' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||||
@@ -18650,14 +18720,14 @@ Partial Class Compras_Compras
|
|||||||
For Each gvr As GridViewRow In GvSolDev.Rows
|
For Each gvr As GridViewRow In GvSolDev.Rows
|
||||||
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
|
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
|
||||||
'actualiza el estatus del detalle
|
'actualiza el estatus del detalle
|
||||||
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0)
|
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0, UsuarioActual.CveUsuario)
|
||||||
Else
|
Else
|
||||||
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1)
|
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1, UsuarioActual.CveUsuario)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
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)
|
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."))
|
Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente."))
|
||||||
End If
|
End If
|
||||||
@@ -19020,7 +19090,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
CveMovimientoInventario = DtInv.MAX("CveMovimiento", $"CveCompraDetalle = {Row2("CveCompraDetalle")}").ToEntero
|
CveMovimientoInventario = DtInv.MAX("CveMovimiento", $"CveCompraDetalle = {Row2("CveCompraDetalle")}").ToEntero
|
||||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DtInv.MIN("CveAlmacen", $"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 = 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
|
ImporteMovimiento = If(ImporteMovimiento > Row2("Total").ToString.ToDecimal, Row2("Total").ToString.ToDecimal, ImporteMovimiento) * Multiplicador
|
||||||
@@ -19050,15 +19120,15 @@ Partial Class Compras_Compras
|
|||||||
If IdCtaContable = 0 Then
|
If IdCtaContable = 0 Then
|
||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
|
||||||
End If
|
End If
|
||||||
If CveCuenta = 0 Then
|
'If CveCuenta = 0 Then
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
|
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
|
||||||
End If
|
'End If
|
||||||
Dim SeContabiliza As Boolean = True
|
Dim SeContabiliza As Boolean = True
|
||||||
'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68
|
||||||
If DdlTipoCompra.SelectedValue = "10" Then
|
If DdlTipoCompra.SelectedValue = "10" Then
|
||||||
SeContabiliza = False
|
SeContabiliza = False
|
||||||
End If
|
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
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -19403,7 +19473,7 @@ Partial Class Compras_Compras
|
|||||||
Case 237
|
Case 237
|
||||||
Select Case FleteImportacionOpcion
|
Select Case FleteImportacionOpcion
|
||||||
Case 1
|
Case 1
|
||||||
If Not ObjInventario.AddFletescompras(CveFlete, CveCompra) Then
|
If Not ObjInventario.AddFletesCompras(CveFlete, CveCompra) Then
|
||||||
ErrorTrans = True
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
'''actualiza la compra para que no se surta en almacen. sino por el flete o importación
|
'''actualiza la compra para que no se surta en almacen. sino por el flete o importación
|
||||||
@@ -19415,7 +19485,7 @@ Partial Class Compras_Compras
|
|||||||
ErrorTrans = True
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
'actualiza la compra para que no se surta en almacen. sino por el flete o importación
|
'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
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
@@ -19430,7 +19500,7 @@ Partial Class Compras_Compras
|
|||||||
ErrorTrans = True
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
'actualiza la compra para que no se surta en almacen. sino por el flete o importación
|
'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
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
@@ -20204,37 +20274,35 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function VerificarProductosSATPS() As Boolean
|
'Private Function VerificarProductosSATPS() As Boolean
|
||||||
Dim CvePSGRuposAux As New StringBuilder("")
|
' Dim CvePSGRuposAux As New StringBuilder("")
|
||||||
For Each gvr As GridViewRow In GvPS.Rows
|
' For Each gvr As GridViewRow In GvPS.Rows
|
||||||
Dim CvePSIndividual As String = gvr.DataKey("CvePS")
|
' Dim CvePSIndividual As String = gvr.DataKey("CvePS")
|
||||||
CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
|
' CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
If CvePSGRuposAux.Length > 0 Then
|
'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("")
|
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||||
For Each PS As GridViewRow In GvPS.Rows
|
'For Each PS As GridViewRow In GvPS.Rows
|
||||||
Dim PSIndividual As String = PS.DataKey("PS")
|
'Dim PSIndividual As String = PS.DataKey("PS")
|
||||||
Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual))
|
'Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual))
|
||||||
If ClavePSSAT = "46920" Then
|
'If ClavePSSAT = "46920" Then
|
||||||
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", PSIndividual)
|
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", PSIndividual)
|
||||||
End If
|
' End If
|
||||||
Next
|
'Next
|
||||||
|
|
||||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
'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)
|
'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)
|
' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
' Return False
|
||||||
End If
|
'End If
|
||||||
End If
|
|
||||||
|
|
||||||
Return True
|
' Return True
|
||||||
|
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
|
||||||
|
|
||||||
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes"
|
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes"
|
||||||
DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto">
|
DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContAcreedor,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
|
|||||||
TienePermisoVerPoliza = true;
|
TienePermisoVerPoliza = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UsuarioActual.Empresa.TipoContabilidad == 2 && UsuarioActual.Empresa.UsaContabilidad)
|
if (UsuarioActual.Empresa.TipoContabilizacion != 1 )
|
||||||
{
|
{
|
||||||
|
|
||||||
ClsContPAQi ObjCont = new ClsContPAQi(UsuarioActual.Empresa);
|
ClsContPAQi ObjCont = new ClsContPAQi(UsuarioActual.Empresa);
|
||||||
|
|||||||
@@ -266,11 +266,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</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>
|
<label class="col-md-1">Contabilizada:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:HyperLink ID="HplContabilizada" runat="server" Target="_blank">Si</asp:HyperLink>
|
<asp:HyperLink ID="HplContabilizada" runat="server" Target="_blank">Si</asp:HyperLink>
|
||||||
</div>
|
</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>
|
||||||
<div class="row" visible="false" runat="server" id="DivTipoGasto">
|
<div class="row" visible="false" runat="server" id="DivTipoGasto">
|
||||||
<label class="col-md-1">Tipo Gasto:</label>
|
<label class="col-md-1">Tipo Gasto:</label>
|
||||||
@@ -575,7 +579,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="chequesie2">
|
<div class="chequesie2">
|
||||||
<div class="row">
|
<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">
|
<div class="col-md-4">
|
||||||
<asp:TextBox ID="TxtDocumentoFolio" CssClass="form-control input-sm" runat="server" MaxLength="12"></asp:TextBox>
|
<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>
|
<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>
|
||||||
|
|||||||
@@ -388,14 +388,23 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
LnkComplementoPago.Visible = True
|
LnkComplementoPago.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If dr("IdPoliza").ToString.ToEntero > 0 Then
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||||
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
|
If dr("FolioPoliza").ToString.ToEntero > 0 Then
|
||||||
divContabilziada.Visible = True
|
divContabilizada.Visible = True
|
||||||
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
|
LblFolio.Text = dr("FolioPoliza").ToString
|
||||||
'sino está contabilizada, se activa el botón
|
End If
|
||||||
BtnContabilizar.Visible = True
|
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
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
divDatosPrincipales.Visible = False
|
divDatosPrincipales.Visible = False
|
||||||
divObservaciones.Visible = False
|
divObservaciones.Visible = False
|
||||||
UPMovs.Visible = False
|
UPMovs.Visible = False
|
||||||
|
|||||||
@@ -73,9 +73,9 @@
|
|||||||
<div class="col-md-2 ">
|
<div class="col-md-2 ">
|
||||||
<asp:DropDownList ID="DdlUsuarioRegistro" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
|
<asp:DropDownList ID="DdlUsuarioRegistro" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
|
||||||
</div>
|
</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 ">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Partial Class Contabilidad2_PolizasImpresion
|
|||||||
DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
DdlUsuarioRegistro.DataBind()
|
DdlUsuarioRegistro.DataBind()
|
||||||
cargaddlpolizas()
|
cargaddlpolizas()
|
||||||
CargaSegmentoNeg()
|
CargaSubProyectos()
|
||||||
CargaCuentas()
|
CargaCuentas()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -34,13 +34,13 @@ Partial Class Contabilidad2_PolizasImpresion
|
|||||||
|
|
||||||
Dim ArchivoReporte As String = "Empresas/Grales/Formatos/Polizas.rdlc"
|
Dim ArchivoReporte As String = "Empresas/Grales/Formatos/Polizas.rdlc"
|
||||||
|
|
||||||
'If IO.File.Exists(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
If IO.File.Exists(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
||||||
' ArchivoReporte = String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)
|
ArchivoReporte = String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If ObjConta.GetPrePolizasImpresion(UsuarioActual.CveEmpresa, TxtFechaInicio.Text, TxtFechaFin.Text, CveTipoPoliza:=ddlTipoPoliza.SelectedValue.ToEntero, FolioI:=foli,
|
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,
|
CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CvePlantillaPoliza:=DdlGrupoPlantilla.SelectedValue.ToEntero,
|
||||||
CveProveedor:=DdlTipoProveedor.SelectedValue.ToEntero) Then
|
CveProveedor:=DdlTipoProveedor.SelectedValue.ToEntero) Then
|
||||||
If ObjConta.DtResultados.Rows.Count < 10000 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("Moneda", ""))
|
||||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||||
|
|
||||||
'If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
' params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("IdUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
|
params.Add(New ReportParameter("UsuarioRegistro", dr("NombreUsuario").ToString))
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
ImprimirPDF(ArchivoReporte, ObjConta.DtResultados, params)
|
ImprimirPDF(ArchivoReporte, ObjConta.DtResultados, params)
|
||||||
|
|
||||||
@@ -89,15 +89,11 @@ Partial Class Contabilidad2_PolizasImpresion
|
|||||||
DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaSegmentoNeg()
|
Private Sub CargaSubProyectos()
|
||||||
Dim objtcont As New ClsContabilidad
|
DdlSubProyectos.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
|
||||||
If objtcont.GetSegmentosNegocio(-1, "-1") Then
|
DdlSubProyectos.DataBind()
|
||||||
DdlSegmentoNeg.DataSource = objtcont.DtResultados
|
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
DdlSegmentoNeg.DataBind()
|
DdlSubProyectos.Items.Insert(1, New ListItem("Sin Asignar", "-2"))
|
||||||
End If
|
|
||||||
objtcont.Dispose()
|
|
||||||
DdlSegmentoNeg.Items.Insert(0, New ListItem("Todos", "-1"))
|
|
||||||
DdlSegmentoNeg.Items.Insert(1, New ListItem("Sin Asignar", "-2"))
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCuentas()
|
Private Sub CargaCuentas()
|
||||||
|
|||||||
@@ -722,7 +722,7 @@ Partial Class Inventarios_Apartados
|
|||||||
Dim CveSec As Integer = 0
|
Dim CveSec As Integer = 0
|
||||||
|
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
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
|
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
|
ErrorMovInv = True
|
||||||
|
|||||||
@@ -175,7 +175,7 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Cuenta Contable">
|
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Cuenta Contable">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlCuentaContable" runat="server" Text='<%# Eval("IdCtaContable") %>'></asp:Literal>
|
<asp:Literal ID="LtlCuentaContable" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Modalidad">
|
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Modalidad">
|
||||||
@@ -265,7 +265,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<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: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: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>
|
<asp:Label AssociatedControlID="DdlCuentasContables" runat="server" Text="Cuenta Contable:"></asp:Label>
|
||||||
|
|||||||
@@ -99,31 +99,34 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCuentasContables()
|
Private Sub CargaCuentasContables()
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||||
divCuentasCompac.Visible = False
|
divCuentasCompac.Visible = False
|
||||||
pnlCuentassig.Visible = True
|
pnlCuentassig.Visible = True
|
||||||
Using ObjContabilidad As New ClsContabilidad
|
Using ObjContabilidad As New ClsContabilidad
|
||||||
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
'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.DataSource = ObjContabilidad.DtResultados
|
||||||
DdlCuentasSig.DataBind()
|
DdlCuentasSig.DataBind()
|
||||||
DdlCuentasSig.Items.Insert(0, New ListItem("Selecione", "-1"))
|
DdlCuentasSig.Items.Insert(0, New ListItem("Selecione", "-1"))
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
Else
|
Else
|
||||||
divCuentasCompac.Visible = True
|
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
pnlCuentassig.Visible = False
|
divCuentasCompac.Visible = True
|
||||||
Using ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
pnlCuentassig.Visible = False
|
||||||
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
Using ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
If ObjContabilidad.GetCuentasRecursiva(UsuarioActual.Empresa.Funcionalidad(208).ToEntero, 1) Then
|
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
||||||
DtCuentasContables = ObjContabilidad.DtResultados
|
If ObjContabilidad.GetCuentasRecursiva(UsuarioActual.Empresa.Funcionalidad(208).ToEntero, 1) Then
|
||||||
Else
|
DtCuentasContables = ObjContabilidad.DtResultados
|
||||||
DtCuentasContables = Nothing
|
Else
|
||||||
End If
|
DtCuentasContables = Nothing
|
||||||
End Using
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
DdlCuentasContables.DataSource = DtCuentasContables
|
||||||
|
DdlCuentasContables.DataBind()
|
||||||
|
End If
|
||||||
|
|
||||||
DdlCuentasContables.DataSource = DtCuentasContables
|
|
||||||
DdlCuentasContables.DataBind()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpAddAlmacen.Update()
|
UpAddAlmacen.Update()
|
||||||
@@ -157,8 +160,8 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
|
|
||||||
If e.Row.DBCampo("IdCtaContable").ToEntero > 0 Then
|
If e.Row.DBCampo("IdCtaContable").ToEntero > 0 Then
|
||||||
e.Row.FCLiteral("LtlCuentaContable").Text = DtCuentasContables.FiltroPrimeroValor("CtaCodigo", $"Id = {e.Row.DBCampo("IdCtaContable")}")
|
e.Row.FCLiteral("LtlCuentaContable").Text = DtCuentasContables.FiltroPrimeroValor("CtaCodigo", $"Id = {e.Row.DBCampo("IdCtaContable")}")
|
||||||
Else
|
'Else
|
||||||
e.Row.FCLiteral("LtlCuentaContable").Text = "Sin Cuenta"
|
' e.Row.FCLiteral("LtlCuentaContable").Text = "Sin Cuenta"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -183,10 +186,9 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
e.Row.FCDropDownList("DdlTipoAlmacen").DataBind()
|
e.Row.FCDropDownList("DdlTipoAlmacen").DataBind()
|
||||||
e.Row.FCDropDownList("DdlTipoAlmacen").SelectedValue = e.Row.DBCampo("CveTipoAlmacen")
|
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").DataSource =
|
||||||
'e.Row.FCDropDownList("DdlModalidad").DataBind()
|
'e.Row.FCDropDownList("DdlModalidad").DataBind()
|
||||||
@@ -212,11 +214,12 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Sub RecargaGlobalAlmacenes()
|
Private Sub RecargaGlobalAlmacenes()
|
||||||
Dim ObjAlmacen As New ClsInventarios
|
GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing
|
||||||
If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then
|
'Dim ObjAlmacen As New ClsInventarios
|
||||||
GlobalDTAlmacen(-1) = ObjAlmacen.DtResultados
|
'If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then
|
||||||
End If
|
' GlobalDTAlmacen(-1) = ObjAlmacen.DtResultados
|
||||||
ObjAlmacen.Dispose()
|
'End If
|
||||||
|
'ObjAlmacen.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RecargaGlobalAlmacenesUsuarios()
|
Private Sub RecargaGlobalAlmacenesUsuarios()
|
||||||
@@ -238,13 +241,14 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
Dim CuentaContable As Integer = 0
|
Dim CuentaContable As Integer = 0
|
||||||
Dim CveCuenta As Integer = 0
|
Dim CveCuenta As Integer = 0
|
||||||
|
|
||||||
If divddlcc.Visible Then
|
|
||||||
If pnlCuentassig.Visible Then
|
If pnlCuentassig.Visible Then
|
||||||
CveCuenta = DdlCuentasSig.SelectedValue.ToEntero()
|
CveCuenta = DdlCuentasSig.SelectedValue.ToEntero()
|
||||||
Else
|
|
||||||
CuentaContable = DdlCuentasContables.SelectedValue.ToEntero()
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
If divCuentasCompac.Visible Then
|
||||||
|
CuentaContable = DdlCuentasContables.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If HdnModalidad.Value = "A" Then
|
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
|
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
|
||||||
|
|||||||
@@ -1153,8 +1153,8 @@ Partial Class Inventarios_Consignaciones
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacenCI}").ToEntero
|
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacenCI}").ToEntero
|
||||||
CveCuenta = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"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
|
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
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -2048,12 +2048,13 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
|
|
||||||
CantidadPendiente = 1
|
CantidadPendiente = 1
|
||||||
If CBool(Dr("AplicaSeccion")) Then
|
'If CBool(Dr("AplicaSeccion")) Then
|
||||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||||
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
|
' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
|
||||||
Else
|
'Else
|
||||||
CveSeccionAlmacen = -1
|
' CveSeccionAlmacen = -1
|
||||||
End If
|
'End If
|
||||||
|
CveSeccionAlmacen = -3
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
@@ -2509,12 +2510,14 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
If CBool(Dr("AplicaSeccion")) Then
|
'If CBool(Dr("AplicaSeccion")) Then
|
||||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||||
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
|
' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
|
||||||
Else
|
'Else
|
||||||
CveSeccionAlmacen = -1
|
' CveSeccionAlmacen = -1
|
||||||
End If
|
'End If
|
||||||
|
CveSeccionAlmacen = -3
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
||||||
@@ -2543,12 +2546,13 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If CBool(Dr("AplicaSeccion")) Then
|
'If CBool(Dr("AplicaSeccion")) Then
|
||||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||||
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS"), CveSeccionAlmacen)
|
' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS"), CveSeccionAlmacen)
|
||||||
Else
|
'Else
|
||||||
CveSeccionAlmacen = -1
|
' CveSeccionAlmacen = -1
|
||||||
End If
|
'End If
|
||||||
|
CveSeccionAlmacen = -3
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
@@ -2812,7 +2816,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||||
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
|
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 IdCtaContable As Integer = 0
|
||||||
Dim CveCuenta As Integer = 0
|
Dim CveCuenta As Integer = 0
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
@@ -2864,7 +2868,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
cont += 1
|
cont += 1
|
||||||
Next
|
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
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3132,11 +3136,12 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
Dim CveSeccionAlmacen As Integer = -1
|
Dim CveSeccionAlmacen As Integer = -1
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If CBool(Dr("AplicaSeccion")) Then
|
'If CBool(Dr("AplicaSeccion")) Then
|
||||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Almacen2, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Almacen2, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||||
Else
|
'Else
|
||||||
CveSeccionAlmacen = -1
|
' CveSeccionAlmacen = -1
|
||||||
End If
|
'End If
|
||||||
|
CveSeccionAlmacen = -3
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td rowspan="2">
|
<td rowspan="2">
|
||||||
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x:hidden; width: 150px; height:100px" runat="server" visible="False">
|
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x:hidden; width: 150px; height:100px" runat="server" visible="False">
|
||||||
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="No se encontraron Equivalencias de Medidas" ToolTip="Listado de Equivalencias de Medidas" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
|
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -544,11 +544,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then
|
||||||
DdlTipo.Items.Insert(1, New ListItem("OC", "2"))
|
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
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(155).ToEntero > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(155).ToEntero > 0 Then
|
||||||
@@ -2657,12 +2655,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
If CBool(Dr("AplicaSeccion")) Then
|
|
||||||
CveSeccionDestino = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDestino, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
|
||||||
Else
|
|
||||||
CveSeccionDestino = -1
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
CveSeccionDestino = -3 'se madna este dato, para que el trigger, obtenga la seccion automaticamente
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionDestino, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionDestino, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
@@ -2879,7 +2873,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'ACTUALIZA ESTATUS ALMACEN
|
'ACTUALIZA ESTATUS ALMACEN
|
||||||
If TipoMovimiento = 2 Then
|
If TipoMovimiento = 2 Then
|
||||||
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 0) Then
|
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 0, UsuarioActual.CveUsuario) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -2901,7 +2895,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VARIABLES
|
'VARIABLES
|
||||||
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
|
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 IdCtaContableRecepcion = -1
|
||||||
Dim IdCtaContableRecepcionME = -1
|
Dim IdCtaContableRecepcionME = -1
|
||||||
Dim IdCtaContableRecepcionComplementaria = -1
|
Dim IdCtaContableRecepcionComplementaria = -1
|
||||||
@@ -2975,7 +2969,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero
|
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)
|
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen", 74, TotalCosto, TotalCosto, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
If CvePrePoliza > 0 Then
|
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
|
'AGREGA POR CONCEPTO POR CVEOCDETALLE
|
||||||
If CveOCSurtir > 0 Then
|
If CveOCSurtir > 0 Then
|
||||||
@@ -3115,7 +3109,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VARIABLES
|
'VARIABLES
|
||||||
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
|
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 Fecha As Date = TxtFecha.Text.ToDate
|
||||||
Dim CveProveedor As Integer = -1
|
Dim CveProveedor As Integer = -1
|
||||||
Dim ProveedorNombre As String = ""
|
Dim ProveedorNombre As String = ""
|
||||||
@@ -3148,7 +3142,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen-NC", 74, TotalCosto, TotalCosto, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/RecepcionAlmacen-NC", 74, TotalCosto, TotalCosto, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
If CvePrePoliza > 0 Then
|
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, 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 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
|
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
|
ErrorMovInv = True
|
||||||
@@ -3558,7 +3552,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
If CvePrePoliza > 0 Then
|
If CvePrePoliza > 0 Then
|
||||||
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
|
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)
|
ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
|
||||||
Dim TotalCosto As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL()
|
Dim TotalCosto As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL()
|
||||||
Dim IdCtaContableCostoInd As Integer = 0
|
Dim IdCtaContableCostoInd As Integer = 0
|
||||||
@@ -3566,7 +3560,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim PorcentajeRecepcionCompras As Decimal = TotalCosto / DtTempCompras.SUMD("SubTotalTC")
|
Dim PorcentajeRecepcionCompras As Decimal = TotalCosto / DtTempCompras.SUMD("SubTotalTC")
|
||||||
Dim ConceptoPartida As String = String.Format("{0}- Inv#{1}", HLFolio.Text, InvFolio)
|
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
|
'se recorren las facturas a descontar el recepción
|
||||||
If DtTempCompras IsNot Nothing AndAlso DtTempCompras.Rows.Count > 0 Then
|
If DtTempCompras IsNot Nothing AndAlso DtTempCompras.Rows.Count > 0 Then
|
||||||
|
|
||||||
@@ -3766,7 +3760,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim ObjOC As New ClsOC
|
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.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.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)
|
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
|
Else
|
||||||
CveOC = ObjOC.DtResultados.FiltroPrimeroValor("CveOrdenCompra").ToString.ToEntero
|
CveOC = ObjOC.DtResultados.FiltroPrimeroValor("CveOrdenCompra").ToString.ToEntero
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ Partial Class RepNotasSinAlmacen
|
|||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ObjEventos As New ClsOIEventos
|
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
|
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.")
|
Alert("El producto se marcó como 'no recibido' correctamente.")
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1125,8 +1125,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacenCI}").ToEntero
|
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
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -2747,7 +2747,6 @@ Partial Class OC
|
|||||||
Dim CveOCDetalle = -1
|
Dim CveOCDetalle = -1
|
||||||
Dim CveAlmacen = -1
|
Dim CveAlmacen = -1
|
||||||
Dim IdCtaContableAlmacen As Integer = -1
|
Dim IdCtaContableAlmacen As Integer = -1
|
||||||
Dim CveCuentaAlmacen As Integer = -1
|
|
||||||
Dim IdCtaContableRecepcionOC = -1
|
Dim IdCtaContableRecepcionOC = -1
|
||||||
Dim IdCtaContableRecepcionOCME = -1
|
Dim IdCtaContableRecepcionOCME = -1
|
||||||
Dim IdCtaContableRecepcionOCComplementaria = -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}")
|
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
|
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
|
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
|
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
|
'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.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
|
'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
|
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
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -2896,7 +2894,6 @@ Partial Class OC
|
|||||||
' DiferenciaInvOC = DtInvOCDiferencias.SUMD("Diferencia", $"CveAlmacen = {CveAlmacen} And CveMovimiento = {CveMovimientoAlmacen} And ConceptoSalida = {ConceptoSalida}")
|
' 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
|
' 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
|
' 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
|
' 'MODIFICACIÓN CONCEPTO
|
||||||
' If ConceptoSalida = 0 Then
|
' If ConceptoSalida = 0 Then
|
||||||
|
|||||||
@@ -419,7 +419,7 @@ Partial Class Sistemas_CatSesiones
|
|||||||
|
|
||||||
Private Sub CargaBancosCuentas()
|
Private Sub CargaBancosCuentas()
|
||||||
Dim Banc As New ClsBancos
|
Dim Banc As New ClsBancos
|
||||||
If Banc.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = Banc.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
|
If Banc.GetBancosCuentasUsuarios(-1, UsuarioActual.CveEmpresa) Then Application("GlobalDTBancosCuentas") = Banc.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
|
||||||
Banc.Dispose()
|
Banc.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
'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("CveModuloAcceso") <> "" Then
|
||||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkDenegar").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkDenegar").Checked = False 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
|
HuboError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkPermitir").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkPermitir").Checked = False Then
|
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
|
HuboError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
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
|
'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("CveModuloAcceso") <> "" Then
|
||||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkDenegar").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkDenegar").Checked = False 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
|
HuboError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkPermitir").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkPermitir").Checked = False Then
|
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
|
HuboError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
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
|
'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("CveModuloAcceso") <> "" Then
|
||||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkDenegar").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkDenegar").Checked = False 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
|
HuboError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkPermitir").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkPermitir").Checked = False Then
|
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
|
HuboError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ Partial Class CatClasificaciones
|
|||||||
End If
|
End If
|
||||||
UpModalClasif.Update()
|
UpModalClasif.Update()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||||
|
|
||||||
''COMENTADO DF 30 JUNIO 2017
|
''COMENTADO DF 30 JUNIO 2017
|
||||||
'Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
'Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
@@ -118,13 +118,16 @@ Partial Class CatClasificaciones
|
|||||||
'End If
|
'End If
|
||||||
'Cuenta.Dispose()
|
'Cuenta.Dispose()
|
||||||
Else
|
Else
|
||||||
DivCuentaIngresos.Visible = False
|
If UsuarioActual.Empresa.TipoContabilizacion = 2 Then
|
||||||
DivCuentaCostos.Visible = False
|
DivCuentaIngresos.Visible = False
|
||||||
DivCuentaGasto.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
|
End If
|
||||||
|
|
||||||
DdlCuentaGasto.Items.Insert(0, New ListItem("-", "-1"))
|
DdlCuentaGasto.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
|
|||||||
@@ -1902,7 +1902,7 @@ Partial Class Clientes
|
|||||||
GvDireccionesEnvio.DataBind()
|
GvDireccionesEnvio.DataBind()
|
||||||
|
|
||||||
If TxtRFC.Text = "XAXX010101000" Then
|
If TxtRFC.Text = "XAXX010101000" Then
|
||||||
GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal").Text = "Cliente"
|
If GvDireccionesEnvio.HeaderRow IsNot Nothing AndAlso GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal") IsNot Nothing Then GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal").Text = "Cliente"
|
||||||
LtlNombreSucursal.Text = "Cliente"
|
LtlNombreSucursal.Text = "Cliente"
|
||||||
LtlNombreSucursalTitulo.Text = "Cliente"
|
LtlNombreSucursalTitulo.Text = "Cliente"
|
||||||
LtlTituloSurcusalCliente.Text = "Datos del cliente"
|
LtlTituloSurcusalCliente.Text = "Datos del cliente"
|
||||||
|
|||||||
@@ -12073,8 +12073,8 @@ Partial Class Ventas
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Dim CveSeccionAlmacen As Integer = -1
|
Dim CveSeccionAlmacen As Integer = -3
|
||||||
If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
|
'If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -14252,14 +14252,13 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {ddlAlmacen.SelectedValue}").ToEntero()
|
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()
|
ValorInventario = DTMovimientosDetalles.SUMD("Total", $"CveMovimiento = {Mov("CveMovimiento")}").RoundSQL()
|
||||||
|
|
||||||
If ValorInventario <> 0 Then
|
If ValorInventario <> 0 Then
|
||||||
'Entrada
|
'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
|
'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
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -14555,116 +14554,116 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.TienePermisoProceso(68) AndAlso Not PSCodigoSAT.Contiene("84111506", "80141610") Then TxtPrecio.Enabled = False
|
If UsuarioActual.TienePermisoProceso(68) AndAlso Not PSCodigoSAT.Contiene("84111506", "80141610") Then TxtPrecio.Enabled = False
|
||||||
|
|
||||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
|
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
|
||||||
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
|
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
|
||||||
CambiaMoneda()
|
CambiaMoneda()
|
||||||
|
End If
|
||||||
|
|
||||||
|
'SUGIERE PRECIO
|
||||||
|
Dim PrecioSugerido = 0.0
|
||||||
|
PrecioSugerido = drPS("Precio").ToString().ToDouble
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||||
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||||
|
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
||||||
|
If PrecioAplicado > 0 Then
|
||||||
|
PrecioSugerido = PrecioAplicado
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjPS.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
||||||
|
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||||
|
' si es 10. primero el cliente
|
||||||
|
Dim CvePrecioListaPS As Integer
|
||||||
|
Dim PorcentajePrecio As Double = 0
|
||||||
|
|
||||||
|
If TipoPrecioLista = 10 Then
|
||||||
|
|
||||||
|
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||||
|
If CvePrecioListaPS <= 0 Then
|
||||||
|
|
||||||
|
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||||
|
If CvePrecioListaPS <= 0 Then
|
||||||
|
|
||||||
|
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SUGIERE PRECIO
|
If CvePrecioListaPS > 0 Then
|
||||||
Dim PrecioSugerido = 0.0
|
|
||||||
PrecioSugerido = drPS("Precio").ToString().ToDouble
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||||
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||||
If PrecioAplicado > 0 Then
|
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||||
PrecioSugerido = PrecioAplicado
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
If PrecioSugerido = 0 Then
|
||||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
Dim ObjInventarios As New ClsInventarios
|
||||||
' si es 10. primero el cliente
|
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||||
Dim CvePrecioListaPS As Integer
|
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||||
Dim PorcentajePrecio As Double = 0
|
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||||
|
ObjInventarios.Dispose()
|
||||||
If TipoPrecioLista = 10 Then
|
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||||
|
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
|
||||||
If CvePrecioListaPS <= 0 Then
|
|
||||||
|
|
||||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
|
||||||
If CvePrecioListaPS <= 0 Then
|
|
||||||
|
|
||||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CvePrecioListaPS > 0 Then
|
|
||||||
Dim ObjPS As New ClsProductosServicios
|
|
||||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
|
||||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
|
||||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
|
||||||
End If
|
|
||||||
ObjPS.Dispose()
|
|
||||||
End If
|
|
||||||
|
|
||||||
If PrecioSugerido = 0 Then
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
|
||||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
|
||||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
|
||||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
|
||||||
ObjInventarios.Dispose()
|
|
||||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
|
||||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
CvePrecioLista = CvePrecioListaPS
|
|
||||||
End If
|
End If
|
||||||
|
CvePrecioLista = CvePrecioListaPS
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Dim ObjClasificaciones As New ClsClasificaciones
|
'Dim ObjClasificaciones As New ClsClasificaciones
|
||||||
'If ObjClasificaciones.GetClasificaciones() Then
|
'If ObjClasificaciones.GetClasificaciones() Then
|
||||||
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
|
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If PrecioSugerido > 0 Then
|
If PrecioSugerido > 0 Then
|
||||||
Dim PrecioBaseCosto As Decimal = 0
|
Dim PrecioBaseCosto As Decimal = 0
|
||||||
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
|
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
|
||||||
|
|
||||||
If PrecioBaseCosto > 0 Then
|
If PrecioBaseCosto > 0 Then
|
||||||
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
|
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
|
||||||
End If
|
|
||||||
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
|
|
||||||
End If
|
End If
|
||||||
|
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If IsNumeric(TxtCantidad.Text.Trim) Then
|
If IsNumeric(TxtCantidad.Text.Trim) Then
|
||||||
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
|
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
|
||||||
|
Else
|
||||||
|
LblTotalPS.Text = "0.00"
|
||||||
|
End If
|
||||||
|
LblPrecio1.Text = TxtPrecio.Text
|
||||||
|
UPPDescuento.Update()
|
||||||
|
|
||||||
|
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
|
||||||
|
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
|
||||||
|
HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
|
||||||
|
HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
|
||||||
|
HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
|
||||||
|
HdnCodigo.Value = drPS("Codigo").ToString()
|
||||||
|
If DdlClasificacion.SelectedIndex = 0 Then
|
||||||
|
If drPS("CveClasificacion").ToString() IsNot Nothing Then
|
||||||
|
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
|
||||||
Else
|
Else
|
||||||
LblTotalPS.Text = "0.00"
|
Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
|
||||||
LblPrecio1.Text = TxtPrecio.Text
|
|
||||||
UPPDescuento.Update()
|
|
||||||
|
|
||||||
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
|
|
||||||
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
|
|
||||||
HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
|
|
||||||
HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
|
|
||||||
HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
|
|
||||||
HdnCodigo.Value = drPS("Codigo").ToString()
|
|
||||||
If DdlClasificacion.SelectedIndex = 0 Then
|
|
||||||
If drPS("CveClasificacion").ToString() IsNot Nothing Then
|
|
||||||
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
|
|
||||||
Else
|
|
||||||
Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf CvePSParametro = -2 Then
|
End If
|
||||||
|
|
||||||
|
ElseIf CvePSParametro = -2 Then
|
||||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), Ddl)
|
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), Ddl)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -15774,7 +15773,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
|
'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
|
||||||
Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Me.ObjFacturaNC.VentaDesglosaIEPS))
|
Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Not Me.ObjFacturaNC.VentaDesglosaIEPS))
|
||||||
|
|
||||||
If Not ClienteDesglosaIEPS Then
|
If Not ClienteDesglosaIEPS Then
|
||||||
If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
|
If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
|
||||||
@@ -21609,11 +21608,12 @@ Partial Class Ventas
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If AplicaSeccion Then
|
'If AplicaSeccion Then
|
||||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||||
Else
|
'Else
|
||||||
CveSeccionAlmacen = -1
|
' CveSeccionAlmacen = -1
|
||||||
End If
|
'End If
|
||||||
|
CveSeccionAlmacen = -3
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, Serie:=Dr2("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, Serie:=Dr2("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
||||||
Return False
|
Return False
|
||||||
@@ -21625,11 +21625,12 @@ Partial Class Ventas
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If AplicaSeccion Then
|
'If AplicaSeccion Then
|
||||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||||
Else
|
'Else
|
||||||
CveSeccionAlmacen = -1
|
' CveSeccionAlmacen = -1
|
||||||
End If
|
'End If
|
||||||
|
CveSeccionAlmacen = -3
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, Cantidad, CveUnidad, CveProducto, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, Cantidad, CveUnidad, CveProducto, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
||||||
Return False
|
Return False
|
||||||
|
|||||||
Reference in New Issue
Block a user