This commit is contained in:
caudillochon
2025-02-22 16:25:54 -07:00
50 changed files with 5034 additions and 1649 deletions

View File

@@ -1950,12 +1950,14 @@ Public Class ClsBancos
Return Retorno Return Retorno
End Function End Function
Public Function GetIngresoEgresosDelDia(Fecha As Date, Tipo As String, Opcion As Integer, CveEmpresa As Integer) As Boolean Public Function GetIngresoEgresosDelDia(Grupo As Integer, FechaInicio As Date, FechaFin As Date, Tipo As String, Opcion As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Banc_IngresoEgresosDiariosGet") DataAdapter("PA_Banc_IngresoEgresosDiariosGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@Grupo", SqlDbType.Int).Value = Grupo
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo 'Ing Ingresp Egs Egreso .Add("@Tipo", SqlDbType.VarChar).Value = Tipo 'Ing Ingresp Egs Egreso
.Add("@Opcion", SqlDbType.VarChar).Value = Opcion .Add("@Opcion", SqlDbType.VarChar).Value = Opcion

View File

@@ -4313,7 +4313,7 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function End Function
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean Public Function GetAnexoCatalagoCC(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer, Optional OpcionCuentas As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Conta_AnexoCatalogoCCGet") DataAdapter("PA_Conta_AnexoCatalogoCCGet")
@@ -4326,6 +4326,7 @@ Public Class ClsContabilidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Divisor", SqlDbType.Int).Value = Divisor .Add("@Divisor", SqlDbType.Int).Value = Divisor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
End With End With
Try Try

View File

@@ -4472,13 +4472,32 @@ Public Class ClsGenerales
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
Public Function GetReporteDiario(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_RepCierreDia")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(DSet)
Retorno = True
Catch ex As Exception
OnError($"Ocurrió un error al obtener los datos del reporte diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#Region "IDisposable Support" #Region "IDisposable Support"
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean) Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then If Not Me.disposedValue Then
If disposing Then If disposing Then

View File

@@ -6107,13 +6107,13 @@ Public Class ClsPaginas
End If End If
End If End If
End Sub End Sub
Protected Sub ImprimeFormatoCartaPorteTimbrado(CveTimbre As Integer) Protected Sub ImprimeFormatoCartaPorteTimbrado(CveTimbre As Integer, Optional imprmirNom043 As Boolean = False)
Dim resp As Modelos.MSubReportData = PreParaImpresionCartaPorte(CveTimbre) Dim resp As Modelos.MSubReportData = PreParaImpresionCartaPorte(CveTimbre, imprmirNom043:=imprmirNom043)
If resp.DataSources.Count > 0 AndAlso resp.Parametros.Count > 0 Then If resp.DataSources.Count > 0 AndAlso resp.Parametros.Count > 0 Then
ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", resp.DataSources, resp.Parametros, resp.SerieFolio) ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", resp.DataSources, resp.Parametros, resp.SerieFolio)
End If End If
End Sub End Sub
Private Function PreParaImpresionCartaPorte(CveTimbre As Integer, Optional AplicaSubReporte As Boolean = False) As Modelos.MSubReportData Private Function PreParaImpresionCartaPorte(CveTimbre As Integer, Optional AplicaSubReporte As Boolean = False, Optional imprmirNom043 As Boolean = False) As Modelos.MSubReportData
Dim retorno As New Modelos.MSubReportData Dim retorno As New Modelos.MSubReportData
retorno.Nombre = "CartaPorte" retorno.Nombre = "CartaPorte"
Try Try
@@ -6180,6 +6180,7 @@ Public Class ClsPaginas
Dim ConfATR1 As String = "" Dim ConfATR1 As String = ""
Dim ConfATR2 As String = "" Dim ConfATR2 As String = ""
Dim ObjInv As New ClsGenerales Dim ObjInv As New ClsGenerales
Dim TelDestino As String = ""
If ObjInv.GetGralTimbre(CveTimbre, "-1", MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1) Then If ObjInv.GetGralTimbre(CveTimbre, "-1", MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1) Then
If ObjInv.DtResultados.Rows.Count > 0 Then If ObjInv.DtResultados.Rows.Count > 0 Then
@@ -6188,6 +6189,7 @@ Public Class ClsPaginas
SerieFolio = Dr("SerieFolio").ToString SerieFolio = Dr("SerieFolio").ToString
Telefono = Dr("FiguraTelefono").ToString Telefono = Dr("FiguraTelefono").ToString
TipoDocto = Dr("TipoDocto").ToString TipoDocto = Dr("TipoDocto").ToString
TelDestino = Dr("TelDestino").ToString
If UsuarioActual.CveEmpresa = 13 Then If UsuarioActual.CveEmpresa = 13 Then
PermisoSCTR1 = Dr("PermisoSCTR1").ToString PermisoSCTR1 = Dr("PermisoSCTR1").ToString
@@ -6562,6 +6564,7 @@ Public Class ClsPaginas
ImgCBB = "" ImgCBB = ""
End If End If
'Dim bCBB As Byte() = qrCode.GenerarQrCode($"{ClsPaginas.LigaVerificacionSATCCP}?IdCCP={cfdi.CfdiInfo.IdCCP}&FechaOrig={Carta.Ubicaciones(0).FechaHoraSalidaLlegada}&FechaTimb={cfdi.CfdiInfo.FechaTimbrado}")
ImagenCCP = New System.IO.FileInfo(RutaCCP) ImagenCCP = New System.IO.FileInfo(RutaCCP)
If ImagenCCP.Exists Then If ImagenCCP.Exists Then
ImgCCP = String.Format("file://{0}", ImagenCCP.FullName) ImgCCP = String.Format("file://{0}", ImagenCCP.FullName)
@@ -6627,6 +6630,12 @@ Public Class ClsPaginas
params.Add(New ReportParameter("RemolquePlaca2", RemolquePlaca2)) params.Add(New ReportParameter("RemolquePlaca2", RemolquePlaca2))
params.Add(New ReportParameter("RemolqueSubtimo2", RemolqueSubtimo2)) params.Add(New ReportParameter("RemolqueSubtimo2", RemolqueSubtimo2))
params.Add(New ReportParameter("imprmirNom043", If(imprmirNom043, "1", "0")))
If imprmirNom043 Then
params.Add(New ReportParameter("TelDestino", TelDestino))
End If
If UsuarioActual.CveEmpresa = 13 Then If UsuarioActual.CveEmpresa = 13 Then
params.Add(New ReportParameter("PermisoSCTRemolque1", PermisoSCTR1)) params.Add(New ReportParameter("PermisoSCTRemolque1", PermisoSCTR1))
params.Add(New ReportParameter("PermisoSCTRemolque2", PermisoSCTR2)) params.Add(New ReportParameter("PermisoSCTRemolque2", PermisoSCTR2))
@@ -8020,10 +8029,14 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto)) params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto))
params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado)) params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
End If End If
If UsuarioActual.CveEmpresa.Contiene(189) Then If UsuarioActual.CveEmpresa.Contiene(189) Then
params.Add(New ReportParameter("DiasCreditoOC", dtOC(0)("DiasCreditoOC").ToString)) If dtOC(0)("DiasCreditoOC").ToString.ToEntero > 0 Then
End If params.Add(New ReportParameter("DiasCreditoOC", dtOC(0)("DiasCreditoOC").ToString))
Else
params.Add(New ReportParameter("DiasCreditoOC", dtOC(0)("PlazoPago").ToString))
End If
End If
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then If UsuarioActual.CveEmpresa.Contiene(13, 83) Then

View File

@@ -1965,7 +1965,7 @@ Public Class ClsVentas
Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1,
Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1,
Optional ServicioDomicilio As Integer = -1) As Boolean Optional ServicioDomicilio As Integer = -1, Optional EsFilial As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_GetRepPS") DataAdapter("PA_Vta_GetRepPS")
SqlAdapter.SelectCommand.CommandTimeout = 0 SqlAdapter.SelectCommand.CommandTimeout = 0
@@ -2002,6 +2002,7 @@ Public Class ClsVentas
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2 .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
.Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio
.Add("@EsFilial", SqlDbType.Int).Value = EsFilial
End With End With
Try Try
@@ -2021,7 +2022,7 @@ Public Class ClsVentas
Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1,
Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
Optional EsGarantia As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional EsGarantia As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1,
Optional CveClasificacion2 As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional ServicioDomicilio As Integer = -1) As Boolean Optional CveClasificacion2 As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional ServicioDomicilio As Integer = -1, Optional EsFilial As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_GetRepPSDetalle") DataAdapter("PA_Vta_GetRepPSDetalle")
SqlAdapter.SelectCommand.CommandTimeout = 0 SqlAdapter.SelectCommand.CommandTimeout = 0
@@ -2063,7 +2064,7 @@ Public Class ClsVentas
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2 .Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
.Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio
.Add("@EsFilial", SqlDbType.Int).Value = EsFilial
End With End With
@@ -6785,9 +6786,6 @@ Public Class ClsVentas
End Function End Function
Public Function AddMedicoEspecialidad(Especialidad As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function AddMedicoEspecialidad(Especialidad As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -6808,7 +6806,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function UpdateMedicoEspecialidad(CveMedicoEspecialidad As Integer, Especialidad As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function UpdateMedicoEspecialidad(CveMedicoEspecialidad As Integer, Especialidad As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -6829,7 +6826,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function RemoveMedicoEspecialidad(CveMedicoEspecialidad As Integer, CveEmpresa As Integer) As Boolean Public Function RemoveMedicoEspecialidad(CveMedicoEspecialidad As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -6851,7 +6847,6 @@ Public Class ClsVentas
#End Region #End Region
#Region "S U B E S P E C I A L I D A D E S" #Region "S U B E S P E C I A L I D A D E S"
Public Function GetMedicosSubEspecialidades(CveMedicoSubEspecialidad As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean Public Function GetMedicosSubEspecialidades(CveMedicoSubEspecialidad As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -6873,10 +6868,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function AddMedicoSubEspecialidad(CveMedicoEspecialidad As Integer, SubEspecialidad As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function AddMedicoSubEspecialidad(CveMedicoEspecialidad As Integer, SubEspecialidad As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -6896,7 +6887,6 @@ Public Class ClsVentas
OnError("Ocurrió un error al guardar la SubEspecialidad.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al guardar la SubEspecialidad.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function End Function
Public Function UpdateMedicoSubEspecialidad(CveMedicoSubEspecialidad As Integer, CveMedicoEspecialidad As Integer, SubEspecialidad As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function UpdateMedicoSubEspecialidad(CveMedicoSubEspecialidad As Integer, CveMedicoEspecialidad As Integer, SubEspecialidad As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
@@ -6942,9 +6932,7 @@ Public Class ClsVentas
#End Region #End Region
#Region "MEDICO CLIENTE SUCURALES" #Region "MEDICO CLIENTE SUCURSALES"
Public Function GetMedicosClientesSucursales(CveMedico As Integer, CveEmpresa As Integer) As Boolean Public Function GetMedicosClientesSucursales(CveMedico As Integer, CveEmpresa As Integer) As Boolean
@@ -7025,7 +7013,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function RemoveMedicosClientesSucursales(CveMedicoClienteSucursal As Integer, CveEmpresa As Integer) As Boolean Public Function RemoveMedicosClientesSucursales(CveMedicoClienteSucursal As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -7047,7 +7034,7 @@ Public Class ClsVentas
#End Region #End Region
#Region "PRODEDIMIENTOS" #Region "PROCEDIMIENTOS"
Public Function GetProcedimientos(CveProcedimiento As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean Public Function GetProcedimientos(CveProcedimiento As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
@@ -7137,8 +7124,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function AddProcedimientoProducto(CveProcedimiento As Integer, CvePS As Integer, Autogenerado As Boolean, Estatus As Boolean, CveUsuario As Integer, Cantidad As Decimal) As Boolean Public Function AddProcedimientoProducto(CveProcedimiento As Integer, CvePS As Integer, Autogenerado As Boolean, Estatus As Boolean, CveUsuario As Integer, Cantidad As Decimal) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -7161,8 +7146,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function UpdateProcedimientoProducto(CveProcedimientoProducto As Integer, CvePS As Integer, Autogenerado As Boolean, Estatus As Boolean, CveUsuario As Integer, Cantidad As Decimal) As Boolean Public Function UpdateProcedimientoProducto(CveProcedimientoProducto As Integer, CvePS As Integer, Autogenerado As Boolean, Estatus As Boolean, CveUsuario As Integer, Cantidad As Decimal) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -7185,8 +7168,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function SincronizacionProcedimientoProducto(CveProcedimiento As Integer, CveVenta As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function SincronizacionProcedimientoProducto(CveProcedimiento As Integer, CveVenta As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -7232,7 +7213,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function RemoveProcedimientoProducto(CveProcedimientoProducto As Integer, CveEmpresa As Integer) As Boolean Public Function RemoveProcedimientoProducto(CveProcedimientoProducto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -7250,10 +7230,6 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetProcedimientoVentas(CveProcedimiento As Integer, CveEmpresa As Integer) As Boolean Public Function GetProcedimientoVentas(CveProcedimiento As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -7273,7 +7249,6 @@ Public Class ClsVentas
End Function End Function
#End Region #End Region
#Region "VENTAS MEDICAS COMISIONES" #Region "VENTAS MEDICAS COMISIONES"
@@ -7356,7 +7331,6 @@ Public Class ClsVentas
#End Region #End Region
#Region "VENTAS MEDICAS COMISIONES ESPECIALES" #Region "VENTAS MEDICAS COMISIONES ESPECIALES"
Public Function GetComisionesMedicasEspeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean Public Function GetComisionesMedicasEspeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
@@ -7434,7 +7408,7 @@ Public Class ClsVentas
#End Region #End Region
#Region "DEVOLUICON" #Region "DEVOLUCION"
Public Function UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle As Integer, CantidadDevolucion As Decimal) As Boolean Public Function UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle As Integer, CantidadDevolucion As Decimal) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -7481,6 +7455,26 @@ Public Class ClsVentas
End Function End Function
#End Region #End Region
Public Function UpdateVentaAdicional(CveVenta As Integer, Opcion As String, Valor As String, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentaAdicionalUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@Opcion", SqlDbType.VarChar).Value = Opcion
.Add("@Valor", SqlDbType.VarChar).Value = Valor
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el adicional de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetVentasMedicasIndicadoresRep(Grupo As Integer, FechaI As Date, FechaF As Date, CveCliente As Integer, CveMedico As Integer, CveProcedimiento As Integer, CveEmpresa As Integer, CveVendedor As Integer) As Boolean Public Function GetVentasMedicasIndicadoresRep(Grupo As Integer, FechaI As Date, FechaF As Date, CveCliente As Integer, CveMedico As Integer, CveProcedimiento As Integer, CveEmpresa As Integer, CveVendedor As Integer) As Boolean

View File

@@ -1306,43 +1306,14 @@ Namespace Modelos
ObjFactura.FechaEjecucion = DateTime.Today ObjFactura.FechaEjecucion = DateTime.Today
ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.UsuarioCreo = UsuarioActual.Usuario
ObjFactura.TipoDocumento = ObjFactura.TipodeComprobante ObjFactura.TipoDocumento = ObjFactura.TipodeComprobante
'Totales, Y se llena TmpDTImpuestos 'Totales, Y se llena TmpDTImpuestos
'CLIENTE 'CLIENTE
ObjFactura.CveCliente = CveCliente ObjFactura.CveCliente = CveCliente
ObjFactura.SetCliente() ObjFactura.SetCliente()
'Dim ObjCliente As New ClsClientes
'If ObjCliente.GetClientes(ObjFactura.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
' If ObjCliente.DtResultados.Rows.Count > 0 Then
' ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33
' ObjFactura.FormaPago33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
' ObjFactura.FormaPagoSAT33 = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
' ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
' ObjFactura.MetodoPago33 = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
' ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
' ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
' ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
' ObjFactura.ClaveUsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
' End If
'End If
''If ObjCliente.GetSucursales(ObjFactura.CveCliente) Then
'' If ObjCliente.DtResultados.Rows.Count > 0 Then
'' ObjFactura.CveClienteSucursal = If(String.IsNullOrEmpty(ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'")), -1, ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'").ToEntero())
'' Else
'' ObjFactura.CveClienteSucursal = -1
'' End If
''End If
'ObjCliente.Dispose()
ObjFactura.CveSubProyecto = CveSubProyecto.ToEntero ObjFactura.CveSubProyecto = CveSubProyecto.ToEntero
ObjFactura.SetSubProyecto() ObjFactura.SetSubProyecto()
ObjFactura.SetSubProyectoMatriz() ObjFactura.SetSubProyectoMatriz()
ObjFactura.CveSubProyectoCobranza = CveSubProyecto.ToEntero ObjFactura.CveSubProyectoCobranza = CveSubProyecto.ToEntero
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto.ToEntero ObjFactura.CveSubProyectoEjecucion = CveSubProyecto.ToEntero

View File

@@ -2393,6 +2393,28 @@ Namespace Extensiones
Dim worksheet As ExcelWorksheet = excel.Worksheets(0) Dim worksheet As ExcelWorksheet = excel.Worksheets(0)
worksheet.Rows.InsertEmpty(0, TotalRowHeader) worksheet.Rows.InsertEmpty(0, TotalRowHeader)
'2025-02-15 OIC Este for es para que las celdas tomen formato numerico y se puedan sumar
For Each row In worksheet.Rows
For Each cell In row.AllocatedCells
If cell.Value IsNot Nothing Then
Dim valorTexto As String = cell.Value.ToString().Trim()
Dim numero As Decimal
' Intentar convertir a número
If Decimal.TryParse(valorTexto, System.Globalization.NumberStyles.Any,
System.Globalization.CultureInfo.InvariantCulture,
numero) Then
' Si se pudo convertir exitosamente, reasignar como Double
cell.Value = numero
End If
End If
Next
Next
Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True) Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True)
If celdasConTexto Is Nothing Then Exit Sub 'No se recuperaron datos, salir de sin guardar porque soltará error If celdasConTexto Is Nothing Then Exit Sub 'No se recuperaron datos, salir de sin guardar porque soltará error
celdasConTexto.Style.Font.Name = "Calibri Light" celdasConTexto.Style.Font.Name = "Calibri Light"

View File

@@ -6,6 +6,7 @@ Imports System.Data
Imports Newtonsoft.Json Imports Newtonsoft.Json
Imports Extensiones Imports Extensiones
Imports System.IO Imports System.IO
Imports Newtonsoft.Json.Linq
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Public Class E140 : Implements IHttpHandler, IRequiresSessionState Public Class E140 : Implements IHttpHandler, IRequiresSessionState
@@ -14,18 +15,325 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
Return False Return False
End Get End Get
End Property End Property
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Public Shared 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
Private ReadOnly Property CveEmpresa As Integer = 140
Private ReadOnly Property UsuarioWSE140 As String = "bdh_apiuser_"
Private ReadOnly Property PasswordWSE140 As String = "*863.fy03pon.8kmn_vbtu"
Public ReadOnly Property TokenAutorizacion As String
Get
Return "$2y$10$LGqtRWUloKQmAt.jcUldc.PmS5LJ6l.WU2w1G4PBOTLMVKZRNQFPS"
End Get
End Property
Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario
Dim UsuarioActual As Usuario = Nothing
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexion(CveEmpresa)
Dim ObjUsuarios As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena)
UsuarioActual = ObjUsuarios.GetUsuarioDetalle(100, CveEmpresa)
If UsuarioActual IsNot Nothing Then
HttpContext.Current.Session("UsuarioSIG") = UsuarioActual
'CreaObjetoEmpresa(UsuarioActual)
End If
ObjUsuarios.Dispose()
Return UsuarioActual
End Function
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim retorno As String
Try Try
Select Case context.Request("metodo") Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
Select Case Metodo
Case "MetasVendedores" Case "MetasVendedores"
MetasVendedores(context) MetasVendedores(context)
End Select End Select
If Metodo = "ConsultaRemisiones" Then
context.Response.ContentType = "application/json"
Dim Auth As AuthMessage = ValidarSolicitud(context)
If Auth.IsSucces Then
retorno = ConsultaRemisiones(context, "")
Else
context.Response.StatusCode = Auth.StatusCode
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
End If
context.Response.Write(retorno)
ElseIf Metodo = "RegistraPago" Then
context.Response.ContentType = "application/json"
Dim Auth As AuthMessage = ValidarSolicitud(context)
If Auth.IsSucces Then
retorno = RegistraPagoRemision(context, "")
Else
context.Response.StatusCode = Auth.StatusCode
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
End If
context.Response.Write(retorno)
End If
Catch ex As Exception Catch ex As Exception
ex.GuardaLog(ex.Message) ex.GuardaLog(ex.Message)
End Try End Try
End Sub End Sub
Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage
Dim unauthorized As Boolean = True
Dim respuesta As New AuthMessage
Dim authHeader = context.Request.Headers("Authorization")
If authHeader IsNot Nothing Then
Dim basicAuth As String = authHeader.Replace("Basic ", "")
Dim usernamePasswordArray = Encoding.UTF8.GetString(Convert.FromBase64String(basicAuth)).Split(":"c)
Dim userName = usernamePasswordArray(0)
Dim password = usernamePasswordArray(1)
unauthorized = Not (userName = Me.UsuarioWSE140 AndAlso password = Me.PasswordWSE140)
Else
respuesta.ErrorMessage = New AppsResponseError() With {.message = "el usuario y/o contraseña son requeridos"}
respuesta.IsSucces = False
respuesta.StatusCode = 200
Return respuesta
End If
If unauthorized Then
respuesta.ErrorMessage = New AppsResponseError() With {.message = "el usuario y/o contraseña no son validos"}
respuesta.IsSucces = False
respuesta.StatusCode = 200
Return respuesta
Else
respuesta.ErrorMessage = Nothing
respuesta.IsSucces = True
respuesta.StatusCode = 200
Return respuesta
End If
End Function
Private Function ConsultaRemisiones(ByVal context As HttpContext, Codigo As String) As String
Dim Respuesta As New AppsResponse
Dim RespuestaError As New AppsResponseError
Dim TieneError As Boolean = False
Dim CveSubProyecto As String = "11790"
Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
Dim data As New JArray
Dim dtt As New DataTable
Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepRemisionesSinFacturar(Now.AddYears(-2).ToShortDateString, Now.ToShortDateString, Now.ToShortDateString, CveSubProyecto, -1, -1, "-1", CveEmpresa, CveUsuarioConsulta:=100, PrimerProducto:=True) Then
dtt = ObjVentas.DtResultados.FiltraParametros("CveVenta > 0")
End If
ObjVentas.Dispose()
If dtt IsNot Nothing Then
Try
For Each Row As DataRow In dtt.Rows
Dim objVenta As New JObject(
New JProperty("cveventa", Row("CveVenta")),
New JProperty("folio", Row("Folio")),
New JProperty("cliente", Row("Cliente")),
New JProperty("fecha", Row("Fecha")),
New JProperty("total", Row("Total")),
New JProperty("moneda", Row("Abreviatura")),
New JProperty("primerproducto", Row("PrimerCodigoPS"))
)
data.Add(objVenta)
Next
Catch ex As Exception
TieneError = True
RespuestaError.message = "Ocurrió un error al obtener las remisiones pendientes."
End Try
dtt.Dispose()
Else
TieneError = True
End If
Respuesta.data = data
If TieneError Then
context.Response.StatusCode = 200
Return JsonConvert.SerializeObject(RespuestaError)
Else
context.Response.StatusCode = 200
Return JsonConvert.SerializeObject(Respuesta)
End If
End Function
Private Function RegistraPagoRemision(ByVal context As HttpContext, CveVenta As String) As String
Dim Respuesta As New AppsResponse
Dim RespuestaError As New AppsResponseError
Dim TieneError As Boolean = False
Dim CveSubProyecto As String = "11790"
Dim JsonRequest As JObject = Nothing
If context.Request.InputStream IsNot Nothing Then
Using reader As New StreamReader(context.Request.InputStream)
Dim json = reader.ReadToEnd
If Not String.IsNullOrEmpty(json) Then
JsonRequest = JObject.Parse(json)
If JsonRequest Is Nothing Then
TieneError = True
End If
End If
End Using
End If
Dim UsuarioActual As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
Dim data As New JArray
Dim dtt As New DataTable
Dim MsgError As String = ""
Dim CveCuentaBancaria As Integer = 8075
Dim ImportePago As Decimal = JsonRequest("importe_pago").ToString.ToDecimal
Dim FechaPago As Date = JsonRequest("fecha_pago").ToString.ToDate
Dim FolioPago As String = JsonRequest("referencia_pago").ToString
Dim CveTipoTransaccion As Integer = If(JsonRequest("referencia_pago").ToString = "tdc", 12, 11)
Dim CveMonedaPago As Integer = If(JsonRequest("moneda_pago").ToString = "USD", 2, 1)
Dim pCveVenta As Integer = JsonRequest("cveventa").ToString.ToEntero
Dim Referencia As String = ""
'validaciones
Dim ObjVenta As New ClsVentas()
Dim ObjClientes As New ClsClientes
If ObjVenta.GetVenta(pCveVenta, CveEmpresa) Then
If ObjVenta.DtResultados IsNot Nothing AndAlso ObjVenta.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = ObjVenta.DtResultados.Rows(0)
'importe y forma de pago.
Dim VentaRemision As New ClsPaginas.Venta(UsuarioActual)
VentaRemision.CveVenta = dr("CveVenta").ToString.ToEntero
VentaRemision.Fecha = dr("Fecha").ToString.ToDate
VentaRemision.CveCliente = dr("CveCliente").ToString.ToEntero
VentaRemision.CveMoneda = dr("CveMoneda").ToString.ToEntero
VentaRemision.TipoDocto = dr("TipoDocto").ToString
VentaRemision.SerieFolio = dr("SerieFolio").ToString
VentaRemision.ClienteNombre = dr("ClienteNombre").ToString
VentaRemision.TC = dr("TipoCambio").ToString.ToDecimal
VentaRemision.Total = dr("Total").ToString.ToDecimal
VentaRemision.IVA = dr("IVA").ToString.ToDecimal
VentaRemision.IEPS = dr("IEPS").ToString.ToDecimal
VentaRemision.RetIVA = dr("RetIVA").ToString.ToDecimal
VentaRemision.RetISR = dr("RetISR").ToString.ToDecimal
VentaRemision.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
VentaRemision.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, VentaRemision.CveSubProyecto, VentaRemision.CveCliente, VentaRemision.CveMoneda, "Ing")
ObjFactura.CveMoneda = VentaRemision.CveMoneda
ObjFactura.CveVendedor = dr("CveVendedor").ToString.ToEntero
ObjFactura.CveFormaPago = dr("CveFormaPago33").ToString.ToEntero
'ObjFactura.ClaveFormaPagoSAT = "99"
ObjFactura.CveMetodoPago = dr("CveMetodoPago").ToString.ToEntero
'ObjFactura.ClaveMetodoPagoSAT = "PPD"
Dim DtRemisionesPS As DataTable = Nothing
If ObjClientes.GetVentasRemisionesTotales(VentaRemision.CveCliente, VentaRemision.CveVenta.ToString(), 1, CveEmpresa) Then
DtRemisionesPS = ObjClientes.DtResultados.Copy()
End If
For Each drr As DataRow In DtRemisionesPS.Rows
ObjFactura.AgregarPS(drr("CvePS").ToString().ToEntero(), drr("Cantidad").ToString().ToDecimal(), drr("PU").ToString().ToDecimal(), drr("Descuento").ToString().ToDecimal, drr("Obs").ToString(), CveUM:=drr("CveUM").ToString().ToEntero(),
CveProyecto:=drr("CveProyecto").ToString().ToEntero(), CveSubProyecto:=drr("CveSubProyecto").ToString().ToEntero(), CveVentaDetallePadre:=drr("CveVentaDetalle").ToString().ToEntero(), CveVentaDetalleRemision:=drr("CveVentaDetalle").ToString().ToEntero(),
PorcentajeIVA:=drr("PorcentajeIVA").ToString().ToDecimal(), CvePromocionDetalle:=drr("CvePromocionDetalle").ToString.ToEntero)
Next
ObjFactura.GenerarSalidaAlmacen = True
ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Copy()
'ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero()
ObjFactura.CalculaTotales()
Dim ObjConta As New ClsContabilidad()
Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL())
Dim ObjVentas As New ClsVentas(ObjConta.IniciaTransacSQL())
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Ashx/E140", 4, 0, 0, 1, FechaPago, "Venta Kiosco", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza > 0 Then
'registro de venta y pago
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
Retorno.Factura = ObjFactura
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
VentaRemision.CveVenta = ObjFactura.CveVenta
'Respuesta.data = Retorno.SerieFolio
If TieneError Then
Dim sb As New StringBuilder()
For Each msg As String In Retorno.Mensajes
sb.AppendFormat("{0}. ", msg)
Next
RespuestaError.message = sb.ToString()
End If
'11- tdd, 12-tdc
Dim CveIE As Integer = ObjIE.AddBancos_IE(CveCuentaBancaria, CveTipoTransaccion, FechaPago, "-1", "", ImportePago, VentaRemision.CveMoneda,
VentaRemision.TC, "", "", False, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE > 0 Then
'Importe de pago
Dim Pago As New ClsPaginas.VentaPago
Pago.TipoPago = "XXX"
Pago.Fecha = FechaPago
Pago.CveIE = CveIE
Pago.CveMonedaPago = CveMonedaPago
Pago.ImportePago = ImportePago
Pago.ImportePagoVenta = ImportePago
Pago.Referencia = Referencia
If MsgError = "" AndAlso ClsPaginas.AplicaPrePolizaPagoVenta(VentaRemision, Pago, CvePrePoliza, ObjConta) Then
MsgError = "No se pudo insertar la póliza"
End If
Else
MsgError = "No se pudo insertar el pago"
End If
Else
TieneError = True
End If
End If
If Not TieneError Then
Dim bytesPDF As Byte() = DescargarFactura(ObjFactura.SerieFolio, CveEmpresa, ObjFactura.CveVenta) 'ClsPaginas.PdfFactura(ObjFactura, AplicaPagare:="0", Guardar:=True, RegenerarQR:=True, EsTicket:=False)
'generar el pdf y mandarlo
Dim objretorno As New JObject(
New JProperty("CveVenta", ObjFactura.CveVenta),
New JProperty("SerieFolio", ObjFactura.SerieFolio),
New JProperty("pdf", Convert.ToBase64String(bytesPDF))
)
data.Add(objretorno)
Respuesta.data = data
ObjConta.RollBack()
'ObjConta.Commit()
Else
ObjConta.RollBack()
End If
ObjConta.Dispose()
ObjIE.Dispose()
End If
End If
ObjVenta.Dispose()
ObjClientes.Dispose()
Respuesta.data = data
If TieneError Then
context.Response.StatusCode = 200
Return JsonConvert.SerializeObject(RespuestaError)
Else
context.Response.StatusCode = 200
Return JsonConvert.SerializeObject(Respuesta)
End If
End Function
#Region "M E T A S V E N D E D O R E S"
Private Shared Sub MetasVendedores(ByVal context As HttpContext) Private Shared Sub MetasVendedores(ByVal context As HttpContext)
@@ -128,7 +436,6 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
For Each dRow As System.Data.DataRow In DTVendedores.Rows For Each dRow As System.Data.DataRow In DTVendedores.Rows
Dim CorreoSupervisor As String = dRow("Correo").ToString() Dim CorreoSupervisor As String = dRow("Correo").ToString()
Dim Sucursal As String = dRow("Sucursal").ToString Dim Sucursal As String = dRow("Sucursal").ToString
Dim Vendedor As String = dRow("Nombre").ToString() Dim Vendedor As String = dRow("Nombre").ToString()
@@ -226,6 +533,30 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
Next Next
End Sub End Sub
#End Region
Private Function DescargarFactura(FilePDF As String, CveEmpresa As Integer, CveVenta As Integer) As Byte()
'
Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?P={3}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1&REGENERAR=1", CveVenta))))
Dim File As Byte() = Nothing
Try
Using httpClient = New System.Net.Http.HttpClient()
httpClient.Timeout = New TimeSpan(0, 1, 0)
Using request = New System.Net.Http.HttpRequestMessage(System.Net.Http.HttpMethod.Get, Url)
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
Dim response = httpClient.SendAsync(request).Result
If response.StatusCode = Net.HttpStatusCode.OK Then
File = response.Content.ReadAsByteArrayAsync().Result
End If
End Using
End Using
Catch ex As Exception
File = Nothing
OnError("Ocurrió un error al descargar la factura", ex)
End Try
Return File
End Function
Private Shared Sub MandaCorreo(Para As String, Cuerpo As String, bytes As Byte()) Private Shared Sub MandaCorreo(Para As String, Cuerpo As String, bytes As Byte())
Try Try
@@ -247,15 +578,51 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
End Try End Try
End Sub End Sub
Private Shared Function IsValidJson(ByVal strInput As String) As Boolean
If String.IsNullOrWhiteSpace(strInput) Then
Return False
End If
Public Shared ReadOnly Property EsProduccion As Boolean strInput = strInput.Trim()
Get
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then If (strInput.StartsWith("{") AndAlso strInput.EndsWith("}")) OrElse (strInput.StartsWith("[") AndAlso strInput.EndsWith("]")) Then
Try
Dim obj = JToken.Parse(strInput)
Return True
Catch jex As JsonReaderException
Console.WriteLine(jex.Message)
Return False Return False
Else Catch ex As Exception
Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1") Console.WriteLine(ex.ToString())
End If Return False
End Get End Try
End Property Else
Return False
End If
End Function
Private Class AppsResponse
Sub New()
status = "success"
End Sub
Public Property status As String
Public Property data As Object
Public Property message As String
End Class
Private Class AppsResponseError
Sub New()
status = "error"
End Sub
Public Property status As String
Public Property message As String
End Class
Private Class AuthMessage
Public Property IsSucces As Boolean
Public Property ErrorMessage As AppsResponseError
Public Property StatusCode As Integer
End Class
End Class End Class

View File

@@ -62,9 +62,9 @@ Public Class E141 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe
#Region "V A L I D A - D A T O S" #Region "V A L I D A - D A T O S"
Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario
Dim UsuarioActual As Usuario = Nothing Dim UsuarioActual As Usuario = Nothing
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexion(141) Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexion(CveEmpresa)
Dim ObjUsuarios As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena) Dim ObjUsuarios As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena)
UsuarioActual = ObjUsuarios.GetUsuarioDetalle(100) UsuarioActual = ObjUsuarios.GetUsuarioDetalle(100, CveEmpresa)
If UsuarioActual IsNot Nothing Then If UsuarioActual IsNot Nothing Then
HttpContext.Current.Session("UsuarioSIG") = UsuarioActual HttpContext.Current.Session("UsuarioSIG") = UsuarioActual
'CreaObjetoEmpresa(UsuarioActual) 'CreaObjetoEmpresa(UsuarioActual)
@@ -281,11 +281,11 @@ Public Class E141 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0
Dim CorreoDestino As String = "atencion@fidelityapps.mx" Dim CorreoDestino As String = "atencion@fidelityapps.mx"
Dim MailCC As String = "citas@econollantas.com;sixrogs@hotmail.com;ffelix@econollantas.com" Dim MailCC As String = "citas@econollantas.com;sixrogs@hotmail.com;ffelix@econollantas.com"
Dim MailCCO As String = "jonathan.perez@adssistemas.mx;rene.molina@adsistemas.mx" Dim MailCCO As String = "jonathan.perez@adssistemas.mx;"
If Not EsProduccion Then If Not EsProduccion Then
CorreoDestino = "jonathan.perez@adssistemas.mx" CorreoDestino = "jonathan.perez@adssistemas.mx"
MailCC = "rene.molina@adsistemas.mx" MailCC = ""
MailCCO = "japmx95@gmail.com" MailCCO = "japmx95@gmail.com"
End If End If

View File

@@ -151,11 +151,12 @@
<label style="">Cuenta:</label> <label style="">Cuenta:</label>
</div> </div>
<div class="col-md-2" runat="server"> <div class="col-md-2" runat="server">
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList> <asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%" AutoPostBack ="true" OnSelectedIndexChanged="DdlCuentaDeposito_SelectedIndexChanged"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" InitialValue="-1" CssClass="help-block errorimput" Display="None" <asp:RequiredFieldValidator ID="RfvDdlCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" InitialValue="-1" CssClass="help-block errorimput" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"> ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida">
</asp:RequiredFieldValidator> </asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCRfvDdlCuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuentaDeposito" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCRfvDdlCuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuentaDeposito" Width="350px"></ajax:ValidatorCalloutExtender>
<div id="divtcdeposito" runat="server" visible="False">TC: <asp:TextBox ID="TxtTCDeposito" Width="60px" runat="server"></asp:TextBox></div>
</div> </div>
<div class="col-md-1"> <div class="col-md-1">
@@ -367,7 +368,7 @@
<asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<br /> <br />
<div style="height: 350px; overflow-x: scroll"> <div style="height: 250px; overflow-x: scroll">
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, Importe, SerieFolio,CveCuenta,CveSubProyecto" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%;" GridLines="None"> <asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, Importe, SerieFolio,CveCuenta,CveSubProyecto" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%;" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>

View File

@@ -84,10 +84,10 @@ Partial Class Bancos_DepositosCaja
Else Else
DivRowCuenta.Visible = False DivRowCuenta.Visible = False
DivDescuentocheck.Visible = False DivDescuentocheck.Visible = False
End If End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DivRowCuenta.Visible = True DivRowCuenta.Visible = True
End If End If
End If End If
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then divTipoPago.Visible = False : divTipoPago1.Visible = False If UsuarioActual.CveEmpresa.Contiene(140, 141) Then divTipoPago.Visible = False : divTipoPago1.Visible = False
@@ -273,6 +273,7 @@ Partial Class Bancos_DepositosCaja
Try Try
Dim FolioIE As Long = -1 Dim FolioIE As Long = -1
Dim CveMoneda As Integer = 1 Dim CveMoneda As Integer = 1
Dim CveMonedaDeposito As Integer
Dim TipoCambio As Decimal = 1 Dim TipoCambio As Decimal = 1
Dim Fecha As Date = TxtFecha.Text.ToDate Dim Fecha As Date = TxtFecha.Text.ToDate
Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") Dim drOrigen As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
@@ -294,7 +295,14 @@ Partial Class Bancos_DepositosCaja
End If End If
If drDestino IsNot Nothing Then If drDestino IsNot Nothing Then
CveMoneda = drDestino("CveMoneda").ToString.ToEntero CveMonedaDeposito = drDestino("CveMoneda").ToString.ToEntero
End If
If CveMonedaDeposito <> 1 Then
TipoCambio = TxtTCDeposito.Text.ToDecimal
If TipoCambio < 10 Then
Alert("Tipo cambio incorrecto", TipoMensaje.ToastAdventencia)
Exit Sub
End If
End If End If
NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
@@ -372,12 +380,18 @@ Partial Class Bancos_DepositosCaja
If FolioIE <= 0 Then If FolioIE <= 0 Then
OcurrioError = True OcurrioError = True
End If End If
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Depósito Bancario - {tSubProyectoDeposito}", TotalImporte, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Depósito Bancario - {tSubProyectoDeposito}", TotalImporte, CveMonedaDeposito, TipoCambio, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a> &nbsp &nbsp <br/> ", CveIEOrigen, FolioIE) documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a> &nbsp &nbsp <br/> ", CveIEOrigen, FolioIE)
If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte * TipoCambio, 30, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte, 30, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then
If CveMonedaDeposito > 1 Then
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, (TotalImporte * TipoCambio) - TotalImporte, 204, $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", $"Depósito Bancario - {DdlTipoDeposito.SelectedItem.Text}", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteME:=TotalImporte, TipoCambio:=TipoCambio) Then
OcurrioError = True
End If
End If
If ChkFaltante.Checked Then If ChkFaltante.Checked Then
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
@@ -442,7 +456,15 @@ Partial Class Bancos_DepositosCaja
End If End If
CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then
If Gvr.DataKey("CveMoneda").ToEntero > 1 Then
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, (Importe * TipoCambio) - Importe, 204, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteME:=Importe, TipoCambio:=TipoCambio) Then
OcurrioError = True
Exit For
End If
End If
Else
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
@@ -730,4 +752,13 @@ Partial Class Bancos_DepositosCaja
Return File Return File
End Function End Function
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim CveMonedaDeposito As Integer = GlobalDTBancosCuentasGral(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveCuenta={DdlCuentaDeposito.SelectedValue}").ToEntero
If CveMonedaDeposito <> 1 Then
divtcdeposito.Visible = True
Else
divtcdeposito.Visible = False
End If
End Sub
End Class End Class

View File

@@ -26,28 +26,52 @@
</div> </div>
<div class="titlefiltros caption"> <div class="titlefiltros caption">
<div class="row"> <div class="row">
<div class="col-md-1 truncate" style="max-width: 100px">Fecha:</div> <div class="col-md-1 truncate" style="max-width: 100px">Fecha Inicio:</div>
<div class="col-md-1" style="min-width: 120px"> <div class="col-md-1" style="min-width: 120px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 105px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 105px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Font-Size="12px"></asp:TextBox> <asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Font-Size="12px"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="ImgCalenarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgCalenarioI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator> <asp:CompareValidator ID="CVFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1 truncate" style="max-width: 100px">Fecha Fin:</div>
<div class="col-md-1" style="min-width: 120px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 105px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Font-Size="12px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="col-md-1 truncate" style="max-width: 100px">Opción:</div> <div class="col-md-1 truncate" style="max-width: 100px">Opción:</div>
<div class="col-md-1" style="min-width: 120px"> <div class="col-md-1" style="min-width: 120px">
<asp:DropDownlist ID="DdlOpcion" runat="server" CssClass="form-control input-sm" > <asp:DropDownList ID="DdlOpcion" runat="server" CssClass="form-control input-sm">
<asp:ListItem Text="Todos" Value="0"></asp:ListItem> <asp:ListItem Text="Todos" Value="0"></asp:ListItem>
<asp:ListItem Text="Conciliados" Value="1" Selected="True"></asp:ListItem> <asp:ListItem Text="Conciliados" Value="1" Selected="True"></asp:ListItem>
</asp:DropDownlist> </asp:DropDownList>
</div>
<div class="col-md-1 truncate" style="max-width: 100px">Vista:</div>
<div class="col-md-1" style="min-width: 120px">
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-sm">
<asp:ListItem Text="Cliente/Proveedor" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Clasificación" Value="2"></asp:ListItem>
</asp:DropDownList>
</div> </div>
</div> </div>
</div> </div>
@@ -63,6 +87,5 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -44,7 +44,8 @@ Partial Class Bancos_FlujoDiario
Private Sub Bancos_FlujoDiario_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Bancos_FlujoDiario_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
TxtFecha.Text = NowADS().ToString TxtFechaI.Text = NowADS().AddDays(-1).ToString("dd/MM/yyyy")
TxtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
End If End If
End Sub End Sub
@@ -56,9 +57,10 @@ Partial Class Bancos_FlujoDiario
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Fecha", TxtFecha.Text.ToDate.ToLongDateString)) params.Add(New ReportParameter("FechaI", TxtFechaI.Text.ToDate.ToString("dd/MMM/yyyy", New System.Globalization.CultureInfo("es-MX")).Replace(".", "").ToUpper()))
params.Add(New ReportParameter("FechaF", TxtFechaF.Text.ToDate.ToString("dd/MMM/yyyy", New System.Globalization.CultureInfo("es-MX")).Replace(".", "").ToUpper()))
If Imagen.Exists Then If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
@@ -68,23 +70,23 @@ Partial Class Bancos_FlujoDiario
'SE LLENA TmpDTSaldosIniciales 'SE LLENA TmpDTSaldosIniciales
Dim Ban As New ClsBancos Dim Ban As New ClsBancos
If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFecha.Text.ToDate.AddDays(-1).ToShortDateString, OpcionSaldo, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFechaF.Text.ToDate.AddDays(-1).ToShortDateString, OpcionSaldo, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TmpDTSaldosIniciales = Ban.DtResultados TmpDTSaldosIniciales = Ban.DtResultados.Copy()
End If End If
'Se Llena TmpDTIngresosDelDia 'Se Llena TmpDTIngresosDelDia
If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Ing", OpcionSaldo, UsuarioActual.CveEmpresa) Then If Ban.GetIngresoEgresosDelDia(DdlGrupo.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, "Ing", OpcionSaldo, UsuarioActual.CveEmpresa) Then
TmpDTIngresosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 8") TmpDTIngresosDelDia = Ban.DtResultados.Copy() '.FiltraParametros("CveTipoTransaccion <> 8")
End If End If
'Se Llena TmpDTGastosDelDia 'Se Llena TmpDTGastosDelDia
If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Egs", OpcionSaldo, UsuarioActual.CveEmpresa) Then If Ban.GetIngresoEgresosDelDia(DdlGrupo.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, "Egs", OpcionSaldo, UsuarioActual.CveEmpresa) Then
TmpDTGastosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 2") TmpDTGastosDelDia = Ban.DtResultados.Copy() '.FiltraParametros("CveTipoTransaccion <> 2")
End If End If
'Se Llena TmpDTSaldosActuales 'Se Llena TmpDTSaldosActuales
If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFecha.Text, OpcionSaldo, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFechaF.Text, OpcionSaldo, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TmpDTSaldosActuales = Ban.DtResultados TmpDTSaldosActuales = Ban.DtResultados.Copy()
End If End If
Ban.Dispose() Ban.Dispose()
@@ -103,7 +105,7 @@ Partial Class Bancos_FlujoDiario
'lrds.Add(rds5)- 'lrds.Add(rds5)-
ImprimirPDF("Empresas/Grales/Formatos/FlujoDiario.rdlc", lrds, params, NombreArchivo:=String.Format("FlujoDiario-{0}", TxtFecha.Text.ToDate.ToShortDateString)) ImprimirPDF("Empresas/Grales/Formatos/FlujoDiario.rdlc", lrds, params, NombreArchivo:=String.Format("FlujoDiario-{0}", TxtFechaF.Text.ToDate.ToShortDateString))
End Sub End Sub

View File

@@ -1524,7 +1524,7 @@
</div> </div>
<br /> <br />
<asp:GridView ID="GVDevolucion" runat="server" DataKeyNames="CveMovimientoDetalle,CveAlmacen,Total,PU,Cantidad,CvePS,CveUM,UM,CveClasificacion,Clasificacion,PS,CveTipoPS,PUExtranjero" ShowFooter="true" GridLines="None" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover Widthall"> <asp:GridView ID="GVDevolucion" runat="server" DataKeyNames="CveMovimientoDetalle,CveAlmacen,Total,PU,Cantidad,CvePS,CveUM,UM,CveClasificacion,Clasificacion,CodigoPS,CveTipoPS,PUExtranjero" ShowFooter="true" GridLines="None" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover Widthall">
<Columns> <Columns>
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
@@ -3612,10 +3612,10 @@
<div class="portlet-body"> <div class="portlet-body">
<asp:GridView ID="GvBitacora" runat="server" GridLines="None" Width="100%" CssClass="table table-striped table-advance table-hover Widthall ADSCroll mysmallbtn" CellSpacing="0" AutoGenerateColumns="False"> <asp:GridView ID="GvBitacora" runat="server" GridLines="None" Width="100%" CssClass="table table-striped table-advance table-hover Widthall ADSCroll mysmallbtn" CellSpacing="0" AutoGenerateColumns="False">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField ItemStyle-Width="155px">
<HeaderTemplate>Fecha</HeaderTemplate> <HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal> <asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />

File diff suppressed because it is too large Load Diff

View File

@@ -1395,7 +1395,9 @@ Partial Class PopUpVerFactura
If UrlParametros("OP").ToString = "CARPOTIMBRE" Then If UrlParametros("OP").ToString = "CARPOTIMBRE" Then
If UrlParametros("CVETIMBRE") IsNot Nothing AndAlso UrlParametros("CVETIMBRE").ToString.ToEntero > 0 Then If UrlParametros("CVETIMBRE") IsNot Nothing AndAlso UrlParametros("CVETIMBRE").ToString.ToEntero > 0 Then
ImprimeFormatoCartaPorteTimbrado(UrlParametros("CVETIMBRE").ToString.ToEntero) Dim imprmirNom043 As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119), True, False)
ImprimeFormatoCartaPorteTimbrado(UrlParametros("CVETIMBRE").ToString.ToEntero, imprmirNom043:=imprmirNom043)
'ImprimeFormatoCartaPorteTimbrado(UrlParametros("CVETIMBRE").ToString.ToEntero)
End If End If
End If End If
@@ -4256,12 +4258,14 @@ Partial Class PopUpVerFactura
ObjCompra.Dispose() ObjCompra.Dispose()
If Not Archivo.Exists Then If Not Archivo.Exists Then
params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) params.Add(New ReportParameter("LogoPath", RutaImagenLogo))
ImprimirPDF(String.Format("Empresas/Grales/Formatos/DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios") ImprimirPDF(String.Format("Empresas/Grales/Formatos/DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios")
Else Else
ImprimirPDF(String.Format("{0}Formatos\DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios") If UsuarioActual.CveEmpresa.Contiene(189) Then
ImprimirPDF(String.Format("{0}Formatos\DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios", DtDatos2:=DTPrePoliza, RDSName2:="DsPrePoliza")
Else
ImprimirPDF(String.Format("{0}Formatos\DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios")
End If
End If End If
'ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionProveedor.rdlc", DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios") 'ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionProveedor.rdlc", DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios")

View File

@@ -33,6 +33,10 @@
.ajax__tab_xp .ajax__tab_body { .ajax__tab_xp .ajax__tab_body {
font-size: 12px !important; font-size: 12px !important;
} }
.addropzone {
min-height: 170px;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
@@ -268,7 +272,7 @@
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" Style="margin: auto" AutoPostBack="True" RepeatColumns="3"> <asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" Style="margin: auto" AutoPostBack="True" RepeatColumns="3">
<asp:ListItem Value="6" Selected="True" >Caja Chica</asp:ListItem> <asp:ListItem Value="6" Selected="True" >Caja Chica</asp:ListItem>
<asp:ListItem Value="2">Viáticos</asp:ListItem> <asp:ListItem Value="2">Viáticos</asp:ListItem>
<asp:ListItem Value="4">Deudores</asp:ListItem> <%--<asp:ListItem Value="4">Deudores</asp:ListItem>--%>
</asp:RadioButtonList> </asp:RadioButtonList>
</div> </div>
@@ -933,61 +937,91 @@
<asp:UpdatePanel runat="server" ID="UpModalProrrateoGasolina" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpModalProrrateoGasolina" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<%-- <div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<ADS:Dropdownlost runat="server" ID="DdlPSProrrateoGasolina" CssStyle="width:100%" CssClass="form-control input-sm DdlPS" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" /> <div class="row">
<label for="<%= DdlPSProrrateoGasolina.ClientID.ToString()%>"> <div class="col-md-12">
Productos / Servicio: <div class="form-group form-md-line-input input-iconright">
<label> <asp:DropDownList ID="DdlSubProyectoProrrateoGasolina" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label runat="server" id="Label10" for="<%= DdlSubProyectoProrrateoGasolina.ClientID.ToString()%>">
<asp:Label runat="server" ID="LblSubProyectoProrrateoGasolina"></asp:Label>:
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrecioProrrateoGasolina" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPSProrateo"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilTxtPrecioProrrateoGasolina" runat="server" TargetControlID="TxtPrecioProrrateoGasolina" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RfvTxtPrecioProrrateoGasolina" runat="server" ControlToValidate="TxtPrecioProrrateoGasolina" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPSProrateo">
</asp:RequiredFieldValidator>
<label for="<%= TxtPrecioProrrateoGasolina.ClientID.ToString()%>">Porcentaje:</label>
</div>
</div>
</div> </div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblTotalProrrateoGasolina" CssClass="form-control" Text="100%"></asp:Label>
<label for="<%= LblTotalProrrateoGasolina.ClientID.ToString()%>">Porcentaje:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblRestoProrrateoGasolina" CssClass="form-control"></asp:Label>
<label for="<%= LblRestoProrrateoGasolina.ClientID.ToString()%>">% Restante:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" style="margin-top:10px;text-align:center">
<asp:LinkButton ID="LnkAgregarProrrateoGasolina" OnClick="LnkAgregarProrrateoGasolina_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GprAgregaPSProrateo" > </asp:LinkButton>
</div>
</div>
</div> </div>
</div>--%> <div class="col-md-6">
<div class="row">
<div class="col-md-12" style="color:#888888">
Cargar Excel:
</div>
</div>
<div class="row">
<div class="col-md-12" style="margin-left: 5px; margin-right: 5px;">
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-md-6" style="text-align:right;margin-top:10px">
<asp:LinkButton runat="server" ID="LnkDecargaPlatilla" OnClick="LnkDecargaPlatilla_Click" CssClass="btn btn-warning"><i class="fa fa-arrow-down" aria-hidden="true"></i> Formato</asp:LinkButton>
</div>
<div class="col-md-6" style="text-align:left;margin-top:10px">
<asp:LinkButton runat="server" ID="BrnAgregarPlantilla" OnClick="LnkDecargaPlatilla_Click" CssClass="btn btn-success" Width="100px" ><i class="fa fa-upload" aria-hidden="true"></i> Cargar</asp:LinkButton>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top:10px"> <div class="row" style="margin-top:10px">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoProrrateoGasolina" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<%--<asp:RequiredFieldValidator ID="RfvDdlSubProyectoProrrateoGasolina" runat="server" ControlToValidate="DdlSubProyectoProrrateoGasolina" CssClass="help-block errorimput" InitialValue="-1"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GprAgregaPSProrateo">
</asp:RequiredFieldValidator>--%>
<label runat="server" id="Label10" for="<%= DdlSubProyectoProrrateoGasolina.ClientID.ToString()%>">
<asp:Label runat="server" id="LblSubProyectoProrrateoGasolina"></asp:Label>:
</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrecioProrrateoGasolina" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPSProrateo"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilTxtPrecioProrrateoGasolina" runat="server" TargetControlID="TxtPrecioProrrateoGasolina" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RfvTxtPrecioProrrateoGasolina" runat="server" ControlToValidate="TxtPrecioProrrateoGasolina" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPSProrateo">
</asp:RequiredFieldValidator>
<label for="<%= TxtPrecioProrrateoGasolina.ClientID.ToString()%>">Porcentaje:</label>
</div>
</div>
<div class="col-md-4" style="margin-top:10px;text-align:right">
<asp:LinkButton ID="LnkAgregarProrrateoGasolina" OnClick="LnkAgregarProrrateoGasolina_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GprAgregaPSProrateo" > </asp:LinkButton>
</div>
</div> </div>
<div class="row" style="margin-top:10px">
<div class="row" style="margin-top:10px">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblTotalProrrateoGasolina" CssClass="form-control" Text="100%"></asp:Label>
<label for="<%= LblTotalProrrateoGasolina.ClientID.ToString()%>">Porcentaje:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblRestoProrrateoGasolina" CssClass="form-control"></asp:Label>
<label for="<%= LblRestoProrrateoGasolina.ClientID.ToString()%>">% Restante:</label>
</div>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@@ -1018,6 +1052,9 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDecargaPlatilla" />
</Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@@ -1328,6 +1365,8 @@
<asp:LinkButton runat="server" ID="BtnBuscarBitacora" class="btn btn-default"><i class="fa fa-search"></i>&nbsp; Consultar</asp:LinkButton> <asp:LinkButton runat="server" ID="BtnBuscarBitacora" class="btn btn-default"><i class="fa fa-search"></i>&nbsp; Consultar</asp:LinkButton>
<asp:LinkButton runat="server" ID="LnkRegistroRNC" class="btn btn-default" OnClick="LnkRegistroRNC_Click"><i class="fa fa-search"></i>&nbsp; Prueba</asp:LinkButton>
</div> </div>
</div> </div>
@@ -1565,9 +1604,6 @@
<ajax:TabPanel runat="server" HeaderText="Historial" ID="TabHistorial"> <ajax:TabPanel runat="server" HeaderText="Historial" ID="TabHistorial">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GVSolicitudesHistorial" runat="server" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False" OnRowDataBound="GVSolicitudesHistorial_RowDataBound" <asp:GridView ID="GVSolicitudesHistorial" runat="server" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False" OnRowDataBound="GVSolicitudesHistorial_RowDataBound"
@@ -1634,26 +1670,11 @@
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div> </div>
</div> </div>

View File

@@ -26,6 +26,7 @@ Imports SharpCompress.Common
Imports SharpCompress.Reader Imports SharpCompress.Reader
Imports Telerik.Web.UI Imports Telerik.Web.UI
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports Stimulsoft.Base.Serializing
'Imports Telerik.Web.UI 'Imports Telerik.Web.UI
@@ -5586,13 +5587,13 @@ Partial Class Compras_eFacturas
If DdlSubProyectoProrrateoGasolina.SelectedValue.ToEntero > 0 Then If DdlSubProyectoProrrateoGasolina.SelectedValue.ToEntero > 0 Then
AgregarProrrateoGasolina(DdlSubProyectoProrrateoGasolina.SelectedValue.ToEntero, DdlSubProyectoProrrateoGasolina.SelectedItem.Text, CvePs, CveUM, UM, CveClasificacion, Clasificacion) AgregarProrrateoGasolina(DdlSubProyectoProrrateoGasolina.SelectedValue.ToEntero, DdlSubProyectoProrrateoGasolina.SelectedItem.Text, CvePs, CveUM, UM, CveClasificacion, Clasificacion, TxtPrecioProrrateoGasolina.Text.ToDecimal)
Else Else
DTProrrateoTmp.Rows.Clear() DTProrrateoTmp.Rows.Clear()
For Each item As ListItem In DdlSubProyectoProrrateoGasolina.Items For Each item As ListItem In DdlSubProyectoProrrateoGasolina.Items
If item.Value.ToEntero > 0 Then If item.Value.ToEntero > 0 Then
AgregarProrrateoGasolina(item.Value.ToEntero, item.Text, CvePs, CveUM, UM, CveClasificacion, Clasificacion) AgregarProrrateoGasolina(item.Value.ToEntero, item.Text, CvePs, CveUM, UM, CveClasificacion, Clasificacion, TxtPrecioProrrateoGasolina.Text.ToDecimal)
End If End If
Next Next
End If End If
@@ -5604,7 +5605,7 @@ Partial Class Compras_eFacturas
End Sub End Sub
Private Sub AgregarProrrateoGasolina(CveSubProyecto As Integer, SubProyecto As String, CvePS As Integer, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String) Private Sub AgregarProrrateoGasolina(CveSubProyecto As Integer, SubProyecto As String, CvePS As Integer, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, Porcentaje As Decimal)
''' este prco3eso compratira todo esto se debe de llevar a la genracion de la factura por porcentaje ''' este prco3eso compratira todo esto se debe de llevar a la genracion de la factura por porcentaje
@@ -5614,7 +5615,7 @@ Partial Class Compras_eFacturas
Dim RetIVAOriginal As Decimal = 0D 'TxtRetIVA.Text.ToDecimal Dim RetIVAOriginal As Decimal = 0D 'TxtRetIVA.Text.ToDecimal
Dim TotalOriginal As Decimal = 1 Dim TotalOriginal As Decimal = 1
Dim totalParcialDeseado As Decimal = TxtPrecioProrrateoGasolina.Text.ToDecimal Dim totalParcialDeseado As Decimal = Porcentaje
Dim PorcentajeCalculado As Decimal = totalParcialDeseado / TotalOriginal Dim PorcentajeCalculado As Decimal = totalParcialDeseado / TotalOriginal
Dim subtotalParcial As Decimal = SubTotalOriginal * PorcentajeCalculado Dim subtotalParcial As Decimal = SubTotalOriginal * PorcentajeCalculado
@@ -5642,7 +5643,7 @@ Partial Class Compras_eFacturas
nRow("Total") = totalParcialDeseado.RoundSQL(4) nRow("Total") = totalParcialDeseado.RoundSQL(4)
nRow("PorcentajeIVA") = (ivaParcial / subtotalParcial).RoundSQL(4) nRow("PorcentajeIVA") = (ivaParcial / subtotalParcial).RoundSQL(4)
nRow("Porcentaje") = TxtPrecioProrrateoGasolina.Text.ToDecimal '((totalParcialDeseado.RoundSQL(4) * 100) / TotalOriginal).RoundSQL(2) nRow("Porcentaje") = Porcentaje '((totalParcialDeseado.RoundSQL(4) * 100) / TotalOriginal).RoundSQL(2)
'nRow("RetIVAPorcentaje") = (retIvaParcial / subtotalParcial).RoundSQL(4) 'nRow("RetIVAPorcentaje") = (retIvaParcial / subtotalParcial).RoundSQL(4)
'nRow("RetISRPorcentaje") = (retIsrParcial / subtotalParcial).RoundSQL(4) 'nRow("RetISRPorcentaje") = (retIsrParcial / subtotalParcial).RoundSQL(4)
@@ -6073,6 +6074,243 @@ Partial Class Compras_eFacturas
End Function End Function
Protected Sub LnkRegistroRNC_Click(sender As Object, e As EventArgs)
VinculacionAutomaticaRNC()
End Sub
Private Sub VinculacionAutomaticaRNC()
Dim ErrorProceso As Boolean = False
Dim ErrorProcesoStr As String = ""
Dim Contador As Integer = 0
Dim Objcompras As New ClsCompras
Objcompras.IniciaTransacSQL()
'DataKeyNames="CveFactura,CveCompra,CveProveedor,SerieFolio,NombreProveedor,UUID,RFCDe,RFCPara,TipoFactura,FueValidado,TipoComprobante,Version,RFCde,XML,PDF,BloquePorComplemento,Total,CveTipoProveedor,FechaFactura"
For Each GvRow As GridViewRow In GvD.Rows
If GvRow.DataKey("TipoComprobante") = "E" Then
Dim TotalFactura As Decimal = GvRow.DataKey("Total").ToDecimal
Dim SaldoFactura As Decimal = TotalFactura
Dim CFDIXmlPath As String = $"{UsuarioActual.Empresa.Ruta}Compras\{GvRow.DataKey("RFCDe")}\{GvRow.DataKey("XML")}"
If Not File.Exists(CFDIXmlPath) Then
ErrorProceso = True
Continue For
End If
Dim CompraActual As New ClsCompraManager(CFDIXmlPath, ClsCompraManager.EnumCargaCompra.DesdeArchivo, GlobalDTTiposGastos(UsuarioActual.CveEmpresa), UsuarioActual)
CompraActual.CveFactura = GvRow.DataKey("CveFactura").ToEntero
CompraActual.CveProveedor = GvRow.DataKey("CveProveedor").ToEntero
CompraActual.CveTipoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
CompraActual.CveTipoConceptoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
CompraActual.TipoCompra = ClsCompraManager.EnumTipoCompra.Sin_definir
CompraActual.IEPSGasto = True
CompraActual.Descripcion = TxtDescripcionCompra.Text.Trim
CompraActual.NombreProveedor = GvRow.DataKey("NombreProveedor")
For Each DR As String In CompraActual.DocumentosRelacionadosUUIDSList
Next
'If CompraActual.ConfiguraRegistroCompra(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, CveCajachica, CvePersonal,
' DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero, NumeroReembolso:=TxtNumeroReembolso.Text,
' DTProrrateo:=DTProrrateo, DTPagosDeudores:=New DataTable) Then
' 'FIX ME OIC Recuerda cambiar el tipo de documento al registrar, actualmente tiene FAC y NC uno u otro, ajustar para que registre *** Egs *** cuado TipoComprobante = 'E'
' If CompraActual.AddCompra(Objcompras.IniciaTransacSQL()) Then
' Contador = Contador + 1
' Else
' ErrorProceso = True
' ErrorProcesoStr = CompraActual.MensajeError
' Exit For
' End If
'Else
' ErrorProceso = True
' ErrorProcesoStr = CompraActual.MensajeError
' Exit For
'End If
'If RBLContado.SelectedValue.ToEntero = 4 Then 'Deudores
' Dim CompraActualPagar = New Compra
' If Objcompras.GetCompras(CompraActual.CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
' If Objcompras.DtResultados IsNot Nothing AndAlso Objcompras.DtResultados.Rows.Count > 0 Then
' Dim dr As DataRow = Objcompras.DtResultados.Rows(0)
' CompraActualPagar.CveCompra = CompraActual.CveCompra
' CompraActualPagar.CveTipoConceptoProveedor = dr("CveTipoConcepto").ToString.ToEntero
' CompraActualPagar.CveProveedor = dr("CveProveedor").ToString.ToEntero
' CompraActualPagar.CveMoneda = dr("CveMoneda").ToString.ToEntero
' CompraActualPagar.Fecha = dr("Fecha").ToString.ToDate
' CompraActualPagar.SerieFolio = dr("SerieFolio").ToString
' 'CompraActualPagar.ProveedorNombre = TxtPagueseA.Text
' CompraActualPagar.TC = dr("TipoCambio").ToString.ToDecimal
' CompraActualPagar.Total = dr("Total").ToString.ToDecimal
' CompraActualPagar.IVA = dr("IVA").ToString.ToDecimal
' CompraActualPagar.IVADeducible = dr("IVADeducible").ToString.ToDecimal.RoundSQL
' CompraActualPagar.IVANoDeducible = dr("IVANoDeducible").ToString.ToDecimal.RoundSQL
' CompraActualPagar.IEPS = dr("IEPS").ToString.ToDecimal
' CompraActualPagar.RetIVA = dr("RetIVA").ToString.ToDecimal
' CompraActualPagar.RetISR = dr("RetISR").ToString.ToDecimal
' CompraActualPagar.CveConceptoRetIVA = dr("CveRetIVAConcepto").ToString.ToEntero
' CompraActualPagar.CveConceptoRetISR = dr("CveRetISRConcepto").ToString.ToEntero
' CompraActualPagar.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
' CompraActualPagar.UsuarioActual = UsuarioActual
' CompraActualPagar.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
' CompraActualPagar.EsImportacion = CBool(dr("EsImportacion"))
' CompraActualPagar.CompraNoDeducible = dr("NoDeducible").ToString.ToEntero
' Else
' ErrorProceso = True
' End If
' Else
' ErrorProceso = True
' End If
'End If
End If
If ErrorProceso Then
Exit For
End If
Next
If ErrorProceso Then
Objcompras.RollBack()
Alert($"Se registraron {Contador} Compras. error {ErrorProcesoStr}", TipoMensaje.MsgAdvertencia)
Else
Objcompras.Commit()
CargaDatos(NowADS())
CambieDeudor()
CargaDatos(NowADS())
If Contador > 0 Then
Alert($"Se registraron {Contador} Compras")
End If
End If
Objcompras.Dispose()
End Sub
Protected Sub LnkDecargaPlatilla_Click(sender As Object, e As EventArgs)
Dim rutaArchivoPlantilla As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\CargaProrrateoPorcentaje.xlsx"
Dim nombreArchivo As String = "CargaProrrateoPorcentaje.xlsx"
' Configurar la respuesta HTTP
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Disposition", "attachment; filename=" & nombreArchivo)
Dim contenido As Byte() = System.IO.File.ReadAllBytes(rutaArchivoPlantilla)
Response.BinaryWrite(contenido)
Response.Flush()
Response.End()
End Sub
Protected Sub BrnAgregarPlantilla_Click(sender As Object, e As EventArgs)
If TxtExcel.getfiles().Archivos.Count > 0 Then
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
Dim Directorio As String = Server.MapPath("~") & file.path
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
Dim DTPlantilla As DataTable = ReadExcelFile(Directorio + file.filename, True)
ProcesaPlantilla(DTPlantilla)
Else
Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
End If
End Sub
Function ProcesaPlantilla(DTPlantilla As DataTable) As Boolean
Dim CvePs As Integer = DdlPS.SelectedValue.ToEntero
If Not CvePs > 0 Then
Alert("Debe seleccionar un producto", TipoMensaje.MsgAdvertencia)
Return False
End If
Dim PsRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePs).FiltroPrimero("")
If PsRow Is Nothing Then
Alert("No se encontro el producto", TipoMensaje.MsgAdvertencia)
Return False
End If
Dim CveUM As Integer = PsRow("CveUM").ToString.ToEntero
Dim UM As String = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $" CveUnidadMedida = {CveUM} ")
Dim CveClasificacion As Integer = PsRow("CveClasificacion").ToString.ToEntero
Dim Clasificacion As String = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $" CveClasificacion = {CveClasificacion} ")
Dim TotalPorcentaje As Decimal
Dim ErrorProceso As Boolean = False
Dim SbSubProyectosNoencontrados As New StringBuilder
For Each dRow As DataRow In DTPlantilla.Rows
If dRow("Porcentaje").ToString.ToDecimal < 0 Then
Alert("No se admiten porcentajes negativos.", TipoMensaje.MsgAdvertencia)
Return False
End If
TotalPorcentaje = TotalPorcentaje + dRow("Porcentaje").ToString.ToDecimal
Next
TotalPorcentaje = TotalPorcentaje.RoundSQL
If TotalPorcentaje <> 100 Then
Alert($"La suma de porcentaje es diferente de 100%, el porcetaje actual es de {TotalPorcentaje}%", TipoMensaje.MsgAdvertencia)
Return False
End If
If Not DTPlantilla.Columns.Contains("CveSubProyecto") Then
DTPlantilla.Columns.Add("CveSubProyecto", GetType(Integer))
End If
For Each dRow As DataRow In DTPlantilla.Rows
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $" SubProyecto = '{dRow("CentroCosto").ToString}' ").ToEntero
If CveSubProyecto > 0 Then
dRow("CveSubProyecto") = CveSubProyecto
Else
ErrorProceso = True
SbSubProyectosNoencontrados.AppendLine($"{dRow("CentroCosto").ToString}<br>")
End If
Next
If ErrorProceso AndAlso SbSubProyectosNoencontrados.Length > 0 Then
Alert($"No se encontraron los siguientes centros de costo <br>{SbSubProyectosNoencontrados.ToString}", TipoMensaje.MsgAdvertencia)
End If
For Each dRow As DataRow In DTPlantilla.Rows
AgregarProrrateoGasolina(dRow("CveSubProyecto").ToString.ToEntero, dRow("CentroCosto").ToString, CvePs, CveUM, UM, CveClasificacion, Clasificacion, dRow("Porcentaje").ToString.ToDecimal)
Next
TxtExcel.Text = "[]"
Return True
End Function
End Class End Class

View File

@@ -87,6 +87,10 @@
<li> <li>
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton> <asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton ID="BtnQuitarContabilidad" runat="server" Text="Quitar Contabilidad" Visible="false"
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" OnClick="BtnQuitarContabilidad_Click" />
</li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -567,7 +571,7 @@
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" class="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Seguro de eliminar?" data-btn-ok-label="si" /> <asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" class="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Seguro de eliminar?" data-btn-ok-label="si" />
<asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" CssClass="btn btn-primary green" Visible="false" /> <asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" CssClass="btn btn-primary green" Visible="false" />
<asp:Button ID="BtnDescontabilizar" runat="server" Text="Descontabilizar" CssClass="btn btn-primary" Visible="false" <asp:Button ID="BtnDescontabilizar" runat="server" Text="Descontabilizar" CssClass="btn btn-primary" Visible="false"
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" /> data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</td> </td>

View File

@@ -312,6 +312,10 @@ Partial Class ContabilidadC_RegPrePolizaS
Contabilizar() Contabilizar()
End If End If
If Request("quitaconta") IsNot Nothing Then
Quitacontabilidad()
End If
End If End If
Exit Sub Exit Sub
@@ -508,6 +512,10 @@ Partial Class ContabilidadC_RegPrePolizaS
GvPrePoliza.Columns(7).Visible = True GvPrePoliza.Columns(7).Visible = True
End If End If
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveUsuario = 2296 Then
BtnQuitarContabilidad.Visible = True
End If
If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,292)").Rows.Count > 0 AndAlso DtMovimientos.FiltraParametros("CveConceptoContable IN (30)").Rows.Count = 0 Then If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,292)").Rows.Count > 0 AndAlso DtMovimientos.FiltraParametros("CveConceptoContable IN (30)").Rows.Count = 0 Then
LnkComplementoPago.Visible = True LnkComplementoPago.Visible = True
End If End If
@@ -2892,5 +2900,31 @@ Partial Class ContabilidadC_RegPrePolizaS
Protected Sub LnkEmitirComplemento_Click(sender As Object, e As EventArgs) Protected Sub LnkEmitirComplemento_Click(sender As Object, e As EventArgs)
GeneraTimbre(CvePrePoliza) GeneraTimbre(CvePrePoliza)
End Sub End Sub
Protected Sub BtnQuitarContabilidad_Click(sender As Object, e As EventArgs)
Quitacontabilidad()
End Sub
Private Sub Quitacontabilidad()
Dim tieneerror As Boolean = False
Dim oculta As Boolean = False
Dim ObjConta As New ClsContabilidad()
ObjConta.IniciaTransacSQL()
'If GvPrePoliza.Rows.Count = 0 Then oculta = True
For Each gvr As GridViewRow In GvPrePoliza.Rows
If Not ObjConta.UpdateContabilizable(gvr.DataKey("CvePrePolizaDetalle").ToEntero, oculta) Then
tieneerror = True
End If
Next
If Not tieneerror Then
ObjConta.Commit()
Alert("limpieza")
Else
ObjConta.RollBack()
End If
ObjConta.Dispose()
End Sub
End Class End Class

View File

@@ -169,7 +169,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" Visible="false" />
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
@@ -359,7 +359,13 @@
let currentid = 1; let currentid = 1;
function HandlerGraf(obj, evt) { function HandlerGraf(obj, evt) {
$("#DivModalGrafica").modal(); $("#DivModalGrafica").modal();
cdatos = $(obj).data('values');
//cdatos = $(obj).data('values');
cdatos = $(obj).data('values').sort(function (a, b) {
return b.Valor - a.Valor;
});
if (currentid == 1) { if (currentid == 1) {
CargaGraficaBarras(); CargaGraficaBarras();
} else { } else {
@@ -369,6 +375,9 @@
} }
function CargaGraficaBarras() { function CargaGraficaBarras() {
let data = cdatos; let data = cdatos;
//let data = cdatos.sort(function (a, b) {
// return b.Valor - a.Valor;
//});
var chart = AmCharts.makeChart("chartdiv", { var chart = AmCharts.makeChart("chartdiv", {
"type": "serial", "type": "serial",
"theme": "light", "theme": "light",
@@ -406,6 +415,11 @@
function CargaGraficaPastel() { function CargaGraficaPastel() {
let data = cdatos; let data = cdatos;
//let data = cdatos.sort(function (a, b) {
// return b.Valor - a.Valor;
//});
var chart = AmCharts.makeChart("chartdiv", { var chart = AmCharts.makeChart("chartdiv", {
"type": "pie", "type": "pie",
"theme": "light", "theme": "light",

View File

@@ -236,9 +236,15 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
Next Next
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
If e.Row.Cells(2).Text.ToDecimal <> 0 Then
e.Row.Cells(2).Text = $"<a { If(e.Row.Cells(2).Text.ToDecimal < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={txtFechaF.Text}&FI={txtFechaI.Text}&ER=1&CveSubProyecto=-1&OpcionCuenta=3' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, e.Row.Cells(2).Text.ToDecimal.ToString("###,###,##0"), e.Row.Cells(2).Text.ToDecimal.ToString("###,###,###.00")) }</a>"
Else
e.Row.Cells(2).Text = $"-"
End If
Dim inicial As Boolean = True Dim inicial As Boolean = True
Index = 4 Index = 4
For Each DRow As DataRow In DTHeaders.Rows For Each DRow As DataRow In DTHeaders.Rows
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
@@ -249,7 +255,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
End If End If
If Importe <> 0 Then If Importe <> 0 Then
e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={txtFechaF.Text}&FI={txtFechaI.Text}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>" e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={txtFechaF.Text}&FI={txtFechaI.Text}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}&OpcionCuenta=3' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
End If End If
Index += 1 Index += 1

View File

@@ -390,7 +390,7 @@
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" /> <asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" /> <asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" /> <asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" />
<asp:HyperLinkField DataTextField="FolioPoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" DataNavigateUrlFields="CvePrePoliza" HeaderText="Prepoliza" /> <asp:HyperLinkField DataTextField="FolioPoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}" DataNavigateUrlFields="CvePrePoliza" HeaderText="Prepoliza" />
<asp:HyperLinkField DataTextField="FolioIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE" HeaderText="IE" /> <asp:HyperLinkField DataTextField="FolioIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE" HeaderText="IE" />
<asp:BoundField DataField="FechaAplicado" HeaderText="Fecha Aplicado" DataFormatString="{0:d}" /> <asp:BoundField DataField="FechaAplicado" HeaderText="Fecha Aplicado" DataFormatString="{0:d}" />
</Columns> </Columns>

View File

@@ -13,6 +13,11 @@ using System.IO;
using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared; using CrystalDecisions.Shared;
using System.Diagnostics; using System.Diagnostics;
using DocumentFormat.OpenXml.Drawing;
using DocumentFormat.OpenXml.ExtendedProperties;
using static Stimulsoft.Report.StiOptions;
using System.Web.Services.Description;
using System.Drawing;
public partial class Contabilidad_RepIVA : ClsPaginas public partial class Contabilidad_RepIVA : ClsPaginas
{ {
@@ -331,39 +336,130 @@ public partial class Contabilidad_RepIVA : ClsPaginas
if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico)) if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
{ {
if (txtFechaI.Text.ToDate().Year < 2025) // años anteriores al 2025
foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0)
{ {
SBDIOT.AppendLine( foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0)
Drow["TipoTercero"].ToString() + "|" + {
Drow["TipoOperacion"].ToString() + "|" + SBDIOT.AppendLine(
Drow["RFC"].ToString() + "|" + Drow["TipoTercero"].ToString() + "|" +
Drow["NumeroIDFiscal"].ToString() + "|" + Drow["TipoOperacion"].ToString() + "|" +
Drow["NombreExtranjero"].ToString() + "|" + Drow["RFC"].ToString() + "|" +
Drow["PaisResidencia"].ToString() + "|" + Drow["NumeroIDFiscal"].ToString() + "|" +
Drow["Nacionalidad"].ToString() + "|" + Drow["NombreExtranjero"].ToString() + "|" +
LV(Drow["valorActos1516"].ToString()) + "|" + Drow["PaisResidencia"].ToString() + "|" +
LV(Drow["valorActos15"].ToString()) + "|" + Drow["Nacionalidad"].ToString() + "|" +
LV(Drow["ValorIvaNo1516"].ToString()) + "|" + LV(Drow["valorActos1516"].ToString()) + "|" +
LV(Drow["valorActos15"].ToString()) + "|" +
LV(Drow["ValorIvaNo1516"].ToString()) + "|" +
LV(Drow["valorActos1011"].ToString()) + "|" + LV(Drow["valorActos1011"].ToString()) + "|" +
LV(Drow["valorActos10"].ToString()) + "|" + LV(Drow["valorActos10"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" + LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["ValorIvaNo10"].ToString()) + "|" + LV(Drow["ValorIvaNo10"].ToString()) + "|" +
LV(Drow["ValorIvaNo08"].ToString()) + "|" + LV(Drow["ValorIvaNo08"].ToString()) + "|" +
LV(Drow["valorActosImp1516"].ToString()) + "|" + LV(Drow["valorActosImp1516"].ToString()) + "|" +
LV(Drow["ValorIvaNoImp16"].ToString()) + "|" + LV(Drow["ValorIvaNoImp16"].ToString()) + "|" +
LV(Drow["valorActosImp10"].ToString()) + "|" + LV(Drow["valorActosImp10"].ToString()) + "|" +
LV(Drow["ValorIvaNoImp10"].ToString()) + "|" + LV(Drow["ValorIvaNoImp10"].ToString()) + "|" +
LV(Drow["IvaExentoImpo"].ToString()) + "|" + LV(Drow["IvaExentoImpo"].ToString()) + "|" +
LV(Drow["IVACero"].ToString()) + "|" + LV(Drow["IVACero"].ToString()) + "|" +
LV(Drow["IvaExento"].ToString()) + "|" + LV(Drow["IvaExento"].ToString()) + "|" +
LV(Drow["IvaRetenido"].ToString()) + "|" + LV(Drow["IvaRetenido"].ToString()) + "|" +
LV(Drow["IvaDevoluciones"].ToString()) + "|"); LV(Drow["IvaDevoluciones"].ToString()) + "|");
}
} }
else
{
foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0)
{
SBDIOT.AppendLine(
Drow["TipoTercero"].ToString() + "|" +
Drow["TipoOperacion"].ToString() + "|" +
Drow["RFC"].ToString() + "|" +
Drow["NumeroIDFiscal"].ToString() + "|" +
Drow["NombreExtranjero"].ToString() + "|" +
Drow["PaisResidencia"].ToString() + "|" +
Drow["Nacionalidad"].ToString() + "|" +
// 3.2 valor de los actos o actividades
LV(Drow["valorActosImp8"].ToString()) + "|" + // actos norte
LV(Drow["valorActosImp8"].ToString()) + "|" + // desc norte
LV(Drow["valorActosImp8"].ToString()) + "|" + // actos sur
LV(Drow["valorActosImp8"].ToString()) + "|" + // desc sur
LV(Drow["valorActosImp8"].ToString()) + "|" + // 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // desc 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // importacion 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // desc importacion 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // importacion intangibles 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // desc intangibles 16%
// 3.3 IVA Acreditable
LV(Drow["valorActosImp8"].ToString()) + "|" + // actos norte
LV(Drow["valorActosImp8"].ToString()) + "|" + // proporcion actos norte
LV(Drow["valorActosImp8"].ToString()) + "|" + // actos sur
LV(Drow["valorActosImp8"].ToString()) + "|" + // proporcion actos sur
LV(Drow["valorActosImp8"].ToString()) + "|" + // 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // proporcion 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // importacion 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // proporción importacion 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // intangibles 16%
LV(Drow["valorActosImp8"].ToString()) + "|" + // proporcion intangibles 16%
// 3.4 IVA NO Acreditable
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
LV(Drow["valorActosImp8"].ToString()) + "|" +
// 3.5 datos adicionales
LV(Drow["valorActosImp8"].ToString()) + "|" + // VA retenido por el contribuyente
LV(Drow["valorActosImp8"].ToString()) + "|" + //Actos o actividades pagados en la importación de bienes y servicios por los que no se pagara el IVA (Exentos)
LV(Drow["valorActosImp8"].ToString()) + "|" + // Actos o actividades pagados por los que no se pagará el IVA(Exentos)
LV(Drow["valorActosImp8"].ToString()) + "|" + // Demás actos o actividades pagados a la tasa del 0%
LV(Drow["valorActosImp8"].ToString()) + "|" + // Actos o actividades no objeto del IVA realizados en
LV(Drow["valorActosImp8"].ToString()) + "|" + // Actos o actividades no objeto del IVA por no contar on establecimiento en territorio nacion
LV(Drow["valorActosImp8"].ToString()) + "|"); // Manifiesto que se dio efectos fiscales a los comprobantes que amparan las operaciones realizadas con el proveedor
//LV(Drow["valorActos1516"].ToString()) + "|" +
//LV(Drow["valorActos15"].ToString()) + "|" +
//LV(Drow["ValorIvaNo1516"].ToString()) + "|" +
//LV(Drow["valorActos1011"].ToString()) + "|" +
//LV(Drow["valorActos10"].ToString()) + "|" +
//LV(Drow["valorActosImp8"].ToString()) + "|" +
//LV(Drow["ValorIvaNo10"].ToString()) + "|" +
//LV(Drow["ValorIvaNo08"].ToString()) + "|" +
//LV(Drow["valorActosImp1516"].ToString()) + "|" +
//LV(Drow["ValorIvaNoImp16"].ToString()) + "|" +
//LV(Drow["valorActosImp10"].ToString()) + "|" +
//LV(Drow["ValorIvaNoImp10"].ToString()) + "|" +
//LV(Drow["IvaExentoImpo"].ToString()) + "|" +
//LV(Drow["IVACero"].ToString()) + "|" +
//LV(Drow["IvaExento"].ToString()) + "|" +
//LV(Drow["IvaRetenido"].ToString()) + "|" +
//LV(Drow["IvaDevoluciones"].ToString()) + "|");
}
}
} }
Objconta.Dispose(); Objconta.Dispose();

View File

@@ -51,7 +51,7 @@
<div class="col-md-1"> <div class="col-md-1">
Cuenta: Cuenta:
</div> </div>
<div class="col-md-3"> <div class="col-md-2">
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false"> <asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CuentaFormatoNombre" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="false">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
@@ -97,11 +97,11 @@
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>> <div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row"> <div class="row">
<div class="col-md-1 truncate"> <div class="col-md-1 ">
Tipo Movto Tipo Movto
</div> </div>
<div class="col-md-2 truncate"> <div class="col-md-2 ">
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%"> <asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem> <asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
<asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem> <asp:ListItem Text="Saldo actual no igual a cero" Value="2"></asp:ListItem>
@@ -109,7 +109,7 @@
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem> <asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server"> <div class="col-md-1 " id="tdTipoReporte" visible="false" runat="server">
Tipo Tipo
</div> </div>
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server"> <div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">

View File

@@ -129,7 +129,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
' DdlTipoReporte.SelectedValue = TipoReporte.ToString ' DdlTipoReporte.SelectedValue = TipoReporte.ToString
End If End If
DdlOpcionCuentas.SelectedValueExist(IfNull(Request("OpcionCuenta"), "-1")) 'OpcionCuenta
''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then ''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then
'' DdlTipoCuentas.SelectedValue = IdCuenta.ToString '' DdlTipoCuentas.SelectedValue = IdCuenta.ToString
''Else ''Else

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -883,6 +883,7 @@
<Value>=Microsoft.VisualBasic.Interaction.IIF(Fields!Moneda.Value = "Dólares", Fields!Importe.Value, "")</Value> <Value>=Microsoft.VisualBasic.Interaction.IIF(Fields!Moneda.Value = "Dólares", Fields!Importe.Value, "")</Value>
<Style> <Style>
<FontFamily>verdana</FontFamily> <FontFamily>verdana</FontFamily>
<Format>#,0.00;(#,0.00)</Format>
<Color>#3f4040</Color> <Color>#3f4040</Color>
</Style> </Style>
</TextRun> </TextRun>
@@ -2121,11 +2122,19 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Fecha: </Value> <Value>Periodo: </Value>
<Style /> <Style />
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>=Parameters!Fecha.Value</Value> <Value>=Parameters!FechaI.Value</Value>
<Style />
</TextRun>
<TextRun>
<Value> al </Value>
<Style />
</TextRun>
<TextRun>
<Value>=Parameters!FechaF.Value</Value>
<Style /> <Style />
</TextRun> </TextRun>
</TextRuns> </TextRuns>
@@ -2138,7 +2147,7 @@
<Top>2.51466cm</Top> <Top>2.51466cm</Top>
<Left>0.08599cm</Left> <Left>0.08599cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>6.2766cm</Width> <Width>19.08243cm</Width>
<ZIndex>3</ZIndex> <ZIndex>3</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -2376,7 +2385,7 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="Fecha"> <ReportParameter Name="FechaI">
<DataType>String</DataType> <DataType>String</DataType>
<Nullable>true</Nullable> <Nullable>true</Nullable>
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
@@ -2400,6 +2409,12 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="FechaF">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<rd:ReportUnitType>Cm</rd:ReportUnitType> <rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID> <rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>

View File

@@ -6,8 +6,6 @@ Imports System.Data.SqlClient
Imports System.IO Imports System.IO
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Partial Class Inventarios_EntregaAlmacen Partial Class Inventarios_EntregaAlmacen
Inherits ClsPaginas Inherits ClsPaginas
@@ -699,8 +697,8 @@ Partial Class Inventarios_EntregaAlmacen
Dim drvs As DataRow = objV.DtResultados.FiltroPrimero("") Dim drvs As DataRow = objV.DtResultados.FiltroPrimero("")
LtlRegistra.Text = drvs("VendedorNombre").ToString LtlRegistra.Text = drvs("VendedorNombre").ToString
'subproyecto e-commerce, si se permite surtir, sin tener registro de pago. cvesubproyecto:12849
If drvs("Saldo").ToString.ToDecimal > 0 AndAlso (drvs("CondicionesPago").ToString = "0" Or drvs("TipoDocto").ToString = "Rem") Then If drvs("Saldo").ToString.ToDecimal > 0 AndAlso drvs("CveSubProyecto").ToString <> "12849" AndAlso (drvs("CondicionesPago").ToString = "0" OrElse drvs("TipoDocto").ToString = "Rem") Then
Alert("El documento NO se encuentra pagado", TipoMensaje.MsgError) Alert("El documento NO se encuentra pagado", TipoMensaje.MsgError)
BtnGuardar.Visible = False BtnGuardar.Visible = False
End If End If
@@ -3458,11 +3456,11 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
Limpia() Limpia()
CargaPendientes() CargaPendientes()
LimpiaCampos() LimpiaCampos()
CargaBitacora = False CargaBitacora = False
Else Else
ObjInventario.RollBack() ObjInventario.RollBack()
Alert(TextoError.ToString(), TipoMensaje.MsgError) Alert(TextoError.ToString(), TipoMensaje.MsgError)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
End If End If

View File

@@ -371,12 +371,12 @@ table.adssigscroll {
<HeaderStyle HorizontalAlign="Left" Width="110px" /> <HeaderStyle HorizontalAlign="Left" Width="110px" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="460px"> <asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="360px">
<HeaderTemplate> <HeaderTemplate>
Producto Producto
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<div class="truncate" style="max-width: 450px"> <div class="truncate" style="max-width: 350px">
<asp:Label runat="server" Text='<%# Eval("PS") %>'></asp:Label> <asp:Label runat="server" Text='<%# Eval("PS") %>'></asp:Label>
</div> </div>
</ItemTemplate> </ItemTemplate>

View File

@@ -128,15 +128,17 @@ Partial Class Inventarios_KardexAlmacenHorizontal
ddlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios") ddlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
ddlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.ClientID) ddlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.ClientID)
DdlClasificacion.AutoPostBack = False DdlClasificacion.AutoPostBack = False
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
Else Else
ddlProducto2.ddl.Items.Add(New ListItem("Seleccione", "-1")) ddlProducto2.ddl.Items.Add(New ListItem("Seleccione", "-1"))
ddlProducto2.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2")) ddlProducto2.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
End If
DdlProveedor.ddl.Items.Add(New ListItem("Seleccione", "-1")) If DdlProveedor.UsaWebService Then
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
Else
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind() DdlProveedor.DataBind()
DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If End If
End Sub End Sub

View File

@@ -619,8 +619,7 @@ Partial Class Inventarios_Remanufactura
AtencionA:=factura.AtencionA, TelefonoGenerico:="", CveContrato:=factura.CveContrato, CveVentaPadre:=factura.CveVentaPadre, Det_FechaOrdenCompra:=factura.Det_FechaOrdenCompra, Det_OrdenCompra:=factura.Det_OrdenCompra, otros:=factura.Otros, AtencionA:=factura.AtencionA, TelefonoGenerico:="", CveContrato:=factura.CveContrato, CveVentaPadre:=factura.CveVentaPadre, Det_FechaOrdenCompra:=factura.Det_FechaOrdenCompra, Det_OrdenCompra:=factura.Det_OrdenCompra, otros:=factura.Otros,
Entrega:="", Vigencia:=MinFecha, Entrega:="", Vigencia:=MinFecha,
CveAlmacenTraspasoDestino:=CveAlmacenTraspasoDestino, CveAlmacenTraspasoOrigen:=CveAlmacenTraspasoOrigen, CveDireccionEnvio:=-1, CveOC:=-1, IEPS:=factura.IEPSTC, Serie:=factura.Serie, CveCondicionEntrega:=-1, CveAlmacenTraspasoDestino:=CveAlmacenTraspasoDestino, CveAlmacenTraspasoOrigen:=CveAlmacenTraspasoOrigen, CveDireccionEnvio:=-1, CveOC:=-1, IEPS:=factura.IEPSTC, Serie:=factura.Serie, CveCondicionEntrega:=-1,
PedidoContrato:="", CveSubProyecto:=CveSubProyecto, CveSubProyectoCobranza:=CveSubProyecto, CveSubProyectoEjecucion:=CveSubProyecto, CveFormaPago33:=factura.CveFormaPago, PedidoContrato:="", CveSubProyecto:=CveSubProyecto, CveSubProyectoCobranza:=CveSubProyecto, CveSubProyectoEjecucion:=CveSubProyecto, CveFormaPago33:=factura.CveFormaPago, CveUsoCFDI:=factura.CveUsoCFDI) Then
CveMetodoPago:=factura.CveMetodoPago, CveUsoCFDI:=factura.CveUsoCFDI) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico") ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
End If End If

View File

@@ -6064,7 +6064,7 @@ Partial Class OC_OC
End Function End Function
Protected Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedores.selectedindexchange Protected Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedores.selectedindexchange
TxtDiasCreditoOC.Text = ""
DdlProveedorSucursal.Items.Clear() DdlProveedorSucursal.Items.Clear()
DdlProveedorSucursal.SelectedValue = Nothing DdlProveedorSucursal.SelectedValue = Nothing
@@ -6128,6 +6128,9 @@ Partial Class OC_OC
DdlMoneda.SelectedValueExist(CveMonedaPreferente) DdlMoneda.SelectedValueExist(CveMonedaPreferente)
MonedaTexto = DdlMoneda.SelectedItem.Text MonedaTexto = DdlMoneda.SelectedItem.Text
End If End If
TxtDiasCreditoOC.Text = dtt.Rows(0)("PlazoPago").ToString
End If End If
VerificaSiRequiereCotizacion() VerificaSiRequiereCotizacion()
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And CveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then If UsuarioActual.Empresa.Funcionalidad(565) = "1" And CveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
@@ -6142,6 +6145,7 @@ Partial Class OC_OC
UPPDetalle.Update() UPPDetalle.Update()
uppEstatus.Update() uppEstatus.Update()
End Sub End Sub
Protected Sub CboE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboE.SelectedIndexChanged Protected Sub CboE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboE.SelectedIndexChanged

View File

@@ -744,7 +744,7 @@
selectHelper: true, selectHelper: true,
select: selectDate, select: selectDate,
editable: true, editable: true,
minTime: "07:00:00", minTime: "06:00:00",
maxTime: "23:00:00", maxTime: "23:00:00",
events: { events: {
url: '/Ashx/CargaEventos.ashx', url: '/Ashx/CargaEventos.ashx',

View File

@@ -83,54 +83,53 @@ public class TareasReporteDairio : IHttpHandler
private string ConvertDataTableToHtml(DataTable table) private string ConvertDataTableToHtml(DataTable table)
{ {
StringBuilder html = new StringBuilder(); StringBuilder html = new StringBuilder();
string ColumnaTitulo = "Titulo";
html.Append("<table border='1' style='border-collapse:collapse; width:100%;'>"); html.Append("<table border='1' style='border-collapse:collapse; width:100%;'>");
if(table.Columns[0].ColumnName==ColumnaTitulo && table.Rows.Count > 0) html.AppendFormat(" <caption style='background-color:#333333;'>{0}</caption>", table.Rows[0][ColumnaTitulo]);
html.Append("<thead style='background-color:#DDD; padding: 0px;'><tr>");
html.Append("<thead><tr>");
foreach (DataColumn column in table.Columns) foreach (DataColumn column in table.Columns)
{ {
html.Append($"<th style='padding:5px; text-align:left;'>{column.ColumnName}</th>"); if (ColumnaTitulo != column.ColumnName) html.Append($"<th style='padding:5px; text-align:left;'>{column.ColumnName}</th>");
} }
html.Append("</tr></thead>"); html.Append("</tr></thead>");
html.Append("<tbody>"); html.Append("<tbody>");
foreach (DataRow row in table.Rows) foreach (DataRow row in table.Rows)
{ {
html.Append("<tr>"); html.Append("<tr>");
foreach (DataColumn column in table.Columns) foreach (DataColumn column in table.Columns)
{ {
object value = row[column]; if (ColumnaTitulo != column.ColumnName)
string cellValue;
if (column.DataType == typeof(int) || column.DataType == typeof(decimal) || column.DataType == typeof(double) || column.DataType == typeof(float))
{ {
if (value != DBNull.Value && decimal.TryParse(value.ToString(), out decimal numericValue)) object value = row[column];
string cellValue;
if (column.DataType == typeof(int) || column.DataType == typeof(decimal) || column.DataType == typeof(double) || column.DataType == typeof(float))
{ {
if (numericValue != 0) if (value != DBNull.Value && decimal.TryParse(value.ToString(), out decimal numericValue))
{ {
cellValue = numericValue.ToString("N2"); if (numericValue != 0)
{
cellValue = numericValue.ToString("N2");
}
else
{
cellValue = "";//0.00
}
} }
else else
{ {
cellValue = "";//0.00 cellValue = "";//0.00
} }
html.Append($"<td style='padding:5px; text-align:right;'>{cellValue}</td>");
} }
else else
{ {
cellValue = value?.ToString() ?? string.Empty;
cellValue = "";//0.00 html.Append($"<td style='padding:5px; text-align:left;'>{cellValue}</td>");
} }
html.Append($"<td style='padding:5px; text-align:right;'>{cellValue}</td>");
}
else
{
cellValue = value?.ToString() ?? string.Empty;
html.Append($"<td style='padding:5px; text-align:left;'>{cellValue}</td>");
} }
} }
html.Append("</tr>"); html.Append("</tr>");
} }
@@ -180,15 +179,15 @@ public class TareasReporteDairio : IHttpHandler
private void MandaCorreo(string Cuerpo, bool PrceosoOK) private void MandaCorreo(string Cuerpo, bool PrceosoOK)
{ {
try try
{ {
List<ClsSisMail.ArchivoMail> ListaArchivos = new List<ClsSisMail.ArchivoMail>(); List<ClsSisMail.ArchivoMail> ListaArchivos = new List<ClsSisMail.ArchivoMail>();
ClsSisMail Correo = new ClsSisMail(); ClsSisMail Correo = new ClsSisMail();
//string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx"; //string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
string Para = "oscar.irigoyen@adssistemas.mx"; //string Para = "rene.molina@adssistemas.mx"; // oscar.irigoyen@adssistemas.mx;
string Para = "hdiaz@grupodiaz.com.mx;libarra@grupodiaz.com.mx;jguerrero@grupodiaz.com.mx;contabilidad@grupodiaz.com.mx;cnazarit@yahoo.com;julian@adsistemas.mx;rene.molina@adssistemas.mx";
string Asunto = PrceosoOK ? $"Reporte Diario":"Reporte Diario Error"; string Asunto = PrceosoOK ? $"Reporte Diario":"Reporte Diario Error";
Asunto = $"{Asunto} {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}"; Asunto = $"{Asunto} {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}";

View File

@@ -41,6 +41,59 @@
border: none; border: none;
outline: 0; outline: 0;
} }
table.adssigscroll {
min-width: 100%;
background-color:#fff;
}
table.adssigscroll tbody,table.adssigscroll thead{
background-color:#fff;
}
table.adssigscroll tr{
background-color:inherit;
}
.divContainerads {
width: 100%;
max-height: calc(100vh - 260px);
overflow-y: auto;
}
table.adssigscroll tr:nth-child(1) {
position: sticky;
top: 0; /* Se mantiene pegado en la parte superior */
background-color: inherit; /* Para que no se superponga con otros elementos */
z-index: 4; /* Asegura que esté sobre otros elementos */
}
table.adssigscroll tr:nth-child(1) th:nth-child(1),table.adssigscroll tr:nth-child(1) th:nth-child(2) {
z-index: 5;
}
table.adssigscroll tr:nth-child(2) {
top: 26.14px;
}
table.adssigscroll tr td:nth-child(1),table.adssigscroll tr th:nth-child(1),
table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) {
position: sticky;
left: 0;
z-index: 3;
}
table.adssigscroll tr td:nth-child(1), table.adssigscroll tr td:nth-child(2) {
background-color: inherit;
}
table.adssigscroll tr td:nth-child(1),table.adssigscroll tr th:nth-child(1) {
width: 21px;
max-width: 21px;
}
table.adssigscroll tr td:nth-child(2),table.adssigscroll tr th:nth-child(2) {
left: 21px;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
@@ -297,22 +350,30 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="divContainerads">
<asp:GridView ID="GvMultiple" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false" <asp:GridView ID="GvMultiple" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false"
CssClass="table table-striped table-advance table-hover ScrollAD" data-sort="true" EmptyDataText="No se encontraron registros" CssClass="table table-striped table-advance table-hover adssigscroll" data-cols="2" data-heightmenos="300" data-sort="true" EmptyDataText="No se encontraron registros"
OnRowCreated="GvMultiple_RowCreated" OnRowDataBound="GvMultiple_RowDataBound"> OnRowCreated="GvMultiple_RowCreated" OnRowDataBound="GvMultiple_RowDataBound">
<Columns> <Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="35px"> <asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="35px">
<ItemTemplate> <ItemTemplate>
<asp:CheckBox runat="server" ID="chkPS" /> <asp:CheckBox runat="server" ID="chkPS" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="CodigoPS" HeaderText="Producto/Servicio" ItemStyle-Width="350px" /> <asp:TemplateField>
<HeaderTemplate>
Producto/Servicio
</HeaderTemplate>
<ItemTemplate>
<div style="width:350px"><asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>' ></asp:Label></div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
<HeaderTemplate> <HeaderTemplate>
<asp:Label ID="LtlLista_1" runat="server"></asp:Label> <asp:Label ID="LtlLista_1" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_1" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_1" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -320,7 +381,7 @@
<asp:Label ID="LtlLista_2" runat="server"></asp:Label> <asp:Label ID="LtlLista_2" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_2" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_2" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -328,7 +389,7 @@
<asp:Label ID="LtlLista_3" runat="server"></asp:Label> <asp:Label ID="LtlLista_3" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_3" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_3" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -336,7 +397,7 @@
<asp:Label ID="LtlLista_4" runat="server"></asp:Label> <asp:Label ID="LtlLista_4" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_4" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_4" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -344,7 +405,7 @@
<asp:Label ID="LtlLista_5" runat="server"></asp:Label> <asp:Label ID="LtlLista_5" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_5" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_5" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -352,7 +413,7 @@
<asp:Label ID="LtlLista_6" runat="server"></asp:Label> <asp:Label ID="LtlLista_6" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_6" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_6" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -360,7 +421,7 @@
<asp:Label ID="LtlLista_7" runat="server"></asp:Label> <asp:Label ID="LtlLista_7" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_7" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_7" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -368,7 +429,7 @@
<asp:Label ID="LtlLista_8" runat="server"></asp:Label> <asp:Label ID="LtlLista_8" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_8" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_8" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -376,7 +437,7 @@
<asp:Label ID="LtlLista_9" runat="server"></asp:Label> <asp:Label ID="LtlLista_9" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_9" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_9" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -384,7 +445,7 @@
<asp:Label ID="LtlLista_10" runat="server"></asp:Label> <asp:Label ID="LtlLista_10" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_10" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_10" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -392,7 +453,7 @@
<asp:Label ID="LtlLista_11" runat="server"></asp:Label> <asp:Label ID="LtlLista_11" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_11" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_11" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -400,7 +461,7 @@
<asp:Label ID="LtlLista_12" runat="server"></asp:Label> <asp:Label ID="LtlLista_12" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_12" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_12" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -408,7 +469,7 @@
<asp:Label ID="LtlLista_13" runat="server"></asp:Label> <asp:Label ID="LtlLista_13" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_13" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_13" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -416,7 +477,7 @@
<asp:Label ID="LtlLista_14" runat="server"></asp:Label> <asp:Label ID="LtlLista_14" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_14" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_14" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -424,7 +485,7 @@
<asp:Label ID="LtlLista_15" runat="server"></asp:Label> <asp:Label ID="LtlLista_15" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_15" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_15" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -432,7 +493,7 @@
<asp:Label ID="LtlLista_16" runat="server"></asp:Label> <asp:Label ID="LtlLista_16" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_16" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_16" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -440,7 +501,7 @@
<asp:Label ID="LtlLista_17" runat="server"></asp:Label> <asp:Label ID="LtlLista_17" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_17" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_17" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -448,7 +509,7 @@
<asp:Label ID="LtlLista_18" runat="server"></asp:Label> <asp:Label ID="LtlLista_18" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_18" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_18" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -456,7 +517,7 @@
<asp:Label ID="LtlLista_19" runat="server"></asp:Label> <asp:Label ID="LtlLista_19" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_19" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_19" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -464,7 +525,7 @@
<asp:Label ID="LtlLista_20" runat="server"></asp:Label> <asp:Label ID="LtlLista_20" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_20" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_20" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -472,7 +533,7 @@
<asp:Label ID="LtlLista_21" runat="server"></asp:Label> <asp:Label ID="LtlLista_21" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_21" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_21" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -480,7 +541,7 @@
<asp:Label ID="LtlLista_22" runat="server"></asp:Label> <asp:Label ID="LtlLista_22" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_22" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_22" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -488,7 +549,7 @@
<asp:Label ID="LtlLista_23" runat="server"></asp:Label> <asp:Label ID="LtlLista_23" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_23" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_23" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -496,7 +557,7 @@
<asp:Label ID="LtlLista_24" runat="server"></asp:Label> <asp:Label ID="LtlLista_24" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_24" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_24" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -504,7 +565,7 @@
<asp:Label ID="LtlLista_25" runat="server"></asp:Label> <asp:Label ID="LtlLista_25" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_25" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_25" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -512,7 +573,7 @@
<asp:Label ID="LtlLista_26" runat="server"></asp:Label> <asp:Label ID="LtlLista_26" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_26" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_26" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -520,7 +581,7 @@
<asp:Label ID="LtlLista_27" runat="server"></asp:Label> <asp:Label ID="LtlLista_27" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_27" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_27" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -528,7 +589,7 @@
<asp:Label ID="LtlLista_28" runat="server"></asp:Label> <asp:Label ID="LtlLista_28" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_28" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_28" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -536,7 +597,7 @@
<asp:Label ID="LtlLista_29" runat="server"></asp:Label> <asp:Label ID="LtlLista_29" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_29" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_29" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -544,7 +605,7 @@
<asp:Label ID="LtlLista_30" runat="server"></asp:Label> <asp:Label ID="LtlLista_30" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_30" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_30" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -552,7 +613,7 @@
<asp:Label ID="LtlLista_31" runat="server"></asp:Label> <asp:Label ID="LtlLista_31" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_31" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_31" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -560,7 +621,7 @@
<asp:Label ID="LtlLista_32" runat="server"></asp:Label> <asp:Label ID="LtlLista_32" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_32" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_32" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -568,7 +629,7 @@
<asp:Label ID="LtlLista_33" runat="server"></asp:Label> <asp:Label ID="LtlLista_33" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_33" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_33" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -576,7 +637,7 @@
<asp:Label ID="LtlLista_34" runat="server"></asp:Label> <asp:Label ID="LtlLista_34" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_34" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_34" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -584,7 +645,7 @@
<asp:Label ID="LtlLista_35" runat="server"></asp:Label> <asp:Label ID="LtlLista_35" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_35" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_35" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -592,7 +653,7 @@
<asp:Label ID="LtlLista_36" runat="server"></asp:Label> <asp:Label ID="LtlLista_36" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_36" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_36" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -600,7 +661,7 @@
<asp:Label ID="LtlLista_37" runat="server"></asp:Label> <asp:Label ID="LtlLista_37" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_37" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_37" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -608,7 +669,7 @@
<asp:Label ID="LtlLista_38" runat="server"></asp:Label> <asp:Label ID="LtlLista_38" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_38" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_38" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -616,7 +677,7 @@
<asp:Label ID="LtlLista_39" runat="server"></asp:Label> <asp:Label ID="LtlLista_39" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_39" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_39" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="false" ItemStyle-Width="100px"> <asp:TemplateField Visible="false" ItemStyle-Width="100px">
@@ -624,13 +685,14 @@
<asp:Label ID="LtlLista_40" runat="server"></asp:Label> <asp:Label ID="LtlLista_40" runat="server"></asp:Label>
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio_40" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox> <asp:TextBox ID="TxtPrecio_40" runat="server" CssClass="CssCamviaPrecio" MaxLength="20" Width="70px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="UltimoCosto" ItemStyle-Width="75px" HeaderText="Ult.Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField DataField="UltimoCosto" ItemStyle-Width="75px" HeaderText="Ult.Costo" DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="CostoPromedio" ItemStyle-Width="75px" HeaderText="Costo Prom." DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right"/> <asp:BoundField DataField="CostoPromedio" ItemStyle-Width="75px" HeaderText="Costo Prom." DataFormatString="{0:#,##0.00}" ItemStyle-HorizontalAlign="Right"/>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -2763,7 +2763,7 @@ Partial Class Clientes
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenConsignacion:=DdlAlmacenConsignacion.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked,
EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero()) Then EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero()) Then
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then
@@ -3039,12 +3039,14 @@ Partial Class Clientes
If e.Row.RowIndex > -1 Then If e.Row.RowIndex > -1 Then
If e.Row.DBCampo("Folio") = "N/D" Then If e.Row.DBCampo("Folio") = "N/D" Then
e.Row.FCLiteral("LtlFactura").Text = e.Row.DataKey("Folio") e.Row.FCLiteral("LtlFactura").Text = e.Row.DataKey("Folio")
Else Else
If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then If e.Row.DataKey("Tipo").ToUpper().Contiene("NC", "ANT") Then
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio")) e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio"))
Else Else
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio")) If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then
End If e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio"))
End If
End If
End If End If
End If End If
@@ -6259,6 +6261,9 @@ Partial Class Clientes
DdlAlmacenAsignado.SelectedValue = Nothing DdlAlmacenAsignado.SelectedValue = Nothing
DdlAlmacenAsignado.ClearSelection() DdlAlmacenAsignado.ClearSelection()
DdlAlmacenAsignado.Items.Clear() DdlAlmacenAsignado.Items.Clear()
DdlAlmacenConsignacion.SelectedValue = Nothing
DdlAlmacenConsignacion.ClearSelection()
DdlAlmacenConsignacion.Items.Clear()
DdlAlmacenAlterno.SelectedValue = Nothing DdlAlmacenAlterno.SelectedValue = Nothing
DdlAlmacenAlterno.ClearSelection() DdlAlmacenAlterno.ClearSelection()
DdlAlmacenAlterno.Items.Clear() DdlAlmacenAlterno.Items.Clear()
@@ -6267,6 +6272,9 @@ Partial Class Clientes
DdlAlmacenAsignado.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa) DdlAlmacenAsignado.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlAlmacenAsignado.DataBind() DdlAlmacenAsignado.DataBind()
DdlAlmacenAsignado.Items.Insert(0, New ListItem("-", "-1")) DdlAlmacenAsignado.Items.Insert(0, New ListItem("-", "-1"))
DdlAlmacenConsignacion.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlAlmacenConsignacion.DataBind()
DdlAlmacenConsignacion.Items.Insert(0, New ListItem("-", "-1"))
DdlAlmacenAlterno.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa) DdlAlmacenAlterno.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlAlmacenAlterno.DataBind() DdlAlmacenAlterno.DataBind()
DdlAlmacenAlterno.Items.Insert(0, New ListItem("-", "-1")) DdlAlmacenAlterno.Items.Insert(0, New ListItem("-", "-1"))

View File

@@ -1456,7 +1456,7 @@ Partial Class ProductosyServicios
Exit Sub Exit Sub
End If End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ChkAplicaParaVenta.Checked Then
Dim tcontador As Integer = 0 Dim tcontador As Integer = 0
For Each GvRow As GridViewRow In GvPLMultiple.Rows For Each GvRow As GridViewRow In GvPLMultiple.Rows
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero() Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()

View File

@@ -179,14 +179,16 @@
<asp:BoundField HeaderText="$ Gerente" DataField="ComisionGerente" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" /> <asp:BoundField HeaderText="$ Gerente" DataField="ComisionGerente" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
<asp:BoundField HeaderText="$ E. Médica" DataField="ComisionMedico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="$ E. Médica" DataField="ComisionMedico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Fecha Pago" DataField="FechaPago" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" ControlStyle-Width="100px" /> <asp:BoundField HeaderText="Fecha Pago" DataField="FechaPago" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" ControlStyle-Width="100px" />
<asp:TemplateField HeaderText="Pagada" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="ChkPagada" Visible='<%# If(Eval("CveVenta").ToString <> "", True, False) %>' Checked='<%#If(Eval("Num1").ToString = "1", True, False) %>' AutoPostBack ="true" runat="server" OnCheckedChanged="ChkPagada_CheckedChanged"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -2,6 +2,7 @@
Option Strict On Option Strict On
Imports System.Data Imports System.Data
Imports System.Data.SqlClient
Imports Extensiones Imports Extensiones
Partial Class Ventas_RepComisionesSMS Partial Class Ventas_RepComisionesSMS
@@ -47,6 +48,7 @@ Partial Class Ventas_RepComisionesSMS
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor) DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
DdlVendedor.Enabled = False DdlVendedor.Enabled = False
GvDatos.Columns(16).Visible = False 'gerente GvDatos.Columns(16).Visible = False 'gerente
GvDatos.Columns(19).Visible = False 'pagada
End If End If
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ") DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
@@ -62,6 +64,7 @@ Partial Class Ventas_RepComisionesSMS
GvDatos.Columns(16).Visible = False 'gerente GvDatos.Columns(16).Visible = False 'gerente
GvDatos.Columns(17).Visible = False 'ed.medica GvDatos.Columns(17).Visible = False 'ed.medica
GvDatos.Columns(18).Visible = False 'fecha pago GvDatos.Columns(18).Visible = False 'fecha pago
GvDatos.Columns(19).Visible = False 'pagada
End If End If
End Sub End Sub
@@ -91,10 +94,8 @@ Partial Class Ventas_RepComisionesSMS
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaDatos() CargaDatos()
End Sub End Sub
#Region "EXCEL" #Region "EXCEL"
@@ -115,7 +116,6 @@ Partial Class Ventas_RepComisionesSMS
#End Region #End Region
Protected Sub LnkComisiones_Click(sender As Object, e As EventArgs) Protected Sub LnkComisiones_Click(sender As Object, e As EventArgs)
CargaComisiones() CargaComisiones()
RegistraScript("$('#DvModalComisiones').modal('show');") RegistraScript("$('#DvModalComisiones').modal('show');")
@@ -124,24 +124,18 @@ Partial Class Ventas_RepComisionesSMS
Private Sub CargaComisiones() Private Sub CargaComisiones()
DTDatos = New DataTable DTDatos = New DataTable
GvComisiones.DataSource = Nothing GvComisiones.DataSource = Nothing
Dim objVentas As New ClsVentas Dim objVentas As New ClsVentas
If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then
GvComisiones.DataSource = objVentas.DtResultados GvComisiones.DataSource = objVentas.DtResultados
DTDatos = objVentas.DtResultados DTDatos = objVentas.DtResultados
End If End If
objVentas.Dispose() objVentas.Dispose()
GvComisiones.DataBind() GvComisiones.DataBind()
UpDvModalComisiones.Update() UpDvModalComisiones.Update()
End Sub End Sub
Protected Sub BtnGuardarComisiones_Click(sender As Object, e As EventArgs) Protected Sub BtnGuardarComisiones_Click(sender As Object, e As EventArgs)
Dim objVentas As New ClsVentas Dim objVentas As New ClsVentas
@@ -162,7 +156,6 @@ Partial Class Ventas_RepComisionesSMS
Dim ComisionVendedorGV As Decimal = (GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal / 100).RoundSQL(4) Dim ComisionVendedorGV As Decimal = (GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal / 100).RoundSQL(4)
Dim ComisionTecnicoGV As Decimal = (GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal / 100).RoundSQL(4) Dim ComisionTecnicoGV As Decimal = (GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal / 100).RoundSQL(4)
If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Or ComisionGerenteDT <> ComisionGerenteGV Then If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Or ComisionGerenteDT <> ComisionGerenteGV Then
If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV, ComisionGerenteGV) Then If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV, ComisionGerenteGV) Then
TieneError = True TieneError = True
@@ -194,14 +187,12 @@ Partial Class Ventas_RepComisionesSMS
e.Row.FCTextBox("TxtComisionMedico").Text = e.Row.DataKey("ComisionMedico").ToDecimal.ToString("###.00") e.Row.FCTextBox("TxtComisionMedico").Text = e.Row.DataKey("ComisionMedico").ToDecimal.ToString("###.00")
End If End If
If e.Row.DataKey("ComisionGerente").ToDecimal = 0 Then If e.Row.DataKey("ComisionGerente").ToDecimal = 0 Then
e.Row.FCTextBox("TxtComisionGerente").Text = "" e.Row.FCTextBox("TxtComisionGerente").Text = ""
Else Else
e.Row.FCTextBox("TxtComisionGerente").Text = (e.Row.DataKey("ComisionGerente").ToDecimal * 100).ToString("###.00") e.Row.FCTextBox("TxtComisionGerente").Text = (e.Row.DataKey("ComisionGerente").ToDecimal * 100).ToString("###.00")
End If End If
If e.Row.DataKey("ComisionVendedor").ToDecimal = 0 Then If e.Row.DataKey("ComisionVendedor").ToDecimal = 0 Then
e.Row.FCTextBox("TxtComisionVendedor").Text = "" e.Row.FCTextBox("TxtComisionVendedor").Text = ""
Else Else
@@ -214,8 +205,6 @@ Partial Class Ventas_RepComisionesSMS
e.Row.FCTextBox("TxtComisionTecnico").Text = (e.Row.DataKey("ComisionTecnico").ToDecimal * 100).ToString("###.00") e.Row.FCTextBox("TxtComisionTecnico").Text = (e.Row.DataKey("ComisionTecnico").ToDecimal * 100).ToString("###.00")
End If End If
End If End If
End Sub End Sub
@@ -379,4 +368,14 @@ Partial Class Ventas_RepComisionesSMS
End If End If
End Sub End Sub
Protected Sub ChkPagada_CheckedChanged(sender As Object, e As EventArgs)
Dim chk As CheckBox = DirectCast(sender, CheckBox)
Dim gvr As GridViewRow = DirectCast(chk.NamingContainer, GridViewRow)
Using ObjVenta As New ClsVentas
If ObjVenta.UpdateVentaAdicional(gvr.DataKey("CveVenta").ToEntero, "NUM1", If(chk.Checked, "1", "0"), UsuarioActual.CveEmpresa) Then
CargaDatos()
End If
End Using
End Sub
End Class End Class

View File

@@ -200,7 +200,7 @@
</div> </div>
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label> <asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-2"> <div runat="server" id="DivSubProyecto" class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;" ></asp:DropDownList> <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;"></asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Cliente:</label> <label class="col-md-1 ">Cliente:</label>
<div class="col-md-2"> <div class="col-md-2">
@@ -211,7 +211,7 @@
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%"> <asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 ">Estatus:</label> <label class="col-md-1 ">Estatus:</label>
@@ -260,7 +260,7 @@
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Usuario:</label> <label class="col-md-1 truncate">Usuario:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;" > <asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -284,9 +284,9 @@
<div class="row"> <div class="row">
<label title="Giro del Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Giro Cli.:</label> <label title="Giro del Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Giro Cli.:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion" Style="width: 100%;" ></asp:DropDownList> <asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion" Style="width: 100%;"></asp:DropDownList>
</div> </div>
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label> <label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
@@ -302,7 +302,7 @@
<div runat="server" id="DivMarca" class="col-md-2" visible="false"> <div runat="server" id="DivMarca" class="col-md-2" visible="false">
<asp:DropDownList ID="DdlMarcaPSDes" CssClass="select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Style="width: 100%" Height="22px"></asp:DropDownList> <asp:DropDownList ID="DdlMarcaPSDes" CssClass="select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Style="width: 100%" Height="22px"></asp:DropDownList>
</div> </div>
</div> </div>
@@ -310,58 +310,67 @@
<div class="row"> <div class="row">
<label title="Condiciones de Pago" data-toggle="tooltip" class="col-md-1 truncate">Condiciones Pago:</label> <label title="Condiciones de Pago" data-toggle="tooltip" class="col-md-1 truncate">Condiciones Pago:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;" > <asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem> <asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
<asp:ListItem Text="Contado" Value="0"></asp:ListItem> <asp:ListItem Text="Contado" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label title="Es parte relacionada" data-toggle="tooltip" class="col-md-1 truncate" runat="server" id="Label4">Parte Relacionada:</label>
<div class="col-md-2" runat="server" id="DivFilial">
<asp:DropDownList ID="DdlFilial" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Solo parte relacionadas" Value="1"></asp:ListItem>
<asp:ListItem Text="Sin parte relacionadas" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false"> <div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
Garantía?: Garantía?:
</div> </div>
<div class="col-md-2" id="divgarantia2" runat="server" visible="false"> <div class="col-md-2" id="divgarantia2" runat="server" visible="false">
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%"> <asp:DropDownList runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem> <asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem> <asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:Dropdownlist> </asp:DropDownList>
</div> </div>
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" id="divdistribuidor1" runat="server" visible="false">Distribuidor:</label> <label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" id="divdistribuidor1" runat="server" visible="false">Distribuidor:</label>
<div class="col-md-2" id="divdistribuidor2" runat="server" visible="false"> <div class="col-md-2" id="divdistribuidor2" runat="server" visible="false">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem> <asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem> <asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div runat="server" id="DvLitraje" class="col-md-1" visible="false"> <div runat="server" id="DvLitraje" class="col-md-1" visible="false">
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text ="Litraje:&nbsp;&nbsp;&nbsp;" TextAlign="Left" /> <asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text="Litraje:&nbsp;&nbsp;&nbsp;" TextAlign="Left" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Lectura administrativa:</label> <label class="col-md-1 truncate">Lectura administrativa:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" /> <asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
</div> </div>
<label class="col-md-1 truncate" id="divClasif2texto" runat="server" visible="false">Clasificación 2:</label> <label class="col-md-1 truncate" id="divClasif2texto" runat="server" visible="false">Clasificación 2:</label>
<div class="col-md-2" id="divClasif2" runat="server" visible="false"> <div class="col-md-2" id="divClasif2" runat="server" visible="false">
<asp:DropDownList ID="DdlClasificacion2" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%"> <asp:DropDownList ID="DdlClasificacion2" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label> <asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio" Visible="false"> <div class="col-md-2" runat="server" id="DVServicioDomicilio" visible="false">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%" > <asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem> <asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem> <asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem> <asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
@@ -424,7 +433,7 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<table class="table table-striped table-advance table-hover Widthall"> <table class="table table-striped table-advance table-hover Widthall">
<tbody> <tbody>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" /> <asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" />
@@ -447,9 +456,9 @@
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" Visible ="false" /> <asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" Visible="false" />
</td> </td>
<td style="text-align: left;"> </td> <td style="text-align: left;"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@@ -242,7 +242,7 @@ Partial Class Ventas_RepProductosServicios
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable, CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero,
ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero) Then ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero()) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados
If UsuarioActual.CveEmpresa = 140 Then If UsuarioActual.CveEmpresa = 140 Then
@@ -322,13 +322,13 @@ Partial Class Ventas_RepProductosServicios
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1") FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1") FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
Dim Liga As String = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}&CveClienteSucursal={37}&CveClasificacion2={38}&ServicioDomicilio={39}", Dim Liga As String = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}&CveClienteSucursal={37}&CveClasificacion2={38}&ServicioDomicilio={39}&EsFilial={40}",
e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"),
e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"),
e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"), e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"),
FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca,
CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(Not ChkLecturaAdmin.Checked, 1, 0), CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(Not ChkLecturaAdmin.Checked, 1, 0),
e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("CveCondicionesPago"), IIf(e.Row.DBCampo("MostrarLitraje") = "True", 1, 0), e.Row.DBCampo("EsDistribuidor"), e.Row.DBCampo("CveClienteSucursal").ToString.ToEntero, e.Row.DBCampo("CveClasificacion2"), DdlServicioDomicilio.SelectedValue.ToEntero) e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("CveCondicionesPago"), IIf(e.Row.DBCampo("MostrarLitraje") = "True", 1, 0), e.Row.DBCampo("EsDistribuidor"), e.Row.DBCampo("CveClienteSucursal").ToString.ToEntero, e.Row.DBCampo("CveClasificacion2"), DdlServicioDomicilio.SelectedValue.ToEntero, e.Row.DBCampo("EsFilial"))
e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.DBCampo("Gpo")) e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.DBCampo("Gpo"))

View File

@@ -54,7 +54,7 @@
</asp:UpdatePanel>--%> </asp:UpdatePanel>--%>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<li> <li>
<asp:LinkButton ID="ImgImprimir" runat="server" Enabled="true"> <i class="fa fa-file-pdf-o"></i> PDF</asp:LinkButton> <asp:LinkButton ID="ImgImprimir" runat="server" Enabled="true"> <i class="fa fa-file-pdf-o"></i> PDF</asp:LinkButton>
</li> </li>
<li> <li>
@@ -66,7 +66,7 @@
<li> <li>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink> <asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
</li> </li>
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li>
@@ -218,7 +218,7 @@
<div class="row"> <div class="row">
<label class="col-md-1 ">Estatus:</label> <label class="col-md-1 ">Estatus:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%"> <asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -262,7 +262,7 @@
<div class="row"> <div class="row">
<label class="col-md-1 truncate">Usuario:</label> <label class="col-md-1 truncate">Usuario:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%"> <asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -286,7 +286,7 @@
<div class="row"> <div class="row">
<label title="Giro del Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Giro Cliente:</label> <label title="Giro del Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Giro Cliente:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion" Style="width: 100%"></asp:DropDownList> <asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion" Style="width: 100%"></asp:DropDownList>
</div> </div>
<label title="Proveedor" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Proveedor:</label> <label title="Proveedor" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Proveedor:</label>
<div class="col-md-2"> <div class="col-md-2">
@@ -306,7 +306,7 @@
<div class="row"> <div class="row">
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label> <label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%"> <asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem> <asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem> <asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
@@ -324,13 +324,13 @@
Garantía?: Garantía?:
</div> </div>
<div class="col-md-1" id="divgarantia2" runat="server" visible="false"> <div class="col-md-1" id="divgarantia2" runat="server" visible="false">
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%"> <asp:DropDownList runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem> <asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem> <asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:Dropdownlist> </asp:DropDownList>
</div> </div>
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" id="divdistribuidor1" runat="server" visible="false">Distribuidor:</label> <label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" id="divdistribuidor1" runat="server" visible="false">Distribuidor:</label>
<div class="col-md-2" id="divdistribuidor2" runat="server" visible="false"> <div class="col-md-2" id="divdistribuidor2" runat="server" visible="false">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
@@ -340,17 +340,17 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div runat="server" id="DvLitraje" class="col-md-1" visible="false"> <div runat="server" id="DvLitraje" class="col-md-1" visible="false">
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text ="Litraje:&nbsp;&nbsp;&nbsp;" TextAlign="Left" /> <asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text="Litraje:&nbsp;&nbsp;&nbsp;" TextAlign="Left" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 truncate" id="LblClienteSucursal" runat="server">Cliente Sucursal:</label> <label class="col-md-1 truncate" id="LblClienteSucursal" runat="server">Cliente Sucursal:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlClienteSucursal" runat="server" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal" <asp:DropDownList ID="DdlClienteSucursal" runat="server" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal"
CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%" > CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -361,22 +361,29 @@
<div class="col-md-2"> <div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" Text="Lectura admiva:" TextAlign="Left" /> <asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" Text="Lectura admiva:" TextAlign="Left" />
</div> </div>
<label class="col-md-1 truncate" id="divClasif2texto" runat="server" visible="false">Clasificación 2:</label> <label class="col-md-1 truncate" id="divClasif2texto" runat="server" visible="false">Clasificación 2:</label>
<div class="col-md-2" id="divClasif2" runat="server" visible="false"> <div class="col-md-2" id="divClasif2" runat="server" visible="false">
<asp:DropDownList ID="DdlClasificacion2" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%"> <asp:DropDownList ID="DdlClasificacion2" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%" Visible="false" >
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList>
</div> </div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%" Visible="false">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList>
</div>
<label title="Es parte relacionada" data-toggle="tooltip" class="col-md-1 truncate" runat="server" id="Label4">Parte Relacionada:</label>
<div class="col-md-2" runat="server" id="DivFilial">
<asp:DropDownList ID="DdlFilial" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Solo parte relacionadas" Value="1"></asp:ListItem>
<asp:ListItem Text="Sin parte relacionadas" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
@@ -427,7 +434,7 @@
<%--17--%> <%--17--%>
<asp:BoundField HeaderText="Forma de Pago" DataField="FormaPago" ItemStyle-Width="5%" Visible="false" /> <asp:BoundField HeaderText="Forma de Pago" DataField="FormaPago" ItemStyle-Width="5%" Visible="false" />
<%--18--%> <%--18--%>
<asp:BoundField HeaderText="Fecha Hora de Emisión" DataField="FechaIng" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Center" Visible="false" /> <asp:BoundField HeaderText="Fecha Hora de Emisión" DataField="FechaIng" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Center" Visible="false" />
<%--19--%> <%--19--%>
<asp:BoundField HeaderText="Num. Turnos" DataField="NumTurnos" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" Visible="false" /> <asp:BoundField HeaderText="Num. Turnos" DataField="NumTurnos" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" Visible="false" />
<%--20--%> <%--20--%>
@@ -477,7 +484,7 @@
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="Forma de Pago" /> <asp:CheckBox ID="ChkFormaPago" runat="server" Text="Forma de Pago" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O.C." /> <asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O.C." />
</td> </td>
@@ -486,19 +493,17 @@
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O.C. Cantidad" /> <asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O.C. Cantidad" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text="Fecha Hora de Emisión" /> <asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text="Fecha Hora de Emisión" />
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkNumTurnos" runat="server" Text="Número de turnos" Visible="false" /> <asp:CheckBox ID="ChkNumTurnos" runat="server" Text="Número de turnos" Visible="false" />
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;"></td>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@@ -456,7 +456,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero,
ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero,
ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero) Then ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero()) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
TmpDT = ObjVentas.DtResultados TmpDT = ObjVentas.DtResultados
Else Else

View File

@@ -157,7 +157,7 @@ Partial Class RepRemisiones
GvDatos.Columns(1).HeaderText = "Fecha Cirugía" GvDatos.Columns(1).HeaderText = "Fecha Cirugía"
CType(GvDatos.Columns(1), HyperLinkField).DataTextFormatString = "{0:dd/MM/yyyy HH:mm}" CType(GvDatos.Columns(1), HyperLinkField).DataTextFormatString = "{0:dd/MM/yyyy HH:mm}"
CType(GvDatos.Columns(1), HyperLinkField).ItemStyle.Width = Unit.Pixel(120) CType(GvDatos.Columns(1), HyperLinkField).ItemStyle.Width = Unit.Pixel(120)
GvDatos.Columns(15).Visible = True GvDatos.Columns(16).Visible = True
End If End If
End Sub End Sub

View File

@@ -161,6 +161,13 @@ Partial Class Ventas_RepVentas
DivFacturaGlobal.Visible = True DivFacturaGlobal.Visible = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If Opcion <> "Cot" Then
DdlTipoComprobante.SelectedValuesIfExistM("Ing")
End If
End If
PrePersonalizacion() PrePersonalizacion()
CargaPersonalizacion() CargaPersonalizacion()

View File

@@ -282,7 +282,7 @@
<div id="DivModalPorcetajes" class="modal ADS fade" role="dialog"> <div id="DivModalPorcetajes" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalPorcentajes" UpdateMode="Conditional"> <asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalPorcentajes" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="modal-content" style="width:700px!important"> <div class="modal-content" style="width:800px!important">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title"> <h4 class="modal-title">
@@ -340,7 +340,6 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GvPorcentajes" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" <asp:GridView ID="GvPorcentajes" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados"
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" OnRowDataBound="GvPorcentajes_RowDataBound" > CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" OnRowDataBound="GvPorcentajes_RowDataBound" >
@@ -356,7 +355,7 @@
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataField="Costo" DataFormatString="{0:N}" ItemStyle-Width="90px" /> <asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataField="Costo" DataFormatString="{0:N}" ItemStyle-Width="90px" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="% Neto" DataField="PorNeto" DataFormatString="{0:N}" ItemStyle-Width="70px" /> <asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="% Neto" DataField="PorNeto" DataFormatString="{0:N}" ItemStyle-Width="70px" />
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderText="Vendedor" DataField="Vendedor" ItemStyle-Width="100px" /> <asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderText="Vendedor" DataField="Vendedor" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -655,6 +655,18 @@
<asp:Label runat="server" ID="LblTipoVenta"></asp:Label> <asp:Label runat="server" ID="LblTipoVenta"></asp:Label>
</td> </td>
</tr> </tr>
<tr runat="server" id="TrVentasMedicas5" visible="false">
<td >
<b>Educ. Médica:</b>
</td>
<td runat="server">
<asp:TextBox ID="TxtEducMedica" runat="server" Style="width: 130px" MaxLength="50"></asp:TextBox>
</td>
<td >
</td>
<td runat="server">
</td>
</tr>
</table> </table>
</div> </div>
</div> </div>
@@ -7426,7 +7438,7 @@
<span class="input-group-addon">%</span> <span class="input-group-addon">%</span>
</div> </div>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" TargetControlID="TxtNCPorcentaje" FilterType="Custom, Numbers" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" TargetControlID="TxtNCPorcentaje" FilterType="Custom, Numbers" ValidChars="." />
<asp:RangeValidator ID="RVNCPorcentaje" runat="server" Type="Double" MinimumValue="0.01" MaximumValue="100.00" ErrorMessage="El campo <b>''Porcentaje''</b> debe estar entre 1 y el porcentaje máximo de la factura(Saldo)." ControlToValidate="TxtNCPorcentaje" Display="None" ValidationGroup="GrpModalAplicarNC"></asp:RangeValidator> <asp:RangeValidator ID="RVNCPorcentaje" runat="server" Type="Double" MinimumValue="0.0001" MaximumValue="100.00" ErrorMessage="El campo <b>''Porcentaje''</b> debe estar entre 1 y el porcentaje máximo de la factura(Saldo)." ControlToValidate="TxtNCPorcentaje" Display="None" ValidationGroup="GrpModalAplicarNC"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCENCPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RVNCPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCENCPorcentaje" runat="server" HighlightCssClass="vco" TargetControlID="RVNCPorcentaje" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>

View File

@@ -7657,7 +7657,9 @@ Partial Class Ventas
UpFacturasRelacionadas.Update() UpFacturasRelacionadas.Update()
End Sub End Sub
Protected Sub CreaTmpFacturasRelacionadas() Protected Sub CreaTmpFacturasRelacionadas()
If CveVenta <= 0 OrElse EsCreaApartirDe OrElse Me.AplicoNCFacturaActual Then Dim AplicaRelacionManual As Boolean = CveVenta <= 0 OrElse EsCreaApartirDe OrElse Me.AplicoNCFacturaActual OrElse Me.NuevaFactura = 1
If AplicaRelacionManual Then
Me.TmpDTFacturasRelacionadas = New DataTable() Me.TmpDTFacturasRelacionadas = New DataTable()
Me.TmpDTFacturasRelacionadas.Columns.Add(New DataColumn("CveVenta", GetType(Integer))) Me.TmpDTFacturasRelacionadas.Columns.Add(New DataColumn("CveVenta", GetType(Integer)))
Me.TmpDTFacturasRelacionadas.Columns.Add(New DataColumn("SerieFolio", GetType(String))) Me.TmpDTFacturasRelacionadas.Columns.Add(New DataColumn("SerieFolio", GetType(String)))
@@ -7665,7 +7667,9 @@ Partial Class Ventas
End If End If
End Sub End Sub
Protected Sub LnkAgregarFacturaRelacionada_Click(sender As Object, e As EventArgs) Protected Sub LnkAgregarFacturaRelacionada_Click(sender As Object, e As EventArgs)
If CveVenta <= 0 OrElse EsCreaApartirDe OrElse Me.AplicoNCFacturaActual Then Dim AplicaRelacionManual As Boolean = CveVenta <= 0 OrElse EsCreaApartirDe OrElse Me.AplicoNCFacturaActual OrElse Me.NuevaFactura = 1
If AplicaRelacionManual Then
If Me.TmpDTFacturasRelacionadas Is Nothing Then If Me.TmpDTFacturasRelacionadas Is Nothing Then
CreaTmpFacturasRelacionadas() CreaTmpFacturasRelacionadas()
End If End If
@@ -7696,7 +7700,9 @@ Partial Class Ventas
End Sub End Sub
Protected Sub LnkAgregarFolioFiscalRelacionada_Click(sender As Object, e As EventArgs) Protected Sub LnkAgregarFolioFiscalRelacionada_Click(sender As Object, e As EventArgs)
If CveVenta <= 0 OrElse EsCreaApartirDe OrElse Me.AplicoNCFacturaActual Then Dim AplicaRelacionManual As Boolean = CveVenta <= 0 OrElse EsCreaApartirDe OrElse Me.AplicoNCFacturaActual OrElse Me.NuevaFactura = 1
If AplicaRelacionManual Then
If Me.TmpDTFacturasRelacionadas Is Nothing Then If Me.TmpDTFacturasRelacionadas Is Nothing Then
CreaTmpFacturasRelacionadas() CreaTmpFacturasRelacionadas()
End If End If
@@ -7726,7 +7732,8 @@ Partial Class Ventas
End Sub End Sub
Protected Sub BtnAgregarFacturasRelaciondas_Click(sender As Object, e As EventArgs) Protected Sub BtnAgregarFacturasRelaciondas_Click(sender As Object, e As EventArgs)
If CveVenta <= 0 OrElse EsCreaApartirDe OrElse Me.AplicoNCFacturaActual Then Dim AplicaRelacionManual As Boolean = CveVenta <= 0 OrElse EsCreaApartirDe OrElse Me.AplicoNCFacturaActual OrElse Me.NuevaFactura = 1
If AplicaRelacionManual Then
If Me.TmpDTFacturasRelacionadas Is Nothing OrElse Me.TmpDTFacturasRelacionadas.Rows.Count = 0 Then If Me.TmpDTFacturasRelacionadas Is Nothing OrElse Me.TmpDTFacturasRelacionadas.Rows.Count = 0 Then
Me.AplicaRelacionManual = False Me.AplicaRelacionManual = False
Alert("No hay facturas para relacionar", TipoMensaje.MsgAdvertencia) Alert("No hay facturas para relacionar", TipoMensaje.MsgAdvertencia)
@@ -8946,10 +8953,10 @@ Partial Class Ventas
e.Row.FCTextBox("TxtNumTurnosEditar").Visible = True e.Row.FCTextBox("TxtNumTurnosEditar").Visible = True
End If End If
'If UsuarioActual.CveEmpresa = 119 Then 'LA COLUMNA DE ELIMINACION NO DEBE ESTAR VISIBLE EN EL MODO EDICION
' e.Row.FCTextBox("TxtDescuento").Enabled = False If GvPS.Columns(19).Visible Then
'End If e.Row.FCLinkButton("imgD").Visible = False
End If
Else Else
@@ -9006,8 +9013,19 @@ Partial Class Ventas
If CveVenta > 0 Then 'And e.Row.DBCampo("TipoDocto") = "Rem" If CveVenta > 0 Then 'And e.Row.DBCampo("TipoDocto") = "Rem"
If ModalidadEdicion Then If ModalidadEdicion Then
e.Row.FCLinkButton("imgE").Visible = Not e.Row.DBCampo("CantidadFacturadaRem").ToDouble > 0 Select Case e.Row.DBCampo("TipoDocto")
e.Row.FCLinkButton("imgD").Visible = Not e.Row.DBCampo("CantidadInventario").ToDouble > 0 Case "Cot"
e.Row.FCLinkButton("imgE").Visible = Not e.Row.DBCampo("CantidadFacturadaCot").ToDouble > 0
e.Row.FCLinkButton("imgD").Visible = Not e.Row.DBCampo("CantidadFacturadaCot").ToDouble > 0
Case "Ped"
e.Row.FCLinkButton("imgE").Visible = Not e.Row.DBCampo("CantidadFacturadaPed2").ToDouble > 0
e.Row.FCLinkButton("imgD").Visible = Not e.Row.DBCampo("CantidadFacturadaPed2").ToDouble > 0
Case Else
e.Row.FCLinkButton("imgE").Visible = Not e.Row.DBCampo("CantidadFacturadaRem").ToDouble > 0
e.Row.FCLinkButton("imgD").Visible = Not e.Row.DBCampo("CantidadInventario").ToDouble > 0 AndAlso Not e.Row.DBCampo("CantidadFacturadaRem").ToDouble > 0
End Select
ElseIf Not CveDevolucion > 0 Then ElseIf Not CveDevolucion > 0 Then
e.Row.FCLinkButton("imgE").Visible = False e.Row.FCLinkButton("imgE").Visible = False
e.Row.FCLinkButton("imgD").Visible = False e.Row.FCLinkButton("imgD").Visible = False
@@ -9292,7 +9310,8 @@ Partial Class Ventas
End If End If
'SI ESTA HABILITADO LA OPCION DE DESCUENTO, SE AGREGO UN DESCUENTO MANUAL Y NO TIENE PROMOCION 'SI ESTA HABILITADO LA OPCION DE DESCUENTO, SE AGREGO UN DESCUENTO MANUAL Y NO TIENE PROMOCION
If GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Enabled AndAlso CvePSAnterior = CvePSNuevo Then 'AndAlso (ObjDescuento.CvePromocionDetalle <= 0 AndAlso ObjDescuento.ImporteDescuento <= 0) Then
If GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Enabled AndAlso CvePSAnterior = CvePSNuevo AndAlso Not (ObjDescuento.NombrePromo = "CONDICIONES COMERCIALES") Then
ObjDescuento.ImporteDescuento = DescuentoManual ObjDescuento.ImporteDescuento = DescuentoManual
End If End If
@@ -9360,14 +9379,20 @@ Partial Class Ventas
Dim Proyecto As String = "" Dim Proyecto As String = ""
Dim CveProyecto As Integer = -1 Dim CveProyecto As Integer = -1
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem IsNot Nothing Then 'VER SI ESTA VISIBLE EL PROYECTO
Proyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem.Text If GvPS.Columns(8).Visible Then
CveProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedValue.ToEntero() If GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem IsNot Nothing Then
End If Proyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem.Text
CveProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedValue.ToEntero()
End If
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem IsNot Nothing Then If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem IsNot Nothing Then
SubProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text SubProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text
CveSubProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero() CveSubProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero()
Else
SubProyecto = DdlSubProyectoDatos.SelectedItem.Text
CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
End If
Else Else
SubProyecto = DdlSubProyectoDatos.SelectedItem.Text SubProyecto = DdlSubProyectoDatos.SelectedItem.Text
CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero() CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
@@ -9476,16 +9501,23 @@ Partial Class Ventas
TmpDT.Rows(e.RowIndex)("PrecioLista") = PrecioLista TmpDT.Rows(e.RowIndex)("PrecioLista") = PrecioLista
End If End If
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").Items.Count = 0 Then 'VER SI ESTA VISIBLE EL PROYECTO
TmpDT.Rows(e.RowIndex)("SubProyecto") = "Sin SubProyecto Asignado" If GvPS.Columns(8).Visible Then
Else If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").Items.Count = 0 Then
'si está visible en el encabezado, si no esta visible que no actualice, porque generar error, selecciona el primer item TmpDT.Rows(e.RowIndex)("SubProyecto") = "Sin SubProyecto Asignado"
If DdlSubProyecto.Visible Then Else
TmpDT.Rows(e.RowIndex)("SubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text 'si está visible en el encabezado, si no esta visible que no actualice, porque generar error, selecciona el primer item
TmpDT.Rows(e.RowIndex)("CveSubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue If DdlSubProyecto.Visible Then
TmpDT.Rows(e.RowIndex)("SubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text
TmpDT.Rows(e.RowIndex)("CveSubProyecto") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue
End If
End If End If
Else
TmpDT.Rows(e.RowIndex)("SubProyecto") = DdlSubProyectoDatos.SelectedItem.Text
TmpDT.Rows(e.RowIndex)("CveSubProyecto") = DdlSubProyectoDatos.SelectedValue.ToEntero()
End If End If
'RELACIONAL PS CON EL DESCUENTO 'RELACIONAL PS CON EL DESCUENTO
If ObjDescuento IsNot Nothing Then If ObjDescuento IsNot Nothing Then
ObjDescuento.Consec = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero() ObjDescuento.Consec = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
@@ -10252,7 +10284,7 @@ Partial Class Ventas
'VALIDA PROMOCIONES Y EXISTENCIAS 'VALIDA PROMOCIONES Y EXISTENCIAS
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then
DtPromociones = ObjVentas.DtResultados DtPromociones = ObjVentas.DtResultados.Copy()
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
@@ -10546,6 +10578,31 @@ Partial Class Ventas
Exit Sub Exit Sub
End If End If
'VALIDAR CONDICONES COMERCIALES
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot") Then
CargaPorcentajeMarcas()
Dim ValidoDescuentos As Boolean = True
If DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
For Each Row As DataRow In TmpDT.Rows
Dim CvePS As Integer = Row("CvePS").ToString().ToEntero()
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
Dim PU As Decimal = Row("PU").ToString().ToDecimal()
Dim Descuento As Decimal = Row("Descuento").ToString().ToDecimal()
If Not ValidaPorcentajeMarcas(CvePS, Cantidad, PU, Descuento) Then
ValidoDescuentos = False
Exit For
End If
Next
End If
If Not ValidoDescuentos Then
Exit Sub
End If
End If
'validaciones, si es Anticipo solo permitir "servicios de facturación" y si es ingreso todos menos serv. factu 'validaciones, si es Anticipo solo permitir "servicios de facturación" y si es ingreso todos menos serv. factu
If UsuarioActual.Empresa.Funcionalidad(601) <> "" Then If UsuarioActual.Empresa.Funcionalidad(601) <> "" Then
If UsuarioActual.Empresa.Funcionalidad(601) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Ant" Then 'valida anticipo que tenga conceptos válidos If UsuarioActual.Empresa.Funcionalidad(601) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Ant" Then 'valida anticipo que tenga conceptos válidos
@@ -14536,6 +14593,7 @@ Partial Class Ventas
CveMedico = DdlMedico.SelectedValue.ToEntero CveMedico = DdlMedico.SelectedValue.ToEntero
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero) CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero)
factura.Alfa2 = TxtEducMedica.Text.Trim
'CveAlmacenTraspasoDestino 'CveAlmacenTraspasoDestino
End If End If
@@ -14590,13 +14648,18 @@ Partial Class Ventas
Else Else
'SI ES REFACTURACION DEBE AGREGAR LA VENTA ANTERIOR COMO RELACIONADA TAMBIEN 'SI ES REFACTURACION DEBE AGREGAR LA VENTA ANTERIOR COMO RELACIONADA TAMBIEN
If Not CveVenta = -1 Then If Not CveVenta = -1 Then
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveVenta) Then If Not Me.AplicaRelacionManual Then
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico") If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveVenta) Then
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico")
End If
End If End If
Else Else
If CveEstatusRefacturacion > 0 AndAlso CveDevolucion > 0 Then If CveEstatusRefacturacion > 0 AndAlso CveDevolucion > 0 Then
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveDevolucion) Then 'SI TIENE RELACION MANUAL, TOMAR DE AHI
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico") If Not Me.AplicaRelacionManual Then
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, CveDevolucion) Then
ErrorList.Add("Ocurrió un error al relacionar las ventas entre si comuníquese a Soporte Técnico")
End If
End If End If
End If End If
End If End If
@@ -20347,6 +20410,8 @@ Partial Class Ventas
PUModificado = (Costo + (Costo * PromocionPorcentaje / 100D)).RoundSQL(4) PUModificado = (Costo + (Costo * PromocionPorcentaje / 100D)).RoundSQL(4)
End If End If
Dim TieneCondicionesComerciales As Boolean = False
'VERIFICA SI APLICAN CONDICIONES COMERCIALES 'VERIFICA SI APLICAN CONDICIONES COMERCIALES
If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA 'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA
@@ -20364,6 +20429,8 @@ Partial Class Ventas
Dim TotalFinal As Decimal = TotalInicial Dim TotalFinal As Decimal = TotalInicial
'SI APLICA EL PRIMER DESCUENTO 'SI APLICA EL PRIMER DESCUENTO
If PorcentajeProducto > 0 Then If PorcentajeProducto > 0 Then
TieneCondicionesComerciales = True
Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2) Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2)
Dim Total2 As Decimal = (TotalInicial - Descuento1) Dim Total2 As Decimal = (TotalInicial - Descuento1)
@@ -20388,6 +20455,8 @@ Partial Class Ventas
If PorcentajeProducto > 0 Then If PorcentajeProducto > 0 Then
Descuento += ((Cantidad * PU) - TotalFinal) Descuento += ((Cantidad * PU) - TotalFinal)
ObjDescuento.NombrePromo = "CONDICIONES COMERCIALES"
End If End If
'SI TIENE PRONTO PAGO CALCULA EL IMPORTE 'SI TIENE PRONTO PAGO CALCULA EL IMPORTE
@@ -20408,7 +20477,7 @@ Partial Class Ventas
Alert("No se calculó el descuento correctamente", TipoMensaje.MsgAdvertencia) Alert("No se calculó el descuento correctamente", TipoMensaje.MsgAdvertencia)
End If End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not TieneCondicionesComerciales Then
'LTH AA Paq. 2 baterias, LTH AAA Paq. 02 baterias, LTH AA Paq. 4 baterias, LTH AAA Paq. 4 Baterias 'LTH AA Paq. 2 baterias, LTH AAA Paq. 02 baterias, LTH AA Paq. 4 baterias, LTH AAA Paq. 4 Baterias
If CvePS.Contiene(521445, 521448, 402917, 402918) Then If CvePS.Contiene(521445, 521448, 402917, 402918) Then
'SI TIENE BATERIAS AGREGADAS CON LA MARCA LTH, APLICAR PROMOCION, LA CLASIFICACION DEBE SER ACUMULADORES 'SI TIENE BATERIAS AGREGADAS CON LA MARCA LTH, APLICAR PROMOCION, LA CLASIFICACION DEBE SER ACUMULADORES
@@ -20452,6 +20521,110 @@ Partial Class Ventas
Return ObjDescuento Return ObjDescuento
End Function End Function
Public Function ValidaPorcentajeMarcas(CvePS As Integer, Cantidad As Decimal, PU As Decimal, DescPS As Decimal) As Boolean
Dim Retorno As Boolean = False
Dim Descuento As Decimal = 0
Dim ValidaCondicionesComerciales As Boolean = True
Dim CveMarcaPS As Integer = -1
Dim CveClasifPS As Integer = -1
Dim CveRinTamañoPS As Integer = -1
Dim PSCodigo As String = ""
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DrPS IsNot Nothing Then
CveMarcaPS = DrPS("CveMarca").ToString().ToEntero()
CveClasifPS = DrPS("CveClasificacion").ToString().ToEntero()
CveRinTamañoPS = DrPS("CveRinTamaño").ToString().ToEntero()
PSCodigo = DrPS("PSCodigo").ToString()
If CveClasifPS = 20636 Then
ValidaCondicionesComerciales = False
End If
'CAMBIO DE VIGENCIA NO SE APLICAN DESCUENTOS
If CveClasifPS = 20637 Then
Descuento = 0
Retorno = True
Return Retorno
End If
End If
If ValidaCondicionesComerciales Then
'VERIFICA SI APLICAN CONDICIONES COMERCIALES
If DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA
If Not String.IsNullOrEmpty(DrPS("CveMarca").ToString()) AndAlso DrPS("CveMarca").ToString().ToEntero() > 0 Then
Dim RowPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero($"CveMarca={DrPS("CveMarca").ToString()}")
'REALIZA LOS DESCUENTOS DE ACUERDO AL PORCENTAJE POR MARCA
If RowPorcentaje IsNot Nothing Then
'(AHORA LOS DESCUENTOS SON ACUMULABLES)
'Descuento = 0
Dim PorcentajeProducto As Decimal = RowPorcentaje("PorcentajeProducto").ToString().ToDecimal() / 100D
Dim PorcentajeProducto2 As Decimal = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D
Dim PorcentajeProducto3 As Decimal = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D
Dim TotalInicial As Decimal = (Cantidad * (PU)) '- Descuento
Dim TotalFinal As Decimal = TotalInicial
'SI APLICA EL PRIMER DESCUENTO
If PorcentajeProducto > 0 Then
Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2)
Dim Total2 As Decimal = (TotalInicial - Descuento1)
'SI APLICA EL SEGUNDO DESCUENTO
If PorcentajeProducto2 > 0 Then
Dim Descuento2 As Decimal = (Total2 * PorcentajeProducto2).RoundSQL(2)
Dim Total3 As Decimal = (Total2 - Descuento2)
'SI APLICA EL TERCER DESCUENTO
If PorcentajeProducto3 > 0 Then
Dim Descuento3 As Decimal = (Total3 * PorcentajeProducto3).RoundSQL(2)
TotalFinal = Total3 - Descuento3
Else
TotalFinal = Total3
End If
Else
TotalFinal = Total2
End If
Else
TotalFinal = TotalInicial
End If
If PorcentajeProducto > 0 Then
Descuento += ((Cantidad * PU) - TotalFinal)
End If
If Descuento.RoundSQL(2) <> DescPS.RoundSQL(2) Then
Retorno = False
Else
Retorno = True
End If
Else
Retorno = True
End If
Else
Retorno = True
End If
Else
Retorno = True
End If
Else
Retorno = True
End If
If Not Retorno Then
Alert($"No coinciden las condiciones comerciales con el descuento.<br/> Cantidad: {Cantidad.FormatoNumero()} <br/>Producto: <span style='font-weight: bold;'>'{PSCodigo}'</span><br/>Precio: {PU.FormatoNumero()} <br/>Descuento: <span style='color:red;'>{DescPS.FormatoNumero()}</span><br/> Descuento por condiciones comerciales: {Descuento.FormatoNumero()}", TipoMensaje.MsgError)
End If
Return Retorno
End Function
'Private ReadOnly Property ClasificacionesDescuentos As Dictionary(Of Integer, Decimal) 'Private ReadOnly Property ClasificacionesDescuentos As Dictionary(Of Integer, Decimal)
' Get ' Get
' Return New Dictionary(Of Integer, Decimal) From { ' Return New Dictionary(Of Integer, Decimal) From {
@@ -21191,13 +21364,28 @@ Partial Class Ventas
End If End If
End If End If
Dim DescAdicional As Decimal = 0
Dim CvePromoDetalle As Integer = -1
Dim ObjDesc As New VentaDescuentos
If PrecioSugerido > 0 Then If PrecioSugerido > 0 Then
PU = PrecioSugerido PU = PrecioSugerido
ObjDesc = CalcularDescuentos(CvePSAdicional, DrPoliza("Cantidad").ToString().ToDecimal(), PU)
If ObjDesc IsNot Nothing Then
If ObjDesc.EsPUModificado Then
PU = ObjDesc.PU
End If
DescAdicional = ObjDesc.ImporteDescuento
CvePromoDetalle = ObjDesc.CvePromocionDetalle
End If
End If End If
PU = PU.RoundSQL(6) PU = PU.RoundSQL(6)
DrPoliza("PU") = PU DrPoliza("PU") = PU
TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU)) TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU) - DescAdicional)
If DrPSAdicional("IVA").ToString().Contiene("-1", "") Then If DrPSAdicional("IVA").ToString().Contiene("-1", "") Then
DrPoliza("PorcentajeIVA") = PorcentajeIVA DrPoliza("PorcentajeIVA") = PorcentajeIVA
@@ -21213,7 +21401,7 @@ Partial Class Ventas
DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje") DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje")
DrPoliza("ImporteIEPS") = (DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) DrPoliza("ImporteIEPS") = (DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
DrPoliza("IEPS") = DrPoliza("ImporteIEPS") DrPoliza("IEPS") = DrPoliza("ImporteIEPS")
DrPoliza("Descuento") = 0 ' Descuento DrPoliza("Descuento") = DescAdicional ' Descuento
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU) DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU)
DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales) DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales)
@@ -21221,7 +21409,7 @@ Partial Class Ventas
DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS") DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS")
DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida") DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida")
DrPoliza("CveActivoFijo") = -1 DrPoliza("CveActivoFijo") = -1
DrPoliza("CvePromocionDetalle") = -1 DrPoliza("CvePromocionDetalle") = CvePromoDetalle
TmpDT.Rows.Add(DrPoliza) TmpDT.Rows.Add(DrPoliza)
End If End If
@@ -27086,6 +27274,12 @@ Partial Class Ventas
End If End If
End Using End Using
End If End If
'If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.TienePermisoProceso(269) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Dev") Then
' ChkDevAlm.Checked = True
' ChkDevAlm.Enabled = False
'End If
End If End If
End If End If
@@ -27493,7 +27687,7 @@ Partial Class Ventas
' CancelacionPagos = OpcionesCancelacionPagos.ConPagos_GenerarIxC ' CancelacionPagos = OpcionesCancelacionPagos.ConPagos_GenerarIxC
'End If 'End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem") AndAlso Not EsRefacturacion Then If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Rem", "Dev") AndAlso Not EsRefacturacion Then
If ChkDevAlm.Checked Then If ChkDevAlm.Checked Then
GenerarDevolucionAnticipada = True GenerarDevolucionAnticipada = True
@@ -31299,6 +31493,18 @@ Partial Class Ventas
AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento, AplicoNCFacturaActual:=True) AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento, AplicoNCFacturaActual:=True)
If UsuarioActual.CveEmpresa.Contiene(199, 201) Then
TxtObsFact.Text = ""
TxtOrdenCompra.Text = ""
TxtPedidoContrato.Text = ""
TxtObsAlmacen.Text = ""
TxtObsFact.Enabled = True
TxtOrdenCompra.Enabled = True
TxtPedidoContrato.Enabled = True
TxtObsAlmacen.Enabled = True
End If
End Sub End Sub
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False, Optional TipoDoctoNC As String = "Egs") Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False, Optional TipoDoctoNC As String = "Egs")
@@ -39736,6 +39942,7 @@ Partial Class Ventas
TrVentasMedicas1.Visible = True TrVentasMedicas1.Visible = True
TrVentasMedicas2.Visible = True TrVentasMedicas2.Visible = True
TrVentasMedicas3.Visible = True TrVentasMedicas3.Visible = True
TrVentasMedicas5.Visible = True
For Each item As ListItem In RBLTipoVenta.Items For Each item As ListItem In RBLTipoVenta.Items
item.Text = $"&nbsp {item.Text}" item.Text = $"&nbsp {item.Text}"
@@ -39744,6 +39951,7 @@ Partial Class Ventas
If Opcion = "Cot" Then If Opcion = "Cot" Then
'TrVentasMedicas2.Visible = False 'TrVentasMedicas2.Visible = False
TrVentasMedicas3.Visible = False TrVentasMedicas3.Visible = False
TrVentasMedicas5.Visible = False
Else Else
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });") RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
End If End If
@@ -40346,7 +40554,7 @@ Partial Class Ventas
If resp.Verificado Then If resp.Verificado Then
Dim CancelacionAcuse = resp.CancelacionAcuse Dim CancelacionAcuse = resp.CancelacionAcuse
Using ObjVentas As New ClsVentas Using ObjVentas As New ClsVentas
If Not ObjVentas.UpdateCancelaVenta(CveVenta, Now, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion, -1, EstadoCancelacion:="", CveEstadoCancelacion:=-1) Then If Not ObjVentas.UpdateCancelaVenta(CveVenta, Now, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion, 0, EstadoCancelacion:="", CveEstadoCancelacion:=0) Then
Alert("Ocurrió un error al guardar el estatus de cancelación") Alert("Ocurrió un error al guardar el estatus de cancelación")
End If End If
End Using End Using