Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1950,12 +1950,14 @@ Public Class ClsBancos
|
||||
|
||||
Return Retorno
|
||||
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
|
||||
DataAdapter("PA_Banc_IngresoEgresosDiariosGet")
|
||||
|
||||
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("@Tipo", SqlDbType.VarChar).Value = Tipo 'Ing Ingresp Egs Egreso
|
||||
.Add("@Opcion", SqlDbType.VarChar).Value = Opcion
|
||||
|
||||
@@ -4313,7 +4313,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
|
||||
@@ -4326,6 +4326,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Divisor", SqlDbType.Int).Value = Divisor
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4472,13 +4472,32 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#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"
|
||||
|
||||
|
||||
' IDisposable
|
||||
|
||||
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(disposing As Boolean)
|
||||
If Not Me.disposedValue Then
|
||||
If disposing Then
|
||||
|
||||
@@ -6107,13 +6107,13 @@ Public Class ClsPaginas
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub ImprimeFormatoCartaPorteTimbrado(CveTimbre As Integer)
|
||||
Dim resp As Modelos.MSubReportData = PreParaImpresionCartaPorte(CveTimbre)
|
||||
Protected Sub ImprimeFormatoCartaPorteTimbrado(CveTimbre As Integer, Optional imprmirNom043 As Boolean = False)
|
||||
Dim resp As Modelos.MSubReportData = PreParaImpresionCartaPorte(CveTimbre, imprmirNom043:=imprmirNom043)
|
||||
If resp.DataSources.Count > 0 AndAlso resp.Parametros.Count > 0 Then
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", resp.DataSources, resp.Parametros, resp.SerieFolio)
|
||||
End If
|
||||
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
|
||||
retorno.Nombre = "CartaPorte"
|
||||
Try
|
||||
@@ -6180,6 +6180,7 @@ Public Class ClsPaginas
|
||||
Dim ConfATR1 As String = ""
|
||||
Dim ConfATR2 As String = ""
|
||||
Dim ObjInv As New ClsGenerales
|
||||
Dim TelDestino As String = ""
|
||||
|
||||
If ObjInv.GetGralTimbre(CveTimbre, "-1", MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||
@@ -6188,6 +6189,7 @@ Public Class ClsPaginas
|
||||
SerieFolio = Dr("SerieFolio").ToString
|
||||
Telefono = Dr("FiguraTelefono").ToString
|
||||
TipoDocto = Dr("TipoDocto").ToString
|
||||
TelDestino = Dr("TelDestino").ToString
|
||||
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
PermisoSCTR1 = Dr("PermisoSCTR1").ToString
|
||||
@@ -6562,6 +6564,7 @@ Public Class ClsPaginas
|
||||
ImgCBB = ""
|
||||
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)
|
||||
If ImagenCCP.Exists Then
|
||||
ImgCCP = String.Format("file://{0}", ImagenCCP.FullName)
|
||||
@@ -6627,6 +6630,12 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("RemolquePlaca2", RemolquePlaca2))
|
||||
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
|
||||
params.Add(New ReportParameter("PermisoSCTRemolque1", PermisoSCTR1))
|
||||
params.Add(New ReportParameter("PermisoSCTRemolque2", PermisoSCTR2))
|
||||
@@ -8020,10 +8029,14 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto))
|
||||
params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(189) Then
|
||||
params.Add(New ReportParameter("DiasCreditoOC", dtOC(0)("DiasCreditoOC").ToString))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(189) Then
|
||||
If dtOC(0)("DiasCreditoOC").ToString.ToEntero > 0 Then
|
||||
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
|
||||
|
||||
@@ -1965,7 +1965,7 @@ Public Class ClsVentas
|
||||
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 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
|
||||
DataAdapter("PA_Vta_GetRepPS")
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
@@ -2002,6 +2002,7 @@ Public Class ClsVentas
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
|
||||
.Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio
|
||||
.Add("@EsFilial", SqlDbType.Int).Value = EsFilial
|
||||
End With
|
||||
|
||||
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 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 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
|
||||
DataAdapter("PA_Vta_GetRepPSDetalle")
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
@@ -2063,7 +2064,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
|
||||
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||
.Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio
|
||||
|
||||
.Add("@EsFilial", SqlDbType.Int).Value = EsFilial
|
||||
|
||||
End With
|
||||
|
||||
@@ -6785,9 +6786,6 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function AddMedicoEspecialidad(Especialidad As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -6808,7 +6806,6 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
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
|
||||
@@ -6829,7 +6826,6 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function RemoveMedicoEspecialidad(CveMedicoEspecialidad As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -6851,7 +6847,6 @@ Public Class ClsVentas
|
||||
#End Region
|
||||
|
||||
#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
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -6873,10 +6868,6 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
@@ -6896,7 +6887,6 @@ Public Class ClsVentas
|
||||
OnError("Ocurrió un error al guardar la SubEspecialidad.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
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
|
||||
@@ -6942,9 +6932,7 @@ Public Class ClsVentas
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "MEDICO CLIENTE SUCURALES"
|
||||
|
||||
|
||||
#Region "MEDICO CLIENTE SUCURSALES"
|
||||
|
||||
Public Function GetMedicosClientesSucursales(CveMedico As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
@@ -7025,7 +7013,6 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function RemoveMedicosClientesSucursales(CveMedicoClienteSucursal As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -7047,7 +7034,7 @@ Public Class ClsVentas
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "PRODEDIMIENTOS"
|
||||
#Region "PROCEDIMIENTOS"
|
||||
|
||||
Public Function GetProcedimientos(CveProcedimiento As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
|
||||
|
||||
@@ -7137,8 +7124,6 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
|
||||
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
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -7161,8 +7146,6 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
|
||||
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
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -7185,8 +7168,6 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function SincronizacionProcedimientoProducto(CveProcedimiento As Integer, CveVenta As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -7232,7 +7213,6 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function RemoveProcedimientoProducto(CveProcedimientoProducto As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -7250,10 +7230,6 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GetProcedimientoVentas(CveProcedimiento As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -7273,7 +7249,6 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "VENTAS MEDICAS COMISIONES"
|
||||
@@ -7356,7 +7331,6 @@ Public Class ClsVentas
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "VENTAS MEDICAS COMISIONES ESPECIALES"
|
||||
|
||||
Public Function GetComisionesMedicasEspeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
|
||||
@@ -7434,7 +7408,7 @@ Public Class ClsVentas
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "DEVOLUICON"
|
||||
#Region "DEVOLUCION"
|
||||
|
||||
Public Function UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle As Integer, CantidadDevolucion As Decimal) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -7481,6 +7455,26 @@ Public Class ClsVentas
|
||||
End Function
|
||||
#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
|
||||
|
||||
|
||||
@@ -1306,43 +1306,14 @@ Namespace Modelos
|
||||
ObjFactura.FechaEjecucion = DateTime.Today
|
||||
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||
ObjFactura.TipoDocumento = ObjFactura.TipodeComprobante
|
||||
|
||||
'Totales, Y se llena TmpDTImpuestos
|
||||
'CLIENTE
|
||||
ObjFactura.CveCliente = CveCliente
|
||||
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.SetSubProyecto()
|
||||
ObjFactura.SetSubProyectoMatriz()
|
||||
|
||||
ObjFactura.CveSubProyectoCobranza = CveSubProyecto.ToEntero
|
||||
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto.ToEntero
|
||||
|
||||
|
||||
@@ -2393,6 +2393,28 @@ Namespace Extensiones
|
||||
|
||||
Dim worksheet As ExcelWorksheet = excel.Worksheets(0)
|
||||
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)
|
||||
If celdasConTexto Is Nothing Then Exit Sub 'No se recuperaron datos, salir de sin guardar porque soltará error
|
||||
celdasConTexto.Style.Font.Name = "Calibri Light"
|
||||
|
||||
389
Ashx/E140.ashx
389
Ashx/E140.ashx
@@ -6,6 +6,7 @@ Imports System.Data
|
||||
Imports Newtonsoft.Json
|
||||
Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
@@ -14,18 +15,325 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
Return False
|
||||
End Get
|
||||
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
|
||||
Select Case context.Request("metodo")
|
||||
Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
||||
Select Case Metodo
|
||||
Case "MetasVendedores"
|
||||
MetasVendedores(context)
|
||||
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
|
||||
ex.GuardaLog(ex.Message)
|
||||
End Try
|
||||
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)
|
||||
|
||||
@@ -128,7 +436,6 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
For Each dRow As System.Data.DataRow In DTVendedores.Rows
|
||||
|
||||
|
||||
Dim CorreoSupervisor As String = dRow("Correo").ToString()
|
||||
Dim Sucursal As String = dRow("Sucursal").ToString
|
||||
Dim Vendedor As String = dRow("Nombre").ToString()
|
||||
@@ -226,6 +533,30 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
Next
|
||||
|
||||
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®ENERAR=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())
|
||||
Try
|
||||
@@ -247,15 +578,51 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
End Try
|
||||
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
|
||||
Get
|
||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||
strInput = strInput.Trim()
|
||||
|
||||
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
|
||||
Else
|
||||
Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1")
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Catch ex As Exception
|
||||
Console.WriteLine(ex.ToString())
|
||||
Return False
|
||||
End Try
|
||||
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
|
||||
@@ -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"
|
||||
Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario
|
||||
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)
|
||||
UsuarioActual = ObjUsuarios.GetUsuarioDetalle(100)
|
||||
UsuarioActual = ObjUsuarios.GetUsuarioDetalle(100, CveEmpresa)
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
HttpContext.Current.Session("UsuarioSIG") = UsuarioActual
|
||||
'CreaObjetoEmpresa(UsuarioActual)
|
||||
@@ -281,11 +281,11 @@ Public Class E141 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe
|
||||
Dim ResultadoMail As Integer = 0
|
||||
Dim CorreoDestino As String = "atencion@fidelityapps.mx"
|
||||
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
|
||||
CorreoDestino = "jonathan.perez@adssistemas.mx"
|
||||
MailCC = "rene.molina@adsistemas.mx"
|
||||
MailCC = ""
|
||||
MailCCO = "japmx95@gmail.com"
|
||||
End If
|
||||
|
||||
|
||||
@@ -151,11 +151,12 @@
|
||||
<label style="">Cuenta:</label>
|
||||
</div>
|
||||
<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"
|
||||
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>
|
||||
<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 class="col-md-1">
|
||||
@@ -367,7 +368,7 @@
|
||||
<asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<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">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -84,10 +84,10 @@ Partial Class Bancos_DepositosCaja
|
||||
Else
|
||||
DivRowCuenta.Visible = False
|
||||
DivDescuentocheck.Visible = False
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivRowCuenta.Visible = True
|
||||
End If
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DivRowCuenta.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then divTipoPago.Visible = False : divTipoPago1.Visible = False
|
||||
@@ -273,6 +273,7 @@ Partial Class Bancos_DepositosCaja
|
||||
Try
|
||||
Dim FolioIE As Long = -1
|
||||
Dim CveMoneda As Integer = 1
|
||||
Dim CveMonedaDeposito As Integer
|
||||
Dim TipoCambio As Decimal = 1
|
||||
Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
OcurrioError = True
|
||||
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>     <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
|
||||
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
|
||||
@@ -442,7 +456,15 @@ Partial Class Bancos_DepositosCaja
|
||||
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)
|
||||
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
@@ -730,4 +752,13 @@ Partial Class Bancos_DepositosCaja
|
||||
Return File
|
||||
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
|
||||
@@ -26,28 +26,52 @@
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<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="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 ">
|
||||
<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>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFecha" 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>
|
||||
<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: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>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" 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:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgCalenarioI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<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="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="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaI" 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 class="col-md-1 truncate" style="max-width: 100px">Opción:</div>
|
||||
<div class="col-md-1" style="min-width: 120px">
|
||||
<asp:DropDownlist ID="DdlOpcion" runat="server" CssClass="form-control input-sm" >
|
||||
<asp:ListItem Text="Todos" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Conciliados" Value="1" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownlist>
|
||||
|
||||
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="form-control input-sm">
|
||||
<asp:ListItem Text="Todos" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Conciliados" Value="1" Selected="True"></asp:ListItem>
|
||||
</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>
|
||||
@@ -63,6 +87,5 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@ Partial Class Bancos_FlujoDiario
|
||||
|
||||
Private Sub Bancos_FlujoDiario_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
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 Sub
|
||||
|
||||
@@ -56,9 +57,10 @@ Partial Class Bancos_FlujoDiario
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
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}"))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
@@ -68,23 +70,23 @@ Partial Class Bancos_FlujoDiario
|
||||
'SE LLENA TmpDTSaldosIniciales
|
||||
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
|
||||
TmpDTSaldosIniciales = Ban.DtResultados
|
||||
If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFechaF.Text.ToDate.AddDays(-1).ToShortDateString, OpcionSaldo, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TmpDTSaldosIniciales = Ban.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
'Se Llena TmpDTIngresosDelDia
|
||||
If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Ing", OpcionSaldo, UsuarioActual.CveEmpresa) Then
|
||||
TmpDTIngresosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 8")
|
||||
If Ban.GetIngresoEgresosDelDia(DdlGrupo.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, "Ing", OpcionSaldo, UsuarioActual.CveEmpresa) Then
|
||||
TmpDTIngresosDelDia = Ban.DtResultados.Copy() '.FiltraParametros("CveTipoTransaccion <> 8")
|
||||
End If
|
||||
|
||||
'Se Llena TmpDTGastosDelDia
|
||||
If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Egs", OpcionSaldo, UsuarioActual.CveEmpresa) Then
|
||||
TmpDTGastosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 2")
|
||||
If Ban.GetIngresoEgresosDelDia(DdlGrupo.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, "Egs", OpcionSaldo, UsuarioActual.CveEmpresa) Then
|
||||
TmpDTGastosDelDia = Ban.DtResultados.Copy() '.FiltraParametros("CveTipoTransaccion <> 2")
|
||||
End If
|
||||
|
||||
'Se Llena TmpDTSaldosActuales
|
||||
If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFecha.Text, OpcionSaldo, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TmpDTSaldosActuales = Ban.DtResultados
|
||||
If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFechaF.Text, OpcionSaldo, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TmpDTSaldosActuales = Ban.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
Ban.Dispose()
|
||||
@@ -103,7 +105,7 @@ Partial Class Bancos_FlujoDiario
|
||||
'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
|
||||
|
||||
|
||||
|
||||
@@ -1524,7 +1524,7 @@
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
@@ -3612,10 +3612,10 @@
|
||||
<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">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="155px">
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1395,7 +1395,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
If UrlParametros("OP").ToString = "CARPOTIMBRE" 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
|
||||
|
||||
@@ -4256,12 +4258,14 @@ Partial Class PopUpVerFactura
|
||||
ObjCompra.Dispose()
|
||||
|
||||
If Not Archivo.Exists Then
|
||||
|
||||
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")
|
||||
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
|
||||
|
||||
'ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionProveedor.rdlc", DtMovimientos, params, String.Format("Devolucion Proveedor - {0}", Folio), RDSName:="DsInventarios")
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
.ajax__tab_xp .ajax__tab_body {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
.addropzone {
|
||||
min-height: 170px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<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:ListItem Value="6" Selected="True" >Caja Chica</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>
|
||||
</div>
|
||||
|
||||
@@ -933,61 +937,91 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpModalProrrateoGasolina" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<%-- <div class="row">
|
||||
<div class="row">
|
||||
<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" />
|
||||
<label for="<%= DdlPSProrrateoGasolina.ClientID.ToString()%>">
|
||||
Productos / Servicio:
|
||||
<label>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<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>
|
||||
<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 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 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="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 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 class="row" style="margin-top:10px">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -1018,6 +1052,9 @@
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDecargaPlatilla" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@@ -1328,6 +1365,8 @@
|
||||
|
||||
<asp:LinkButton runat="server" ID="BtnBuscarBitacora" class="btn btn-default"><i class="fa fa-search"></i> Consultar</asp:LinkButton>
|
||||
|
||||
<asp:LinkButton runat="server" ID="LnkRegistroRNC" class="btn btn-default" OnClick="LnkRegistroRNC_Click"><i class="fa fa-search"></i> Prueba</asp:LinkButton>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1565,9 +1604,6 @@
|
||||
<ajax:TabPanel runat="server" HeaderText="Historial" ID="TabHistorial">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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"
|
||||
@@ -1634,26 +1670,11 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -26,6 +26,7 @@ Imports SharpCompress.Common
|
||||
Imports SharpCompress.Reader
|
||||
Imports Telerik.Web.UI
|
||||
Imports System.Data.SqlClient
|
||||
Imports Stimulsoft.Base.Serializing
|
||||
|
||||
|
||||
'Imports Telerik.Web.UI
|
||||
@@ -5586,13 +5587,13 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
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
|
||||
DTProrrateoTmp.Rows.Clear()
|
||||
|
||||
For Each item As ListItem In DdlSubProyectoProrrateoGasolina.Items
|
||||
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
|
||||
Next
|
||||
End If
|
||||
@@ -5604,7 +5605,7 @@ Partial Class Compras_eFacturas
|
||||
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
|
||||
|
||||
@@ -5614,7 +5615,7 @@ Partial Class Compras_eFacturas
|
||||
Dim RetIVAOriginal As Decimal = 0D 'TxtRetIVA.Text.ToDecimal
|
||||
Dim TotalOriginal As Decimal = 1
|
||||
|
||||
Dim totalParcialDeseado As Decimal = TxtPrecioProrrateoGasolina.Text.ToDecimal
|
||||
Dim totalParcialDeseado As Decimal = Porcentaje
|
||||
Dim PorcentajeCalculado As Decimal = totalParcialDeseado / TotalOriginal
|
||||
|
||||
Dim subtotalParcial As Decimal = SubTotalOriginal * PorcentajeCalculado
|
||||
@@ -5642,7 +5643,7 @@ Partial Class Compras_eFacturas
|
||||
|
||||
nRow("Total") = totalParcialDeseado.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("RetISRPorcentaje") = (retIsrParcial / subtotalParcial).RoundSQL(4)
|
||||
@@ -6073,6 +6074,243 @@ Partial Class Compras_eFacturas
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -87,6 +87,10 @@
|
||||
<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>
|
||||
</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>
|
||||
</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="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"
|
||||
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>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
|
||||
@@ -312,6 +312,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Contabilizar()
|
||||
End If
|
||||
|
||||
If Request("quitaconta") IsNot Nothing Then
|
||||
Quitacontabilidad()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
@@ -508,6 +512,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvPrePoliza.Columns(7).Visible = True
|
||||
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
|
||||
LnkComplementoPago.Visible = True
|
||||
End If
|
||||
@@ -2892,5 +2900,31 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Protected Sub LnkEmitirComplemento_Click(sender As Object, e As EventArgs)
|
||||
GeneraTimbre(CvePrePoliza)
|
||||
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
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
</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="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}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
@@ -359,7 +359,13 @@
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#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) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
@@ -369,6 +375,9 @@
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
//let data = cdatos.sort(function (a, b) {
|
||||
// return b.Valor - a.Valor;
|
||||
//});
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
@@ -406,6 +415,11 @@
|
||||
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
|
||||
//let data = cdatos.sort(function (a, b) {
|
||||
// return b.Valor - a.Valor;
|
||||
//});
|
||||
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
|
||||
@@ -236,9 +236,15 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
Next
|
||||
|
||||
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
|
||||
Index = 4
|
||||
|
||||
For Each DRow As DataRow In DTHeaders.Rows
|
||||
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
||||
|
||||
@@ -249,7 +255,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
End If
|
||||
|
||||
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
|
||||
Index += 1
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||
<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:BoundField DataField="FechaAplicado" HeaderText="Fecha Aplicado" DataFormatString="{0:d}" />
|
||||
</Columns>
|
||||
|
||||
@@ -13,6 +13,11 @@ using System.IO;
|
||||
using CrystalDecisions.CrystalReports.Engine;
|
||||
using CrystalDecisions.Shared;
|
||||
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
|
||||
{
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0)
|
||||
if (txtFechaI.Text.ToDate().Year < 2025) // años anteriores al 2025
|
||||
{
|
||||
SBDIOT.AppendLine(
|
||||
Drow["TipoTercero"].ToString() + "|" +
|
||||
Drow["TipoOperacion"].ToString() + "|" +
|
||||
Drow["RFC"].ToString() + "|" +
|
||||
Drow["NumeroIDFiscal"].ToString() + "|" +
|
||||
Drow["NombreExtranjero"].ToString() + "|" +
|
||||
Drow["PaisResidencia"].ToString() + "|" +
|
||||
Drow["Nacionalidad"].ToString() + "|" +
|
||||
LV(Drow["valorActos1516"].ToString()) + "|" +
|
||||
LV(Drow["valorActos15"].ToString()) + "|" +
|
||||
LV(Drow["ValorIvaNo1516"].ToString()) + "|" +
|
||||
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() + "|" +
|
||||
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["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["valorActosImp1516"].ToString()) + "|" +
|
||||
LV(Drow["ValorIvaNoImp16"].ToString()) + "|" +
|
||||
|
||||
LV(Drow["valorActosImp10"].ToString()) + "|" +
|
||||
LV(Drow["ValorIvaNoImp10"].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()) + "|");
|
||||
LV(Drow["IvaExentoImpo"].ToString()) + "|" +
|
||||
LV(Drow["IVACero"].ToString()) + "|" +
|
||||
LV(Drow["IvaExento"].ToString()) + "|" +
|
||||
LV(Drow["IvaRetenido"].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();
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<div class="col-md-1">
|
||||
Cuenta:
|
||||
</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:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -97,11 +97,11 @@
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
<div class="col-md-1 ">
|
||||
Tipo Movto
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<div class="col-md-2 ">
|
||||
<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="Con movimientos" Value="1"></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:DropDownList>
|
||||
</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
|
||||
</div>
|
||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||
|
||||
@@ -129,7 +129,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
' DdlTipoReporte.SelectedValue = TipoReporte.ToString
|
||||
End If
|
||||
|
||||
|
||||
DdlOpcionCuentas.SelectedValueExist(IfNull(Request("OpcionCuenta"), "-1")) 'OpcionCuenta
|
||||
''If DdlTipoCuentas.Items.FindByValue(IdCuenta.ToString) IsNot Nothing Then
|
||||
'' DdlTipoCuentas.SelectedValue = IdCuenta.ToString
|
||||
''Else
|
||||
|
||||
BIN
Empresas/Grales/CargaProrrateoPorcentaje.xlsx
Normal file
BIN
Empresas/Grales/CargaProrrateoPorcentaje.xlsx
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -883,6 +883,7 @@
|
||||
<Value>=Microsoft.VisualBasic.Interaction.IIF(Fields!Moneda.Value = "Dólares", Fields!Importe.Value, "")</Value>
|
||||
<Style>
|
||||
<FontFamily>verdana</FontFamily>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
<Color>#3f4040</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -2121,11 +2122,19 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Fecha: </Value>
|
||||
<Value>Periodo: </Value>
|
||||
<Style />
|
||||
</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 />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2138,7 +2147,7 @@
|
||||
<Top>2.51466cm</Top>
|
||||
<Left>0.08599cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>6.2766cm</Width>
|
||||
<Width>19.08243cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -2376,7 +2385,7 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Fecha">
|
||||
<ReportParameter Name="FechaI">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
@@ -2400,6 +2409,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="FechaF">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>
|
||||
|
||||
@@ -6,8 +6,6 @@ Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
|
||||
Partial Class Inventarios_EntregaAlmacen
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -699,8 +697,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim drvs As DataRow = objV.DtResultados.FiltroPrimero("")
|
||||
|
||||
LtlRegistra.Text = drvs("VendedorNombre").ToString
|
||||
|
||||
If drvs("Saldo").ToString.ToDecimal > 0 AndAlso (drvs("CondicionesPago").ToString = "0" Or drvs("TipoDocto").ToString = "Rem") Then
|
||||
'subproyecto e-commerce, si se permite surtir, sin tener registro de pago. cvesubproyecto:12849
|
||||
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)
|
||||
BtnGuardar.Visible = False
|
||||
End If
|
||||
@@ -3458,11 +3456,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
Limpia()
|
||||
CargaPendientes()
|
||||
LimpiaCampos()
|
||||
CargaBitacora = False
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
CargaPendientes()
|
||||
LimpiaCampos()
|
||||
CargaBitacora = False
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
Alert(TextoError.ToString(), TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
End If
|
||||
|
||||
@@ -371,12 +371,12 @@ table.adssigscroll {
|
||||
<HeaderStyle HorizontalAlign="Left" Width="110px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="460px">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="360px">
|
||||
<HeaderTemplate>
|
||||
Producto
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="max-width: 450px">
|
||||
<div class="truncate" style="max-width: 350px">
|
||||
<asp:Label runat="server" Text='<%# Eval("PS") %>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -128,15 +128,17 @@ Partial Class Inventarios_KardexAlmacenHorizontal
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-pagina", "Inventarios")
|
||||
ddlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.ClientID)
|
||||
DdlClasificacion.AutoPostBack = False
|
||||
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
|
||||
Else
|
||||
ddlProducto2.ddl.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
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.DataBind()
|
||||
DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -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,
|
||||
Entrega:="", Vigencia:=MinFecha,
|
||||
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,
|
||||
CveMetodoPago:=factura.CveMetodoPago, CveUsoCFDI:=factura.CveUsoCFDI) Then
|
||||
PedidoContrato:="", CveSubProyecto:=CveSubProyecto, CveSubProyectoCobranza:=CveSubProyecto, CveSubProyectoEjecucion:=CveSubProyecto, CveFormaPago33:=factura.CveFormaPago, 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")
|
||||
End If
|
||||
|
||||
|
||||
@@ -6064,7 +6064,7 @@ Partial Class OC_OC
|
||||
End Function
|
||||
|
||||
Protected Sub DdlProveedores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedores.selectedindexchange
|
||||
|
||||
TxtDiasCreditoOC.Text = ""
|
||||
DdlProveedorSucursal.Items.Clear()
|
||||
DdlProveedorSucursal.SelectedValue = Nothing
|
||||
|
||||
@@ -6128,6 +6128,9 @@ Partial Class OC_OC
|
||||
DdlMoneda.SelectedValueExist(CveMonedaPreferente)
|
||||
MonedaTexto = DdlMoneda.SelectedItem.Text
|
||||
End If
|
||||
|
||||
TxtDiasCreditoOC.Text = dtt.Rows(0)("PlazoPago").ToString
|
||||
|
||||
End If
|
||||
VerificaSiRequiereCotizacion()
|
||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" And CveOrdenCompra > 0 And TipoOC.ToUpper() = "REQ" Then
|
||||
@@ -6142,6 +6145,7 @@ Partial Class OC_OC
|
||||
UPPDetalle.Update()
|
||||
uppEstatus.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CboE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboE.SelectedIndexChanged
|
||||
|
||||
@@ -744,7 +744,7 @@
|
||||
selectHelper: true,
|
||||
select: selectDate,
|
||||
editable: true,
|
||||
minTime: "07:00:00",
|
||||
minTime: "06:00:00",
|
||||
maxTime: "23:00:00",
|
||||
events: {
|
||||
url: '/Ashx/CargaEventos.ashx',
|
||||
|
||||
@@ -83,54 +83,53 @@ public class TareasReporteDairio : IHttpHandler
|
||||
private string ConvertDataTableToHtml(DataTable table)
|
||||
{
|
||||
StringBuilder html = new StringBuilder();
|
||||
|
||||
|
||||
string ColumnaTitulo = "Titulo";
|
||||
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><tr>");
|
||||
html.Append("<thead style='background-color:#DDD; padding: 0px;'><tr>");
|
||||
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("<tbody>");
|
||||
foreach (DataRow row in table.Rows)
|
||||
{
|
||||
html.Append("<tr>");
|
||||
foreach (DataColumn column in table.Columns)
|
||||
{
|
||||
object value = row[column];
|
||||
string cellValue;
|
||||
|
||||
|
||||
if (column.DataType == typeof(int) || column.DataType == typeof(decimal) || column.DataType == typeof(double) || column.DataType == typeof(float))
|
||||
if (ColumnaTitulo != column.ColumnName)
|
||||
{
|
||||
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
|
||||
{
|
||||
cellValue = "";//0.00
|
||||
}
|
||||
html.Append($"<td style='padding:5px; text-align:right;'>{cellValue}</td>");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
cellValue = "";//0.00
|
||||
cellValue = value?.ToString() ?? string.Empty;
|
||||
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>");
|
||||
}
|
||||
@@ -180,15 +179,15 @@ public class TareasReporteDairio : IHttpHandler
|
||||
|
||||
private void MandaCorreo(string Cuerpo, bool PrceosoOK)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
List<ClsSisMail.ArchivoMail> ListaArchivos = new List<ClsSisMail.ArchivoMail>();
|
||||
ClsSisMail Correo = new ClsSisMail();
|
||||
//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";
|
||||
Asunto = $"{Asunto} {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}";
|
||||
|
||||
|
||||
@@ -41,6 +41,59 @@
|
||||
border: none;
|
||||
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>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -297,22 +350,30 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="divContainerads">
|
||||
<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">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="35px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkPS" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto/Servicio" ItemStyle-Width="350px" />
|
||||
</asp:TemplateField>
|
||||
<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">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_1" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -320,7 +381,7 @@
|
||||
<asp:Label ID="LtlLista_2" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -328,7 +389,7 @@
|
||||
<asp:Label ID="LtlLista_3" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -336,7 +397,7 @@
|
||||
<asp:Label ID="LtlLista_4" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -344,7 +405,7 @@
|
||||
<asp:Label ID="LtlLista_5" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -352,7 +413,7 @@
|
||||
<asp:Label ID="LtlLista_6" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -360,7 +421,7 @@
|
||||
<asp:Label ID="LtlLista_7" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -368,7 +429,7 @@
|
||||
<asp:Label ID="LtlLista_8" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -376,7 +437,7 @@
|
||||
<asp:Label ID="LtlLista_9" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -384,7 +445,7 @@
|
||||
<asp:Label ID="LtlLista_10" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -392,7 +453,7 @@
|
||||
<asp:Label ID="LtlLista_11" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -400,7 +461,7 @@
|
||||
<asp:Label ID="LtlLista_12" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -408,7 +469,7 @@
|
||||
<asp:Label ID="LtlLista_13" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -416,7 +477,7 @@
|
||||
<asp:Label ID="LtlLista_14" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -424,7 +485,7 @@
|
||||
<asp:Label ID="LtlLista_15" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -432,7 +493,7 @@
|
||||
<asp:Label ID="LtlLista_16" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -440,7 +501,7 @@
|
||||
<asp:Label ID="LtlLista_17" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -448,7 +509,7 @@
|
||||
<asp:Label ID="LtlLista_18" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -456,7 +517,7 @@
|
||||
<asp:Label ID="LtlLista_19" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -464,7 +525,7 @@
|
||||
<asp:Label ID="LtlLista_20" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -472,7 +533,7 @@
|
||||
<asp:Label ID="LtlLista_21" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -480,7 +541,7 @@
|
||||
<asp:Label ID="LtlLista_22" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -488,7 +549,7 @@
|
||||
<asp:Label ID="LtlLista_23" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -496,7 +557,7 @@
|
||||
<asp:Label ID="LtlLista_24" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -504,7 +565,7 @@
|
||||
<asp:Label ID="LtlLista_25" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -512,7 +573,7 @@
|
||||
<asp:Label ID="LtlLista_26" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -520,7 +581,7 @@
|
||||
<asp:Label ID="LtlLista_27" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -528,7 +589,7 @@
|
||||
<asp:Label ID="LtlLista_28" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -536,7 +597,7 @@
|
||||
<asp:Label ID="LtlLista_29" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -544,7 +605,7 @@
|
||||
<asp:Label ID="LtlLista_30" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -552,7 +613,7 @@
|
||||
<asp:Label ID="LtlLista_31" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -560,7 +621,7 @@
|
||||
<asp:Label ID="LtlLista_32" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -568,7 +629,7 @@
|
||||
<asp:Label ID="LtlLista_33" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -576,7 +637,7 @@
|
||||
<asp:Label ID="LtlLista_34" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -584,7 +645,7 @@
|
||||
<asp:Label ID="LtlLista_35" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -592,7 +653,7 @@
|
||||
<asp:Label ID="LtlLista_36" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -600,7 +661,7 @@
|
||||
<asp:Label ID="LtlLista_37" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -608,7 +669,7 @@
|
||||
<asp:Label ID="LtlLista_38" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -616,7 +677,7 @@
|
||||
<asp:Label ID="LtlLista_39" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
@@ -624,13 +685,14 @@
|
||||
<asp:Label ID="LtlLista_40" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<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"/>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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(),
|
||||
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,
|
||||
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
|
||||
|
||||
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then
|
||||
@@ -3039,12 +3039,14 @@ Partial Class Clientes
|
||||
If e.Row.RowIndex > -1 Then
|
||||
If e.Row.DBCampo("Folio") = "N/D" Then
|
||||
e.Row.FCLiteral("LtlFactura").Text = e.Row.DataKey("Folio")
|
||||
Else
|
||||
If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 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"))
|
||||
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"))
|
||||
End If
|
||||
Else
|
||||
If e.Row.DataKey("Tipo").ToUpper().Contiene("NC", "ANT") Then
|
||||
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
|
||||
If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 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"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -6259,6 +6261,9 @@ Partial Class Clientes
|
||||
DdlAlmacenAsignado.SelectedValue = Nothing
|
||||
DdlAlmacenAsignado.ClearSelection()
|
||||
DdlAlmacenAsignado.Items.Clear()
|
||||
DdlAlmacenConsignacion.SelectedValue = Nothing
|
||||
DdlAlmacenConsignacion.ClearSelection()
|
||||
DdlAlmacenConsignacion.Items.Clear()
|
||||
DdlAlmacenAlterno.SelectedValue = Nothing
|
||||
DdlAlmacenAlterno.ClearSelection()
|
||||
DdlAlmacenAlterno.Items.Clear()
|
||||
@@ -6267,6 +6272,9 @@ Partial Class Clientes
|
||||
DdlAlmacenAsignado.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacenAsignado.DataBind()
|
||||
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.DataBind()
|
||||
DdlAlmacenAlterno.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
@@ -1456,7 +1456,7 @@ Partial Class ProductosyServicios
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ChkAplicaParaVenta.Checked Then
|
||||
Dim tcontador As Integer = 0
|
||||
For Each GvRow As GridViewRow In GvPLMultiple.Rows
|
||||
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
|
||||
|
||||
@@ -179,14 +179,16 @@
|
||||
<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="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>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Ventas_RepComisionesSMS
|
||||
@@ -47,6 +48,7 @@ Partial Class Ventas_RepComisionesSMS
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
|
||||
DdlVendedor.Enabled = False
|
||||
GvDatos.Columns(16).Visible = False 'gerente
|
||||
GvDatos.Columns(19).Visible = False 'pagada
|
||||
End If
|
||||
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
@@ -62,6 +64,7 @@ Partial Class Ventas_RepComisionesSMS
|
||||
GvDatos.Columns(16).Visible = False 'gerente
|
||||
GvDatos.Columns(17).Visible = False 'ed.medica
|
||||
GvDatos.Columns(18).Visible = False 'fecha pago
|
||||
GvDatos.Columns(19).Visible = False 'pagada
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -91,10 +94,8 @@ Partial Class Ventas_RepComisionesSMS
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
CargaDatos()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "EXCEL"
|
||||
@@ -115,7 +116,6 @@ Partial Class Ventas_RepComisionesSMS
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub LnkComisiones_Click(sender As Object, e As EventArgs)
|
||||
CargaComisiones()
|
||||
RegistraScript("$('#DvModalComisiones').modal('show');")
|
||||
@@ -124,24 +124,18 @@ Partial Class Ventas_RepComisionesSMS
|
||||
Private Sub CargaComisiones()
|
||||
DTDatos = New DataTable
|
||||
GvComisiones.DataSource = Nothing
|
||||
|
||||
Dim objVentas As New ClsVentas
|
||||
|
||||
If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then
|
||||
GvComisiones.DataSource = objVentas.DtResultados
|
||||
DTDatos = objVentas.DtResultados
|
||||
End If
|
||||
|
||||
objVentas.Dispose()
|
||||
|
||||
GvComisiones.DataBind()
|
||||
|
||||
UpDvModalComisiones.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardarComisiones_Click(sender As Object, e As EventArgs)
|
||||
|
||||
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 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 Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV, ComisionGerenteGV) Then
|
||||
TieneError = True
|
||||
@@ -194,14 +187,12 @@ Partial Class Ventas_RepComisionesSMS
|
||||
e.Row.FCTextBox("TxtComisionMedico").Text = e.Row.DataKey("ComisionMedico").ToDecimal.ToString("###.00")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DataKey("ComisionGerente").ToDecimal = 0 Then
|
||||
e.Row.FCTextBox("TxtComisionGerente").Text = ""
|
||||
Else
|
||||
e.Row.FCTextBox("TxtComisionGerente").Text = (e.Row.DataKey("ComisionGerente").ToDecimal * 100).ToString("###.00")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DataKey("ComisionVendedor").ToDecimal = 0 Then
|
||||
e.Row.FCTextBox("TxtComisionVendedor").Text = ""
|
||||
Else
|
||||
@@ -214,8 +205,6 @@ Partial Class Ventas_RepComisionesSMS
|
||||
e.Row.FCTextBox("TxtComisionTecnico").Text = (e.Row.DataKey("ComisionTecnico").ToDecimal * 100).ToString("###.00")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -379,4 +368,14 @@ Partial Class Ventas_RepComisionesSMS
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||
<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>
|
||||
<label class="col-md-1 ">Cliente:</label>
|
||||
<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:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Estatus:</label>
|
||||
@@ -260,7 +260,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Usuario:</label>
|
||||
<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:DropDownList>
|
||||
</div>
|
||||
@@ -284,9 +284,9 @@
|
||||
<div class="row">
|
||||
<label title="Giro del Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Giro Cli.:</label>
|
||||
<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>
|
||||
<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">
|
||||
<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>
|
||||
@@ -302,7 +302,7 @@
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -310,58 +310,67 @@
|
||||
<div class="row">
|
||||
<label title="Condiciones de Pago" data-toggle="tooltip" class="col-md-1 truncate">Condiciones Pago:</label>
|
||||
<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 Text="Crédito" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contado" Value="0"></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 class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
|
||||
Garantía?:
|
||||
</div>
|
||||
<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="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:Dropdownlist>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<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:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<div runat="server" id="DvLitraje" class="col-md-1" visible="false">
|
||||
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text ="Litraje: " TextAlign="Left" />
|
||||
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text="Litraje: " TextAlign="Left" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Lectura administrativa:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Lectura administrativa:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
|
||||
</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">
|
||||
<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: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" Visible="false">
|
||||
<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">Si</asp:ListItem>
|
||||
<asp:ListItem Value="0">No</asp:ListItem>
|
||||
<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">
|
||||
<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">Si</asp:ListItem>
|
||||
<asp:ListItem Value="0">No</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -424,7 +433,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped table-advance table-hover Widthall">
|
||||
<tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" />
|
||||
@@ -447,9 +456,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<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 style="text-align: left;"> </td>
|
||||
<td style="text-align: left;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -242,7 +242,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
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,
|
||||
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
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
@@ -322,13 +322,13 @@ Partial Class Ventas_RepProductosServicios
|
||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.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("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"),
|
||||
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),
|
||||
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"))
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</asp:UpdatePanel>--%>
|
||||
</asp:Content>
|
||||
<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>
|
||||
</li>
|
||||
<li>
|
||||
@@ -66,7 +66,7 @@
|
||||
<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>
|
||||
</li>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
@@ -218,7 +218,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Estatus:</label>
|
||||
<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:DropDownList>
|
||||
</div>
|
||||
@@ -262,7 +262,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Usuario:</label>
|
||||
<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:DropDownList>
|
||||
</div>
|
||||
@@ -286,7 +286,7 @@
|
||||
<div class="row">
|
||||
<label title="Giro del Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Giro Cliente:</label>
|
||||
<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>
|
||||
<label title="Proveedor" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Proveedor:</label>
|
||||
<div class="col-md-2">
|
||||
@@ -306,7 +306,7 @@
|
||||
<div class="row">
|
||||
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
|
||||
<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 Text="Frecuente" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
||||
@@ -324,13 +324,13 @@
|
||||
Garantía?:
|
||||
</div>
|
||||
<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="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:Dropdownlist>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
<div runat="server" id="DvLitraje" class="col-md-1" visible="false">
|
||||
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text ="Litraje: " TextAlign="Left" />
|
||||
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text="Litraje: " TextAlign="Left" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1 truncate" id="LblClienteSucursal" runat="server">Cliente Sucursal:</label>
|
||||
<div class="col-md-2">
|
||||
|
||||
|
||||
<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%" >
|
||||
<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%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
@@ -361,22 +361,29 @@
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" Text="Lectura admiva:" TextAlign="Left" />
|
||||
</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">
|
||||
<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: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>
|
||||
|
||||
<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>
|
||||
@@ -427,7 +434,7 @@
|
||||
<%--17--%>
|
||||
<asp:BoundField HeaderText="Forma de Pago" DataField="FormaPago" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--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--%>
|
||||
<asp:BoundField HeaderText="Num. Turnos" DataField="NumTurnos" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<%--20--%>
|
||||
@@ -477,7 +484,7 @@
|
||||
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="Forma de Pago" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O.C." />
|
||||
</td>
|
||||
@@ -486,19 +493,17 @@
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O.C. Cantidad" />
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text="Fecha Hora de Emisión" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkNumTurnos" runat="server" Text="Número de turnos" Visible="false" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
<td style="text-align: left;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -456,7 +456,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
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,
|
||||
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
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
Else
|
||||
|
||||
@@ -157,7 +157,7 @@ Partial Class RepRemisiones
|
||||
GvDatos.Columns(1).HeaderText = "Fecha Cirugía"
|
||||
CType(GvDatos.Columns(1), HyperLinkField).DataTextFormatString = "{0:dd/MM/yyyy HH:mm}"
|
||||
CType(GvDatos.Columns(1), HyperLinkField).ItemStyle.Width = Unit.Pixel(120)
|
||||
GvDatos.Columns(15).Visible = True
|
||||
GvDatos.Columns(16).Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -161,6 +161,13 @@ Partial Class Ventas_RepVentas
|
||||
DivFacturaGlobal.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
If Opcion <> "Cot" Then
|
||||
DdlTipoComprobante.SelectedValuesIfExistM("Ing")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
PrePersonalizacion()
|
||||
CargaPersonalizacion()
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
<div id="DivModalPorcetajes" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalPorcentajes" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content" style="width:700px!important">
|
||||
<div class="modal-content" style="width:800px!important">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
@@ -340,7 +340,6 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<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" >
|
||||
@@ -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="% 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>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -655,6 +655,18 @@
|
||||
<asp:Label runat="server" ID="LblTipoVenta"></asp:Label>
|
||||
</td>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -7426,7 +7438,7 @@
|
||||
<span class="input-group-addon">%</span>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7657,7 +7657,9 @@ Partial Class Ventas
|
||||
UpFacturasRelacionadas.Update()
|
||||
End Sub
|
||||
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.Columns.Add(New DataColumn("CveVenta", GetType(Integer)))
|
||||
Me.TmpDTFacturasRelacionadas.Columns.Add(New DataColumn("SerieFolio", GetType(String)))
|
||||
@@ -7665,7 +7667,9 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
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
|
||||
CreaTmpFacturasRelacionadas()
|
||||
End If
|
||||
@@ -7696,7 +7700,9 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
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
|
||||
CreaTmpFacturasRelacionadas()
|
||||
End If
|
||||
@@ -7726,7 +7732,8 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
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
|
||||
Me.AplicaRelacionManual = False
|
||||
Alert("No hay facturas para relacionar", TipoMensaje.MsgAdvertencia)
|
||||
@@ -8946,10 +8953,10 @@ Partial Class Ventas
|
||||
e.Row.FCTextBox("TxtNumTurnosEditar").Visible = True
|
||||
End If
|
||||
|
||||
'If UsuarioActual.CveEmpresa = 119 Then
|
||||
' e.Row.FCTextBox("TxtDescuento").Enabled = False
|
||||
'End If
|
||||
|
||||
'LA COLUMNA DE ELIMINACION NO DEBE ESTAR VISIBLE EN EL MODO EDICION
|
||||
If GvPS.Columns(19).Visible Then
|
||||
e.Row.FCLinkButton("imgD").Visible = False
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
@@ -9006,8 +9013,19 @@ Partial Class Ventas
|
||||
|
||||
If CveVenta > 0 Then 'And e.Row.DBCampo("TipoDocto") = "Rem"
|
||||
If ModalidadEdicion Then
|
||||
e.Row.FCLinkButton("imgE").Visible = Not e.Row.DBCampo("CantidadFacturadaRem").ToDouble > 0
|
||||
e.Row.FCLinkButton("imgD").Visible = Not e.Row.DBCampo("CantidadInventario").ToDouble > 0
|
||||
Select Case e.Row.DBCampo("TipoDocto")
|
||||
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
|
||||
e.Row.FCLinkButton("imgE").Visible = False
|
||||
e.Row.FCLinkButton("imgD").Visible = False
|
||||
@@ -9292,7 +9310,8 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'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
|
||||
End If
|
||||
|
||||
@@ -9360,14 +9379,20 @@ Partial Class Ventas
|
||||
Dim Proyecto As String = ""
|
||||
Dim CveProyecto As Integer = -1
|
||||
|
||||
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem IsNot Nothing Then
|
||||
Proyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem.Text
|
||||
CveProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedValue.ToEntero()
|
||||
End If
|
||||
'VER SI ESTA VISIBLE EL PROYECTO
|
||||
If GvPS.Columns(8).Visible Then
|
||||
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem IsNot Nothing Then
|
||||
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
|
||||
SubProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text
|
||||
CveSubProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero()
|
||||
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem IsNot Nothing Then
|
||||
SubProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text
|
||||
CveSubProyecto = GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero()
|
||||
Else
|
||||
SubProyecto = DdlSubProyectoDatos.SelectedItem.Text
|
||||
CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
End If
|
||||
Else
|
||||
SubProyecto = DdlSubProyectoDatos.SelectedItem.Text
|
||||
CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
@@ -9476,16 +9501,23 @@ Partial Class Ventas
|
||||
TmpDT.Rows(e.RowIndex)("PrecioLista") = PrecioLista
|
||||
End If
|
||||
|
||||
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").Items.Count = 0 Then
|
||||
TmpDT.Rows(e.RowIndex)("SubProyecto") = "Sin SubProyecto Asignado"
|
||||
Else
|
||||
'si está visible en el encabezado, si no esta visible que no actualice, porque generar error, selecciona el primer item
|
||||
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
|
||||
'VER SI ESTA VISIBLE EL PROYECTO
|
||||
If GvPS.Columns(8).Visible Then
|
||||
If GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").Items.Count = 0 Then
|
||||
TmpDT.Rows(e.RowIndex)("SubProyecto") = "Sin SubProyecto Asignado"
|
||||
Else
|
||||
'si está visible en el encabezado, si no esta visible que no actualice, porque generar error, selecciona el primer item
|
||||
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
|
||||
Else
|
||||
TmpDT.Rows(e.RowIndex)("SubProyecto") = DdlSubProyectoDatos.SelectedItem.Text
|
||||
TmpDT.Rows(e.RowIndex)("CveSubProyecto") = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
End If
|
||||
|
||||
|
||||
'RELACIONAL PS CON EL DESCUENTO
|
||||
If ObjDescuento IsNot Nothing Then
|
||||
ObjDescuento.Consec = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
|
||||
@@ -10252,7 +10284,7 @@ Partial Class Ventas
|
||||
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||
Dim ObjVentas As New ClsVentas
|
||||
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
|
||||
ObjVentas.Dispose()
|
||||
|
||||
@@ -10546,6 +10578,31 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
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
|
||||
If UsuarioActual.Empresa.Funcionalidad(601) <> "" Then
|
||||
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
|
||||
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
||||
CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero)
|
||||
factura.Alfa2 = TxtEducMedica.Text.Trim
|
||||
'CveAlmacenTraspasoDestino
|
||||
End If
|
||||
|
||||
@@ -14590,13 +14648,18 @@ Partial Class Ventas
|
||||
Else
|
||||
'SI ES REFACTURACION DEBE AGREGAR LA VENTA ANTERIOR COMO RELACIONADA TAMBIEN
|
||||
If Not CveVenta = -1 Then
|
||||
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")
|
||||
If Not Me.AplicaRelacionManual Then
|
||||
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
|
||||
Else
|
||||
If CveEstatusRefacturacion > 0 AndAlso CveDevolucion > 0 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")
|
||||
'SI TIENE RELACION MANUAL, TOMAR DE AHI
|
||||
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
|
||||
@@ -20347,6 +20410,8 @@ Partial Class Ventas
|
||||
PUModificado = (Costo + (Costo * PromocionPorcentaje / 100D)).RoundSQL(4)
|
||||
End If
|
||||
|
||||
Dim TieneCondicionesComerciales As Boolean = False
|
||||
|
||||
'VERIFICA SI APLICAN CONDICIONES COMERCIALES
|
||||
If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
|
||||
'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA
|
||||
@@ -20364,6 +20429,8 @@ Partial Class Ventas
|
||||
Dim TotalFinal As Decimal = TotalInicial
|
||||
'SI APLICA EL PRIMER DESCUENTO
|
||||
If PorcentajeProducto > 0 Then
|
||||
TieneCondicionesComerciales = True
|
||||
|
||||
Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2)
|
||||
Dim Total2 As Decimal = (TotalInicial - Descuento1)
|
||||
|
||||
@@ -20388,6 +20455,8 @@ Partial Class Ventas
|
||||
|
||||
If PorcentajeProducto > 0 Then
|
||||
Descuento += ((Cantidad * PU) - TotalFinal)
|
||||
|
||||
ObjDescuento.NombrePromo = "CONDICIONES COMERCIALES"
|
||||
End If
|
||||
|
||||
'SI TIENE PRONTO PAGO CALCULA EL IMPORTE
|
||||
@@ -20408,7 +20477,7 @@ Partial Class Ventas
|
||||
Alert("No se calculó el descuento correctamente", TipoMensaje.MsgAdvertencia)
|
||||
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
|
||||
If CvePS.Contiene(521445, 521448, 402917, 402918) Then
|
||||
'SI TIENE BATERIAS AGREGADAS CON LA MARCA LTH, APLICAR PROMOCION, LA CLASIFICACION DEBE SER ACUMULADORES
|
||||
@@ -20452,6 +20521,110 @@ Partial Class Ventas
|
||||
|
||||
Return ObjDescuento
|
||||
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)
|
||||
' Get
|
||||
' Return New Dictionary(Of Integer, Decimal) From {
|
||||
@@ -21191,13 +21364,28 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DescAdicional As Decimal = 0
|
||||
Dim CvePromoDetalle As Integer = -1
|
||||
Dim ObjDesc As New VentaDescuentos
|
||||
|
||||
If PrecioSugerido > 0 Then
|
||||
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
|
||||
PU = PU.RoundSQL(6)
|
||||
DrPoliza("PU") = PU
|
||||
TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU))
|
||||
TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU) - DescAdicional)
|
||||
|
||||
If DrPSAdicional("IVA").ToString().Contiene("-1", "") Then
|
||||
DrPoliza("PorcentajeIVA") = PorcentajeIVA
|
||||
@@ -21213,7 +21401,7 @@ Partial Class Ventas
|
||||
DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje")
|
||||
DrPoliza("ImporteIEPS") = (DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
DrPoliza("IEPS") = DrPoliza("ImporteIEPS")
|
||||
DrPoliza("Descuento") = 0 ' Descuento
|
||||
DrPoliza("Descuento") = DescAdicional ' Descuento
|
||||
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
|
||||
DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU)
|
||||
DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales)
|
||||
@@ -21221,7 +21409,7 @@ Partial Class Ventas
|
||||
DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS")
|
||||
DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida")
|
||||
DrPoliza("CveActivoFijo") = -1
|
||||
DrPoliza("CvePromocionDetalle") = -1
|
||||
DrPoliza("CvePromocionDetalle") = CvePromoDetalle
|
||||
|
||||
TmpDT.Rows.Add(DrPoliza)
|
||||
End If
|
||||
@@ -27086,6 +27274,12 @@ Partial Class Ventas
|
||||
End If
|
||||
End Using
|
||||
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
|
||||
|
||||
@@ -27493,7 +27687,7 @@ Partial Class Ventas
|
||||
' CancelacionPagos = OpcionesCancelacionPagos.ConPagos_GenerarIxC
|
||||
'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
|
||||
GenerarDevolucionAnticipada = True
|
||||
@@ -31299,6 +31493,18 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
TrVentasMedicas2.Visible = True
|
||||
TrVentasMedicas3.Visible = True
|
||||
TrVentasMedicas5.Visible = True
|
||||
|
||||
For Each item As ListItem In RBLTipoVenta.Items
|
||||
item.Text = $"  {item.Text}"
|
||||
@@ -39744,6 +39951,7 @@ Partial Class Ventas
|
||||
If Opcion = "Cot" Then
|
||||
'TrVentasMedicas2.Visible = False
|
||||
TrVentasMedicas3.Visible = False
|
||||
TrVentasMedicas5.Visible = False
|
||||
Else
|
||||
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
|
||||
End If
|
||||
@@ -40346,7 +40554,7 @@ Partial Class Ventas
|
||||
If resp.Verificado Then
|
||||
Dim CancelacionAcuse = resp.CancelacionAcuse
|
||||
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")
|
||||
End If
|
||||
End Using
|
||||
|
||||
Reference in New Issue
Block a user