This commit is contained in:
@@ -754,7 +754,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Resultados del Ejercicio (Ahorro/Desahorro):</Value>
|
<Value>Resultados del ejercicio(Utilidad o pérdida):</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Italic</FontStyle>
|
<FontStyle>Italic</FontStyle>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
@@ -902,7 +902,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Estado de Actividades </Value>
|
<Value>Estado de Resultado </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>11pt</FontSize>
|
<FontSize>11pt</FontSize>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
@@ -980,7 +980,6 @@
|
|||||||
<Value>= Parameters!pImg.Value</Value>
|
<Value>= Parameters!pImg.Value</Value>
|
||||||
<Sizing>FitProportional</Sizing>
|
<Sizing>FitProportional</Sizing>
|
||||||
<Top>0.06104cm</Top>
|
<Top>0.06104cm</Top>
|
||||||
<Left>0cm</Left>
|
|
||||||
<Height>1.5cm</Height>
|
<Height>1.5cm</Height>
|
||||||
<Width>2.94324cm</Width>
|
<Width>2.94324cm</Width>
|
||||||
<ZIndex>3</ZIndex>
|
<ZIndex>3</ZIndex>
|
||||||
|
|||||||
@@ -2981,6 +2981,25 @@ Public Class ClsCompras
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetRepEvaluacionesProveedores(CveEmpresa As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, Evaluado As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Comp_RepEvaluacionesProveedoresGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||||
|
.Add("@Evaluado", SqlDbType.Int).Value = Evaluado
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al querer obtener el reporte de evaluaciones de proveedores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region "REPORTE PUE SIN PAGO"
|
#Region "REPORTE PUE SIN PAGO"
|
||||||
|
|
||||||
Public Function GetPUESinPago(FI As DateTime, FF As DateTime, CveProveedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean
|
Public Function GetPUESinPago(FI As DateTime, FF As DateTime, CveProveedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean
|
||||||
|
|||||||
@@ -1230,7 +1230,7 @@ Public Class ClsOC
|
|||||||
pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Double = 0,
|
pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Double = 0,
|
||||||
Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, Optional IVA As Double = 0, Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional Total As Double = 0,
|
Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, Optional IVA As Double = 0, Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional Total As Double = 0,
|
||||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0,
|
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0,
|
||||||
Optional IEPSPSIVAPorcentaje As Double = 0) As Boolean
|
Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveVentaDetalleCotizacion As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_OC_OrdenesCompraDetalleAdd")
|
DataAdapter("PA_OC_OrdenesCompraDetalleAdd")
|
||||||
|
|
||||||
@@ -1259,7 +1259,8 @@ Public Class ClsOC
|
|||||||
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
|
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
|
||||||
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
|
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
|
||||||
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje
|
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje
|
||||||
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
|
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
|
||||||
|
.Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -3959,7 +3959,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Compras/RepComprasPrecios.aspx".ToUpper(), 690)
|
PaginaDict.Add("/Compras/RepComprasPrecios.aspx".ToUpper(), 690)
|
||||||
PaginaDict.Add("/Compras/RepDocumentacionProveedor.aspx".ToUpper(), 1206)
|
PaginaDict.Add("/Compras/RepDocumentacionProveedor.aspx".ToUpper(), 1206)
|
||||||
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
|
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
|
||||||
|
PaginaDict.Add("/Compras/RepEvaluacionesProveedores.aspx".ToUpper(), 754)
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -4001,7 +4001,8 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Contabilidad/RepIVADiferencias.aspx".ToUpper(), 127)
|
PaginaDict.Add("/Contabilidad/RepIVADiferencias.aspx".ToUpper(), 127)
|
||||||
PaginaDict.Add("/Contabilidad/PolizasImpresion.aspx".ToUpper(), 380)
|
PaginaDict.Add("/Contabilidad/PolizasImpresion.aspx".ToUpper(), 380)
|
||||||
PaginaDict.Add("/Contabilidad/RegPrePoliza.aspx".ToUpper(), 398)
|
PaginaDict.Add("/Contabilidad/RegPrePoliza.aspx".ToUpper(), 398)
|
||||||
PaginaDict.Add("/Contabilidad/RegPrePoliza1.aspx".ToUpper(), 398)
|
PaginaDict.Add("/Contabilidad/RegPrePoliza1.aspx".ToUpper(), 398)
|
||||||
|
PaginaDict.Add("/Contabilidad/RegPrePolizaS.aspx".ToUpper(), 398)
|
||||||
PaginaDict.Add("/Contabilidad/DescargaRespaldos.aspx".ToUpper(), 400)
|
PaginaDict.Add("/Contabilidad/DescargaRespaldos.aspx".ToUpper(), 400)
|
||||||
PaginaDict.Add("/Contabilidad/RepBalanceGeneral2.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Contabilidad/RepBalanceGeneral2.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Contabilidad/CatEjercicios.aspx".ToUpper(), 570)
|
PaginaDict.Add("/Contabilidad/CatEjercicios.aspx".ToUpper(), 570)
|
||||||
@@ -4594,6 +4595,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Ventas/CatPreciosLista.aspx".ToUpper(), 378)
|
PaginaDict.Add("/Ventas/CatPreciosLista.aspx".ToUpper(), 378)
|
||||||
PaginaDict.Add("/Ventas/RepProductosServicios.aspx".ToUpper(), 352)
|
PaginaDict.Add("/Ventas/RepProductosServicios.aspx".ToUpper(), 352)
|
||||||
PaginaDict.Add("/Ventas/RepProductosServiciosDetalle.aspx".ToUpper(), 352)
|
PaginaDict.Add("/Ventas/RepProductosServiciosDetalle.aspx".ToUpper(), 352)
|
||||||
|
PaginaDict.Add("/Ventas/RepPS.aspx".ToUpper(), 701)
|
||||||
PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353)
|
PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353)
|
||||||
PaginaDict.Add("/Ventas/CatPromociones.aspx".ToUpper(), 123)
|
PaginaDict.Add("/Ventas/CatPromociones.aspx".ToUpper(), 123)
|
||||||
PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 124)
|
PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 124)
|
||||||
@@ -4662,6 +4664,9 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Ventas/RepRemisionesNC.aspx".ToUpper(), 687)
|
PaginaDict.Add("/Ventas/RepRemisionesNC.aspx".ToUpper(), 687)
|
||||||
PaginaDict.Add("/Ventas/CatCobranzaEstatus.aspx".ToUpper(), 7003)
|
PaginaDict.Add("/Ventas/CatCobranzaEstatus.aspx".ToUpper(), 7003)
|
||||||
PaginaDict.Add("/Ventas/CatCobranzaEstatusTurno.aspx".ToUpper(), 7004)
|
PaginaDict.Add("/Ventas/CatCobranzaEstatusTurno.aspx".ToUpper(), 7004)
|
||||||
|
PaginaDict.Add("/Ventas/RepVentasMensuales.aspx".ToUpper(), 720)
|
||||||
|
PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721)
|
||||||
|
PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722)
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
@@ -5923,7 +5928,8 @@ Public Class ClsPaginas
|
|||||||
If Vta.SubProyecto.Colonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", Vta.SubProyecto.Colonia)
|
If Vta.SubProyecto.Colonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", Vta.SubProyecto.Colonia)
|
||||||
If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
|
If Vta.SubProyecto.CP.ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", Vta.SubProyecto.CP)
|
||||||
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||||
If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
|
If Vta.SubProyecto.Pais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", Vta.SubProyecto.Pais)
|
||||||
|
If Not String.IsNullOrEmpty(Vta.SubProyecto.Telefono) AndAlso UsuarioActual.CveEmpresa = 141 Then SBDomicilioSucursal.AppendFormat(", Tel: {0}", Vta.SubProyecto.Telefono)
|
||||||
|
|
||||||
DomicilioSucursal = SBDomicilioSucursal.ToString
|
DomicilioSucursal = SBDomicilioSucursal.ToString
|
||||||
|
|
||||||
|
|||||||
@@ -179,6 +179,25 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
Public Function GetVentasCotizacionesOC(CveVenta As Integer, CveOC As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_VentasCotizacionesOCGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@CveOC", SqlDbType.Int).Value = CveOC
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los datos de la cotizacion, VentaTerminal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Public Function GetVentas(CveEmpresa As Integer, TipoDocto As String, Serie As String, Folio As Integer, Codigo As String, CveCliente As Integer,
|
Public Function GetVentas(CveEmpresa As Integer, TipoDocto As String, Serie As String, Folio As Integer, Codigo As String, CveCliente As Integer,
|
||||||
CveSubProyecto As Integer, CveEstatus As Integer, CveUsuario As Integer, FechaI As String, FechaF As String, FolioFiscal As String, Optional CveClienteSucursal As Integer = -1, Optional CvePS As Integer = -1, Optional PedidoContrato As String = "-1",
|
CveSubProyecto As Integer, CveEstatus As Integer, CveUsuario As Integer, FechaI As String, FechaF As String, FolioFiscal As String, Optional CveClienteSucursal As Integer = -1, Optional CvePS As Integer = -1, Optional PedidoContrato As String = "-1",
|
||||||
Optional OrdenCompra As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional ClienteRFC As String = "-1",
|
Optional OrdenCompra As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional ClienteRFC As String = "-1",
|
||||||
@@ -1517,6 +1536,34 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
|
||||||
|
Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_RepPSEconoGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||||
|
.Add("@GPO", SqlDbType.Int).Value = GPO
|
||||||
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
|
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
|
||||||
|
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el Reporte de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetRepNCxAplicar(CveClienteSucursal As Integer, CveSubProyecto As Integer, CveCliente As Integer, FechaInicio As DateTime, FechaFin As DateTime, ConSaldo As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetRepNCxAplicar(CveClienteSucursal As Integer, CveSubProyecto As Integer, CveCliente As Integer, FechaInicio As DateTime, FechaFin As DateTime, ConSaldo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -3934,7 +3981,7 @@ Public Class ClsVentas
|
|||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function RepIngresosDetalle(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, TipoDocto As String, CveSubProyecto As Integer, CveConceptoContable As Integer, CveCuenta As Integer) As Boolean
|
Public Function RepIngresosDetalle(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, TipoDocto As String, CveSubProyecto As Integer, CveConceptoContable As Integer, CveCuenta As Integer, TipoAmortizacion As Integer) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
DataAdapter("PA_Ventas_RepIngresosDetalle", CommandType.StoredProcedure)
|
DataAdapter("PA_Ventas_RepIngresosDetalle", CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -3945,6 +3992,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
|
.Add("@TipoAmortizacion", SqlDbType.Int).Value = TipoAmortizacion
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -4196,6 +4244,67 @@ Public Class ClsVentas
|
|||||||
Return retorno
|
Return retorno
|
||||||
'compila
|
'compila
|
||||||
End Function
|
End Function
|
||||||
|
Public Function GetRepVentasMensuales(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, Optional CveSubProyecto As Integer = -1, Optional CveClasificacion As Integer = -1,
|
||||||
|
Optional CveVendedor As Integer = -1, Optional CveMarca As Integer = -1, Optional Modalidad As Integer = 0) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_VentasMensualesGet", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@FechaInicio", SqlDbType.DateTime).Value = FechaInicio
|
||||||
|
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
|
.Add("@Modalidad", SqlDbType.Int).Value = Modalidad
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el reporte de ventas mensuales", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function GetRepVentasMensualesDetalle(CveEmpresa As Integer, CveCliente As Integer, FechaInicio As Date, FechaFin As Date, Optional CveSubProyecto As Integer = -1,
|
||||||
|
Optional CveVendedor As Integer = -1, Optional CveMarca As Integer = -1) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_VentasMensualesDetalleGet", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@FechaInicio", SqlDbType.DateTime).Value = FechaInicio
|
||||||
|
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el reporte de ventas mensuales", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
|
.Add("@MesAño", SqlDbType.DateTime).Value = MesAño
|
||||||
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
|
.Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad
|
||||||
|
.Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el reporte de ventas mensuales", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
#Region "Conciliación emitidas SAT"
|
#Region "Conciliación emitidas SAT"
|
||||||
|
|
||||||
Public Function ConciliacionemitidasSATGet(cveEmpresa As Int32) As Boolean
|
Public Function ConciliacionemitidasSATGet(cveEmpresa As Int32) As Boolean
|
||||||
|
|||||||
@@ -49,7 +49,11 @@ Namespace Modelos
|
|||||||
Case "Single"
|
Case "Single"
|
||||||
prop.SetValue(Me, CSng(row(prop.Name)))
|
prop.SetValue(Me, CSng(row(prop.Name)))
|
||||||
Case "String"
|
Case "String"
|
||||||
prop.SetValue(Me, CStr(row(prop.Name)))
|
If String.IsNullOrEmpty(row(prop.Name)) Then
|
||||||
|
prop.SetValue(Me, "")
|
||||||
|
Else
|
||||||
|
prop.SetValue(Me, CStr(row(prop.Name)))
|
||||||
|
End If
|
||||||
Case "UInt32"
|
Case "UInt32"
|
||||||
prop.SetValue(Me, CUInt(row(prop.Name)))
|
prop.SetValue(Me, CUInt(row(prop.Name)))
|
||||||
Case "UInt64"
|
Case "UInt64"
|
||||||
|
|||||||
@@ -8729,6 +8729,7 @@ Namespace Modelos
|
|||||||
FormatoFactura = ""
|
FormatoFactura = ""
|
||||||
SubProyecto = ""
|
SubProyecto = ""
|
||||||
Correo = ""
|
Correo = ""
|
||||||
|
Telefono = ""
|
||||||
UTCOffsetVerano = -7
|
UTCOffsetVerano = -7
|
||||||
UTCOffsetInvierno = -7
|
UTCOffsetInvierno = -7
|
||||||
End Sub
|
End Sub
|
||||||
@@ -8738,20 +8739,8 @@ Namespace Modelos
|
|||||||
Public Sub New(Row As System.Data.DataRow)
|
Public Sub New(Row As System.Data.DataRow)
|
||||||
SetDefaultValues()
|
SetDefaultValues()
|
||||||
If Row IsNot Nothing Then
|
If Row IsNot Nothing Then
|
||||||
Calle = Row("Calle").ToString
|
Me.setValues(Row)
|
||||||
NoExt = Row("NoExt").ToString
|
|
||||||
NoInt = Row("NoInt").ToString
|
|
||||||
Colonia = Row("Colonia").ToString
|
|
||||||
Localidad = Row("Localidad").ToString
|
|
||||||
Municipio = Row("Municipio").ToString
|
|
||||||
Estado = Row("Estado").ToString
|
|
||||||
Pais = Row("Pais").ToString
|
|
||||||
CP = Row("CP").ToString
|
|
||||||
SubProyecto = Row("SubProyecto").ToString
|
|
||||||
UTCOffsetVerano = Row("UTCOffsetVerano").ToString.ToEntero()
|
|
||||||
UTCOffsetInvierno = Row("UTCOffsetInvierno").ToString.ToEntero()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public ReadOnly Property LugarExp As String
|
Public ReadOnly Property LugarExp As String
|
||||||
|
|||||||
@@ -177,6 +177,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Private Function GetClientes(ByVal context As HttpContext) As String
|
Private Function GetClientes(ByVal context As HttpContext) As String
|
||||||
Dim retorno As String = ""
|
Dim retorno As String = ""
|
||||||
Dim DtRetorno As DataTable = Nothing
|
Dim DtRetorno As DataTable = Nothing
|
||||||
|
Dim ColumnaNombre As String = "NombreComercial"
|
||||||
|
'Abreviaturas. N. Nombre, NC. NombreComercial,...
|
||||||
|
If IfNull(context.Request("ColTexto"), "") = "N" Then
|
||||||
|
ColumnaNombre = "Nombre"
|
||||||
|
End If
|
||||||
|
|
||||||
Dim usuario As Usuario = UsuarioActual(context)
|
Dim usuario As Usuario = UsuarioActual(context)
|
||||||
Dim CveEmpresa As String
|
Dim CveEmpresa As String
|
||||||
@@ -209,7 +214,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
|
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
|
||||||
DtRetorno.Columns("CveCliente").ColumnName = "id"
|
DtRetorno.Columns("CveCliente").ColumnName = "id"
|
||||||
DtRetorno.Columns("NombreComercial").ColumnName = "text"
|
DtRetorno.Columns(ColumnaNombre).ColumnName = "text"
|
||||||
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
||||||
context.Response.Write(retorno)
|
context.Response.Write(retorno)
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ Partial Class Bancos_CuentasBancariasDetalle
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If DTUsuarios.FiltraParametros(String.Format("CveUsuario = {0}", DdlUsuarios.SelectedValue.ToString)).Rows.Count > 0 Then
|
If DTUsuarios.FiltraParametros(String.Format("CveUsuario = {0}", DdlUsuarios.SelectedValue.ToString)).Rows.Count > 0 Then
|
||||||
Alert("El usuario ya se encuntra con Acceso a la cuenta", TipoMensaje.MsgAdvertencia)
|
Alert("El usuario ya esta registrado en este numero de cuenta", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
Row = DTUsuarios.NewRow
|
Row = DTUsuarios.NewRow
|
||||||
Row("CveCuenta") = DTUsuarios.Rows.Count + 1
|
Row("CveCuenta") = DTUsuarios.Rows.Count + 1
|
||||||
|
|||||||
@@ -880,8 +880,24 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Dim tipoCambioCompra As Decimal
|
Dim tipoCambioCompra As Decimal
|
||||||
Dim TipoCambioPago As Decimal = 0
|
Dim TipoCambioPago As Decimal = 0
|
||||||
Dim TipoCambioGeneral As Decimal = 0
|
Dim TipoCambioGeneral As Decimal = 0
|
||||||
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
Dim tipoCambioCompraValuacion As Decimal = 1
|
||||||
|
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||||
|
|
||||||
|
Dim TipoCambioFluctuacion As Decimal = 1
|
||||||
|
Dim FechaUltimaFluctuacion As Date = MinFecha
|
||||||
|
If ObjIE.GetFluctuacionesBitacora(UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim tFecha As Date = TxtFechaDocumento.Text.ToDate
|
||||||
|
Dim FechaC As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
|
||||||
|
Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha < #" & FechaC & "#", "Fecha DESC")
|
||||||
|
|
||||||
|
If drr IsNot Nothing Then
|
||||||
|
FechaUltimaFluctuacion = drr("Fecha").ToString.ToDate
|
||||||
|
TipoCambioFluctuacion = drr("TipoCambio").ToString.ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'inserto las compras que voy a pagar
|
'inserto las compras que voy a pagar
|
||||||
For Each gvr As GridViewRow In GvCxP.Rows
|
For Each gvr As GridViewRow In GvCxP.Rows
|
||||||
@@ -895,11 +911,13 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
||||||
TipoCambioPago = TxtTC.Text.ToDecimal
|
TipoCambioPago = TxtTC.Text.ToDecimal
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
tipoCambioCompraValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||||
PorcentajePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) / gvr.DataKey("Original").ToDecimal).RoundSQL
|
PorcentajePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) / gvr.DataKey("Original").ToDecimal).RoundSQL
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||||
'TipoCambioPago = 'GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToString.ToDecimal
|
'TipoCambioPago = 'GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToString.ToDecimal
|
||||||
TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
|
||||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
|
tipoCambioCompraValuacion = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||||
PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||||
TipoCambioPago = TxtTCDolares.Text.ToDecimal
|
TipoCambioPago = TxtTCDolares.Text.ToDecimal
|
||||||
@@ -926,17 +944,17 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
importeMX = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompra
|
importeMX = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompraValuacion
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
importeMX = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompra
|
importeMX = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompraValuacion
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompraValuacion
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
TipoCambioGeneral = tipoCambioCompra
|
TipoCambioGeneral = tipoCambioCompraValuacion
|
||||||
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
||||||
'cuando son dolares, y tienen complementaria, se hace el registro
|
'cuando son dolares, y tienen complementaria, se hace el registro
|
||||||
If gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
If gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
@@ -948,7 +966,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
CveCuenta = CveCuentaProveedorExtranjera
|
CveCuenta = CveCuentaProveedorExtranjera
|
||||||
If ImporteMovimiento <> 0 AndAlso (UsuarioActual.CveEmpresa = 119 Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
If ImporteMovimiento <> 0 AndAlso (UsuarioActual.CveEmpresa = 119 Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, 206, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompra - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompra, CveCuenta:=CveCuentaComplementaria) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, 206, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion, CveCuenta:=CveCuentaComplementaria) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -961,12 +979,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
@@ -1007,18 +1027,20 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
TipoCambioGeneral = TipoCambioPago
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
@@ -1041,12 +1063,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
@@ -1086,18 +1110,20 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
TipoCambioGeneral = TipoCambioPago
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
@@ -1120,12 +1146,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
@@ -1165,18 +1193,20 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
TipoCambioGeneral = TipoCambioPago
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
@@ -1199,18 +1229,20 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
TipoCambioGeneral = TipoCambioPago
|
TipoCambioGeneral = tipoCambioCompra
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
@@ -1233,18 +1265,20 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||||
TipoCambioGeneral = TipoCambioPago
|
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
|
|
||||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||||
|
|
||||||
@@ -1267,12 +1301,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
@@ -1300,12 +1336,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
@@ -1517,12 +1555,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
@@ -1539,12 +1579,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
@@ -1579,12 +1621,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||||
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
@@ -1601,12 +1645,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
@@ -1654,12 +1700,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
End If
|
End If
|
||||||
@@ -1680,12 +1728,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento
|
importeMX = ImporteMovimiento
|
||||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||||
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
ImporteMovimiento = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
End If
|
End If
|
||||||
@@ -1700,49 +1750,101 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Case 64 'Ganancia
|
Case 64 'Ganancia
|
||||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
|
||||||
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||||
'Dim IVA As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||||
Dim IVA As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||||
Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
||||||
|
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
TipoCambioGeneral = TCImpuestos
|
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
If TipoCambioPago < tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TipoCambioPago) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompra) 'Añadimos la diferencia de ganancia en la venta
|
Diferencia = Math.Round(Diferencia, 2)
|
||||||
ImporteMovimiento -= (IVA * TCImpuestos) - (IVA * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el IVA
|
|
||||||
ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el RetIVA
|
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
|
||||||
ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el RetISR
|
|
||||||
ImporteMovimiento -= (IEPS * TCImpuestos) - (IEPS * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el IEPS
|
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
||||||
ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
If Diferencia > 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
importeMX = ImporteMovimiento
|
ImporteMovimiento = Math.Abs(Diferencia)
|
||||||
End If
|
importeMX = ImporteMovimiento
|
||||||
|
End If
|
||||||
|
|
||||||
|
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
||||||
|
'If tipoCambioPago > tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioPago) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en la venta
|
||||||
|
' ImporteMovimiento -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
|
' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
|
' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
|
' ImporteMovimiento -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
|
' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
||||||
|
' importeMX = ImporteMovimiento
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
'Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
|
|
||||||
|
''Dim IVA As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
|
'Dim IVA As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
|
'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
|
|
||||||
|
'IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||||
|
'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||||
|
'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
||||||
|
'TipoCambioGeneral = TCImpuestos
|
||||||
|
''' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
||||||
|
'If TipoCambioPago < tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TipoCambioPago) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompra) 'Añadimos la diferencia de ganancia en la venta
|
||||||
|
' ImporteMovimiento -= (IVA * TCImpuestos) - (IVA * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
|
' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
|
' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
|
' ImporteMovimiento -= (IEPS * TCImpuestos) - (IEPS * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
|
' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
||||||
|
' importeMX = ImporteMovimiento
|
||||||
|
'End If
|
||||||
Else
|
Else
|
||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
End If
|
End If
|
||||||
Case 65 'Perdida
|
Case 65 'Perdida
|
||||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
|
||||||
Dim IVA As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
|
||||||
Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
|
||||||
|
|
||||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||||
If TipoCambioPago > tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
|
||||||
ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompra) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TipoCambioPago) 'Añadimos la diferencia de ganancia en la venta
|
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago) 'Añadimos la diferencia de perdida en la venta
|
||||||
ImporteMovimiento -= (IVA * tipoCambioCompra) - (IVA * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
ImporteMovimiento -= (IEPS * tipoCambioCompra) - (IEPS * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
Diferencia = Math.Round(Diferencia, 2)
|
||||||
importeMX = ImporteMovimiento
|
'si la diferencia es negativa es pérdida, si es positiva es ganancia
|
||||||
|
If Diferencia < 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
ImporteMovimiento = Math.Abs(Diferencia)
|
||||||
|
importeMX = ImporteMovimiento
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
|
'Dim IVA As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IVAPorPagar").ToDecimal - (gvr.DataKey("IVA").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IVAPorPagar").ToDecimal, gvr.DataKey("IVA").ToDecimal * PorcentajePago)
|
||||||
|
'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||||
|
|
||||||
|
'IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||||
|
'CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||||
|
'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
||||||
|
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
||||||
|
'If TipoCambioPago > tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||||
|
' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompra) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TipoCambioPago) 'Añadimos la diferencia de ganancia en la venta
|
||||||
|
' ImporteMovimiento -= (IVA * tipoCambioCompra) - (IVA * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||||
|
' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||||
|
' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||||
|
' ImporteMovimiento -= (IEPS * tipoCambioCompra) - (IEPS * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||||
|
' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
|
||||||
|
' importeMX = ImporteMovimiento
|
||||||
|
'End If
|
||||||
Else
|
Else
|
||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -4396,7 +4396,7 @@ Partial Class Compras_Compras
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
'METODO DE PREPOLIZA DE ALMACEN
|
'METODO DE PREPOLIZA DE ALMACEN
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||||
Dim ImporteAlmacen = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
|
Dim ImporteAlmacen = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
|
||||||
If ImporteAlmacen > 0 Then
|
If ImporteAlmacen > 0 Then
|
||||||
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||||
@@ -4408,7 +4408,7 @@ Partial Class Compras_Compras
|
|||||||
If OCVinculada And Not (CveImportacion > 0 Or CveFlete > 0) Then
|
If OCVinculada And Not (CveImportacion > 0 Or CveFlete > 0) Then
|
||||||
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
If UsuarioActual.CveEmpresa.Contiene(72, 80, 140, 141) Then
|
||||||
CveConceptoContableAlmacen = 205
|
CveConceptoContableAlmacen = 205
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -6235,7 +6235,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
Case 6 'Compra
|
Case 6 'Compra
|
||||||
|
|
||||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||||
|
|
||||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||||
|
|||||||
@@ -334,9 +334,10 @@ Partial Class Compras_EvaluacionProveedor
|
|||||||
'ObjCarta.Guardar(PathDestino)
|
'ObjCarta.Guardar(PathDestino)
|
||||||
ObjCarta.GuardarStreamPDF()
|
ObjCarta.GuardarStreamPDF()
|
||||||
archivoCarta.ArchivoBinario = ObjCarta.GetBytesDocumento()
|
archivoCarta.ArchivoBinario = ObjCarta.GetBytesDocumento()
|
||||||
|
|
||||||
Dim fileinfo As New FileInfo(PathDestino)
|
Dim fileinfo As New FileInfo(PathDestino)
|
||||||
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority) & "/temp/" & fileinfo.Name
|
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority) & "/temp/" & fileinfo.Name
|
||||||
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority) & "/temp/" & fileinfo.Name
|
|
||||||
If File.Exists(PathDestino) Then
|
If File.Exists(PathDestino) Then
|
||||||
File.Delete(PathDestino)
|
File.Delete(PathDestino)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -887,6 +887,7 @@ Partial Class PopUpVerFactura
|
|||||||
Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString
|
Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString
|
||||||
Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString
|
Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString
|
||||||
Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
|
Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
|
||||||
|
Vta.Cliente.MailCotizacion = dtVentas(0)("SucClienteCorreo").ToString
|
||||||
Vta.RefDocto = dtVentas(0)("Ref").ToString
|
Vta.RefDocto = dtVentas(0)("Ref").ToString
|
||||||
Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
|
Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
|
||||||
Vta.NumeroCuenta = dtVentas(0)("NumCtaPago").ToString
|
Vta.NumeroCuenta = dtVentas(0)("NumCtaPago").ToString
|
||||||
|
|||||||
@@ -2286,7 +2286,12 @@
|
|||||||
|
|
||||||
<ajax:TabPanel ID="TabDocs" runat="server" HeaderText="Documentación" CssClass="table table-hover table-advance Widthall" Visible="False">
|
<ajax:TabPanel ID="TabDocs" runat="server" HeaderText="Documentación" CssClass="table table-hover table-advance Widthall" Visible="False">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDocs" AutoGenerateColumns="false" runat="server" GridLines="none" DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite">
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpDocumentos" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvDocs" AutoGenerateColumns="false" runat="server" GridLines="none"
|
||||||
|
DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="60px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="60px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -2300,7 +2305,7 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Completo" ItemStyle-Width="40px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Completo" ItemStyle-Width="40px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="chkEstatus" runat="server" CssClass="make-switchsd" Checked='<%# Eval("Estatus").ToString = "1" %>'></asp:CheckBox>
|
<asp:CheckBox ID="chkEstatus" runat="server" CssClass="make-switchsd" Checked='<%# Eval("Estatus").ToString = "1" %>' Enabled="false"></asp:CheckBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Observaciones" ItemStyle-Width="100">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Observaciones" ItemStyle-Width="100">
|
||||||
@@ -2308,7 +2313,7 @@
|
|||||||
<asp:TextBox ID="TxtObservaciones" Width="300" MaxLength="100" runat="server" Text='<%# Eval("Observacion") %>'></asp:TextBox>
|
<asp:TextBox ID="TxtObservaciones" Width="300" MaxLength="100" runat="server" Text='<%# Eval("Observacion") %>'></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Fecha limite" ItemStyle-Width="100">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Fecha limite" ItemStyle-Width="100" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtFechaLimite" Width="100" onKeyPress="return handleInput(this.value)" MaxLength="100" runat="server" Text='<%# Eval("FechaLimite", "{0:d}") %>'></asp:TextBox>
|
<asp:TextBox ID="TxtFechaLimite" Width="100" onKeyPress="return handleInput(this.value)" MaxLength="100" runat="server" Text='<%# Eval("FechaLimite", "{0:d}") %>'></asp:TextBox>
|
||||||
<ajax:CalendarExtender runat="server" ID="Calendario6" TargetControlID="TxtFechaLimite" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="Calendario6" TargetControlID="TxtFechaLimite" Enabled="True"></ajax:CalendarExtender>
|
||||||
@@ -2322,7 +2327,7 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="ImgUpload" runat="server" AlternateText="Editar" CausesValidation="False"
|
<asp:LinkButton ID="ImgUpload" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="UploadModal_ClickDocumentacion"
|
||||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' ></i>" />
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' ></i>" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -2331,15 +2336,22 @@
|
|||||||
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
|
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="ImgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="Update_ClickDocumentacion"
|
<asp:LinkButton ID="LnkGVEliminar" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="LnkGVEliminar_Click"
|
||||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-check'></i>" />
|
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-check'></i>" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
@@ -3997,6 +4009,55 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ModalUploadDoc" class="modal ADS fade" role="dialog">
|
||||||
|
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalReferenciasVerificacion" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<asp:UpdatePanel ID="UpModalTitleUploadDocumento" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlModalUploadTitulo" runat="server"></asp:Literal></h4>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UPModalUploadDoc" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:TextBox ID="TxtFileDocumentacion" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="btnUploadFileDoc" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<iframe id="my_iframe" style="display: none;"></iframe>
|
<iframe id="my_iframe" style="display: none;"></iframe>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="server">
|
||||||
|
|||||||
@@ -323,6 +323,159 @@ Partial Class Compras_Proveedores
|
|||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region " D O C U M E N T A C I O N"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Property CveDocumentacionElectronica As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CvePersonalClienteDocumentacion") Is Nothing Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
Return DirectCast(ViewState("CvePersonalClienteDocumentacion"), Integer)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CvePersonalClienteDocumentacion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property CveDocumentacion As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveDocumentacion") Is Nothing Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
Return DirectCast(ViewState("CveDocumentacion"), Integer)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveDocumentacion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property Documentacion As String
|
||||||
|
Get
|
||||||
|
If ViewState("Documentacion") Is Nothing Then
|
||||||
|
Return "-1"
|
||||||
|
Else
|
||||||
|
Return ViewState("Documentacion").ToString
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("Documentacion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property AdjuntoDocumentacion As String
|
||||||
|
Get
|
||||||
|
If ViewState("AdjuntoDocumentacion") Is Nothing Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return ViewState("AdjuntoDocumentacion").ToString
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("AdjuntoDocumentacion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Property DiasVigencia As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("DiasVigencia") Is Nothing Then
|
||||||
|
Return 0
|
||||||
|
Else
|
||||||
|
Return DirectCast(ViewState("DiasVigencia"), Integer)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("DiasVigencia") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property AplicaFechaVencimiento As Boolean
|
||||||
|
Get
|
||||||
|
If ViewState("AplicaFechaVencimiento") Is Nothing Then
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return DirectCast(ViewState("AplicaFechaVencimiento"), Boolean)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("AplicaFechaVencimiento") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property FechaVigencia As Date
|
||||||
|
Get
|
||||||
|
If ViewState("FechaVigencia") Is Nothing Then
|
||||||
|
Return Nothing
|
||||||
|
Else
|
||||||
|
Return ViewState("FechaVigencia").ToString.ToDate
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Date)
|
||||||
|
ViewState("FechaVigencia") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property Estatus As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("Estatus") Is Nothing Then
|
||||||
|
Return 0
|
||||||
|
Else
|
||||||
|
Return DirectCast(ViewState("Estatus"), Integer)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("Estatus") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property ObservacionDocumentacion As String
|
||||||
|
Get
|
||||||
|
If ViewState("ObservacionDocumentacion") Is Nothing Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return ViewState("ObservacionDocumentacion").ToString
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("ObservacionDocumentacion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property FechaLimite As Date
|
||||||
|
Get
|
||||||
|
If ViewState("FechaLimite") Is Nothing Then
|
||||||
|
Return Date.Now.AddDays(15)
|
||||||
|
Else
|
||||||
|
Return ViewState("FechaLimite").ToString.ToDate
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Date)
|
||||||
|
ViewState("FechaLimite") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property DTDocumentacion As DataTable
|
||||||
|
Get
|
||||||
|
If ViewState("DTDocumentacion") Is Nothing Then
|
||||||
|
Return New DataTable
|
||||||
|
Else
|
||||||
|
Return DirectCast(ViewState("DTDocumentacion"), DataTable)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
|
||||||
|
End Set
|
||||||
|
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
CountCuentasxPagar = 0
|
CountCuentasxPagar = 0
|
||||||
@@ -2541,9 +2694,10 @@ Partial Class Compras_Proveedores
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "D O C U M E N T A C I O N"
|
#Region "D O C U M E N T A C I O N"
|
||||||
|
|
||||||
Private Sub CargaDocs()
|
Private Sub CargaDocs()
|
||||||
Dim Edoc As New ClsEdocumentacion
|
Dim Edoc As New ClsEdocumentacion
|
||||||
If Edoc.DocumentacionElectronicaGet(-1, -1, CveProveedor, UsuarioActual.CveEmpresa, -1) Then
|
If Edoc.DocumentacionElectronicaGet(-1, -1, CveProveedor, UsuarioActual.CveEmpresa, -1, -1, 4) Then
|
||||||
GvDocs.DataSource = Edoc.DtResultados
|
GvDocs.DataSource = Edoc.DtResultados
|
||||||
Edoc.DocumentacionGet(-1, -1, 1, UsuarioActual.CveEmpresa)
|
Edoc.DocumentacionGet(-1, -1, 1, UsuarioActual.CveEmpresa)
|
||||||
' GVEDoc.DataSource = Edoc.DtResultados
|
' GVEDoc.DataSource = Edoc.DtResultados
|
||||||
@@ -2561,38 +2715,253 @@ Partial Class Compras_Proveedores
|
|||||||
GvDocs.HeaderRow.TableSection = TableRowSection.TableHeader
|
GvDocs.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||||
'RegistraScript("OrdenarGV();")
|
'RegistraScript("OrdenarGV();")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
UpDocumentos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Update_ClickDocumentacion(sender As Object, e As EventArgs)
|
Public Sub UploadModal_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
' Dim chkEstatus As CheckBox
|
||||||
|
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero
|
||||||
|
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString.ToEntero
|
||||||
|
Documentacion = GvRow.DataKey("Documentacion")
|
||||||
|
AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
|
||||||
|
|
||||||
|
|
||||||
|
'DiasVigencia = GvRow.DataKey("DiasVigencia").ToString.ToEntero
|
||||||
|
Dim x As String = GvRow.DataKey("AplicaFechaVencimiento")
|
||||||
|
If GvRow.DataKey("AplicaFechaVencimiento") = "1" Then AplicaFechaVencimiento = True Else AplicaFechaVencimiento = False
|
||||||
|
|
||||||
|
If GvRow.DataKey("Adjunto").ToString.Length > 0 Then
|
||||||
|
FechaVigencia = GvRow.DataKey("Adjunto").ToString.ToDate
|
||||||
|
Else
|
||||||
|
FechaVigencia = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Estatus = GvRow.DataKey("Estatus").ToEntero
|
||||||
|
|
||||||
|
'If chkEstatus.Checked Then
|
||||||
|
' Estatus = 1
|
||||||
|
'Else
|
||||||
|
' Estatus = 0
|
||||||
|
'End If
|
||||||
|
|
||||||
|
ObservacionDocumentacion = GvRow.FCTextBox("TxtObservaciones").Text.Trim.ToUpper
|
||||||
|
FechaLimite = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
|
||||||
|
|
||||||
|
AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
|
||||||
|
|
||||||
|
LtlModalUploadTitulo.Text = "Subir " & Documentacion
|
||||||
|
|
||||||
|
UpModalTitleUploadDocumento.Update()
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalUploadDoc').modal({ backdrop: 'static', keyboard: false});")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvDocs_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocs.RowDataBound
|
||||||
|
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString
|
||||||
|
|
||||||
|
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||||
|
Dim ImgUpload As LinkButton = e.Row.FCLinkButton("ImgUpload")
|
||||||
|
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
||||||
|
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
|
||||||
|
Dim ChkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
|
||||||
|
' Dim txtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
|
||||||
|
Dim CveDocumentacionElectronica As String = e.Row.DataKey("CveDocumentacionElectronica")
|
||||||
|
|
||||||
|
Dim requerido As Boolean = Boolean.Parse(e.Row.DBCampo("Requerido"))
|
||||||
|
|
||||||
|
'Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
|
||||||
|
Dim separado As Char() = ".".ToCharArray
|
||||||
|
Dim array() As String = Adjunto.Split(separado)
|
||||||
|
Dim extencion As String = ""
|
||||||
|
|
||||||
|
Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString.ToEntero
|
||||||
|
Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False)
|
||||||
|
Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False)
|
||||||
|
|
||||||
|
txtFechaLimite.Visible = If(AplicaDiasLimite, True, False)
|
||||||
|
' txtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False)
|
||||||
|
|
||||||
|
If e.Row.DataKey("Estatus").ToEntero = 1 Then
|
||||||
|
ChkEstatus.Checked = True
|
||||||
|
Else
|
||||||
|
ChkEstatus.Checked = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
|
||||||
|
' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||||
|
' If DateTime.Today > e.Row.DBCampo("FechaVigencia").ToString.ToDateTime Then
|
||||||
|
' txtFechaVigencia.ForeColor = Drawing.Color.Red
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
If array.Length > 0 Then
|
||||||
|
extencion = array(array.Length - 1)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(3) Then
|
||||||
|
' chkEstatus.Checked = True
|
||||||
|
ImgUpload.Visible = False
|
||||||
|
Else
|
||||||
|
'chkEstatus.Checked = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
|
'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
|
||||||
|
' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'Dim scripMascara = "$('#" & txtFechaLimite.ClientID & "').mask('00/00/0000');$('#" & txtFechaVigencia.ClientID & "').mask('00/00/0000');"
|
||||||
|
'RegistraScript(scripMascara, "scriptMascara")
|
||||||
|
|
||||||
|
If Adjunto.Trim.Length > 0 Then
|
||||||
|
|
||||||
|
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||||
|
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||||
|
|
||||||
|
If File.Exists(linkDescargaArchivo) Then
|
||||||
|
ImgDownLoad.Visible = True
|
||||||
|
|
||||||
|
If extencion.Length > 0 Then
|
||||||
|
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica & "." & extencion)
|
||||||
|
Else
|
||||||
|
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ImgDownLoad.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
ImgDownLoad.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If requerido Then
|
||||||
|
ImgRequired.Text = " <a class='btn btn-circle btn-sm yelow' href='#' data-toggle='tooltip' title=' Requerido!' ><i class='fa fa-asterisk '></i></a>"
|
||||||
|
End If
|
||||||
|
|
||||||
|
'chkEstatus.Checked = ImgDownLoad.Visible
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnUploadFileDoc_Click(sender As Object, e As EventArgs) Handles btnUploadFileDoc.Click
|
||||||
|
|
||||||
|
Dim FileExtension As String = "-1"
|
||||||
|
Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
|
||||||
|
Dim Filename As String = ""
|
||||||
|
Dim ErrorProceso As Boolean = False
|
||||||
|
|
||||||
|
If AplicaFechaVencimiento And DiasVigencia > 0 Then
|
||||||
|
FechaVigencia = DateTime.Today.AddDays(DiasVigencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each fileItem As Archivo In Filesgral
|
||||||
|
|
||||||
|
Try
|
||||||
|
|
||||||
|
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||||
|
Dim tempArray() As String
|
||||||
|
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim objEdoc As New ClsEdocumentacion
|
||||||
|
objEdoc.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If CveDocumentacionElectronica = -1 Then
|
||||||
|
|
||||||
|
CveDocumentacionElectronica = objEdoc.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, CveProveedor, 1, ObservacionDocumentacion, "-1", UsuarioActual.CveUsuario, FechaLimite, FechaVigencia)
|
||||||
|
|
||||||
|
If CveDocumentacionElectronica > 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 1, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
|
||||||
|
ErrorProceso = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Else
|
||||||
|
If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 1, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
|
||||||
|
ErrorProceso = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If Not ErrorProceso = True Then
|
||||||
|
|
||||||
|
Dim rutaDestino As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & CveDocumentacionElectronica & "." & FileExtension
|
||||||
|
Dim rutaAdjuntoAnterior As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & AdjuntoDocumentacion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\") Then
|
||||||
|
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If File.Exists(rutaAdjuntoAnterior) And AdjuntoDocumentacion.Trim.Length > 0 Then
|
||||||
|
File.Delete(rutaAdjuntoAnterior)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If System.IO.File.Exists(rutaDestino) Then
|
||||||
|
System.IO.File.Delete(rutaDestino)
|
||||||
|
End If
|
||||||
|
|
||||||
|
System.IO.File.Move(fileItem.FileUrl, rutaDestino)
|
||||||
|
Catch ex As Exception
|
||||||
|
GuardaLog($"Error al gaurdar documento (moviendo archivo digital) --> Error{ ex.StackTrace}")
|
||||||
|
ErrorProceso = True
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not ErrorProceso Then
|
||||||
|
objEdoc.Commit()
|
||||||
|
Alert("Documento cargado correctamente")
|
||||||
|
Else
|
||||||
|
objEdoc.RollBack()
|
||||||
|
Alert("Error al cargar archivo", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
objEdoc.Dispose()
|
||||||
|
|
||||||
|
CargaDocs()
|
||||||
|
|
||||||
|
|
||||||
|
TxtFileDocumentacion.Text = ""
|
||||||
|
UPModalUploadDoc.Update()
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Error al cargar archivo", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalUploadDoc').modal('hide')", "hidemodal3")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkGVEliminar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
Dim activo As Boolean = False
|
|
||||||
|
|
||||||
Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero
|
|
||||||
Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString
|
|
||||||
Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
|
|
||||||
|
|
||||||
Dim observaciones As String = GvRow.FCTextBox("TxtObservaciones").Text ' DirectCast(GvRow.FindControl("TxtObservaciones"), TextBox).Text
|
|
||||||
'Dim DDLEstatus As DropDownList = DirectCast(GvRow.FindControl("DDLEstatus"), DropDownList)
|
|
||||||
Dim chkCompleto As CheckBox = DirectCast(GvRow.FindControl("chkEstatus"), CheckBox)
|
|
||||||
Dim _Estatus As Integer
|
|
||||||
|
|
||||||
If chkCompleto.Checked Then _Estatus = 1 Else _Estatus = 0
|
|
||||||
|
|
||||||
|
|
||||||
Dim objRH As New ClsEdocumentacion
|
|
||||||
|
|
||||||
If Not GvRow.DataKey("CveDocumentacionElectronica").ToEntero = -1 Then
|
|
||||||
If objRH.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, _CveDocumentacion, -1, -1, CveProveedor, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate) Then
|
|
||||||
Alert("Documento actualizado correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If objRH.DocumentacionElectronicaAdd(_CveDocumentacion, -1, -1, CveProveedor, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate) > 0 Then
|
|
||||||
Alert("Documento actualizado correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
objRH.Dispose()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -5778,6 +6147,8 @@ Partial Class Compras_Proveedores
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||||
@@ -60,12 +59,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:CompareValidator ID="cvTxtFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ></asp:CompareValidator>
|
||||||
<asp:CompareValidator ID="cvTxtFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ></asp:CompareValidator>
|
<ajax:ValidatorCalloutExtender ID="cvcTxtFechaI" runat="server" HighlightCssClass="vco" TargetControlID="cvTxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<%-- <asp:RequiredFieldValidator ID="rfvTxtFechaI" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo es requerido por la aplicación, por favor ingrese una fecha."></asp:RequiredFieldValidator>--%>
|
|
||||||
|
|
||||||
<ajax:ValidatorCalloutExtender ID="cvcTxtFechaI" runat="server" HighlightCssClass="vco" TargetControlID="cvTxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<%--<ajax:ValidatorCalloutExtender ID="rfvcTxtFechaI" runat="server" HighlightCssClass="vco" TargetControlID="rfvTxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -77,17 +72,12 @@
|
|||||||
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<%-- <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="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:CompareValidator ID="cvImgFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ></asp:CompareValidator>
|
||||||
<asp:CompareValidator ID="cvImgFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ></asp:CompareValidator>
|
<ajax:ValidatorCalloutExtender ID="cvcImgFechaF" runat="server" HighlightCssClass="vco" TargetControlID="cvImgFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<%--<asp:RequiredFieldValidator ID="rfvImgFechaF" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo es requerido por la aplicación, por favor ingrese una fecha."></asp:RequiredFieldValidator>--%>
|
|
||||||
|
|
||||||
<ajax:ValidatorCalloutExtender ID="cvcImgFechaF" runat="server" HighlightCssClass="vco" TargetControlID="cvImgFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<%--<ajax:ValidatorCalloutExtender ID="rfvcImgFechaF" runat="server" HighlightCssClass="vco" TargetControlID="rfvImgFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-1 truncate">Estatus</div>
|
<div class="col-md-1 truncate">Estatus</div>
|
||||||
|
|
||||||
@@ -100,18 +90,12 @@
|
|||||||
<asp:ListItem Value="3">Completado</asp:ListItem>
|
<asp:ListItem Value="3">Completado</asp:ListItem>
|
||||||
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -211,17 +195,7 @@
|
|||||||
<asp:CompareValidator ID="cvTxtFechaVigencia" runat="server" ControlToValidate="TxtFechaVigencia" Display="None" ErrorMessage="El campo <b>''Fecha Limite''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRL"></asp:CompareValidator>
|
<asp:CompareValidator ID="cvTxtFechaVigencia" runat="server" ControlToValidate="TxtFechaVigencia" Display="None" ErrorMessage="El campo <b>''Fecha Limite''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRL"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI5" runat="server" HighlightCssClass="vco" TargetControlID="cvTxtFechaVigencia" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI5" runat="server" HighlightCssClass="vco" TargetControlID="cvTxtFechaVigencia" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="ImgUpload" runat="server" AlternateText="Editar" CausesValidation="False"
|
|
||||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' title='Subir documento' ></i>" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
|
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderText="Cargar">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderText="Cargar">
|
||||||
@@ -258,14 +232,7 @@
|
|||||||
|
|
||||||
</asp:LinkButton>
|
</asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" HeaderText="Aprobar">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="ImgAprobar" runat="server"></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
267
Compras/RepEvaluacionesProveedores.aspx
Normal file
267
Compras/RepEvaluacionesProveedores.aspx
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEvaluacionesProveedores.aspx.vb" Inherits="RepEvaluacionesProveedores" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.table-scrollable{
|
||||||
|
margin-top:0px!important;
|
||||||
|
margin-bottom:0px!important;
|
||||||
|
}
|
||||||
|
.dataTables_scrollHeadInner {
|
||||||
|
width: 100% !important;
|
||||||
|
background-color: #dddddd;
|
||||||
|
padding-left: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollFoot {
|
||||||
|
display: none;
|
||||||
|
position:static;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scrollable {
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scroll {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table.dataTable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollBody table th {
|
||||||
|
padding: 0px !important;
|
||||||
|
padding-right: 4px !important;
|
||||||
|
padding-left: 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Evaluaciones de Proveedores
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
|
||||||
|
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||||
|
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption magindate">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Proveedor</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="form-control input-sm select2me" Width="250" DataValueField="CveProveedor" DataTextField="RazonSocial"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Fecha Inicio</div>
|
||||||
|
<div class="col-md-2 col-sm-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" 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="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Fecha Fin</div>
|
||||||
|
<div class="col-md-2 col-sm-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<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="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Evaluado</div>
|
||||||
|
<div class="col-md-2 col-sm-2">
|
||||||
|
<asp:DropDownList ID="DdlEvaluado" runat="server" CssClass="form-control input-sm select2me" Width="100">
|
||||||
|
<asp:ListItem Value="-1">-</asp:ListItem>
|
||||||
|
<asp:ListItem Value="0">Sin Evaluar</asp:ListItem>
|
||||||
|
<asp:ListItem Value="1">Evaluar</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||||
|
<div class="row">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="DivFamiliaSubFamilia" class="row" runat="server" visible="false">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<div id="dvCuerpo" style ="width:100% ">
|
||||||
|
<asp:UpdatePanel ID="UPDatos" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GV" runat="server" GridLines="None" BorderWidth="0" UseAccessibleHeader="true" DataKeyNames="CveProveedor,Proveedor,SerieFolio,FechaEvaluacion,UsuarioEvaluo,Calificacion"
|
||||||
|
CssClass="correcto table table-smallpadding Widthall " data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Proveedor").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Serie Folio" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("SerieFolio").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Fecha Evaluacion" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("FechaEvaluacion").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Usuario Evaluó" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("UsuarioEvaluo").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Calificación" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Calificacion").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||||
|
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||||
|
<%--<script type="text/javascript">
|
||||||
|
function IrC(v) {
|
||||||
|
|
||||||
|
window.open('../Compras/Compras.aspx?CveCompra=' + v, '_blank');
|
||||||
|
}
|
||||||
|
function IrO(v) {
|
||||||
|
|
||||||
|
window.open('../OC/OC.aspx?OC=' + v, '_blank');
|
||||||
|
}
|
||||||
|
function IrP(v) {
|
||||||
|
window.open('../Compras/Proveedores.aspx?CveProveedor=' + v, '_blank');
|
||||||
|
}
|
||||||
|
|
||||||
|
var dTable;
|
||||||
|
function pageLoad() {
|
||||||
|
var Tam = TamañoVentana();
|
||||||
|
var Alto = Tam.height - 330;
|
||||||
|
if (Alto < 100) {
|
||||||
|
Alto = 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var rows = false;
|
||||||
|
var cont = 0;
|
||||||
|
|
||||||
|
$("#<%=GV.ClientID %> tr").each(function () {
|
||||||
|
|
||||||
|
cont++;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (cont > 2) {
|
||||||
|
var head = $('<thead></thead>');
|
||||||
|
head.append($('#C_GV tr:nth-child(1)'));
|
||||||
|
$('#C_GV').prepend(head);
|
||||||
|
dTable = $('#C_GV').DataTable({
|
||||||
|
'order': [], 'orderable': true, scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false
|
||||||
|
});
|
||||||
|
subHeaders();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$(window).resize(function () {
|
||||||
|
|
||||||
|
subHeaders();
|
||||||
|
dTable.columns.adjust().draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
function subHeaders() {
|
||||||
|
$('#dvCa').css('visibility', 'hidden');
|
||||||
|
$("#<%=GV.ClientID %> tr").each(function() {
|
||||||
|
if (!this.rowIndex) return;
|
||||||
|
var celdas = [];
|
||||||
|
|
||||||
|
$(this).find('td').each(function (column, td) {
|
||||||
|
//scrollWidth
|
||||||
|
//celdas.push($(td).width());
|
||||||
|
var scrollWidt =0;
|
||||||
|
scrollWidt = $(td).prop('scrollWidth')
|
||||||
|
celdas.push($(td).prop('scrollWidth'));
|
||||||
|
//console.log('this ' + $(this).width());
|
||||||
|
//console.log('td ' + $(td).width());
|
||||||
|
});
|
||||||
|
|
||||||
|
var ancho = 0
|
||||||
|
ancho += celdas[0];
|
||||||
|
//console.log('ancho pro ' + ancho);
|
||||||
|
$('#dvPro').width(ancho);
|
||||||
|
ancho = 0;
|
||||||
|
|
||||||
|
ancho += celdas[1];
|
||||||
|
ancho += celdas[2];
|
||||||
|
ancho += celdas[3];
|
||||||
|
ancho += celdas[4];
|
||||||
|
// console.log('ancho req ' + ancho);
|
||||||
|
$('#dvReq').width(ancho);
|
||||||
|
ancho = 0;
|
||||||
|
|
||||||
|
ancho += celdas[5];
|
||||||
|
ancho += celdas[6];
|
||||||
|
ancho += celdas[7];
|
||||||
|
|
||||||
|
// console.log('ancho req ' + ancho);
|
||||||
|
$('#dvOc').width(ancho);
|
||||||
|
ancho = 0;
|
||||||
|
|
||||||
|
ancho += celdas[8];
|
||||||
|
ancho += celdas[9];
|
||||||
|
ancho += celdas[10];
|
||||||
|
|
||||||
|
// console.log('ancho req ' + ancho);
|
||||||
|
$('#dvCo').width(ancho);
|
||||||
|
ancho = 0;
|
||||||
|
|
||||||
|
$('#dvCa').css('visibility', 'visible');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script> --%>
|
||||||
|
</asp:Content>
|
||||||
75
Compras/RepEvaluacionesProveedores.aspx.vb
Normal file
75
Compras/RepEvaluacionesProveedores.aspx.vb
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
Imports System.Data
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
|
Partial Class RepEvaluacionesProveedores
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property DtDatos As DataTable
|
||||||
|
Get
|
||||||
|
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DtDatos") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
CargaParametrosBusqueda()
|
||||||
|
CargarDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaParametrosBusqueda()
|
||||||
|
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
|
DdlProveedor.DataBind()
|
||||||
|
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
Dim dNow As Date = Now
|
||||||
|
TxtFechaF.Text = dNow.ToString("dd/MM/yyyy")
|
||||||
|
dNow = dNow.AddDays(-30)
|
||||||
|
TxtFechaI.Text = dNow.ToString("dd/MM/yyyy")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargarDatos()
|
||||||
|
Dim ObjCompras As New ClsCompras
|
||||||
|
If ObjCompras.GetRepEvaluacionesProveedores(UsuarioActual.CveEmpresa, DdlProveedor.SelectedValue.ToEntero, TxtFechaI.Text, TxtFechaF.Text, DdlEvaluado.SelectedValue.ToEntero) Then
|
||||||
|
GV.DataSource = ObjCompras.DtResultados
|
||||||
|
DtDatos = ObjCompras.DtResultados
|
||||||
|
End If
|
||||||
|
ObjCompras.Dispose()
|
||||||
|
GV.DataBind()
|
||||||
|
UPDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||||
|
CargarDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||||
|
If Imagen.Exists Then
|
||||||
|
params.Add(New ReportParameter("pImg", logouri))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("pImg", ""))
|
||||||
|
End If
|
||||||
|
params.Add(New ReportParameter("FechaInicial", TxtFechaI.Text))
|
||||||
|
params.Add(New ReportParameter("FechaFinal", TxtFechaF.Text))
|
||||||
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
|
params.Add(New ReportParameter("FechaImpresion", Today))
|
||||||
|
params.Add(New ReportParameter("Proveedor", DdlProveedor.SelectedItem.ToString))
|
||||||
|
|
||||||
|
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/RepEvaluacionesProveedores.rdlc", DtDatos, params, "RepEvaluacionesProveedores", "PDF", RDSName:="DataSet1")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
|
GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls")
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -171,6 +171,10 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||||
|
Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS"))
|
||||||
|
End If
|
||||||
|
|
||||||
CveMoneda = 1
|
CveMoneda = 1
|
||||||
ViewState("CvePrePoliza") = 0
|
ViewState("CvePrePoliza") = 0
|
||||||
ViewState("CvePeriodo") = "0"
|
ViewState("CvePeriodo") = "0"
|
||||||
|
|||||||
@@ -175,18 +175,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Beneficiario = "-1"
|
Beneficiario = "-1"
|
||||||
Actualizar = False
|
Actualizar = False
|
||||||
|
|
||||||
Dim dt As DataTable = Nothing
|
If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
|
||||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
|
|
||||||
If Conta.GetCuentas(-1, "-1", 1) Then
|
|
||||||
dt = Conta.DtResultados
|
|
||||||
DtCuentasContables = Conta.DtResultados
|
|
||||||
Session("DtCuentas") = Conta.DtResultados
|
|
||||||
End If
|
|
||||||
Conta.Dispose()
|
|
||||||
|
|
||||||
If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then
|
|
||||||
DivTipoGasto.Visible = True
|
DivTipoGasto.Visible = True
|
||||||
ThTipoGasto.Visible = True
|
ThTipoGasto.Visible = True
|
||||||
CargaTiposGasto()
|
CargaTiposGasto()
|
||||||
@@ -250,14 +239,9 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
GvMov.Columns(4).Visible = False
|
GvMov.Columns(4).Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
|
||||||
Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
|
||||||
BtnIEGuardar.Enabled = False
|
|
||||||
BtnEliminar.Visible = False
|
|
||||||
LbAgregar.Enabled = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
883
Contabilidad/RegPrePolizaS.aspx
Normal file
883
Contabilidad/RegPrePolizaS.aspx
Normal file
@@ -0,0 +1,883 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePolizaS.aspx.vb" Inherits="ContabilidadC_RegPrePolizaS" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.GvMov input, .GvMov td {
|
||||||
|
height: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GvSize tr > th:nth-child(1), .GvSize tr > th:nth-child(3), .GvSize tr > th:nth-child(5),
|
||||||
|
.GvSize tr > td:nth-child(1), .GvSize tr > td:nth-child(3), .GvSize tr > td:nth-child(5) {
|
||||||
|
width: 17%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GvSize tr > th:nth-child(2), .GvSize tr > td:nth-child(2) {
|
||||||
|
width: 9%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GvSize tr > th:nth-child(4), .GvSize tr > th:nth-child(8),
|
||||||
|
.GvSize tr > td:nth-child(4), .GvSize tr > td:nth-child(8) {
|
||||||
|
width: 12%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GvSize tr > th:nth-child(6), .GvSize tr > th:nth-child(7),
|
||||||
|
.GvSize tr > td:nth-child(6), .GvSize tr > td:nth-child(7) {
|
||||||
|
width: 8%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.AutoExtender {
|
||||||
|
font-family: Verdana, Helvetica, sans-serif;
|
||||||
|
font-size: .9em;
|
||||||
|
font-weight: normal;
|
||||||
|
border: solid 1px #006699;
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 2px;
|
||||||
|
background-color: White;
|
||||||
|
margin-left: 2px;
|
||||||
|
overflow: auto;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.AutoExtenderList {
|
||||||
|
cursor: pointer;
|
||||||
|
color: darkgray;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.AutoExtenderHighlight {
|
||||||
|
color: White;
|
||||||
|
background-color: #084784;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#divwidth {
|
||||||
|
width: 150px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#divwidth div {
|
||||||
|
width: 150px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="false"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" style="width: 665px;">
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div id="DivConceptoPrePoliza" runat="server" class="chequesie22">
|
||||||
|
<div class="chequesie12" runat="server" id="divDatosPrincipales">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2 control-label text-left">Fecha: </label>
|
||||||
|
<div class="col-md-4" style="width: 42%;">
|
||||||
|
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||||
|
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-1" style="width: 5px;">
|
||||||
|
<asp:CheckBox ID="ChkAutoConta" runat="server"></asp:CheckBox>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-2">AutoContabilizar</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" runat="server" id="divTipoPolAdd">
|
||||||
|
<label class="col-md-2">Tipo Póliza:</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:DropDownList ID="DdlTipoPolizaAdd" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="150px" ValidationGroup="GrpGuardar">
|
||||||
|
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="chequesie22" runat="server" id="divObservaciones">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Observaciones:</label>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<asp:TextBox ID="TxtObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1">Movimiento:</label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:DropDownList ID="DdlPlantilla" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="PlantillaPoliza" DataValueField="CvePlantillaPoliza" Width="250px" ValidationGroup="GrpGuardar">
|
||||||
|
</asp:DropDownList>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||||
|
<label class="col-md-2">Notificar:</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<asp:TextBox ID="TxtNotificarA" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="400px" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
|
||||||
|
<label class="col-md-2">Cuenta Depósito:</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="chequesie22">
|
||||||
|
<div class="row" id="DivAgregarConceptos" runat="server" visible="true">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<table border="0" rules="none" style="border-collapse: collapse; min-width: 980px;" class="table table-striped GvSize mygvps Widthall">
|
||||||
|
<tr class="Titulos TextTab">
|
||||||
|
<th>Concepto<asp:HiddenField ID="HdnCve" runat="server" />
|
||||||
|
</th>
|
||||||
|
<th>Cta. Contable</th>
|
||||||
|
<th>Referencia</th>
|
||||||
|
<th>Descripción</th>
|
||||||
|
<th>SubProyecto</th>
|
||||||
|
<th>Cargo</th>
|
||||||
|
<th>Abono</th>
|
||||||
|
<th style="width: 100px;">Comandos</th>
|
||||||
|
<th runat="server" visible="false" id="nomostrar2"></th>
|
||||||
|
</tr>
|
||||||
|
<tr class="TextTab">
|
||||||
|
<th>
|
||||||
|
<asp:DropDownList ID="DdlConceptosContables" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="160px" AutoPostBack="true">
|
||||||
|
</asp:DropDownList><br />
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlProveedores" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="160px" Visible="false" AutoPostBack="true"></asp:DropDownList><br />
|
||||||
|
<asp:DropDownList ID="DdlCompras" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SerieFolio" DataValueField="CveCompra" Width="160px" Visible="false"></asp:DropDownList><br />
|
||||||
|
<asp:DropDownList ID="DdlPersonal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||||
|
<ADS:Dropdownlost ID="DdlClientes" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||||
|
<br />
|
||||||
|
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList><br />
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
||||||
|
</asp:DropDownList><br />
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<asp:TextBox ID="TxtReferencia" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<asp:TextBox ID="TxtDescripcion" runat="server" Rows="2" TextMode="MultiLine" Width="150px"></asp:TextBox>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="160px">
|
||||||
|
</asp:DropDownList><br />
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<asp:TextBox ID="TxtCargo" runat="server" Width="76px" Height="24px" CssClass="txtcargo"></asp:TextBox>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<asp:TextBox ID="TxtAbono" runat="server" Width="76px" Height="24px" CssClass="txtabono"></asp:TextBox>
|
||||||
|
</th>
|
||||||
|
<th align="center">
|
||||||
|
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" Enabled="true" Text="Agregar"></asp:LinkButton>
|
||||||
|
<asp:LinkButton ID="LbCancelarEdicion" runat="server" Visible="false" CssClass="Texto" Enabled="true" Text="Cancelar"></asp:LinkButton>
|
||||||
|
</th>
|
||||||
|
<th runat="server" visible="false" id="nomostrar"></th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpPoliza" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row" visible="false" runat="server" id="DivDatosPoliza">
|
||||||
|
<label class="col-md-1">Tipo Póliza:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlTipoPoliza" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar">
|
||||||
|
<asp:ListItem Text="Ingreso" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Egreso" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Diario" Value="3"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1">Fecha:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||||
|
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton runat="server" ID="ImgCalendarioPoliza" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendarioPoliza" PopupPosition="Left" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="CVFechaPoliza" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1">Concepto:</label>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row" visible="false" runat="server" id="divContabilziada">
|
||||||
|
<label class="col-md-1">Contabilizada:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:HyperLink ID="HplContabilizada" runat="server" Target="_blank">Si</asp:HyperLink>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" visible="false" runat="server" id="DivTipoGasto">
|
||||||
|
<label class="col-md-1">Tipo Gasto:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlTipoGasto" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoGasto_SelectedIndexChanged" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Width="100%" ValidationGroup="GrpGuardar" DataTextField="TipoGasto" DataValueField="CveTipoGasto">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
||||||
|
<table style="width: 100%;" class="table GvSize table-striped table-advance table-hover">
|
||||||
|
<tr class="Titulos">
|
||||||
|
<th>Cuenta</th>
|
||||||
|
<th>Referencia</th>
|
||||||
|
<th>Descripción</th>
|
||||||
|
<th>SubProyecto
|
||||||
|
<br />
|
||||||
|
<asp:DropDownList ID="DdlSubProyectoFiltroMov" Width="150px" AutoPostBack="true" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSubProyectoFiltroMov_SelectedIndexChanged" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true"></asp:DropDownList></br/>
|
||||||
|
<th id="ThTipoGasto" runat="server" visible="false">Tipo Gasto</th>
|
||||||
|
<th>Ref. Bancaria</th>
|
||||||
|
<th>Cargo</th>
|
||||||
|
<th>Abono</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||||
|
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCuenta" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal><br />
|
||||||
|
<asp:Label ID="LblCuentaCon" Font-Italic="true" Font-Size="7pt" runat="server" Text='<%# Eval("CodigoCuenta") %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Referencia</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtConcepto" runat="server" Width="150px" Text='<%# Eval("Concepto")%>'></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>SubProyecto</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="140px"></asp:DropDownList>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Ref. Bancaria</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:DropDownList ID="DdlSaldos" CssClass="select2me" runat="server" DataValueField="CveIE" DataTextField="RazonSocialSaldo" Visible="false" Style="width: 150px;"></asp:DropDownList>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Abono</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Eliminar">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
<asp:ImageButton Visible="false" ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||||
|
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="ImgBancos" runat="server" CausesValidation="False" CssClass="btn btn-circle btn-sm btn-warning" OnClick="Bancos_Click" Text="<i class='fa fa-money'></i>" Visible="false" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpPrePoliza" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||||
|
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePrePolizaDetalle, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal" Width="100%" CssClass="table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||||
|
<%-- <asp:HiddenField ID="HdnConceptoContable" runat="server" Value='<%# Eval("CveConceptoContable") %>' />
|
||||||
|
<asp:HiddenField ID="HdnProveedor" runat="server" Value='<%# Eval("CveProveedor") %>' />
|
||||||
|
<asp:HiddenField ID="HdnCompra" runat="server" Value='<%# Eval("CveCompra") %>' />
|
||||||
|
<asp:HiddenField ID="HdnPersonal" runat="server" Value='<%# Eval("CvePersonal") %>' />
|
||||||
|
<asp:HiddenField ID="HdnCliente" runat="server" Value='<%# Eval("CveCliente") %>' />
|
||||||
|
<asp:HiddenField ID="HdnVenta" runat="server" Value='<%# Eval("CveVenta") %>' />--%>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Documento</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HlReferencia" Target="_blank" runat="server" Text='<%# Eval("FolioFactura") %>'></asp:HyperLink>
|
||||||
|
<br />
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Referencia</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="TxtRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal><br />
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" Width="280px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="TxtConcepto" runat="server" Text='<%# Eval("Concepto") %>'></asp:Literal><br />
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" Width="400px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>
|
||||||
|
SubProyecto
|
||||||
|
<%-- <asp:DropDownList ID="DdlSubProyectoFiltro" Width="150px" AutoPostBack="true" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlSubProyectoFiltro_SelectedIndexChanged" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true"></asp:DropDownList>--%>
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="DdlSubProyecto" runat="server" Text='<%# If(Eval("CveSubProyecto").ToString = "0", "-", Eval("SubProyecto")) %>'></asp:Literal><br />
|
||||||
|
<%--<asp:HiddenField ID="HdnSubProyecto" runat="server" Value='<%# Eval("CveSubProyecto") %>' />--%>
|
||||||
|
<%--<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="150px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />--%>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" Width="150px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="DdlTipoGasto" runat="server" Text='<%# Eval("TipoGasto") %>'></asp:Literal><br />
|
||||||
|
<%--<asp:HiddenField ID="HdnTipoGasto" runat="server" Value='<%# Eval("CveTipoGasto") %>' />--%>
|
||||||
|
<%--<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>--%>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="DdlCtaContable" runat="server" Text='<%# Eval("CodigoCuentaContable") %>'></asp:Literal><br />
|
||||||
|
<%--<asp:HiddenField ID="HdnCtaContable" runat="server" Value='<%# Eval("IdCtaContable") %>' />--%>
|
||||||
|
<%--<asp:DropDownList ID="DdlCtaContable" runat="server" Width="200px" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="CtaCodigo"></asp:DropDownList><br />--%>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField Visible="false">
|
||||||
|
<HeaderTemplate>TC</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTC" runat="server" Text='<%# String.Format("{0}-${1}", Eval("TC"), Eval("ImporteME", "{0:N2}")) %>'></asp:Literal><br />
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Cargo</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<asp:Literal ID="TxtCargo" runat="server" Text='<%# If(Eval("TipoMovto").ToString = "False", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:Literal><br />
|
||||||
|
</div>
|
||||||
|
<%-- <asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Abono</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<asp:Literal ID="TxtAbono" runat="server" Text='<%# If(Eval("TipoMovto").ToString = "True", Eval("ImporteMN", "{0:N2}"), "") %>'></asp:Literal><br />
|
||||||
|
</div>
|
||||||
|
<%-- <asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkEdit" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Right" Width="20px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<table class="table table-striped table-advance table-hover Widthall">
|
||||||
|
<tr>
|
||||||
|
<td style="width: 730px"> </td>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="70px" Text="0.00"></asp:TextBox></th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="70px" Text="0.00"></asp:TextBox></th>
|
||||||
|
<asp:HiddenField ID="HdnTotales" runat="server" ClientIDMode="Static" />
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" style="text-align: center;">
|
||||||
|
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" />
|
||||||
|
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||||
|
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" class="btn btn-danger" />
|
||||||
|
<asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" CssClass="btn btn-primary green" Visible="false" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div id="DivContadoModal" align="center" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
|
<asp:UpdatePanel ID="UpBancos" runat="server" class="modal-content" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlTituloPago" runat="server" Text="Contado" />
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<asp:Panel ID="PnlContado" runat="server" Visible="False">
|
||||||
|
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" AutoPostBack="True">
|
||||||
|
<asp:ListItem Value="1" Selected="True">Bancos</asp:ListItem>
|
||||||
|
<asp:ListItem Value="6">Caja Chica</asp:ListItem>
|
||||||
|
<asp:ListItem Value="2">F y E</asp:ListItem>
|
||||||
|
<asp:ListItem Value="4">Deudores</asp:ListItem>
|
||||||
|
<asp:ListItem Value="5">Acreedores</asp:ListItem>
|
||||||
|
<asp:ListItem Value="3">Créditos</asp:ListItem>
|
||||||
|
</asp:RadioButtonList>
|
||||||
|
</asp:Panel>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div runat="server" id="DivContado">
|
||||||
|
<asp:Panel ID="PnlContadoBancos" CssClass="chequesie text-small" runat="server" Width="400px" Visible="true">
|
||||||
|
<div class="chequesie1">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Movimiento:</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Cuenta:</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="chequesie2">
|
||||||
|
<div class="row">
|
||||||
|
<asp:Label ID="LblFolio" runat="server" Text="Número:" class="col-md-2"></asp:Label>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:TextBox ID="TxtDocumentoFolio" CssClass="form-control input-sm" runat="server" MaxLength="12"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDocumentoFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-2">Importe</label>
|
||||||
|
<div class="col-md-4 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtDocumentoImporte" CssClass="form-control input-sm " Enabled="False" runat="server" MaxLength="12" Width="80px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBEDocumentoImporte" runat="server" TargetControlID="TxtDocumentoImporte" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<asp:Label ID="LblBeneficiario" runat="server" Text="Beneficiario:" class="col-md-2"></asp:Label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtDocumentoBeneficiario" runat="server" CssClass="form-control input-sm"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-2">Observaciones:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</asp:Panel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnContado" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpContado" />
|
||||||
|
<button id="Button2" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:HiddenField ID="HiddenField1" runat="server" Value="-1" ClientIDMode="Static" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="DivEditConcepto" align="center" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" class="modal-content" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlTitulo" runat="server" Text="Editar Concepto" />
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body" style="margin-left: 20px">
|
||||||
|
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-2" style="text-align: left">Concepto:</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<asp:DropDownList ID="DdlConceptosContablesE" CssClass="form-control input-sm select2me" runat="server" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="160px" AutoPostBack="true">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:DropDownList ID="DdlProveedoresE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="160px" Visible="false" AutoPostBack="true"></asp:DropDownList>
|
||||||
|
<asp:DropDownList ID="DdlComprasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SerieFolio" DataValueField="CveCompra" Width="160px" Visible="false"></asp:DropDownList>
|
||||||
|
<asp:DropDownList ID="DdlPersonalE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" Width="160px" Visible="false"></asp:DropDownList>
|
||||||
|
<ADS:Dropdownlost ID="DdlClientesE" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
|
||||||
|
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-2" style="text-align: left">
|
||||||
|
Cuenta:
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<asp:DropDownList ID="DdlCtaContableE" runat="server" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-2" style="text-align: left">Referencia:</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<asp:TextBox ID="TxtReferenciaE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-2" style="text-align: left">Descripción:</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<asp:TextBox ID="TxtConceptoE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-2" style="text-align: left">
|
||||||
|
SubProyecto:
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-3">
|
||||||
|
<asp:DropDownList ID="DdlSubProyectoE" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div id="DivTG" runat="server">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-2" style="text-align: left">Tipo Gasto:</div>
|
||||||
|
<div class="col-xs-3">
|
||||||
|
<asp:DropDownList ID="DdlTipoGastoE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-2" style="text-align: left">
|
||||||
|
Cargo:
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-3">
|
||||||
|
<asp:TextBox ID="TxtCargoE" runat="server" CssClass=" txtcargo form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||||
|
<asp:CompareValidator ID="CVCargo" runat="server" ControlToValidate="TxtCargo" Display="None" ErrorMessage="El campo <b>''Cargo''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCCCargo" runat="server" HighlightCssClass="vco" TargetControlID="CVCargo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-1" style="text-align: left">
|
||||||
|
Abono:
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-3">
|
||||||
|
<asp:TextBox ID="TxtAbonoE" runat="server" CssClass=" txtabono form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||||
|
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnAceptar" runat="server" class="btn btn-success" Text="Aceptar" />
|
||||||
|
<button id="BtnCancelar" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
CargaTxtFunciones();
|
||||||
|
Sys.Application.add_load(function (s, e) {
|
||||||
|
CargaTxtFunciones();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function FnSuma(t, txt, importe) {
|
||||||
|
if (t.checked) {
|
||||||
|
txt.value = FormatNumber(importe, 2, true, true, true);
|
||||||
|
} else {
|
||||||
|
txt.value = "";
|
||||||
|
}
|
||||||
|
$get('TxtAbono').value = FormatNumber(SumaValores(), 2, true, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function FncImporte(txt, rowtxt, opcion) {
|
||||||
|
// opcion = 1, se registro desde el txtimporte
|
||||||
|
if (opcion == 1) {
|
||||||
|
$get(rowtxt).value = $get(txt).value == '' ? '' : FormatNumber(ToDouble($get(txt).value), 2, true, true, true);
|
||||||
|
debugger;
|
||||||
|
if ($get('ChkAbonoCuenta')) {
|
||||||
|
$get('ChkAbonoCuenta').checked = ($get(txt).value > 2000);
|
||||||
|
}
|
||||||
|
FormatoMoneda($get(txt));
|
||||||
|
} else {
|
||||||
|
$get(txt).value = $get(rowtxt).value == '' ? '' : FormatNumber(ToDouble($get(rowtxt).value), 2, true, true, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function FncImporteCuenta(txt) {
|
||||||
|
if ($get('ChkAbonoCuenta')) {
|
||||||
|
$get('ChkAbonoCuenta').checked = (parseFloat(txt.value.replace(/,/g, '')) > 2000);
|
||||||
|
}
|
||||||
|
FormatoMoneda(txt);
|
||||||
|
}
|
||||||
|
|
||||||
|
function SumaValores() {
|
||||||
|
var Importe = 0;
|
||||||
|
var topLevelElem = document.getElementById("form1");
|
||||||
|
var textBoxes = topLevelElem.getElementsByTagName("input");
|
||||||
|
for (var i = 0; i < textBoxes.length; i++) {
|
||||||
|
if (textBoxes[i].type == "text") {
|
||||||
|
if (textBoxes[i].id.indexOf('C_GvMov_TxtAbono') >= 0) {
|
||||||
|
if (textBoxes[i].value != '') {
|
||||||
|
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
|
||||||
|
alert(Importe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Importe;
|
||||||
|
}
|
||||||
|
|
||||||
|
function FnCambia(chk, txt) {
|
||||||
|
if (txt.value != '') {
|
||||||
|
chk.checked = true;
|
||||||
|
} else {
|
||||||
|
chk.checked = false;
|
||||||
|
}
|
||||||
|
$get('TxtImporte').value = FormatNumber(SumaValores(), 2, true, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCuenta(pId) {
|
||||||
|
$get('HdnCveCuenta').value = pId;
|
||||||
|
PageMethods.wsGetNombreCuenta(pId, OnSucceeded);
|
||||||
|
}
|
||||||
|
|
||||||
|
function OnSucceeded(result, userContext, methodName) {
|
||||||
|
if (methodName == 'wsGetNombreCuenta') {
|
||||||
|
$get('TxtCuentaContable').value = result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function myItemSelectedHandler(source, eventArgs) {
|
||||||
|
//debugger;
|
||||||
|
var CC = $get('HdnCveCuenta');
|
||||||
|
CC.value = eventArgs.get_value();
|
||||||
|
// var b = $get('C_Tabs_TabConyuge_BtnTruco');
|
||||||
|
// b.Click;
|
||||||
|
var aTargetElement = 'BtnSelCuenta';
|
||||||
|
__doPostBack(aTargetElement, eventArgs.get_value());
|
||||||
|
//alert(" Key : " + eventArgs.get_text() + " Value : " + eventArgs.get_value());
|
||||||
|
}
|
||||||
|
|
||||||
|
function LimpiaImporte(t, txt) {
|
||||||
|
if (t.value != '' && $get(txt)) {
|
||||||
|
$get(txt).value = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function CargaTxtFunciones() {
|
||||||
|
$(".txtcargo").each(function () {
|
||||||
|
$(this).keyup(function () {
|
||||||
|
calculateCargo();
|
||||||
|
comparar();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$(".txtabono").each(function () {
|
||||||
|
$(this).keyup(function () {
|
||||||
|
calculateAbono();
|
||||||
|
comparar();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function comparar() {
|
||||||
|
var TextoCargos = ToDouble(document.getElementById('<%= TxtTotalCargos.ClientID %>').value);
|
||||||
|
var TextoAbonos = ToDouble(document.getElementById('<%= TxtTotalAbonos.ClientID %>').value);
|
||||||
|
|
||||||
|
if (TextoCargos == TextoAbonos) {
|
||||||
|
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #04B431";
|
||||||
|
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #04B431";
|
||||||
|
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "";
|
||||||
|
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "";
|
||||||
|
$('#<%= HdnTotales.ClientID %>').value = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.border = "2px solid #ff0000";
|
||||||
|
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.border = "2px solid #ff0000";
|
||||||
|
document.getElementById('<%= TxtTotalCargos.ClientID %>').style.color = "#ff0000";
|
||||||
|
document.getElementById('<%= TxtTotalAbonos.ClientID %>').style.color = "#ff0000";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateCargo() {
|
||||||
|
var sum = 0;
|
||||||
|
$(".txtcargo").each(function () {
|
||||||
|
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
||||||
|
sum += parseFloat(this.value.split(',').join(''));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#<%= TxtTotalCargos.ClientID %>').val(FormatoNumero(sum.toFixed(2), 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateAbono() {
|
||||||
|
var sum = 0;
|
||||||
|
$(".txtabono").each(function () {
|
||||||
|
if (!isNaN(this.value.split(',').join('')) && this.value.length != 0) {
|
||||||
|
sum += parseFloat(this.value.split(',').join(''));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#<%= TxtTotalAbonos.ClientID %>').val(FormatoNumero(sum.toFixed(2), 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</asp:Content>
|
||||||
1702
Contabilidad/RegPrePolizaS.aspx.vb
Normal file
1702
Contabilidad/RegPrePolizaS.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1477,7 +1477,15 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Expedido en Sucursal: 2</Value>
|
<Value>Expedido en Sucursal:</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>Calibri</FontFamily>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
<FontWeight>Normal</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!Sucursal.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
@@ -1490,75 +1498,10 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>MATRIZ</Value>
|
<Value>=Parameters!DomicilioSucursal.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
<FontWeight>Normal</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>VERACRUZ Y CUERNAVACA 148 SAN</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Calibri</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Normal</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>BENITO HERMOSILLO HERMOSILLO</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Calibri</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Normal</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Tel:662-210-0041 662-210-3600</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Calibri</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Normal</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Correo:veracruz@econollantas.com</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Calibri</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Normal</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>MAT Juan Martin Contreras Castellanos</Value>
|
|
||||||
<Style>
|
|
||||||
<FontFamily>Calibri</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
@@ -1571,7 +1514,7 @@
|
|||||||
<Value />
|
<Value />
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
@@ -1867,7 +1810,23 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Lugar, fecha y hora de emisión: </Value>
|
<Value>Lugar, fecha y hora de emisión:</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>Calibri</FontFamily>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
<FontWeight>Normal</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!CiudadSucursal.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>Calibri</FontFamily>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
<FontWeight>Normal</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value xml:space="preserve"> </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
@@ -2028,11 +1987,45 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value />
|
<Value>=iif(Parameters!ClienteContactoMail.Value = "","","Teléfono: ")</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
<FontSize>9pt</FontSize>
|
<FontWeight>Bold</FontWeight>
|
||||||
<FontWeight>Normal</FontWeight>
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value xml:space="preserve"> </Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!ClienteTelefono.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value xml:space="preserve"> </Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=iif(Parameters!ClienteContactoMail.Value = "","","Correo: ")</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!ClienteContactoMail.Value</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontWeight>Bold</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -2187,6 +2180,9 @@
|
|||||||
<Height>1.05328cm</Height>
|
<Height>1.05328cm</Height>
|
||||||
<Width>17.71415cm</Width>
|
<Width>17.71415cm</Width>
|
||||||
<ZIndex>15</ZIndex>
|
<ZIndex>15</ZIndex>
|
||||||
|
<Visibility>
|
||||||
|
<Hidden>=IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") > 0),false,true)</Hidden>
|
||||||
|
</Visibility>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Style>None</Style>
|
<Style>None</Style>
|
||||||
@@ -2841,7 +2837,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>IVA (16%):</Value>
|
<Value>IVA:</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
|
|||||||
@@ -337,7 +337,7 @@
|
|||||||
<Value>=Fields!Fecha.Value</Value>
|
<Value>=Fields!Fecha.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
<Format>d</Format>
|
<Format>dd/MM/yyyy</Format>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -373,7 +373,7 @@
|
|||||||
<Value>= IIF( IsNothing(Fields!CveVenta.Value), Fields!FechaDocumento.Value,Fields!FechaVencimiento.Value)</Value>
|
<Value>= IIF( IsNothing(Fields!CveVenta.Value), Fields!FechaDocumento.Value,Fields!FechaVencimiento.Value)</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
<Format>d</Format>
|
<Format>dd/MM/yyyy</Format>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
@@ -498,7 +498,6 @@
|
|||||||
<PaddingBottom>2pt</PaddingBottom>
|
<PaddingBottom>2pt</PaddingBottom>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
<rd:Selected>true</rd:Selected>
|
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
</TablixCells>
|
</TablixCells>
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ Catalogo Documentacion Tipo
|
|||||||
<asp:ListItem Selected="True" Value="-1">Seleccione uno</asp:ListItem>
|
<asp:ListItem Selected="True" Value="-1">Seleccione uno</asp:ListItem>
|
||||||
<asp:ListItem Value="1">Recursos Humanos</asp:ListItem>
|
<asp:ListItem Value="1">Recursos Humanos</asp:ListItem>
|
||||||
<asp:ListItem Value="2">Clientes</asp:ListItem>
|
<asp:ListItem Value="2">Clientes</asp:ListItem>
|
||||||
<asp:ListItem Value="3">Proveedor</asp:ListItem>
|
<asp:ListItem Value="4">Proveedor</asp:ListItem> <%-- Nota: EL tipo Tres es tipo Auditoria de documentos de proveedor usadon el portal prveedor y --%>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvEdocmodulo" InitialValue="-1" runat="server" ControlToValidate="DdlEdocmodulo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modulo''</b> es necesario, por favor ingréselo." ValidationGroup="VGMEdoc"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvEdocmodulo" InitialValue="-1" runat="server" ControlToValidate="DdlEdocmodulo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modulo''</b> es necesario, por favor ingréselo." ValidationGroup="VGMEdoc"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoEdocmodulo" runat="server" HighlightCssClass="vco" TargetControlID="RfvEdocmodulo"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VcoEdocmodulo" runat="server" HighlightCssClass="vco" TargetControlID="RfvEdocmodulo"></ajax:ValidatorCalloutExtender>
|
||||||
|
|||||||
@@ -36,6 +36,18 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr runat="server" id="DivMed" visible="false">
|
||||||
|
<td class="text-right">Medida: </td>
|
||||||
|
<td >
|
||||||
|
<asp:DropDownList runat="server" ID="DdlMedidas" CssClass="form-control input-sm select2me" Width="150px" DataTextField="Medida" DataValueField="CveMedida"></asp:DropDownList>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr runat="server" id="DivRin" visible="false">
|
||||||
|
<td class="text-right">Rin: </td>
|
||||||
|
<td >
|
||||||
|
<asp:DropDownList runat="server" ID="DdlRin" CssClass="form-control input-sm select2me" Width="150px" DataTextField="RinTamaño" DataValueField="CveRinTamaño"></asp:DropDownList>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr runat="server" id="DivCodigoSeriePS" visible="false">
|
<tr runat="server" id="DivCodigoSeriePS" visible="false">
|
||||||
<td class="text-right"><b>C. Barras:</b></td>
|
<td class="text-right"><b>C. Barras:</b></td>
|
||||||
<td>
|
<td>
|
||||||
@@ -89,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="DivPS" style="overflow-y: auto; width: 765px; height: 365px;">
|
<div id="DivPS" style="overflow-y: auto; width: 765px; height: 365px;" runat="server">
|
||||||
<asp:GridView ID="GV" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-hover" GridLines="None">
|
<asp:GridView ID="GV" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-hover" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||||
@@ -101,6 +113,18 @@
|
|||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="DivMedRin" style="overflow-y: auto; width: 765px; height: 365px;" runat="server" visible="True">
|
||||||
|
<asp:GridView ID="GvMedRin" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-hover" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||||
|
<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad de Medida" />
|
||||||
|
<asp:BoundField DataField="Existencia" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia" DataFormatString="{0:#,###.######}" />
|
||||||
|
<asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Surtir" DataFormatString="{0:#,###.######}" />
|
||||||
|
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
|
||||||
|
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -65,6 +65,13 @@ Partial Class Inventarios_Default
|
|||||||
DDlPS.DataBind()
|
DDlPS.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
DivMed.Visible = True
|
||||||
|
DivRin.Visible = True
|
||||||
|
CargarMedRin()
|
||||||
|
DivMedRin.Visible = True
|
||||||
|
DivPS.Visible = False
|
||||||
|
End If
|
||||||
Dim Txt As String = IfNull(Request("Txt"), "").ToString
|
Dim Txt As String = IfNull(Request("Txt"), "").ToString
|
||||||
If Txt <> "" Then LblTitulo.Text = String.Format("Búsqueda de {0}", Txt)
|
If Txt <> "" Then LblTitulo.Text = String.Format("Búsqueda de {0}", Txt)
|
||||||
|
|
||||||
@@ -80,7 +87,11 @@ Partial Class Inventarios_Default
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
|
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
|
||||||
CargaDatos(DDlPS.SelectedValue.ToEntero, 1)
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
CargarDatosMedRin()
|
||||||
|
Else
|
||||||
|
CargaDatos(DDlPS.SelectedValue.ToEntero, 1)
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos(CvePS As Integer, Tipo As Integer)
|
Private Sub CargaDatos(CvePS As Integer, Tipo As Integer)
|
||||||
Dim ObjInventarios As New ClsInventarios()
|
Dim ObjInventarios As New ClsInventarios()
|
||||||
@@ -162,6 +173,19 @@ Partial Class Inventarios_Default
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GvMedRin_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMedRin.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DBCampo("CveAlmacen") = "" Then
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
GV.Columns(5).Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region " BUSCA | CODIGO - SERIE "
|
#Region " BUSCA | CODIGO - SERIE "
|
||||||
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
||||||
@@ -178,11 +202,38 @@ Partial Class Inventarios_Default
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
CargaDatos(DrPS("CvePS").ToString.ToEntero, 2)
|
CargaDatos(DrPS("CvePS").ToString.ToEntero, 2)
|
||||||
|
|
||||||
|
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
TxtCodigoPS.Focus()
|
TxtCodigoPS.Focus()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Private Sub CargarMedRin()
|
||||||
|
Dim ObjGral As New ClsGenerales
|
||||||
|
If ObjGral.GetMedidas(UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlMedidas.DataSource = ObjGral.DtResultados
|
||||||
|
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlRin.DataSource = ObjGral.DtResultados
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjGral.Dispose()
|
||||||
|
DdlMedidas.DataBind()
|
||||||
|
DdlRin.DataBind()
|
||||||
|
DdlMedidas.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
|
DdlRin.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargarDatosMedRin()
|
||||||
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
If ObjInventarios.GetExistenciasMedRin(DDlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlRin.SelectedValue.ToEntero, DdlMedidas.SelectedValue.ToEntero) Then
|
||||||
|
GvMedRin.DataSource = ObjInventarios.DtResultados
|
||||||
|
End If
|
||||||
|
ObjInventarios.Dispose()
|
||||||
|
GvMedRin.DataBind()
|
||||||
|
UPDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2999,7 +2999,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjContaAC.IniciaTransacSQL()
|
ObjContaAC.IniciaTransacSQL()
|
||||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
||||||
@@ -3029,6 +3029,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
|
GuardaLog(MensajeError)
|
||||||
Alert("Error al guardar el movimiento de almacen. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Error al guardar el movimiento de almacen. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -587,11 +587,10 @@
|
|||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1" style="max-width: 60px;">
|
<div class="col-md-1" style="max-width: 60px;">
|
||||||
Cliente:
|
Cliente:
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="Ddlcliente" OnSelectedIndexChanged="Ddlcliente_SelectedIndexChanged" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" Width="100%" DataTextField="CodigoNombre" DataValueField="CveCliente" runat="server"></asp:DropDownList>
|
<ADS:Dropdownlost ID="Ddlcliente" Width="100%" CssStyle="width: 100%;" UsaWebService="true" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" ></ADS:Dropdownlost>
|
||||||
<%-- <asp:RangeValidator ID="RVCliente" CssClass="form-control" runat="server" ControlToValidate="Ddlcliente" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
<%-- <asp:RangeValidator ID="RVCliente" CssClass="form-control" runat="server" ControlToValidate="Ddlcliente" Display="None" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RVCliente" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
<ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RVCliente" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
147
OC/OC.aspx.vb
147
OC/OC.aspx.vb
@@ -529,11 +529,35 @@ Partial Class OC
|
|||||||
If DrCot IsNot Nothing Then
|
If DrCot IsNot Nothing Then
|
||||||
HLCotizacion.Text = String.Format("{0}-{1}", DrCot("Serie"), DrCot("Folio")) 'CveVendedor
|
HLCotizacion.Text = String.Format("{0}-{1}", DrCot("Serie"), DrCot("Folio")) 'CveVendedor
|
||||||
DdlVendedor.SelectedValueExist(DrCot("CveVendedor").ToString())
|
DdlVendedor.SelectedValueExist(DrCot("CveVendedor").ToString())
|
||||||
Ddlcliente.SelectedValueExist(DrCot("CveCliente").ToString())
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
Ddlcliente.txtText.Value = DrCot("ClienteNombre").ToString()
|
||||||
|
Ddlcliente.txtValue.Value = DrCot("CveCliente").ToString()
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim DtOCGeneradas As DataTable = Nothing
|
||||||
|
If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtOCGeneradas = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
BtnGuardar.Enabled = False
|
||||||
|
Alert("Ya existe una OC con esta cotización", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
CargaClasificacionesPopUp(CveCotizacion)
|
CargaClasificacionesPopUp(CveCotizacion)
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End If
|
End If
|
||||||
@@ -720,6 +744,8 @@ Partial Class OC
|
|||||||
BtnSolicitudAnticipo.Visible = False
|
BtnSolicitudAnticipo.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Ddlcliente.ddlWS.Attributes.Add("data-coltexto", "N")
|
||||||
|
|
||||||
'Nuevo Proceso que permite modificar detalles
|
'Nuevo Proceso que permite modificar detalles
|
||||||
If Not UsuarioActual.TienePermisoProceso(131) Then
|
If Not UsuarioActual.TienePermisoProceso(131) Then
|
||||||
If GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus)).Rows.Count > 0 Then
|
If GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus)).Rows.Count > 0 Then
|
||||||
@@ -971,6 +997,8 @@ Partial Class OC
|
|||||||
DtDetalle.Columns.Add("CveContratoDetalle", GetType(Integer))
|
DtDetalle.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||||
DtDetalle.Columns.Add("CantidadNoEditable", GetType(Double))
|
DtDetalle.Columns.Add("CantidadNoEditable", GetType(Double))
|
||||||
|
|
||||||
|
DtDetalle.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer))
|
||||||
|
|
||||||
'DtDetalle.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
'DtDetalle.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
||||||
|
|
||||||
' DtDetalle.Columns.Add("ClasificacionOG", GetType(String))
|
' DtDetalle.Columns.Add("ClasificacionOG", GetType(String))
|
||||||
@@ -1040,6 +1068,10 @@ Partial Class OC
|
|||||||
dr("CveTipoGasto") = -1
|
dr("CveTipoGasto") = -1
|
||||||
dr("CveClasificacionOG") = -1
|
dr("CveClasificacionOG") = -1
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
|
||||||
|
dr("CveVentaDetalleCotizacion") = RowV("CveVentaDetalle")
|
||||||
|
End If
|
||||||
|
|
||||||
DtDetalle.Rows.Add(dr)
|
DtDetalle.Rows.Add(dr)
|
||||||
|
|
||||||
Next
|
Next
|
||||||
@@ -1189,10 +1221,15 @@ Partial Class OC
|
|||||||
|
|
||||||
''DATOS DE VENTA
|
''DATOS DE VENTA
|
||||||
If UsuarioActual.Empresa.Funcionalidad(108) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(108) = "1" Then
|
||||||
Ddlcliente.SelectedValueExist(objOC.CveCliente.ToString)
|
|
||||||
If Ddlcliente.SelectedValue <> objOC.CveCliente.ToString Then
|
Ddlcliente.txtValue.Value = objOC.CveCliente.ToString
|
||||||
Ddlcliente.Items.Insert(1, New ListItem(GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Nombre", $"CveCliente = {objOC.CveCliente}"), objOC.CveCliente.ToString))
|
Ddlcliente.txtText.Value = objOC.NombreCliente
|
||||||
End If
|
|
||||||
|
'If Ddlcliente.SelectedValue <> objOC.CveCliente.ToString Then
|
||||||
|
|
||||||
|
' Ddlcliente.Items.Insert(1, New ListItem(GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Nombre", $"CveCliente = {objOC.CveCliente}"), objOC.CveCliente.ToString))
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
DdlVendedor.SelectedValueExist(objOC.CveVendedor.ToString)
|
DdlVendedor.SelectedValueExist(objOC.CveVendedor.ToString)
|
||||||
If DdlVendedor.SelectedValue <> objOC.CveVendedor.ToString Then
|
If DdlVendedor.SelectedValue <> objOC.CveVendedor.ToString Then
|
||||||
@@ -2103,7 +2140,7 @@ Partial Class OC
|
|||||||
Dim TieneError = False
|
Dim TieneError = False
|
||||||
|
|
||||||
'Entrega Directa requiere Cliente y Vendedor
|
'Entrega Directa requiere Cliente y Vendedor
|
||||||
If ChkEntregaDirecta.Checked And Ddlcliente.SelectedValue.ToEntero <= 0 Then
|
If ChkEntregaDirecta.Checked And Ddlcliente.txtValue.Value.ToEntero <= 0 Then
|
||||||
Alert("Al ser una Entrega Directa es necesario seleccionar un cliente, por favor seleccione uno.")
|
Alert("Al ser una Entrega Directa es necesario seleccionar un cliente, por favor seleccione uno.")
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
@@ -2120,6 +2157,11 @@ Partial Class OC
|
|||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Ddlcliente.txtValue.Value.ToEntero > 0 And DdlVendedor.SelectedValue.ToEntero <= 0 Then
|
||||||
|
Alert("Debe de seleccionar Un vendedor ", TipoMensaje.MsgAdvertencia)
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'SI ES REQUISICION, NO REQUIERE COTIZACION Y ES ESTATUSFINALOK... ENTONCES DEBE DE TENER UN PROVEEDOR SELECCIONADO Y LOS PRECIOS CAPTURADOS
|
'SI ES REQUISICION, NO REQUIERE COTIZACION Y ES ESTATUSFINALOK... ENTONCES DEBE DE TENER UN PROVEEDOR SELECCIONADO Y LOS PRECIOS CAPTURADOS
|
||||||
@@ -2318,7 +2360,7 @@ Partial Class OC
|
|||||||
Dim OCBitacora As New ClsOIEventos(OC.IniciaTransacSQL())
|
Dim OCBitacora As New ClsOIEventos(OC.IniciaTransacSQL())
|
||||||
Dim ObjInventarios As New ClsInventarios(OC.IniciaTransacSQL())
|
Dim ObjInventarios As New ClsInventarios(OC.IniciaTransacSQL())
|
||||||
Dim ObjConta As New ClsContabilidad(OC.IniciaTransacSQL())
|
Dim ObjConta As New ClsContabilidad(OC.IniciaTransacSQL())
|
||||||
|
Dim ObjVentas As New ClsVentas(OC.IniciaTransacSQL())
|
||||||
Dim Conta As ClsContPAQi = Nothing
|
Dim Conta As ClsContPAQi = Nothing
|
||||||
If (UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto) Or UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If (UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto) Or UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
Conta = New ClsContPAQi(UsuarioActual.Empresa)
|
Conta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
@@ -2354,14 +2396,19 @@ Partial Class OC
|
|||||||
If Not TieneError Then ' AGREGAR REQUISICION
|
If Not TieneError Then ' AGREGAR REQUISICION
|
||||||
If OC.AddOrdenCompra("REQ", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CboE.SelectedValue.ToEntero, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
If OC.AddOrdenCompra("REQ", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CboE.SelectedValue.ToEntero, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
||||||
LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal,
|
LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal,
|
||||||
RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal,
|
RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal,
|
||||||
RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim,
|
RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim,
|
||||||
IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto) Then
|
IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto) Then
|
||||||
|
|
||||||
CveOrdenCompraPadre = OC.CveOrdenCompra
|
CveOrdenCompraPadre = OC.CveOrdenCompra
|
||||||
If CveOrdenCompraPadre > 0 Then
|
If CveOrdenCompraPadre > 0 Then
|
||||||
For Each dr As DataRow In DtDetalle.Rows
|
For Each dr As DataRow In DtDetalle.Rows
|
||||||
If Not OC.AddOrdenCompraDetalle(CveOrdenCompraPadre, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, UsuarioActual.CveUsuario, Descuento:=dr("Descuento").ToString.ToDouble, IEPSPS:=dr("IEPSPS").ToString.ToDouble, IEPSPSIVA:=dr("IEPSPSIVA").ToString.ToDouble, IVA:=dr("IVA").ToString.ToDouble, RetIVA:=dr("RetIVA").ToString.ToDouble, RetISR:=dr("RetISR").ToString.ToDouble, Total:=dr("Total").ToString.ToDouble, CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero, IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble) Then
|
If Not OC.AddOrdenCompraDetalle(CveOrdenCompraPadre, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble,
|
||||||
|
dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, UsuarioActual.CveUsuario, Descuento:=dr("Descuento").ToString.ToDouble,
|
||||||
|
IEPSPS:=dr("IEPSPS").ToString.ToDouble, IEPSPSIVA:=dr("IEPSPSIVA").ToString.ToDouble, IVA:=dr("IVA").ToString.ToDouble, RetIVA:=dr("RetIVA").ToString.ToDouble,
|
||||||
|
RetISR:=dr("RetISR").ToString.ToDouble, Total:=dr("Total").ToString.ToDouble, CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero, IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble,
|
||||||
|
RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble,
|
||||||
|
IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -2383,7 +2430,7 @@ Partial Class OC
|
|||||||
|
|
||||||
If OC.AddOrdenCompra(If(TipoOS, "OS", TipoOC), -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusNuevo, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
If OC.AddOrdenCompra(If(TipoOS, "OS", TipoOC), -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusNuevo, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
||||||
LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal,
|
LugarEntrega, UsuarioActual.CveUsuario, CveEmpresaActual, GvD.Rows(0).FCHiddenField("HdnCvePresupuestoEgreso").Value.ToString.ToEntero, pCveProveedor:=CveProveedor, pCveProveedorSucursal:=CveProveedorSucursal,
|
||||||
RequiereCotizacion:=ChkCotizacion.Checked, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero, CveCliente:=Ddlcliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
RequiereCotizacion:=ChkCotizacion.Checked, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1),
|
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1),
|
||||||
CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||||
Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto) Then
|
Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto) Then
|
||||||
@@ -2435,11 +2482,20 @@ Partial Class OC
|
|||||||
|
|
||||||
|
|
||||||
For Each dr As DataRow In DtDetalle.Rows
|
For Each dr As DataRow In DtDetalle.Rows
|
||||||
If Not OC.AddOrdenCompraDetalle(CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, UsuarioActual.CveUsuario, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, pCveOrdenCompraPadre:=CveOrdenCompraPadre, Descuento:=dr("Descuento").ToString.ToDouble, IEPSPS:=dr("IEPSPS").ToString.ToDouble, IEPSPSIVA:=dr("IEPSPSIVA").ToString.ToDouble, IVA:=dr("IVA").ToString.ToDouble, RetIVA:=dr("RetIVA").ToString.ToDouble, RetISR:=dr("RetISR").ToString.ToDouble, Total:=dr("Total").ToString.ToDouble, CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero, IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble) Then
|
If Not OC.AddOrdenCompraDetalle(CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero,
|
||||||
|
dr("Observacion").ToString, UsuarioActual.CveUsuario, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, pCveOrdenCompraPadre:=CveOrdenCompraPadre, Descuento:=dr("Descuento").ToString.ToDouble, IEPSPS:=dr("IEPSPS").ToString.ToDouble,
|
||||||
|
IEPSPSIVA:=dr("IEPSPSIVA").ToString.ToDouble, IVA:=dr("IVA").ToString.ToDouble, RetIVA:=dr("RetIVA").ToString.ToDouble, RetISR:=dr("RetISR").ToString.ToDouble, Total:=dr("Total").ToString.ToDouble, CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero,
|
||||||
|
IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble,
|
||||||
|
IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble, CveVentaDetalleCotizacion:=dr("CveVentaDetalleCotizacion").ToString().ToEntero()) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If Not TieneError AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
|
||||||
|
TieneError = Not ActualizarCotizacion(ObjVentas)
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
@@ -2507,7 +2563,7 @@ Partial Class OC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Not OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
If Not OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
|
||||||
LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.SelectedValue.ToEntero,
|
LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero,
|
||||||
DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
|
DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
|
||||||
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
|
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
|
||||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)) Then
|
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)) Then
|
||||||
@@ -2887,6 +2943,7 @@ Partial Class OC
|
|||||||
Else
|
Else
|
||||||
'TERMINA TODO POR SI OCURRIÓ ALGO RARO
|
'TERMINA TODO POR SI OCURRIÓ ALGO RARO
|
||||||
If OC IsNot Nothing Then OC.Dispose()
|
If OC IsNot Nothing Then OC.Dispose()
|
||||||
|
If ObjVentas IsNot Nothing Then ObjVentas.Dispose()
|
||||||
If Conta IsNot Nothing Then Conta.Dispose()
|
If Conta IsNot Nothing Then Conta.Dispose()
|
||||||
|
|
||||||
'MANDA CORREOS SI EL ESTATUS ES MAYOR A 0
|
'MANDA CORREOS SI EL ESTATUS ES MAYOR A 0
|
||||||
@@ -2906,6 +2963,13 @@ Partial Class OC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Function GeneraOrdenes(ByRef objOrdenCompra As ClsOC, Conta As ClsContPAQi, ByRef ObjInventarios As ClsInventarios) As Boolean
|
Protected Function GeneraOrdenes(ByRef objOrdenCompra As ClsOC, Conta As ClsContPAQi, ByRef ObjInventarios As ClsInventarios) As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
'If Ddlcliente.txtValue.Value.ToEntero > 0 And DdlVendedor.SelectedValue.ToEntero <= 0 Then
|
||||||
|
' Alert("Debe de seleccionar Un vendedor ", TipoMensaje.MsgAdvertencia)
|
||||||
|
' Exit Function
|
||||||
|
'End If
|
||||||
|
|
||||||
If TipoOS Then Return False
|
If TipoOS Then Return False
|
||||||
|
|
||||||
Dim CveCotizacion As Integer = 0
|
Dim CveCotizacion As Integer = 0
|
||||||
@@ -2945,7 +3009,7 @@ Partial Class OC
|
|||||||
RetISR = TxtRetISR.Text.ToDecimal
|
RetISR = TxtRetISR.Text.ToDecimal
|
||||||
|
|
||||||
If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
|
If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
|
||||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||||
PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal,
|
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal,
|
||||||
CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero) Then
|
CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero) Then
|
||||||
@@ -3012,7 +3076,7 @@ Partial Class OC
|
|||||||
|
|
||||||
Else
|
Else
|
||||||
If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
|
If objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
|
||||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveCliente:=Ddlcliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=LtImporteIEAnticipo.Text.ToDouble, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||||
Promocion:=Promocion) Then
|
Promocion:=Promocion) Then
|
||||||
@@ -3620,7 +3684,9 @@ Partial Class OC
|
|||||||
Alert("Ocurrió un error al cargar la información del producto para actualizar. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al cargar la información del producto para actualizar. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim IvaPS = DrPS("IVA").ToString.ToDouble
|
Dim IvaPS = DrPS("IVA").ToString.ToDecimal
|
||||||
|
IEPSPS = DrPS("IEPSPorcentaje").ToString.ToDouble
|
||||||
|
IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
|
||||||
|
|
||||||
If CvePS <> CvePSAnterior Or Not CveOrdenCompra > 0 Then
|
If CvePS <> CvePSAnterior Or Not CveOrdenCompra > 0 Then
|
||||||
RetISR = DrPS("RetISR").ToString.ToDouble
|
RetISR = DrPS("RetISR").ToString.ToDouble
|
||||||
@@ -3628,8 +3694,8 @@ Partial Class OC
|
|||||||
'If IvaPS = -1 Then 'IVA DE LA SUCURSAL
|
'If IvaPS = -1 Then 'IVA DE LA SUCURSAL
|
||||||
' IvaPS = GlobalDTSubProyectos(-1, gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero).FiltroPrimeroValor("IVA").ToDouble
|
' IvaPS = GlobalDTSubProyectos(-1, gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero).FiltroPrimeroValor("IVA").ToDouble
|
||||||
'End If
|
'End If
|
||||||
IEPSPS = DrPS("IEPSPorcentaje").ToString.ToDouble
|
|
||||||
IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDouble, 0)
|
' IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDouble, 0)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -4822,7 +4888,9 @@ Partial Class OC
|
|||||||
generarAnticipo.Visible = True
|
generarAnticipo.Visible = True
|
||||||
Ddlcliente.DataSource = GlobalDTCliente(CveEmpresaActual)
|
Ddlcliente.DataSource = GlobalDTCliente(CveEmpresaActual)
|
||||||
Ddlcliente.DataBind()
|
Ddlcliente.DataBind()
|
||||||
Ddlcliente.Items.Insert(0, New ListItem(" - ", "-1"))
|
|
||||||
|
'Ddlcliente.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||||
|
|
||||||
DdlVendedor.DataSource = GlobalDTVendedores(CveEmpresaActual)
|
DdlVendedor.DataSource = GlobalDTVendedores(CveEmpresaActual)
|
||||||
DdlVendedor.DataBind()
|
DdlVendedor.DataBind()
|
||||||
DdlVendedor.Items.Insert(0, New ListItem(" - ", "-1"))
|
DdlVendedor.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||||
@@ -5043,7 +5111,7 @@ Partial Class OC
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " COTIZACIONES "
|
#Region "C O T I Z A C I O N E S"
|
||||||
Protected Sub VerificaSiRequiereCotizacion()
|
Protected Sub VerificaSiRequiereCotizacion()
|
||||||
If TipoOC = "REQ" Then
|
If TipoOC = "REQ" Then
|
||||||
If ChkCotizacion.Checked Then
|
If ChkCotizacion.Checked Then
|
||||||
@@ -5083,6 +5151,32 @@ Partial Class OC
|
|||||||
VerificaCotizacionesGanadoras()
|
VerificaCotizacionesGanadoras()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Function ActualizarCotizacion(ByRef ObjVentas As ClsVentas) As Boolean
|
||||||
|
Dim OcurrioError As Boolean = False
|
||||||
|
Try
|
||||||
|
Dim PorcentajeGanancia As Decimal = 0.1D
|
||||||
|
For Each Row As DataRow In DtDetalle.Rows
|
||||||
|
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
|
||||||
|
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
||||||
|
|
||||||
|
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
||||||
|
Dim PU As Decimal = Row("Importe").ToString.ToDecimal() + (Row("Importe").ToString.ToDecimal() * PorcentajeGanancia)
|
||||||
|
Dim IEPSPS As Decimal = DrPS("IEPSPorcentaje").ToString.ToDecimal
|
||||||
|
Dim ImporteIEPS As Decimal = ((Cantidad * PU) * IEPSPS).RoundSQL(2)
|
||||||
|
|
||||||
|
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, "", UsuarioActual.CveUsuario) Then
|
||||||
|
OcurrioError = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
OcurrioError = True
|
||||||
|
OnError("Ocurrió un error al guardar la cotización", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Not OcurrioError
|
||||||
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Function notienepresupuesto() As Boolean
|
Private Function notienepresupuesto() As Boolean
|
||||||
@@ -5288,7 +5382,7 @@ Partial Class OC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub Ddlcliente_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub Ddlcliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles Ddlcliente.selectedindexchange
|
||||||
|
|
||||||
DdlVendedor.SelectedValueExist(GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"CveCliente = {Ddlcliente.SelectedValue}"))
|
DdlVendedor.SelectedValueExist(GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"CveCliente = {Ddlcliente.SelectedValue}"))
|
||||||
|
|
||||||
@@ -5304,7 +5398,7 @@ Partial Class OC
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDireccionesEnvioCliente()
|
Private Sub CargaDireccionesEnvioCliente()
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
If ObjClientes.DireccionEnvioGet(-1, Ddlcliente.SelectedValue.ToEntero, -1) Then
|
If ObjClientes.DireccionEnvioGet(-1, Ddlcliente.txtValue.Value.ToEntero, -1) Then
|
||||||
DdlDireccionEnvio.DataSource = ObjClientes.DtResultados
|
DdlDireccionEnvio.DataSource = ObjClientes.DtResultados
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||||
DdlDireccionEnvio.Visible = True
|
DdlDireccionEnvio.Visible = True
|
||||||
@@ -6504,7 +6598,7 @@ Partial Class OC
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub ImgCambiaClienteVendedor_Click(sender As Object, e As ImageClickEventArgs) Handles ImgCambiaClienteVendedor.Click
|
Protected Sub ImgCambiaClienteVendedor_Click(sender As Object, e As ImageClickEventArgs) Handles ImgCambiaClienteVendedor.Click
|
||||||
Dim OC As New ClsOC
|
Dim OC As New ClsOC
|
||||||
If OC.UpdateClienteVendedorOrdenCompra(Ddlcliente.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, CveOrdenCompra, UsuarioActual.CveUsuario, CveEmpresaActual) Then
|
If OC.UpdateClienteVendedorOrdenCompra(Ddlcliente.txtValue.Value.ToEntero, DdlVendedor.SelectedValue.ToEntero, CveOrdenCompra, UsuarioActual.CveUsuario, CveEmpresaActual) Then
|
||||||
CargaHistorial()
|
CargaHistorial()
|
||||||
Alert("El cambio de cliente/vendedor se hizo correctamente", TipoMensaje.MsgInformacion)
|
Alert("El cambio de cliente/vendedor se hizo correctamente", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
@@ -7179,7 +7273,7 @@ Partial Class OC
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
TxtGrid.Text = If(DtDetalle.Rows.Count = 0, "", DtDetalle.Rows.Count.ToString)
|
TxtGrid.Text = If(DtDetalle.Rows.Count = 0, "", DtDetalle.Rows.Count.ToString)
|
||||||
Ddlcliente.SelectedValue = DdlClientes.SelectedValue
|
Ddlcliente.txtValue.Value = DdlClientes.SelectedValue
|
||||||
|
|
||||||
CargaSuperior()
|
CargaSuperior()
|
||||||
CargaDatosDetalles()
|
CargaDatosDetalles()
|
||||||
@@ -7223,7 +7317,7 @@ Partial Class OC
|
|||||||
|
|
||||||
DdlClienteSucursalEnvio.Items.Clear()
|
DdlClienteSucursalEnvio.Items.Clear()
|
||||||
|
|
||||||
If ObjCliente.GetSucursales(Ddlcliente.SelectedValue.ToEntero) Then
|
If ObjCliente.GetSucursales(Ddlcliente.txtValue.Value.ToEntero) Then
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
DdlClienteSucursalEnvio.DataSource = ObjCliente.DtResultados
|
DdlClienteSucursalEnvio.DataSource = ObjCliente.DtResultados
|
||||||
End If
|
End If
|
||||||
@@ -7253,7 +7347,7 @@ Partial Class OC
|
|||||||
|
|
||||||
Private Sub BtnAgregarDireccion_Click(sender As Object, e As EventArgs) Handles BtnAgregarDireccion.Click
|
Private Sub BtnAgregarDireccion_Click(sender As Object, e As EventArgs) Handles BtnAgregarDireccion.Click
|
||||||
|
|
||||||
If Not Ddlcliente.SelectedValue.ToEntero > 0 Then
|
If Not Ddlcliente.txtValue.Value.ToEntero > 0 Then
|
||||||
Alert("Tiene que tener un cliente seleccionado", TipoMensaje.MsgAdvertencia)
|
Alert("Tiene que tener un cliente seleccionado", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -7262,7 +7356,7 @@ Partial Class OC
|
|||||||
Dim TieneError = False
|
Dim TieneError = False
|
||||||
Dim Estatus = If(ChkEstatus.Checked, 1, 0)
|
Dim Estatus = If(ChkEstatus.Checked, 1, 0)
|
||||||
|
|
||||||
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(Ddlcliente.SelectedValue.ToEntero, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero, TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero, EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""))
|
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(Ddlcliente.txtValue.Value.ToEntero, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero, TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero, EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""))
|
||||||
|
|
||||||
If CveDireccionEnvio < 0 Then
|
If CveDireccionEnvio < 0 Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -7544,4 +7638,5 @@ Partial Class OC
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -801,6 +801,7 @@
|
|||||||
<%---2020/02/06 - Auditoria--%>
|
<%---2020/02/06 - Auditoria--%>
|
||||||
<ajax:TabPanel ID="TabAuditoria" runat="server" HeaderText="<i class='fa fa-search'></i> Auditoría" Visible="True">
|
<ajax:TabPanel ID="TabAuditoria" runat="server" HeaderText="<i class='fa fa-search'></i> Auditoría" Visible="True">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpTabAuditoria" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpTabAuditoria" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
@@ -931,6 +932,7 @@
|
|||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|||||||
@@ -552,8 +552,7 @@
|
|||||||
<div class="col-md-4 form-group form-md-line-input input-iconright">
|
<div class="col-md-4 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtContactoEmergencia4" runat="server" MaxLength="70" CssClass="form-control marginFixRow"></asp:TextBox>
|
<asp:TextBox ID="TxtContactoEmergencia4" runat="server" MaxLength="70" CssClass="form-control marginFixRow"></asp:TextBox>
|
||||||
<label for="<%= TxtContactoEmergencia4.ClientID.ToString()%>">Nombre y teléfono en caso de emergencia:</label>
|
<label for="<%= TxtContactoEmergencia4.ClientID.ToString()%>">Nombre y teléfono en caso de emergencia:</label>
|
||||||
<asp:RequiredFieldValidator Enabled="true" ID="rfvTxtContactoEmergencia4" CssClass="help-block errorimput" runat="server" ControlToValidate="TxtContactoEmergencia4"
|
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="registro"></asp:RequiredFieldValidator>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1084,6 +1084,7 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) {
|
|||||||
CveSubProyecto: (!(DdlWS.data('cvesubproyecto')) || DdlWS.data('cvesubproyecto') == '') ? ((!(DdlWS.parent().data('cvesubproyecto')) || DdlWS.parent().data('cvesubproyecto') == '') ? -1 : DdlWS.parent().data('cvesubproyecto')) : DdlWS.data('cvesubproyecto'),
|
CveSubProyecto: (!(DdlWS.data('cvesubproyecto')) || DdlWS.data('cvesubproyecto') == '') ? ((!(DdlWS.parent().data('cvesubproyecto')) || DdlWS.parent().data('cvesubproyecto') == '') ? -1 : DdlWS.parent().data('cvesubproyecto')) : DdlWS.data('cvesubproyecto'),
|
||||||
metodo: (!(DdlWS.data('metodo')) || DdlWS.data('metodo') == 'getps') ? ((!(DdlWS.parent().data('metodo')) || DdlWS.parent().data('metodo') == 'getps') ? 'getps' : DdlWS.parent().data('metodo')) : DdlWS.data('metodo'),
|
metodo: (!(DdlWS.data('metodo')) || DdlWS.data('metodo') == 'getps') ? ((!(DdlWS.parent().data('metodo')) || DdlWS.parent().data('metodo') == 'getps') ? 'getps' : DdlWS.parent().data('metodo')) : DdlWS.data('metodo'),
|
||||||
Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'),
|
Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'),
|
||||||
|
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto')
|
||||||
//Metodo: metodo
|
//Metodo: metodo
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -847,22 +847,23 @@
|
|||||||
CveBitacora: -1
|
CveBitacora: -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var json = JSON.stringify(request);
|
|
||||||
$.ajax({
|
|
||||||
data: json,
|
|
||||||
url: '/Ashx/SIGGPS.ashx',
|
|
||||||
type: 'post',
|
|
||||||
beforeSend: function () {
|
|
||||||
console.log("procesando.....");
|
|
||||||
},
|
|
||||||
success: function (response) {
|
|
||||||
console.log("notificacion actualizada....");
|
|
||||||
var datos = JSON.parse(response);
|
|
||||||
UpdateNotificacionesCampana(datos);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setTimeout(startTimer, 60000); // callback
|
//var json = JSON.stringify(request);
|
||||||
|
//$.ajax({
|
||||||
|
// data: json,
|
||||||
|
// url: '/Ashx/SIGGPS.ashx',
|
||||||
|
// type: 'post',
|
||||||
|
// beforeSend: function () {
|
||||||
|
// console.log("procesando.....");
|
||||||
|
// },
|
||||||
|
// success: function (response) {
|
||||||
|
// console.log("notificacion actualizada....");
|
||||||
|
// var datos = JSON.parse(response);
|
||||||
|
// UpdateNotificacionesCampana(datos);
|
||||||
|
// }
|
||||||
|
//});
|
||||||
|
|
||||||
|
//setTimeout(startTimer, 60000); // callback
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1385,7 +1385,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
ImporteMovimiento = 0
|
ImporteMovimiento = 0
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If ImporteMovimiento <> 0 Then
|
If ImporteMovimiento <> 0 AndAlso MsgError = "" Then
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If (IdCtaContable < 1 Or IdCuentaBancaria < 1) Then
|
If (IdCtaContable < 1 Or IdCuentaBancaria < 1) Then
|
||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||||
|
|||||||
115
Ventas/MetasVendedores.aspx
Normal file
115
Ventas/MetasVendedores.aspx
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="MetasVendedores.aspx.vb" Inherits="MetasVendedores" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.table-scrollable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollHeadInner {
|
||||||
|
width: 100% !important;
|
||||||
|
background-color: #dddddd;
|
||||||
|
padding-left: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollFoot {
|
||||||
|
display: none;
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scrollable {
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scroll {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table.dataTable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollBody table th {
|
||||||
|
padding: 0px !important;
|
||||||
|
padding-right: 4px !important;
|
||||||
|
padding-left: 4px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Metas de Vendedores
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkAgregar" runat="server"> Agregar Meta</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<div id="DivAgregarTiposD" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Motivos de baja</asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="DdlVendedores">Vendedor:</label>
|
||||||
|
<asp:DropDownList ID="DdlVendedores" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="MotivoTxt">Mes y Año:</label>
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 110px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" 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="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="DdlMarcas">Marca:</label>
|
||||||
|
<asp:DropDownList ID="DdlMarcas" runat="server" DataTextField="Marca" DataValueField="CveMarca" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtMetaCantidad" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TxtMetaCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad meta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
|
<label for="MotivoTxt">Cantidad meta:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtMetaImporte" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtMetaImporte" runat="server" ControlToValidate="TxtMetaImporte" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe meta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
|
<label for="MotivoTxt">Importe meta:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnAgregarMetaVendedor" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||||
|
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||||
|
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||||
|
</asp:Content>
|
||||||
56
Ventas/MetasVendedores.aspx.vb
Normal file
56
Ventas/MetasVendedores.aspx.vb
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
Imports System.Data
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
|
Partial Class MetasVendedores
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
CargaDatosModal()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatosModal()
|
||||||
|
DdlVendedores.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||||
|
DdlVendedores.DataBind()
|
||||||
|
DdlVendedores.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||||
|
|
||||||
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlMarcas.DataSource = ObjPS.DtResultados
|
||||||
|
End If
|
||||||
|
ObjPS.Dispose()
|
||||||
|
DdlMarcas.DataBind()
|
||||||
|
DdlMarcas.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ResetDatosSeleccionadosModal()
|
||||||
|
DdlVendedores.SelectedValue = "-1"
|
||||||
|
TxtFechaI.Text = ""
|
||||||
|
DdlMarcas.SelectedValue = "-1"
|
||||||
|
TxtMetaCantidad.Text = ""
|
||||||
|
TxtMetaImporte.Text = ""
|
||||||
|
UpModalTiposD.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkAgregar_Click() Handles LnkAgregar.Click
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAgregarMetaVendedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarMetaVendedor.Click
|
||||||
|
|
||||||
|
If DdlVendedores.SelectedValue.ToEntero > 0 AndAlso TxtFechaI.Text <> "" AndAlso DdlMarcas.SelectedValue.ToEntero > 0 Then
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal) Then
|
||||||
|
Alert("Se agregó la meta al vendedor")
|
||||||
|
Else
|
||||||
|
Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert(String.Format("Falta Seleccionar {0}{1}{2}", If(DdlVendedores.SelectedValue.ToEntero > 0, "", "Vendedor, "), If(DdlMarcas.SelectedValue.ToEntero > 0, "", "Marca, "), If(TxtFechaI.Text <> "", "", "Fecha, ")))
|
||||||
|
End If
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
|
||||||
|
ResetDatosSeleccionadosModal()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -166,32 +166,32 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Titulo">
|
<asp:TemplateField HeaderText="Titulo">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" Text='<%# Eval("ConceptoContable")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
<asp:HyperLink runat="server" Text='<%# Eval("ConceptoContable")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}&RsFechaF={3}&TipoAmortizacion={4}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"), Eval("FechaFin", "{0:yyyy/MM/dd}"), IIf(Eval("CveEmpresa").ToString() = "72", Eval("TipoAmortizacion"), "-1"))%>'> </asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" Text='<%# Eval("Importe", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
<asp:HyperLink runat="server" Text='<%# Eval("Importe", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}&RsFechaF={3}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"), Eval("FechaFin", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" Text='<%# Eval("Descuento", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
<asp:HyperLink runat="server" Text='<%# Eval("Descuento", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}&RsFechaF={3}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"), Eval("FechaFin", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Amortización" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="Amortización" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" Text='<%# Eval("Amortizacion", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
<asp:HyperLink runat="server" Text='<%# Eval("Amortizacion", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}&RsFechaF={3}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"), Eval("FechaFin", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" Text='<%# Eval("IVA", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
<asp:HyperLink runat="server" Text='<%# Eval("IVA", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}&RsFechaF={3}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"), Eval("FechaFin", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" Text='<%# Eval("IEPS", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
<asp:HyperLink runat="server" Text='<%# Eval("IEPS", "${0:N2}")%>' NavigateUrl='<%# String.Format("/Ventas/RepIngresosDetalle.aspx?CveConceptoContable={0}&CveCuenta={1}&RsFechaI={2}&RsFechaF={3}", Eval("CveConceptoContable"), Eval("CveCuenta"), Eval("FechaInicio", "{0:yyyy/MM/dd}"), Eval("FechaFin", "{0:yyyy/MM/dd}"))%>'> </asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Impuesto Local" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="Impuesto Local" ItemStyle-HorizontalAlign="Right">
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ Partial Class Ventas_RepIngresos
|
|||||||
Set
|
Set
|
||||||
ViewState("CveSubProyecto") = Value
|
ViewState("CveSubProyecto") = Value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property DtDatos As DataTable
|
Private Property DtDatos As DataTable
|
||||||
Get
|
Get
|
||||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||||
@@ -69,9 +69,9 @@ Partial Class Ventas_RepIngresos
|
|||||||
Set(ByVal value As DataTable)
|
Set(ByVal value As DataTable)
|
||||||
ViewState("DtDatos") = value
|
ViewState("DtDatos") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
CveSubProyecto = -1
|
CveSubProyecto = -1
|
||||||
|
|||||||
@@ -144,6 +144,11 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Tipo">
|
<asp:TemplateField HeaderText="Tipo">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal runat="server" Text='<%# Eval("TipoDocto")%>'> </asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="SerieFolio">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:hyperlink runat="server" Text='<%# Eval("SerieFolio")%>' NavigateUrl='<%# Eval("CveVenta","/Ventas/Ventas.aspx?CveVenta={0}") %>'> </asp:hyperlink>
|
<asp:hyperlink runat="server" Text='<%# Eval("SerieFolio")%>' NavigateUrl='<%# Eval("CveVenta","/Ventas/Ventas.aspx?CveVenta={0}") %>'> </asp:hyperlink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -183,6 +188,16 @@
|
|||||||
<asp:Label runat="server" Text='<%# Eval("Total", "${0:N2}")%>'> </asp:Label>
|
<asp:Label runat="server" Text='<%# Eval("Total", "${0:N2}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Amortización" ItemStyle-HorizontalAlign ="Right">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal runat="server" Text='<%#If(Eval("EsAmortizacion").ToString = "True", "Si", "No")%>'> </asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Fecha Venta" ItemStyle-HorizontalAlign ="Right">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'> </asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -54,9 +54,20 @@ Partial Class Ventas_RepIngresosDetalle
|
|||||||
Set
|
Set
|
||||||
ViewState("CveCuenta") = Value
|
ViewState("CveCuenta") = Value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property TipoAmortizacion() As Integer
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("TipoAmortizacion")), -1, ViewState("TipoAmortizacion").ToString().ToEntero())
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
ViewState("TipoAmortizacion") = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
@@ -67,18 +78,20 @@ Partial Class Ventas_RepIngresosDetalle
|
|||||||
CveCuenta = If(IsNothing(Request("CveCuenta")), "", Request("CveCuenta").ToString())
|
CveCuenta = If(IsNothing(Request("CveCuenta")), "", Request("CveCuenta").ToString())
|
||||||
CveSubProyecto = If(IsNothing(Request("CveSubProyecto")), 0, Request("CveSubProyecto").ToString().ToEntero())
|
CveSubProyecto = If(IsNothing(Request("CveSubProyecto")), 0, Request("CveSubProyecto").ToString().ToEntero())
|
||||||
CveConceptoContable = If(IsNothing(Request("CveConceptoContable")), -1, Request("CveConceptoContable").ToString().ToEntero())
|
CveConceptoContable = If(IsNothing(Request("CveConceptoContable")), -1, Request("CveConceptoContable").ToString().ToEntero())
|
||||||
|
TipoAmortizacion = If(IsNothing(Request("TipoAmortizacion")), -1, Request("TipoAmortizacion").ToString().ToEntero())
|
||||||
TxtFechaInicio.Text = If(RsFechaI.Length > 6, DateTime.ParseExact(RsFechaI, "yyyy/MM/dd", Nothing).ToString("dd/MM/yyyy"), "")
|
TxtFechaInicio.Text = If(RsFechaI.Length > 6, DateTime.ParseExact(RsFechaI, "yyyy/MM/dd", Nothing).ToString("dd/MM/yyyy"), "")
|
||||||
TxtFechaFin.Text = If(RsFechaF.Length > 6, DateTime.ParseExact(RsFechaF, "yyyy/MM/dd", Nothing).ToString("dd/MM/yyyy"), "")
|
TxtFechaFin.Text = If(RsFechaF.Length > 6, DateTime.ParseExact(RsFechaF, "yyyy/MM/dd", Nothing).ToString("dd/MM/yyyy"), "")
|
||||||
DdlTipoDocto.SelectedValueExist(TipoDoc)
|
DdlTipoDocto.SelectedValueExist(TipoDoc)
|
||||||
DdlSubProyecto.SelectedValueExist(CveSubProyecto.ToString())
|
DdlSubProyecto.SelectedValueExist(CveSubProyecto.ToString())
|
||||||
'
|
'
|
||||||
CargaRepIngresosDetalle()
|
LnkFiltrar_Click(LnkFiltrar, EventArgs.Empty)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub CargaRepIngresosDetalle()
|
Protected Sub CargaRepIngresosDetalle()
|
||||||
Dim ObjRepI As New ClsVentas()
|
Dim ObjRepI As New ClsVentas()
|
||||||
ObjRepI.RepIngresosDetalle(UsuarioActual.CveEmpresa, If(RsFechaI = "", MinFecha, RsFechaI.ToDate), If(RsFechaF = "", MaxFecha, RsFechaF.ToDate), TipoDoc, CveSubProyecto, CveConceptoContable, CveCuenta)
|
If ObjRepI.RepIngresosDetalle(UsuarioActual.CveEmpresa, If(RsFechaI = "", MinFecha, RsFechaI.ToDate), If(RsFechaF = "", MaxFecha, RsFechaF.ToDate), TipoDoc, CveSubProyecto, CveConceptoContable, CveCuenta, TipoAmortizacion) Then
|
||||||
GVRepIngresos.DataSource = ObjRepI.DtResultados
|
GVRepIngresos.DataSource = ObjRepI.DtResultados
|
||||||
|
End If
|
||||||
ObjRepI.Dispose()
|
ObjRepI.Dispose()
|
||||||
GVRepIngresos.DataBind()
|
GVRepIngresos.DataBind()
|
||||||
upDatosRepI.Update()
|
upDatosRepI.Update()
|
||||||
@@ -94,7 +107,7 @@ Partial Class Ventas_RepIngresosDetalle
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub GVRepIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GVRepIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.DBCampo("GTipoDocto").ToString().ToEntero() = -1 Then
|
If e.Row.DBCampo("GTipoDocto").ToString().ToEntero() = -1 OrElse e.Row.DBCampo("SerieFolio").ToString() = "TOTAL" Then
|
||||||
e.Row.CssClass = "Totales"
|
e.Row.CssClass = "Totales"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
164
Ventas/RepPS.aspx
Normal file
164
Ventas/RepPS.aspx
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPS.aspx.vb" Inherits="Ventas_RepPS" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
table > tbody > .SubTotales, table > tbody > .SubTotales:hover, table > tbody > .SubTotales:nth-of-type(odd) {
|
||||||
|
background: #CCCCCC !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table > tbody > .SubTotalesB, table > tbody > .SubTotalesB:hover, table > tbody > .SubTotalesB:nth-of-type(odd) {
|
||||||
|
background: #DDD !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SegundoNivel, .SegundoNivel:hover {
|
||||||
|
background-color: rgba(172, 195, 222, 0.65) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2 .select2-selection__rendered {
|
||||||
|
line-height: 1;
|
||||||
|
color: #111;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2 .select2-selection--multiple {
|
||||||
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
min-height: 20px;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-selection__rendered {
|
||||||
|
margin-top: 0px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-selection {
|
||||||
|
margin-top: 0px;
|
||||||
|
height: 31px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||||
|
border: none;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#chartdiv {
|
||||||
|
width: 100%;
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte de Ventas por Producto
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row">
|
||||||
|
<label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</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">
|
||||||
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Inicio:
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></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>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</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 Inicial''</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>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Fin:
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></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>
|
||||||
|
</div>
|
||||||
|
<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="Calendario2" 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 Final''</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 Final''</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="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-1 ">Grupo:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlGrupo" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
|
<asp:ListItem Selected="True" Text="Familia-Marca-Linea" Value="1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron productos con los filtros especificados" ToolTip="Listado de Ventas"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N0}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="P. Promedio" DataField="PUPromedio" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Venta Total" DataField="SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Descuentos" DataField="Descuento" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Venta Neta" DataField="VentaNeta" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
</Columns>
|
||||||
|
<RowStyle CssClass="Texto" />
|
||||||
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
102
Ventas/RepPS.aspx.vb
Normal file
102
Ventas/RepPS.aspx.vb
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
|
||||||
|
Imports Extensiones
|
||||||
|
Imports System.Data
|
||||||
|
Partial Class Ventas_RepPS
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
CargaDatosIniciales()
|
||||||
|
CargaCombos()
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaDatosIniciales()
|
||||||
|
txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
|
||||||
|
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
CargaTipoCentroCosto()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaTipoCentroCosto()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||||
|
DdlSubProyecto.Items.Clear()
|
||||||
|
LblSubProyecto.InnerText = "Sucursal:"
|
||||||
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||||
|
DdlSubProyecto.Items.Clear()
|
||||||
|
|
||||||
|
LblSubProyecto.InnerText = "Proyecto:"
|
||||||
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
|
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Then
|
||||||
|
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
|
||||||
|
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
|
||||||
|
DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
|
||||||
|
DdlGrupo.DataBind()
|
||||||
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
||||||
|
LblSubProyecto.InnerText = "Proyecto:"
|
||||||
|
DdlGrupo.Items.Insert(0, New ListItem("Proyecto", "1"))
|
||||||
|
DdlGrupo.Items.Insert(1, New ListItem("SubProyecto", "2"))
|
||||||
|
DdlGrupo.Items.Insert(17, New ListItem("SubProyecto Ejec.", "19"))
|
||||||
|
DdlGrupo.DataBind()
|
||||||
|
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
||||||
|
LblSubProyecto.InnerText = "Sucursal:"
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
|
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
|
||||||
|
Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
|
||||||
|
Dim CvePS As Integer = -1
|
||||||
|
Dim CveMoneda As Integer = -1
|
||||||
|
Dim TC As Integer = 1
|
||||||
|
Dim TCEspecifico As Decimal = -1
|
||||||
|
Dim FechaI, FechaF As DateTime
|
||||||
|
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
|
||||||
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas()
|
||||||
|
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then
|
||||||
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
|
Else
|
||||||
|
GvDatos.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
GvDatos.DataBind()
|
||||||
|
|
||||||
|
UPDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
Select Case e.Row.DBCampo("Orden").ToString.ToEntero()
|
||||||
|
Case 4
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
Case 3
|
||||||
|
e.Row.CssClass = "SubTotales2"
|
||||||
|
Case 2
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
Case 1
|
||||||
|
e.Row.CssClass = "SubTotalesB"
|
||||||
|
Case 0
|
||||||
|
e.Row.CssClass = "Texto"
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
230
Ventas/RepVentasMensuales.aspx
Normal file
230
Ventas/RepVentasMensuales.aspx
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVentasMensuales.aspx.vb" Inherits="RepVentasMensuales" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.table-scrollable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollHeadInner {
|
||||||
|
width: 100% !important;
|
||||||
|
background-color: #dddddd;
|
||||||
|
padding-left: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollFoot {
|
||||||
|
display: none;
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scrollable {
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scroll {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table.dataTable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollBody table th {
|
||||||
|
padding: 0px !important;
|
||||||
|
padding-right: 4px !important;
|
||||||
|
padding-left: 4px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Ventas Mensuales
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 122px; position: relative;">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
|
||||||
|
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||||
|
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption magindate">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<%--<div class="col-md-1 truncate">Proveedor</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="form-control input-sm select2me" Width="250" DataValueField="CveProveedor" DataTextField="RazonSocial"></asp:DropDownList>
|
||||||
|
</div>--%>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Fecha Inicio: </div>
|
||||||
|
<div class="col-md-2 col-sm-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" 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="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Fecha Fin: </div>
|
||||||
|
<div class="col-md-2 col-sm-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<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="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Sucursal: </div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control input-sm select2me" Width="250" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="margin-top:10px">
|
||||||
|
<div class="col-md-1 truncate" style="width:170px">Clasificación de Productos: </div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlClasificacionesPS" runat="server" CssClass="form-control input-sm select2me" Width="250" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate" style="width:170px">Vendedor: </div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" Width="250" DataValueField="CveVendedor" DataTextField="Vendedor"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate" style="width:170px">Marca: </div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlMarca" runat="server" CssClass="form-control input-sm select2me" Width="250" DataValueField="CveMarca" DataTextField="Marca"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row" style="margin-top:10px">
|
||||||
|
<div class="col-md-1 truncate" style="width:170px">Grupo: </div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlModalidad" runat="server" CssClass="form-control input-sm select2me" Width="100px">
|
||||||
|
<asp:ListItem Value="0">Clientes</asp:ListItem>
|
||||||
|
<asp:ListItem Value="1">Sucursales</asp:ListItem>
|
||||||
|
<asp:ListItem Value="2">Productos Servicios</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||||
|
<div class="row">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
</div>
|
||||||
|
<div id="DivFamiliaSubFamilia" class="row" runat="server" visible="false">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<div id="dvCuerpo" style ="width:100% ">
|
||||||
|
<asp:UpdatePanel ID="UPDatos" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GV" runat="server" GridLines="None" BorderWidth="0" UseAccessibleHeader="true" DataKeyNames="Clave,Nombre,Total"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Nombre Cliente" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="HlkNombre" runat="server" Target="_blank" Text='<%# Eval("Nombre").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Ene" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblEne" runat="server" Target="_blank" Text='<%# Eval("Ene").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Feb" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblFeb" runat="server" Target="_blank" Text='<%# Eval("Feb").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Mzo" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblMzo" runat="server" Target="_blank" Text='<%# Eval("Mzo").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Abr" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblAbr" runat="server" Target="_blank" Text='<%# Eval("Abr").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="May" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblMay" runat="server" Target="_blank" Text='<%# Eval("May").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Jun" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblJun" runat="server" Target="_blank" Text='<%# Eval("Jun").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Jul" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblJul" runat="server" Target="_blank" Text='<%# Eval("Jul").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Ago" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblAgo" runat="server" Target="_blank" Text='<%# Eval("Ago").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Sep" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblSep" runat="server" Target="_blank" Text='<%# Eval("Sep").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Oct" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblOct" runat="server" Target="_blank" Text='<%# Eval("Oct").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Nov" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblNov" runat="server" Target="_blank" Text='<%# Eval("Nov").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Dic" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblDic" runat="server" Target="_blank" Text='<%# Eval("Dic").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:HyperLink ID="lblTotal" runat="server" Target="_blank" Text='<%# Eval("Total").ToString() %>'> </asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||||
|
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||||
|
</asp:Content>
|
||||||
120
Ventas/RepVentasMensuales.aspx.vb
Normal file
120
Ventas/RepVentasMensuales.aspx.vb
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
Imports System.Data
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
|
Partial Class RepVentasMensuales
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property DtDatos As DataTable
|
||||||
|
Get
|
||||||
|
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DtDatos") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
InicializarFiltros()
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Sub InicializarFiltros()
|
||||||
|
Dim dNow As Date = Now
|
||||||
|
TxtFechaF.Text = dNow.ToString("dd/MM/yyyy")
|
||||||
|
dNow = dNow.AddDays(-30)
|
||||||
|
TxtFechaI.Text = dNow.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
|
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
DdlClasificacionesPS.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||||
|
DdlClasificacionesPS.DataBind()
|
||||||
|
DdlClasificacionesPS.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||||
|
DdlVendedor.DataBind()
|
||||||
|
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlMarca.DataSource = ObjPS.DtResultados
|
||||||
|
End If
|
||||||
|
ObjPS.Dispose()
|
||||||
|
DdlMarca.DataBind()
|
||||||
|
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetRepVentasMensuales(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacionesPS.SelectedValue.ToEntero,
|
||||||
|
DdlVendedor.SelectedValue.ToEntero, DdlMarca.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero) Then
|
||||||
|
GV.DataSource = ObjVentas.DtResultados
|
||||||
|
DtDatos = ObjVentas.DtResultados
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
GV.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||||
|
CargaDatos()
|
||||||
|
UPDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub LnkPDF_Click() Handles LnkPDF.Click
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||||
|
If Imagen.Exists Then
|
||||||
|
params.Add(New ReportParameter("pImg", logouri))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("pImg", ""))
|
||||||
|
End If
|
||||||
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||||
|
params.Add(New ReportParameter("FechaImpresion", Today))
|
||||||
|
params.Add(New ReportParameter("Modalidad", DdlModalidad.SelectedValue))
|
||||||
|
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/RepVentasMensuales.rdlc", DtDatos, params, "Rep. Ventas Mensuales", "PDF", RDSName:="DataSet1")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
|
GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
Dim CveCliente As Integer = -1
|
||||||
|
Dim CveSubProyecto As Integer = -1
|
||||||
|
If DdlModalidad.SelectedValue = "0" Then
|
||||||
|
CveCliente = e.Row.DataKey("Clave").ToEntero
|
||||||
|
CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||||
|
Else
|
||||||
|
CveSubProyecto = e.Row.DataKey("Clave")
|
||||||
|
End If
|
||||||
|
Dim FechaInicio As Date = TxtFechaI.Text
|
||||||
|
Dim FechaFin As Date = TxtFechaF.Text
|
||||||
|
Dim CveMarca As Integer = DdlMarca.SelectedValue.ToEntero
|
||||||
|
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero
|
||||||
|
Dim URL As String = String.Format("/Ventas/RepVentasMensualesDetalle.aspx?CveCliente={0}&CveSubProyecto={1}&FechaInicio={2}&FechaFin={3}&CveMarca={4}&CveVendedor={5}",
|
||||||
|
CveCliente, CveSubProyecto, FechaInicio, FechaFin, CveMarca, CveVendedor)
|
||||||
|
e.Row.FCHyperLink("HlkNombre").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblEne").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblFeb").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblMzo").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblAbr").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblMay").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblJun").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblJul").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblAgo").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblSep").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblOct").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblNov").NavigateUrl = URL
|
||||||
|
e.Row.FCHyperLink("LblDic").NavigateUrl = URL
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
142
Ventas/RepVentasMensualesDetalle.aspx
Normal file
142
Ventas/RepVentasMensualesDetalle.aspx
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVentasMensualesDetalle.aspx.vb" Inherits="RepVentasMensualesDetalle" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.table-scrollable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollHeadInner {
|
||||||
|
width: 100% !important;
|
||||||
|
background-color: #dddddd;
|
||||||
|
padding-left: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollFoot {
|
||||||
|
display: none;
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scrollable {
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scroll {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table.dataTable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollBody table th {
|
||||||
|
padding: 0px !important;
|
||||||
|
padding-right: 4px !important;
|
||||||
|
padding-left: 4px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Rep. Detalle de la Venta Mensual
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<div id="dvCuerpo" style="width: 100%">
|
||||||
|
<asp:UpdatePanel ID="UPDatos" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GV" runat="server" GridLines="None" BorderWidth="0" UseAccessibleHeader="true" DataKeyNames="Nombre,Etiqueta,Ene,Feb,Mzo,Abr,May,Jun,Jul,Ago,Sep,Oct,Nov,Dic,Total"
|
||||||
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Nombre Cliente" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Nombre").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Ene" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Ene").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Feb" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Feb").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Mzo" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Mzo").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Abr" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Abr").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="May" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("May").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Jun" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Jun").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Jul" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Jul").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Ago" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Ago").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Sep" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Sep").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Oct" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Oct").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Nov" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Nov").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Dic" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Dic").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Total").ToString() %>'> </asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||||
|
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||||
|
</asp:Content>
|
||||||
74
Ventas/RepVentasMensualesDetalle.aspx.vb
Normal file
74
Ventas/RepVentasMensualesDetalle.aspx.vb
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
Imports System.Data
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
|
Partial Class RepVentasMensualesDetalle
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property DtDatos As DataTable
|
||||||
|
Get
|
||||||
|
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(ByVal value As DataTable)
|
||||||
|
ViewState("DtDatos") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
'URL DE PRUEBA
|
||||||
|
'/Ventas/RepVentasMensualesDetalle.aspx?CveCliente=270821&CveSubProyecto=-1&FechaInicio=2020-02-15&FechaFin=2020-02-20&CveMarca=-1&CveVendedor=-1
|
||||||
|
Dim FechaInicio As Date = Request.QueryString("FechaInicio")
|
||||||
|
Dim FechaFin As Date = Request.QueryString("FechaFin")
|
||||||
|
Dim CveCliente As Integer = Request.QueryString("CveCliente")
|
||||||
|
Dim CveSubProyecto As Integer = Request.QueryString("CveSubProyecto")
|
||||||
|
Dim CveMarca As Integer = Request.QueryString("CveMarca")
|
||||||
|
Dim CveVendedor As Integer = Request.QueryString("CveVendedor")
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetRepVentasMensualesDetalle(UsuarioActual.CveEmpresa, CveCliente, FechaInicio, FechaFin, CveSubProyecto, CveVendedor, CveMarca) Then
|
||||||
|
GV.DataSource = ObjVentas.DtResultados
|
||||||
|
DtDatos = ObjVentas.DtResultados
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
GV.DataBind()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub LnkPDF_Click() Handles LnkPDF.Click
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||||
|
If Imagen.Exists Then
|
||||||
|
params.Add(New ReportParameter("pImg", logouri))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("pImg", ""))
|
||||||
|
End If
|
||||||
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||||
|
params.Add(New ReportParameter("FechaImpresion", Today))
|
||||||
|
params.Add(New ReportParameter("Modalidad", 2))
|
||||||
|
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/RepVentasMensualesDetalle.rdlc", DtDatos, params, "Rep. Ventas Mensuales", "PDF", RDSName:="DataSet1")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
|
GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If e.Row.DataKey("Etiqueta") = "Padre" Then
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
ElseIf e.Row.DataKey("Etiqueta") = "SubPadre" Then
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -308,6 +308,9 @@
|
|||||||
<%--<asp:LinkButton ID="LnkSaldarVenta" runat="server" CausesValidation="False" Text="<i class='fa fa-ban'></i> Saldar" data-toggle="confirmation" data-popout="true" data-original-title="¿Estás seguro que deseas saldar el Documento?" data-btn-ok-label="si" Visible="false" />--%>
|
<%--<asp:LinkButton ID="LnkSaldarVenta" runat="server" CausesValidation="False" Text="<i class='fa fa-ban'></i> Saldar" data-toggle="confirmation" data-popout="true" data-original-title="¿Estás seguro que deseas saldar el Documento?" data-btn-ok-label="si" Visible="false" />--%>
|
||||||
<asp:HyperLink ID="HLSaldarVenta" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#ModalSaldarVenta" runat="server"><i class='fa fa-ban'></i> Saldar</asp:HyperLink>
|
<asp:HyperLink ID="HLSaldarVenta" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#ModalSaldarVenta" runat="server"><i class='fa fa-ban'></i> Saldar</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
|
<li id="LtGenerarOC" runat="server" visible="false">
|
||||||
|
<asp:LinkButton ID="LnkGenerarOC" OnClick="LnkGenerarOC_Click" title="Generar Orden de Compra!" runat="server"><i class="fa fa-tags"></i> Generar Orden de Compra</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UPPDescontabilizar" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPDescontabilizar" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -3541,7 +3544,7 @@
|
|||||||
<div style="max-height: 300px; overflow-y: auto;">
|
<div style="max-height: 300px; overflow-y: auto;">
|
||||||
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
|
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
|
||||||
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall" data-height="300" Style="text-align: center;" GridLines="None"
|
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall" data-height="300" Style="text-align: center;" GridLines="None"
|
||||||
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, IdCtaContableNC,FolioFiscal, CveClasificacionNC, IdCtaContableNCSIG, TipoCambio,TipoCambioPago, CveMoneda,Fecha,SaldoSubTotal">
|
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, IdCtaContableNC,FolioFiscal, CveClasificacionNC, IdCtaContableNCSIG, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -3543,6 +3543,7 @@ Partial Class Ventas
|
|||||||
' LbCancelarDocumentoManual.Visible = True
|
' LbCancelarDocumentoManual.Visible = True
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
If Not CveEstatus.Contiene(4, 5, 12, 13, 20) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Ant") AndAlso UsuarioActual.TienePermisoProceso(159) Then
|
If Not CveEstatus.Contiene(4, 5, 12, 13, 20) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Ant") AndAlso UsuarioActual.TienePermisoProceso(159) Then
|
||||||
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
|
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
|
||||||
If TienePermiso <> "" Then
|
If TienePermiso <> "" Then
|
||||||
@@ -4362,6 +4363,19 @@ Partial Class Ventas
|
|||||||
|
|
||||||
CargaCodigoUnico()
|
CargaCodigoUnico()
|
||||||
|
|
||||||
|
'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
|
||||||
|
Dim DtOCGeneradas As DataTable = Nothing
|
||||||
|
If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtOCGeneradas = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
|
||||||
|
LtGenerarOC.Visible = False
|
||||||
|
Else
|
||||||
|
LtGenerarOC.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
UpEstatus.Update()
|
UpEstatus.Update()
|
||||||
@@ -5821,6 +5835,11 @@ Partial Class Ventas
|
|||||||
Descuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
|
Descuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
|
||||||
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
|
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
|
||||||
|
|
||||||
|
If PU <= 0 AndAlso UsuarioActual.CveEmpresa = 141 Then
|
||||||
|
Alert("El precio debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 140 Then
|
If UsuarioActual.CveEmpresa = 140 Then
|
||||||
Descuento = CalcularDescuentos(TmpDT.Rows(e.RowIndex)("CvePS").ToString.ToEntero, Cantidad, PU)
|
Descuento = CalcularDescuentos(TmpDT.Rows(e.RowIndex)("CvePS").ToString.ToEntero, Cantidad, PU)
|
||||||
End If
|
End If
|
||||||
@@ -6669,7 +6688,7 @@ Partial Class Ventas
|
|||||||
'If (UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 81, 83) And UsuarioActual.CveUsuario = 100) Or UsuarioActual.CveEmpresa.Contiene(80, 83) Or UsuarioActual.CveUsuario = 100 Then
|
'If (UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 81, 83) And UsuarioActual.CveUsuario = 100) Or UsuarioActual.CveEmpresa.Contiene(80, 83) Or UsuarioActual.CveUsuario = 100 Then
|
||||||
If (Archivo.Exists Or Archivo2.Exists) And IfNull(CveVenta, 0).ToString.ToEntero > 0 Then
|
If (Archivo.Exists Or Archivo2.Exists) And IfNull(CveVenta, 0).ToString.ToEntero > 0 Then
|
||||||
HplDownPDF.Visible = True
|
HplDownPDF.Visible = True
|
||||||
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta)))
|
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
@@ -8789,8 +8808,8 @@ Partial Class Ventas
|
|||||||
'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
||||||
' If drr("ImporteIVA").ToString.ToDouble > 0 Then
|
' If drr("ImporteIVA").ToString.ToDouble > 0 Then
|
||||||
|
|
||||||
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos
|
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos, y si la BASE de calculo es mayor a cero
|
||||||
If Timbre.Comprobante.Total > 0 Then
|
If Timbre.Comprobante.Total > 0 AndAlso concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0 Then
|
||||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -9301,7 +9320,7 @@ Partial Class Ventas
|
|||||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion) Then
|
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion) Then
|
||||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Else
|
Else
|
||||||
If factura.TipoDocto.Contiene("Dev") Or DtVentasNC IsNot Nothing Then
|
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Then
|
||||||
If DtVentasNC IsNot Nothing Then
|
If DtVentasNC IsNot Nothing Then
|
||||||
For Each row As DataRow In DtVentasNC.Rows
|
For Each row As DataRow In DtVentasNC.Rows
|
||||||
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, row("CveVenta").ToString.ToEntero) Then
|
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, row("CveVenta").ToString.ToEntero) Then
|
||||||
@@ -9749,7 +9768,7 @@ Partial Class Ventas
|
|||||||
Case 3 'Cliente
|
Case 3 'Cliente
|
||||||
|
|
||||||
If ObjFactura.TipoDocto = "Ant" Then
|
If ObjFactura.TipoDocto = "Ant" Then
|
||||||
ConceptoContable = If(UsuarioActual.CveEmpresa.Contiene(1, 119), 95, ConceptoContable)
|
ConceptoContable = If(UsuarioActual.CveEmpresa.Contiene(119), 95, ConceptoContable)
|
||||||
importeMovimiento = ObjFactura.SubTotal * ValorMultiplicador
|
importeMovimiento = ObjFactura.SubTotal * ValorMultiplicador
|
||||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||||
FechaMovimiento = ObjFactura.FechaPago
|
FechaMovimiento = ObjFactura.FechaPago
|
||||||
@@ -11670,7 +11689,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If e.Row.DBCampo("Tipo").ToString = "NC" And e.Row.DataKey("CveVenta").ToString.ToEntero > 0 Then
|
If e.Row.DBCampo("Tipo").ToString = "NC" And e.Row.DataKey("CveVenta").ToString.ToEntero > 0 Then
|
||||||
If e.Row.DBCampo("CveMoneda").ToString.ToEntero = 2 Then
|
If e.Row.DBCampo("CveMoneda").ToString.ToEntero = 2 Then
|
||||||
tipoCambio = e.Row.DataKey("TipoCambio").ToString.ToDecimal
|
tipoCambio = e.Row.DBCampo("TipoCambioHoy").ToString.ToDecimal
|
||||||
Else
|
Else
|
||||||
tipoCambio = GlobalTipoCambio(e.Row.DataKey("Fecha").ToString.ToDate).ToDecimal
|
tipoCambio = GlobalTipoCambio(e.Row.DataKey("Fecha").ToString.ToDate).ToDecimal
|
||||||
End If
|
End If
|
||||||
@@ -11695,6 +11714,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
saldo = saldo.RoundSQL()
|
||||||
|
|
||||||
Dim maxsaldo As Decimal
|
Dim maxsaldo As Decimal
|
||||||
If total > saldo Then
|
If total > saldo Then
|
||||||
@@ -11703,7 +11723,7 @@ Partial Class Ventas
|
|||||||
maxsaldo = total
|
maxsaldo = total
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.FCLiteral("MonedaVenta").Text = saldo.FormatoNumero(4)
|
e.Row.FCLiteral("MonedaVenta").Text = saldo.FormatoNumero(2)
|
||||||
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Attributes.Add("onclick", String.Format("chkAnt(this,{0},{1});", e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).ClientID, saldo))
|
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Attributes.Add("onclick", String.Format("chkAnt(this,{0},{1});", e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).ClientID, saldo))
|
||||||
e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1});", e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ClientID, saldo))
|
e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1});", e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ClientID, saldo))
|
||||||
e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).Attributes.Add("onKeyUp", String.Format("CambioTipoMoneda({0},{1},{2},{3},{4});", e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ClientID, e.Row.DataKey("Saldo"), e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).ClientID, e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).ClientID, e.Row.DataKey("CveMoneda")))
|
e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).Attributes.Add("onKeyUp", String.Format("CambioTipoMoneda({0},{1},{2},{3},{4});", e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ClientID, e.Row.DataKey("Saldo"), e.Row.FCTextBox("TxtAnticipo" & e.Row.RowIndex).ClientID, e.Row.FCTextBox("TxtTC" & e.Row.RowIndex).ClientID, e.Row.DataKey("CveMoneda")))
|
||||||
@@ -11874,7 +11894,7 @@ Partial Class Ventas
|
|||||||
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
||||||
PorcentajePago = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
PorcentajePago = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal
|
||||||
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'SI LA VENTA VIENE EN PESOS Y SE VA A PAGAR EN DOLARES
|
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then 'SI LA VENTA VIENE EN PESOS Y SE VA A PAGAR EN DOLARES
|
||||||
tipoCambioPago = gvr.DataKey("TipoCambio").ToDecimal() ' gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
tipoCambioPago = gvr.DataKey("TipoCambioHoy").ToDecimal() ' gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
|
||||||
tipoCambioVenta = 1
|
tipoCambioVenta = 1
|
||||||
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
||||||
PorcentajePago = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
PorcentajePago = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
||||||
@@ -13905,6 +13925,11 @@ Partial Class Ventas
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If PU <= 0 AndAlso UsuarioActual.CveEmpresa = 141 Then
|
||||||
|
Alert("El precio debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
'VALIDA PROMOCIONES
|
'VALIDA PROMOCIONES
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero, CveCliente, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero, CveCliente, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -14687,6 +14712,8 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean))
|
TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean))
|
||||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||||
|
|
||||||
|
TmpDT.Columns("EsOutSourcing").DefaultValue = False
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CreaDTmpC()
|
Private Sub CreaDTmpC()
|
||||||
DTmpC = New DataTable
|
DTmpC = New DataTable
|
||||||
@@ -23878,6 +23905,20 @@ Partial Class Ventas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " EMITIR DOCUMENTO NUEVO "
|
#Region " EMITIR DOCUMENTO NUEVO "
|
||||||
|
|
||||||
|
Private Function ValidaFacturarCotizacion() As Boolean
|
||||||
|
Dim Retorno As Boolean = True
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 141 Then
|
||||||
|
If Not PermiteCredito AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) Then
|
||||||
|
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Retorno = False
|
||||||
|
Return Retorno
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
||||||
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 And RBLPago.SelectedValue.ToEntero = 2 Then
|
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 And RBLPago.SelectedValue.ToEntero = 2 Then
|
||||||
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -23886,11 +23927,17 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'CARGA LO PENDIENTE POR FACTURAR DE COTIZACION
|
'CARGA LO PENDIENTE POR FACTURAR DE COTIZACION
|
||||||
If EraCotizacion = 1 Then
|
If EraCotizacion = 1 Then
|
||||||
|
|
||||||
|
If Not ValidaFacturarCotizacion() Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If Not PreparaFacturarCotizacion() Then
|
If Not PreparaFacturarCotizacion() Then
|
||||||
EraCotizacion = 0
|
EraCotizacion = 0
|
||||||
DdlTipoComprobante.SelectedValue = "Cot"
|
DdlTipoComprobante.SelectedValue = "Cot"
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CARGA LO PENDIENTE POR FACTURAR DE REMISION
|
'CARGA LO PENDIENTE POR FACTURAR DE REMISION
|
||||||
@@ -24658,4 +24705,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
' Return File
|
' Return File
|
||||||
'End Function
|
'End Function
|
||||||
|
Protected Sub LnkGenerarOC_Click(sender As Object, e As EventArgs)
|
||||||
|
Response.Redirect($"~/OC/OC.aspx?CveCotizacion={Me.CveVenta}&Tipo=OC")
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -65,13 +65,20 @@ Public Class WsTSoft
|
|||||||
If Continuar Then
|
If Continuar Then
|
||||||
'CONSULTA DIRECCIONES
|
'CONSULTA DIRECCIONES
|
||||||
Dim Direcciones As JArray = ConsultarDirecciones(ObjGPS.DtResultados, "Lat", "Lng")
|
Dim Direcciones As JArray = ConsultarDirecciones(ObjGPS.DtResultados, "Lat", "Lng")
|
||||||
For Each Dir As JObject In Direcciones
|
Try
|
||||||
ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
If Direcciones IsNot Nothing Then
|
||||||
Next
|
For Each Dir As JObject In Direcciones
|
||||||
|
ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||||
ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
|
Next
|
||||||
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
|
End If
|
||||||
ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString
|
|
||||||
|
ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
|
||||||
|
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
|
||||||
|
ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString
|
||||||
|
Catch ex As Exception
|
||||||
|
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||||
|
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||||
|
End Try
|
||||||
Else
|
Else
|
||||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||||
End If
|
End If
|
||||||
@@ -103,17 +110,25 @@ Public Class WsTSoft
|
|||||||
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
|
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
|
||||||
Dim objRem As New GetRemisionHistorialesObj
|
Dim objRem As New GetRemisionHistorialesObj
|
||||||
If Continuar Then
|
If Continuar Then
|
||||||
Dim Dt = objTsoft.DtResultados.Copy()
|
Try
|
||||||
Dt.Columns.Add("Direccion", GetType(String))
|
Dim Dt = objTsoft.DtResultados.Copy()
|
||||||
|
Dt.Columns.Add("Direccion", GetType(String))
|
||||||
|
|
||||||
'CONSULTA DIRECCIONES
|
'CONSULTA DIRECCIONES
|
||||||
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
|
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
|
||||||
For Each Dir As JObject In Direcciones
|
If Direcciones IsNot Nothing Then
|
||||||
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
For Each Dir As JObject In Direcciones
|
||||||
Next
|
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj)
|
objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj)
|
||||||
objRem.CurrentError = ""
|
objRem.CurrentError = ""
|
||||||
|
Catch ex As Exception
|
||||||
|
objRem.CurrentError = "Ocurrió un error al asignar las direcciones"
|
||||||
|
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
Else
|
Else
|
||||||
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
||||||
objRem.CurrentError = objTsoft.MyCurrentError
|
objRem.CurrentError = objTsoft.MyCurrentError
|
||||||
@@ -129,11 +144,17 @@ Public Class WsTSoft
|
|||||||
Dim objTsoft As New ClsTSoft
|
Dim objTsoft As New ClsTSoft
|
||||||
If objTsoft.GetInfoEventosPenske(FechaInicio.ToDateTime(), FechaFin.ToDateTime()) Then
|
If objTsoft.GetInfoEventosPenske(FechaInicio.ToDateTime(), FechaFin.ToDateTime()) Then
|
||||||
If objTsoft.DtResultados.Rows.Count > 0 Then
|
If objTsoft.DtResultados.Rows.Count > 0 Then
|
||||||
'CONSULTA DIRECCIONES
|
Try
|
||||||
Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados)
|
'CONSULTA DIRECCIONES
|
||||||
For Each Dir As JObject In Direcciones
|
Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados)
|
||||||
objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
If Direcciones IsNot Nothing Then
|
||||||
Next
|
For Each Dir As JObject In Direcciones
|
||||||
|
objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
retorno = objTsoft.DtResultados.DataTableToJSONIPP()
|
retorno = objTsoft.DtResultados.DataTableToJSONIPP()
|
||||||
Else
|
Else
|
||||||
|
|||||||
Reference in New Issue
Block a user