This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-07-08 07:35:48 -07:00
48 changed files with 2797 additions and 2667 deletions

View File

@@ -190,8 +190,8 @@ Partial Class AC_RegDevengadoIngresos
'Detalles de PrePoliza
If Not ErrorAC Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, "", 30, "", Now, 0, -1, CveIE) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, "", 4, "", Now, 0, -1, CveIE) Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, 30, "", "", -1, CveIE) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, 4, "", "", -1, CveIE) Then
ErrorAC = True
End If
Else

View File

@@ -165,8 +165,8 @@ Partial Class AC_RegRecaudado
'Detalles de PrePoliza
If Not ErrorAC Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, "", 30, "", Fecha, 0, -1, CveIE, CveCliente:=CveCliente) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, "", 4, "", Fecha, 0, -1, CveIE, CveCliente:=CveCliente) Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, 30, "", "", 0, CveIE, CveCliente:=CveCliente) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, 4, "", "", 0, CveIE, CveCliente:=CveCliente) Then
ErrorAC = True
End If
Else

View File

@@ -649,7 +649,7 @@ Public Class CFDIComplementoPago
.Base = t.Sum(Function(tt) tt.Base),
.Importe = t.Sum(Function(tt) tt.Importe),
.BaseMN = t.Sum(Function(tt) tt.BaseMN).TruncateDecimal, '' se trunca solo al final, NO EN EL DESGLOSE
.ImporteMN = t.Sum(Function(tt) tt.ImporteMN)}) _
.ImporteMN = t.Sum(Function(tt) tt.ImporteMN).TruncateDecimal}) _
.OrderBy(Function(x) x.Impuesto).ToList
End If

View File

@@ -1329,7 +1329,7 @@ Public Class ClsCompras
#Region "I M P O R T A C I O N E S"
Public Function GetImportaciones(CveImportacion As Integer, CveProveedor As Integer, CveActivoFijo As Integer, FechaInicio As String, FechaFin As String, CveEmpresa As Integer) As Boolean
Public Function GetImportaciones(CveImportacion As Integer, CveProveedor As Integer, CveActivoFijo As Integer, FechaInicio As String, FechaFin As String, CveEmpresa As Integer, Optional CveEstatus As Integer = -1) As Boolean
Dim Retorno = False
@@ -1342,6 +1342,7 @@ Public Class ClsCompras
.Add("@FechaI", SqlDbType.VarChar).Value = FechaInicio
.Add("@FechaF", SqlDbType.VarChar).Value = FechaFin
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
End With
Try

View File

@@ -1014,7 +1014,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function AddPrePolizasDetalle(CvePrePoliza As Integer, TipoMovimiento As Boolean, Importe As Decimal, ImporteMN As Decimal, Referencia As String, CveConceptoContable As Integer, Concepto As String, IdCtaContable As Integer,
Public Function AddPrePolizasDetalle(CvePrePoliza As Integer, TipoMovimiento As Boolean, Importe As Decimal, ImporteMN As Decimal, CveConceptoContable As Integer, Referencia As String, Concepto As String, IdCtaContable As Integer,
Optional CveIE As Integer = -1, Optional CveVenta As Integer = -1, Optional CveCompra As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1,
Optional CvePersonal As Integer = -1, Optional CveMovimientoAlmacen As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCreditoDetalle As Integer = -1,
Optional CveOC As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVentaAmortizacion As Integer = -1, Optional CveCompraAmortizacion As Integer = -1, Optional ImporteME As Decimal = 0,

View File

@@ -1665,7 +1665,7 @@ Public Class ClsInventarios
End Function
Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer,
CvesAlmacenes As String, CveUsuario As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
CvesAlmacenes As String, CveUsuario As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1, Optional CveCompuesto As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ProductosCaducidadGet")
@@ -1681,6 +1681,7 @@ Public Class ClsInventarios
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
End With
Try
@@ -5052,6 +5053,47 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function UpdateFleteCierre(CveFlete As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_FletesCierreUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveFlete", SqlDbType.Int).Value = CveFlete
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el flete.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateImportacionCierre(CveImportacion As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ImportacionCierreUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveImportacion", SqlDbType.Int).Value = CveImportacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar la importación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region " FLETES COMPRAS "
@@ -5915,128 +5957,6 @@ Public Class ClsInventarios
#Region "VIGENCIA COMPUESTOS"
Public Function AddCompuestosVigencia(CveCompuesto As Integer, CveProveedor As Integer, RegistroRSCO As String, FechaVigencia As Date, VigenciaIndeterminada As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_CompuestosVigenciaAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@RegistroRSCO", SqlDbType.VarChar).Value = RegistroRSCO
.Add("@FechaVigencia", SqlDbType.Date).Value = FechaVigencia
.Add("@VigenciaIndeterminada", SqlDbType.Bit).Value = VigenciaIndeterminada
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
If Ex1.Message.Contains("IX_Inv_CveCompuestoCveProveedorFechaVigneciaCveEmpresa") Then
Alert($"Ya existe un RSCO con los datos especificados (proveedor, compuesto, Fecha de vigencia).", TipoMensaje.MsgAdvertencia)
ElseIf Ex1.Message.Contains("UNIX_Inv_RegistroRSCO") Then
Alert($"El RSCO {RegistroRSCO} ya se encuentra registrado.", TipoMensaje.MsgAdvertencia)
Else
Me.OnError("Ocurrió un error al guardar la vigencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
Catch ex As Exception
OnError("Ocurrió un error al guardar la vigencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function UpdateCompuestosVigencia(CveCompuestoVigencia As Integer, CveCompuesto As Integer, CveProveedor As Integer, RegistroRSCO As String, FechaVigencia As Date, VigenciaIndeterminada As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_CompuestosVigenciaUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompuestoVigencia", SqlDbType.Int).Value = CveCompuestoVigencia
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@RegistroRSCO", SqlDbType.VarChar).Value = RegistroRSCO
.Add("@FechaVigencia", SqlDbType.Date).Value = FechaVigencia
.Add("@VigenciaIndeterminada", SqlDbType.Bit).Value = VigenciaIndeterminada
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
If Ex1.Message.Contains("IX_Inv_CveCompuestoCveProveedorFechaVigneciaCveEmpresa") Then
Alert($"Ya existe un RSCO con los datos especificados (proveedor, compuesto, Fecha de vigencia).", TipoMensaje.MsgAdvertencia)
ElseIf Ex1.Message.Contains("UNIX_Inv_RegistroRSCO") Then
Alert($"El RSCO {RegistroRSCO} ya se encuentra registrado.", TipoMensaje.MsgAdvertencia)
Else
Me.OnError("Ocurrió un error al actualizar la vigencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
Catch ex As Exception
OnError("Ocurrió un error al actualizar el RSCO.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function RemoveCompuestosVigencia(CveCompuestoVigencia As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_CompuestosVigenciaRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompuestoVigencia", SqlDbType.Int).Value = CveCompuestoVigencia
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
Me.OnError("Ocurrió un error al eliminar el RSCO.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
OnError("Ocurrió un error al eliminar el RSCO.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetCompuestosVigencia(CveCompuesto As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, VigenciaIndeterminada As Boolean, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_CompuestosVigenciaGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@VigenciaIndeterminada", SqlDbType.Int).Value = VigenciaIndeterminada
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
Me.OnError("Ocurrió un error al obtener los RSCO", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
OnError("Ocurrió un error al obtener los RSCO.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function RepCompuestosVigencia(CveCompuesto As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, VigenciaIndeterminada As Boolean, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False

View File

@@ -35,7 +35,7 @@ Public Class ClsPaginas
Public ReadOnly Property EsProduccion As Boolean
Public Shared ReadOnly Property EsProduccion As Boolean
Get
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
Return False
@@ -3899,7 +3899,7 @@ Public Class ClsPaginas
Application("GlobalDTPaqueteriaGuiaTipos") = value
End Set
End Property
Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
Public Shared Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1,
Optional PorcentajeIVA As Double = -1) As DataTable
Get
@@ -3909,15 +3909,15 @@ Public Class ClsPaginas
If CveClasicacionPorcentaje <> -1 Then Str.AppendFormat(" {0} CveClasicacionPorcentaje = {1}", If(Str.Length > 0, "AND", ""), CveClasicacionPorcentaje)
If CveClasicacion <> -1 Then Str.AppendFormat(" {0} CveClasicacion = {1}", If(Str.Length > 0, "AND", ""), CveClasicacion)
If PorcentajeIVA <> -1 Then Str.AppendFormat(" {0} PorcentajeIVA = {1}", If(Str.Length > 0, "AND", ""), PorcentajeIVA)
Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificacionPorcentaje"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTClasificacionPorcentaje"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTClasificacionPorcentaje = Dv.ToTable
Dv.Dispose()
Else
GlobalDTClasificacionPorcentaje = DirectCast(Application("GlobalDTClasificacionPorcentaje"), DataTable)
GlobalDTClasificacionPorcentaje = DirectCast(HttpContext.Current.Application("GlobalDTClasificacionPorcentaje"), DataTable)
End If
End Get
Set(value As DataTable)
Application("GlobalDTClasificacionPorcentaje") = value
HttpContext.Current.Application("GlobalDTClasificacionPorcentaje") = value
End Set
End Property
Property GlobalDTPaqueterias(CveEmpresa As Integer, Optional TipoPaqueteria As Integer = -1) As DataTable
@@ -5603,7 +5603,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
PaginaDict.Add("/Inventarios/RegRSCO.aspx".ToUpper(), 1327)
PaginaDict.Add("/Inventarios/RepRSCO.aspx".ToUpper(), 1328)

View File

@@ -416,12 +416,15 @@ Public Class ClsProductosServicios
Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0) As Integer
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_ProductosServiciosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveClasificacionCosto", SqlDbType.Int).Value = CveClasificacionCosto
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
@@ -506,6 +509,10 @@ Public Class ClsProductosServicios
.Add("@Dimensiones", SqlDbType.VarChar).Value = Dimensiones
.Add("@CveObjetoImpuesto", SqlDbType.TinyInt).Value = CveObjetoImpuesto
.Add("@RegistroRSCO", SqlDbType.VarChar).Value = RegistroRSCO
.Add("@FechaVigenciaRSCO", SqlDbType.Date).Value = FechaVigenciaRSCO
.Add("@VigenciaIndeterminadaRSCO", SqlDbType.Bit).Value = VigenciaIndeterminadaRSCO
End With
Try
@@ -653,7 +660,8 @@ Public Class ClsProductosServicios
Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False,
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0) As Boolean
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False) As Boolean
Dim Retorno As Boolean = False
@@ -745,6 +753,10 @@ Public Class ClsProductosServicios
.Add("@Dimensiones", SqlDbType.VarChar).Value = Dimensiones
.Add("@CveObjetoImpuesto", SqlDbType.TinyInt).Value = CveObjetoImpuesto
.Add("@RegistroRSCO", SqlDbType.VarChar).Value = RegistroRSCO
.Add("@FechaVigenciaRSCO", SqlDbType.Date).Value = FechaVigenciaRSCO
.Add("@VigenciaIndeterminadaRSCO", SqlDbType.Bit).Value = VigenciaIndeterminadaRSCO
End With
Try

View File

@@ -5397,7 +5397,7 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha) As Boolean
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha, Optional CveUsuarioConsulta As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesGet")
With SqlAdapter.SelectCommand.Parameters
@@ -5408,6 +5408,7 @@ Public Class ClsVentas
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -102,7 +102,7 @@ Public Class Empresa
Public Property RutaArchivos As String
Public ReadOnly Property Ruta As String
Get
If Not String.IsNullOrEmpty(RutaArchivos) Then
If Not String.IsNullOrEmpty(RutaArchivos) AndAlso ClsPaginas.EsProduccion Then
Return RutaArchivos
Else
Return String.Format("{0}\{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa)

View File

@@ -2251,13 +2251,13 @@ Namespace Modelos
For Each RowInv As DataRow In DtMovimientosEntrada.Rows
ValorInventario = DtMovimientosEntrada.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, -ValorInventario, Concepto, tCveConcepto, Concepto, tFecha, -1, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=-ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, -ValorInventario, -ValorInventario, tCveConcepto, Concepto, Concepto, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=tCveSubProyecto) Then
CveMovimiento = -1
Exit For
End If
Next
If CveMovimiento > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, -DtMovimientosEntrada.SUMD("Total").RoundSQL, Concepto, 68, Concepto, tFecha, -1, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=-DtMovimientosEntrada.SUMD("Total").RoundSQL) Then
If CveMovimiento > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, -DtMovimientosEntrada.SUMD("Total").RoundSQL, -DtMovimientosEntrada.SUMD("Total").RoundSQL, 68, Concepto, Concepto, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento) Then
CveMovimiento = -1
End If
End If

View File

@@ -1647,7 +1647,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If
End While
xtr.Close()
xtr.
End Using
If (System.IO.File.Exists(urfile)) Then
Dim fechita As DateTime = fecha.ToDateTime()

View File

@@ -686,7 +686,7 @@ Partial Class Bancos_Creditos
If TipoCreditoTemp = 2 AndAlso DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then
Folio = ObjCredito.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToString.ToEntero, 8).ToString
If Folio <> "" Then
CvePrePoliza = ObjMov.AddPrePolizas("Creditos", 2, 0, 0, 1, TxtFechaDeposito.Text.ToDate, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CvePrePoliza = ObjMov.AddPrePolizas("Creditos", 2, 0, 0, 1, TxtFechaDeposito.Text.ToDate, TxtCSReferencia.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CveIE = ObjCredito.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToString.ToEntero, 8, TxtFechaDeposito.Text.ToDate, Folio, LtBancoDeposito.Text, TxtCSTotalCredito.Text.ToString.ToDouble, 1, 1, "Credito Revolvente", "", True, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then
@@ -695,7 +695,7 @@ Partial Class Bancos_Creditos
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToString.ToDouble, "Crédito", 50, "", Now, 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToString.ToDouble) Then
' ErrorCredito = True
'End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtCSTotalCredito.Text.ToDecimal, "Crédito", 30, "", Now, 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToDecimal) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToDecimal, "Crédito", 30, "", Now, 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToDecimal) Then
ErrorCredito = True
End If
Else
@@ -715,7 +715,7 @@ Partial Class Bancos_Creditos
If CveIE < 0 Then
ErrorCredito = True
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToDecimal, "Crédito", 30, "", Now, 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToDecimal) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtCSTotalCredito.Text.ToDecimal, "Crédito", 30, "", Now, 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToDecimal) Then
ErrorCredito = True
End If

View File

@@ -183,7 +183,7 @@ Partial Class Bancos_CreditosPagoMultiple
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
Dim Total As Double = 0
Dim Total As Decimal = 0
For Each gvr As GridViewRow In GvV.Rows
If gvr.FCCheckBox("Chk").Checked Then
Total += gvr.DataKey("Total").ToDouble
@@ -205,7 +205,7 @@ Partial Class Bancos_CreditosPagoMultiple
Dim CveConceptoContable As Integer = 30
Dim CveConceptoCompra As Integer = 48
' Dim CveCreditoDetalle As Integer = -1
Dim CIF As Double = 0
Dim CIF As Decimal = 0
Dim CvePlantillaPoliza As Integer = 5
Dim TC As Double = 1.0
Dim Estatus As Integer = 2
@@ -260,8 +260,8 @@ Partial Class Bancos_CreditosPagoMultiple
ObjIE.UpdateCreditosDetalle(Estatus, CveCreditoDetalle)
Dim IVA As Double = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, gvr.DataKey("Total").ToDouble - IVA - CIF, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, Now, 0, -1, CveIE, CveProveedor:=CveProveedor, CveCreditoDetalle:=CveCreditoDetalle) Then
Dim IVA As Decimal = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, gvr.DataKey("Total").ToDecimal - IVA - CIF, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, Now, 0, -1, CveIE, CveProveedor:=CveProveedor, CveCreditoDetalle:=CveCreditoDetalle) Then
If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, TxtObservaciones.Text, 19, TxtObservaciones.Text, Now, 0, -1, CveIE, CveProveedor:=CveProveedor, CveCreditoDetalle:=CveCreditoDetalle) Then
MsgError = "Detalle"
End If

View File

@@ -354,7 +354,7 @@ Partial Class Bancos_OtrosIE
If CvePrePoliza > 0 Then
Dim Importe As Double = 0
Dim Importe As Decimal = 0
Dim TipoMovto As Boolean = False
'INSERTO LAS COMPRAS QUE VOY A PAGAR

View File

@@ -1108,7 +1108,7 @@ Partial Class Bancos_ProveedoresAbonar
ConceptoContable = 243
ElseIf gvr.DataKey("CveRetISRConcepto").ToEntero = 3 Then
funcionalidad = 348
ConceptoContable = 328
ConceptoContable = 327
End If
ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago).RoundSQL

File diff suppressed because it is too large Load Diff

View File

@@ -6,6 +6,16 @@
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAcciones">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkCerrarImportacion" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Cerrar Importación" OnClick="LnkCerrarImportacion_Click"
data-toggle="confirmation" data-popout="true" data-original-title="¿Cerrar Importación?" data-btn-ok-label="si" Visible="false" />
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Importaciones

View File

@@ -95,6 +95,11 @@ Partial Class Compras_Importaciones
'HLCompraSerieFolio.NavigateUrl = $"/Compras/Compras.aspx?CveCompra={HdnCveCompra.Value}"
'LbCompraImporte.Text = ObjImportaciones.DtResultados.Rows(0)("Total").ToString
If ObjImportaciones.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then
LnkCerrarImportacion.Visible = True
End If
HdnCveAF.Value = ObjImportaciones.DtResultados.Rows(0)("CveActivoFijo").ToString
VincularAF()
@@ -491,4 +496,17 @@ Partial Class Compras_Importaciones
Protected Sub LnkCerrarImportacion_Click(sender As Object, e As EventArgs)
Dim ObjInv As New ClsInventarios
If ObjInv.UpdateImportacionCierre(CveImportacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
Alert("Importación cerrada correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Importaciones.aspx?CveImportacion={CveImportacion}"" ")
End If
ObjInv.Dispose()
End Sub
End Class

View File

@@ -114,6 +114,17 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" style="max-width: 70px">Esatus:</div>
<div class="col-md-2">
<asp:DropDownList runat="server" ID="DdlEstatus" Width="100%" CssClass="select2me">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="0" Selected="True">Activo</asp:ListItem>
<asp:ListItem Value="1">Cerrado</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -40,9 +40,11 @@ Partial Class Compras_RepImportaciones
#Region " CARGA DAATOS "
Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim ObjImportaciones As New ClsCompras
Dim FechaI, FechaF As String
@@ -50,7 +52,7 @@ Partial Class Compras_RepImportaciones
If TxtFechaI.Text <> "" Then FechaI = TxtFechaI.Text Else FechaI = "-1"
If TxtFechaF.Text <> "" Then FechaF = TxtFechaF.Text Else FechaF = "-1"
If ObjImportaciones.GetImportaciones(-1, DdlProveedor.SelectedValue.ToString.ToEntero, -1, FechaI, FechaF, UsuarioActual.CveEmpresa) Then
If ObjImportaciones.GetImportaciones(-1, DdlProveedor.SelectedValue.ToString.ToEntero, -1, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero) Then
DtImportaciones = ObjImportaciones.DtResultados
Else
Alert("Ocurrió un error al cargar las importaciones", TipoMensaje.MsgError)
@@ -59,6 +61,7 @@ Partial Class Compras_RepImportaciones
CargaGrid()
End Sub
Private Sub CargaGrid()
GvDatos.DataSource = DtImportaciones
GvDatos.DataBind()

View File

@@ -75,7 +75,7 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas
txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}";
txtFechaF.Text = DateTime.Now.ToShortDateString();
TxtFechaICompra.Text = $"01/01/{DateTime.Now.Year}";
TxtFechaICompra.Text = MinFecha.ToShortDateString(); //'$"01/01/{DateTime.Now.Year}";
TxtFechaFCompra.Text = DateTime.Now.ToShortDateString();
//Carga Proyectos

View File

@@ -2918,6 +2918,9 @@ Partial Class Compras_eFacturas
Dim FechaPago As Date
Dim PagosCantidad As Integer = 0
Dim UUIDDuplicados As String = ""
Dim ListaUUIDDuplicados As New List(Of String)
DTGVPagosVinculacion = New DataTable
MontoPago = 0D
ComprasEnComplemento = 0
@@ -3067,6 +3070,25 @@ Partial Class Compras_eFacturas
Next
Next
Dim UUIDDuplicadosEnu = From row In DTDocumentosRelacionados.AsEnumerable()
Let IdDocumento = row.Field(Of String)("IdDocumento")
Group row By IdDocumento Into IdDocumentos = Group
Where IdDocumentos.Count() > 1
Select IdDocumentos
For Each UUIDDuplicadosRows In UUIDDuplicadosEnu
For Each row In UUIDDuplicadosRows
If Not ListaUUIDDuplicados.Contains(row.Field(Of String)("IdDocumento")) Then
UUIDDuplicados = $"{UUIDDuplicados} {If(ListaUUIDDuplicados.Count > 0, "<br>", "") } {row.Field(Of String)("IdDocumento")}"
ListaUUIDDuplicados.Add(row.Field(Of String)("IdDocumento"))
End If
Next
Next
MontoPago = Monto
Dim ObjCompraFolios As New ClsCompras
@@ -3253,7 +3275,7 @@ Partial Class Compras_eFacturas
If Math.Abs(DiferenciaImportes) > 5 Then
TextoDiferenciaImporte = $"<b>&nbsp;&nbsp;-&nbsp;&nbsp; IE ${ImporteIES.FormatoNumero}</b> <div style='color:red'><strong>Diferencia { DiferenciaImportes.FormatoNumero() }</strong></div>"
BtnVincularPago.Visible = False
MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes)})"
MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes).ToString("###,###,###.00")})"
If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then
DivVincularPagoManualmente.Visible = True
@@ -3285,9 +3307,20 @@ Partial Class Compras_eFacturas
LblDiferencia.Text = If(DiferenciaImportes <> 0 And ImporteIES > 0, DiferenciaImportes.FormatoNumero, "")
If MSGComplemento.Trim.Length > 0 And CveComplementoPagoCompra <= 0 Then
LblMensajeComlementoError.Text = MSGComplemento
DVMensajecomplementoError.Visible = True
If MSGComplemento.Trim.Length > 0 And CveComplementoPagoCompra <= 0 Or ListaUUIDDuplicados.Count > 0 And CveComplementoPagoCompra <= 0 Then
If ListaUUIDDuplicados.Count > 0 Then
LblMensajeComlementoError.Text = $"Las siguientes UUID se encuentran duplicadas:<br>{UUIDDuplicados}<br>{MSGComplemento}"
'<hr style='border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));' />
DVMensajecomplementoError.Visible = True
Else
LblMensajeComlementoError.Text = MSGComplemento
DVMensajecomplementoError.Visible = True
End If
Else
LblMensajeComlementoError.Text = ""

View File

@@ -1633,7 +1633,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If AplicaComplementaria Then
Dim Importe As Decimal = IIf(TxtCargoE.Text.ToDecimal <> 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
'valida Mon Extranjera por el TC - Mon Extranjera
Dim dif As Decimal = ((TxtME.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal) - TxtME.Text.ToDecimal).RoundSQL - Importe
Dim dif As Decimal = ((TxtME.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal).RoundSQL - TxtME.Text.ToDecimal).RoundSQL - Importe
If dif <> 0 Then
Alert("El importe moneda extranjera no coinciden con el TC ")

View File

@@ -744,9 +744,33 @@ Partial Class Inventarios_Consignaciones
If Not ErrorMovInv Then
If DdlConcepto.SelectedValue = "11" Then
Dim ImportePrePoliza As Decimal = DtMovimientos.SUMD("Total")
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
Dim Concepto As String = "Consig"
Dim CvePrePoliza = ObjConta.AddPrePolizas("Entrada/Consignacion", 53, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrePoliza, "Entrada por Consignacion", 68, "Entrada por Consignacion", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=False) Then
ErrorMovInv = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImportePrePoliza, "Entrada por Consignacion", 337, "Entrada por Consignacion", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, Contabilizable:=False) Then
ErrorMovInv = True
End If
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
ErrorMovInv = True
End If
End If
End If
@@ -879,9 +903,48 @@ Partial Class Inventarios_Consignaciones
TextoError = "Ocurrió un Error al guardar los movimientos"
Exit For
Else
MovimientosRealizados += 1
Dim ImportePrePoliza As Decimal = Gvr.DataKey("PU").ToString.ToDecimal * Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDecimal
Dim MovAlmacen As Boolean = True
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & ConceptoDevolucion).ToEntero
If OrigenMov = 1 Then
MovAlmacen = True
Else
MovAlmacen = False
End If
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
Dim Concepto As String = "Consig"
Dim CvePrePoliza = ObjConta.AddPrePolizas("Consig", 74, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, "Consig", 68, "Consig", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=False) Then
ErrorMovInv = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, "Consig", 337, "Consig", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImportePrePoliza, Contabilizable:=False) Then
ErrorMovInv = True
End If
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
ErrorMovInv = True
End If
End If
If Not ErrorMovInv Then
MovimientosRealizados += 1
End If
End If
End If
Next

View File

@@ -5,8 +5,6 @@ Imports System.Data
Imports System.IO
Imports Extensiones
'Imports DocumentFormat.OpenXml.Wordprocessing
Partial Class Inventarios_EntradasSalidas
Inherits ClsPaginas
@@ -345,9 +343,6 @@ Partial Class Inventarios_EntradasSalidas
End Select
If Request("CveMovimiento") IsNot Nothing AndAlso Request("CveMovimiento").ToString.ToEntero > 0 Then
If UsuarioActual.CveRol = 1 AndAlso UsuarioActual.CveEmpresa = 140 Then
LnkGenerarVirtual.Visible = True
End If
CargaDatos(Request("CveMovimiento").ToString.ToEntero)
'CargaGvPaqueteria()
@@ -708,6 +703,10 @@ Partial Class Inventarios_EntradasSalidas
End If
End If
If UsuarioActual.CveRol = 1 AndAlso UsuarioActual.CveEmpresa = 140 AndAlso Mov.CveMovimientoVirtual <= 0 Then
LnkGenerarVirtual.Visible = True
End If
'DATOS DE CONSIGNACION
If DtMov.Rows(0)("SerieFolio").ToString.Length > 0 Then
RowConsignacion.Visible = True
@@ -1830,9 +1829,9 @@ Partial Class Inventarios_EntradasSalidas
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
'Dim IdCuentaGasto As Integer = 0
For Each Dr As DataRow In Dt.Rows
Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion").ToString}").SUM("Total").ToDecimal.RoundSQL()
Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion")}").SUM("Total").ToDecimal.RoundSQL()
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, Total, TxtObservaciones.Text.Trim, CveConceptoContable, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=Total, CveClasificacion:=Dr("CveClasificacion").ToString.ToEntero, CveSubProyecto:=tCveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, Total, Total, CveConceptoContable, TxtFolio.Text, TxtObservaciones.Text.Trim, IdCtaContableOtro, CveMovimientoAlmacen:=CveMovimiento, CveClasificacion:=Dr("CveClasificacion").ToString.ToEntero, CveSubProyecto:=tCveSubProyecto) Then
ErrorMovInv = True
End If
Next
@@ -3774,56 +3773,63 @@ Partial Class Inventarios_EntradasSalidas
ErrorMovInv = True
End If
Else
If ObjInventario.Modulo.Contiene("TA/G1", "Recons") Then
If ObjInventario.Modulo.Contiene("M/CU") Then
Contabilizable = True
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 278, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompra, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
Else
If ObjInventario.Modulo.Contiene("TA/G1", "Recons") Then
Contabilizable = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 289, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
Else
If ObjInventario.Modulo.Contiene("Consig") Then
Contabilizable = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 95, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
Else
If ObjInventario.Modulo = "ASA/G1" Then
Contabilizable = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
Else
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
'genero las prepolizas manuales
Dim tCveConcepto As Integer = 95
Dim CveCuenta As Integer
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
IdCtaContable = 1
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
If ObjInventario.Modulo.Contiene("Consig") Then
Contabilizable = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 95, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
Else
If ObjInventario.Modulo = "ASA/G1" Then
Contabilizable = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
Else
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
Dim tCveConcepto As Integer = 69
If DdlConcepto.SelectedValue = "30" Then
tCveConcepto = 181
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
End If
For Each RowInv As DataRow In tmpCostos.Rows
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
If tCveConcepto = 69 Then
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
If DdlConcepto.SelectedValue.Contiene("6", "22", "23", "7", "16", "21", "24") Then
'genero las prepolizas manuales
Dim tCveConcepto As Integer = 95
Dim CveCuenta As Integer
If UsuarioActual.CveEmpresa = 119 Then CveCuenta = 55519
IdCtaContable = 1
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total"), Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUMD("Total"), CveSubProyecto:=-1, CveCuenta:=CveCuenta, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
Exit For
End If
Next
Else
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
Dim tCveConcepto As Integer = 69
If DdlConcepto.SelectedValue = "30" Then
tCveConcepto = 181
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(342).ToEntero
End If
For Each RowInv As DataRow In tmpCostos.Rows
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
If tCveConcepto = 69 Then
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, tCveConcepto, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
ErrorMovInv = True
Exit For
End If
Next
End If
End If
End If
End If
@@ -4548,11 +4554,11 @@ Partial Class Inventarios_EntradasSalidas
'MOVIMIENTOS
If DtMovimientosCambioVigencias.Rows.Count > 0 Then
FolioSalida = ObjInventario.GetFolioSiguiente(8, UsuarioActual.CveEmpresa)
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacen, 8, 1, Fecha, FolioSalida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, Modulo:="ES/CV1")
FolioSalida = ObjInventario.GetFolioSiguiente(47, UsuarioActual.CveEmpresa)
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacen, 47, 1, Fecha, FolioSalida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, Modulo:="ES/CV1")
FolioEntrada = ObjInventario.GetFolioSiguiente(9, UsuarioActual.CveEmpresa)
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 9, 1, Fecha, FolioEntrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ES/CV2")
FolioEntrada = ObjInventario.GetFolioSiguiente(48, UsuarioActual.CveEmpresa)
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 48, 1, Fecha, FolioEntrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObsCambioVigencia.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ES/CV2")
End If
@@ -5298,7 +5304,7 @@ Partial Class Inventarios_EntradasSalidas
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 36, 37), 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV")
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 36, 37), 1, TxtFecha.text.todate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV")
FolioVirtual = ObjInventario.Folio
For Each RowUsado As DataRow In DtPSVirtual.Rows

View File

@@ -2992,7 +2992,7 @@ Partial Class Inventarios_EntregaAlmacen
If tmpCostos.Rows.Count > 0 Then
If ObjVentas.GetVenta(CveVentaSurtir, UsuarioActual.CveEmpresa) Then
If ObjVentas.GetVenta(CveVentaSurtir, UsuarioActual.CveEmpresa, False) Then
Dim Fecha As Date = TxtFecha.Text.ToDate ' If(TipoMovimiento <> 1, TxtFecha.Text.ToDate, ObjVentas.DtResultados(0)("Fecha").ToString().ToDate)
Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString().ToEntero()
Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString()

View File

@@ -8,9 +8,24 @@
Costo Indirecto
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>
<asp:UpdatePanel runat="server" ID="UpAcciones">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkCerrarFlete" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Cerrar Costo Indirecto" OnClick="LnkCerrarFlete_Click"
data-toggle="confirmation" data-popout="true" data-original-title="¿Cerrar Costo Indirecto?" data-btn-ok-label="si" Visible="false" />
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkPdf" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>

View File

@@ -94,6 +94,11 @@ Partial Class Compras_Fletes
'HLOCFolio.NavigateUrl = If(HdnCveOC.Value.ToEntero > 0, $"/OC/OC.aspx?OC={HdnCveOC.Value}", $"/Compras/Compras.aspx?CveCompra={HdnCveCompra.Value}")
'LbOCImporte.Text = $"{ObjInv.DtResultados.Rows(0)("TotalDocumento").ToString.FormatoNumero} {ObjInv.DtResultados.Rows(0)("Moneda").ToString}"
If ObjInv.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then
LnkCerrarFlete.Visible = True
End If
If ObjInv.GetFleteDetalle(CveFlete) Then
DtCompras = ObjInv.DtResultados
Else
@@ -104,6 +109,9 @@ Partial Class Compras_Fletes
GvComprasVinculadas.DataSource = ObjInv.DtResultados
End If
Else
Alert("No se encontró el flete", TipoMensaje.MsgAdvertencia)
End If
@@ -434,4 +442,17 @@ Partial Class Compras_Fletes
End Sub
Protected Sub LnkCerrarFlete_Click(sender As Object, e As EventArgs)
Dim ObjInv As New ClsInventarios
If ObjInv.UpdateFleteCierre(CveFlete, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
Alert("Costo Indirecto cerrado correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Fletes.aspx?CveFlete={CveFlete}"" ")
End If
ObjInv.Dispose()
End Sub
End Class

View File

@@ -587,25 +587,45 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End If
End If
'Dim Concepto As String = ConceptoPoliza
'Dim CvePrePoliza = ObjConta.AddPrePolizas("RA-01", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim ImportePrePoliza As Decimal = 0D
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
ImportePrePoliza = ObjInventario.DtResultados.SUMD("Total")
End If
Dim MovAlmacen As Boolean = True
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 19).ToEntero
If OrigenMov = 1 Then
MovAlmacen = True
Else
MovAlmacen = False
End If
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
Dim Concepto As String = "ARMPAQ2"
Dim CvePrePoliza = ObjConta.AddPrePolizas("ARMPAQ1/ARMPAQ2", 74, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then
' Retorno = False
'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, "ARMPAQ2", 68, "ARMPAQ2", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=True) Then
TieneError = True
End If
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ValorInventario, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ValorInventario, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
' Retorno = False
'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, "ARMPAQ1", 68, "ARMPAQ1", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImportePrePoliza, Contabilizable:=True) Then
TieneError = True
End If
'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
' If ObjConta.ValorPolizaDescuadre > 0 Then
' GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
' Retorno = False
' End If
'End If
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
TieneError = True
End If
End If
Case 2 'DESARMADO
@@ -688,6 +708,49 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End If
End If
Dim ImportePrePoliza As Decimal = 0D
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
ImportePrePoliza = ObjInventario.DtResultados.SUMD("Total")
End If
Dim MovAlmacen As Boolean = True
Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & 4).ToEntero
If OrigenMov = 1 Then
MovAlmacen = True
Else
MovAlmacen = False
End If
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
Dim Concepto As String = "ARMPAQ2"
Dim CvePrePoliza = ObjConta.AddPrePolizas("ARMPAQ1/ARMPAQ2", 74, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ImportePrePoliza, "ARMPAQ4", 68, "ARMPAQ4", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=True) Then
TieneError = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ImportePrePoliza, "ARMPAQ3", 68, "ARMPAQ3", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImportePrePoliza, Contabilizable:=True) Then
TieneError = True
End If
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
TieneError = True
End If
End If
End Select

View File

@@ -285,8 +285,8 @@
<div class="portlet-body">
<asp:GridView ID="GVPendientes" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" DataKeyNames="CveCompra" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="200" data-freezerows="1" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Tipo" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Proveedor" DataField="RazonSocial" ItemStyle-Width="45%" />
<asp:BoundField HeaderText="Tipo" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" />
<asp:BoundField HeaderText="Proveedor" DataField="RazonSocial" />
<asp:TemplateField HeaderText="Serie-Folio">
<ItemTemplate>
<asp:Label ID="LblSerieFolio" runat="server" Text='<%# Eval("SerieFolio")%>' />
@@ -297,7 +297,7 @@
<ItemTemplate>
<asp:LinkButton Text="Surtir" ID="BtnSurtir" CommandArgument="-1" OnClick="BtnSurtir_Click" CssClass="btn btn-primary input-sm" runat="server" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="20%" />
<ItemStyle HorizontalAlign="Center" Width="100px" />
</asp:TemplateField>
</Columns>
</asp:GridView>
@@ -809,7 +809,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="Label7" runat="server" ClientIDMode="Static" Text="Ingresar producto con Serie/Lote y Fecha de Vencimiento"></asp:Label>
<asp:Label ID="Label7" runat="server" ClientIDMode="Static" Text="Ingresar producto con Serie"></asp:Label>
</h4>
</div>
<div class="modal-body">
@@ -824,12 +824,7 @@
<td >
<asp:Label Text="" ID="LbCantidad" runat="server" />
</td>
</tr>
<tr>
<td colspan="4">
<hr />
</td>
</tr>
</tr>
<tr>
<td width="80px">Serie:</td>
<td>
@@ -839,20 +834,19 @@
<asp:CustomValidator id="ReVTxtSerie" runat="server" ControlToValidate="TxtSerie" Display="None" ClientValidationFunction="TamanioSerie"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> debe tener un minimo de 6 caracteres." ValidationGroup="GrpAgregaSerie" />
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="ReVTxtSerie" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="ReVTxtSerie" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td><asp:Button Text="Agregar" CssClass="btn btn-primary" ID="BtnAgregarPS" OnClick="BtnAgregarPS_Click" ValidationGroup="GrpAgregaSerie" runat="server" /></td>
</tr>
<tr>
<td colspan="4">
<asp:GridView ID="GvSerie" runat="server" EmptyDataText="Aun no hay registros." DataKeyNames="Serie" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="250" data-freezerows="1" GridLines="None">
<asp:GridView ID="GvSerie" runat="server" EmptyDataText="Aun no hay registros." DataKeyNames="Serie" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover table-advance mysmallbtn Widthall ScrollAD " data-height="250" data-freezerows="1" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Serie-Folio" DataField="Serie" ItemStyle-Width="40%" />
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="40%" />
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
</ItemTemplate>
<ItemStyle Width="20%"></ItemStyle>
</asp:TemplateField>

View File

@@ -434,6 +434,42 @@ Partial Class Inventarios_RecepcionAlmacen
End Set
End Property
Private Property CveImportacionSeleccionada As Integer
Get
If ViewState("CveImportacionSeleccionada") Is Nothing Then
ViewState("CveImportacionSeleccionada") = -1
End If
Return ViewState("CveImportacionSeleccionada").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveImportacionSeleccionada") = value
End Set
End Property
Private Property CveFleteSeleccionado As Integer
Get
If ViewState("CveFleteSeleccionado") Is Nothing Then
ViewState("CveFleteSeleccionado") = -1
End If
Return ViewState("CveFleteSeleccionado").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveFleteSeleccionado") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -561,7 +597,7 @@ Partial Class Inventarios_RecepcionAlmacen
End Sub
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
Recargaporalmacenes()
RecargaporAlmacenes()
End Sub
Private Sub RecargaporAlmacenes()
@@ -858,7 +894,7 @@ Partial Class Inventarios_RecepcionAlmacen
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.FCLinkButton("BtnSurtir").CommandArgument = e.Row.DBCampo("CveCompra")
If e.Row.DBCampo("TipoDocto").ToString.Contiene({"Fac"}) And e.Row.DBCampo("EstatusAlmacen").ToString.ToEntero = 0 Then
If e.Row.DBCampo("TipoDocto").ToString.Contiene({"Fac"}) And e.Row.DBCampo("EstatusAlmacen").ToString = "0" Then
e.Row.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary input-sm"
e.Row.FCLinkButton("BtnSurtir").Text = "<i class='fa fa-arrow-left'></i> Recibir"
Else
@@ -867,9 +903,7 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If UsuarioActual.TienePermisoProceso(201) Then
Dim Css = "Texto"
Dim Liga = $"/Compras/Compras.aspx?&CveCompra={e.Row.DataKey("CveCompra")}"
e.Row.FCLabel("LblSerieFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblSerieFolio").Text + "</a>"
e.Row.FCLabel("LblSerieFolio").Text = String.Format("<a class='Texto' href='/Compras/Compras.aspx?CveCompra={0}'>{1} </a>", e.Row.DataKey("CveCompra"), e.Row.FCLabel("LblSerieFolio").Text)
End If
End If
@@ -921,6 +955,9 @@ Partial Class Inventarios_RecepcionAlmacen
UpDatosCompra.Update()
CveImportacionSeleccionada = -1
CveFleteSeleccionado = -1
If TxtOC.Text <> "" Then
LtDocumento.Text = "ORDEN DE COMPRA"
CargaOC()
@@ -1242,6 +1279,11 @@ Partial Class Inventarios_RecepcionAlmacen
CreaDtLoteDetalle()
CreaDTInv(ObjInventario.DtResultados)
BtnGuardar.Visible = True
If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
CveImportacionSeleccionada = DdlFolioImportacion.SelectedValue.ToEntero
End If
End If
If DtInv Is Nothing OrElse DtInv.Rows.Count = 0 Then
@@ -1298,6 +1340,10 @@ Partial Class Inventarios_RecepcionAlmacen
CreaDtLoteDetalle()
CreaDTInv(ObjInventario.DtResultados)
BtnGuardar.Visible = True
If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
CveFleteSeleccionado = DdlFletes.SelectedValue.ToEntero
End If
End If
If DtInv Is Nothing OrElse DtInv.Rows.Count = 0 Then
@@ -1712,13 +1758,12 @@ Partial Class Inventarios_RecepcionAlmacen
'RegistraScript("document.getElementById(""TxtSerie"").focus();")
RegistraScript("$('#DivSerie').modal();", "ModalLote")
GvSerie.DataSource = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
GvSerie.DataBind()
'VALIDA QUE SIGA AGREGANDO
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
BtnAgregarPS.Enabled = False
BtnAgregarPS.Enabled = True
If CerrarCompletado Then
RegistraScript("$('#DivSerie').modal('hide');")
End If
@@ -1761,9 +1806,7 @@ Partial Class Inventarios_RecepcionAlmacen
Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs)
AgregaSerie(TxtSerie.Text.Replace(" ", String.Empty), 1)
End Sub
Private Sub AgregaSerie(Serie As String, Tipo As Integer)
'SerieLote = SerieLote.Trim.Replace(" ", " ")
Private Sub AgregaSerie(Serie As String, Tipo As Integer, Optional AlertaSonido As Boolean = True, Optional CargaMasivaSeries As Boolean = False)
If Serie.Trim = "" Then
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -1774,10 +1817,6 @@ Partial Class Inventarios_RecepcionAlmacen
'VALIDACION DE SERIES DUPLICADAS
Dim MensajeAlert As New StringBuilder
Dim DtDuplicado As New DataTable
Dim DtSeriesNuevas As New DataTable
DtSeriesNuevas.Columns.Add("Serie", GetType(String))
'If CvePSS > 0 And CvePSSerie = 0 Then CvePSSerie = CvePSS
'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimero("", "PS")
@@ -1786,12 +1825,8 @@ Partial Class Inventarios_RecepcionAlmacen
DtDuplicado = DtDatosDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Serie = '{Serie}'")
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
MensajeAlert.Append($"<br/> El numero de Serie <b>""{Serie}""</b> proporcionado ya se encuentra ingresado.")
Continue For
End If
DtDuplicado = DtSeriesNuevas.FiltraParametros($"Serie = '{Serie}'")
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
MensajeAlert.Append($"<br/> El numero de Serie <b>""{Serie}""</b> proporcionado se encuentra duplicado.")
TxtSerie.Text = ""
TxtSerie.Focus()
Continue For
End If
@@ -1800,27 +1835,21 @@ Partial Class Inventarios_RecepcionAlmacen
MensajeAlert.Append($"<br/> El numero de Serie <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.")
Continue For
End If
Dim Row = DtSeriesNuevas.NewRow
Row("Serie") = Serie
DtSeriesNuevas.Rows.Add(Row)
Next
If MensajeAlert.ToString <> "" Then
Alert(MensajeAlert.ToString, TipoMensaje.MsgAdvertencia)
Alert(MensajeAlert.ToString, TipoMensaje.ToastError)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
Exit Sub
End If
Dim MensajeSinExistencias As New StringBuilder
Dim ObjInventarios As New ClsInventarios
Dim Index = 0
For Each Serie In SeriesArreglo
If Serie <> "" Then
Dim Row = DtDatosDetalle.NewRow
Index = Index + 1
@@ -1849,11 +1878,6 @@ Partial Class Inventarios_RecepcionAlmacen
End If
End If
'Dim AplicaCaducidad = False
'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
'End If
Row("ConsecId") = CveConsecSerie
Row("Consec") = DtDatosDetalle.Rows.Count + 1
Row("CvePS") = CvePSSerie
@@ -1872,15 +1896,15 @@ Partial Class Inventarios_RecepcionAlmacen
TxtSerie.Text = ""
End If
CargaSerie(Tipo, True)
If Not CargaMasivaSeries Then CargaSerie(Tipo, True)
If MensajeAlert.ToString <> "" Then
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
If AlertaSonido Then RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
Else
If MensajeSinExistencias.ToString <> "" Then
Alert($"Las siguientes Series no cuentan con la existencia suficiente por lo cual se omitieron. <br?><br/> {MensajeSinExistencias.ToString}", TipoMensaje.MsgAdvertencia)
End If
RegistraScript("playsonidito('beep-07.wav')", "SoniditoSerie")
If AlertaSonido Then RegistraScript("playsonidito('beep-07.wav')", "SoniditoSerie")
End If
@@ -3753,6 +3777,8 @@ Partial Class Inventarios_RecepcionAlmacen
ErrorMovInv = True
End Try
'FINAL
If Not ErrorMovInv Then
ObjInventario.Commit() ' aplica los movimientos insertados
@@ -4099,6 +4125,22 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If Not ErrorMovInv AndAlso CveImportacionSeleccionada > 0 Then
If Not ObjInventario.UpdateImportacionCierre(CveImportacionSeleccionada, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
ErrorMovInv = True
End If
End If
If Not ErrorMovInv AndAlso CveFleteSeleccionado > 0 Then
If Not ObjInventario.UpdateFleteCierre(CveFleteSeleccionado, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
ErrorMovInv = True
End If
End If
'FINAL
If Not ErrorMovInv Then
ObjInventario.Commit() ' aplica los movimientos insertados
@@ -4954,12 +4996,13 @@ Partial Class Inventarios_RecepcionAlmacen
If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then
NoPSConSerie = NoPSConSerie + 1
LbCantidad.Text = DtInv.FiltroPrimeroValor("Cantidad", "CvePS=" & CvePSSerie)
End If
If Valido Then
CveConsecSerie = RowPS("Consec").ToString.ToEntero
AgregaSerie(RowExcel("Serie").ToString, 1)
AgregaSerie(RowExcel("Serie").ToString, 1, False)
'AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False)
RowsCargados = RowsCargados + 1

View File

@@ -1,187 +0,0 @@
<%@ Page Title="Reg RSCO" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegRSCO.aspx.vb" Inherits="Inventarios_RegRSCO" EnableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
#DivAgregarUnidad > div.modal-dialog > div label input {
padding: 0px !important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reg RSCO
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="LnkAgregarRSCO" OnClick="LnkAgregarRSCO_Click" data-toggle="tooltip" data-placement="left" title="Agregar RSCO" Text="<i class='fa fa-plus'></i>Agregar RSCO"></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveCompuestoVigencia,CveCompuesto,CveProveedor,RegistroRSCO,FechaVigencia,VigenciaIndeterminada,CveUsuario, NombreComercial"
EmptyDataText="No se Encontraron Registros" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Proveedor" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Compuesto" DataField="Compuesto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Registro RSCO" DataField="RegistroRSCO" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha. Vigencia" ItemStyle-HorizontalAlign="Center" DataField="FechaVigencia" ItemStyle-Width="5%" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Fecha Indeterminada" DataField="VigenciaIndeterminadaStr" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
<asp:BoundField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" />
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
<ItemTemplate>
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Eitar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Eliminar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Eliminar" data-btn-ok-label="Si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<div id="DivAgregarRSCO" class="modal ADS fade" role="dialog">
<div class="modal-dialog ">
<asp:UpdatePanel runat="server" class="modal-content rowpadding" tabindex="-1" ID="UpModalRSCO" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Literal runat="server" ID="LtlTituloModal" Text="Agregar Unidad"></asp:Literal></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12" runat="server" id="DVTiposRemolque" >
<div class="form-group form-md-line-input input-iconright" >
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssClass="form-control" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
<label for="<%= DdlProveedores.ClientID.ToString()%>" style="margin-top:-6px" >Proveedor:</label>
<i></i>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" runat="server">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCompuesto" CssClass="form-control input-sm select2me " Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataValueField="CveCompuesto" DataTextField="Compuesto" Style="padding: 0px">
</asp:DropDownList>
<label for="<%= DdlCompuesto.ClientID.ToString()%>">Compuesto:</label>
<asp:RequiredFieldValidator runat="server" ID="RfvDdlCompuesto" ControlToValidate="DdlCompuesto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Compuesto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRSCO"></asp:RequiredFieldValidator>
<i></i>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRegistroRSCO" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtRegistroRSCO.ClientID.ToString()%>">Registro RSCO:</label>
<asp:RequiredFieldValidator runat="server" ID="RfvTxtRegistroRSCO" ControlToValidate="TxtRegistroRSCO" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Registro RSCO''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRSCO"></asp:RequiredFieldValidator>
<i></i>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 160px!important" runat="server" id="DvFechaVijencia">
<asp:TextBox ID="TxtFechaVigencia" CssClass="form-control" MaxLength="50" runat="server" Width="130px"></asp:TextBox>
<span class="input-group-btn " style="position: absolute; right: 41px; top: -5px;">
<asp:LinkButton ID="LnkTxtFechaVigencia" class="btn default" Style="margin-top: 15px; margin-left: 6px" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:CalendarExtender runat="server" ID="CETxtFechaVigencia" TargetControlID="TxtFechaVigencia" PopupButtonID="LnkTxtFechaVigencia" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CvTxtFechaVigencia" runat="server" ControlToValidate="TxtFechaVigencia" Display="None"
ErrorMessage="El campo <b>''Fecha de Cierre''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."
Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRSCO"></asp:CompareValidator>
<asp:RequiredFieldValidator ID="RfvTxtFechaVigencia" runat="server" ControlToValidate="TxtFechaVigencia" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Cierre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRSCO"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CvcTxtFechaVigencia" runat="server" HighlightCssClass="vco" TargetControlID="CvTxtFechaVigencia" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCETxtFechaVigencia" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaVigencia" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtFechaVigencia.ClientID.ToString() %>">Fecha de Vigencia:</label>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server">
<asp:CheckBox ID="ChkFechaIndeterminada" runat="server" CssClass="form-control" OnCheckedChanged="ChkFechaIndeterminada_CheckedChanged" AutoPostBack="true" />
<label for="<%= ChkFechaIndeterminada.ClientID.ToString()%>">Fecha Indeterminada:</label>
</div>
</div>
</div>
<div class="row" runat="server" id="DivModalContinuarAgregando">
<div class="col-md-12" style="text-align:right!important">
<asp:CheckBox ID="ChkModalContinuarAgregando" runat="server" Text="Continuar Agregando" TextAlign="Left" />
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnAgregarRSCO" Text="Agregar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" OnClick="BtnAgregarRSCO_Click" ValidationGroup="GrpRSCO" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,232 +0,0 @@
Imports Extensiones
Partial Class Inventarios_RegRSCO
Inherits ClsPaginas
Private Property CveCompuestoVigencia As Integer
Get
If ViewState("CveCompuestoVigencia") Is Nothing Then
Return -1
Else
Return ViewState("CveCompuestoVigencia").ToString().ToEntero()
End If
End Get
Set(ByVal value As Integer)
ViewState("CveCompuestoVigencia") = value
End Set
End Property
Private Sub Inventarios_RegRSCO_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaCombos()
CargaDatos()
End If
End Sub
Public Sub CargaDatos()
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetCompuestosVigencia(-1, -1, MinFecha, MaxFecha, 1, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjInventarios.DtResultados
Else
GvDatos.DataSource = Nothing
End If
ObjInventarios.Dispose()
GvDatos.DataBind()
UpDatos.Update()
End Sub
Private Sub CargaCombos()
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Seleccione Uno"
DdlProveedores.SelectedValue = "-1"
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetCompuestosActivos(UsuarioActual.CveEmpresa) Then
DdlCompuesto.DataSource = ObjPS.DtResultados
Else
DdlCompuesto.DataSource = Nothing
End If
ObjPS.Dispose()
DdlCompuesto.DataBind()
DdlCompuesto.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
UpModalRSCO.Update()
End Sub
Private Sub LimpiarModalDivAgregarRSCO()
CveCompuestoVigencia = -1
BtnAgregarRSCO.Text = "Agregar"
DdlProveedores.txtValue.Value = "-1"
DdlProveedores.txtText.Value = ""
DdlCompuesto.SelectedValueExist(-1)
TxtFechaVigencia.Text = ""
TxtRegistroRSCO.Text = ""
ChkFechaIndeterminada.Checked = False
LtlTituloModal.Text = "Agregar RSCO"
DivModalContinuarAgregando.Visible = True
ChkModalContinuarAgregando.Checked = True
UpModalRSCO.Update()
End Sub
Protected Sub LnkAgregarRSCO_Click(sender As Object, e As EventArgs)
LimpiarModalDivAgregarRSCO()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarRSCO"))
End Sub
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
BtnAgregarRSCO.Text = "Actualizar"
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
CveCompuestoVigencia = GvRow.DataKey("CveCompuestoVigencia").ToEntero()
DdlProveedores.txtValue.Value = GvRow.DataKey("CveProveedor")
DdlProveedores.txtText.Value = GvRow.DataKey("NombreComercial")
DdlCompuesto.SelectedValueExist(GvRow.DataKey("CveCompuesto"))
TxtFechaVigencia.Text = GvRow.DataKey("FechaVigencia").ToDate.ToString("dd/MM/yyyy")
TxtRegistroRSCO.Text = GvRow.DataKey("RegistroRSCO")
ChkFechaIndeterminada.Checked = Boolean.Parse(GvRow.DataKey("VigenciaIndeterminada"))
LtlTituloModal.Text = "Actualizar RSCO"
DivModalContinuarAgregando.Visible = False
ChkModalContinuarAgregando.Checked = False
If ChkFechaIndeterminada.Checked Then
DvFechaVijencia.Visible = False
TxtFechaVigencia.Text = "01/01/1900"
Else
DvFechaVijencia.Visible = True
End If
UpModalRSCO.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarRSCO"))
End Sub
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
Dim ErrorAlElimiar As Boolean = False
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
Dim CveCompuestoVigenciaEliminar = GvRow.DataKey("CveCompuestoVigencia").ToEntero()
Using ObjInventarios As New ClsInventarios
If (ObjInventarios.RemoveCompuestosVigencia(CveCompuestoVigenciaEliminar, UsuarioActual.CveEmpresa)) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarRSCO"))
Alert("RSCO Eliminado Correctamente.")
Else
ErrorAlElimiar = True
End If
End Using
If Not ErrorAlElimiar Then
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
CargaDatos()
End If
End Sub
Protected Sub BtnAgregarRSCO_Click(sender As Object, e As EventArgs)
Dim ErrorPrceso As Boolean = False
If DdlProveedores.SelectedValue.ToEntero <= 0 Then
Alert("Debe de seleccionar un proveedor.")
Exit Sub
End If
Using ObjInventarios As New ClsInventarios
If CveCompuestoVigencia <= 0 Then
If ObjInventarios.AddCompuestosVigencia(DdlCompuesto.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero, TxtRegistroRSCO.Text, TxtFechaVigencia.Text.ToDate, ChkFechaIndeterminada.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Alert("RSCO agregado correctamente")
Else
ErrorPrceso = True
End If
Else
If ObjInventarios.UpdateCompuestosVigencia(CveCompuestoVigencia, DdlCompuesto.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero, TxtRegistroRSCO.Text, TxtFechaVigencia.Text.ToDate, ChkFechaIndeterminada.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Alert("RSCO actualizado correctamente")
Else
ErrorPrceso = True
End If
End If
End Using
If Not ErrorPrceso Then
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
CargaDatos()
If Not ChkModalContinuarAgregando.Checked Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarRSCO"))
Else
LimpiarModalDivAgregarRSCO()
End If
UpDatos.Update()
End If
End Sub
Protected Sub ChkFechaIndeterminada_CheckedChanged(sender As Object, e As EventArgs)
If ChkFechaIndeterminada.Checked Then
DvFechaVijencia.Visible = False
TxtFechaVigencia.Text = "01/01/1900"
Else
DvFechaVijencia.Visible = True
TxtFechaVigencia.Text = ""
End If
UpModalRSCO.Update()
End Sub
End Class

View File

@@ -40,6 +40,7 @@
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
@@ -91,9 +92,31 @@
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: block">
<div class="row">
<div class="col-md-1" style="max-width: 70px">Esatus:</div>
<div class="col-md-2">
<asp:DropDownList runat="server" ID="DdlEstatus" Width="100%" CssClass="select2me">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="0" Selected="True">Activo</asp:ListItem>
<asp:ListItem Value="1">Cerrado</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />

View File

@@ -49,7 +49,7 @@ Partial Class Compras_RepFletes
Dim ObjInv As New ClsInventarios
If TxtFolio.Text <> "" Then TxtFechaI.Text = MinFecha.ToShortDateString : TxtFechaF.Text = MaxFecha.ToShortDateString
If ObjInv.GetFletesRep(UsuarioActual.CveEmpresa, -1, If(TxtFolio.Text = "", "-1", TxtFolio.Text), DdlProveedores.SelectedValue.ToString.ToEntero, -1, -1,
TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero()) Then
TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero(), CveEstatus:=DdlEstatus.SelectedValue.ToEntero()) Then
DtFletes = ObjInv.DtResultados
End If
ObjInv.Dispose()

View File

@@ -118,7 +118,7 @@
<ajax:CalendarExtender ID="CalFechaIEjec" runat="server" TargetControlID="TxtFechaInicio" PopupButtonID="ImgCalFechaIEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="col-md-1" style="text-align:right">
<label>. Fin:</label>
<label>F. Fin:</label>
</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;display:flex">
@@ -139,10 +139,10 @@
<div class="col-sm-1" style="text-align:right">
<label>Sucursal:</label>
</div>
<div class="col-sm-1">
<div class="col-sm-2">
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AutoPostBack="true" OnSelectedIndexChanged="DdlSucursal_SelectedIndexChanged" Width="100%"></asp:DropDownList>
</div>
<label class="col-md-1 truncate" >Almacén:</label>
<label class="col-md-1 truncate" style="text-align:right">Almacén:</label>
<div class="col-md-1">
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
@@ -152,13 +152,21 @@
</div>
<div class="col-md-1">
<asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" CssStyle="width: 100%;"/>
</div>
<label class="col-md-1 truncate">Producto:</label>
</div>
<label class="col-md-1 truncate" style="text-align:right" >Compuesto:</label>
<div class="col-md-2">
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" />
<asp:DropDownList runat="server" ID="DdlCompuesto" CssClass="select2me" DataTextField="Compuesto" DataValueField="CveCompuesto" Width="100%" ></asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-1 truncate" style="text-align:right">Producto:</label>
<div class="col-md-2">
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" />
</div>
</div>
</div>
</div>
</ContentTemplate>

View File

@@ -29,10 +29,13 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
CargaFiltros();
CargarDatos();
CargaAlamacenes();
CargaCompuestos();
}
}
private void CargarDatos()
{
@@ -47,8 +50,9 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
// aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad
ClsInventarios ObjInventarios = new ClsInventarios();
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(), FI, TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
DdlClasificacion.SelectedValue.ToEntero(), CvePS, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion: DdlOpcion.SelectedValue.ToEntero()))
{
DdlClasificacion.SelectedValue.ToEntero(), CvePS, Cves_Alamcenes, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion: DdlOpcion.SelectedValue.ToEntero(),
CveCompuesto: DdlCompuesto.SelectedValue.ToEntero() ))
{
GvDatos.DataSource = ObjInventarios.DtResultados;
DTDatos = ObjInventarios.DtResultados;
if (DdlOpcion.SelectedValue == "1")
@@ -75,6 +79,16 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
}
private void CargaCompuestos()
{
ClsProductosServicios ObjPS = new ClsProductosServicios();
ObjPS.GetCompuestosActivos(UsuarioActual.CveEmpresa);
DdlCompuesto.DataSource = ObjPS.DtResultados;
ObjPS.Dispose();
DdlCompuesto.DataBind();
DdlCompuesto.Items.Insert(0, new ListItem("Todos", "-1"));
}
private void CargarFechaText()
{
DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);

View File

@@ -115,26 +115,20 @@
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveCompuestoVigencia,CveCompuesto,CveProveedor,RegistroRSCO,FechaVigencia,VigenciaIndeterminada,CveUsuario"
DataKeyNames="CvePS,CveCompuesto,CveProveedorCompra,RegistroRSCO,FechaVigenciaRSCOStr,VigenciaIndeterminadaRSCO,CveUsuario"
EmptyDataText="No se Encontraron Registros" ToolTip="Listado de Unidades" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Proveedor" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Compuesto" DataField="Compuesto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Registro RSCO" DataField="RegistroRSCO" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha. Vigencia" ItemStyle-HorizontalAlign="Center" DataField="FechaVigencia" ItemStyle-Width="5%" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Fecha Indeterminada" DataField="VigenciaIndeterminadaStr" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha. Vigencia" ItemStyle-HorizontalAlign="Center" DataField="FechaVigenciaRSCOStr" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
<asp:BoundField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" DataField="FechaIng" ItemStyle-Width="5%" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" DataField="Fecha" ItemStyle-Width="5%" DataFormatString="{0:d}" />
<%-- <asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
<ItemTemplate>
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Eitar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Eliminar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Eliminar" data-btn-ok-label="Si" />
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</ContentTemplate>

View File

@@ -2987,8 +2987,8 @@ Partial Class Sistemas_UsuarioDetalle
#Region "TAB - ACCESO MODULOS"
Public Sub CargaModulosAcceso()
Dim ObjPermisos As New ClsSisUsuarios
If ObjPermisos.GetUsuariosModulos(CveUsuario, UsuarioActual.CveEmpresa, If(UsuarioControlado, UsuarioActual.CveUsuario, -1), CvePlataforma:=1) Then
DTModulos = ObjPermisos.DtResultados.FiltraParametros("Liga <> '' ")
If ObjPermisos.GetUsuariosModulos(CveUsuario, UsuarioActual.CveEmpresa, If(UsuarioControlado, UsuarioActual.CveUsuario, -1)) Then
DTModulos = ObjPermisos.DtResultados.FiltraParametros("Liga <> '' AND CvePlataforma IN (1,4) ")
Else
DTModulos = Nothing
End If

View File

@@ -77,7 +77,7 @@ Partial Class Ventas_CatAutorizacionLimites
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha)
Dim ObjGral As New ClsVentas
If ObjGral.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedorFiltro.SelectedValue.ToEntero(), "-1", CveEstatus:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF) Then
If ObjGral.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedorFiltro.SelectedValue.ToEntero(), "-1", CveEstatus:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
GvDatos.DataSource = ObjGral.DtResultados
End If
ObjGral.Dispose()

View File

@@ -4502,7 +4502,7 @@
<asp:TemplateField HeaderText="Cargo" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="ChkCargo" runat="server"></asp:CheckBox>
<asp:CheckBox ID="ChkCargo" runat="server" Visible="false" Checked="false"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Bonificación" ItemStyle-HorizontalAlign="Center">

View File

@@ -9219,13 +9219,13 @@ Partial Class Clientes
Dim FacturadoCargo As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoCargo"))
Dim FacturadoBonificacion As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoBonificacion"))
If FacturadoCargo Then
e.Row.FCCheckBox("ChkCargo").Checked = False
e.Row.FCCheckBox("ChkCargo").Visible = False
Else
e.Row.FCCheckBox("ChkCargo").Checked = False
e.Row.FCCheckBox("ChkCargo").Visible = False 'True
End If
'If FacturadoCargo Then
' e.Row.FCCheckBox("ChkCargo").Checked = False
' e.Row.FCCheckBox("ChkCargo").Visible = False
'Else
' e.Row.FCCheckBox("ChkCargo").Checked = False
' e.Row.FCCheckBox("ChkCargo").Visible = False 'True
'End If
If FacturadoBonificacion Then
e.Row.FCCheckBox("ChkBonificacion").Checked = False
@@ -9240,6 +9240,10 @@ Partial Class Clientes
ElseIf e.Row.DBCampo("EsUsadoAjuste") = "1" Then
e.Row.FCCheckBox("ChkBonificacion").Visible = False
End If
If e.Row.DBCampo("ImporteBonificacion").ToDecimal() = 0 Then
e.Row.FCCheckBox("ChkBonificacion").Visible = False
End If
End If
Else
@@ -10231,9 +10235,19 @@ Partial Class Clientes
TxtNombreComercial.Enabled = True
End If
' DdlRegimenFiscal.SelectedIndex = -1
DdlRegimenFiscal.Items.Clear()
DdlRegimenFiscal.SelectedValue = Nothing
DdlRegimenFiscal.DataSource = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
Dim dt As DataTable = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
'verifico que sino existe el valor. lo limpie
Dim Val As String = dt.FiltroPrimeroValor("CveRegimenFiscal", "CveRegimenFiscal = " & DdlRegimenFiscal.SelectedValue)
If Val = "" Then 'sino encuentra valor, lo limpia
DdlRegimenFiscal.Items.Clear()
DdlRegimenFiscal.SelectedValue = Nothing
End If
End If
DdlRegimenFiscal.DataSource = dt
DdlRegimenFiscal.DataBind()
UpDatos.Update()

View File

@@ -210,7 +210,7 @@
Real<br/>Acum.
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblRealAcumulado" runat="server" Target="_blank" Text='<%# Eval("RealAcumulado", "{0:#,###}").ToString() %>'> </asp:Label>
<asp:Label ID="lblRealAcumulado" runat="server" Target="_blank" Text='<%# Eval("RealAcumulado", "{0:#,###.##}").ToString() %>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">

View File

@@ -250,19 +250,98 @@
<i></i>
</div>
<div runat="server" id="DivCompuesto" class="form-group form-md-line-input input-iconright" visible="false">
<asp:DropDownList ID="DdlCompuesto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="Compuesto" DataValueField="CveCompuesto" Width="206px" Height="22px">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlCompuesto.ClientID.ToString()%>">Compuesto:</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-3">
<asp:TextBox ID="TxtVentaMinima" CssClass="form-control " runat="server"></asp:TextBox>
<%--<ajax:FilteredTextBoxExtender ID="FTBETVentaMinima" TargetControlID="TxtVentaMinima" FilterType="Numbers" runat="server" ValidChars=".," />--%>
<label class="truncate" style="padding-left: 16px;" for="<%= TxtVentaMinima.ClientID.ToString()%>">Venta Mínima:</label>
<i></i>
</div>
<div class="row">
<div class=" col-md-12">
<div runat="server" id="DivCompuesto" class="form-group form-md-line-input input-iconright" visible="false">
<asp:DropDownList ID="DdlCompuesto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="Compuesto" DataValueField="CveCompuesto" Width="206px" Height="22px">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlCompuesto.ClientID.ToString()%>">Compuesto:</label>
<i></i>
</div>
</div>
</div>
<br />
<div class="row">
<div class=" col-md-4">
<div runat="server" id="DivRegistroRSCO1" class="form-group form-md-line-input input-iconright" visible="false" style="width:100%!important">
<asp:TextBox ID="TxtRegistroRSCO" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtRegistroRSCO.ClientID.ToString()%>">Registro RSCO:</label>
<%--<asp:RequiredFieldValidator runat="server" ID="RfvTxtRegistroRSCO" ControlToValidate="TxtRegistroRSCO" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Registro RSCO''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<i></i>
</div>
</div>
<div class=" col-md-4" runat="server" id="DivRegistroRSCO2" visible="false">
<div class="form-group form-md-line-input input-iconright" runat="server" style="width: 200px">
<asp:CheckBox ID="ChkFechaIndeterminadaRSCO" runat="server" CssClass="form-control" OnCheckedChanged="ChkFechaIndeterminadaRSCO_CheckedChanged" AutoPostBack="true" />
<label for="<%= ChkFechaIndeterminadaRSCO.ClientID.ToString()%>">Fecha Indeterminada:</label>
</div>
</div>
<div class=" col-md-4">
<div class="form-group form-md-line-input input-iconright" style="width: 160px!important" runat="server" id="DivRegistroRSCO3" visible="false">
<asp:TextBox ID="TxtFechaVigenciaRSCO" CssClass="form-control" MaxLength="50" runat="server" Width="130px"></asp:TextBox>
<span class="input-group-btn " style="position: absolute; right: 41px; top: -5px;">
<asp:LinkButton ID="LnkTxtFechaVigenciaRSCO" class="btn default" Style="margin-top: 15px; margin-left: 6px" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:CalendarExtender runat="server" ID="CETxtFechaVigenciaRSCO" TargetControlID="TxtFechaVigenciaRSCO" PopupButtonID="LnkTxtFechaVigenciaRSCO" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CvTxtFechaVigenciaRSCO" runat="server" ControlToValidate="TxtFechaVigenciaRSCO" Display="None"
ErrorMessage="El campo <b>''Fecha de Cierre''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."
Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<%--<asp:RequiredFieldValidator ID="RfvTxtFechaVigenciaRSCO" runat="server" ControlToValidate="TxtFechaVigenciaRSCO" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Cierre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<ajax:ValidatorCalloutExtender ID="CvcTxtFechaVigenciaRSCO" runat="server" HighlightCssClass="vco" TargetControlID="CvTxtFechaVigenciaRSCO" Width="300px"></ajax:ValidatorCalloutExtender>
<%--<ajax:ValidatorCalloutExtender ID="VCETxtFechaVigenciaRSCO" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaVigenciaRSCO" Width="300px"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtFechaVigenciaRSCO.ClientID.ToString() %>">Fecha de Vigencia:</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divLitraje" visible="false" runat="server">
<asp:TextBox ID="TxtLitraje" CssClass="form-control " runat="server" ></asp:TextBox>
<%--<ajax:FilteredTextBoxExtender ID="FTBETVentaMinima" TargetControlID="TxtVentaMinima" FilterType="Numbers" runat="server" ValidChars=".," />--%>

View File

@@ -220,6 +220,18 @@ Partial Class ProductosyServicios
End If
End If
If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then
DivRegistroRSCO1.Visible = True
DivRegistroRSCO2.Visible = True
DivRegistroRSCO3.Visible = True
TxtRegistroRSCO.Text = ""
TxtFechaVigenciaRSCO.Text = ""
ChkFechaIndeterminadaRSCO.Checked = False
End If
End If
If Request("Ret") IsNot Nothing AndAlso Request("Ret").ToString <> "" Then
@@ -352,7 +364,7 @@ Partial Class ProductosyServicios
DivObjetoImpuesto.Visible = True
DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos
DdlObjetoImpuesto.DataBind()
DdlObjetoImpuesto.SelectedValue = "02" 'se sugiere este valor, que sería el más utilizado
DdlObjetoImpuesto.SelectedValue = "2" 'se sugiere este valor, que sería el más utilizado
End If
CreaDtSeccionAlmacen()
@@ -1000,6 +1012,35 @@ Partial Class ProductosyServicios
ChkPrecioLibre.Checked = ObjProductosServicios.PrecioLibre
If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then
TxtRegistroRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("RegistroRSCO").ToString
ChkFechaIndeterminadaRSCO.Checked = Boolean.Parse(ObjProductosServicios.DtResultados.Rows(0)("VigenciaIndeterminadaRSCO").ToString)
DivRegistroRSCO1.Visible = True
DivRegistroRSCO2.Visible = True
If ChkFechaIndeterminadaRSCO.Checked Then
TxtFechaVigenciaRSCO.Text = "01/01/1900"
Else
TxtFechaVigenciaRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("FechaVigenciaRSCO").ToString.ToDate.ToString("dd/MM/yyyy")
DivRegistroRSCO3.Visible = True
End If
Else
TxtRegistroRSCO.Text = ""
TxtFechaVigenciaRSCO.Text = ""
ChkFechaIndeterminadaRSCO.Checked = False
End If
Else
Alert("El Producto o Servicio Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
@@ -1365,6 +1406,11 @@ Partial Class ProductosyServicios
End If
End If
If TxtFechaVigenciaRSCO.Text = "" Then
TxtFechaVigenciaRSCO.Text = "01/01/1900"
End If
If CvePS = -1 Then
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
@@ -1380,8 +1426,8 @@ Partial Class ProductosyServicios
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal) > 0 Then
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) > 0 Then
ViewState("CvePS") = ObjProductosServicios.CvePS
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
If GVR.FCCheckBox("ChkDeduccion").Checked Then
@@ -1432,7 +1478,8 @@ Partial Class ProductosyServicios
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal) Then
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal,
RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) Then
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
TieneError = True
@@ -1900,6 +1947,10 @@ Partial Class ProductosyServicios
DdlCompuesto.DataSource = PS.DtResultados
PS.Dispose()
DdlCompuesto.DataBind()
End If
End Sub
@@ -3183,5 +3234,16 @@ Partial Class ProductosyServicios
End Sub
Protected Sub ChkFechaIndeterminadaRSCO_CheckedChanged(sender As Object, e As EventArgs)
DivRegistroRSCO3.Visible = If(ChkFechaIndeterminadaRSCO.Checked, False, True)
If TxtFechaVigenciaRSCO.Text = "01/01/1900" Then
TxtFechaVigenciaRSCO.Text = ""
End If
UpDatos.Update()
End Sub
End Class

View File

@@ -398,9 +398,9 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
{
string Info = "";
StringBuilder SBJSScript = new StringBuilder();
if (DTDatos.Rows.Count > 0)
{
{
foreach (DataRow DbRow in DTDatos.Rows)
{
string moneda = DbRow["Moneda"].ToString();

File diff suppressed because it is too large Load Diff