Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1588,6 +1588,58 @@ Public Class ClsInventarios
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetExistenciasCaducidad(CvePS As Integer, CveAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveAlmacenes As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ExistenciaCaducidadGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveAlmacen", SqlDbType.VarChar).Value = CveAlmacen
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
Me.OnError("Ocurrió un error al obtener el kardex de almacen.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el kardex de almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ProductosCaducidadGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el listo de caducidad de productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " INVENTARIOS - REPORTES "
|
||||
|
||||
@@ -38,14 +38,14 @@ Public Class ClsPaginas
|
||||
|
||||
|
||||
|
||||
Public ReadOnly Property EsProduccion As Boolean
|
||||
Get
|
||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||
Return False
|
||||
Else
|
||||
Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1")
|
||||
End If
|
||||
End Get
|
||||
Public ReadOnly Property EsProduccion As Boolean
|
||||
Get
|
||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||
Return False
|
||||
Else
|
||||
Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1")
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -3783,6 +3783,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contratos/Contrato2.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Flotillas/CatMantenimientos.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Inventarios/PaqueteDetalles.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Inventarios/RepProductosPorCaducar.aspx".ToUpper(), 693)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ Public Class ClsProductosServicios
|
||||
Public Property CveMetodoInventario As Integer
|
||||
Public Property CveTipoPS As Integer
|
||||
Public Property Estado2 As Integer
|
||||
Public Property CveMarca As Integer
|
||||
|
||||
Public Property CveMarca As Integer
|
||||
|
||||
Public Property IEPSPorcentaje As Double
|
||||
|
||||
Public Property AplicaIEPS As Boolean
|
||||
@@ -202,11 +202,11 @@ Public Class ClsProductosServicios
|
||||
CveConexion = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1",
|
||||
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||
Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1,
|
||||
Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1",
|
||||
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||
Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1,
|
||||
Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1685,10 +1685,10 @@ Public Class ClsProductosServicios
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "Precios Lista"
|
||||
Public Function GetPSPreciosLista(CveEmpresa As Integer, CvePrecioLista As Integer, Optional CveClasificacion As Integer = -1, Optional CvePS As Integer = -1,
|
||||
Optional CveProveedor As Integer = -1, Optional Estado As Integer = -1, Optional Marcas As String = "-1", Optional CveModelo As Integer = -1) As Boolean
|
||||
@@ -1846,7 +1846,7 @@ Public Class ClsProductosServicios
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
Public Function GetPSExistenciasWS(CvePS As Integer, CvePrecioLista As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
|
||||
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||
Optional FechaMovto As String = "-1", Optional Serie As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||
@@ -1855,38 +1855,38 @@ Public Class ClsProductosServicios
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProductosExistenciasWSGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||
.Add("@Batch", SqlDbType.VarChar).Value = Batch
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
||||
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
||||
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
||||
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
||||
End With
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||
.Add("@Batch", SqlDbType.VarChar).Value = Batch
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
||||
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
||||
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
||||
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las productos y sus existencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Porcentaje Productos"
|
||||
Public Function GetPorcentajeProductos(CveCliente As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -462,7 +462,7 @@ Public Class ClsVentas
|
||||
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
|
||||
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
|
||||
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
|
||||
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0) As Boolean
|
||||
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUpdate")
|
||||
|
||||
@@ -493,6 +493,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
|
||||
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
|
||||
.Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -3258,7 +3258,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
'Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
End If
|
||||
|
||||
|
||||
@@ -1248,10 +1248,10 @@ Partial Class PopUpVerFactura
|
||||
Dim PuestoEnrego As String = ObjInventarios.PuestoEntrego
|
||||
Dim ResponsableCarga As String = ObjInventarios.ResponsableCarga
|
||||
Dim ResponsableRecibio As String = ObjInventarios.ResponsableRecibio
|
||||
Dim UsuarioCapturo As String = ObjInventarios.DtResultados.FiltroPrimeroValor("UsuarioCapturo")
|
||||
|
||||
If Recibio.Trim = "" Then
|
||||
Dim ObjRH As New ClsRH
|
||||
|
||||
If ObjRH.GetPersonal(ObjInventarios.CvePersonal, UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
|
||||
Recibio = ObjRH.DtResultados.Rows(0)("NombreCompleto").ToString
|
||||
End If
|
||||
@@ -1276,7 +1276,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
Dim CveMovimientoRelacionado As Integer = -1
|
||||
Dim FolioRelacionado As String = ""
|
||||
Dim CveConceptoMovtoRelacionado As Integer = -1
|
||||
Dim CveConceptoMovtoRelacionado As Integer = -1
|
||||
|
||||
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacen}").ToString.ToEntero
|
||||
|
||||
'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
@@ -1285,6 +1287,9 @@ Partial Class PopUpVerFactura
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual")
|
||||
CveConceptoMovtoRelacionado = 37
|
||||
ElseIf CveConcepto.Contiene(36, 37) Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
||||
CveConceptoMovtoRelacionado = 3
|
||||
ElseIf CveConcepto.Contiene(2) AndAlso CveTipoAlmacen.Contiene(24, 25) Then
|
||||
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
|
||||
CveConceptoMovtoRelacionado = 3
|
||||
End If
|
||||
@@ -1316,7 +1321,7 @@ Partial Class PopUpVerFactura
|
||||
Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero
|
||||
|
||||
'SI TIENE RELACIONADO UN MOVIMIENTO VIRTUAL DEBE AGREGAR ESTE MOVIMIENTO A LA IMPRESION
|
||||
If CveTipoAlmacenRelacionado = 24 Then
|
||||
If CveTipoAlmacenRelacionado.Contiene(24, 25) Then
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
|
||||
Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy()
|
||||
CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal()
|
||||
@@ -1342,7 +1347,28 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacen}").ToString.ToEntero
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso CveCompra > 0 Then
|
||||
If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0")
|
||||
If DtFaltante.Rows.Count > 0 Then
|
||||
Dim SbPendientes As New StringBuilder
|
||||
SbPendientes.AppendFormat("Los siguientes productos quedaron pendientes por recibir:")
|
||||
For Each Row As DataRow In DtFaltante.Rows
|
||||
SbPendientes.AppendFormat(" PS:{0} Cant.:{1:N0},", Row("CodigoPS"), Row("CantidadF"))
|
||||
Next
|
||||
SbPendientes.Remove(SbPendientes.Length - 1, 1)
|
||||
|
||||
SbPendientes.AppendFormat(" Total Cant.:{0:N0}, Total Costo:{1:N2}", DtFaltante.SUM("CantidadF"), DtFaltante.SUM("Total"))
|
||||
|
||||
If Not String.IsNullOrEmpty(Observaciones) Then
|
||||
Observaciones = SbPendientes.ToString() + ".<br/>" + Observaciones
|
||||
Else
|
||||
Observaciones = SbPendientes.ToString()
|
||||
End If
|
||||
End If
|
||||
DtFaltante.Dispose()
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveTipoAlmacen = 20 Then
|
||||
CveConcepto = 24
|
||||
@@ -1359,7 +1385,7 @@ Partial Class PopUpVerFactura
|
||||
MunicipioDestino, EstadoDestino, PaisDestino, CPDestino, FechaMovimiento, NombreCapturo, PuestoRecibio,
|
||||
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
|
||||
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego,
|
||||
CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado)
|
||||
CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado, UsuarioRegistro:=UsuarioCapturo)
|
||||
|
||||
End Sub
|
||||
Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera
|
||||
@@ -1377,7 +1403,7 @@ Partial Class PopUpVerFactura
|
||||
EstadoOrigen As String, PaisOrigen As String, CPOrigen As String, CalleDestino As String, NoExtDestino As String, ColoniaDestino As String, LocalidadDestino As String, MunicipioDestino As String,
|
||||
EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
|
||||
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0,
|
||||
Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "")
|
||||
Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "", Optional UsuarioRegistro As String = "")
|
||||
|
||||
|
||||
Select Case CveConcepto
|
||||
@@ -1527,6 +1553,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
|
||||
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
|
||||
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
@@ -1762,7 +1789,8 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("NombreRecibio", Recibio))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
|
||||
params.Add(New ReportParameter("UsuarioRegistro", UsuarioRegistro))
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
Else
|
||||
@@ -2550,19 +2578,19 @@ Partial Class PopUpVerFactura
|
||||
If (UsuarioActual.CveEmpresa = 72) Then
|
||||
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
End If
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'Else
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
' params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'End If
|
||||
|
||||
|
||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'Else
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("SubProyecto", SubProyecto))
|
||||
' params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||
' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
'End If
|
||||
|
||||
|
||||
Case 18 'D E V O L U C I O N D E L C L I E N T E
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DevolucionCliente.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -2739,36 +2767,36 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
ElseIf CveConcepto = 22 Then
|
||||
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
'Case 22 'ENTRADA POR PRESTAMO
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
|
||||
' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Descuentos", ""))
|
||||
' params.Add(New ReportParameter("IVA", ""))
|
||||
' params.Add(New ReportParameter("Total", ""))
|
||||
' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
' If (UsuarioActual.CveEmpresa = 72) Then
|
||||
' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
End If
|
||||
|
||||
'Case 22 'ENTRADA POR PRESTAMO
|
||||
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
' Dim params As New List(Of ReportParameter)
|
||||
|
||||
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", logouri))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
|
||||
' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
|
||||
' params.Add(New ReportParameter("Almacen", Almacen))
|
||||
' params.Add(New ReportParameter("Fecha", Fecha))
|
||||
' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
' params.Add(New ReportParameter("Folio", Folio))
|
||||
' params.Add(New ReportParameter("Descuentos", ""))
|
||||
' params.Add(New ReportParameter("IVA", ""))
|
||||
' params.Add(New ReportParameter("Total", ""))
|
||||
' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
' params.Add(New ReportParameter("FacturadoA", NombreCliente))
|
||||
' If (UsuarioActual.CveEmpresa = 72) Then
|
||||
' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||
|
||||
Case 24 'SALIDA POR RESGUARDO
|
||||
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -3251,11 +3279,11 @@ Partial Class PopUpVerFactura
|
||||
If CveConcepto = 2 Then
|
||||
ElseIf CveConcepto = 3 Then
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = 'OC' - IMPRIME PDF OC"
|
||||
Private Sub ImprimePDFOC(CveOrdenCompra As Integer)
|
||||
Dim reporte As Byte() = NewGeneraBytesOC(CveOrdenCompra, ConBitacora:=(UsuarioActual.Empresa.Funcionalidad(119) = "1"))
|
||||
@@ -3848,7 +3876,7 @@ Partial Class PopUpVerFactura
|
||||
Dr("Abono") = 0
|
||||
DtMovimientosPoliza.Rows.Add(Dr)
|
||||
End If
|
||||
ElseIf UsuarioActual.CveEmpresa = 119 Then
|
||||
ElseIf UsuarioActual.CveEmpresa.Contiene(119, 141) Then
|
||||
Dim PreP As New ClsContabilidad
|
||||
If PreP.GetPrePolizasDetalle(-1, CveIE) Then
|
||||
DtMovimientosPoliza = New DataTable
|
||||
@@ -3861,8 +3889,8 @@ Partial Class PopUpVerFactura
|
||||
|
||||
For Each drt As DataRow In PreP.DtResultados.Rows
|
||||
Dim Dr = DtMovimientosPoliza.NewRow
|
||||
Dr("CODIGO") = drt("ContpaqCodigo")
|
||||
Dr("Cuenta") = drt("ContpaqCuenta")
|
||||
Dr("CODIGO") = drt("CuentaCodigo")
|
||||
Dr("Cuenta") = drt("CuentaNombre")
|
||||
Dr("Cargo") = If(drt("TipoMovto").ToString = "False", drt("ImporteMN"), "0")
|
||||
Dr("Abono") = If(drt("TipoMovto").ToString = "True", drt("ImporteMN"), "0")
|
||||
DtMovimientosPoliza.Rows.Add(Dr)
|
||||
|
||||
@@ -1187,6 +1187,77 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox13">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Usuario Registró:</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Top>1.62251cm</Top>
|
||||
<Left>0.79137cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.90426cm</Width>
|
||||
<ZIndex>6</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox38">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!UsuarioRegistro.Value</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox33</rd:DefaultName>
|
||||
<Top>1.62251cm</Top>
|
||||
<Left>3.69563cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>5.93606cm</Width>
|
||||
<ZIndex>7</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1387,6 +1458,12 @@
|
||||
<Nullable>true</Nullable>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="UsuarioRegistro">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>e6b08487-acfe-4020-a8f2-f9a54953646f</rd:ReportID>
|
||||
|
||||
@@ -3661,6 +3661,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
GvEntradas.Columns(4).Visible = DtTemp.MAX("Serie") <> ""
|
||||
GvEntradas.Columns(5).Visible = DtTemp.MAX("Lote") <> ""
|
||||
GvEntradas.Columns(6).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
GvEntradas.Columns(6).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -3773,6 +3774,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
GvSalidas.Columns(3).Visible = DtTemp.MAX("Serie") <> ""
|
||||
GvSalidas.Columns(4).Visible = DtTemp.MAX("Lote") <> ""
|
||||
GvSalidas.Columns(5).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
GvSalidas.Columns(5).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -4049,6 +4051,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
'activa caducidad
|
||||
ThCaducidadEntrada.Visible = AplicaCaducidad
|
||||
ThCaducidadEntrada.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
TrCaducidadEntrada.Visible = AplicaCaducidad
|
||||
|
||||
Else
|
||||
@@ -4082,6 +4085,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
'activa caducidad
|
||||
ThCaducidadSalida.Visible = AplicaCaducidad
|
||||
ThCaducidadSalida.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
TrCaducidadSalida.Visible = AplicaCaducidad
|
||||
|
||||
Else
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Entregas solo a:</span>
|
||||
<span class="caption-subject bold uppercase">PERSONAL AUTORIZADO PARA ENTREGAS EN ALMACÉN:</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
@@ -838,6 +838,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If AplicaSeccion Then GvDatos.Columns(7).Visible = True
|
||||
If AplicaLote Then GvDatos.Columns(8).Visible = True
|
||||
If AplicaCaducidad Then GvDatos.Columns(9).Visible = True
|
||||
GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
|
||||
End If
|
||||
GvDatos.DataSource = DtDatos
|
||||
@@ -1026,6 +1027,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
|
||||
End If
|
||||
|
||||
GvSerie.Columns(1).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
|
||||
If AplicaCaducidad Then
|
||||
GvSerie.Columns(1).Visible = True
|
||||
TdCaducidad1.Visible = True
|
||||
@@ -1229,6 +1232,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Private Sub CargaLote(Optional CerrarCompletado As Boolean = False)
|
||||
|
||||
RegistraScript("$('#DivLote').modal('show')")
|
||||
GvLote.Columns(2).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvLote.DataSource = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
GvLote.DataBind()
|
||||
|
||||
|
||||
@@ -127,6 +127,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSeries" Visible="false" runat="server"><i class="fa fa-list"></i> Series Disponibles</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCaducidad" Visible="false" runat="server"><i class="fa fa-list"></i> Caducidad de producto</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex"> </a>
|
||||
</li>
|
||||
@@ -378,6 +381,11 @@
|
||||
<asp:HyperLink runat="server" Target="_blank" ID="hlFolioD" Text='<%# Eval("FolioDocto")%>' CssClass="Texto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" HeaderText="Folio Rel." Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" Target="_blank" ID="hlFolioDr" Text='<%# Eval("FolioRelacionEntrada")%>' NavigateUrl='<%# Eval("CveVentaRelacionada", "/Ventas/Ventas.aspx?CveVenta={0}")%>' CssClass="Texto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" HeaderText="U. M.">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbUm" runat="server" Text='<%# Eval("UnidadMedida")%>' data-toggle="tooltip" title='<%# Eval("CveUnidadMedida")%>'></asp:Label>
|
||||
@@ -538,6 +546,43 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DivModalCaducidad" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel2" UpdateMode="Conditional" RenderMode="Inline" style="width:50%">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal1" Text="Producto con caducidad" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="width:100%">
|
||||
<div style="width:98%;margin-left:1.5%;margin-right:1.5%">
|
||||
<asp:UpdatePanel ID="UpProductoCaducidad" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvProductoCaducidad" Width="98%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None"
|
||||
DataKeyNames="Almacen,Cantidad,FechaCaducidad">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Almacén" DataField="Almacen"/>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}"/>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -66,9 +66,9 @@ Partial Class Inventarios_Kardex
|
||||
Private Sub CargaPermisos()
|
||||
If UsuarioActual.CveRol = 1 Then ChkAgruparAlmacen.Visible = True
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
GvM.Columns(13).Visible = TienePermisoImportes ' costo
|
||||
GvM.Columns(14).Visible = TienePermisoImportes ' importe
|
||||
GvM.Columns(16).Visible = TienePermisoImportes ' valor
|
||||
GvM.Columns(14).Visible = TienePermisoImportes ' costo
|
||||
GvM.Columns(15).Visible = TienePermisoImportes ' importe
|
||||
GvM.Columns(17).Visible = TienePermisoImportes ' valor
|
||||
End Sub
|
||||
|
||||
Private Function isWithFamily() As Boolean
|
||||
@@ -87,7 +87,7 @@ Partial Class Inventarios_Kardex
|
||||
CBLTiposAlmacen.DataSource = GlobalDTTipoAlmacen(-1)
|
||||
CBLTiposAlmacen.DataBind()
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
If item.Text = "Entrega Adelantado" Then
|
||||
If item.Text.Contiene("Entrega Adelantado", "Transitorio") Then
|
||||
item.Selected = False
|
||||
Else
|
||||
item.Selected = True
|
||||
@@ -199,13 +199,18 @@ Partial Class Inventarios_Kardex
|
||||
AplicaSeccion = DtTemp.MAX("SeccionAlmacen") <> ""
|
||||
AplicaLote = DtTemp.MAX("Lote") <> ""
|
||||
AplicaCaducidad = DtTemp.MAX("FechaCaducidad") <> ""
|
||||
If AplicaSeccion Then GvM.Columns(7).Visible = True
|
||||
If AplicaSerie Then GvM.Columns(8).Visible = True
|
||||
If AplicaLote Then GvM.Columns(9).Visible = True
|
||||
If AplicaCaducidad Then GvM.Columns(10).Visible = True
|
||||
|
||||
GvM.Columns(6).Visible = DtTemp.MAX("FolioRelacionEntrada") <> ""
|
||||
|
||||
If AplicaSeccion Then GvM.Columns(8).Visible = True
|
||||
If AplicaSerie Then GvM.Columns(9).Visible = True
|
||||
If AplicaLote Then GvM.Columns(10).Visible = True
|
||||
If AplicaCaducidad Then GvM.Columns(11).Visible = True
|
||||
|
||||
Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True"
|
||||
Dim AuxAplicaCad As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaCaducidad") = "True"
|
||||
LnkSeries.Visible = AuxAplicaSerie
|
||||
LnkCaducidad.Visible = AuxAplicaCad
|
||||
'CARGA INDICADORES
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
DivIndicadores.Visible = True
|
||||
@@ -324,6 +329,19 @@ Partial Class Inventarios_Kardex
|
||||
ObjInventarios.Dispose()
|
||||
GvSeries.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargarCaducidadProducto()
|
||||
Dim almacenes As String = ddlAlmacen.GetSelectedValues()
|
||||
If almacenes = "" Then
|
||||
almacenes = "-1"
|
||||
End If
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetExistenciasCaducidad(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
||||
GvProductoCaducidad.DataSource = ObjInventarios.DtResultados
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
GvProductoCaducidad.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
@@ -440,6 +458,12 @@ Partial Class Inventarios_Kardex
|
||||
UpGridSeries.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalSerie"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCaducidad_OnClick(sender As Object, e As EventArgs) Handles LnkCaducidad.Click
|
||||
CargarCaducidadProducto()
|
||||
UpProductoCaducidad.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalCaducidad"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -200,7 +200,8 @@
|
||||
<asp:Label runat="server" ID="LblProyectado" Text="Incluir Proyectados" class="col-md-1 truncate" />
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyeccionFiltro" runat="server" CssClass="select2me" Width="100%" >
|
||||
<asp:ListItem Text="Si" Value="1" />
|
||||
<asp:ListItem Text="Entradas" Value="1" />
|
||||
<asp:ListItem Text="Salidas" Value="2" />
|
||||
<asp:ListItem Text="No" Value="0" Selected="True" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -489,7 +489,7 @@
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -1293,6 +1293,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
If AplicaSeccion Then GvInv.Columns(11).Visible = True
|
||||
If AplicaLote Then GvInv.Columns(12).Visible = True
|
||||
GvInv.Columns(13).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
If AplicaCaducidad Then GvInv.Columns(13).Visible = True
|
||||
|
||||
If AplicaSerie OrElse AplicaSeccion OrElse AplicaLote OrElse AplicaCaducidad Then
|
||||
@@ -1824,6 +1825,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Sub
|
||||
Private Sub CargaLote(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
||||
RegistraScript("$('#DivLote').modal();", "ModalLote")
|
||||
GvLote.Columns(2).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvLote.DataSource = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
GvLote.DataBind()
|
||||
|
||||
@@ -2688,7 +2690,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
Dim CveAlmacenVirutal As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacenFiltro).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
@@ -2882,9 +2884,16 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
'VERIFICA SI TIENE PENDIENTE POR SURTIR
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso TipoMovimiento = 3 Then
|
||||
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 2, UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dim DtFaltante As DataTable = ObjInventario.DtResultados.FiltraParametros("CantidadF > 0")
|
||||
If DtFaltante.Rows.Count = 0 Then
|
||||
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 2, UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
DtFaltante.Dispose()
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Partial Class Inventarios_RepApartados
|
||||
DdlSubProyectos.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem(" Todas ", "-1"))
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
Else
|
||||
DdlClientesWS.setEsWebService(False)
|
||||
@@ -44,15 +44,9 @@ Partial Class Inventarios_RepApartados
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DdlClienteTraspasar.setEsWebService(True)
|
||||
Else
|
||||
DdlClienteTraspasar.setEsWebService(False)
|
||||
DdlClienteTraspasar.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClienteTraspasar.DataBind()
|
||||
DdlClienteTraspasar.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
DdlClienteTraspasar.setEsWebService(True)
|
||||
|
||||
Dim DTVendedores As New DataTable
|
||||
DTVendedores = GlobalDTVendedores(UsuarioActual.CveEmpresa, True)
|
||||
DTVendedores.Merge(GlobalDTVendedores(UsuarioActual.CveEmpresa, False))
|
||||
@@ -139,7 +133,13 @@ Partial Class Inventarios_RepApartados
|
||||
End If
|
||||
|
||||
DdlClienteTraspasar.SelectedValue = "-1"
|
||||
DdlClienteTraspasar.SelectedText = "Seleccione"
|
||||
DdlClienteTraspasar.SelectedText = "Seleccione"
|
||||
|
||||
|
||||
If UsuarioActual.CveVendedor > 0 AndAlso CveVendedor.ToEntero <= 0 Then
|
||||
CveVendedor = UsuarioActual.CveVendedor.ToString
|
||||
End If
|
||||
|
||||
|
||||
DdlVendedor.SelectedValueExist(CveVendedor)
|
||||
DdlSubProyectos.SelectedValueExist(CveSucursal)
|
||||
|
||||
104
Inventarios/RepProductosPorCaducar.aspx
Normal file
104
Inventarios/RepProductosPorCaducar.aspx
Normal file
@@ -0,0 +1,104 @@
|
||||
<%@ Page Title="Compras - Reporte de Productos por Caducar" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepProductosPorCaducar.aspx.cs" Inherits="Inventarios_RepProductosPorCaducar" %>
|
||||
|
||||
<%@ 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">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Productos por Caducar
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpLnkAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" OnClick="LnkImprimirPDF_Click" Visible="true"><i class="fa fa-file-pdf-o"></i><span style="padding: 10px">PDF</span></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirExcel" runat="server" OnClick="LnkImprimirExcel_Click" Visible="true"><i class="fa fa-file-excel-o"></i><span style="padding: 10px">Excel</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirPDF"/>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirExcel"/>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="PFiltros" class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Proveedor:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<ADS:Dropdownlost ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Fecha Inicio:</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">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalFechaIEjec" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaIEjec" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalFechaIEjec" runat="server" TargetControlID="TxtFechaInicio" PopupButtonID="ImgCalFechaIEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Fecha 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">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LinkButton1" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaFin" PopupButtonID="ImgCalFechaIEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Sucursal:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Clasificación:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="Cantidad,PS,Lote,FechaCaducidad" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Reporte de productos caducidad " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="PS" DataField="PS" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" />
|
||||
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" DataFormatString = "{0:dd/MM/yyyy}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
141
Inventarios/RepProductosPorCaducar.aspx.cs
Normal file
141
Inventarios/RepProductosPorCaducar.aspx.cs
Normal file
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Text;
|
||||
|
||||
public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
{
|
||||
private DataTable DTDatos
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTDatos"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTDatos"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaFiltros();
|
||||
CargarDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargarDatos()
|
||||
{
|
||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(),TxtFechaInicio.Text.ToDate(),TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
|
||||
DdlClasificacion.SelectedValue.ToEntero()))
|
||||
{
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados;
|
||||
DTDatos = ObjInventarios.DtResultados;
|
||||
}
|
||||
ObjInventarios.Dispose();
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
private void CargaFiltros()
|
||||
{
|
||||
CargarFechaText();
|
||||
CargarProveedores();
|
||||
CargarSucursales();
|
||||
CargarClasificaciones();
|
||||
|
||||
}
|
||||
|
||||
private void CargarFechaText()
|
||||
{
|
||||
DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month,1);
|
||||
TxtFechaInicio.Text = date.ToString("dd/MM/yyyy");
|
||||
TxtFechaFin.Text = date.AddMonths(1).AddDays(-1).ToString("dd/MM/yyyy");
|
||||
}
|
||||
|
||||
private void CargarProveedores()
|
||||
{
|
||||
DdlProveedor.setEsWebService(true);
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores");
|
||||
DdlProveedor.SelectedValue = "-1";
|
||||
DdlProveedor.SelectedText = "Todos";
|
||||
}
|
||||
|
||||
private void CargarSucursales()
|
||||
{
|
||||
ClsSubProyectos ObjSubProyectos = new ClsSubProyectos();
|
||||
if (ObjSubProyectos.GetSubProyectos(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlSucursal.DataSource = ObjSubProyectos.DtResultados;
|
||||
}
|
||||
ObjSubProyectos.Dispose();
|
||||
DdlSucursal.DataBind();
|
||||
DdlSucursal.Items.Insert(0, new ListItem("Todas", "-1"));
|
||||
}
|
||||
|
||||
private void CargarClasificaciones()
|
||||
{
|
||||
ClsClasificaciones ObjClasificacion = new ClsClasificaciones();
|
||||
if (ObjClasificacion.GetClasificaciones(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlClasificacion.DataSource = ObjClasificacion.DtResultados;
|
||||
}
|
||||
ObjClasificacion.Dispose();
|
||||
DdlClasificacion.DataBind();
|
||||
DdlClasificacion.Items.Insert(0,new ListItem("Todas","-1"));
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargarDatos();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void LnkImprimirPDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
ImprimirReporte("PDF");
|
||||
}
|
||||
|
||||
protected void LnkImprimirExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
ImprimirReporte("Excel");
|
||||
}
|
||||
|
||||
private void ImprimirReporte(string formato)
|
||||
{
|
||||
StringBuilder Filtros = new StringBuilder();
|
||||
Filtros.AppendFormat("<strong>Proveedor: </strong>{0} ", DdlProveedor.SelectedText);
|
||||
Filtros.AppendFormat("<strong>Fecha Inicio: </strong>{0} ", TxtFechaInicio.Text);
|
||||
Filtros.AppendFormat("<strong>Fecha Fin: </strong>{0} ", TxtFechaFin.Text);
|
||||
Filtros.AppendFormat("<strong>Sucursal: </strong>{0} ", DdlSucursal.SelectedItem.Text);
|
||||
Filtros.AppendFormat("<strong>Clasificación: </strong>{0} ", DdlClasificacion.SelectedItem.Text);
|
||||
List<ReportParameter> @params = new List<ReportParameter>();
|
||||
|
||||
@params.Add(new ReportParameter("Filtros", Filtros.ToString()));
|
||||
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
|
||||
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
@params.Add(new ReportParameter("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
{
|
||||
@params.Add(new ReportParameter("LogoPath", ""));
|
||||
}
|
||||
@params.Add(new ReportParameter("FechaCaducidadHeader", (UsuarioActual.Empresa.Funcionalidad(147) == "Fecha Elaboración" ? "Fecha Elaboración" : "Fecha Caducidad")));
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepProductosCaducidad.rdlc", DTDatos, @params, "Reporte de Productos por Caducar", formato);
|
||||
}
|
||||
}
|
||||
@@ -702,6 +702,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
End If
|
||||
|
||||
Dim RealizarMovimientoVirtual As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso TipoAlmacenOrigen.Contiene(1, 27) Then
|
||||
RealizarMovimientoVirtual = True
|
||||
End If
|
||||
|
||||
'VALIDA ALMACEN DISTINTA SUCURSAL DEBE SER TRANSITORIO
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(7, 140) Then '[IPP] EMPRESA VIGILANCIA NO OCUPA TRANSITORIOS - TIENEN MIL SUCURSALES Xd
|
||||
If Not ChkTransitorio.Checked Then
|
||||
@@ -855,7 +861,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
|
||||
'VIRTUAL SALIDA
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
If RealizarMovimientoVirtual Then
|
||||
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenOrigen.SelectedValue}").ToEntero()
|
||||
|
||||
@@ -922,7 +928,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
|
||||
'VIRTUAL ENTRADA
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
If RealizarMovimientoVirtual Then
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenDestino.SelectedValue}").ToEntero()
|
||||
|
||||
'SI EL ALMACEN DESTINO ES DE APOPYO LOGISTICO EL ALMACEN VIRTUAL DEBE SER DE APOYO LOGISTICO
|
||||
@@ -1010,7 +1016,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
@@ -1259,6 +1265,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
ThFechaCaducidad.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))
|
||||
|
||||
@@ -1310,6 +1317,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||
GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||
GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
|
||||
@@ -1725,7 +1733,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||
@@ -1817,9 +1825,18 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
||||
|
||||
Dim CveAlmacenEntrada As Integer = GvDatosRecepcion.Rows(0).DataKey("CveAlmacenDestino").ToEntero
|
||||
Dim CveAlmacenSalida As Integer = GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero
|
||||
Dim CveAlmacenSalida As Integer = DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero
|
||||
|
||||
Dim TipoAlmacenDestino As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenEntrada}").ToEntero()
|
||||
Dim TipoAlmacenOrigen As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenSalida}").ToEntero()
|
||||
|
||||
|
||||
Dim RealizarMovimientoVirtual As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso TipoAlmacenOrigen.Contiene(1, 27) Then
|
||||
RealizarMovimientoVirtual = True
|
||||
End If
|
||||
|
||||
|
||||
'AGREGAMOS LA SALIDA
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenSalida, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
@@ -1887,11 +1904,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
@@ -1902,7 +1919,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
'VIRTUAL ENTRADA
|
||||
Dim CveMovimientoVirtualEntrada As Integer = 0
|
||||
Dim FolioVirtualEntrada As Integer = 0
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
If RealizarMovimientoVirtual Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenRecepcion.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
@@ -2012,8 +2029,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
TxtObservacionesRecepcion.Text = ""
|
||||
|
||||
Dim Mensaje As StringBuilder = New StringBuilder
|
||||
Mensaje.AppendFormat("Se realizo correctamente la recepción. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoSalida)
|
||||
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida))) 'onclick='ImprimirTraslado()'
|
||||
Mensaje.AppendFormat("Se realizo correctamente la recepción. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoEntrada)
|
||||
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) 'onclick='ImprimirTraslado()'
|
||||
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/><br/><br/>Folio Virtual <b> <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a> </b> <br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada) 'onclick='ImprimirTraslado()'
|
||||
|
||||
|
||||
|
||||
@@ -844,11 +844,11 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Entregas solo a:</span>
|
||||
<span class="caption-subject bold uppercase">PERSONAL AUTORIZADO PARA ENTREGAS EN ALMACÉN:</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarClientePersonalEntrega" data-toggle="tooltip" data-placement="right" title="Agregar dirección de envio." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar"></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarClientePersonalEntrega" data-toggle="tooltip" data-placement="right" title="Agregar personal autorizado para entregas." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5547,8 +5547,15 @@ Partial Class Clientes
|
||||
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
|
||||
If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
|
||||
|
||||
Dim tmp As DataTable = DTHistorialVentas.FiltraParametros($"TipoDocto = '{RblTipo.SelectedValue}'")
|
||||
If tmp.Rows.Count > 0 Then
|
||||
Dim tmp As DataTable = Nothing
|
||||
|
||||
If RblTipo.SelectedValue.Contiene("Ped") Then
|
||||
tmp = DTHistorialVentas.FiltraParametros($"TipoDocto IN('Ped','Pd2')")
|
||||
Else
|
||||
tmp = DTHistorialVentas.FiltraParametros($"TipoDocto = '{RblTipo.SelectedValue}'")
|
||||
End If
|
||||
|
||||
If tmp IsNot Nothing AndAlso tmp.Rows.Count > 0 Then
|
||||
Dim Totales As DataRow = tmp.NewRow
|
||||
Totales("SubTotal") = tmp.SUM("SubTotal")
|
||||
Totales("Total") = tmp.SUM("Total")
|
||||
|
||||
@@ -876,7 +876,7 @@
|
||||
<div class="row" style="margin-top: 5px;" runat="server" id="DivTiempoCaducidad" visible="false">
|
||||
<label class="col-md-6 truncate">Tiempo de Caducidad</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox runat="server" ID="TxtTiempoCaducidad"/><label>Días</label>
|
||||
<asp:TextBox runat="server" ID="TxtTiempoCaducidad" Width="75px"/><label>Días</label>
|
||||
<asp:RegularExpressionValidator ID="RfvTxtTiempoCaducidad" runat="server" ControlToValidate="TxtTiempoCaducidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tiempo Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar" ValidationExpression="\d{1,}" Display="None"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTxtTiempoCaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtTiempoCaducidad" Width="300px" ></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -876,6 +876,10 @@ Partial Class ProductosyServicios
|
||||
ChkLote.Checked = ObjProductosServicios.AplicaLote
|
||||
ChkCaducidad.Checked = ObjProductosServicios.AplicaCaducidad
|
||||
ChkSeccion.Checked = ObjProductosServicios.AplicaSeccion
|
||||
If ObjProductosServicios.DtResultados.Rows(0)("TiempoCaducidad") IsNot Nothing Then
|
||||
TxtTiempoCaducidad.Text = ObjProductosServicios.DtResultados.Rows(0)("TiempoCaducidad").ToString()
|
||||
DivTiempoCaducidad.Visible = ChkCaducidad.Checked
|
||||
End If
|
||||
|
||||
If ObjProductosServicios.AplicaSeccion Then
|
||||
CargaGvSeccionAlmacen()
|
||||
@@ -1234,6 +1238,9 @@ Partial Class ProductosyServicios
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, CveMarca, True)
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
@@ -1297,6 +1304,9 @@ Partial Class ProductosyServicios
|
||||
Next
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, CveMarca, False)
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
@@ -2747,4 +2757,64 @@ Partial Class ProductosyServicios
|
||||
DivTiempoCaducidad.Visible = Activar
|
||||
RfvTxtTiempoCaducidad.Enabled = Activar
|
||||
End Sub
|
||||
|
||||
Private Function GuardarProductoEnFranquicia(ObjPS As ClsProductosServicios, PSS As String, CveMetodoInv As Integer, EsPaquete As Integer, CveMarca As Integer, Agregar As Boolean) As Boolean
|
||||
Dim EmpresasFranquicia = New Integer() {152}
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion.SelectedItem.Text)).ToEntero
|
||||
Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveUnidadMedida", String.Format("UnidadMedida = '{0}'", DdlUnidadMedida.SelectedItem.Text)).ToEntero
|
||||
Dim CveClasificacion2 As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion2.SelectedItem.Text)).ToEntero
|
||||
|
||||
If CveClasificacion <= 0 Then
|
||||
Alert(String.Format("La clasificación indicada no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
Return True
|
||||
End If
|
||||
If CveUnidadMedida <= 0 Then
|
||||
Alert(String.Format("La unidad de medida indicada no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
Return True
|
||||
End If
|
||||
|
||||
If Agregar Then
|
||||
If Not ObjPS.AddPS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
|
||||
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, DdlProveedor.txtValue.Value.ToEntero, True, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario,
|
||||
Franquicia, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2,
|
||||
CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
||||
CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
|
||||
IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100),
|
||||
PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero,
|
||||
CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, 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:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then
|
||||
'Alert(String.Format("Error al agregar el nuevo producto en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")))
|
||||
Return True
|
||||
|
||||
End If
|
||||
Else
|
||||
|
||||
If ObjPS.GetPS(-1, CveClasificacion, Franquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then
|
||||
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS").ToEntero()
|
||||
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
|
||||
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
|
||||
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca,
|
||||
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
||||
CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked,
|
||||
VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal,
|
||||
CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
||||
CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, 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, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked,
|
||||
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then
|
||||
Return True
|
||||
|
||||
End If
|
||||
Else
|
||||
Alert(String.Format("El producto no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -2330,11 +2330,9 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'ENVIO DE FACTURA
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
|
||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
End If
|
||||
ChkEnviarFactura.Checked = False
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
End If
|
||||
|
||||
'Modalidad Contrato
|
||||
@@ -2565,9 +2563,17 @@ Partial Class Ventas
|
||||
ChkEnviarFactura.Visible = False
|
||||
LblEnviarMail.Visible = False
|
||||
Else
|
||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem", "PeC", "PA", "Pd2") Then
|
||||
'ENVIO DE FACTURA
|
||||
ChkEnviarFactura.Checked = False
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
Else
|
||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
CargaFletes()
|
||||
@@ -3934,14 +3940,22 @@ Partial Class Ventas
|
||||
Case "PeC"
|
||||
DdlTipoComprobante.Items.Insert(5, New ListItem("Pedido de Consignación", "PeC"))
|
||||
Case "PA"
|
||||
BtnGenerarRemision.Visible = If(CveEstatus = 16, True, False)
|
||||
If UsuarioActual.TienePermisoProceso(199) Then
|
||||
BtnGenerarRemision.Visible = If(CveEstatus = 16, True, False)
|
||||
Else
|
||||
BtnGenerarRemision.Visible = False
|
||||
End If
|
||||
CvePedidoA = CveVenta
|
||||
DiasCredito = DbRowVenta("DiasCredito").ToString().ToEntero()
|
||||
EsDiasCreditoFijo = CBool(DbRowVenta("EsDiasCreditoFijo").ToString())
|
||||
Case "Pd2"
|
||||
CvePedido2 = CveVenta
|
||||
BtnGeneraAutorizacion.Visible = If(CveEstatus <> 21, True, False)
|
||||
BtnGenerarRemision.Visible = If(CveEstatus <> 21, True, False)
|
||||
If UsuarioActual.TienePermisoProceso(199) Then
|
||||
BtnGenerarRemision.Visible = If(CveEstatus <> 21, True, False)
|
||||
Else
|
||||
BtnGenerarRemision.Visible = False
|
||||
End If
|
||||
End Select
|
||||
|
||||
DdlTipoComprobante.SelectedValue = DbRowVenta("TipoDocto").ToString()
|
||||
@@ -4582,7 +4596,12 @@ Partial Class Ventas
|
||||
|
||||
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
||||
If TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Cot") Then
|
||||
BtnGenerarRemision.Visible = If(CveEstatus = 10, False, True)
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(199) Then
|
||||
BtnGenerarRemision.Visible = If(CveEstatus = 10, False, True)
|
||||
Else
|
||||
BtnGenerarRemision.Visible = False
|
||||
End If
|
||||
BtnsFacturar.Visible = True
|
||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||
End If
|
||||
@@ -5028,9 +5047,16 @@ Partial Class Ventas
|
||||
ChkEnviarFactura.Visible = False
|
||||
LblEnviarMail.Visible = False
|
||||
Else
|
||||
ChkEnviarFactura.Visible = True
|
||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
LblEnviarMail.Visible = True
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem", "PeC", "PA", "Pd2") Then
|
||||
'ENVIO DE FACTURA
|
||||
ChkEnviarFactura.Checked = False
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
Else
|
||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
ViewState("Mail") = If(DdlTipoComprobante.SelectedValue = "Cot", ObjCliente.MailCotizacion, ObjCliente.Mail)
|
||||
@@ -5602,7 +5628,6 @@ Partial Class Ventas
|
||||
BtnsFacturar.Visible = False
|
||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||
Else
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Pd2") Then
|
||||
BtnGeneraAutorizacion.Visible = If(CveEstatus <> 21, True, False)
|
||||
End If
|
||||
@@ -5622,7 +5647,11 @@ Partial Class Ventas
|
||||
Else
|
||||
BtnGeneraAutorizacion.Visible = False
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Pd2") Then
|
||||
BtnGenerarRemision.Visible = If(CveEstatus <> 21, True, False)
|
||||
If UsuarioActual.TienePermisoProceso(199) Then
|
||||
BtnGenerarRemision.Visible = If(CveEstatus <> 21, True, False)
|
||||
Else
|
||||
BtnGenerarRemision.Visible = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
@@ -5633,6 +5662,24 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE
|
||||
If UsuarioActual.CveEmpresa = 72 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
ChkEnviarFactura.Checked = False
|
||||
ChkEnviarFactura.Visible = False
|
||||
LblEnviarMail.Visible = False
|
||||
Else
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem", "PeC", "PA", "Pd2") Then
|
||||
'ENVIO DE FACTURA
|
||||
ChkEnviarFactura.Checked = False
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
Else
|
||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -8063,6 +8110,7 @@ Partial Class Ventas
|
||||
Drt("CveVenta") = ObjFactura.CveVenta
|
||||
Drt("Importe") = 0
|
||||
Drt("FolioFiscal") = ObjFactura.FolioFiscal
|
||||
Drt("Folio") = ObjFactura.SerieFolio
|
||||
DtVentasNC.Rows.Add(Drt)
|
||||
DtVentasNC.AcceptChanges()
|
||||
End If
|
||||
@@ -8304,6 +8352,7 @@ Partial Class Ventas
|
||||
Drt("CveVenta") = ObjFactura.CveVenta
|
||||
Drt("Importe") = 0
|
||||
Drt("FolioFiscal") = ObjFactura.FolioFiscal
|
||||
Drt("Folio") = ObjFactura.SerieFolio
|
||||
DtVentasNC.Rows.Add(Drt)
|
||||
DtVentasNC.AcceptChanges()
|
||||
End If
|
||||
@@ -9055,6 +9104,7 @@ Partial Class Ventas
|
||||
Drt("CveVenta") = gvr.DataKey("CveVenta")
|
||||
Drt("Importe") = gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text
|
||||
Drt("FolioFiscal") = gvr.DataKey("FolioFiscal")
|
||||
Drt("Folio") = gvr.DataKey("Folio")
|
||||
DtVentasNC.Rows.Add(Drt)
|
||||
End If
|
||||
Next
|
||||
@@ -12633,6 +12683,10 @@ Partial Class Ventas
|
||||
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError)
|
||||
End Try
|
||||
|
||||
If CveVenta > 0 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
|
||||
End If
|
||||
|
||||
LocalSerieFolio = ObjFactura.SerieFolio
|
||||
LocalTipoDocto = ObjFactura.TipoDocto
|
||||
'End If
|
||||
@@ -12646,7 +12700,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -12668,8 +12722,6 @@ Partial Class Ventas
|
||||
Dim LocalSerieFolio As String = String.Empty
|
||||
Dim LocalTipoDocto As String = String.Empty
|
||||
|
||||
If CveVenta > 0 Then CreaObjetosVenta()
|
||||
|
||||
'TIMBRADO NUEVO
|
||||
Try
|
||||
pdf = PdfFactura(ObjFactura)
|
||||
@@ -12677,6 +12729,10 @@ Partial Class Ventas
|
||||
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError)
|
||||
End Try
|
||||
|
||||
If CveVenta > 0 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
|
||||
End If
|
||||
|
||||
LocalSerieFolio = ObjFactura.SerieFolio
|
||||
LocalTipoDocto = ObjFactura.TipoDocto
|
||||
|
||||
@@ -12688,7 +12744,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -12719,6 +12775,10 @@ Partial Class Ventas
|
||||
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError)
|
||||
End Try
|
||||
|
||||
If CveVenta > 0 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
|
||||
End If
|
||||
|
||||
LocalSerieFolio = ObjFactura.SerieFolio
|
||||
LocalTipoDocto = ObjFactura.TipoDocto
|
||||
|
||||
@@ -12727,7 +12787,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -14845,11 +14905,10 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'ENVIO DE FACTURA
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
|
||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
End If
|
||||
|
||||
ChkEnviarFactura.Checked = False
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
@@ -14876,7 +14935,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
|
||||
TabAlmacen.Enabled = DdlTipoComprobante.SelectedValue <> "Ant"
|
||||
@@ -17788,7 +17846,7 @@ Partial Class Ventas
|
||||
#End Region
|
||||
|
||||
#Region " MANDA CORREO "
|
||||
Private Sub MandaMails(CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String)
|
||||
Private Sub MandaMails(UsuarioActual As Usuario, CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String)
|
||||
|
||||
Dim ObjMail As New ClsSisMail()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
@@ -18351,7 +18409,7 @@ Partial Class Ventas
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero()) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
@@ -24013,12 +24071,14 @@ Partial Class Ventas
|
||||
DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "TC", .DataType = GetType(Decimal), .DefaultValue = 1})
|
||||
DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "TCCambioValuacion", .DataType = GetType(Decimal), .DefaultValue = 1})
|
||||
DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "CveEstatusFactura", .DataType = GetType(Integer), .DefaultValue = -1})
|
||||
DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "Folio", .DataType = GetType(String), .DefaultValue = ""})
|
||||
End Sub
|
||||
|
||||
Private Sub CargaNCDT(pCveVenta As Integer, Importe As Decimal, Optional FolioFiscal As String = "", Optional NuevaFactura As Integer = -1, Optional ByRef ObjVentas As ClsVentas = Nothing, Optional TC As Decimal = 1)
|
||||
If (pCveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Egs")) OrElse (pCveVenta > 0 AndAlso NuevaFactura = 1) Then
|
||||
Dim CveEstatusFacturaNC As Integer = -1
|
||||
Dim TCCambioValuacion As Decimal = 1
|
||||
Dim Folio As String = ""
|
||||
If FolioFiscal = "" Then
|
||||
Dim ObjVentasAplicar As ClsVentas
|
||||
If ObjVentas IsNot Nothing Then
|
||||
@@ -24027,6 +24087,7 @@ Partial Class Ventas
|
||||
ObjVentasAplicar = New ClsVentas
|
||||
End If
|
||||
If ObjVentasAplicar.GetVenta(pCveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentasAplicar.DtResultados.Rows.Count > 0 Then
|
||||
Folio = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("SerieFolio").ToString()
|
||||
FolioFiscal = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("FolioFiscal").ToString()
|
||||
TC = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("TipoCambio").ToString().ToDecimal()
|
||||
TCCambioValuacion = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("TipoCambioValuacion").ToString().ToDecimal()
|
||||
@@ -24047,6 +24108,7 @@ Partial Class Ventas
|
||||
Dr("TC") = TC
|
||||
Dr("TCCambioValuacion") = TCCambioValuacion
|
||||
Dr("CveEstatusFactura") = CveEstatusFacturaNC
|
||||
Dr("Folio") = Folio
|
||||
|
||||
DtVentasNC.Rows.Add(Dr)
|
||||
End If
|
||||
@@ -24889,7 +24951,7 @@ Partial Class Ventas
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
|
||||
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
|
||||
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
|
||||
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero()) Then
|
||||
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user