Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -754,7 +754,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Resultados del Ejercicio (Ahorro/Desahorro):</Value>
|
||||
<Value>Resultados del ejercicio(Utilidad o pérdida):</Value>
|
||||
<Style>
|
||||
<FontStyle>Italic</FontStyle>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -902,7 +902,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Estado de Actividades </Value>
|
||||
<Value>Estado de Resultado </Value>
|
||||
<Style>
|
||||
<FontSize>11pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
@@ -980,7 +980,6 @@
|
||||
<Value>= Parameters!pImg.Value</Value>
|
||||
<Sizing>FitProportional</Sizing>
|
||||
<Top>0.06104cm</Top>
|
||||
<Left>0cm</Left>
|
||||
<Height>1.5cm</Height>
|
||||
<Width>2.94324cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
|
||||
@@ -2981,6 +2981,25 @@ Public Class ClsCompras
|
||||
Return Retorno
|
||||
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"
|
||||
|
||||
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
|
||||
|
||||
@@ -4878,6 +4878,27 @@ Public Class ClsInventarios
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetExistenciasMedRin(CvePS As Integer, CveEmpresa As Integer, CveRinTamaño As Integer, CveMedida As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_ExistenciaMedRinGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño
|
||||
.Add("@CveMedida", SqlDbType.Int).Value = CveMedida
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las Existencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesUpdate")
|
||||
|
||||
@@ -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,
|
||||
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 IEPSPSIVAPorcentaje As Double = 0) As Boolean
|
||||
Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveVentaDetalleCotizacion As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_OrdenesCompraDetalleAdd")
|
||||
|
||||
@@ -1259,7 +1259,8 @@ Public Class ClsOC
|
||||
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
|
||||
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
|
||||
.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
|
||||
|
||||
Try
|
||||
|
||||
@@ -3959,7 +3959,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Compras/RepComprasPrecios.aspx".ToUpper(), 690)
|
||||
PaginaDict.Add("/Compras/RepDocumentacionProveedor.aspx".ToUpper(), 1206)
|
||||
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
|
||||
|
||||
PaginaDict.Add("/Compras/RepEvaluacionesProveedores.aspx".ToUpper(), 754)
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -179,6 +179,25 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
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,
|
||||
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",
|
||||
@@ -3934,7 +3953,7 @@ Public Class ClsVentas
|
||||
Return retorno
|
||||
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
|
||||
DataAdapter("PA_Ventas_RepIngresosDetalle", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -3945,6 +3964,7 @@ Public Class ClsVentas
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@TipoAmortizacion", SqlDbType.Int).Value = TipoAmortizacion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -880,8 +880,24 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim tipoCambioCompra As Decimal
|
||||
Dim TipoCambioPago 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
|
||||
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
|
||||
TipoCambioPago = TxtTC.Text.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
|
||||
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 = 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
|
||||
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
|
||||
@@ -926,17 +944,17 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
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
|
||||
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
|
||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
importeMX = ImporteMovimiento * tipoCambioCompraValuacion
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
TipoCambioGeneral = tipoCambioCompra
|
||||
TipoCambioGeneral = tipoCambioCompraValuacion
|
||||
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
||||
'cuando son dolares, y tienen complementaria, se hace el registro
|
||||
If gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
@@ -948,7 +966,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
If ImporteMovimiento <> 0 AndAlso (UsuarioActual.CveEmpresa = 119 Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
||||
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"
|
||||
End If
|
||||
End If
|
||||
@@ -961,12 +979,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
@@ -1007,18 +1027,20 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 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)}"
|
||||
|
||||
@@ -1041,12 +1063,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
@@ -1086,18 +1110,20 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 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)}"
|
||||
|
||||
@@ -1120,12 +1146,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
@@ -1165,18 +1193,20 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 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)}"
|
||||
|
||||
@@ -1199,18 +1229,20 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
TipoCambioGeneral = TipoCambioPago
|
||||
TipoCambioGeneral = tipoCambioCompra
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
|
||||
@@ -1233,18 +1265,20 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 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)}"
|
||||
|
||||
@@ -1267,12 +1301,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
@@ -1300,12 +1336,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
@@ -1517,12 +1555,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
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)
|
||||
importeMX = ImporteMovimiento
|
||||
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)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
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)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
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)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
@@ -1579,12 +1621,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
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)
|
||||
importeMX = ImporteMovimiento
|
||||
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)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
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)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
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)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
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)
|
||||
importeMX = ImporteMovimiento
|
||||
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)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
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)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
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)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
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)
|
||||
importeMX = ImporteMovimiento
|
||||
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)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
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)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
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)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
@@ -1700,49 +1750,101 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
End If
|
||||
Case 64 'Ganancia
|
||||
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, 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, tipoCambioCompra)
|
||||
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
|
||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
||||
|
||||
|
||||
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
|
||||
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia = Math.Round(Diferencia, 2)
|
||||
|
||||
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
|
||||
|
||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
|
||||
If Diferencia > 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
ImporteMovimiento = Math.Abs(Diferencia)
|
||||
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
|
||||
ImporteMovimiento = 0
|
||||
End If
|
||||
Case 65 'Perdida
|
||||
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
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
'' 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
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
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
|
||||
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
|
||||
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
|
||||
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
|
||||
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
|
||||
Diferencia = Math.Round(Diferencia, 2)
|
||||
'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
|
||||
|
||||
'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
|
||||
ImporteMovimiento = 0
|
||||
End If
|
||||
|
||||
@@ -4408,7 +4408,7 @@ Partial Class Compras_Compras
|
||||
If OCVinculada And Not (CveImportacion > 0 Or CveFlete > 0) Then
|
||||
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 140, 141) Then
|
||||
CveConceptoContableAlmacen = 205
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -334,9 +334,10 @@ Partial Class Compras_EvaluacionProveedor
|
||||
'ObjCarta.Guardar(PathDestino)
|
||||
ObjCarta.GuardarStreamPDF()
|
||||
archivoCarta.ArchivoBinario = ObjCarta.GetBytesDocumento()
|
||||
|
||||
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
|
||||
|
||||
If File.Exists(PathDestino) Then
|
||||
File.Delete(PathDestino)
|
||||
End If
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
</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" style="">
|
||||
@@ -60,12 +59,8 @@
|
||||
</div>
|
||||
|
||||
<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: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>--%>
|
||||
<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>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -77,17 +72,12 @@
|
||||
<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>
|
||||
|
||||
<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: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>--%>
|
||||
<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>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">Estatus</div>
|
||||
|
||||
@@ -100,18 +90,12 @@
|
||||
<asp:ListItem Value="3">Completado</asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</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>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI5" runat="server" HighlightCssClass="vco" TargetControlID="cvTxtFechaVigencia" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
</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>
|
||||
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" HeaderText="Cargar">
|
||||
@@ -258,14 +232,7 @@
|
||||
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" HeaderText="Aprobar">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="ImgAprobar" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</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
|
||||
Binary file not shown.
@@ -1477,20 +1477,15 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Expedido en Sucursal: 2</Value>
|
||||
<Value>Expedido en Sucursal:</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>MATRIZ</Value>
|
||||
<Value>=Parameters!Sucursal.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -1867,7 +1862,23 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<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>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -2187,6 +2198,9 @@
|
||||
<Height>1.05328cm</Height>
|
||||
<Width>17.71415cm</Width>
|
||||
<ZIndex>15</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") > 0),false,true)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -36,6 +36,18 @@
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</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">
|
||||
<td class="text-right"><b>C. Barras:</b></td>
|
||||
<td>
|
||||
@@ -89,7 +101,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />
|
||||
@@ -101,6 +113,18 @@
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</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>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -65,6 +65,13 @@ Partial Class Inventarios_Default
|
||||
DDlPS.DataBind()
|
||||
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
|
||||
If Txt <> "" Then LblTitulo.Text = String.Format("Búsqueda de {0}", Txt)
|
||||
|
||||
@@ -80,7 +87,11 @@ Partial Class Inventarios_Default
|
||||
End Sub
|
||||
|
||||
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
|
||||
Private Sub CargaDatos(CvePS As Integer, Tipo As Integer)
|
||||
Dim ObjInventarios As New ClsInventarios()
|
||||
@@ -162,6 +173,19 @@ Partial Class Inventarios_Default
|
||||
End If
|
||||
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 "
|
||||
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
||||
@@ -178,11 +202,38 @@ Partial Class Inventarios_Default
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
CargaDatos(DrPS("CvePS").ToString.ToEntero, 2)
|
||||
|
||||
|
||||
TxtCodigoPS.Text = ""
|
||||
TxtCodigoPS.Focus()
|
||||
End Sub
|
||||
#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
|
||||
|
||||
@@ -534,6 +534,18 @@ Partial Class OC
|
||||
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)
|
||||
ObjVentas.Dispose()
|
||||
End If
|
||||
@@ -971,6 +983,8 @@ Partial Class OC
|
||||
DtDetalle.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
DtDetalle.Columns.Add("CantidadNoEditable", GetType(Double))
|
||||
|
||||
DtDetalle.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer))
|
||||
|
||||
'DtDetalle.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
|
||||
|
||||
' DtDetalle.Columns.Add("ClasificacionOG", GetType(String))
|
||||
@@ -1040,6 +1054,10 @@ Partial Class OC
|
||||
dr("CveTipoGasto") = -1
|
||||
dr("CveClasificacionOG") = -1
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
|
||||
dr("CveVentaDetalleCotizacion") = RowV("CveVentaDetalle")
|
||||
End If
|
||||
|
||||
DtDetalle.Rows.Add(dr)
|
||||
|
||||
Next
|
||||
@@ -2318,7 +2336,7 @@ Partial Class OC
|
||||
Dim OCBitacora As New ClsOIEventos(OC.IniciaTransacSQL())
|
||||
Dim ObjInventarios As New ClsInventarios(OC.IniciaTransacSQL())
|
||||
Dim ObjConta As New ClsContabilidad(OC.IniciaTransacSQL())
|
||||
|
||||
Dim ObjVentas As New ClsVentas(OC.IniciaTransacSQL())
|
||||
Dim Conta As ClsContPAQi = Nothing
|
||||
If (UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto) Or UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
Conta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
@@ -2361,7 +2379,12 @@ Partial Class OC
|
||||
CveOrdenCompraPadre = OC.CveOrdenCompra
|
||||
If CveOrdenCompraPadre > 0 Then
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
@@ -2435,11 +2458,20 @@ Partial Class OC
|
||||
|
||||
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not TieneError AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
|
||||
TieneError = Not ActualizarCotizacion(ObjVentas)
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
@@ -2887,6 +2919,7 @@ Partial Class OC
|
||||
Else
|
||||
'TERMINA TODO POR SI OCURRIÓ ALGO RARO
|
||||
If OC IsNot Nothing Then OC.Dispose()
|
||||
If ObjVentas IsNot Nothing Then ObjVentas.Dispose()
|
||||
If Conta IsNot Nothing Then Conta.Dispose()
|
||||
|
||||
'MANDA CORREOS SI EL ESTATUS ES MAYOR A 0
|
||||
@@ -5043,7 +5076,7 @@ Partial Class OC
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region " COTIZACIONES "
|
||||
#Region "C O T I Z A C I O N E S"
|
||||
Protected Sub VerificaSiRequiereCotizacion()
|
||||
If TipoOC = "REQ" Then
|
||||
If ChkCotizacion.Checked Then
|
||||
@@ -5083,6 +5116,32 @@ Partial Class OC
|
||||
VerificaCotizacionesGanadoras()
|
||||
End If
|
||||
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
|
||||
|
||||
Private Function notienepresupuesto() As Boolean
|
||||
@@ -7544,4 +7603,5 @@ Partial Class OC
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -801,6 +801,7 @@
|
||||
<%---2020/02/06 - Auditoria--%>
|
||||
<ajax:TabPanel ID="TabAuditoria" runat="server" HeaderText="<i class='fa fa-search'></i> Auditoría" Visible="True">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpTabAuditoria" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -931,6 +932,7 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
@@ -552,8 +552,7 @@
|
||||
<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>
|
||||
<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>
|
||||
|
||||
|
||||
@@ -166,32 +166,32 @@
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Titulo">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Amortización" ItemStyle-HorizontalAlign="Right">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Impuesto Local" ItemStyle-HorizontalAlign="Right">
|
||||
|
||||
@@ -60,7 +60,7 @@ Partial Class Ventas_RepIngresos
|
||||
Set
|
||||
ViewState("CveSubProyecto") = Value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
@@ -69,9 +69,9 @@ Partial Class Ventas_RepIngresos
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CveSubProyecto = -1
|
||||
|
||||
@@ -54,9 +54,20 @@ Partial Class Ventas_RepIngresosDetalle
|
||||
Set
|
||||
ViewState("CveCuenta") = Value
|
||||
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
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
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())
|
||||
CveSubProyecto = If(IsNothing(Request("CveSubProyecto")), 0, Request("CveSubProyecto").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"), "")
|
||||
TxtFechaFin.Text = If(RsFechaF.Length > 6, DateTime.ParseExact(RsFechaF, "yyyy/MM/dd", Nothing).ToString("dd/MM/yyyy"), "")
|
||||
DdlTipoDocto.SelectedValueExist(TipoDoc)
|
||||
DdlSubProyecto.SelectedValueExist(CveSubProyecto.ToString())
|
||||
'
|
||||
CargaRepIngresosDetalle()
|
||||
LnkFiltrar_Click(LnkFiltrar, EventArgs.Empty)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub CargaRepIngresosDetalle()
|
||||
Dim ObjRepI As New ClsVentas()
|
||||
ObjRepI.RepIngresosDetalle(UsuarioActual.CveEmpresa, If(RsFechaI = "", MinFecha, RsFechaI.ToDate), If(RsFechaF = "", MaxFecha, RsFechaF.ToDate), TipoDoc, CveSubProyecto, CveConceptoContable, CveCuenta)
|
||||
GVRepIngresos.DataSource = ObjRepI.DtResultados
|
||||
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
|
||||
End If
|
||||
ObjRepI.Dispose()
|
||||
GVRepIngresos.DataBind()
|
||||
upDatosRepI.Update()
|
||||
@@ -94,7 +107,7 @@ Partial Class Ventas_RepIngresosDetalle
|
||||
End Sub
|
||||
Protected Sub GVRepIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
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"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -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: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 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">
|
||||
<ContentTemplate>
|
||||
@@ -3541,7 +3544,7 @@
|
||||
<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"
|
||||
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>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -3543,6 +3543,7 @@ Partial Class Ventas
|
||||
' LbCancelarDocumentoManual.Visible = True
|
||||
'End If
|
||||
|
||||
|
||||
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")))
|
||||
If TienePermiso <> "" Then
|
||||
@@ -4362,6 +4363,19 @@ Partial Class Ventas
|
||||
|
||||
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()
|
||||
UpContado.Update()
|
||||
UpEstatus.Update()
|
||||
@@ -11670,7 +11684,7 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
tipoCambio = e.Row.DataKey("TipoCambio").ToString.ToDecimal
|
||||
tipoCambio = e.Row.DBCampo("TipoCambioHoy").ToString.ToDecimal
|
||||
Else
|
||||
tipoCambio = GlobalTipoCambio(e.Row.DataKey("Fecha").ToString.ToDate).ToDecimal
|
||||
End If
|
||||
@@ -11704,7 +11718,7 @@ Partial Class Ventas
|
||||
maxsaldo = total
|
||||
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.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")))
|
||||
@@ -11875,7 +11889,7 @@ Partial Class Ventas
|
||||
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.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
|
||||
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
|
||||
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
|
||||
PorcentajePago = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
|
||||
@@ -14688,6 +14702,8 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean))
|
||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||
|
||||
TmpDT.Columns("EsOutSourcing").DefaultValue = False
|
||||
|
||||
End Sub
|
||||
Private Sub CreaDTmpC()
|
||||
DTmpC = New DataTable
|
||||
@@ -24659,4 +24675,7 @@ Partial Class Ventas
|
||||
|
||||
' Return File
|
||||
'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
|
||||
@@ -65,13 +65,20 @@ Public Class WsTSoft
|
||||
If Continuar Then
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(ObjGPS.DtResultados, "Lat", "Lng")
|
||||
For Each Dir As JObject In Direcciones
|
||||
ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
|
||||
ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
|
||||
ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
|
||||
ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString
|
||||
Try
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
|
||||
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
|
||||
ObjPos.CurrentError = "No se pudo obtener la posición."
|
||||
End If
|
||||
@@ -103,17 +110,25 @@ Public Class WsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico)
|
||||
Dim objRem As New GetRemisionHistorialesObj
|
||||
If Continuar Then
|
||||
Dim Dt = objTsoft.DtResultados.Copy()
|
||||
Dt.Columns.Add("Direccion", GetType(String))
|
||||
Try
|
||||
Dim Dt = objTsoft.DtResultados.Copy()
|
||||
Dt.Columns.Add("Direccion", GetType(String))
|
||||
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
|
||||
For Each Dir As JObject In Direcciones
|
||||
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon")
|
||||
If Direcciones IsNot Nothing Then
|
||||
For Each Dir As JObject In Direcciones
|
||||
Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
End If
|
||||
|
||||
objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = ""
|
||||
objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj)
|
||||
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
|
||||
objRem.Historial = New List(Of GetRemisionHistorialsObj)
|
||||
objRem.CurrentError = objTsoft.MyCurrentError
|
||||
@@ -129,11 +144,17 @@ Public Class WsTSoft
|
||||
Dim objTsoft As New ClsTSoft
|
||||
If objTsoft.GetInfoEventosPenske(FechaInicio.ToDateTime(), FechaFin.ToDateTime()) Then
|
||||
If objTsoft.DtResultados.Rows.Count > 0 Then
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados)
|
||||
For Each Dir As JObject In Direcciones
|
||||
objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
|
||||
Next
|
||||
Try
|
||||
'CONSULTA DIRECCIONES
|
||||
Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados)
|
||||
If Direcciones IsNot Nothing Then
|
||||
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()
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user