Merge - Recepcion Usados

This commit is contained in:
2020-11-06 20:04:25 -07:00
55 changed files with 4666 additions and 2617 deletions

View File

@@ -1140,7 +1140,9 @@ Public Class ClsContabilidad
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
Dim StrLog As New StringBuilder Dim StrLog As New StringBuilder
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
StrLog.AppendFormat("CvePrep:{0} - Inicio", CvePrePoliza) Dim OcurrioError As Boolean = False
StrLog.AppendFormat("CvePrep:{0} - Inicio -", CvePrePoliza)
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG
@@ -1154,7 +1156,7 @@ Public Class ClsContabilidad
If CvePrePoliza <= 0 Then Return False If CvePrePoliza <= 0 Then Return False
Dim OcurrioError As Boolean = False
Dim ContaCompartida As Boolean = False Dim ContaCompartida As Boolean = False
If ObjConta Is Nothing Then If ObjConta Is Nothing Then
@@ -1263,6 +1265,7 @@ Public Class ClsContabilidad
If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento, If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento,
dr("ImporteMN").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then dr("ImporteMN").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.1 - ")
Exit For Exit For
End If End If
@@ -1271,6 +1274,7 @@ Public Class ClsContabilidad
If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento, If Not ObjConta.AddMovimiento(tIdPoliza, dr("IdCtaContable").ToString.ToEntero, tipoMovimiento,
dr("Importe").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then dr("Importe").ToString.ToDecimal, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegmentoNegocio").ToString.ToEntero, Fecha, SigReferencia, dr("CvePrePolizaDetalle").ToString.ToEntero, ImporteMonedaExtranjera:=dr("ImporteME").ToString.ToDecimal) Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.2 - ")
Exit For Exit For
End If End If
@@ -1279,6 +1283,7 @@ Public Class ClsContabilidad
End If End If
Else Else
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.3 - ")
Mensaje.Append(String.Format("<br> La cuenta contable {0} es invalida", dr("ConceptoContable"))) Mensaje.Append(String.Format("<br> La cuenta contable {0} es invalida", dr("ConceptoContable")))
Exit For Exit For
End If End If
@@ -1298,6 +1303,7 @@ Public Class ClsContabilidad
dr("ISRRetenido").ToString.ToDecimal, dr("ISRRetenido").ToString.ToDecimal,
dr("IVARetenido").ToString.ToDecimal, False) Then dr("IVARetenido").ToString.ToDecimal, False) Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.4 - ")
End If End If
End If End If
@@ -1347,6 +1353,7 @@ Public Class ClsContabilidad
IdProveedor = ObjConta.AddProveedor(IdCtaContProveedores, RFC, RazonSocial, "") IdProveedor = ObjConta.AddProveedor(IdCtaContProveedores, RFC, RazonSocial, "")
If IdProveedor <= 0 Then If IdProveedor <= 0 Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.5 - ")
End If End If
End If End If
@@ -1364,6 +1371,7 @@ Public Class ClsContabilidad
dr("Serie").ToString.ToString, dr("Serie").ToString.ToString,
dr("Folio").ToString.StrToNum, dr("FolioFiscal").ToString, Empresa.CveEmpresa) Then dr("Folio").ToString.StrToNum, dr("FolioFiscal").ToString, Empresa.CveEmpresa) Then
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 1.6 - ")
Mensaje.Append("La Poliza o la Cuenta no son válidas ") Mensaje.Append("La Poliza o la Cuenta no son válidas ")
End If End If
@@ -1377,12 +1385,14 @@ Public Class ClsContabilidad
If Not OcurrioError Then If Not OcurrioError Then
If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then If Not UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
StrLog.AppendFormat(" Error 2.1 - ")
OcurrioError = True OcurrioError = True
End If End If
End If End If
If Not OcurrioError Then If Not OcurrioError Then
If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa, CveUsuarioModifico:=CveUsuario) Then If Not UpdatePrePoliza(Fecha, ObjConta.Folio, CveTipoPoliza, tIdPoliza, CvePrePoliza, Empresa.CveEmpresa, CveUsuarioModifico:=CveUsuario) Then
StrLog.AppendFormat(" Error 2.2 - ")
OcurrioError = True OcurrioError = True
End If End If
End If End If
@@ -1404,11 +1414,13 @@ Public Class ClsContabilidad
Else Else
OcurrioError = True OcurrioError = True
StrLog.AppendFormat(" Error 3.1 - ")
End If End If
Catch ex As Exception Catch ex As Exception
StrLog.AppendFormat(" Error 4.1 - ")
If Not ContaCompartida Then ObjConta.RollBack() If Not ContaCompartida Then ObjConta.RollBack()
OnError("Ocurrió un error al intentar contabilizar la PrePoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al intentar contabilizar la PrePoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
'Alert("Ocurrió un error al guardar la póliza", TipoMensaje.MsgAdvertencia) 'Alert("Ocurrió un error al guardar la póliza", TipoMensaje.MsgAdvertencia)
@@ -1417,8 +1429,9 @@ Public Class ClsContabilidad
If Not ContaCompartida Then ObjConta.Dispose() If Not ContaCompartida Then ObjConta.Dispose()
End If End If
StrLog.AppendFormat(" - Con Retorno ({0}) - OcurrioError ({1}) ", Retorno, OcurrioError)
StrLog.AppendFormat(" - Fin") StrLog.AppendFormat(" - Fin")
StrLog.ToString.GuardaLogAD("LogContabilidazacion") StrLog.ToString.GuardaLogAD("LogContabilizacion")
Return Retorno Return Retorno
End Function End Function
@@ -4224,7 +4237,7 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function End Function
Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer ) As Boolean Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer) As Boolean
Dim Retorno = False Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogoCCGet") DataAdapter("PA_Conta_AnexoCatalogoCCGet")
@@ -5525,7 +5538,7 @@ Public Class ClsContabilidad
End Function End Function
#Region "IVAS" #Region "IVAS"
Public Function GetRepIVA(FechaInicio As Date, FechaFin As Date, Opcion As Integer, CveUsuarioConsulta As Integer, Conciliado As Integer, CveEmpresa As Integer, TipoCambio As Integer, TCEspecifico As Double) As Boolean Public Function GetRepIVA(FechaInicio As Date, FechaFin As Date, Opcion As Integer, CveUsuarioConsulta As Integer, CveCuentaBancaria As Integer, Conciliado As Integer, CveEmpresa As Integer, TipoCambio As Integer, TCEspecifico As Double) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Conta_RepIVA") DataAdapter("PA_Conta_RepIVA")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -5533,6 +5546,7 @@ Public Class ClsContabilidad
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@Opcion", SqlDbType.Int).Value = Opcion .Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveCuentaBancaria", SqlDbType.Int).Value = CveCuentaBancaria
.Add("@Conciliado", SqlDbType.Int).Value = Conciliado .Add("@Conciliado", SqlDbType.Int).Value = Conciliado
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
@@ -5569,13 +5583,14 @@ Public Class ClsContabilidad
End Function End Function
Public Function GetRepIVAComparativo(FechaInicio As Date, FechaFin As Date, CveUsuarioConsulta As Integer, Conciliado As Integer, CveEmpresa As Integer) As Boolean Public Function GetRepIVAComparativo(FechaInicio As Date, FechaFin As Date, CveUsuarioConsulta As Integer, CveCuentaBancaria As Integer, Conciliado As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Conta_ImpuestosComparativo") DataAdapter("PA_Conta_ImpuestosComparativo")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveCuentaBancaria", SqlDbType.Int).Value = CveCuentaBancaria
.Add("@Conciliado", SqlDbType.Int).Value = Conciliado .Add("@Conciliado", SqlDbType.Int).Value = Conciliado
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -5589,7 +5604,7 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function End Function
Public Function GetRepIVAAcumulado(FechaInicio As Date, FechaFin As Date, Conciliado As Integer, TipoImpuesto As Integer, CveUsuarioConsulta As Integer, CveEmpresa As Integer) As Boolean Public Function GetRepIVAAcumulado(FechaInicio As Date, FechaFin As Date, Conciliado As Integer, TipoImpuesto As Integer, CveCuentaBancaria As Integer, CveUsuarioConsulta As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Conta_IVAAcumulado") DataAdapter("PA_Conta_IVAAcumulado")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -5597,6 +5612,7 @@ Public Class ClsContabilidad
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@TipoImpuesto", SqlDbType.Int).Value = TipoImpuesto .Add("@TipoImpuesto", SqlDbType.Int).Value = TipoImpuesto
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveCuentaBancaria", SqlDbType.Int).Value = CveCuentaBancaria
.Add("@Conciliado", SqlDbType.Int).Value = Conciliado .Add("@Conciliado", SqlDbType.Int).Value = Conciliado
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa

View File

@@ -36,6 +36,12 @@ Public Class ClsContratos
Public Property NotificarAvanceAlcanzado As Boolean Public Property NotificarAvanceAlcanzado As Boolean
Public Property CveContratoGasto As Integer Public Property CveContratoGasto As Integer
Public Property NumeroEstimacionNueva As Integer
Public Property CveEstimacionNueva As Integer
#End Region #End Region
@@ -681,6 +687,94 @@ Public Class ClsContratos
#End Region #End Region
#Region "ESTIMACION OBRA"
Public Function GetContratosObraRepAvances(FechaI As Date, FechaF As Date, CveCliente As Integer, CveContrato As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosObraRepAvancesGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar el avance de contratos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetContratosObraRepAvancesDetalle(CveContrato As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosObraRepAvancesDetalleGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar el detalle del avance.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetContratosObraRepAvancesPartida(CveEstimacion As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosObraRepAvancesPartidaGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEstimacion", SqlDbType.Int).Value = CveEstimacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar las partidas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetContratosObraRepAvancesPartida(FechaI As Date, FechaF As Date, CveCliente As Integer, CveContrato As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosObraRepAvancesPartidaGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar el avance de partida.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region "C I C L O C O M E R C I A L" #Region "C I C L O C O M E R C I A L"
Public Function CicloComercialAdd(CveContrato As Integer, CveCotizacion As Integer, CveCliente As Integer, FueFacturado As Boolean, CveFactura As Integer, Estatus As Integer, CveEmpresa As Integer, FechaVenc As Date) As Boolean Public Function CicloComercialAdd(CveContrato As Integer, CveCotizacion As Integer, CveCliente As Integer, FueFacturado As Boolean, CveFactura As Integer, Estatus As Integer, CveEmpresa As Integer, FechaVenc As Date) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -1005,13 +1099,13 @@ Public Class ClsContratos
Return Retorno Return Retorno
End Function End Function
Public Function AddContratosAvance(CveContratoDetalle As Integer, Cantidad As Double, Fecha As DateTime, CveUsuario As Integer, Optional CveEstimacion As Integer = -1) As Boolean Public Function AddContratosAvance(CveContratoDetalle As Integer, Cantidad As Double, Fecha As Date, CveUsuario As Integer, Optional CveEstimacion As Integer = -1) As Boolean
Dim Retorno = False Dim Retorno = False
DataAdapter("PA_Con_ContratosAvanceAdd") DataAdapter("PA_Con_ContratosAvanceAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
.Add("@Cantidad", SqlDbType.Int).Value = Cantidad .Add("@Cantidad", SqlDbType.Int).Value = Cantidad
.Add("@Fecha", SqlDbType.Date).Value = Fecha.ToString("yyyy/MM/dd") .Add("@Fecha", SqlDbType.Date).Value = Fecha
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEstimacion", SqlDbType.Int).Value = CveEstimacion .Add("@CveEstimacion", SqlDbType.Int).Value = CveEstimacion
End With End With
@@ -1060,7 +1154,7 @@ Public Class ClsContratos
Return Retorno Return Retorno
End Function End Function
Public Function GetContratosAvanceAnexos(CveContratoDetalle As Integer, fecha As String, CveUsuario As Integer) As Boolean Public Function GetContratosAvanceAnexos(CveContratoDetalle As Integer, fecha As String, CveUsuario As Integer, Optional CveEstimacion As Integer = -1) As Boolean
Dim Retorno = False Dim Retorno = False
DataAdapter("PA_Con_ContratosAvanceAnexos") DataAdapter("PA_Con_ContratosAvanceAnexos")
@@ -1068,6 +1162,7 @@ Public Class ClsContratos
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
.Add("@Fecha", SqlDbType.Date).Value = fecha .Add("@Fecha", SqlDbType.Date).Value = fecha
.Add("@CveUsuario", SqlDbType.Float).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Float).Value = CveUsuario
.Add("@CveEstimacion", SqlDbType.Float).Value = CveEstimacion
End With End With
Try Try
@@ -1081,6 +1176,84 @@ Public Class ClsContratos
End Function End Function
#End Region #End Region
#Region "ESTIMACION"
Public Function GetContratosAvanceEstimacion(CveContrato As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosAvanceEstimacionGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al cargar los avances del Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddContratosAvanceEstimacion(CveContrato As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
NumeroEstimacionNueva = -1
CveEstimacionNueva = -1
DataAdapter("PA_Con_ContratosEstimacionAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@NumeroEstimacion", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@CveEstimacion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
NumeroEstimacionNueva = SqlAdapter.SelectCommand.Parameters("@NumeroEstimacion").Value.ToString.ToEntero
CveEstimacionNueva = SqlAdapter.SelectCommand.Parameters("@CveEstimacion").Value.ToString.ToEntero
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar la estimación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateContratosAvanceEstimacion(CveContratoAvance As Integer, CveEstimacion As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosAvanceEstimacionUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveContratoAvance", SqlDbType.Int).Value = CveContratoAvance
.Add("@CveEstimacion", SqlDbType.Int).Value = CveEstimacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el avance.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region " S E C C I O N E S " #Region " S E C C I O N E S "
Public Function GetSecciones() As Boolean Public Function GetSecciones() As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -962,7 +962,7 @@ Public Class ClsInventarios
Optional CveMovimientoRelacionado As Integer = -1, Optional TipoCambio As Double = -1, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional MovimientoFijo As Boolean = False, Optional CveContrato As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1, Optional TipoCambio As Double = -1, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional MovimientoFijo As Boolean = False, Optional CveContrato As Integer = -1,
Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional Placa As String = "", Optional CveProveedor As Integer = -1, Optional Remision As String = "", Optional CveClienteSucursal As Integer = -1, Optional DepartamentoEntrega As String = "", Optional PedidoContrato As String = "", Optional GastoIndirecto As Double = -1, Optional CveChofer As Integer = -1, Optional Placa As String = "",
Optional FechaEntrega As String = "", Optional EspecifUnidad As String = "", Optional ResponsableCarga As String = "", Optional ResponsableRecibio As String = "", Optional Identificacion As String = "", Optional Domicilio As String = "", Optional FechaEntrega As String = "", Optional EspecifUnidad As String = "", Optional ResponsableCarga As String = "", Optional ResponsableRecibio As String = "", Optional Identificacion As String = "", Optional Domicilio As String = "",
Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "") As Integer Optional Telefono As String = "", Optional Ciudad As String = "", Optional Licencia As String = "", Optional Modulo As String = "", Optional CveOP As Integer = -1) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
@@ -1016,6 +1016,7 @@ Public Class ClsInventarios
.Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia .Add("@Licencia", SqlDbType.VarChar).Value = Licencia
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo .Add("@Modulo", SqlDbType.VarChar).Value = Modulo
.Add("@CveOP", SqlDbType.Int).Value = CveOP
End With End With
Try Try
@@ -1486,7 +1487,7 @@ Public Class ClsInventarios
End Function End Function
Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer,
IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0,
Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1) As Boolean Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet") DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
@@ -1507,6 +1508,7 @@ Public Class ClsInventarios
.Add("@Orden", SqlDbType.Int).Value = Orden .Add("@Orden", SqlDbType.Int).Value = Orden
.Add("@Marcas", SqlDbType.VarChar).Value = Marcas .Add("@Marcas", SqlDbType.VarChar).Value = Marcas
.Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado .Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado
.Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes
End With End With
Try Try
@@ -5259,13 +5261,13 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
Public Function DeleteMovimientosProyectados(TipoMovto As Integer) As Boolean Public Function DeleteMovimientosProyectados(TipoMovto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("Inv_MovimientosProyectadosDelete") DataAdapter("Inv_MovimientosProyectadosDelete")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@TipoMovto", SqlDbType.TinyInt).Value = TipoMovto .Add("@TipoMovto", SqlDbType.TinyInt).Value = TipoMovto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
Try Try

View File

@@ -155,7 +155,7 @@ Public Class ClsMovimientos
Return Retorno Return Retorno
End Function End Function
Public Function GetCxCCliente(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveUsuarioRegistro As Integer, CveEmpresa As Integer, Optional TipoAgrupador As Integer = 1, Optional CveUsuarioConsulta As Integer = -1) As Boolean Public Function GetCxCCliente(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveUsuarioRegistro As Integer, CveEmpresa As Integer, Optional TipoAgrupador As Integer = 1, Optional CveUsuarioConsulta As Integer = -1, Optional Cuenta As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Banc_Clientes") DataAdapter("PA_Banc_Clientes")
@@ -169,6 +169,7 @@ Public Class ClsMovimientos
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoAgrupador", SqlDbType.Int).Value = TipoAgrupador .Add("@TipoAgrupador", SqlDbType.Int).Value = TipoAgrupador
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@Cuenta", SqlDbType.NVarChar).Value = Cuenta
End With End With

View File

@@ -4981,13 +4981,12 @@ Public Class ClsPaginas
PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273) PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
PaginaDict.Add("/Contratos/ContratoObra.aspx".ToUpper(), -1) PaginaDict.Add("/Contratos/ContratoObra.aspx".ToUpper(), -1)
PaginaDict.Add("/Contratos/RepContratosObraAvances.aspx".ToUpper(), -1)
PaginaDict.Add("/Contratos/RepContratosObraAvancesDetalle.aspx".ToUpper(), -1)
PaginaDict.Add("/Contratos/RepContratosObraAvancesPartida.aspx".ToUpper(), -1)
'Orden Produccion' 'Orden Produccion'
'RMA 'RMA
PaginaDict.Add("/RMA/Garantias.aspx".ToUpper(), 175) PaginaDict.Add("/RMA/Garantias.aspx".ToUpper(), 175)

View File

@@ -850,7 +850,7 @@ Public Class WS_PuntoVenta
If objVentas.GetVentaTerminal(objVenta.CveVentaTerminal, objVenta.Fecha, objVenta.CveSubProyecto, objVenta.CveEmpresa) Then If objVentas.GetVentaTerminal(objVenta.CveVentaTerminal, objVenta.Fecha, objVenta.CveSubProyecto, objVenta.CveEmpresa) Then
CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "", objVenta.CveUsuario, objVenta.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "Punto de Venta addVenta", objVenta.CveUsuario, objVenta.CveEmpresa)
If objVentas.DtResultados.Rows.Count = 0 Then If objVentas.DtResultados.Rows.Count = 0 Then
If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal, If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal,
@@ -858,7 +858,7 @@ Public Class WS_PuntoVenta
objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago, objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago,
objVenta.FormaPago, Now, objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion, objVenta.FormaPago, Now, objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion,
objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1, objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1,
objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, objVenta.CveMesa, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal) Then objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, objVenta.CveMesa, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto) Then
objVenta.CveVenta = objVentas.CveVenta objVenta.CveVenta = objVentas.CveVenta
'Ingresar los detalles 'Ingresar los detalles
For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle
@@ -979,8 +979,9 @@ Public Class WS_PuntoVenta
'Se agrega movimiento separado por la cuenta de ventas (ER) 'Se agrega movimiento separado por la cuenta de ventas (ER)
' For Each Row As DataRow In DT.Rows ' For Each Row As DataRow In DT.Rows
ImporteMov = objVenta.SubTotal ' TmpDT.SUM("Total", "IdCtaContVentas = '" & Row("IdCtaContVentas").ToString & "'") ImporteMov = objVenta.SubTotal ' TmpDT.SUM("Total", "IdCtaContVentas = '" & Row("IdCtaContVentas").ToString & "'")
Dim CveClasificacion_04 = -1
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, " ", CveConceptoVenta, " ", objVenta.Fecha, -1, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, " ", CveConceptoVenta, " ", objVenta.Fecha, -1, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then
ErrorMovtosVentas = True ErrorMovtosVentas = True
End If End If
End If End If
@@ -989,7 +990,7 @@ Public Class WS_PuntoVenta
'Se agregan los DSV DESCUENTOS 'Se agregan los DSV DESCUENTOS
ImporteMov = objVenta.Descuento ImporteMov = objVenta.Descuento
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", CveConceptoDSV, " ", objVenta.Fecha, IdCtaContDSV, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", CveConceptoDSV, " ", objVenta.Fecha, IdCtaContDSV, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov) Then
ErrorMovtosDSV = True ErrorMovtosDSV = True
End If End If
End If End If
@@ -998,7 +999,7 @@ Public Class WS_PuntoVenta
'Se agregan las CxC 'Se agregan las CxC
ImporteMov = objVenta.Total - TotalPagado ImporteMov = objVenta.Total - TotalPagado
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", CveConceptoAfectacion, " ", objVenta.Fecha, IdCtaContClientes, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", CveConceptoAfectacion, " ", objVenta.Fecha, IdCtaContClientes, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov) Then
ErrorMovtosCxC = True ErrorMovtosCxC = True
End If End If
End If End If
@@ -1006,7 +1007,8 @@ Public Class WS_PuntoVenta
'Si hubo un pago agregarlo 'Si hubo un pago agregarlo
ImporteMov = TotalPagado ImporteMov = TotalPagado
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", 2, " ", objVenta.Fecha, IdCtaContClientes, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, " ", 2, " ", objVenta.Fecha, IdCtaContClientes, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov) Then
ErrorMovtosCxC = True ErrorMovtosCxC = True
End If End If
End If End If
@@ -1014,7 +1016,11 @@ Public Class WS_PuntoVenta
'Se agregan el Traslado de IVA 'Se agregan el Traslado de IVA
ImporteMov = objVenta.IVA ImporteMov = objVenta.IVA
If ImporteMov <> 0 Then If ImporteMov <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, " ", CveConceptoIVA, " ", objVenta.Fecha, 0, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then Dim PorcentajeImpuesto = 0
If objVenta.SubTotal > 0 Then
PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal)
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, " ", CveConceptoIVA, " ", objVenta.Fecha, 0, -1, CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, ImporteMX:=ImporteMov, PorcentajeImpuesto:=PorcentajeImpuesto) Then
ErrorMovtosTrasladoIVA = True ErrorMovtosTrasladoIVA = True
End If End If
End If End If
@@ -1238,7 +1244,7 @@ Public Class WS_PuntoVenta
Try Try
CvePrePoliza = ObjMov.AddPrePolizas("Banc", CvePlantillaPoliza, Importe, Importe, Moneda, Fecha, "", CveUsuario, CveEmpresa) CvePrePoliza = ObjMov.AddPrePolizas("Banc", CvePlantillaPoliza, Importe, Importe, Moneda, Fecha, "Punto de venta IE", CveUsuario, CveEmpresa)
'valida prepoliza 'valida prepoliza
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
@@ -1252,9 +1258,9 @@ Public Class WS_PuntoVenta
If CveIE > 0 Then If CveIE > 0 Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", CveConceptoContable, " ", Now, 0, -1, CveIE) Then If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", CveConceptoContable, " ", Now, 0, -1, CveIE, ImporteMX:=Importe) Then
Dim IVA As Double = 0 Dim IVA As Double = 0
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe - IVA - CIF, "", CveConceptoCompra, " ", Now, 0, -1, CveIE) Then If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe - IVA - CIF, "", CveConceptoCompra, " ", Now, 0, -1, CveIE, ImporteMX:=Importe - IVA - CIF) Then
Else Else
MsgError = "no se pudo insertar el detalle de la póliza2" MsgError = "no se pudo insertar el detalle de la póliza2"

View File

@@ -2921,6 +2921,24 @@ Namespace Extensiones
Return Retorno Return Retorno
End Function End Function
Public Function ContabilizaMovimientoAlmacen(ByRef ObjConta As ClsContabilidad, Fecha As Date, Concepto As String, Modulo As String, CveMovimientoSalida As Integer, CveMovimientoEntrada As Integer, Importe As Decimal, CveUsuario As Integer, CveEmpresa As Integer, Contabilizable As Boolean) As Integer
Dim Retorno As Integer = -1
Dim ErrorMovInv As Boolean = False
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas(Modulo, 53, 0, 0, 1, Fecha, Concepto, CveUsuario, CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
If Not ErrorMovInv Then Retorno = CvePrePoliza
Return Retorno
End Function
#End Region #End Region
#Region "GPS" #Region "GPS"

View File

@@ -10,7 +10,27 @@ Imports System.IO
Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "text/plain" If context.Request("metodo").ToString() = "GetTokenAngular" Then
'context.Response.ContentType = "application/json; charset=utf-8"
context.Response.ContentType = "text/json"
Dim origin As String = context.Request.UrlReferrer.ToString()
context.Response.AddHeader("Access-Control-Allow-Origin", origin.Substring(0, origin.Length - 1))
'context.Response.AddHeader("Access-Control-Allow-Origin", "http://localhost:4200")
'context.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST")
context.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept")
context.Response.AddHeader("Access-Control-Allow-Credentials", "true")
context.Response.StatusCode = 200
Dim key As String = GetTokenAngular(context)
Dim json As String = JsonConvert.SerializeObject(key)
context.Response.Write(json)
context.Response.Flush()
context.Response.Close()
context.Response.End()
Else
context.Response.ContentType = "text/plain"
End If
Try Try
Select Case context.Request("metodo") Select Case context.Request("metodo")
Case "getps" Case "getps"
@@ -53,13 +73,27 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
context.Response.Write(sendMail(context)) context.Response.Write(sendMail(context))
Case "sendMailLPM" Case "sendMailLPM"
context.Response.Write(sendMailLPM(context)) context.Response.Write(sendMailLPM(context))
End Select End Select
Catch ex As Exception Catch ex As Exception
ex.GuardaLog(ex.Message) ex.GuardaLog(ex.Message)
End Try End Try
End Sub End Sub
Private Function GetTokenAngular(context As HttpContext) As String
Dim usuario As Usuario = UsuarioActual(context)
Dim tokenDescriptor = New Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor With {
.Subject = New System.Security.Claims.ClaimsIdentity(New System.Security.Claims.Claim() {New System.Security.Claims.Claim("CvePlataforma", usuario.CvePlataforma.ToString()),
New System.Security.Claims.Claim("CveUsuario", usuario.CveUsuario.ToString()), New System.Security.Claims.Claim("CveEmpresa", usuario.CveEmpresa.ToString()),
New System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), New System.Security.Claims.Claim("Fecha", Date.Now.ToLongDateString())}),
.Expires = Date.UtcNow.AddHours(3),
.SigningCredentials = New Microsoft.IdentityModel.Tokens.SigningCredentials(
New Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.ASCII.GetBytes("*_AsistenciaDesarrolloSistemas-SIGAPI_*17-06-2020")),
Microsoft.IdentityModel.Tokens.SecurityAlgorithms.HmacSha256Signature)}
Dim tokenHandler = New System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler()
Dim newtoken = tokenHandler.CreateToken(tokenDescriptor)
Dim stokenn As String = tokenHandler.WriteToken(newtoken)
Return stokenn
End Function
Private Function sendMailLPM(context As HttpContext) As String Private Function sendMailLPM(context As HttpContext) As String
Dim retorno As String = "true" Dim retorno As String = "true"
Dim nombre As String = "" Dim nombre As String = ""

View File

@@ -120,6 +120,9 @@
<asp:ListItem Text="Moneda" Value="2"></asp:ListItem> <asp:ListItem Text="Moneda" Value="2"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</li> </li>
<li>Cuenta:&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Textbox runat="server" ID="TxtCuenta" Width="120px"/>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@@ -56,7 +56,9 @@ Partial Class Bancos_RepCxCCliente
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1" If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1"
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1" If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
If Mov.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then Dim Cuenta As String = If(TxtCuenta.Text = "", "-1", TxtCuenta.Text)
If Mov.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue.ToEntero, UsuarioActual.CveUsuario, Cuenta:=Cuenta) Then
GvCxC.DataSource = Mov.DtResultados GvCxC.DataSource = Mov.DtResultados
End If End If
UsuarioActual.Sesion("CobroCliente-Sucursal") = DdlSubProyecto.SelectedValue UsuarioActual.Sesion("CobroCliente-Sucursal") = DdlSubProyecto.SelectedValue
@@ -139,7 +141,7 @@ Partial Class Bancos_RepCxCCliente
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1" If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
Dim CveCliente = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1) Dim CveCliente = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1)
If ObjMovtos.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then If ObjMovtos.GetCxCCliente(CveCliente, FechaI, FechaF, DdlMoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, Cuenta:=TxtCuenta.Text) Then
DTpp = ObjMovtos.DtResultados DTpp = ObjMovtos.DtResultados
Else Else
DTpp = Nothing DTpp = Nothing

Binary file not shown.

Binary file not shown.

View File

@@ -6698,8 +6698,15 @@ Partial Class Compras_Compras
End If End If
Next Next
'obtengo si hay servicios
Dim CostosIndirectosTardados As Decimal = TmpDT.SUMD("Total", "ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 And ISNULL(CveTipoPS,0) = 1")
'consideracion, si la oc, se le agrego un servicio y este no se cargo en la entrada al almacen.
If CostoIndirectoAcum176 = 0 AndAlso CostosIndirectosTardados > 0 Then
CostosIndirectosTardados = CostosIndirectosTardados * TCO
End If
'calcula la diferencia entre lo recibido por la OC, considerando costos indirectos y lo que se ingresaria en la compra 'calcula la diferencia entre lo recibido por la OC, considerando costos indirectos y lo que se ingresaria en la compra
SumatoriaOCINV = SumatoriaInventario - (TmpDT.SUMD("Total") * TCO).RoundSQL 'sumatoria de la factura SumatoriaOCINV = SumatoriaInventario - (TmpDT.SUMD("Total") * TCO).RoundSQL + CostosIndirectosTardados 'sumatoria de la factura
If SumatoriaOCINV.RoundSQL <> 0 Then If SumatoriaOCINV.RoundSQL <> 0 Then
' se abona el costo, cambiamos su naturaleza ' se abona el costo, cambiamos su naturaleza
'SumatoriaOCINV = -SumatoriaOCINV 'SumatoriaOCINV = -SumatoriaOCINV
@@ -17669,7 +17676,7 @@ Partial Class Compras_Compras
ViewState("IVAPS") = Drr("IVA").ToString().ToDouble() ViewState("IVAPS") = Drr("IVA").ToString().ToDouble()
DdlProyecto.SelectedValueExist(Drr("CveProyecto")) DdlProyecto.SelectedValueExist(Drr("CveProyecto"))
'DdlIVA.Enabled = True DdlIVA.Enabled = True
If Not Modalidad = "U" Then If Not Modalidad = "U" Then
@@ -17989,13 +17996,13 @@ Partial Class Compras_Compras
Row("IEPSPSPorcentaje") = PorcentajeIEPS Row("IEPSPSPorcentaje") = PorcentajeIEPS
Else Else
'If DdlIVA.SelectedValue.ToDouble = 0 Then Row("IVA") = 0 Else Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos) 'If DdlIVA.SelectedValue.ToDouble = 0 Then Row("IVA") = 0 Else Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos)
Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos) Row("IVA") = Math.Round(IVA * Total, 2)
Row("IVAPorcentaje") = IVA Row("IVAPorcentaje") = IVA
Row("RetIVA") = Math.Round(RetIVA * Total, DecimalesPermitidos) Row("RetIVA") = Math.Round(RetIVA * Total, 2)
Row("RetIVAPorcentaje") = RetIVA Row("RetIVAPorcentaje") = RetIVA
Row("RetISR") = Math.Round(RetISR * Total, DecimalesPermitidos) Row("RetISR") = Math.Round(RetISR * Total, 2)
Row("RetISRPorcentaje") = RetISR Row("RetISRPorcentaje") = RetISR
Row("IEPSPS") = Math.Round(IEPSPS * Total, DecimalesPermitidos) Row("IEPSPS") = Math.Round(IEPSPS * Total, 2)
Row("IEPSPSPorcentaje") = IEPSPS Row("IEPSPSPorcentaje") = IEPSPS
End If End If
Row("ImporteConImpuestos") = (Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble) + Row("IVA").ToString.ToDouble + Row("IEPSPS").ToString.ToDouble - (Row("RetIVA").ToString.ToDouble + Row("RetISR").ToString.ToDouble) Row("ImporteConImpuestos") = (Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble) + Row("IVA").ToString.ToDouble + Row("IEPSPS").ToString.ToDouble - (Row("RetIVA").ToString.ToDouble + Row("RetISR").ToString.ToDouble)

View File

@@ -214,7 +214,7 @@
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Left" /> <ItemStyle HorizontalAlign="Left" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Importe"> <asp:TemplateField HeaderText="Importe" ItemStyle-Width="125px">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal> <asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
@@ -555,7 +555,7 @@
<hr style="border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));" /> <hr style="border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));" />
<asp:GridView ID="GVPDocumentosRelacionadosPagos" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD mysmallbtn" <asp:GridView ID="GVPDocumentosRelacionadosPagos" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD mysmallbtn"
DataKeyNames="CveFactura,CveCompra,CveIE,Fecha,FechaPago" DataKeyNames="CveFactura,CveCompra,CveIE,Fecha,FechaPago,ImpPagado,CvePrePolizaDetalle"
data-sort="true" Width="100%" EmptyDataText="No se encontró registros con la información del complemento de pago" data-sort="true" Width="100%" EmptyDataText="No se encontró registros con la información del complemento de pago"
ShowHeaderWhenEmpty="true" AutoGenerateColumns="False"> ShowHeaderWhenEmpty="true" AutoGenerateColumns="False">
<Columns> <Columns>
@@ -571,6 +571,13 @@
<asp:BoundField DataField="FechaPago" HeaderText="Fecha Pago" ItemStyle-HorizontalAlign="center" DataFormatString="{0:d}" /> <asp:BoundField DataField="FechaPago" HeaderText="Fecha Pago" ItemStyle-HorizontalAlign="center" DataFormatString="{0:d}" />
<asp:BoundField DataField="ImportePago" HeaderText="Importe Pago" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" /> <asp:BoundField DataField="ImportePago" HeaderText="Importe Pago" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<asp:Label ID="LblCveIE" runat="server" />
<asp:Label ID="LblCvePrePolizaDetalle" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -2697,17 +2697,36 @@ Partial Class Compras_eFacturas
namespaces.AddNamespace(XMLDoc.DocumentElement.Prefix, "http://www.sat.gob.mx/cfd/3") namespaces.AddNamespace(XMLDoc.DocumentElement.Prefix, "http://www.sat.gob.mx/cfd/3")
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital") namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
namespaces.AddNamespace("pago10", "http://www.sat.gob.mx/Pagos")
' namespaces.AddNamespace("pago10", "http://www.sat.gob.mx/Pagos")
nodeComp = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", XMLDoc.DocumentElement.Prefix), namespaces) nodeComp = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", XMLDoc.DocumentElement.Prefix), namespaces)
nodeaGral = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante", XMLDoc.DocumentElement.Prefix), namespaces) nodeaGral = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante", XMLDoc.DocumentElement.Prefix), namespaces)
nodeTFD = nodeComp.SelectSingleNode(String.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces) nodeTFD = nodeComp.SelectSingleNode(String.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces)
nodePagos = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos/{0}:Pago", "pago10"), namespaces)
nodePagos2 = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos", "pago10"), namespaces)
'Monto = ValorXML(nodePagos, "Monto").ToDecimal
Dim nodePago As XmlNodeList = nodePagos.SelectNodes(String.Format("//{0}:DoctoRelacionado", "pago10"), namespaces) Dim PrefijoPagos As String = ""
For Each nodoPrefijo As XmlNode In nodeComp.ChildNodes
If nodoPrefijo.Prefix <> "tfd" Then
PrefijoPagos = nodoPrefijo.Prefix
End If
Next
namespaces.AddNamespace(PrefijoPagos, "http://www.sat.gob.mx/Pagos")
nodeComp = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", XMLDoc.DocumentElement.Prefix), namespaces)
nodePagos = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos/{0}:Pago", PrefijoPagos), namespaces)
nodePagos2 = nodeComp.SelectSingleNode(String.Format("//{0}:Pagos", PrefijoPagos), namespaces)
' Dim nodePago As XmlNodeList = nodePagos.SelectNodes(String.Format("//{0}:DoctoRelacionado", "pago10"), namespaces)
SeriePago = ValorXML(nodeaGral, "Serie") SeriePago = ValorXML(nodeaGral, "Serie")
FolioPago = ValorXML(nodeaGral, "Folio") FolioPago = ValorXML(nodeaGral, "Folio")
@@ -2735,11 +2754,12 @@ Partial Class Compras_eFacturas
DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date)) DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date))
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer)) DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra") DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
Dim nodePagosN As XmlNodeList Dim nodePagosN As XmlNodeList
nodePagosN = nodeComp.SelectNodes(String.Format("//{0}:Pagos", "pago10"), namespaces) nodePagosN = nodeComp.SelectNodes(String.Format("//{0}:Pagos", PrefijoPagos), namespaces)
@@ -2775,7 +2795,7 @@ Partial Class Compras_eFacturas
Dim ObjCompraFolios As New ClsCompras Dim ObjCompraFolios As New ClsCompras
If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa, OP:=If(CveComplementoPagoCompra > 0, 2, 1), CveFactura:=CveFacturaComplemento) Then If ObjCompraFolios.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace($"{PrefijoPagos}:", ""), UsuarioActual.CveEmpresa, OP:=If(CveComplementoPagoCompra > 0, 2, 1), CveFactura:=CveFacturaComplemento) Then
' '
'.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then '.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then
If ObjCompraFolios.DtResultados.Rows.Count > 0 Then If ObjCompraFolios.DtResultados.Rows.Count > 0 Then
@@ -2789,7 +2809,7 @@ Partial Class Compras_eFacturas
dRow2("CveFactura") = drow("CveFactura").ToString.ToEntero dRow2("CveFactura") = drow("CveFactura").ToString.ToEntero
dRow2("CveMetodoPago") = drow("CveMetodoPago").ToString.ToEntero dRow2("CveMetodoPago") = drow("CveMetodoPago").ToString.ToEntero
dRow2("SerieFolioCompra") = drow("SerieFolioCompra").ToString dRow2("SerieFolioCompra") = drow("SerieFolioCompra").ToString
dRow2("CvePrePolizaDetalle") = drow("CvePrePolizaDetalle").ToString
If drow("CveIE").ToString.ToEntero > 0 Then If drow("CveIE").ToString.ToEntero > 0 Then
@@ -2860,7 +2880,7 @@ Partial Class Compras_eFacturas
Dim TieneRegistros As Boolean = False Dim TieneRegistros As Boolean = False
If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", "").Replace("pagos10:", ""), UsuarioActual.CveEmpresa) Then
GvVincularPago.DataSource = ObjCompras.DtResultados GvVincularPago.DataSource = ObjCompras.DtResultados
If ObjCompras.DtResultados.Rows.Count > 0 Then If ObjCompras.DtResultados.Rows.Count > 0 Then
@@ -2906,6 +2926,9 @@ Partial Class Compras_eFacturas
End If End If
Next Next
If MSGComplemento.Trim.Length > 0 Then If MSGComplemento.Trim.Length > 0 Then
' BtnVincularPago.Visible = False ' BtnVincularPago.Visible = False
ViculacionConPUE = True ViculacionConPUE = True
@@ -2954,11 +2977,30 @@ Partial Class Compras_eFacturas
GvVincularPago.DataBind() GvVincularPago.DataBind()
UpVincularPago.Update()
ListaComprasPUE = ListaComprasPUEInterna ListaComprasPUE = ListaComprasPUEInterna
If DivVincularPagoManualmente.Visible Then
For Each GvRowValidaCompra As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If GvRowValidaCompra.DataKey("CveCompra").ToEntero > 0 Then
DivVincularPagoManualmente.Visible = True
Exit For
Else
DivVincularPagoManualmente.Visible = False
End If
Next
End If
UpVincularPago.Update()
RegistraScript("$('#ModalVincularPago').modal('show')", "VincularPagoModalShow") RegistraScript("$('#ModalVincularPago').modal('show')", "VincularPagoModalShow")
End Sub End Sub
@@ -2982,13 +3024,27 @@ Partial Class Compras_eFacturas
ObjCompra.IniciaTransacSQL() ObjCompra.IniciaTransacSQL()
For Each Gv As GridViewRow In GvVincularPago.Rows For Each Gv As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("Monto").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then If HdnCveIE.Value.ToEntero > 0 Then
TieneError = True If Gv.DataKey("CveCompra").ToEntero > 0 And Gv.FCLabel("LblCveIE").Text.ToEntero > 0 Then
If Not ObjCompra.AddComplementoPago(Gv.FCLabel("LblCveIE").Text.ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.FCLabel("LblCvePrePolizaDetalle").Text.ToEntero, CveFacturaPago) > 0 Then
TieneError = True
Exit For
End If
End If
Else
If Gv.DataKey("CveCompra").ToEntero > 0 Then
If Not ObjCompra.AddComplementoPago(Gv.DataKey("CveIE").ToEntero, Gv.DataKey("CveCompra").ToEntero, Gv.DataKey("ImpPagado").ToDecimal, Gv.DataKey("CvePrePolizaDetalle").ToEntero, CveFacturaPago) > 0 Then
TieneError = True
Exit For
End If
End If
End If End If
Next Next
If Not TieneError AndAlso Not ObjCompra.AddVincularPago(CveFacturaPago) Then If Not TieneError AndAlso Not ObjCompra.AddVincularPago(CveFacturaPago) Then
@@ -3001,6 +3057,7 @@ Partial Class Compras_eFacturas
If ViculacionConPUE Then If ViculacionConPUE Then
For Each CveCompraVinculada In ListaComprasPUE For Each CveCompraVinculada In ListaComprasPUE
objEventos.AddEventoBitacora($"Complemento { ComplementoConPUE } vinculado manualmente (Compra PUE) ", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompraVinculada) objEventos.AddEventoBitacora($"Complemento { ComplementoConPUE } vinculado manualmente (Compra PUE) ", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompraVinculada)
Next Next
@@ -3020,6 +3077,8 @@ Partial Class Compras_eFacturas
ObjCompra.Commit() ObjCompra.Commit()
HdnCveIE.Value = ""
Alert("El pago fue vinculado correctamente", TipoMensaje.MsgInformacion) Alert("El pago fue vinculado correctamente", TipoMensaje.MsgInformacion)
RegistraScript("$('#ModalVincularPago').modal('hide')", "VincularPagoModalHide") RegistraScript("$('#ModalVincularPago').modal('hide')", "VincularPagoModalHide")
CargaDatos() CargaDatos()
@@ -3042,33 +3101,83 @@ Partial Class Compras_eFacturas
End Sub End Sub
Protected Sub BtnVincularManualmente_Click(sender As Object, e As EventArgs) Protected Sub BtnVincularManualmente_Click(sender As Object, e As EventArgs)
If HdnCveIE.Value <> "-1" AndAlso IsNumeric(HdnCveIE.Value) AndAlso HdnCveIE.Value.ToEntero > 0 Then If HdnCveIE.Value <> "-1" AndAlso IsNumeric(HdnCveIE.Value) AndAlso HdnCveIE.Value.ToEntero > 0 Then
Dim ImportePago As Double = 0 Dim ImportePago As Double = 0
Dim ImporteIES As Double = 0 Dim ImporteIES As Double = 0
Dim SerieFolioIE As String = "" Dim SerieFolioIE As String = ""
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
Dim ErrorVinculacion = True
If ObjCompras.GetCompararComplementoPago(CveProveedor, -1, "", UsuarioActual.CveEmpresa, HdnCveIE.Value.ToEntero) Then If ObjCompras.GetCompararComplementoPago(CveProveedor, -1, "", UsuarioActual.CveEmpresa, HdnCveIE.Value.ToEntero) Then
GvVincularPago.DataSource = ObjCompras.DtResultados
If ObjCompras.DtResultados.Rows.Count > 0 Then 'GvVincularPago.DataSource = ObjCompras.DtResultados
SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString
End If 'If ObjCompras.DtResultados.Rows.Count > 0 Then
ImportePago = ObjCompras.DtResultados.SUMD("Monto") ' SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString
'End If
'ImportePago = ObjCompras.DtResultados.SUMD("Monto")
For Each Drow As DataRow In ObjCompras.DtResultados.Rows
For Each GvRow As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If Drow("CveCompra").ToString.ToEntero = GvRow.DataKey("CveCompra").ToEntero Then
GvRow.FCLabel("LblCveIE").Text = Drow("CveIE").ToString.ToEntero.ToString
GvRow.FCLabel("LblCvePrePolizaDetalle").Text = Drow("CvePrePolizaDetalle").ToString.ToEntero.ToString
End If
End If
Next
Next
For Each GvRow As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCLabel("LblCveIE").Text.ToEntero > 0 And GvRow.FCLabel("LblCvePrePolizaDetalle").Text.ToEntero > 0 Then
ErrorVinculacion = False
Exit For
Else
ErrorVinculacion = True
End If
End If
Next
Else
ErrorVinculacion = True
End If End If
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe") If Not ErrorVinculacion Then
ObjCompras.Dispose() ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
ObjCompras.Dispose()
BtnVincularPago.Visible = True BtnVincularPago.Visible = True
LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
LblImportePago.Text = ImportePago.FormatoNumero
'LblSerieFolioIE.Text = SerieFolioIE
LblImporteIE.Text = ImporteIES.FormatoNumero
GvVincularPago.DataBind()
UpVincularPago.Update()
ObjCompras.Dispose()
Else
Alert("No se pudo realizar la vinculacion manual", TipoMensaje.MsgAdvertencia)
End If
LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}"
LblImportePago.Text = ImportePago.FormatoNumero
'LblSerieFolioIE.Text = SerieFolioIE
LblImporteIE.Text = ImporteIES.FormatoNumero
GvVincularPago.DataBind()
UpVincularPago.Update()
ObjCompras.Dispose()
End If End If
End Sub End Sub
Private Sub GVPDocumentosRelacionadosPagos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GVPDocumentosRelacionadosPagos.RowCreated Private Sub GVPDocumentosRelacionadosPagos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GVPDocumentosRelacionadosPagos.RowCreated

View File

@@ -3,12 +3,12 @@
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
.truncate2 { .truncate2 {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width:100px; max-width: 100px;
} }
</style> </style>
</asp:Content> </asp:Content>
@@ -16,21 +16,21 @@
Reporte de Impuestos Reporte de Impuestos
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li> <li>
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton> <asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton> <asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li> </li>
<li> <li>
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink> <asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
</li> </li>
<asp:UpdatePanel runat="server" ID="UpAccionesDIOT" UpdateMode="Conditional" > <asp:UpdatePanel runat="server" ID="UpAccionesDIOT" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="LnkAccionesDIOT" OnClick="LnkAccionesDIOT_Click" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Generar DIOT</asp:LinkButton> <asp:LinkButton ID="LnkAccionesDIOT" OnClick="LnkAccionesDIOT_Click" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Generar DIOT</asp:LinkButton>
</li> </li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
@@ -38,14 +38,14 @@
</Triggers> </Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
<li> <li>
<asp:LinkButton ID="LnkExcel2" OnClick="LnkExcel2_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generales del proveedor</asp:LinkButton> <asp:LinkButton ID="LnkExcel2" OnClick="LnkExcel2_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generales del proveedor</asp:LinkButton>
</li> </li>
<asp:UpdatePanel runat="server" ID="UPPCompara" UpdateMode="Conditional" > <asp:UpdatePanel runat="server" ID="UPPCompara" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="LnkModalCompara" OnClick="LnkModalCompara_Click" runat="server"><i class="fa fa-list-o" style="font-weight:bold;"></i> Comparativo</asp:LinkButton> <asp:LinkButton ID="LnkModalCompara" OnClick="LnkModalCompara_Click" runat="server"><i class="fa fa-list-o" style="font-weight:bold;"></i> Comparativo</asp:LinkButton>
</li> </li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
@@ -59,6 +59,8 @@
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" CssClass="btn btn-primary" /> <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" CssClass="btn btn-primary" />
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= chkexpand.Checked ? "collapse": "expand"%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div> </div>
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row"> <div class="row">
@@ -93,17 +95,23 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<label class="col-md-1 truncate">Tipo Movto:</label> <label class="col-md-1 truncate">Tipo Movto:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlTipoMovto" runat="server"> <asp:DropDownList ID="DdlTipoMovto" runat="server">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Conciliados" Value="1"></asp:ListItem> <asp:ListItem Text="Conciliados" Value="1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body magindate" <%= chkexpand.Checked ? "":"style='display:none;'"%>>
<div class="row">
<label class="col-md-1 truncate">Num. Cuenta</label>
<div class="col-md-2">
<asp:DropDownList runat="server" ID="DdlCuenta" CssClass="select2me" Width="240px" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" />
</div>
</div>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -112,134 +120,134 @@
<ContentTemplate> <ContentTemplate>
<ajax:TabContainer ID="TT" runat="server" ActiveTabIndex="0" Width="100%"> <ajax:TabContainer ID="TT" runat="server" ActiveTabIndex="0" Width="100%">
<ajax:TabPanel ID="TTr" runat="server" HeaderText="IVA Trasladado"> <ajax:TabPanel ID="TTr" runat="server" HeaderText="IVA Trasladado">
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<h4><b>IVA Trasladado</b></h4> <h4><b>IVA Trasladado</b></h4>
<asp:GridView ID="GvT" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVATrasladado_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false"> <asp:GridView ID="GvT" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVATrasladado_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
<Columns> <Columns>
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Folio" ControlStyle-Width="85px" /> <asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Folio" ControlStyle-Width="85px" />
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="RetIVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA Serv" DataField="RetIVAServicios" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="RetIVA Serv" DataField="RetIVAServicios" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="RetISR" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="F.Venta" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="F.Venta" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" /> <asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
<asp:HyperLinkField HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataTextField="Nombre" ControlStyle-CssClass="truncate2" /> <asp:HyperLinkField HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataTextField="Nombre" ControlStyle-CssClass="truncate2" />
<asp:HyperLinkField HeaderText="Folio Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataTextField="FolioIE" Target="_blank" /> <asp:HyperLinkField HeaderText="Folio Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataTextField="FolioIE" Target="_blank" />
<asp:BoundField HeaderText="Num. Cuenta" DataField="NumCuenta" ItemStyle-CssClass="truncate2" /> <asp:BoundField HeaderText="Num. Cuenta" DataField="NumCuenta" ItemStyle-CssClass="truncate2" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
<br /> <br />
<div class="row"> <div class="row">
<div id="DvTipo" class="col-md-6"> <div id="DvTipo" class="col-md-6">
<h4><b>IEPS por Porcentaje</b></h4> <h4><b>IEPS por Porcentaje</b></h4>
<asp:GridView ID="GvIEPSA" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false"> <asp:GridView ID="GvIEPSA" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false">
<Columns> <Columns>
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIEPS" /> <asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIEPS" />
<asp:BoundField HeaderText="Categoría" DataField="Categoria" /> <asp:BoundField HeaderText="Categoría" DataField="Categoria" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div>
<div class="col-md-6">
<h4><b>IVA por Porcentaje</b></h4>
<asp:GridView ID="GvIVAA" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</div> </div>
</div> <div class="col-md-6">
<br /> <h4><b>IVA por Porcentaje</b></h4>
<asp:GridView ID="GvIVAA" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
</ContentTemplate> </Columns>
</ajax:TabPanel> </asp:GridView>
</div>
</div>
<br />
<ajax:TabPanel ID="TA" runat="server" HeaderText="IVA Acreditable"> </ContentTemplate>
<ContentTemplate> </ajax:TabPanel>
<h4><b>IVA Acreditable</b></h4>
<asp:Label ID="LblMsgAcreditable" runat="server" Text="" ForeColor="Red"></asp:Label>
<asp:GridView ID="GvA" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVAAcreditable_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField HeaderText="Proveedor" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataTextField="RazonSocial" ControlStyle-CssClass="truncate2" />
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" HeaderText="Folio" />
<asp:BoundField HeaderText="SubTotal 16%" DataField="valorActos1516" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 8%" DataField="valorActosImp8" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 0%" DataField="valorActosImp0" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA ND" DataField="IVANoDeducible" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label ID="LblHRetIVAHon" data-toggle="tooltip" data-placement="top" ToolTip="Ret IVA Honorario/Serv. Prof." runat="server">RetIVA <br/>Hon/Ser.Prof.</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.F" HtmlEncode="False" DataField="RetIVAFletePF" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.M." HtmlEncode="False" DataField="RetIVAFletePM" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Arrenda." HtmlEncode="False" DataField="RetIVAArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Serv." HtmlEncode="False" DataField="RetIVAServicios" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR <br/> Honorario" HtmlEncode="False" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <ajax:TabPanel ID="TA" runat="server" HeaderText="IVA Acreditable">
<asp:BoundField HeaderText="RetISR <br/> Arrendamiento" HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <ContentTemplate>
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <h4><b>IVA Acreditable</b></h4>
<asp:BoundField HeaderText="F.Compra" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" /> <asp:Label ID="LblMsgAcreditable" runat="server" Text="" ForeColor="Red"></asp:Label>
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" /> <asp:GridView ID="GvA" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVAAcreditable_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField HeaderText="Proveedor" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataTextField="RazonSocial" ControlStyle-CssClass="truncate2" />
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" HeaderText="Folio" />
<asp:BoundField HeaderText="SubTotal 16%" DataField="valorActos1516" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 8%" DataField="valorActosImp8" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal 0%" DataField="valorActosImp0" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="%IVA" DataField="PorcentajeIVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA ND" DataField="IVANoDeducible" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label ID="LblHRetIVAHon" data-toggle="tooltip" data-placement="top" ToolTip="Ret IVA Honorario/Serv. Prof." runat="server">RetIVA <br/>Hon/Ser.Prof.</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.F" HtmlEncode="False" DataField="RetIVAFletePF" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Fletes P.M." HtmlEncode="False" DataField="RetIVAFletePM" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Arrenda." HtmlEncode="False" DataField="RetIVAArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetIVA <br/> Serv." HtmlEncode="False" DataField="RetIVAServicios" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="RetISR <br/> Honorario" HtmlEncode="False" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="RetISR <br/> Arrendamiento" HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="F.Compra" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS 6%" DataField="IEPS6" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IEPS 6%" DataField="IEPS6" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS 7%" DataField="IEPS7" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IEPS 7%" DataField="IEPS7" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS 9%" DataField="IEPS9" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%> <asp:BoundField HeaderText="IEPS 9%" DataField="IEPS9" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:HyperLinkField HeaderText="Folio Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataTextField="FolioIE" Target="_blank" /> <asp:HyperLinkField HeaderText="Folio Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataTextField="FolioIE" Target="_blank" />
<asp:BoundField HeaderText="Num. Cuenta" DataField="NumCuenta" ItemStyle-CssClass ="truncate2"/> <asp:BoundField HeaderText="Num. Cuenta" DataField="NumCuenta" ItemStyle-CssClass="truncate2" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
<div class="row"> <div class="row">
<h4><b>IVA por Porcentaje</b></h4> <h4><b>IVA por Porcentaje</b></h4>
<asp:GridView ID="GvIVA2" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false"> <asp:GridView ID="GvIVA2" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false">
<Columns> <Columns>
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" /> <asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -279,7 +287,7 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="ModalCompara" class="modal ADS fade" role="dialog"> <div id="ModalCompara" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpCompara" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpCompara" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="modal-content"> <div class="modal-content">
@@ -290,21 +298,21 @@
<div class="modal-body"> <div class="modal-body">
<asp:GridView ID="GvCompara" runat="server" GridLines="None" AutoGenerateColumns="False" EmptyDataText="" CssClass="table table-striped table-hover table-advance Widthall"> <asp:GridView ID="GvCompara" runat="server" GridLines="None" AutoGenerateColumns="False" EmptyDataText="" CssClass="table table-striped table-hover table-advance Widthall">
<Columns> <Columns>
<asp:BoundField DataField="Msg" HeaderText="Mensaje" /> <asp:BoundField DataField="Msg" HeaderText="Mensaje" />
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" /> <asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" /> <asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" /> <asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" />
<asp:HyperLinkField DataTextField="CvePrePoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" DataNavigateUrlFields="CvePrePoliza" HeaderText="Prepoliza" /> <asp:HyperLinkField DataTextField="CvePrePoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" DataNavigateUrlFields="CvePrePoliza" HeaderText="Prepoliza" />
<asp:HyperLinkField DataTextField="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE" HeaderText="IE" /> <asp:HyperLinkField DataTextField="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE" HeaderText="IE" />
<asp:BoundField DataField="FechaAplicado" HeaderText="Fecha Aplicado" DataFormatString="{0:d}" /> <asp:BoundField DataField="FechaAplicado" HeaderText="Fecha Aplicado" DataFormatString="{0:d}" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
. .
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>

View File

@@ -66,6 +66,8 @@ public partial class Contabilidad_RepIVA : ClsPaginas
LnkAccionesDIOT.Visible = true; LnkAccionesDIOT.Visible = true;
DdlCuenta.DataSource = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:UsuarioActual.CveEmpresa, CveTipoCuenta:2);
DdlCuenta.DataBind();
} }
public void Consulta() public void Consulta()
@@ -75,24 +77,24 @@ public partial class Contabilidad_RepIVA : ClsPaginas
LblMsgAcreditable.Text = ""; // lbl de mensajes de negativos LblMsgAcreditable.Text = ""; // lbl de mensajes de negativos
ClsContabilidad ObjCont = new ClsContabilidad(); ClsContabilidad ObjCont = new ClsContabilidad();
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico)) if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveUsuario, DdlCuenta.SelectedValue.ToEntero(), Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
{ {
GvT.DataSource = ObjCont.DtResultados; GvT.DataSource = ObjCont.DtResultados;
DtIVATrasladado = ObjCont.DtResultados; DtIVATrasladado = ObjCont.DtResultados;
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{ {
GvIEPSA.DataSource = ObjCont.DtResultados; GvIEPSA.DataSource = ObjCont.DtResultados;
DtIEPSA = ObjCont.DtResultados; DtIEPSA = ObjCont.DtResultados;
} }
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 2, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{ {
GvIVAA.DataSource = ObjCont.DtResultados; GvIVAA.DataSource = ObjCont.DtResultados;
DtIVAA = ObjCont.DtResultados; DtIVAA = ObjCont.DtResultados;
} }
} }
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico)) if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, DdlCuenta.SelectedValue.ToEntero(), Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
{ {
GvA.DataSource = ObjCont.DtResultados; GvA.DataSource = ObjCont.DtResultados;
DtIVAAcreditable = ObjCont.DtResultados; DtIVAAcreditable = ObjCont.DtResultados;
@@ -102,7 +104,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
} }
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{ {
GvIVA2.DataSource = ObjCont.DtResultados; GvIVA2.DataSource = ObjCont.DtResultados;
} }
@@ -276,7 +278,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
StringBuilder SBDIOT = new StringBuilder(); StringBuilder SBDIOT = new StringBuilder();
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero(); int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico)) if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
{ {
foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0) foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0)
@@ -352,7 +354,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero(); int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
if (Objconta.GetRepIVAComparativo(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa )) if (Objconta.GetRepIVAComparativo(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa ))
{ {
GvCompara.DataSource = Objconta.DtResultados; GvCompara.DataSource = Objconta.DtResultados;
} }

File diff suppressed because it is too large Load Diff

View File

@@ -44,7 +44,13 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
<ajax:TabPanel ID="TabAvance" runat="server" HeaderText="Avance">
<ContentTemplate>
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
@@ -70,8 +76,15 @@
</div> </div>
</div> </div>
</div> </div>
<div class="text-right">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<div class="row">
<div class="col-md-1" style="text-align:right!important">
Fecha:
</div>
<div class="col-md-4">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox> <asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
@@ -83,11 +96,20 @@
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<a class="linkfile" id="btnanexogral" runat="server" > </div>
<div class="col-md-6" style="text-align:right">
<a class="linkfile" id="btnanexogral" runat="server" >
<span class="btn btn-circle btn-sm btn-success"><i class='fa fa-plus'></i></span>Agregar <span class="btn btn-circle btn-sm btn-success"><i class='fa fa-plus'></i></span>Agregar
<asp:TextBox ID="AnexoGral" Text='' runat="server"></asp:TextBox> <asp:TextBox ID="AnexoGral" Text='' runat="server"></asp:TextBox>
</a> </a>
</div>
</div> </div>
<br />
<table class="table table-striped Widthall"> <table class="table table-striped Widthall">
<tr> <tr>
<th style="width: 300px;"></th> <th style="width: 300px;"></th>
@@ -107,13 +129,18 @@
<th style="text-align: right;">Anexo</th> <th style="text-align: right;">Anexo</th>
</tr> </tr>
</table> </table>
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
<div class="row">
<div class="col-md-12">
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance" DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
CssClass="table GVEstimacion table-advance table-hover" GridLines="None"> CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
<Columns> <Columns>
<asp:TemplateField HeaderText=""> <asp:TemplateField HeaderText="">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:LinkButton> <asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad"> <asp:TemplateField HeaderText="Cantidad">
@@ -148,28 +175,218 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText=" "> <asp:TemplateField HeaderText=" ">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" /> <asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
<a class="btn btn-circle btn-sm btn-success hidden linkfile"> <asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
<%-- <a class="btn btn-circle btn-sm btn-success hidden linkfile">
<i class='fa fa-plus'></i><asp:TextBox ID="TXTAnexo" CssClass="hidden" runat="server"></asp:TextBox> <i class='fa fa-plus'></i><asp:TextBox ID="TXTAnexo" CssClass="hidden" runat="server"></asp:TextBox>
</a> </a>--%>
</ItemTemplate>
</asp:TemplateField>
</Columns> <div runat="server" id="ModalAnexoEvidencia" class="modal ADS fade" role="dialog">
</asp:GridView> <div class="modal-dialog">
<div class="text-center"><asp:Button id="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" /></div>
<asp:GridView ID="GvAnexos" AutoGenerateColumns="false" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron archivos"> <!-- Modal content-->
<Columns> <div class="modal-content">
<asp:TemplateField HeaderText="Archivo"> <div class="modal-header ">
<ItemTemplate> <button type="button" class="close" data-dismiss="modal">&times;</button>
<asp:HyperLink ID="HPLArchivo" runat="server"></asp:HyperLink> <h4 class="modal-title">Cargar Evidencia</h4>
</div>
<div class="modal-body">
<div style="text-align:left">
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div>
</div>
<div class="text-center">
<asp:Button id="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpGuardar" />
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabEstimación" runat="server" HeaderText="Estimación">
<ContentTemplate>
<asp:UpdatePanel runat="server" ID="UpEstimaciones" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultarEstimaciones" runat="server" Text="Consultar" class="btn btn-default" />
</div>
<div class="titlefiltros caption" style="position: relative;">
<asp:UpdatePanel class="row" ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<label class="col-md-1 truncate">Contrato:</label>
<div class="col-md-6 col-lg-4">
<div class="ddls">
<asp:DropDownList ID="DDlContratosEstimaciones" runat="server" AutoPostBack="true" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
</asp:DropDownList>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
DataKeyNames="CveContratoAvance,CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<span><%# Eval("Cantidad", "{0:N2}")%></span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<span><%# Eval("Importe", "{0:N2}")%></span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText=" ">
<ItemTemplate>
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
<div runat="server" id="ModalAnexoEvidencia" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Cargar Evidencia</h4>
</div>
<div class="modal-body">
<div style="text-align:left">
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="text-center">
<asp:Button id="BtnGuardarEstimacion" CssClass="btn btn-primary" runat="server" Text="Generar Estimacion" Visible="false"/>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
<div class="modal fade " id="dropmodal"> <div class="modal fade " id="dropmodal">
<div class="modal-dialog"> <div class="modal-dialog">
@@ -178,7 +395,7 @@
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Dropzone</span> <span class="caption-subject bold uppercase">Cargar Evidencia</span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
@@ -193,10 +410,71 @@
<div id="my-dropzone" class=""> <div id="my-dropzone" class="">
</div> </div>
</div> </div>
<div style="text-align: center!important">
<br />
<button id="btnCerrarModal" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
<br />
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div id="ModalAnexos" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpModalAnexos" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label runat="server" ID="LblTituloModalAnexo"></asp:Label></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12" style="text-align:center!important">
<asp:GridView ID="GvAnexos" AutoGenerateColumns="false" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron archivos" Width="100"
DataKeyNames="Archivo" CssClass="table GVEstimacion table-advance table-hover" GridLines ="None">
<Columns>
<asp:TemplateField HeaderText="Anexos">
<ItemTemplate>
<asp:LinkButton ID="LnkArchivo" runat="server" OnClick="LnkArchivo_Click"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script> <script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
<%--<script src="../Scripts/dropzone/dropzone.min.js"></script>--%> <%--<script src="../Scripts/dropzone/dropzone.min.js"></script>--%>
@@ -211,7 +489,7 @@
showmodalFile($(this).find('input').attr('id')); showmodalFile($(this).find('input').attr('id'));
}); });
Sys.Application.add_load(function (s, e) { Sys.Application.add_load(function (s, e) {
$(".linkfile").click(function () { $(".linkfile").click(function () {
showmodalFile($(this).find('input').attr('id')); showmodalFile($(this).find('input').attr('id'));
}); });
}); });
@@ -224,7 +502,8 @@
ADDropzone(obj); ADDropzone(obj);
$('#dropmodal').modal(); $('#dropmodal').modal();
} }
function ValidateCant(variable){ function ValidateCant(variable) {
var txt = $(variable); var txt = $(variable);
var max = txt.data('cantidad'); var max = txt.data('cantidad');
var value = parseInt(txt.val()); var value = parseInt(txt.val());
@@ -235,16 +514,24 @@
txt.val(0); txt.val(0);
} }
var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]'); var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]');
importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu'))); importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu')));
FormatoMoneda2(importe);
if (parseInt(txt.val()) > 0) { //FormatoMoneda2(importe);
$($(txt.parent()).parent()).find(".linkfile").removeClass("hidden");
} else { //if (parseInt(txt.val()) > 0) {
var ocultar = $($(txt.parent()).parent()).find(".linkfile");
if (!ocultar.hasClass("hidden")) { // $($(txt.parent()).parent()).find(".linkfile").removeClass("hidden");
ocultar.addClass("hidden");
} //} else {
}
// var ocultar = $($(txt.parent()).parent()).find(".linkfile");
// if (!ocultar.hasClass("hidden")) {
// ocultar.addClass("hidden");
// }
//}
} }
//); //);
</script> </script>

View File

@@ -34,6 +34,21 @@ Partial Class Contratos_ContratoAvance
ViewState("CveContrato") = value ViewState("CveContrato") = value
End Set End Set
End Property End Property
Private Property CveContratoEstimacion As Integer
Get
If ViewState("CveContratoEstimacion") Is Nothing Then
Return Nothing
Else
Return ViewState("CveContratoEstimacion").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveContratoEstimacion") = value
End Set
End Property
'fecha seleccionada del historico de avances 'fecha seleccionada del historico de avances
Private Property fecha As String Private Property fecha As String
Get Get
@@ -50,18 +65,27 @@ Partial Class Contratos_ContratoAvance
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
BtnGuardar.Visible = False BtnGuardar.Visible = False
btnanexogral.Visible = False btnanexogral.Visible = False
CargaContrato() CargaContrato()
End If End If
End Sub End Sub
#Region "Filtros" #Region "Filtros"
Private Sub CargaContrato() Private Sub CargaContrato()
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format("CveContratoTipo=4")) DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (4,30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
DdlContratos.DataBind() DdlContratos.DataBind()
DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (4,30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
DDlContratosEstimaciones.DataBind()
CargaddlAvance() CargaddlAvance()
End Sub End Sub
@@ -124,8 +148,10 @@ Partial Class Contratos_ContratoAvance
End Sub End Sub
Protected Sub GV_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles Gv.RowDataBound Protected Sub GV_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles Gv.RowDataBound
If e.Row.RowIndex > -1 Then If e.Row.RowIndex > -1 Then
e.Row.FCTextBox("TxtCantidad").Visible = (fecha = "") e.Row.FCTextBox("TxtCantidad").Visible = (fecha = "")
e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "") e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "")
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
e.Row.FCTextBox("TxtCantidad").Visible = False e.Row.FCTextBox("TxtCantidad").Visible = False
e.Row.FCLinkButton("LnkAnexo").Visible = False e.Row.FCLinkButton("LnkAnexo").Visible = False
@@ -140,9 +166,32 @@ Partial Class Contratos_ContratoAvance
e.Row.CssClass = "SubTotales3" e.Row.CssClass = "SubTotales3"
End If End If
End If End If
If e.Row.DataKey("CveContratoDetalle").ToEntero > 0 Then
Dim LnkAnexo As LinkButton = e.Row.FCLinkButton("LnkModalDropzone")
'LnkAnexo.Visible = True
Dim DVAnexo As Control = DirectCast(e.Row.FindControl("ModalAnexoEvidencia"), Control)
LnkAnexo.OnClientClick = $" $('#{DVAnexo.ClientID}').modal('show'); return false;"
If DdlAvances.SelectedIndex > 0 Then
LnkAnexo.Visible = False
Else
LnkAnexo.Visible = True
End If
End If
End If End If
End Sub End Sub
Protected Sub GetAnexos(sender As Object, e As System.EventArgs) Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
LblTituloModalAnexo.Text = "Anexo " & GvRow.DataKey("PS")
'Get the button that raised the event 'Get the button that raised the event
Dim btn As LinkButton = DirectCast(sender, LinkButton) Dim btn As LinkButton = DirectCast(sender, LinkButton)
Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow) Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
@@ -155,21 +204,48 @@ Partial Class Contratos_ContratoAvance
Else Else
GvAnexos.Visible = False GvAnexos.Visible = False
End If End If
objContrato.Dispose() objContrato.Dispose()
UpModalAnexos.Update()
RegistraScript("$('#ModalAnexos').modal('show');")
End Sub End Sub
Protected Sub GvAnexos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvAnexos.RowDataBound Protected Sub GvAnexos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvAnexos.RowDataBound
If e.Row.RowIndex > -1 Then If e.Row.RowIndex > -1 Then
Dim Archivo As String = e.Row.DBCampo("Archivo").ToString Dim Archivo As String = e.Row.DBCampo("Archivo").ToString
Dim start As Integer = Len(Archivo.Split("-"c)(0)) Dim start As Integer = Len(Archivo.Split("-"c)(0))
Dim link As HyperLink = e.Row.FCHyperLink("HPLArchivo") Dim LnkArchivo As LinkButton = e.Row.FCLinkButton("LnkArchivo")
link.Text = Archivo.Substring(start + 1)
link.NavigateUrl = String.Format("/Empresas/{0}/Contrato/{1}/Anexos/{2}", UsuarioActual.CveEmpresa, CveContrato, Archivo) LnkArchivo.Text = Archivo.Substring(start + 1)
'link.NavigateUrl = String.Format("/Empresas/{0}/Contrato/{1}/Anexos/{2}", UsuarioActual.CveEmpresa, CveContrato, Archivo)
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkArchivo)
End If End If
End Sub End Sub
Protected Sub LnkArchivo_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim Archivo As String = GvRow.DataKey("Archivo").ToString
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Disposition", $"attachment; filename={Archivo}")
Response.TransmitFile($"{UsuarioActual.Empresa.Ruta}\Contrato\{DdlContratos.SelectedValue.ToEntero}\Anexos\{Archivo}")
Response.End()
End Sub
#End Region #End Region
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
ObjContratos.IniciaTransacSQL() ObjContratos.IniciaTransacSQL()
Dim TieneError = False Dim TieneError = False
@@ -177,22 +253,29 @@ Partial Class Contratos_ContratoAvance
Dim Cantidad As Double Dim Cantidad As Double
Dim filesgral As List(Of Archivo) = AnexoGral.getfiles().Archivos Dim filesgral As List(Of Archivo) = AnexoGral.getfiles().Archivos
Dim guardarArchivos As New List(Of Archivo) Dim guardarArchivos As New List(Of Archivo)
For Each gvr As GridViewRow In Gv.Rows For Each gvr As GridViewRow In Gv.Rows
CveContratoDetalle = gvr.DataKey("CveContratoDetalle").ToEntero CveContratoDetalle = gvr.DataKey("CveContratoDetalle").ToEntero
If CveContratoDetalle > 0 Then If CveContratoDetalle > 0 Then
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDouble Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDouble
If Cantidad > 0 Then If Cantidad > 0 Then
If ObjContratos.AddContratosAvance(CveContratoDetalle, Cantidad, TxtFecha.Text.ToDateTime, UsuarioActual.CveUsuario) Then If ObjContratos.AddContratosAvance(CveContratoDetalle, Cantidad, TxtFecha.Text.ToDateTime, UsuarioActual.CveUsuario) Then
Dim CveContratoAvance As Integer = ObjContratos.DtResultados.Rows(0)("CveContratoAvance").ToString.ToEntero Dim CveContratoAvance As Integer = ObjContratos.DtResultados.Rows(0)("CveContratoAvance").ToString.ToEntero
Dim files As List(Of Archivo) = gvr.FCTextBox("TXTAnexo").getfiles().Archivos Dim files As List(Of Archivo) = gvr.FCTextBox("TXTAnexo").getfiles().Archivos
For Each fileItem As Archivo In filesgral 'For Each fileItem As Archivo In filesgral 'GENERAL
guardarArchivos.Add(fileItem) ' guardarArchivos.Add(fileItem)
If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then ' If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then
TieneError = True ' TieneError = True
Exit For ' Exit For
End If ' End If
Next 'Next
For Each fileItem As Archivo In files For Each fileItem As Archivo In files
guardarArchivos.Add(fileItem) guardarArchivos.Add(fileItem)
If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then If Not ObjContratos.AddContratosAvanceAnexo(CveContratoAvance, fileItem.filename, UsuarioActual.CveUsuario) Then
@@ -200,24 +283,28 @@ Partial Class Contratos_ContratoAvance
Exit For Exit For
End If End If
Next Next
Else Else
TieneError = True TieneError = True
Exit For Exit For
End If End If
End If End If
End If End If
Next Next
If TieneError Then If TieneError Then
ObjContratos.RollBack() ObjContratos.RollBack()
Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia) Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia)
Else Else
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato) Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
For Each fileItem As Archivo In filesgral For Each fileItem As Archivo In filesgral
fileItem.filename.filesMove(fileItem.filename, urlsave) fileItem.filename.FilesMove(fileItem.filename, urlsave)
Next Next
For Each fileItem As Archivo In guardarArchivos For Each fileItem As Archivo In guardarArchivos
fileItem.filename.filesMove(fileItem.filename, urlsave) fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extencion}", ""), urlsave)
Next Next
ObjContratos.Commit() ObjContratos.Commit()
Alert("se guardo Correctamente") Alert("se guardo Correctamente")
@@ -228,6 +315,115 @@ Partial Class Contratos_ContratoAvance
CargaDatosAvance() CargaDatosAvance()
End Sub End Sub
#Region "ESTIMACION"
Private Sub CargaAvancesParaEstimar()
CveContratoEstimacion = -1
Dim ObjContratos As New ClsContratos()
Dim DTEstimaciones As New DataTable
If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
DTEstimaciones = ObjContratos.DtResultados
CveContratoEstimacion = DDlContratosEstimaciones.SelectedValue.ToEntero
End If
ObjContratos.Dispose()
If DTEstimaciones.Rows.Count > 0 Then
GvEstimaciones.DataSource = DTEstimaciones
BtnGuardarEstimacion.Visible = True
Else
GvEstimaciones.DataSource = Nothing
BtnGuardarEstimacion.Visible = False
End If
GvEstimaciones.DataBind()
UpEstimaciones.Update()
End Sub
Private Sub BtnConsultarEstimaciones_Click(sender As Object, e As EventArgs) Handles BtnConsultarEstimaciones.Click
CargaAvancesParaEstimar()
End Sub
Private Sub GvEstimaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstimaciones.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then
If e.Row.DBCampo("CveFamilias").ToString.ToEntero = 0 Then
e.Row.CssClass = "SubTotales"
Else
e.Row.CssClass = "SubTotales2"
End If
Else
e.Row.CssClass = "SubTotales3"
End If
End If
End If
End Sub
Private Sub BtnGuardarEstimacion_Click(sender As Object, e As EventArgs) Handles BtnGuardarEstimacion.Click
Dim ObjContratos As New ClsContratos()
Dim ErrorProceso As Boolean = False
Dim NuemeroEstimacion As Integer = -1
ObjContratos.IniciaTransacSQL()
If ObjContratos.AddContratosAvanceEstimacion(CveContratoEstimacion, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
NuemeroEstimacion = ObjContratos.NumeroEstimacionNueva
For Each GvRow As GridViewRow In GvEstimaciones.Rows
If GvRow.DataKey("CveContratoAvance").ToEntero > 0 Then
If Not ObjContratos.UpdateContratosAvanceEstimacion(GvRow.DataKey("CveContratoAvance").ToEntero, ObjContratos.CveEstimacionNueva, UsuarioActual.CveEmpresa) Then
ErrorProceso = True
Exit For
End If
End If
Next
Else
ErrorProceso = True
End If
'AddContratosAvanceEstimacion
'UpdateContratosAvanceEstimacion
If Not ErrorProceso Then
ObjContratos.Commit()
Alert($"Estimación {NuemeroEstimacion} agregada correctamente.")
Else
ObjContratos.RollBack()
End If
ObjContratos.Dispose()
End Sub
#End Region
End Class End Class

View File

@@ -326,20 +326,40 @@
<ajax:ValidatorCalloutExtender ID="VCEDescripcionContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcionContrato" Width="300px" BehaviorID="_content_VCEDescripcionContrato"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEDescripcionContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcionContrato" Width="300px" BehaviorID="_content_VCEDescripcionContrato"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div id="trLicitacion" runat="server" class="row"> <div id="trLicitacion" runat="server" class="row">
<label class="col-md-2 truncate">Número Licitación:</label> <label class="col-md-2 truncate">Número Licitación:</label>
<div class="col-md-10"> <div class="col-md-10">
<asp:TextBox ID="TxtNumeroLicitacion" runat="server" MaxLength="70" Width="200px"></asp:TextBox> <asp:TextBox ID="TxtNumeroLicitacion" runat="server" MaxLength="70" Width="200px"></asp:TextBox>
</div> </div>
</div> </div>
<div class="row" id="TrProveedor" runat="server"> <div class="row" id="TrProveedor" runat="server">
<label class="col-md-2 truncate "> <label class="col-md-2 truncate ">
<asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label><div class="col-md-10"> <asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label>
<div class="col-md-10">
<asp:DropDownList ID="DdlContratista" runat="server" CssClass="input-sm form-control select2me" AppendDataBoundItems="True" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 350px !important;" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlContratista" runat="server" CssClass="input-sm form-control select2me" AppendDataBoundItems="True" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<div class="row" >
<label class="col-md-2 truncate ">
<asp:Label ID="LblCliente" runat="server" Text="Cliente:"></asp:Label></label>
<div class="col-md-10">
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row" style="display: none;"> <div class="row" style="display: none;">
<label class="col-md-2 truncate ">Ubicacion:</label> <label class="col-md-2 truncate ">Ubicacion:</label>
<div class="col-md-10"> <div class="col-md-10">
@@ -460,9 +480,7 @@
<div class="row" id="TrCliente" runat="server" visible="False"> <div class="row" id="TrCliente" runat="server" visible="False">
<label class="col-md-2 truncate"> <label class="col-md-2 truncate">
<asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label><div class="col-md-10"> <asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label><div class="col-md-10">
<asp:DropDownList ID="DdlCliente" AutoPostBack="True" OnSelectedIndexChanged="DdlCliente_SelectedIndexChanged" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Width="75%" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div> </div>
</div> </div>
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">
@@ -929,7 +947,7 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos" <asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Conceptos"
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion" DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance"
ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns> <Columns>
<asp:TemplateField HeaderText="OC <br/> Cliente"> <asp:TemplateField HeaderText="OC <br/> Cliente">
@@ -997,7 +1015,6 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Precio Unitario"> <asp:TemplateField HeaderText="Precio Unitario">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal> <asp:Literal ID="LtPU" Text='<%# Eval("PU", "{0:###,###,##0.00##}")%>' runat="server"></asp:Literal>
@@ -1013,9 +1030,15 @@
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Avance" Visible="false"> <asp:TemplateField HeaderText="Avance" Visible="True">
<ItemTemplate> <ItemTemplate>
<asp:CheckBox ID="CHKPAvance" Enabled="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
<asp:LinkButton runat="server" ID="LnkHabilitaAvance" Text= "" OnClick="LnkHabilitaAvance_Click" Enabled="false"
data-toggle="confirmation" data-popout="true" data-original-title="¿Habilitar el avance?" data-btn-ok-label="si" ></asp:LinkButton>
<asp:CheckBox ID="CHKPAvance" Enabled="True" Visible="false" AutoPostBack="true" OnCheckedChanged="AvaClick" runat="server" />
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>

View File

@@ -364,9 +364,9 @@ Partial Class Contratos_ContratoObra
CargaValoresIniciales() CargaValoresIniciales()
CreaDtTmpFianzas() CreaDtTmpFianzas()
If Request("CveCliente") IsNot Nothing Then
cargaClientes() cargaClientes()
End If
If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then
ViewState("CveContrato") = Request("CveContrato") ViewState("CveContrato") = Request("CveContrato")
@@ -474,6 +474,11 @@ Partial Class Contratos_ContratoObra
End If End If
TabAvanveDocumento.Visible = False
TabContratosGastos.Visible = False
TabPed.Visible = False
End Sub End Sub
#Region " CARGA VALORES INICIALES " #Region " CARGA VALORES INICIALES "
@@ -546,12 +551,12 @@ Partial Class Contratos_ContratoObra
Public Function isWithFamily() As Boolean Public Function isWithFamily() As Boolean
Return UsuarioActual.CveEmpresa = 66 Return UsuarioActual.CveEmpresa = 66
End Function End Function
Private Sub cargaClientes() Private Sub cargaClientes()
TrCliente.Visible = True
TrProveedor.Visible = False
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlCliente.DataBind() DdlCliente.DataBind()
End Sub End Sub
Private Sub CreaDT() Private Sub CreaDT()
TmpDT = New DataTable TmpDT = New DataTable
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
@@ -927,6 +932,7 @@ Partial Class Contratos_ContratoObra
Dim Ruta = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\" Dim Ruta = Request.ApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
'DivTipoContrato.Visible = False 'DivTipoContrato.Visible = False
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
If ObjContratos.DtResultados.Rows.Count > 0 Then If ObjContratos.DtResultados.Rows.Count > 0 Then
@@ -950,7 +956,7 @@ Partial Class Contratos_ContratoObra
' TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString ' TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString
CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
DdlCliente.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CveCliente").ToString)
If ObjContratos.CveProveedor > 0 Then If ObjContratos.CveProveedor > 0 Then
TrProveedor.Visible = True TrProveedor.Visible = True
@@ -2044,10 +2050,12 @@ Partial Class Contratos_ContratoObra
If e.Row.RowIndex > -1 Then If e.Row.RowIndex > -1 Then
e.Row.FCCheckBox("CHKPAvance").Visible = Autorizado Dim LnkHabilitaAvance As LinkButton = e.Row.FCLinkButton("LnkHabilitaAvance")
' e.Row.FCCheckBox("CHKPAvance").Visible = Autorizado
'e.Row.FCCheckBox("CHKPEstimacion").Visible = Autorizado 'e.Row.FCCheckBox("CHKPEstimacion").Visible = Autorizado
If UsuarioActual.TienePermisoProceso(124) Then If UsuarioActual.TienePermisoProceso(124) Then
e.Row.FCCheckBox("CHKPAvance").Enabled = True e.Row.FCCheckBox("CHKPAvance").Enabled = True
LnkHabilitaAvance.Enabled = True
End If End If
If e.Row.DBCampo("PermitirAvance").ToString = "1" Then If e.Row.DBCampo("PermitirAvance").ToString = "1" Then
@@ -2066,6 +2074,19 @@ Partial Class Contratos_ContratoObra
e.Row.Cells(1).Width = Unit.Pixel(10) e.Row.Cells(1).Width = Unit.Pixel(10)
e.Row.Cells(6).Width = Unit.Pixel(250) e.Row.Cells(6).Width = Unit.Pixel(250)
End If End If
If e.Row.DBCampo("PermitirAvance").ToString = "1" Then
LnkHabilitaAvance.Text = "<i class='fa fa-check-square-o' aria-hidden='true'></i>"
LnkHabilitaAvance.Attributes.Add("data-original-title", "¿Deshabilitar avance?")
Else
LnkHabilitaAvance.Text = "<i class='fa fa-square-o' aria-hidden='true'></i>"
LnkHabilitaAvance.Attributes.Add("data-original-title", "¿Habilitar avance?")
End If
End If End If
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
e.Row.FCDropDownList("DdlUMEdit").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DataKey("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) e.Row.FCDropDownList("DdlUMEdit").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DataKey("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa)
@@ -5026,6 +5047,36 @@ Partial Class Contratos_ContratoObra
Protected Sub LnkHabilitaAvance_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim PermitirAvance As Integer = GvRow.DataKey("PermitirAvance").ToEntero
'Get the button that raised the event
'Dim btn As CheckBox = DirectCast(sender, CheckBox)
'Dim gvr As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
Dim CveContratoDetalle As Integer = GvRow.DataKey("CveContratoDetalle").ToString.ToEntero
Dim objContrato As New ClsContratos
If objContrato.UpdateContratosDetalleAvance(CveContratoDetalle, IIf(PermitirAvance = 1, 0, 1).ToString.ToEntero) Then
Dim row = TmpDT.Select(String.Format("CveContratoDetalle={0}", CveContratoDetalle))(0)
row("PermitirAvance") = IIf(PermitirAvance = 1, 0, 1).ToString.ToEntero
CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2"))
Alert("Se ha permitido levantar avance", TipoMensaje.MsgInformacion)
Else
Alert("no se pudo permitir avance", TipoMensaje.MsgAdvertencia)
End If
objContrato.Dispose()
End Sub
End Class End Class

View File

@@ -1,124 +0,0 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosAvances.aspx.vb" Inherits="RepContratosAvances" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte de Contratos
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="PnlFiltros" runat="server" DefaultButton="CmdConsultar">
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT" style="">
<div class="titlefiltros caption ">
<ul class="list-inline" id="TrProgramar" runat="server">
<li>Cliente:
<asp:DropDownList ID="DdlCliente" runat="server" AutoPostBack="true" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;"></asp:DropDownList>
</li>
<li>Contratos:
<asp:DropDownList ID="DdlContrato" runat="server" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
</li>
<li style="display: none;">Sección:
<asp:DropDownList ID="DdlSeccion" runat="server" AutoPostBack="false" DataTextField="Seccion" DataValueField="CveSeccion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
</li>
<li>Partida:
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>
</li>
<li>Productos y Servicios:
<asp:DropDownList ID="DdlPS" runat="server" AutoPostBack="true" DataTextField="PS" DataValueField="CvePS" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;"></asp:DropDownList>
</li>
</ul>
</div>
<div class="tools">
<asp:Button ID="CmdConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table class="table table-striped table-advance table-hover">
<thead>
<tr class="Titulos">
<th width="60px">#</th>
<th width="300px">
<asp:LinkButton ID="LbSubSeccion" runat="server" CausesValidation="false" Text="Cliente/ Contrato / Partida" /></th>
<th width="120px">
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" Text="Contratado" /></th>
<th width="120px">
<asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="false" Text="Actual" /></th>
<th width="120px">
<asp:LinkButton ID="LinkButton5" runat="server" CausesValidation="false" Text="Por Estimar" /></th>
<th width="120px">
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" Text="Ejecutado" /></th>
<th width="120px">
<asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="false" Text="Obra Faltante" /></th>
</tr>
</thead>
</table>
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Estimaciones con los Filtros seleccionados" DataKeyNames="CveContrato" ShowHeader="false" SelectedRowStyle-BackColor="#CCFF66" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LitEst" runat="server" Text='<%# Eval("CveContrato")%>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="HplAgrupador" CssClass="Texto" runat="server" Text='<%# Eval("Agrupador") %>' NavigateUrl='<%# Eval("CveContrato", "ContratosDetalle.aspx?CveContrato={0}&Op=2")%>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="HplContratado" CssClass="Texto" runat="server" Text='<%# Eval("Contratado", "{0:N2}")%>'></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="HplActual" CssClass="Texto" runat="server" Text='<%# Eval("LoQueEstoyHaciendo", "{0:N2}")%>'></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="HPlPorEstimar" CssClass="Texto" runat="server" Text='<%# Eval("PorEstimar", "{0:N2}")%>'></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="HplEjecutado" CssClass="Texto" runat="server" Text='<%# Eval("Ejecutado", "{0:N2}")%>'></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("OFA", "{0:N2}")%>'></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,169 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosObraAvances.aspx.vb" Inherits="RepContratosObraAvances" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte Contratos Avance
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" >
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
</div>
<div class="titlefiltros caption">
<div class="row">
<div class="col-md-1">
Fecha Inicio:
</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrConsulta"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1">
Fecha Fin:
</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrConsulta"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1">
Cliente:
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" Class="select2me" Width="100PX" ></asp:DropDownList>
</div>
<div class="col-md-1">
Contrato:
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlContrato" runat="server" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="select2me" Width="100PX" ></asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-12" style="text-align:right!important">
<div style="display: inline-block">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GVDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron contratos con los Filtros seleccionados"
DataKeyNames="CveContrato,NumeroContrato" ShowHeader="True"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Fecha I.">
<ItemTemplate>
<asp:Label ID="LitEst" runat="server" Text='<%# Eval("FechaInicial", "{0:dd/MM/yyyy}")%>' ></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cliente">
<ItemTemplate>
<asp:HyperLink ID="HplCliente" CssClass="Texto" runat="server" Text='<%# Eval("Nombre") %>' NavigateUrl='<%# Eval("CveCliente", "../Ventas/Clientes.aspx?CveCliente={0}")%>' Target="_blank" ></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="# Contrato">
<ItemTemplate>
<asp:HyperLink ID="HplContratado" CssClass="Texto" runat="server" Text='<%# Eval("NumeroContrato")%>' Target="_blank" ></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descripción">
<ItemTemplate>
<asp:Label ID="LblDescripcion" CssClass="Texto" runat="server" Text='<%# Eval("DescripcionContrato")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LblImporte" CssClass="Texto" runat="server" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance %" >
<ItemTemplate>
<asp:Label ID="LblIAvancePorcentaje" runat="server" Text='<%# Eval("AvancePorcentaje", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance $">
<ItemTemplate>
<asp:Label ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,80 @@
Imports Extensiones
Imports System.Data
Partial Class RepContratosObraAvances
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaClientes()
CargaContratos()
'CargaDatos()
End If
End Sub
Private Sub CargaDatos()
Dim Con As New ClsContratos
If Con.GetContratosObraRepAvances(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GVDatos.DataSource = Con.DtResultados
Else
GVDatos.DataSource = Nothing
End If
Con.Dispose()
GVDatos.DataBind()
UpDatos.Update()
End Sub
#Region "C O M B O S"
Private Sub CargaContratos()
DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
DdlContrato.DataBind()
DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
End Sub
Private Sub CargaClientes()
Dim dt As DataTable = Nothing
Dim Cli As New ClsClientes
If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
dt = Cli.DtResultados
End If
Cli.Dispose()
DdlCliente.DataSource = dt
DdlCliente.DataBind()
DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
#End Region
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim HplContratado As HyperLink = e.Row.FCHyperLink("HplContratado")
HplContratado.NavigateUrl = $"./RepContratosObraAvancesDetalle.aspx?CveContrato={e.Row.DataKey("CveContrato")}&NumeroContrato={e.Row.DataKey("NumeroContrato")}"
End If
End Sub
Protected Sub CmdConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
End Class

View File

@@ -0,0 +1,179 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosObraAvancesDetalle.aspx.vb" Inherits="RepContratosObraAvancesDetalle" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte Contratos Avance Detalle
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<%-- <asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT smalltitle" >
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
</div>
<div class="titlefiltros caption">
<div class="row">
<div class="col-md-1">
Fecha Inicio:
</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrConsulta"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1">
Fecha Fin:
</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrConsulta"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrConsulta"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1">
Cliente:
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" Class="select2me" Width="100PX" ></asp:DropDownList>
</div>
<div class="col-md-1">
Contrato:
</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlContrato" runat="server" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="select2me" Width="100PX" ></asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>--%>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-3" style="text-align:left!important">
<strong><asp:Label runat="server" ID="LblNumeroContrato"></asp:Label></strong>
</div>
<div class="col-md-3" style="text-align:right!important">
<div style="display: inline-block">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<asp:GridView ID="GVDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron contratos con los Filtros seleccionados"
DataKeyNames="CveEstimacion,NumeroEstimacion" ShowHeader="True"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="# Estimación">
<ItemTemplate>
<asp:HyperLink ID="HplNumeroEstimacion" CssClass="Texto" runat="server" Text='<%# Eval("NumeroEstimacion") %>' Target="_blank" ></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha">
<ItemTemplate>
<asp:Label ID="LblFecha" runat="server" Text='<%# Eval("FechaEstimacion", "{0:dd/MM/yyyy}")%>' ></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance %" >
<ItemTemplate>
<asp:Label ID="LblIAvancePorcentaje" runat="server" Text='<%# Eval("AvancePorcentaje", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance acumulado %" >
<ItemTemplate>
<asp:Label ID="LblIAvancePorcentajeAcumulado" runat="server" Text='<%# Eval("AvanceAcumuladoPorcentaje", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance $">
<ItemTemplate>
<asp:Label ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Facturado">
<ItemTemplate>
<asp:Label ID="LblFacturado" CssClass="Texto" runat="server" Text='<%# Eval("Facturado")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,100 @@
Imports Extensiones
Imports System.Data
Partial Class RepContratosObraAvancesDetalle
Inherits ClsPaginas
Property CveContrato As Integer
Get
If ViewState("CveContrato") Is Nothing Then
Return -1
Else
Return ViewState("CveContrato").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveContrato") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CveContrato = If(Request("CveContrato") IsNot Nothing AndAlso Request("CveContrato").ToString.ToEntero > 0, Request("CveContrato").ToString.ToEntero, -1)
LblNumeroContrato.Text = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"Numero Contrato: {Request("NumeroContrato").ToString}", "")
If CveContrato > 0 Then
CargaDatos()
End If
End If
End Sub
Private Sub CargaDatos()
Dim Con As New ClsContratos
If Con.GetContratosObraRepAvancesDetalle(CveContrato, UsuarioActual.CveEmpresa) Then
GVDatos.DataSource = Con.DtResultados
If Con.DtResultados.Rows.Count = 0 Then
Alert("No se encontraron estimaciones.", TipoMensaje.MsgAdvertencia)
End If
Else
GVDatos.DataSource = Nothing
End If
Con.Dispose()
GVDatos.DataBind()
UpDatos.Update()
End Sub
'#Region "C O M B O S"
' Private Sub CargaContratos()
' DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
' DdlContrato.DataBind()
' DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
' End Sub
' Private Sub CargaClientes()
' Dim dt As DataTable = Nothing
' Dim Cli As New ClsClientes
' If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
' dt = Cli.DtResultados
' End If
' Cli.Dispose()
' DdlCliente.DataSource = dt
' DdlCliente.DataBind()
' DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
' End Sub
'#End Region
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim HplNumeroEstimacion As HyperLink = e.Row.FCHyperLink("HplNumeroEstimacion")
HplNumeroEstimacion.NavigateUrl = $"./RepContratosObraAvancesPartida.aspx?CveEstimacion={e.Row.DataKey("CveEstimacion")}&NumeroEstimacion={ e.Row.DataKey("NumeroEstimacion")}&CveContrato={ CveContrato }"
' NavigateUrl='<%# Eval("CveEstimacion", "RepContratosObraAvancesPartida.aspx?CveEstimacion={0}")%>'
End If
End Sub
'Protected Sub CmdConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
' CargaDatos()
'End Sub
End Class

View File

@@ -0,0 +1,213 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosObraAvancesPartida.aspx.vb" Inherits="RepContratosObraAvancesPartida" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Reporte Contratos Avance por partida
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<%-- <asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="PnlFiltros" runat="server" DefaultButton="CmdConsultar">
<div class="portlet solid grey-cascade portlet-filter" style="">
<div class="portlet-title portlet-filterT" style="">
<div class="titlefiltros caption ">
<ul class="list-inline" id="TrProgramar" runat="server">
<li>Cliente:
<asp:DropDownList ID="DdlCliente" runat="server" AutoPostBack="true" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;"></asp:DropDownList>
</li>
<li>Contratos:
<asp:DropDownList ID="DdlContrato" runat="server" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
</li>
<li style="display: none;">Sección:
<asp:DropDownList ID="DdlSeccion" runat="server" AutoPostBack="false" DataTextField="Seccion" DataValueField="CveSeccion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
</li>
<li>Partida:
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>
</li>
<li>Productos y Servicios:
<asp:DropDownList ID="DdlPS" runat="server" AutoPostBack="true" DataTextField="PS" DataValueField="CvePS" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;"></asp:DropDownList>
</li>
</ul>
</div>
<div class="tools">
<asp:Button ID="CmdConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>--%>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-3" style="text-align:left!important">
<strong> <asp:Label runat="server" ID="LblEstimacion"></asp:Label></strong>
</div>
<div class="col-md-3" style="text-align:right!important">
<div style="display: inline-block">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<asp:GridView ID="GVDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron contratos con los Filtros seleccionados"
DataKeyNames="CveContrato,CveEstimacion,Fecha,PS,CveContratoDetalle" ShowHeader="True"
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Producto">
<ItemTemplate>
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("PS")%>' ></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="PU" >
<ItemTemplate>
<asp:Label ID="LblPU" runat="server" Text='<%# Eval("PU", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance $">
<ItemTemplate>
<asp:Label ID="LblAvanceImporte" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance Anterior$">
<ItemTemplate>
<asp:Label ID="LblAvanceImporteAnterior" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporteAnterior", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance Acumulado $">
<ItemTemplate>
<asp:Label ID="LblAvanceAcumulado" CssClass="Texto" runat="server" Text='<%# Eval("AvanceAcumulado", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText=" ">
<ItemTemplate>
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField HeaderText="Cliente">
<ItemTemplate>
<asp:HyperLink ID="HplCliente" CssClass="Texto" runat="server" Text='<%# Eval("Nombre") %>' NavigateUrl='<%# Eval("CveCliente", "../Ventas/Clientes.aspx?CveCliente={0}")%>' Target="_blank" ></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="# Contrato">
<ItemTemplate>
<asp:HyperLink ID="HplContratado" CssClass="Texto" runat="server" Text='<%# Eval("NumeroContrato")%>' NavigateUrl='<%# Eval("CveContrato", "RepContratosObraAvancesDetalle.aspx?CveContrato={0}") %>' Target="_blank" ></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Descripción">
<ItemTemplate>
<asp:Label ID="LblDescripcion" CssClass="Texto" runat="server" Text='<%# Eval("DescripcionContrato")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance %" >
<ItemTemplate>
<asp:Label ID="LblIAvancePorcentaje" runat="server" Text='<%# Eval("AvancePorcentaje", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Avance $">
<ItemTemplate>
<asp:Label ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
</div>
<br />
</ContentTemplate>
</asp:UpdatePanel>
<div id="ModalAnexos" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpModalAnexos" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label runat="server" ID="LblTituloModalAnexo"></asp:Label></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12" style="text-align:center!important">
<asp:GridView ID="GvAnexos" AutoGenerateColumns="false" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron archivos" Width="100"
DataKeyNames="Archivo" CssClass="table GVEstimacion table-advance table-hover" GridLines ="None">
<Columns>
<asp:TemplateField HeaderText="Anexos">
<ItemTemplate>
<asp:LinkButton ID="LnkArchivo" runat="server" OnClick="LnkArchivo_Click"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,150 @@
Imports Extensiones
Imports System.Data
Partial Class RepContratosObraAvancesPartida
Inherits ClsPaginas
Property CveEstimacion As Integer
Get
If ViewState("CveEstimacion") Is Nothing Then
Return -1
Else
Return ViewState("CveEstimacion").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveEstimacion") = value
End Set
End Property
Property CveContrato As Integer
Get
If ViewState("CveContrato") Is Nothing Then
Return -1
Else
Return ViewState("CveContrato").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveContrato") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CveEstimacion = If(Request("CveEstimacion") IsNot Nothing AndAlso Request("CveEstimacion").ToString.ToEntero > 0, Request("CveEstimacion").ToString.ToEntero, -1)
CveContrato = If(Request("CveContrato") IsNot Nothing AndAlso Request("CveContrato").ToString.ToEntero > 0, Request("CveContrato").ToString.ToEntero, -1)
LblEstimacion.Text = If(Request("NumeroEstimacion") IsNot Nothing AndAlso Request("NumeroEstimacion").ToString.Length > 0, $"Numero Estimacion: {Request("NumeroEstimacion").ToString}", "")
If CveEstimacion > 0 Then
CargaDatos()
End If
End If
End Sub
Private Sub CargaDatos()
Dim Con As New ClsContratos
If Con.GetContratosObraRepAvancesPartida(CveEstimacion, UsuarioActual.CveEmpresa) Then
GVDatos.DataSource = Con.DtResultados
If Con.DtResultados.Rows.Count = 0 Then
Alert("No se encontraron partidas.", TipoMensaje.MsgAdvertencia)
End If
Else
GVDatos.DataSource = Nothing
End If
Con.Dispose()
GVDatos.DataBind()
UpDatos.Update()
End Sub
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
End If
End Sub
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
LblTituloModalAnexo.Text = "Anexo " & GvRow.DataKey("PS")
'Get the button that raised the event
'Dim CveContratoDetalle As Integer = gvr.DataKey("CveContratoDetalle").ToString.ToEntero
Dim Fecha As Date = GvRow.DataKey("Fecha").ToDate
Dim CveEstimacion As Integer = GvRow.DataKey("CveEstimacion").ToEntero
Dim CveContratoDetalle As Integer = GvRow.DataKey("CveContratoDetalle").ToEntero
Dim objContrato As New ClsContratos
If objContrato.GetContratosAvanceAnexos(CveContratoDetalle, Fecha, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
GvAnexos.DataSource = objContrato.DtResultados
GvAnexos.DataBind()
GvAnexos.Visible = True
Else
GvAnexos.Visible = False
End If
objContrato.Dispose()
UpModalAnexos.Update()
RegistraScript("$('#ModalAnexos').modal('show');")
End Sub
Protected Sub GvAnexos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvAnexos.RowDataBound
If e.Row.RowIndex > -1 Then
Dim Archivo As String = e.Row.DBCampo("Archivo").ToString
Dim start As Integer = Len(Archivo.Split("-"c)(0))
Dim LnkArchivo As LinkButton = e.Row.FCLinkButton("LnkArchivo")
LnkArchivo.Text = Archivo.Substring(start + 1)
'link.NavigateUrl = String.Format("/Empresas/{0}/Contrato/{1}/Anexos/{2}", UsuarioActual.CveEmpresa, CveContrato, Archivo)
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkArchivo)
End If
End Sub
Protected Sub LnkArchivo_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim Archivo As String = GvRow.DataKey("Archivo").ToString
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Disposition", $"attachment; filename={Archivo}")
Response.TransmitFile($"{UsuarioActual.Empresa.Ruta}\Contrato\{CveContrato}\Anexos\{Archivo}")
Response.End()
End Sub
End Class

View File

@@ -183,7 +183,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value> R.F.C PPP885522PPP</Value> <Value> R.F.C STJ180705IV4</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>

View File

@@ -105,7 +105,7 @@
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>PPP885522PPP</Value> <Value>STJ180705IV4</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>

View File

@@ -3818,7 +3818,7 @@
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>PPP885522PPP</Value> <Value>STJ180705IV4</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>

View File

@@ -183,7 +183,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value> R.F.C PPP885522PPP</Value> <Value> R.F.C STJ180705IV4</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>

View File

@@ -28,10 +28,10 @@
<Width>2.24597in</Width> <Width>2.24597in</Width>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -80,10 +80,10 @@
<ZIndex>1</ZIndex> <ZIndex>1</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -116,7 +116,7 @@
<ZIndex>2</ZIndex> <ZIndex>2</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
@@ -152,10 +152,10 @@
<ZIndex>3</ZIndex> <ZIndex>3</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -184,7 +184,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Jesús Julían Moreno Quintana</Value> <Value>Jesús Julián Moreno Quintana</Value>
<Style> <Style>
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
@@ -213,24 +213,6 @@
<TextAlign>Center</TextAlign> <TextAlign>Center</TextAlign>
</Style> </Style>
</Paragraph> </Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Paseo Florido, 62-A, Col.: Nueva Galicia, C.P.: 83245,</Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight>
<TextDecoration>None</TextDecoration>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
@@ -286,7 +268,7 @@
<Source>External</Source> <Source>External</Source>
<Value>=Parameters!QR.Value</Value> <Value>=Parameters!QR.Value</Value>
<Sizing>FitProportional</Sizing> <Sizing>FitProportional</Sizing>
<Top>5.04488in</Top> <Top>6.00738in</Top>
<Left>0.04026in</Left> <Left>0.04026in</Left>
<Height>0.95455in</Height> <Height>0.95455in</Height>
<Width>1.49755in</Width> <Width>1.49755in</Width>
@@ -308,6 +290,7 @@
<FontFamily>Calibri</FontFamily> <FontFamily>Calibri</FontFamily>
<FontSize>9pt</FontSize> <FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
<Format>dd/MM/yyyy</Format>
<Color>DimGray</Color> <Color>DimGray</Color>
</Style> </Style>
</TextRun> </TextRun>
@@ -325,7 +308,7 @@
<ZIndex>6</ZIndex> <ZIndex>6</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#4f81bd</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
@@ -363,7 +346,7 @@
<ZIndex>7</ZIndex> <ZIndex>7</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
@@ -398,7 +381,7 @@
<ZIndex>8</ZIndex> <ZIndex>8</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -441,7 +424,7 @@
<ZIndex>9</ZIndex> <ZIndex>9</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -486,7 +469,7 @@
<ZIndex>10</ZIndex> <ZIndex>10</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -530,7 +513,7 @@
<ZIndex>11</ZIndex> <ZIndex>11</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -575,7 +558,7 @@
<ZIndex>12</ZIndex> <ZIndex>12</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<BottomBorder> <BottomBorder>
@@ -619,7 +602,7 @@
<ZIndex>13</ZIndex> <ZIndex>13</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -658,7 +641,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox54</rd:DefaultName> <rd:DefaultName>Textbox54</rd:DefaultName>
<Top>5.02273in</Top> <Top>5.98523in</Top>
<Left>1.64412in</Left> <Left>1.64412in</Left>
<Height>0.18056in</Height> <Height>0.18056in</Height>
<Width>4.03672in</Width> <Width>4.03672in</Width>
@@ -680,7 +663,7 @@
<RightBorder> <RightBorder>
<Style>None</Style> <Style>None</Style>
</RightBorder> </RightBorder>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -708,7 +691,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox54</rd:DefaultName> <rd:DefaultName>Textbox54</rd:DefaultName>
<Top>5.21718in</Top> <Top>6.17968in</Top>
<Left>1.64412in</Left> <Left>1.64412in</Left>
<Height>0.18056in</Height> <Height>0.18056in</Height>
<Width>4.03672in</Width> <Width>4.03672in</Width>
@@ -718,7 +701,7 @@
<Color>White</Color> <Color>White</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -746,7 +729,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox54</rd:DefaultName> <rd:DefaultName>Textbox54</rd:DefaultName>
<Top>5.41573in</Top> <Top>6.37823in</Top>
<Left>1.64412in</Left> <Left>1.64412in</Left>
<Height>0.19444in</Height> <Height>0.19444in</Height>
<Width>4.03672in</Width> <Width>4.03672in</Width>
@@ -756,7 +739,7 @@
<Color>White</Color> <Color>White</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -784,7 +767,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox54</rd:DefaultName> <rd:DefaultName>Textbox54</rd:DefaultName>
<Top>5.62134in</Top> <Top>6.58384in</Top>
<Left>1.64412in</Left> <Left>1.64412in</Left>
<Height>0.19445in</Height> <Height>0.19445in</Height>
<Width>4.03672in</Width> <Width>4.03672in</Width>
@@ -794,7 +777,7 @@
<Color>White</Color> <Color>White</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -821,7 +804,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox58</rd:DefaultName> <rd:DefaultName>Textbox58</rd:DefaultName>
<Top>5.01023in</Top> <Top>5.97273in</Top>
<Left>5.70142in</Left> <Left>5.70142in</Left>
<Height>0.18056in</Height> <Height>0.18056in</Height>
<Width>2.22448in</Width> <Width>2.22448in</Width>
@@ -856,7 +839,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox59</rd:DefaultName> <rd:DefaultName>Textbox59</rd:DefaultName>
<Top>5.20739in</Top> <Top>6.16989in</Top>
<Left>5.69622in</Left> <Left>5.69622in</Left>
<Height>0.16667in</Height> <Height>0.16667in</Height>
<Width>2.22969in</Width> <Width>2.22969in</Width>
@@ -890,7 +873,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox60</rd:DefaultName> <rd:DefaultName>Textbox60</rd:DefaultName>
<Top>5.4144in</Top> <Top>6.3769in</Top>
<Left>5.69622in</Left> <Left>5.69622in</Left>
<Height>0.16939in</Height> <Height>0.16939in</Height>
<Width>2.22714in</Width> <Width>2.22714in</Width>
@@ -924,7 +907,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox61</rd:DefaultName> <rd:DefaultName>Textbox61</rd:DefaultName>
<Top>5.62405in</Top> <Top>6.58655in</Top>
<Left>5.70142in</Left> <Left>5.70142in</Left>
<Height>0.17784in</Height> <Height>0.17784in</Height>
<Width>2.22193in</Width> <Width>2.22193in</Width>
@@ -946,7 +929,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: </Value> <Value>Régimen: Régimen General de Ley Personas Morales; Condiciones de pago: </Value>
<Style> <Style>
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize> <FontSize>7pt</FontSize>
@@ -993,12 +976,20 @@
<Color>DimGray</Color> <Color>DimGray</Color>
</Style> </Style>
</TextRun> </TextRun>
<TextRun>
<Value>.</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox62</rd:DefaultName> <rd:DefaultName>Textbox62</rd:DefaultName>
<Top>5.82251in</Top> <Top>6.78501in</Top>
<Left>1.53781in</Left> <Left>1.53781in</Left>
<Height>0.29498in</Height> <Height>0.29498in</Height>
<Width>6.38809in</Width> <Width>6.38809in</Width>
@@ -1031,7 +1022,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox63</rd:DefaultName> <rd:DefaultName>Textbox63</rd:DefaultName>
<Top>6.03585in</Top> <Top>7.14943in</Top>
<Left>2.5423in</Left> <Left>2.5423in</Left>
<Height>0.25in</Height> <Height>0.25in</Height>
<Width>3.69856in</Width> <Width>3.69856in</Width>
@@ -1097,7 +1088,7 @@
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value> Por éste pagare prometo (emos) pagar incondicionalmente a la orden de AD Sistemas, Análisis y Diseño de Sistemas, a su vencimiento el </Value> <Value> Por éste pagaré prometo (emos) pagar incondicionalmente a la orden de AD Sistemas, Análisis y Diseño de Sistemas, a su vencimiento el </Value>
<Style> <Style>
<FontStyle>Normal</FontStyle> <FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
@@ -1169,7 +1160,7 @@
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value> ). Valor recibido a mi (nuestra) entera satisfacción. la falta de pago de éste documento a su vencimiento dará derecho a AD Sistemas, Análisis y Diseño de Sistemas o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a </Value> <Value> ). Valor recibido a mi (nuestra) entera satisfacción, la falta de pago de éste documento a su vencimiento dará derecho a AD Sistemas, Análisis y Diseño de Sistemas o tenedor, desde el día siguiente a cobrar el 10% mensual de interés moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a </Value>
<Style> <Style>
<FontStyle>Normal</FontStyle> <FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily> <FontFamily>calibri</FontFamily>
@@ -1813,8 +1804,8 @@
</Line> </Line>
</ReportItems> </ReportItems>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>16.20868cm</Top> <Top>18.94447cm</Top>
<Left>0.13016cm</Left> <Left>0.04721cm</Left>
<Height>4.04843cm</Height> <Height>4.04843cm</Height>
<Width>20.06179cm</Width> <Width>20.06179cm</Width>
<ZIndex>24</ZIndex> <ZIndex>24</ZIndex>
@@ -1874,10 +1865,10 @@
<rd:DefaultName>Textbox34</rd:DefaultName> <rd:DefaultName>Textbox34</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -1910,10 +1901,10 @@
<rd:DefaultName>Textbox53</rd:DefaultName> <rd:DefaultName>Textbox53</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -1946,10 +1937,10 @@
<rd:DefaultName>Textbox79</rd:DefaultName> <rd:DefaultName>Textbox79</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -1982,10 +1973,10 @@
<rd:DefaultName>Textbox84</rd:DefaultName> <rd:DefaultName>Textbox84</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -2031,10 +2022,10 @@
<rd:DefaultName>Textbox87</rd:DefaultName> <rd:DefaultName>Textbox87</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -2070,7 +2061,7 @@
<rd:DefaultName>Cantidad1</rd:DefaultName> <rd:DefaultName>Cantidad1</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2110,7 +2101,7 @@
<rd:DefaultName>UM1</rd:DefaultName> <rd:DefaultName>UM1</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2151,7 +2142,7 @@
<rd:DefaultName>PS1</rd:DefaultName> <rd:DefaultName>PS1</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2195,7 +2186,7 @@
<rd:DefaultName>PU1</rd:DefaultName> <rd:DefaultName>PU1</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
@@ -2230,7 +2221,7 @@
<rd:DefaultName>Textbox88</rd:DefaultName> <rd:DefaultName>Textbox88</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2272,7 +2263,7 @@
<rd:DefaultName>Textbox81</rd:DefaultName> <rd:DefaultName>Textbox81</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2305,7 +2296,7 @@
<rd:DefaultName>Textbox82</rd:DefaultName> <rd:DefaultName>Textbox82</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2338,7 +2329,7 @@
<rd:DefaultName>Textbox83</rd:DefaultName> <rd:DefaultName>Textbox83</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2371,7 +2362,7 @@
<rd:DefaultName>Textbox86</rd:DefaultName> <rd:DefaultName>Textbox86</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2404,7 +2395,7 @@
<rd:DefaultName>Textbox89</rd:DefaultName> <rd:DefaultName>Textbox89</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2495,7 +2486,7 @@
<ZIndex>26</ZIndex> <ZIndex>26</ZIndex>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>#bdd7ee</Color>
<Style>Solid</Style> <Style>Solid</Style>
</Border> </Border>
<TopBorder> <TopBorder>
@@ -2558,7 +2549,7 @@
<Border> <Border>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -2595,7 +2586,7 @@
<Border> <Border>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -2632,7 +2623,7 @@
<Border> <Border>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -2825,8 +2816,7 @@
<rd:DefaultName>Importe</rd:DefaultName> <rd:DefaultName>Importe</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Style>None</Style>
<Style>Solid</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@@ -2880,10 +2870,11 @@
<rd:DefaultName>ImpuestoLocal</rd:DefaultName> <rd:DefaultName>ImpuestoLocal</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Color>White</Color>
<Style>Solid</Style> <Style>Solid</Style>
<Width>1.25pt</Width>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -2946,12 +2937,8 @@
<rd:DefaultName>Textbox128</rd:DefaultName> <rd:DefaultName>Textbox128</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>#eb831f</Color> <Style>None</Style>
<Style>Solid</Style>
</Border> </Border>
<RightBorder>
<Width>1pt</Width>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
@@ -3004,7 +2991,7 @@
<RightBorder> <RightBorder>
<Style>Solid</Style> <Style>Solid</Style>
</RightBorder> </RightBorder>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign> <VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@@ -3098,7 +3085,7 @@
<Style>Solid</Style> <Style>Solid</Style>
<Width>1pt</Width> <Width>1pt</Width>
</RightBorder> </RightBorder>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign> <VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@@ -3192,7 +3179,7 @@
<Style>Solid</Style> <Style>Solid</Style>
<Width>1pt</Width> <Width>1pt</Width>
</RightBorder> </RightBorder>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign> <VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@@ -3287,7 +3274,7 @@
<Style>Solid</Style> <Style>Solid</Style>
<Width>1pt</Width> <Width>1pt</Width>
</RightBorder> </RightBorder>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign> <VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@@ -3382,7 +3369,7 @@
<Style>Solid</Style> <Style>Solid</Style>
<Width>1pt</Width> <Width>1pt</Width>
</RightBorder> </RightBorder>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign> <VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@@ -3539,30 +3526,197 @@
<Border> <Border>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<BackgroundColor>#eb831f</BackgroundColor> <BackgroundColor>#bdd7ee</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop> <PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Image Name="Image1"> <Textbox Name="Textbox6">
<Source>Embedded</Source> <CanGrow>true</CanGrow>
<Value>Logo</Value> <KeepTogether>true</KeepTogether>
<Sizing>FitProportional</Sizing> <Paragraphs>
<Top>0.07652cm</Top> <Paragraph>
<Left>0.13016cm</Left> <TextRuns>
<Height>2.76239cm</Height> <TextRun>
<Width>3.72665cm</Width> <Value>AD Sistemas, análisis y diseño de sistemas</Value>
<Style>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Jesús Julián Moreno Quintana</Value>
<Style>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>BBVA Bancomer</Value>
<Style>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>01 2760 0261 1276 8759</Value>
<Style>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>26 1127 6875</Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>Calibri</FontFamily>
<FontSize>11pt</FontSize>
<FontWeight>Normal</FontWeight>
<TextDecoration>None</TextDecoration>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>12.7053cm</Top>
<Left>10.16136cm</Left>
<Height>2.37271cm</Height>
<Width>9.55228cm</Width>
<ZIndex>32</ZIndex> <ZIndex>32</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Image> </Textbox>
<Textbox Name="Textbox5">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Nombre Comercial</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Beneficiario</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Banco</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Clabe</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cuenta</Value>
<Style>
<FontWeight>Bold</FontWeight>
<Color>DimGray</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>12.7053cm</Top>
<Left>0.50677cm</Left>
<Height>2.37271cm</Height>
<Width>9.55228cm</Width>
<ZIndex>33</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems> </ReportItems>
<Height>20.41057cm</Height> <Height>22.9929cm</Height>
<Style /> <Style />
</Body> </Body>
<Width>20.22041cm</Width> <Width>20.22041cm</Width>
@@ -3991,9 +4145,8 @@
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="Fecha"> <ReportParameter Name="Fecha">
<DataType>String</DataType> <DataType>DateTime</DataType>
<Nullable>true</Nullable> <Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="DomicilioSucursal"> <ReportParameter Name="DomicilioSucursal">

View File

@@ -276,7 +276,7 @@
'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'SAT 'SAT
Using ObjGrales As New ClsGenerales Using ObjGrales As New ClsGenerales
'If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing 'If ObjGrales.GetSATUnidadMedida Then Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATUM") = Nothing
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados Else Application("GlobalDTSATUsosCFDI") = Nothing
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTFraccionArancelaria") = Nothing

View File

@@ -47,7 +47,7 @@
</div> </div>
<label class="col-sm-1" style="text-align: right">Folio:</label> <label class="col-sm-1" style="text-align: right">Folio:</label>
<div class="col-sm-1" style="width:60px"> <div class="col-sm-1" style="width: 60px">
<asp:TextBox runat="server" ID="TxtFolioFiltro" Width="60px" /> <asp:TextBox runat="server" ID="TxtFolioFiltro" Width="60px" />
</div> </div>
@@ -59,7 +59,6 @@
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row" style="margin-left: 0px;"> <div class="row" style="margin-left: 0px;">
</div> </div>
</div> </div>
</div> </div>
@@ -84,6 +83,37 @@
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator> <asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCantidad" runat="server" MinimumValue="0" Type="Double" ErrorMessage="No cumple con la cantidad especificada"></asp:RangeValidator>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="ChkLote" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:TextBox runat="server" ID="TxtLote" Text='<%# Eval("Lote").ToString()%>' CssClass="form-control" ClientIDMode="Static" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="ChkEditCaducidad" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad").ToString()%>' CssClass="form-control" ClientIDMode="Static" />
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="ImgFecha" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaCadNueva" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFechaCadNueva" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<%--<asp:DropDownList ID="DDlS" runat="server" Width="150px" DataValueField="CveSeccionAlmacen" DataTextField="SeccionAlmacen" class="select2me"></asp:DropDownList>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:CheckBox ID="Chk" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox> <asp:CheckBox ID="Chk" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>

View File

@@ -25,6 +25,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
DdlClasificaciones.DataBind() DdlClasificaciones.DataBind()
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1")) DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
GvD.Columns(4).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
GvD.Columns(10).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Nueva Fecha Elaboración", "Nueva Fecha Caducidad")
End Sub End Sub
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
@@ -48,8 +51,8 @@ Partial Class Inventarios_AjustesSeccionAlmacen
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
CargaSeccionesAlmacen(e.Row.FCDropDownList("DDlS"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa) CargaSeccionesAlmacen(e.Row.FCDropDownList("DDlS"), DdlAlmacen.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
'e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero) e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
'e.Row.FCDropDownList("DDlS").DataBind() e.Row.FCDropDownList("DDlS").DataBind()
Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal Dim ExistenciasAux As Decimal = e.Row.DataKey("Existencia").ToDecimal
e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0 e.Row.FCRangeValidator("RVR").Enabled = ExistenciasAux > 0
@@ -90,28 +93,51 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim CveMovimientoDetalleEntrada As Integer = 0 Dim CveMovimientoDetalleEntrada As Integer = 0
Dim Cont As Integer = 0 Dim Cont As Integer = 0
Dim Lista As New Hashtable Dim Lista As New Hashtable
Dim ListaCaducidad As New Hashtable
Dim ListaLote As New Hashtable
Dim Cantidad As Decimal = 0 Dim Cantidad As Decimal = 0
For Each gvr As GridViewRow In GvD.Rows For Each gvr As GridViewRow In GvD.Rows
Dim FechaCaducidadOriginal As String = gvr.DataKey("FechaCaducidad")
Dim FechaCaducidadNueva As String = gvr.FCTextBox("TxtFechaCadNueva").Text
Dim LoteOriginal As String = gvr.DataKey("Lote")
Dim LoteNuevo As String = gvr.FCTextBox("TxtLote").Text
'que este seleccionado y que tenga diferente seccion 'que este seleccionado y que tenga diferente seccion
Dim Modificar As Boolean = False
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCDropDownList("DDlS").SelectedValue.ToEntero <> gvr.DataKey("CveSeccionAlmacen").ToEntero Then If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCDropDownList("DDlS").SelectedValue.ToEntero <> gvr.DataKey("CveSeccionAlmacen").ToEntero Then
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDecimal()
If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True) ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
Else Else
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, False) ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, False)
End If End If
If Not Lista.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde
If Not Lista.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then Lista.Add(gvr.DataKey("CvePS").ToEntero, gvr.FCDropDownList("DDlS").SelectedValue.ToEntero) 'guardo que dato le corresponde
Modificar = True
End If
If gvr.FCCheckBox("ChkEditCaducidad").Checked And FechaCaducidadNueva.Length > 0 And FechaCaducidadNueva <> FechaCaducidadOriginal Then
If Not ListaCaducidad.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaCaducidad.Add(gvr.DataKey("CvePS").ToEntero, FechaCaducidadNueva) 'guardo que dato le corresponde
Modificar = True
End If
If gvr.FCCheckBox("ChkLote").Checked And LoteNuevo.Length > 0 And LoteNuevo <> LoteOriginal Then
If Not ListaLote.ContainsKey(gvr.DataKey("CvePS").ToEntero) Then ListaLote.Add(gvr.DataKey("CvePS").ToEntero, LoteNuevo) 'guardo que dato le corresponde
Modificar = True
End If
If Modificar Then
Cantidad = gvr.FCTextBox("TxtCantidad").Text.ToDecimal()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then
ErrorMovInv = True ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida" TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For Exit For
End If End If
Contador += 1 Contador += 1
End If End If
Next Next
If Not ErrorMovInv AndAlso Contador > 0 Then If Not ErrorMovInv AndAlso Contador > 0 Then
@@ -131,11 +157,24 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal() Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal()
Dim Serie As String = Row("Serie").ToString() Dim Serie As String = Row("Serie").ToString()
Dim Lote As String = Row("Lote").ToString() Dim Lote As String = Row("Lote").ToString()
Dim FechaCaducidad As Date = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate Dim FechaCaducidad As Date = MinFecha
If ListaCaducidad.ContainsKey(CvePS) Then
FechaCaducidad = ListaCaducidad(CvePS).ToString.ToDate
Else
FechaCaducidad = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate
End If
If ListaLote.ContainsKey(CvePS) Then
Lote = ListaLote(CvePS).ToString
Else
Lote = Row("Lote").ToString()
End If
'actualizamos el PS, para que tenga el aplica seccion 'actualizamos el PS, para que tenga el aplica seccion
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True) If Lista.ContainsKey(CvePS) Then
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
End If
'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then 'If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
' ErrorMovInv = True ' ErrorMovInv = True
'End If 'End If

View File

@@ -3661,6 +3661,7 @@ Partial Class Inventarios_EntradasSalidas
GvEntradas.Columns(4).Visible = DtTemp.MAX("Serie") <> "" GvEntradas.Columns(4).Visible = DtTemp.MAX("Serie") <> ""
GvEntradas.Columns(5).Visible = DtTemp.MAX("Lote") <> "" GvEntradas.Columns(5).Visible = DtTemp.MAX("Lote") <> ""
GvEntradas.Columns(6).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha GvEntradas.Columns(6).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
GvEntradas.Columns(6).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
End If End If
End Sub End Sub
@@ -3773,6 +3774,7 @@ Partial Class Inventarios_EntradasSalidas
GvSalidas.Columns(3).Visible = DtTemp.MAX("Serie") <> "" GvSalidas.Columns(3).Visible = DtTemp.MAX("Serie") <> ""
GvSalidas.Columns(4).Visible = DtTemp.MAX("Lote") <> "" GvSalidas.Columns(4).Visible = DtTemp.MAX("Lote") <> ""
GvSalidas.Columns(5).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha GvSalidas.Columns(5).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
GvSalidas.Columns(5).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
End If End If
End Sub End Sub
@@ -4049,6 +4051,7 @@ Partial Class Inventarios_EntradasSalidas
'activa caducidad 'activa caducidad
ThCaducidadEntrada.Visible = AplicaCaducidad ThCaducidadEntrada.Visible = AplicaCaducidad
ThCaducidadEntrada.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
TrCaducidadEntrada.Visible = AplicaCaducidad TrCaducidadEntrada.Visible = AplicaCaducidad
Else Else
@@ -4082,6 +4085,7 @@ Partial Class Inventarios_EntradasSalidas
'activa caducidad 'activa caducidad
ThCaducidadSalida.Visible = AplicaCaducidad ThCaducidadSalida.Visible = AplicaCaducidad
ThCaducidadSalida.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
TrCaducidadSalida.Visible = AplicaCaducidad TrCaducidadSalida.Visible = AplicaCaducidad
Else Else

View File

@@ -398,7 +398,7 @@
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Entregas solo a:</span> <span class="caption-subject bold uppercase">PERSONAL AUTORIZADO PARA ENTREGAS EN ALMACÉN:</span>
</div> </div>
</div> </div>
<div class="portlet-body form"> <div class="portlet-body form">
@@ -456,7 +456,7 @@
<div class="col-md-2 pull-right"> <div class="col-md-2 pull-right">
<div class="btn-group" style="float: right;"> <div class="btn-group" style="float: right;">
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" /> <asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Sugerencias" />
</div> </div>
</div> </div>
<div class="col-md-4 pull-right"> <div class="col-md-4 pull-right">
@@ -516,7 +516,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false"> <asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLote" CssClass="form-control" runat="server" Visible="false"></asp:TextBox> <asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="F.Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false"> <asp:TemplateField HeaderText="F.Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
@@ -527,7 +527,7 @@
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton> <asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Enabled="True" Format="dd/MM/yyyy" ></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
</span> </span>
@@ -847,7 +847,7 @@
<asp:GridView ID="GvSugerencias" runat="server" EmptyDataText="No se encontraron registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None"> <asp:GridView ID="GvSugerencias" runat="server" EmptyDataText="No se encontraron registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Sección Almacen" DataField="Seccion" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Sección Almacen" DataField="Seccion" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />

File diff suppressed because it is too large Load Diff

View File

@@ -565,8 +565,10 @@
DataKeyNames="Almacen,Cantidad,FechaCaducidad"> DataKeyNames="Almacen,Cantidad,FechaCaducidad">
<Columns> <Columns>
<asp:BoundField HeaderText="Almacén" DataField="Almacen"/> <asp:BoundField HeaderText="Almacén" DataField="Almacen"/>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right"/> <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Right"/>
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}"/> <asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="125px"/>
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="125px"/>
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="100px"/>
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -207,8 +207,14 @@ Partial Class Inventarios_Kardex
If AplicaLote Then GvM.Columns(10).Visible = True If AplicaLote Then GvM.Columns(10).Visible = True
If AplicaCaducidad Then GvM.Columns(11).Visible = True If AplicaCaducidad Then GvM.Columns(11).Visible = True
Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True" Dim Drp As datarow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("")
Dim AuxAplicaCad As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaCaducidad") = "True" Dim AuxAplicaSerie As Boolean
Dim AuxAplicaCad As Boolean
If Drp IsNot Nothing Then
AuxAplicaSerie = Drp("AplicaSerie").ToString = "True"
AuxAplicaCad = Drp("AplicaCaducidad").ToString = "True"
End If
LnkSeries.Visible = AuxAplicaSerie LnkSeries.Visible = AuxAplicaSerie
LnkCaducidad.Visible = AuxAplicaCad LnkCaducidad.Visible = AuxAplicaCad
'CARGA INDICADORES 'CARGA INDICADORES
@@ -338,9 +344,15 @@ Partial Class Inventarios_Kardex
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetExistenciasCaducidad(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then If ObjInventarios.GetExistenciasCaducidad(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
GvProductoCaducidad.DataSource = ObjInventarios.DtResultados GvProductoCaducidad.DataSource = ObjInventarios.DtResultados
GvProductoCaducidad.columns(2).visible = ObjInventarios.DtResultados.max("Serie") <> ""
GvProductoCaducidad.columns(3).visible = ObjInventarios.DtResultados.max("Lote") <> ""
GvProductoCaducidad.columns(4).visible = ObjInventarios.DtResultados.max("FechaCaducidad").todate > minfecha
End If End If
ObjInventarios.Dispose() ObjInventarios.Dispose()
GvProductoCaducidad.DataBind() GvProductoCaducidad.DataBind()
End Sub End Sub
#End Region #End Region

View File

@@ -159,7 +159,9 @@
</div> </div>
<label class="col-md-1 truncate">Almacén:</label> <label class="col-md-1 truncate">Almacén:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="ddlAlmacen" runat="server" CssClass="select2me " Style="width: 200px !important;" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList> <asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"
DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
<%--<asp:DropDownList ID="ddlAlmacen" runat="server" CssClass="select2me " Style="width: 200px !important;" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>--%>
</div> </div>
<label class="col-md-1 truncate">Tipo Almacen:</label> <label class="col-md-1 truncate">Tipo Almacen:</label>
<div class="col-md-1"> <div class="col-md-1">
@@ -200,6 +202,7 @@
<asp:Label runat="server" ID="LblProyectado" Text="Incluir Proyectados" class="col-md-1 truncate" /> <asp:Label runat="server" ID="LblProyectado" Text="Incluir Proyectados" class="col-md-1 truncate" />
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlProyeccionFiltro" runat="server" CssClass="select2me" Width="100%" > <asp:DropDownList ID="DdlProyeccionFiltro" runat="server" CssClass="select2me" Width="100%" >
<asp:ListItem Text="Todos (Entradas/Salidas)" Value="3" />
<asp:ListItem Text="Entradas" Value="1" /> <asp:ListItem Text="Entradas" Value="1" />
<asp:ListItem Text="Salidas" Value="2" /> <asp:ListItem Text="Salidas" Value="2" />
<asp:ListItem Text="No" Value="0" Selected="True" /> <asp:ListItem Text="No" Value="0" Selected="True" />

View File

@@ -53,7 +53,7 @@ Partial Class Inventarios_KardexAlmacen
DdlTipoAlmacen.SelectedValueExist(1) DdlTipoAlmacen.SelectedValueExist(1)
If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then ddlAlmacen.SelectedValueExist(Request("CveAlmacen").ToString) If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then ddlAlmacen.SelectedValue = Request("CveAlmacen").ToString
CargaClasificaciones() CargaClasificaciones()
End Sub End Sub
@@ -136,11 +136,11 @@ Partial Class Inventarios_KardexAlmacen
Dim FechaI As String = "-1" ' If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1") Dim FechaI As String = "-1" ' If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
' Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1") ' Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
Dim FechaF As Date = TxtFechaF.Text.ToDate Dim FechaF As Date = TxtFechaF.Text.ToDate
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues()
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1) Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM) Dim Marcas As String = If(DdlMarca.GetSelectedValuesM = "", "-1", DdlMarca.GetSelectedValuesM)
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero) Then If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), DdlIncluyeTransitorios.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes) Then
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
dt = ObjMovimientos.DtResultados dt = ObjMovimientos.DtResultados
Dim ListaBorrar As New List(Of DataColumn) Dim ListaBorrar As New List(Of DataColumn)
@@ -396,9 +396,7 @@ Partial Class Inventarios_KardexAlmacen
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
ObjInventarios.IniciaTransacSQL() ObjInventarios.IniciaTransacSQL()
Dim TipoMovot As Integer = If(RblProyeccionOpcion.SelectedValue = "1", 0, 1) If ObjInventarios.DeleteMovimientosProyectados(RblProyeccionOpcion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
If ObjInventarios.DeleteMovimientosProyectados(TipoMovot) Then
Dim DtProductosEmpresas As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) Dim DtProductosEmpresas As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
For Each dtRow As DataRow In dt.Rows For Each dtRow As DataRow In dt.Rows
Dim Codigo As String = dtRow("Código").ToString Dim Codigo As String = dtRow("Código").ToString

View File

@@ -478,13 +478,13 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false"> <asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLote" CssClass="form-control" runat="server" Visible="false"></asp:TextBox> <asp:TextBox ID="TxtLote" Width="80px" class="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false"> <asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
<ItemTemplate> <ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server" Visible="false"></asp:TextBox> <asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server" Visible="false"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton> <asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
</span> </span>

View File

@@ -1306,6 +1306,7 @@ Partial Class Inventarios_RecepcionAlmacen
If AplicaSeccion Then GvInv.Columns(11).Visible = True If AplicaSeccion Then GvInv.Columns(11).Visible = True
If AplicaLote Then GvInv.Columns(12).Visible = True If AplicaLote Then GvInv.Columns(12).Visible = True
GvInv.Columns(13).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
If AplicaCaducidad Then GvInv.Columns(13).Visible = True If AplicaCaducidad Then GvInv.Columns(13).Visible = True
If AplicaSerie OrElse AplicaSeccion OrElse AplicaLote OrElse AplicaCaducidad Then If AplicaSerie OrElse AplicaSeccion OrElse AplicaLote OrElse AplicaCaducidad Then
@@ -3017,8 +3018,8 @@ Partial Class Inventarios_RecepcionAlmacen
'si es el último movimiento verifica los importes que sean igual 'si es el último movimiento verifica los importes que sean igual
If cont = DtCostos.Rows.Count AndAlso (Math.Round(TotalCosto, 2) <> Math.Round(TotalCostoAcumulado, 2)) Then If cont = DtCostos.Rows.Count AndAlso (Math.Round(TotalCosto, 2) <> Math.Round(TotalCostoAcumulado, 2)) Then
TotalCostoDetalle = TotalCostoDetalle + (Math.Round(TotalCosto, 2) - Math.Round(TotalCostoAcumulado, 2)) TotalCostoDetalle = TotalCostoDetalle + (Math.Round(TotalCosto, 3) - Math.Round(TotalCostoAcumulado, 3))
TotalCostoExtranjero = TotalCostoExtranjero + (Math.Round(TotalCosto, 2) - Math.Round(TotalCostoAcumulado, 2)) TotalCostoExtranjero = TotalCostoExtranjero + (Math.Round(TotalCosto, 3) - Math.Round(TotalCostoAcumulado, 3))
End If End If
If CveMoneda <> 1 AndAlso UsaComplementariaFleteImportaciones Then If CveMoneda <> 1 AndAlso UsaComplementariaFleteImportaciones Then

View File

@@ -40,7 +40,7 @@
<div class="col-sm-1" style="text-align:right"> <div class="col-sm-1" style="text-align:right">
<label>Proveedor:</label> <label>Proveedor:</label>
</div> </div>
<div class="col-md-1"> <div class="col-sm-2">
<ADS:Dropdownlost ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%;"></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div> </div>
<div class="col-sm-1" style="text-align:right"> <div class="col-sm-1" style="text-align:right">
@@ -72,19 +72,28 @@
<div class="col-sm-1" style="text-align:right"> <div class="col-sm-1" style="text-align:right">
<label>Sucursal:</label> <label>Sucursal:</label>
</div> </div>
<div class="col-md-1"> <div class="col-sm-1">
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
</div> </div>
<div class="col-sm-1" style="text-align:right">
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
<div class="row">
<div class="col-sm-1" style="text-align:right">
<label>Clasificación:</label> <label>Clasificación:</label>
</div> </div>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%"/> <asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" CssStyle="width: 100%;"/>
</div> </div>
</div>
</div> </div>
</div> </div>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">

View File

@@ -1054,7 +1054,7 @@ Partial Class Inventarios_TraspasoAlmacen
'DdlClasificacion.SelectedValue = "-1" 'DdlClasificacion.SelectedValue = "-1"
'DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty) 'DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
If ChkEmitirTimbrado.Checked Then CveMovimientoTimbrado = CveMovimientoSalida : Timbrar() If ChkEmitirTimbrado.Checked AndAlso ChkTransitorio.Checked Then CveMovimientoTimbrado = CveMovimientoSalida : Timbrar()
Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion, "") Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion, "")
@@ -1072,21 +1072,21 @@ Partial Class Inventarios_TraspasoAlmacen
LimpiaMovimiento() LimpiaMovimiento()
Else Else
ObjInventario.RollBack() ObjInventario.RollBack()
Alert(TextoError, TipoMensaje.MsgError) Alert(TextoError, TipoMensaje.MsgError)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')") RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
End If End If
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose() ' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR 'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
If ErrorExistencia Then If ErrorExistencia Then
CargaGvDatos() CargaGvDatos()
End If End If
ObjConta.Dispose() ObjConta.Dispose()
ObjInventario.Dispose() ObjInventario.Dispose()
End Sub End Sub
Function ConsumoInterno(TipoAlmacenOrigen As Integer, TipoAlmacenDestino As Integer) As Boolean Function ConsumoInterno(TipoAlmacenOrigen As Integer, TipoAlmacenDestino As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -1265,6 +1265,7 @@ Partial Class Inventarios_TraspasoAlmacen
TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad")) TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad")) ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
ThFechaCaducidad.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad")) TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad")) 'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))

View File

@@ -1,6 +1,15 @@
/* here you can put your own css to customize and override the theme */ /* here you can put your own css to customize and override the theme */
/* establezco el color de fondo de total, sin importar que este en un renglon alternativo */ /* establezco el color de fondo de total, sin importar que este en un renglon alternativo */
@media (max-width: 768px) {
.ContentPlaceHolderc {
max-width: 100%;
overflow-x: auto !important;
}
}
.table-striped > tbody > tr:nth-of-type(odd).ADSRow, .table-striped > tbody > tr:nth-of-type(odd).ADSRow,
table > tbody > tr.ADSRow > td, table.table > tbody > tr.ADSRow > td, table > tbody > tr.ADSRow > td, table.table > tbody > tr.ADSRow > td,
table > tr.ADSRow > td, table.table > tr.ADSRow > td, table > tr.ADSRow > td, table.table > tr.ADSRow > td,
@@ -49,7 +58,7 @@ table > tr > th.adsCol, table.table > tr > th.adsCol {
.AdsBody .ADSCroll::-webkit-scrollbar { .AdsBody .ADSCroll::-webkit-scrollbar {
width: 8px; width: 8px;
height:10px; height: 10px;
background-color: #F5F5F5; background-color: #F5F5F5;
} }
@@ -467,28 +476,29 @@ input[type="hidden"] {
position: relative; position: relative;
display: block; display: block;
padding: 10px 15px; padding: 10px 15px;
text-align:center; text-align: center;
} }
.tab-wizard2 .ajax__tab_outer a.ajax__tab_tab > span::before { .tab-wizard2 .ajax__tab_outer a.ajax__tab_tab > span::before {
content: ' '; content: ' ';
display: block; display: block;
} }
.tab-wizard2 .ajax__tab_outer a.ajax__tab_tab::before {
background-color: #eee; .tab-wizard2 .ajax__tab_outer a.ajax__tab_tab::before {
text-align: center !important; background-color: #eee;
padding: 13px 15px 11px; text-align: center !important;
height: 45px; padding: 13px 15px 11px;
width: 45px; height: 45px;
-webkit-border-radius: 50% !important; width: 45px;
-moz-border-radius: 50% !important; -webkit-border-radius: 50% !important;
border-radius: 50% !important; -moz-border-radius: 50% !important;
counter-increment: section; border-radius: 50% !important;
content: ' 'counter(section); counter-increment: section;
display: inline-block; content: ' 'counter(section);
position: relative; display: inline-block;
margin-right:4px; position: relative;
} margin-right: 4px;
}
.tab-wizard2 .ajax__tab_active .ajax__tab_outer a.ajax__tab_tab::before { .tab-wizard2 .ajax__tab_active .ajax__tab_outer a.ajax__tab_tab::before {
background-color: rgb(54, 198, 211); background-color: rgb(54, 198, 211);
@@ -728,11 +738,12 @@ div.ADScroller {
line-height: .5 !important; line-height: .5 !important;
} }
div:not(.ADScroller-header)>table tbody .trnopadding.ADtr { div:not(.ADScroller-header) > table tbody .trnopadding.ADtr {
visibility: hidden; visibility: hidden;
} }
.ADScroller-header>table tbody .trnopadding.ADtr td{
background-color :#ddd; .ADScroller-header > table tbody .trnopadding.ADtr td {
background-color: #ddd;
} }
div.ADScroller-header { div.ADScroller-header {
@@ -2661,6 +2672,7 @@ select.select2-offscreen, select.select2-offscreen:focus {
font-size: 20px; font-size: 20px;
margin-top: 15px; margin-top: 15px;
} }
.addropzone.dz-clickable:after { .addropzone.dz-clickable:after {
position: absolute; position: absolute;
content: "o presione doble click"; content: "o presione doble click";
@@ -2925,9 +2937,9 @@ select.select2-offscreen, select.select2-offscreen:focus {
margin-right: 0px; margin-right: 0px;
} }
.select2 .select2-selection__rendered{ .select2 .select2-selection__rendered {
line-height:1; line-height: 1;
color:#111; color: #111;
} }
.select2 .select2-selection--multiple { .select2 .select2-selection--multiple {
@@ -2951,18 +2963,21 @@ select.select2-offscreen, select.select2-offscreen:focus {
.btn-consultar { .btn-consultar {
background: #444; background: #444;
color:#fff
}
.btn-consultar:hover {
background: #2f353b;
color: #fff color: #fff
} }
.btn-consultar:hover {
background: #2f353b;
color: #fff
}
.ADScroller > div > table.table.table-smallpadding > tbody > tr > td:nth-last-child(1) a, table.ScrollAD.table.table-smallpadding > tbody > tr > td:nth-last-child(1) a, .ADScroller > div > table.table.table-smallpadding > tbody > tr > td:nth-last-child(1) a, table.ScrollAD.table.table-smallpadding > tbody > tr > td:nth-last-child(1) a,
.ADScroller > div > table.table.table-smallpadding > tbody > tr > th:nth-last-child(1) a, table.ScrollAD.table.table-smallpadding > tbody > tr > th:nth-last-child(1) a, .ADScroller > div > table.table.table-smallpadding > tbody > tr > th:nth-last-child(1) a, table.ScrollAD.table.table-smallpadding > tbody > tr > th:nth-last-child(1) a,
.ADScroller > div > table.table.table-smallpadding > tbody > tr > td:nth-last-child(1) span, table.ScrollAD.table.table-smallpadding > tbody > tr > td:nth-last-child(1) span, .ADScroller > div > table.table.table-smallpadding > tbody > tr > td:nth-last-child(1) span, table.ScrollAD.table.table-smallpadding > tbody > tr > td:nth-last-child(1) span,
.ADScroller > div > table.table.table-smallpadding > tbody > tr > th:nth-last-child(1) span, table.ScrollAD.table.table-smallpadding > tbody > tr > th:nth-last-child(1) span{ .ADScroller > div > table.table.table-smallpadding > tbody > tr > th:nth-last-child(1) span, table.ScrollAD.table.table-smallpadding > tbody > tr > th:nth-last-child(1) span {
padding-right: 7px; padding-right: 7px;
} }
div.mypaste * { div.mypaste * {
display: none; display: none;
} }

View File

@@ -200,17 +200,21 @@ Partial Class Ventas_ActualizarPrecios
Exit Sub Exit Sub
End If End If
Dim Correcto As Boolean = False Dim Correcto As Boolean = False
Dim TieneError As Boolean = False
'Dim Importe As Decimal = If(TxtImporte.Text = "", -1, TxtImporte.Text.ToDecimal) 'Dim Importe As Decimal = If(TxtImporte.Text = "", -1, TxtImporte.Text.ToDecimal)
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal) Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
Dim ObjPS As New ClsProductosServicios Dim ObjPS As New ClsProductosServicios
ObjPS.IniciaTransacSQL()
For Each row As GridViewRow In GVPrecios.Rows For Each row As GridViewRow In GVPrecios.Rows
If row.FCCheckBox("chkPS").Checked Then If row.FCCheckBox("chkPS").Checked Then
Correcto = ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal) Correcto = ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal)
If Not Correcto Then
If Correcto Then
TieneError = ActualizarPreciosFranquicia(ObjPS, row)
Else
Exit Sub Exit Sub
End If End If
End If End If
@@ -221,6 +225,11 @@ Partial Class Ventas_ActualizarPrecios
Alert("Los Precios de lista de los Productos/Servicios se actualizaron correctamente") Alert("Los Precios de lista de los Productos/Servicios se actualizaron correctamente")
End If End If
If TieneError Then
ObjPS.RollBack()
Else
ObjPS.Commit()
End If
ObjPS.Dispose() ObjPS.Dispose()
BtnConsultar_Click(Nothing, Nothing) BtnConsultar_Click(Nothing, Nothing)
@@ -517,4 +526,29 @@ Partial Class Ventas_ActualizarPrecios
e.Row.FCTextBox("TxtPrecioMinimo").Attributes.Add("onKeyUp", String.Format("FncSeleccionaChk({0});", e.Row.FCCheckBox("chkSucursal").ClientID)) e.Row.FCTextBox("TxtPrecioMinimo").Attributes.Add("onKeyUp", String.Format("FncSeleccionaChk({0});", e.Row.FCCheckBox("chkSucursal").ClientID))
End If End If
End Sub End Sub
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, row As GridViewRow) As Boolean
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(137)
Dim Franquicias = FranquiciasStr.Split(","c)
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
Dim Codigo As String = row.DataKey("Codigo")
For Each Franquicia In Franquicias
Dim CveFranquicia As Integer = Franquicia.ToEntero
Dim CvePS As Integer = GlobalDTPS(CveFranquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo LIKE '%{0}%'", Codigo)).ToEntero
Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", DdlPrecioLista.SelectedItem.Text)).ToEntero
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
If CvePS <= 0 Then
Alert(String.Format("El producto '{0}' no se encuentra en la Franquicia '{1}'", row.DataKey("PS"), EmpresaFranquicia), TipoMensaje.MsgAdvertencia)
Return True
End If
If CvePrecioLisa <= 0 Then
Alert(String.Format("El precio lista '{0}' no existe en la Franquicia '{1}'", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia), TipoMensaje.MsgAdvertencia)
Return True
End If
If Not ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal) Then
Return True
End If
Next
Return False
End Function
End Class End Class

View File

@@ -844,11 +844,11 @@
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Entregas solo a:</span> <span class="caption-subject bold uppercase">PERSONAL AUTORIZADO PARA ENTREGAS EN ALMACÉN:</span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<asp:LinkButton runat="server" ID="BtnAgregarClientePersonalEntrega" data-toggle="tooltip" data-placement="right" title="Agregar dirección de envio." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar"></asp:LinkButton> <asp:LinkButton runat="server" ID="BtnAgregarClientePersonalEntrega" data-toggle="tooltip" data-placement="right" title="Agregar personal autorizado para entregas." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar"></asp:LinkButton>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1238,6 +1238,9 @@ Partial Class ProductosyServicios
End If End If
Next Next
End If End If
If UsuarioActual.CveEmpresa = 141 Then
TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, True)
End If
Else Else
TieneError = True TieneError = True
@@ -1301,6 +1304,9 @@ Partial Class ProductosyServicios
Next Next
End If End If
If UsuarioActual.CveEmpresa = 141 Then
TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, False)
End If
Else Else
TieneError = True TieneError = True
@@ -1632,11 +1638,15 @@ Partial Class ProductosyServicios
If CvePSAdicional < 0 Then If CvePSAdicional < 0 Then
If Not ObjProductosServicios.AddPSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then If Not ObjProductosServicios.AddPSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
TieneError = True TieneError = True
Else
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, True)
End If End If
Else Else
If Not ObjProductosServicios.UpdatePSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then If Not ObjProductosServicios.UpdatePSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
TieneError = True TieneError = True
Else
TieneError = GuardarProductosEquivalenteEnFranquicia(ObjProductosServicios, False)
End If End If
End If End If
@@ -2751,4 +2761,148 @@ Partial Class ProductosyServicios
DivTiempoCaducidad.Visible = Activar DivTiempoCaducidad.Visible = Activar
RfvTxtTiempoCaducidad.Enabled = Activar RfvTxtTiempoCaducidad.Enabled = Activar
End Sub End Sub
Private Function GuardarProductoEnFranquicia(ObjPS As ClsProductosServicios, PSS As String, CveMetodoInv As Integer, EsPaquete As Integer, Agregar As Boolean) As Boolean
Dim EmpresasFranquicia = New Integer() {152}
For Each Franquicia As Integer In EmpresasFranquicia
Dim nombreEmpresa As String = GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")
Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion.SelectedItem.Text)).ToEntero
Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveUnidadMedida", String.Format("UnidadMedida = '{0}'", DdlUnidadMedida.SelectedItem.Text)).ToEntero
Dim CveClasificacion2 As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion2.SelectedItem.Text)).ToEntero
Dim CveTipo As Integer = GlobalDTClasificacionesDetalle(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacionDetalle", String.Format("ClasificacionDetalle = '{0}'", DdlTipoPSDes.SelectedItem.Text)).ToEntero
Dim CveMarcaFranquicia As Integer = -1
If ObjPS.GetMarcas(Franquicia) Then
CveMarcaFranquicia = ObjPS.DtResultados.FiltroPrimeroValor("CveMarca", String.Format("Marca = '{0}'", DdlMarca.SelectedItem.Text)).ToEntero
End If
Dim CveModelo As Integer = -1
Dim CveMedida As Integer = -1
Dim CveRin As Integer = -1
Dim ObjGral As New ClsGenerales()
If ObjGral.GetModelos(Franquicia) Then
CveModelo = ObjGral.DtResultados.FiltroPrimeroValor("CveModelo", String.Format("Modelo = '{0}'", DdlModelo.SelectedItem.Text)).ToEntero
End If
If ObjGral.GetMedidas(Franquicia) Then
CveMedida = ObjGral.DtResultados.FiltroPrimeroValor("CveMedida", String.Format("Medida = '{0}'", DdlMedida.SelectedItem.Text)).ToEntero
End If
If ObjGral.GetRimTamanios(Franquicia) Then
CveRin = ObjGral.DtResultados.FiltroPrimeroValor("CveRinTamaño", String.Format("RinTamaño = '{0}'", DdlRin.SelectedItem.Text)).ToEntero
End If
ObjGral.Dispose()
If CveClasificacion <= 0 Then
Alert(String.Format("La clasificación indicada no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveUnidadMedida <= 0 Then
Alert(String.Format("La unidad de medida indicada no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveTipo <= 0 And DdlTipoPSDes.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("El tipo de producto indicado no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveMarcaFranquicia <= 0 And DdlMarca.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("La marca indicada no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveModelo <= 0 And DdlModelo.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("El modelo indicado no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveMedida <= 0 And DdlMedida.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("La medida indicada no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If CveRin <= 0 And DdlRin.SelectedValue.ToEntero <> -1 Then
Alert(String.Format("El rin indicado no existe en la franquicia: '{0}'", nombreEmpresa), TipoMensaje.MsgAdvertencia)
Return True
End If
If Agregar Then
If Not ObjPS.AddPS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, DdlProveedor.txtValue.Value.ToEntero, True, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario,
Franquicia, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2,
CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100),
PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero,
CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo,
CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString,
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then
'Alert(String.Format("Error al agregar el nuevo producto en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")))
Return True
End If
Else
If ObjPS.GetPS(-1, -1, Franquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS").ToEntero()
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked,
VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal,
CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario,
CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo,
CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString,
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked,
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then
Return True
End If
Else
Alert(String.Format("El producto no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
Return True
End If
End If
Next
Return False
End Function
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, Agregar As Boolean) As Boolean
Dim EmpresasFranquicia = ObtenerFranquiciasInt()
For Each Franquicia As Integer In EmpresasFranquicia
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", DdlPSAdicional.SelectedItem.Text)).ToEntero
If CvePSPagina <= 0 Then
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
End If
If CvePSPagina <= 0 Then
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
End If
If Agregar Then
If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
Return True
End If
Else
Dim PSAnterior As String = GlobalDTPS(Franquicia).FiltroPrimeroValor("PS", String.Format("CvePS = '{0}'", CvePSAdicional))
Dim CvePSAnterio As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAnterior)).ToEntero
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvePSAnterio, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
Return True
End If
End If
Next
Return False
End Function
Private Function ObtenerFranquiciasInt() As Integer()
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(137)
Dim Franquicias = FranquiciasStr.Split(","c)
Dim ReturnFranquicias(Franquicias.Length) As Integer
Dim Contador As Integer = 0
For Each Franquicia In Franquicias
ReturnFranquicias(Contador) = Franquicia.ToEntero
Contador += 1
Next
Return ReturnFranquicias
End Function
End Class End Class

View File

@@ -11551,7 +11551,7 @@ Partial Class Ventas
End If End If
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"}) DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
If DT.Rows.Count > 0 Then If DT.Rows.Count > 0 Then
'Se agrega movimiento separado por la cuenta de ventas (ER) 'Se agrega movimiento separado por la cuenta de ventas (ER)
@@ -11584,8 +11584,6 @@ Partial Class Ventas
If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142 If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142
End If End If
' CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then If IdCtaContable <= 0 Then
@@ -11593,12 +11591,7 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
'If CveCuenta <= 0 Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
' CveCuentaContabilizacion = 0
'End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
ViewState("SeGuardoPrePoliza") = True ViewState("SeGuardoPrePoliza") = True
@@ -24016,7 +24009,7 @@ Partial Class Ventas
If Math.Abs(difTmp) > 0.00D Then If Math.Abs(difTmp) > 0.00D Then
'asusto la diferencia en el último concepto 'asusto la diferencia en el último concepto
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + Math.Abs(difTmp) Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + difTmp
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado
End If End If

View File

@@ -118,6 +118,14 @@