Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -128,7 +128,8 @@ Public Class ClsClientes
|
|||||||
Public Property CveFormaPago33 As Integer
|
Public Property CveFormaPago33 As Integer
|
||||||
Public Property CveMetodoPago33 As Integer
|
Public Property CveMetodoPago33 As Integer
|
||||||
Public Property CveClienteCorporativo As String
|
Public Property CveClienteCorporativo As String
|
||||||
Public Property DesglosaIEPS As Boolean
|
Public Property DesglosaIEPS As Boolean
|
||||||
|
Public Property NoDesglosaIVA As Boolean
|
||||||
Public Property AplicaComercioExterior As Boolean
|
Public Property AplicaComercioExterior As Boolean
|
||||||
Public Property CveTipoOperacion As Integer
|
Public Property CveTipoOperacion As Integer
|
||||||
Public Property CvePedimento As Integer
|
Public Property CvePedimento As Integer
|
||||||
@@ -385,6 +386,7 @@ Public Class ClsClientes
|
|||||||
|
|
||||||
_CveClienteCorporativo = Data(0)("CveClienteCorporativo").ToString
|
_CveClienteCorporativo = Data(0)("CveClienteCorporativo").ToString
|
||||||
_DesglosaIEPS = CType(Data(0)("DesglosaIEPS"), Boolean)
|
_DesglosaIEPS = CType(Data(0)("DesglosaIEPS"), Boolean)
|
||||||
|
_NoDesglosaIVA = CType(Data(0)("NoDesglosaIVA"), Boolean)
|
||||||
|
|
||||||
_AplicaComercioExterior = CType(Data(0)("AplicaComercioExterior"), Boolean)
|
_AplicaComercioExterior = CType(Data(0)("AplicaComercioExterior"), Boolean)
|
||||||
_CveTipoOperacion = Data(0)("CveTipoOperacion").ToString.ToEntero
|
_CveTipoOperacion = Data(0)("CveTipoOperacion").ToString.ToEntero
|
||||||
@@ -513,18 +515,22 @@ Public Class ClsClientes
|
|||||||
'SqlAdapter.Dispose()
|
'SqlAdapter.Dispose()
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetHistorialVentas(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1", Optional CveEstatusFactura As Integer = -1, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean
|
Public Function GetHistorialVentas(CveCliente As Integer, CveEmpresa As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1", Optional CveEstatusFactura As Integer = -1, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_ClienteHistorialVentas")
|
DataAdapter("PA_ClienteHistorialVentas")
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@SelectTop", SqlDbType.Int).Value = SelectTop
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
.Add("@SelectTop", SqlDbType.Int).Value = SelectTop
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
|
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
|
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
|
||||||
SqlAdapter.SelectCommand.Parameters.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
@@ -757,7 +763,7 @@ Public Class ClsClientes
|
|||||||
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
|
Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1",
|
||||||
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
|
Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False,
|
||||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
|
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
|
||||||
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1) As Boolean
|
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -878,6 +884,7 @@ Public Class ClsClientes
|
|||||||
.Add("@CveClienteCorporativo", SqlDbType.Int).Value = CveClienteCorporativo
|
.Add("@CveClienteCorporativo", SqlDbType.Int).Value = CveClienteCorporativo
|
||||||
|
|
||||||
.Add("@DesglosaIEPS", SqlDbType.Bit).Value = If(DesglosaIEPS, 1, 0)
|
.Add("@DesglosaIEPS", SqlDbType.Bit).Value = If(DesglosaIEPS, 1, 0)
|
||||||
|
.Add("@NoDesglosaIVA", SqlDbType.Bit).Value = If(NoDesglosaIVA, 1, 0)
|
||||||
|
|
||||||
.Add("@AplicaComercioExterior", SqlDbType.Bit).Value = AplicaComercioExterior
|
.Add("@AplicaComercioExterior", SqlDbType.Bit).Value = AplicaComercioExterior
|
||||||
.Add("@CveTipoOperacion", SqlDbType.Int).Value = CveTipoOperacion
|
.Add("@CveTipoOperacion", SqlDbType.Int).Value = CveTipoOperacion
|
||||||
|
|||||||
@@ -438,12 +438,12 @@ Public Class ClsCompras
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddCompraDetalle(CveCompra As Integer, CveUM As Integer, CvePS As Integer, CveSubProyecto As Integer, CveCliente As Integer, CveActivoFijo As Integer,
|
Public Function AddCompraDetalle(CveCompra As Integer, CveUM As Integer, CvePS As Integer, CveSubProyecto As Integer, CveCliente As Integer, CveActivoFijo As Integer,
|
||||||
Cantidad As Double, PU As Double, IVA As Double, Total As Double, Descuento As Double, Observaciones As String, CveOCDetalle As Integer,
|
Cantidad As Decimal, PU As Decimal, IVA As Decimal, Total As Decimal, Descuento As Decimal, Observaciones As String, CveOCDetalle As Integer,
|
||||||
Optional TipoRecepcion As Integer = -1, Optional CveContrato As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1,
|
Optional TipoRecepcion As Integer = -1, Optional CveContrato As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1,
|
||||||
Optional AplicaCostoIndirecto As Integer = -1, Optional EstatusAlmacen As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveTipoGasto As Integer = -1,
|
Optional AplicaCostoIndirecto As Integer = -1, Optional EstatusAlmacen As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveTipoGasto As Integer = -1,
|
||||||
Optional AF_Medida As Integer = -1, Optional AF_TipoMantenimiento As Integer = -1, Optional Referencia As String = "", Optional OtrosGastos As Decimal = 0,
|
Optional AF_Medida As Integer = -1, Optional AF_TipoMantenimiento As Integer = -1, Optional Referencia As String = "", Optional OtrosGastos As Decimal = 0,
|
||||||
Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0,
|
Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0,
|
||||||
Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0, Optional IEPSPSIVAPorcentaje As Double = 0,
|
Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0, Optional IEPSPSIVAPorcentaje As Decimal = 0,
|
||||||
Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
|
Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -457,12 +457,12 @@ Public Class ClsCompras
|
|||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
|
||||||
.Add("@PU", SqlDbType.Float).Value = PU
|
.Add("@PU", SqlDbType.Decimal).Value = PU
|
||||||
.Add("@IVA", SqlDbType.Float).Value = IVA
|
.Add("@IVA", SqlDbType.Decimal).Value = IVA
|
||||||
.Add("@Total", SqlDbType.Float).Value = Total
|
.Add("@Total", SqlDbType.Decimal).Value = Total
|
||||||
.Add("@Descuento", SqlDbType.Float).Value = Descuento
|
.Add("@Descuento", SqlDbType.Decimal).Value = Descuento
|
||||||
.Add("@OtrosGastos", SqlDbType.Float).Value = OtrosGastos
|
.Add("@OtrosGastos", SqlDbType.Decimal).Value = OtrosGastos
|
||||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
.Add("@CveOCDetalle", SqlDbType.Int).Value = CveOCDetalle
|
.Add("@CveOCDetalle", SqlDbType.Int).Value = CveOCDetalle
|
||||||
.Add("@TipoRecepcion", SqlDbType.Int).Value = TipoRecepcion
|
.Add("@TipoRecepcion", SqlDbType.Int).Value = TipoRecepcion
|
||||||
@@ -476,16 +476,16 @@ Public Class ClsCompras
|
|||||||
.Add("@AF_TipoMantenimiento", SqlDbType.Int).Value = AF_TipoMantenimiento
|
.Add("@AF_TipoMantenimiento", SqlDbType.Int).Value = AF_TipoMantenimiento
|
||||||
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
||||||
.Add("@CveCompraDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@CveCompraDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA
|
.Add("@RetIVA", SqlDbType.Decimal).Value = RetIVA
|
||||||
.Add("@RetISR", SqlDbType.Float).Value = RetISR
|
.Add("@RetISR", SqlDbType.Decimal).Value = RetISR
|
||||||
.Add("@IEPSPS", SqlDbType.Float).Value = IEPSPS
|
.Add("@IEPSPS", SqlDbType.Decimal).Value = IEPSPS
|
||||||
.Add("@IEPSPSIVA", SqlDbType.Float).Value = IEPSPSIVA
|
.Add("@IEPSPSIVA", SqlDbType.Decimal).Value = IEPSPSIVA
|
||||||
|
|
||||||
.Add("@IVAPorcentaje", SqlDbType.Float).Value = IVAPorcentaje
|
.Add("@IVAPorcentaje", SqlDbType.Decimal).Value = IVAPorcentaje
|
||||||
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
|
.Add("@RetIVAPorcentaje", SqlDbType.Decimal).Value = RetIVAPorcentaje
|
||||||
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
|
.Add("@RetISRPorcentaje", SqlDbType.Decimal).Value = RetISRPorcentaje
|
||||||
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje
|
.Add("@IEPSPSPorcentaje", SqlDbType.Decimal).Value = IEPSPSPorcentaje
|
||||||
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
|
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Decimal).Value = IEPSPSIVAPorcentaje
|
||||||
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
|
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
|
||||||
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||||
.Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle
|
.Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle
|
||||||
|
|||||||
@@ -490,6 +490,30 @@ Public Class ClsContratos
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Usado en conrtatos Obra
|
||||||
|
Public Function AbrirCerrarContrato(CveContrato As Integer, CveEmpresa As Integer, Cerrar As Boolean, CveUsuario As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Con_ContratosObraAbrirCerrar")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Cerrar", SqlDbType.Bit).Value = Cerrar
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al abrir o cerrar el contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'Public Function AddContratosTipo1(NumeroContrato As String, DescripcionContrato As String, CveProveedor As Integer, CveCliente As Integer, FechaInicial As DateTime, FechaFinal As DateTime,
|
'Public Function AddContratosTipo1(NumeroContrato As String, DescripcionContrato As String, CveProveedor As Integer, CveCliente As Integer, FechaInicial As DateTime, FechaFinal As DateTime,
|
||||||
@@ -550,7 +574,8 @@ Public Class ClsContratos
|
|||||||
Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
||||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0) As Integer
|
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0,
|
||||||
|
Optional ImporteSubTotal As Decimal = 0) As Integer
|
||||||
|
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
DataAdapter("PA_Con_ContratosObraAdd")
|
DataAdapter("PA_Con_ContratosObraAdd")
|
||||||
@@ -603,6 +628,7 @@ Public Class ClsContratos
|
|||||||
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
||||||
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
||||||
.Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto
|
.Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto
|
||||||
|
.Add("@ImporteSubTotal", SqlDbType.Money).Value = ImporteSubTotal
|
||||||
|
|
||||||
.Add("@CveContrato", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@CveContrato", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
|
|
||||||
@@ -629,7 +655,8 @@ Public Class ClsContratos
|
|||||||
CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
||||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0) As Boolean
|
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0,
|
||||||
|
Optional ImporteSubTotal As Decimal = 0) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Con_ContratosObraUpdate")
|
DataAdapter("PA_Con_ContratosObraUpdate")
|
||||||
@@ -680,7 +707,8 @@ Public Class ClsContratos
|
|||||||
.Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0)
|
.Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0)
|
||||||
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
.Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev
|
||||||
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
||||||
.Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto
|
.Add("@LimiteDeGasto", SqlDbType.Money).Value = LimiteDeGasto
|
||||||
|
.Add("@ImporteSubTotal", SqlDbType.Money).Value = ImporteSubTotal
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -1821,14 +1849,35 @@ Public Class ClsContratos
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
'Es usando en ContratoObra para validar la actualizacion de cantidad de avance
|
||||||
|
Public Function GetContratosDetalleAvance(CveContratoDetalle As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Con_ContratosDetalleAvanceGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el avance de los detalles", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "S U B - T O T A L E S"
|
#Region "S U B - T O T A L E S"
|
||||||
|
|
||||||
|
|
||||||
Public Function GetSubTotalesConDetalle(CveEmpresa As Integer) As Boolean
|
Public Function GetSubTotalesConDetalle(CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|||||||
@@ -1352,7 +1352,7 @@ Public Class ClsPaginas
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1,
|
Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1,
|
||||||
Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1, Optional Codigo As String = "-1") As DataTable
|
Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1, Optional Codigo As String = "-1", Optional CodigoSATPS As String = "-1") As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
|
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa)
|
||||||
If CveEmpresa <> -1 Then
|
If CveEmpresa <> -1 Then
|
||||||
@@ -1367,7 +1367,7 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow))
|
Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow))
|
||||||
|
|
||||||
Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
|
'Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
|
||||||
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
|
If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion))
|
||||||
If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
|
If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
|
||||||
Codigo = Codigo.ToUpper().Trim()
|
Codigo = Codigo.ToUpper().Trim()
|
||||||
@@ -1375,6 +1375,7 @@ Public Class ClsPaginas
|
|||||||
If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
|
If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
|
||||||
If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
|
If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
|
||||||
If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
|
If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
|
||||||
|
If CodigoSATPS <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!SATClavePS) = CodigoSATPS))
|
||||||
|
|
||||||
Try
|
Try
|
||||||
GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
|
GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepComplementoPago.aspx.vb" Inherits="Bancos_RepComplementoPago" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="true" EnableEventValidation = "false" CodeFile="RepComplementoPago.aspx.vb" Inherits="Bancos_RepComplementoPago" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -10,15 +10,19 @@
|
|||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<a><i class="fa fa-file-pdf-o" style="font-weight: bold;"></i>PDF</a>
|
<%--<a><i class="fa fa-file-pdf-o" style="font-weight: bold;"></i>PDF</a>--%>
|
||||||
|
<asp:LinkButton ID="LnkExcel" runat="server" OnClick="LnkExcel_Click" Text="<i class='fa fa-file-excel-o'></i> Excel" Visible="false" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="BtnEmitir" runat="server" Text="<i class='fa fa-print'></i> Emitir" Visible="false" />
|
<asp:LinkButton ID="BtnEmitir" runat="server" Text="<i class='fa fa-print'></i> Emitir" Visible="false" />
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExcel" />
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
Partial Class Bancos_RepComplementoPago
|
Partial Class Bancos_RepComplementoPago
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
@@ -33,16 +35,26 @@ Partial Class Bancos_RepComplementoPago
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim CveCliente As Integer = If(DdlCliente.SelectedValue.ToEntero > 0, DdlCliente.SelectedValue.ToEntero, -1)
|
Dim CveCliente As Integer = If(DdlCliente.SelectedValue.ToEntero > 0, DdlCliente.SelectedValue.ToEntero, -1)
|
||||||
Dim Banco As New ClsBancos
|
Dim Banco As New ClsBancos
|
||||||
|
LnkExcel.Visible = False
|
||||||
If Banco.GetComplementoPagosRep(CveCliente, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, -1, -1, DdlOpcion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Estatus:=DdlEstatus.SelectedValue.ToEntero) Then
|
If Banco.GetComplementoPagosRep(CveCliente, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime, -1, -1, DdlOpcion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Estatus:=DdlEstatus.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
GvD.DataSource = Banco.DtResultados '.FiltraParametros("CveComplementoPago is null")
|
GvD.DataSource = Banco.DtResultados '.FiltraParametros("CveComplementoPago is null")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If Banco.DtResultados.Rows.Count > 0 Then
|
||||||
|
LnkExcel.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Banco.Dispose()
|
Banco.Dispose()
|
||||||
If DdlOpcion.SelectedValue = "2" Then GvD.Columns(8).Visible = True Else GvD.Columns(8).Visible = False
|
If DdlOpcion.SelectedValue = "2" Then GvD.Columns(8).Visible = True Else GvD.Columns(8).Visible = False
|
||||||
|
|
||||||
GvD.DataBind()
|
GvD.DataBind()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
UpAcciones.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GeneraTimbre()
|
Private Sub GeneraTimbre()
|
||||||
@@ -125,16 +137,16 @@ Partial Class Bancos_RepComplementoPago
|
|||||||
If e.Row.DBCampo("BloqueadoUtilerias") = "1" Then
|
If e.Row.DBCampo("BloqueadoUtilerias") = "1" Then
|
||||||
Mensaje = "Bloqueado Timbrando por aplicacion"
|
Mensaje = "Bloqueado Timbrando por aplicacion"
|
||||||
End If
|
End If
|
||||||
e.Row.FCLiteral("LtlMon").Text = e.Row.DBCampo("PagoAbreviaturaSAT")
|
e.Row.FCLiteral("LtlMon").Text = e.Row.DBCampo("PagoAbreviaturaSAT")
|
||||||
|
|
||||||
If Not Mensaje.Length = 0 Then
|
If Not Mensaje.Length = 0 Then
|
||||||
e.Row.ForeColor = Drawing.Color.Red
|
e.Row.ForeColor = Drawing.Color.Red
|
||||||
e.Row.FCCheckBox("Chk").Enabled = False
|
e.Row.FCCheckBox("Chk").Enabled = False
|
||||||
e.Row.FCCheckBox("Chk").ToolTip = Mensaje
|
e.Row.FCCheckBox("Chk").ToolTip = Mensaje
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCHyperLink("HplXML").Visible = True : e.Row.FCHyperLink("HplXML").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=xml&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
e.Row.FCHyperLink("HplXML").Visible = True : e.Row.FCHyperLink("HplXML").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=xml&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
||||||
e.Row.FCHyperLink("HplPDF").Visible = True : e.Row.FCHyperLink("HplPDF").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=pdf&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
e.Row.FCHyperLink("HplPDF").Visible = True : e.Row.FCHyperLink("HplPDF").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=pdf&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
||||||
e.Row.FCLinkButton("LnkSendMail").Visible = True
|
e.Row.FCLinkButton("LnkSendMail").Visible = True
|
||||||
|
|
||||||
@@ -378,8 +390,8 @@ Partial Class Bancos_RepComplementoPago
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
respuesta = False
|
respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return respuesta
|
Return respuesta
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -390,5 +402,134 @@ Partial Class Bancos_RepComplementoPago
|
|||||||
TxtParaMail.Text = gvRow.DataKey("CobranzaCorreo").ToString
|
TxtParaMail.Text = gvRow.DataKey("CobranzaCorreo").ToString
|
||||||
UpSendMail.Update()
|
UpSendMail.Update()
|
||||||
RegistraScript("$('#ModalDivMail').modal('show');")
|
RegistraScript("$('#ModalDivMail').modal('show');")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
' GvD.ExportToExcelG("ReporteComplementos", "Reporte Complementos", UsuarioActual)
|
||||||
|
'GvD.ExportToExcelx("ReporteComplementos.xlsx")
|
||||||
|
' GvD.ExportToExcel("ReporteComplementos.xlsx")
|
||||||
|
|
||||||
|
|
||||||
|
Imprimir("Excel")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub Imprimir(Optional reporte As String = "PDF")
|
||||||
|
If GvD.Rows.Count > 0 Then
|
||||||
|
Dim StrFiltro As New StringBuilder
|
||||||
|
'If DdlProveedor.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat("Proveedor: {0},", DdlProveedor.SelectedText)
|
||||||
|
'If ddlProducto2.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Producto/Servicio: {0},", ddlProducto2.SelectedText)
|
||||||
|
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio: {0} ", txtFechaI.Text)
|
||||||
|
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", txtFechaF.Text)
|
||||||
|
ExportToExcelG(GvD, "ReporteComplementos.xlsx", "Reporte complementos de pago", UsuarioActual, StrFiltro.ToString, 100, 150)
|
||||||
|
Else
|
||||||
|
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub ExportToExcelG(Gv As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100)
|
||||||
|
Dim sw As New StringWriter()
|
||||||
|
Dim htw As New HtmlTextWriter(sw)
|
||||||
|
Gv.RenderControl(htw)
|
||||||
|
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8")
|
||||||
|
|
||||||
|
Dim excel As GemBox.Spreadsheet.ExcelFile
|
||||||
|
Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
||||||
|
Using htmlStream = New MemoryStream(options.Encoding.GetBytes(sw.ToString()))
|
||||||
|
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream, options)
|
||||||
|
If Usuario IsNot Nothing Then
|
||||||
|
Dim TotalRowHeader As Integer = 8
|
||||||
|
Dim TotalRowFooter As Integer = 2
|
||||||
|
|
||||||
|
Dim worksheet = excel.Worksheets(0)
|
||||||
|
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
|
||||||
|
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
|
||||||
|
celdasConTexto.Style.Font.Name = "Calibri Light"
|
||||||
|
|
||||||
|
Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
|
||||||
|
RangoNombreEmpresa.Merged = True
|
||||||
|
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
|
||||||
|
RangoNombreEmpresa.Style.Font.Size = 18 * 20
|
||||||
|
RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
|
||||||
|
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||||
|
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
|
||||||
|
Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
|
||||||
|
RangoFiltros.Merged = True
|
||||||
|
RangoFiltros.Value = Filtros
|
||||||
|
RangoFiltros.Style.Font.Size = 15 * 20
|
||||||
|
RangoFiltros.Style.Font.Name = "Calibri Light"
|
||||||
|
RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||||
|
RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
|
||||||
|
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
||||||
|
RangoTitulo.Merged = True
|
||||||
|
RangoTitulo.Value = Titulo
|
||||||
|
RangoTitulo.Style.Font.Size = 20 * 20
|
||||||
|
RangoTitulo.Style.Font.Name = "Calibri Light"
|
||||||
|
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||||
|
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
|
||||||
|
worksheet.Columns("C").Width = 20000
|
||||||
|
worksheet.Columns("D").Width = 4000
|
||||||
|
worksheet.Columns("E").Width = 6000
|
||||||
|
worksheet.Columns("F").Width = 6000
|
||||||
|
worksheet.Columns("G").Width = 4000
|
||||||
|
worksheet.Columns("H").Width = 12000
|
||||||
|
|
||||||
|
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||||
|
|
||||||
|
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
|
||||||
|
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||||
|
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||||
|
worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||||
|
worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||||
|
|
||||||
|
If i > 0 Then
|
||||||
|
Try
|
||||||
|
worksheet.Columns(i).AutoFit(1)
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim IndexEndTable As Integer = Gv.Rows.Count + TotalRowHeader + TotalRowFooter
|
||||||
|
|
||||||
|
worksheet.Rows(IndexEndTable).Cells(2).Value = "Usuario Imprimió"
|
||||||
|
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre
|
||||||
|
|
||||||
|
worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión"
|
||||||
|
worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||||
|
|
||||||
|
If Imagen.Exists Then
|
||||||
|
Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
|
||||||
|
Using sr As New StreamReader(Ruta)
|
||||||
|
Dim ms As New MemoryStream()
|
||||||
|
sr.BaseStream.CopyTo(ms)
|
||||||
|
worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Using
|
||||||
|
htw.Dispose()
|
||||||
|
|
||||||
|
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<tr style="text-align: left">
|
<tr style="text-align: left">
|
||||||
<td class="text-right"><b>Proveedor:</b></td>
|
<td class="text-right"><b>Proveedor:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="180px"></asp:DropDownList>
|
<ADS:Dropdownlost ID="DdlProveedores" runat="server" UsaWebService="true" data-metodo="getproveedores" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="text-align: left">
|
<tr style="text-align: left">
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ Partial Class Compras_PopUpBuscarFolioC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub CargaProveedor()
|
Protected Sub CargaProveedor()
|
||||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
DdlProveedor.DataBind()
|
'DdlProveedor.DataBind()
|
||||||
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
'DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ Partial Class Compras_PopUpBuscarFolioC
|
|||||||
If ValidarUnFiltroSeleccionado() Then
|
If ValidarUnFiltroSeleccionado() Then
|
||||||
Dim ObjCompras As New ClsCompras()
|
Dim ObjCompras As New ClsCompras()
|
||||||
If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Folio, FolioFiscal, Codigo, Proveedor, FechaI, FechaF, Descripcion, Obs,
|
If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Folio, FolioFiscal, Codigo, Proveedor, FechaI, FechaF, Descripcion, Obs,
|
||||||
CveProveedor:=DdlProveedor.SelectedValue.ToEntero, TopSelect:=100) Then
|
CveProveedor:=DdlProveedores.SelectedValue.ToEntero, TopSelect:=100) Then
|
||||||
If ObjCompras.DtResultados.Rows.Count > 0 Then
|
If ObjCompras.DtResultados.Rows.Count > 0 Then
|
||||||
LtlTotalRegistros.Text = ObjCompras.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
LtlTotalRegistros.Text = ObjCompras.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||||
GV.DataSource = ObjCompras.DtResultados
|
GV.DataSource = ObjCompras.DtResultados
|
||||||
@@ -112,7 +112,7 @@ Partial Class Compras_PopUpBuscarFolioC
|
|||||||
If TxtDescripcion.Text.Trim.Length > 0 Then Return True
|
If TxtDescripcion.Text.Trim.Length > 0 Then Return True
|
||||||
If TxtObservaciones.Text.Trim.Length > 0 Then Return True
|
If TxtObservaciones.Text.Trim.Length > 0 Then Return True
|
||||||
If DdlTipoDocto.SelectedValue <> "-1" Then Return True
|
If DdlTipoDocto.SelectedValue <> "-1" Then Return True
|
||||||
If DdlProveedor.SelectedValue.ToEntero <> 0 Then Return True
|
If DdlProveedores.SelectedValue.ToEntero <> 0 Then Return True
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
If ObjConta.GetConta_ConceptosContables() Then
|
If ObjConta.GetConta_ConceptosContables() Then
|
||||||
DdlCconceptosContables.DataSource = ObjConta.DtResultados
|
DdlCconceptosContables.DataSource = ObjConta.DtResultados.FiltraParametros("EsCuentaUnica = false AND EsSistema = True ")
|
||||||
DdlConceptoGlobal.DataSource = ObjConta.DtResultados.FiltraParametros("EsCuentaUnica = false AND EsSistema = True AND EsGlobal = True")
|
DdlConceptoGlobal.DataSource = ObjConta.DtResultados.FiltraParametros("EsCuentaUnica = false AND EsSistema = True AND EsGlobal = True")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,15 @@
|
|||||||
<asp:LinkButton ID="LnkModalAddMaquinariaFlotilla" Visible="false" runat="server" OnClick="LnkModalAddMaquinariaFlotilla_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Maquinaria-Flotilla-Herramienta</asp:LinkButton>
|
<asp:LinkButton ID="LnkModalAddMaquinariaFlotilla" Visible="false" runat="server" OnClick="LnkModalAddMaquinariaFlotilla_Click"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i>Agregar Maquinaria-Flotilla-Herramienta</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkAbrirContrato" Visible="false" runat="server" OnClick="LnkAbrirContrato_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Abrir Contrato?" data-btn-ok-label="si"> <i class="fa-folder-open-o" style="font-weight:bold;"></i>Abrir Contrato</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkCerrarContrato" Visible="false" runat="server" OnClick="LnkCerrarContrato_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Cerrar Contrato?" data-btn-ok-label="si" > <i class="fa fa-times-circle" style="font-weight:bold;"></i>Cerrar Contrato</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
@@ -163,11 +172,8 @@
|
|||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="fa fa-list-ol"></i>
|
<i class="fa fa-list-ol"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -735,7 +741,7 @@
|
|||||||
<asp:LinkButton runat="server" ID="BtnDescargar" class="btn btn-warning" Visible="false"><i class='fa fa-download' aria-hidden='true'></i> Descargar</asp:LinkButton>
|
<asp:LinkButton runat="server" ID="BtnDescargar" class="btn btn-warning" Visible="false"><i class='fa fa-download' aria-hidden='true'></i> Descargar</asp:LinkButton>
|
||||||
<asp:TextBox Style="display: none" ID="TxtArchivo" ClientIDMode="Static" runat="server" Width="200px"></asp:TextBox>
|
<asp:TextBox Style="display: none" ID="TxtArchivo" ClientIDMode="Static" runat="server" Width="200px"></asp:TextBox>
|
||||||
|
|
||||||
<button type="button" class="btn btn-primary" runat="server" clientidmode="Static" id="A1" data-toggle="modal" data-target="#ModalUpload" visible="true"><i class="fa fa-upload" aria-hidden="true"></i>Subir Archivo</button>
|
<button type="button" class="btn btn-primary" runat="server" clientidmode="Static" id="A1" data-toggle="modal" data-target="#ModalUpload" visible="true"><i class="fa fa-upload" aria-hidden="true"></i>Subir Archivo</button>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -803,7 +809,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,CodigoPS,LimitarCantidad,PS,NoIdentificacion,PermitirAvance,CantidadContratada"
|
DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CodigoPS,LimitarCantidad,PS,NoIdentificacion,PermitirAvance,CantidadContratada,CveClasificacion"
|
||||||
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>
|
||||||
|
|
||||||
@@ -1085,6 +1091,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtCantidadInt" runat="server" Width="70px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FLTCantidadInt" runat="server" TargetControlID="TxtCantidadInt" FilterType="Custom, Numbers" ValidChars="." />
|
<asp:TextBox ID="TxtCantidadInt" runat="server" Width="70px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FLTCantidadInt" runat="server" TargetControlID="TxtCantidadInt" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<asp:RequiredFieldValidator ID="RFVCantidadInt" runat="server" ControlToValidate="TxtCantidadInt" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarInt"></asp:RequiredFieldValidator><ajax:ValidatorCalloutExtender ID="VCOCantidadInt" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadInt" Width="300px"></ajax:ValidatorCalloutExtender>
|
<asp:RequiredFieldValidator ID="RFVCantidadInt" runat="server" ControlToValidate="TxtCantidadInt" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarInt"></asp:RequiredFieldValidator><ajax:ValidatorCalloutExtender ID="VCOCantidadInt" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidadInt" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
@@ -1181,7 +1188,8 @@
|
|||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<div style="width: 65px;">
|
<div style="width: 65px;">
|
||||||
<asp:LinkButton ID="LinkButton1" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
<asp:LinkButton ID="LinkButton1" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" /><asp:LinkButton ID="LinkButton2" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||||
|
<asp:LinkButton ID="LinkButton2" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"
|
||||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||||
</div>
|
</div>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
@@ -1287,35 +1295,35 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="ContratoCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Cantidad" DataField="ContratoCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="7.5%" />
|
||||||
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Importe $" DataField="ContratoImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="7.5%" />
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LBAvanceCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
<asp:LinkButton ID="LBAvanceCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceCantidad", "{0:###,###,##0.00}") %>' runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00}") %>' runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="%" DataField="AvancePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
<asp:BoundField HeaderText="%" DataField="AvancePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="7.5%" />
|
||||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00}" ItemStyle-Width="7.5%" />
|
||||||
<asp:BoundField HeaderText="%" DataField="FaltantePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
<asp:BoundField HeaderText="%" DataField="FaltantePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00}") %>' runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
<asp:LinkButton ID="LBAvanceXFacturarImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarImporte", "{0:###,###,##0.00}") %>' runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
@@ -2220,7 +2228,9 @@
|
|||||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="false" CssClass="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de eliminar el Contrato?" data-btn-ok-label="si" />
|
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="false" CssClass="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de eliminar el Contrato?" data-btn-ok-label="si" />
|
||||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||||
|
|
||||||
<asp:Button ID="BtnCancelar" CssClass="btn btn-default" runat="server" Text="Cancelar" OnClientClick="javascript:window.location.href='/Contratos/Contratos.aspx';return false" />
|
<asp:Button ID="BtnCancelar" CssClass="btn btn-default" runat="server" Text="Cancelar" OnClientClick="javascript:window.location.href='/Contratos/Contratos.aspx';return false" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -2773,7 +2783,9 @@
|
|||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" ></asp:TextBox>
|
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" ></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSVentas"> </asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddPSVentas"> </asp:RequiredFieldValidator>
|
||||||
|
<asp:RangeValidator runat="server" id="RGVControlCantidadVentas" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" Type="Double" MinimumValue="1" MaximumValue="9999999999" ErrorMessage="No se pueden tener valores inferiores a lo ya avanzado" ValidationGroup="GrpAddPSVentas" />
|
||||||
|
|
||||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -389,6 +389,19 @@ Partial Class Contratos_ContratoObra
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Property BloquearTodo As Boolean
|
||||||
|
Get
|
||||||
|
If ViewState("BloquearTodo") Is Nothing Then
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
Return Boolean.Parse(ViewState("BloquearTodo").ToString)
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("BloquearTodo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -483,6 +496,9 @@ Partial Class Contratos_ContratoObra
|
|||||||
CargaDLLCargaGVCentrosConsto()
|
CargaDLLCargaGVCentrosConsto()
|
||||||
tabalCentrosdecotso()
|
tabalCentrosdecotso()
|
||||||
|
|
||||||
|
|
||||||
|
BloquearControles()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -626,12 +642,38 @@ Partial Class Contratos_ContratoObra
|
|||||||
'DdlProyecto.SelectedValue = "-1"
|
'DdlProyecto.SelectedValue = "-1"
|
||||||
|
|
||||||
TxtCantidad.Text = ""
|
TxtCantidad.Text = ""
|
||||||
|
RGVControlCantidadVentas.Visible = False
|
||||||
TxtPU.Text = ""
|
TxtPU.Text = ""
|
||||||
TmpDT.Clear()
|
TmpDT.Clear()
|
||||||
CargaGVPresupuestos(TmpDT)
|
CargaGVPresupuestos(TmpDT)
|
||||||
CargaGVPresupuestosInsumos(TmpDT)
|
CargaGVPresupuestosInsumos(TmpDT)
|
||||||
LbTotalGeneral.Text = "0.00"
|
LbTotalGeneral.Text = "0.00"
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BloquearControles()
|
||||||
|
|
||||||
|
If BloquearTodo Then
|
||||||
|
|
||||||
|
|
||||||
|
LnkModalAddPSVentas.Visible = False
|
||||||
|
LnkModalAddPSControl.Visible = False
|
||||||
|
LnkModalAddPresupuestoVentas.Visible = False
|
||||||
|
LnkModalAddPresupuestoControl.Visible = False
|
||||||
|
LnkModalAddGastos.Visible = False
|
||||||
|
LnkModalAddMaquinariaFlotilla.Visible = False
|
||||||
|
|
||||||
|
BtnDescargar.Enabled = False
|
||||||
|
A1.Visible = False
|
||||||
|
|
||||||
|
BtnGuardar.Enabled = False
|
||||||
|
BtnEliminar.Enabled = False
|
||||||
|
BtnCancelar.Enabled = False
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " CONFIGURA TIPOS CONTRATO "
|
#Region " CONFIGURA TIPOS CONTRATO "
|
||||||
@@ -739,6 +781,24 @@ Partial Class Contratos_ContratoObra
|
|||||||
DdlCliente.SelectedValue = ObjContratos.CveCliente.ToString
|
DdlCliente.SelectedValue = ObjContratos.CveCliente.ToString
|
||||||
DdlCliente.SelectedText = ObjContratos.NombreComercial.ToString
|
DdlCliente.SelectedText = ObjContratos.NombreComercial.ToString
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LnkAbrirContrato.Visible = False
|
||||||
|
LnkCerrarContrato.Visible = False
|
||||||
|
|
||||||
|
If UsuarioActual.TienePermisoProceso(330) Then
|
||||||
|
|
||||||
|
If ObjContratos.TipoEstatus = 1 Then
|
||||||
|
LnkCerrarContrato.Visible = True
|
||||||
|
Else
|
||||||
|
LnkAbrirContrato.Visible = True
|
||||||
|
BloquearTodo = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ObjContratos.CveProveedor > 0 Then
|
If ObjContratos.CveProveedor > 0 Then
|
||||||
' TrProveedor.Visible = True
|
' TrProveedor.Visible = True
|
||||||
TrCliente.Visible = False
|
TrCliente.Visible = False
|
||||||
@@ -873,6 +933,11 @@ Partial Class Contratos_ContratoObra
|
|||||||
Alert("El Contrato Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
Alert("El Contrato Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
CveContrato = -1
|
CveContrato = -1
|
||||||
Alert("Ocurrió un error al cargar el Contrato. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al cargar el Contrato. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
@@ -1000,10 +1065,14 @@ Partial Class Contratos_ContratoObra
|
|||||||
TipoContrato = DdlTipoContratoObra.SelectedValue.ToEntero
|
TipoContrato = DdlTipoContratoObra.SelectedValue.ToEntero
|
||||||
|
|
||||||
'Crear Contrato
|
'Crear Contrato
|
||||||
|
Dim ImporteSubTotal As Decimal = TmpDT.SUM("Total", " CveContratoDetalle > 0 AND CveTipoPresupuesto=2 ").ToDecimal
|
||||||
If Not CveContrato > 0 Then
|
If Not CveContrato > 0 Then
|
||||||
|
|
||||||
Dim EstatusContrato As Integer = 1
|
Dim EstatusContrato As Integer = 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CveContrato = ObjContratos.AddContratosObra(TxtNumeroContrato.Text, TxtDescripcionContrato.Text, TxtNumeroLicitacion.Text.Trim, DdlContratista.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero, -1, TxtFechaInicial.Text.ToDate, TxtFechaFinal.Text.ToDate,
|
CveContrato = ObjContratos.AddContratosObra(TxtNumeroContrato.Text, TxtDescripcionContrato.Text, TxtNumeroLicitacion.Text.Trim, DdlContratista.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero, -1, TxtFechaInicial.Text.ToDate, TxtFechaFinal.Text.ToDate,
|
||||||
TxtUbicacion.Text, TxtResponsable.Text, DdlProyecto.SelectedValue.ToEntero, TxtPorIVA.Text.ToDouble, TxtPorAnticipo.Text.ToDouble, TxtPorAmortizacionAnticipo.Text.ToDouble,
|
TxtUbicacion.Text, TxtResponsable.Text, DdlProyecto.SelectedValue.ToEntero, TxtPorIVA.Text.ToDouble, TxtPorAnticipo.Text.ToDouble, TxtPorAmortizacionAnticipo.Text.ToDouble,
|
||||||
TxtPorGarantia.Text.ToDouble, "." & Session("FileExtension").ToString, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, Minimo, Maximo, Total,
|
TxtPorGarantia.Text.ToDouble, "." & Session("FileExtension").ToString, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, Minimo, Maximo, Total,
|
||||||
@@ -1011,7 +1080,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero, CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1,
|
TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero, CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1,
|
||||||
PorcentajeComision:=0, TipoGarantia:=-1, Folio:=0, FechaVenc:=Nothing, EstatusFianza:=1,
|
PorcentajeComision:=0, TipoGarantia:=-1, Folio:=0, FechaVenc:=Nothing, EstatusFianza:=1,
|
||||||
CvePeriodo:=-1, CveCuentaEquipo:=-1, CveContratoPlantilla:=-1, CveVendedor:=-1,
|
CvePeriodo:=-1, CveCuentaEquipo:=-1, CveContratoPlantilla:=-1, CveVendedor:=-1,
|
||||||
Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim, LimiteDeGasto:=TxtLimiteGastos.Text.ToDouble)
|
Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim, LimiteDeGasto:=TxtLimiteGastos.Text.ToDouble, ImporteSubTotal:=ImporteSubTotal)
|
||||||
|
|
||||||
|
|
||||||
TieneError = Not GuardaFianzas(ObjContratos)
|
TieneError = Not GuardaFianzas(ObjContratos)
|
||||||
@@ -1074,7 +1143,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1, PorcentajeComision:=0,
|
CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1, PorcentajeComision:=0,
|
||||||
TipoGarantia:=-1, Folio:=-1, FechaVenc:=Nothing, EstatusFianza:=-1, CveContratoPlantilla:=-1,
|
TipoGarantia:=-1, Folio:=-1, FechaVenc:=Nothing, EstatusFianza:=-1, CveContratoPlantilla:=-1,
|
||||||
CveCuentaEquipo:=-1, CveVendedor:=-1, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False,
|
CveCuentaEquipo:=-1, CveVendedor:=-1, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False,
|
||||||
CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim, LimiteDeGasto:=TxtLimiteGastos.Text.ToDouble) Then
|
CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim, LimiteDeGasto:=TxtLimiteGastos.Text.ToDouble, ImporteSubTotal:=ImporteSubTotal) Then
|
||||||
|
|
||||||
|
|
||||||
TieneError = Not GuardaFianzas(ObjContratos)
|
TieneError = Not GuardaFianzas(ObjContratos)
|
||||||
@@ -1698,6 +1767,21 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
If BloquearTodo Then
|
||||||
|
e.Row.FCLinkButton("LnkEditarPresupuestoVentaDetalle").Visible = False
|
||||||
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If e.Row.DataKey("CveContratoDetalle").ToEntero <= 0 Then
|
||||||
|
e.Row.FCLinkButton("LnkEditarPresupuestoVentaDetalle").Visible = False
|
||||||
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
|
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)
|
||||||
e.Row.FCDropDownList("DdlUMEdit").DataBind()
|
e.Row.FCDropDownList("DdlUMEdit").DataBind()
|
||||||
@@ -2078,6 +2162,23 @@ Partial Class Contratos_ContratoObra
|
|||||||
e.Row.FCDropDownList("DdlUMEdit").SelectedValue = e.Row.DataKey("CveUM")
|
e.Row.FCDropDownList("DdlUMEdit").SelectedValue = e.Row.DataKey("CveUM")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If BloquearTodo Then
|
||||||
|
e.Row.FCLinkButton("LnkEditarPresupuestoControlDetalle").Visible = False
|
||||||
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If e.Row.DataKey("CveContratoDetalle").ToEntero <= 0 Then
|
||||||
|
|
||||||
|
e.Row.FCLinkButton("LnkEditarPresupuestoControlDetalle").Visible = False
|
||||||
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GVInsumos_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvInsumos.RowEditing
|
Protected Sub GVInsumos_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvInsumos.RowEditing
|
||||||
GvInsumos.EditIndex = e.NewEditIndex
|
GvInsumos.EditIndex = e.NewEditIndex
|
||||||
@@ -2726,8 +2827,8 @@ Partial Class Contratos_ContratoObra
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvContratoGastos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvContratosGastos.RowDataBound
|
Protected Sub GvContratoGastos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvContratosGastos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.DBCampo("CveContrato").ToString.ToEntero = 0 Or e.Row.DBCampo("CveVenta").ToString.ToEntero > 0 Then
|
If e.Row.DBCampo("CveContrato").ToString.ToEntero = 0 Or e.Row.DBCampo("CveVenta").ToString.ToEntero > 0 Then
|
||||||
If e.Row.DBCampo("CveContrato").ToString.ToEntero = 0 Then e.Row.CssClass = "SubTotales" : e.Row.Cells(0).Text = e.Row.DBCampo("Cantidad").FormatoNumero(0)
|
If e.Row.DBCampo("CveContrato").ToString.ToEntero = 0 Then e.Row.CssClass = "SubTotales" : e.Row.Cells(0).Text = e.Row.DBCampo("Cantidad").FormatoNumero(0)
|
||||||
e.Row.FCLinkButton("imgE").Visible = False
|
e.Row.FCLinkButton("imgE").Visible = False
|
||||||
@@ -2738,6 +2839,16 @@ Partial Class Contratos_ContratoObra
|
|||||||
ScriptManager.GetCurrent(Me).RegisterAsyncPostBackControl(lb)
|
ScriptManager.GetCurrent(Me).RegisterAsyncPostBackControl(lb)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If BloquearTodo Then
|
||||||
|
e.Row.FCLinkButton("imgU").Visible = False
|
||||||
|
e.Row.FCLinkButton("imgE").Visible = False
|
||||||
|
e.Row.FCLinkButton("imgD").Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvContratoGastos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GvContratosGastos.RowDeleting
|
Protected Sub GvContratoGastos_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GvContratosGastos.RowDeleting
|
||||||
@@ -3185,6 +3296,15 @@ Partial Class Contratos_ContratoObra
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If BloquearTodo Then
|
||||||
|
e.Row.FCLinkButton("LinkEliminarBitacora").Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
|
Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
|
||||||
@@ -4181,12 +4301,38 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim CantidadMinimo As Integer = 0
|
||||||
|
Dim ObjContrtato As New ClsContratos
|
||||||
|
|
||||||
|
If ObjContrtato.GetContratosDetalleAvance(CveContratoDetalleEditar) Then
|
||||||
|
CantidadMinimo = ObjContrtato.DtResultados.Rows(0)(0).ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
If CantidadMinimo = 0 Then
|
||||||
|
RGVControlCantidadVentas.Visible = False
|
||||||
|
Else
|
||||||
|
RGVControlCantidadVentas.Visible = True
|
||||||
|
RGVControlCantidadVentas.MinimumValue = CantidadMinimo.ToString
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
ObjContrtato.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ModalVentasPSAdd = False
|
ModalVentasPSAdd = False
|
||||||
ChkContinualAgregandoVentas.Visible = False
|
ChkContinualAgregandoVentas.Visible = False
|
||||||
ChkContinualAgregandoVentas.Checked = False
|
ChkContinualAgregandoVentas.Checked = False
|
||||||
|
|
||||||
|
UpModalVentasAddPS.Update()
|
||||||
|
|
||||||
RegistraScript("$('#ModalVentasAddPS').modal('show')")
|
RegistraScript("$('#ModalVentasAddPS').modal('show')")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkEditarPresupuestoControlDetalle_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkEditarPresupuestoControlDetalle_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
@@ -4276,6 +4422,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
'TxtOCInterna.Text = ""
|
'TxtOCInterna.Text = ""
|
||||||
TxtCantidad.Text = ""
|
TxtCantidad.Text = ""
|
||||||
|
RGVControlCantidadVentas.Visible = False
|
||||||
'ChkLimitarVenta.Checked = False
|
'ChkLimitarVenta.Checked = False
|
||||||
'TxtNoIdentificacionv.Text = ""
|
'TxtNoIdentificacionv.Text = ""
|
||||||
DdlClasificacionAdd.SelectedValueExist(-1)
|
DdlClasificacionAdd.SelectedValueExist(-1)
|
||||||
@@ -5088,7 +5235,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
Private Sub GvGastosVeiculos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGastosVeiculos.RowDataBound
|
Private Sub GvGastosVeiculos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGastosVeiculos.RowDataBound
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.DataKey("ORDEN").ToEntero = 1 Then
|
If e.Row.DataKey("ORDEN").ToEntero = 1 Then
|
||||||
e.Row.CssClass = "Totales"
|
e.Row.CssClass = "Totales"
|
||||||
e.Row.Cells(1).Text = "Total"
|
e.Row.Cells(1).Text = "Total"
|
||||||
@@ -5097,8 +5243,16 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If BloquearTodo Then
|
||||||
|
e.Row.FCLinkButton("LnkEliminarGasto").Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -5433,6 +5587,39 @@ Partial Class Contratos_ContratoObra
|
|||||||
AddtabalCentrosdecotso(DdlCentroCostos.SelectedValue.ToEntero, DdlCentroCostos.SelectedItem.Text, TxtCentroCostosPorcentaje.Text.ToDecimal)
|
AddtabalCentrosdecotso(DdlCentroCostos.SelectedValue.ToEntero, DdlCentroCostos.SelectedItem.Text, TxtCentroCostosPorcentaje.Text.ToDecimal)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub LnkAbrirContrato_Click(sender As Object, e As EventArgs)
|
||||||
|
AbrirCerrarContrto(False)
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkCerrarContrato_Click(sender As Object, e As EventArgs)
|
||||||
|
AbrirCerrarContrto(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub AbrirCerrarContrto(Cerrar As Boolean)
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjConrtato As New ClsContratos
|
||||||
|
|
||||||
|
If ObjConrtato.AbrirCerrarContrato(CveContrato, UsuarioActual.CveEmpresa, Cerrar, UsuarioActual.CveUsuario) Then
|
||||||
|
Alert($"Contrato { If(Cerrar, "Cerrado", "Abierto")} Correctamente", TipoMensaje.MsgInformacion, $"window.location.href=""./ContratoObra.aspx?CveContrato={CveContrato}"";")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GvInt_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInt.RowDataBound
|
||||||
|
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
If BloquearTodo Then
|
||||||
|
|
||||||
|
'e.Row.FCLinkButton("LinkButton1").Enabled = False
|
||||||
|
'e.Row.FCLinkButton("LinkButton2").Enabled = False
|
||||||
|
e.Row.FCLinkButton("LinkButton3").Visible = False
|
||||||
|
e.Row.FCLinkButton("LinkButton4").Visible = False
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -70,8 +70,8 @@
|
|||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
Cliente:
|
Cliente:
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-3">
|
||||||
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" Class="select2me" Width="100PX" ></asp:DropDownList>
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" UsaWebService="true" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
<div class="number" style="display: none!important">
|
<div class="number" style="display: none!important">
|
||||||
<small>Contratos</small>
|
<small>Contratos</small>
|
||||||
<h3 class="font-purple-soft">
|
<h3 class="font-purple-soft">
|
||||||
<span>
|
<span style="font-size: large" >
|
||||||
<asp:Literal Text="0" ID="LtlGrafNumeroContratos" runat="server" /></span>
|
<asp:Literal Text="0" ID="LtlGrafNumeroContratos" runat="server" /></span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
<div class="number">
|
<div class="number">
|
||||||
<small>Total</small>
|
<small>Total</small>
|
||||||
<h3 class="font-purple-soft">
|
<h3 class="font-purple-soft">
|
||||||
<span>$<asp:Literal Text="0" ID="LtlGrafTotal" runat="server" /></span>
|
<span style="font-size: large" >$<asp:Literal Text="0" ID="LtlGrafTotal" runat="server" /></span>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<small>Avance</small>
|
<small>Avance</small>
|
||||||
<h3 class="font-green-sharp">
|
<h3 class="font-green-sharp">
|
||||||
<span>
|
<span style="font-size: large" >
|
||||||
<asp:Literal Text="0" ID="LtlAvanceImporte" runat="server" />
|
<asp:Literal Text="0" ID="LtlAvanceImporte" runat="server" />
|
||||||
</span>
|
</span>
|
||||||
<small class="font-green-sharp"></small>
|
<small class="font-green-sharp"></small>
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<small>Porcentaje</small>
|
<small>Porcentaje</small>
|
||||||
<h3 class="font-green-sharp">
|
<h3 class="font-green-sharp">
|
||||||
<span>
|
<span style="font-size: large" >
|
||||||
<asp:Literal Text="0" ID="LtlAvanceImporteProcentaje1" runat="server" />
|
<asp:Literal Text="0" ID="LtlAvanceImporteProcentaje1" runat="server" />
|
||||||
</span>
|
</span>
|
||||||
<small class="font-green-sharp"></small>
|
<small class="font-green-sharp"></small>
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<small>Faltante</small>
|
<small>Faltante</small>
|
||||||
<h3 class="font-red-haze">
|
<h3 class="font-red-haze">
|
||||||
<span>
|
<span style="font-size: large" >
|
||||||
<asp:Literal Text="0" ID="LtlFaltanteImporte" runat="server" />
|
<asp:Literal Text="0" ID="LtlFaltanteImporte" runat="server" />
|
||||||
</span>
|
</span>
|
||||||
<small class="font-red-haze"></small>
|
<small class="font-red-haze"></small>
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<small>Porcentaje</small>
|
<small>Porcentaje</small>
|
||||||
<h3 class="font-red-haze">
|
<h3 class="font-red-haze">
|
||||||
<span>
|
<span style="font-size: large" >
|
||||||
<asp:Literal Text="0" ID="LtlFaltanteImportePorcentaje1" runat="server" />
|
<asp:Literal Text="0" ID="LtlFaltanteImportePorcentaje1" runat="server" />
|
||||||
</span>
|
</span>
|
||||||
<small class="font-red-haze"></small>
|
<small class="font-red-haze"></small>
|
||||||
@@ -309,7 +309,7 @@
|
|||||||
|
|
||||||
<asp:TemplateField HeaderText="Importe">
|
<asp:TemplateField HeaderText="Importe">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblImporte" CssClass="Texto" runat="server" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Label>
|
<asp:Label ID="LblImporteSubTotal" CssClass="Texto" runat="server" Text='<%# Eval("ImporteSubTotal", "{0:N2}")%>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -19,12 +19,15 @@ Partial Class RepContratosObraAvances
|
|||||||
|
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
|
Dim CveCliente As Integer = -1
|
||||||
Dim Con As New ClsContratos
|
Dim Con As New ClsContratos
|
||||||
Dim DTDatos As New DataTable
|
If DdlCliente.SelectedValue.ToEntero > 0 Then CveCliente = DdlCliente.SelectedValue.ToEntero
|
||||||
|
|
||||||
If Con.GetContratosObraRepAvances(MinFecha, MaxFecha, DdlCliente.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
If Con.GetContratosObraRepAvances(MinFecha, MaxFecha, CveCliente, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
GVDatos.DataSource = Con.DtResultados
|
GVDatos.DataSource = Con.DtResultados
|
||||||
DTDatos = Con.DtResultados
|
If Con.DtResultados.Rows.Count > 0 Then
|
||||||
|
Indicadores(Con.DtResultados)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
GVDatos.DataSource = Nothing
|
GVDatos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -35,9 +38,7 @@ Partial Class RepContratosObraAvances
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
|
|
||||||
If DTDatos.Rows.Count > 0 Then
|
|
||||||
Indicadores(DTDatos)
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -47,7 +48,10 @@ Partial Class RepContratosObraAvances
|
|||||||
|
|
||||||
Dim NumeroContratos As Integer = DTDatos.Rows.Count
|
Dim NumeroContratos As Integer = DTDatos.Rows.Count
|
||||||
|
|
||||||
Dim TotalContratos As Decimal = DTDatos.SUM("Importe")
|
'Dim TotalContratos As Decimal = DTDatos.SUM("Importe")
|
||||||
|
Dim TotalContratos As Decimal = DTDatos.SUM("ImporteSubTotal")
|
||||||
|
|
||||||
|
|
||||||
Dim TotalAvance As Decimal = DTDatos.SUM("AvanceImporte")
|
Dim TotalAvance As Decimal = DTDatos.SUM("AvanceImporte")
|
||||||
Dim TotalFaltante As Decimal = TotalContratos - TotalAvance
|
Dim TotalFaltante As Decimal = TotalContratos - TotalAvance
|
||||||
|
|
||||||
@@ -85,15 +89,15 @@ Partial Class RepContratosObraAvances
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaClientes()
|
Private Sub CargaClientes()
|
||||||
Dim dt As DataTable = Nothing
|
'Dim dt As DataTable = Nothing
|
||||||
Dim Cli As New ClsClientes
|
'Dim Cli As New ClsClientes
|
||||||
If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
'If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||||
dt = Cli.DtResultados
|
' dt = Cli.DtResultados
|
||||||
End If
|
'End If
|
||||||
Cli.Dispose()
|
'Cli.Dispose()
|
||||||
DdlCliente.DataSource = dt
|
'DdlCliente.DataSource = dt
|
||||||
DdlCliente.DataBind()
|
'DdlCliente.DataBind()
|
||||||
DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
'DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<div class="number" style="display: none!important">
|
<div class="number" style="display: none!important">
|
||||||
<small>Numero Estimaciones</small>
|
<small>Numero Estimaciones</small>
|
||||||
<h3 class="font-purple-soft">
|
<h3 class="font-purple-soft">
|
||||||
<span>
|
<span style="font-size: large" >
|
||||||
<asp:Literal Text="0" ID="LtlGrafNumeroEstimaciones2" runat="server" /></span>
|
<asp:Literal Text="0" ID="LtlGrafNumeroEstimaciones2" runat="server" /></span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<div class="number">
|
<div class="number">
|
||||||
<small>Numero Estimaciones</small>
|
<small>Numero Estimaciones</small>
|
||||||
<h3 class="font-purple-soft">
|
<h3 class="font-purple-soft">
|
||||||
<span><asp:Literal Text="0" ID="LtlGrafNumeroEstimaciones" runat="server" /></span>
|
<span style="font-size: large" ><asp:Literal Text="0" ID="LtlGrafNumeroEstimaciones" runat="server" /></span>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<small>Avance</small>
|
<small>Avance</small>
|
||||||
<h3 class="font-green-sharp">
|
<h3 class="font-green-sharp">
|
||||||
<span>
|
<span style="font-size: large">
|
||||||
<asp:Literal Text="0" ID="LtlAvanceImporte" runat="server" />
|
<asp:Literal Text="0" ID="LtlAvanceImporte" runat="server" />
|
||||||
</span>
|
</span>
|
||||||
<small class="font-green-sharp"></small>
|
<small class="font-green-sharp"></small>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<small>Porcentaje</small>
|
<small>Porcentaje</small>
|
||||||
<h3 class="font-green-sharp">
|
<h3 class="font-green-sharp">
|
||||||
<span>
|
<span style="font-size: large" >
|
||||||
<asp:Literal Text="0" ID="LtlAvanceImporteProcentaje1" runat="server" />
|
<asp:Literal Text="0" ID="LtlAvanceImporteProcentaje1" runat="server" />
|
||||||
</span>
|
</span>
|
||||||
<small class="font-green-sharp"></small>
|
<small class="font-green-sharp"></small>
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<small>Fecha Fin</small>
|
<small>Fecha Fin</small>
|
||||||
<h3 class="font-red-haze">
|
<h3 class="font-red-haze">
|
||||||
<span>
|
<span style="font-size: large">
|
||||||
<asp:Literal Text="0" ID="LtlFechaFin" runat="server" />
|
<asp:Literal Text="0" ID="LtlFechaFin" runat="server" />
|
||||||
</span>
|
</span>
|
||||||
<small class="font-red-haze"></small>
|
<small class="font-red-haze"></small>
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<small>Dias Restantes</small>
|
<small>Dias Restantes</small>
|
||||||
<h3 class="font-red-haze">
|
<h3 class="font-red-haze">
|
||||||
<span>
|
<span style="font-size: large">
|
||||||
<asp:Literal Text="0" ID="LtlDiasRestantes" runat="server" />
|
<asp:Literal Text="0" ID="LtlDiasRestantes" runat="server" />
|
||||||
</span>
|
</span>
|
||||||
<small class="font-red-haze"></small>
|
<small class="font-red-haze"></small>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ Partial Class RepContratosObraAvancesDetalle
|
|||||||
|
|
||||||
|
|
||||||
Dim AvanceImporte As Decimal = DTDatos(0)("AvanceImporte").ToString.ToDecimal
|
Dim AvanceImporte As Decimal = DTDatos(0)("AvanceImporte").ToString.ToDecimal
|
||||||
Dim TotalContratos As Decimal = DTDatos(0)("Importe").ToString.ToDecimal
|
Dim TotalContratos As Decimal = DTDatos(0)("ImporteSubTotal").ToString.ToDecimal
|
||||||
|
|
||||||
Dim TotalAvancePorcentaje As Decimal = 0
|
Dim TotalAvancePorcentaje As Decimal = 0
|
||||||
If TotalContratos > 0 Then
|
If TotalContratos > 0 Then
|
||||||
@@ -100,6 +100,8 @@ Partial Class RepContratosObraAvancesDetalle
|
|||||||
Dim FechaFinal As Date = DTDatos(0)("FechaFinal").ToString.ToDate
|
Dim FechaFinal As Date = DTDatos(0)("FechaFinal").ToString.ToDate
|
||||||
Dim Dias As Integer = (FechaFinal - Now).Days
|
Dim Dias As Integer = (FechaFinal - Now).Days
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dias = If(Dias < 0, 0, Dias)
|
Dias = If(Dias < 0, 0, Dias)
|
||||||
|
|
||||||
LtlAvanceImporte.Text = $"$ {AvanceImporte.ToString("###,###,###.00")}"
|
LtlAvanceImporte.Text = $"$ {AvanceImporte.ToString("###,###,###.00")}"
|
||||||
@@ -109,7 +111,7 @@ Partial Class RepContratosObraAvancesDetalle
|
|||||||
SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%")
|
SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%")
|
||||||
|
|
||||||
LtlFechaFin.Text = FechaFinal.ToString("dd/MM/yyyy")
|
LtlFechaFin.Text = FechaFinal.ToString("dd/MM/yyyy")
|
||||||
LtlDiasRestantes.Text = Dias.ToString("###,###")
|
LtlDiasRestantes.Text = If(Dias <= 0, "0", Dias.ToString("###,###"))
|
||||||
|
|
||||||
UpGrafica.Update()
|
UpGrafica.Update()
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
|
||||||
<AutoRefresh>0</AutoRefresh>
|
<AutoRefresh>0</AutoRefresh>
|
||||||
<DataSources>
|
<DataSources>
|
||||||
<DataSource Name="DsOC">
|
<DataSource Name="DsOC">
|
||||||
@@ -2127,7 +2127,26 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Sahuaro (662) 2161471 - Solidaridad (662) 216-0935 - Palo Verde (662) 4363254 - Progreso (662) 3105781 - Quiroga (662) 261- 0838 - Caborca (637) 3724214 - Magdalena (632) 322-4080</Value>
|
<Value>Sahuaro (662) 2161471 - Solidaridad (662) 216-0935 - Palo Verde (662) 4363254 - Progreso (662) 3105781 -</Value>
|
||||||
|
<Style>
|
||||||
|
<FontStyle>Normal</FontStyle>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
<FontWeight>Normal</FontWeight>
|
||||||
|
<TextDecoration>None</TextDecoration>
|
||||||
|
<Color>#000000</Color>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value> Portillo (662) 688-5349</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>Calibri</FontFamily>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
<FontWeight>Normal</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value> - Quiroga (662) 261- 0838 - Caborca (637) 3724214 </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Normal</FontStyle>
|
<FontStyle>Normal</FontStyle>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
@@ -2146,7 +2165,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Nogales (631) 319-0093 - Cananea (645) 332 20 40 - Guaymas (622) 222-2417 - Obregón (644)412-2002 Obregón II (644) 413-1543- Obregón III (644) 4134501 - Navojoa (642) 422-9852</Value>
|
<Value> Magdalena (632) 322-4080 - Nogales (631) 319-0093 - Cananea (645) 332 20 40 - Guaymas (622) 222-2417 - Obregón (644)412-2002 Obregón II (644) 413-1543- Obregón III (644) 4134501 </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Normal</FontStyle>
|
<FontStyle>Normal</FontStyle>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
@@ -2165,7 +2184,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Guamuchil (673) 688-0108 - Sanalona (667) 713-667</Value>
|
<Value>Navojoa (642) 422-9852 - Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Guamuchil (673) 688-0108</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Normal</FontStyle>
|
<FontStyle>Normal</FontStyle>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
@@ -2184,26 +2203,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Tres Ríos (667) 455-4621 - Mazatlán (669) 910-2122 - Baja California: Tijuana1 (664) 622-5221 - Tijuana3 (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 - Mexicali3 (686) 326 02 79</Value>
|
<Value> Sanalona (667) 713-667 - Tres Ríos (667) 455-4621 - Mazatlán (669) 910-2122 - Baja California: Tijuana1 (664) 622-5221 - Tijuana3 (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 Mexicali3 (686) 326 02 79 - Tecate (665) 5212080 - Ensenada (646) 172-4075 - Ensenada2 (646) 176-2703 - Baja California Sur: La Paz (612) 146-3656 - La Paz 2 (612) 121-3185 - Los Cabos (624) 688 3552</Value>
|
||||||
<Style>
|
|
||||||
<FontStyle>Normal</FontStyle>
|
|
||||||
<FontFamily>calibri</FontFamily>
|
|
||||||
<FontSize>7pt</FontSize>
|
|
||||||
<FontWeight>Normal</FontWeight>
|
|
||||||
<TextDecoration>None</TextDecoration>
|
|
||||||
<Color>#000000</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
|
||||||
<Style>
|
|
||||||
<TextAlign>Center</TextAlign>
|
|
||||||
<LineHeight>1pt</LineHeight>
|
|
||||||
</Style>
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
|
||||||
<Value>Tecate (665) 5212080 - Ensenada (646) 172-4075 - Ensenada2 (646) 176-2703 - Baja California Sur: La Paz (612) 146-3656 - La Paz 2 (612) 121-3185 - Los Cabos (624) 688 3552</Value>
|
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Normal</FontStyle>
|
<FontStyle>Normal</FontStyle>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
@@ -2240,17 +2240,6 @@
|
|||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
|
||||||
<Value xml:space="preserve"> </Value>
|
|
||||||
<Style>
|
|
||||||
<FontStyle>Normal</FontStyle>
|
|
||||||
<FontFamily>calibri</FontFamily>
|
|
||||||
<FontSize>7pt</FontSize>
|
|
||||||
<FontWeight>Normal</FontWeight>
|
|
||||||
<TextDecoration>None</TextDecoration>
|
|
||||||
<Color>#000000</Color>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style>
|
<Style>
|
||||||
<TextAlign>Center</TextAlign>
|
<TextAlign>Center</TextAlign>
|
||||||
@@ -4719,7 +4708,6 @@
|
|||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
|
|
||||||
<EmbeddedImages>
|
<EmbeddedImages>
|
||||||
<EmbeddedImage Name="ID2">
|
<EmbeddedImage Name="ID2">
|
||||||
<MIMEType>image/png</MIMEType>
|
<MIMEType>image/png</MIMEType>
|
||||||
|
|||||||
@@ -2229,6 +2229,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
|
||||||
|
Dim Filesgral As List(Of Archivo) = TxtDocumento.getfiles().Archivos
|
||||||
|
If Filesgral Is Nothing OrElse Filesgral.Count = 0 Then
|
||||||
|
Alert("Es necesario agregar un documento.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
Dim MensajeExistencias As New StringBuilder
|
Dim MensajeExistencias As New StringBuilder
|
||||||
@@ -2263,14 +2271,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
|
|
||||||
Dim Filesgral As List(Of Archivo) = TxtDocumento.getfiles().Archivos
|
|
||||||
If Filesgral Is Nothing OrElse Filesgral.Count = 0 Then
|
|
||||||
Alert("Es necesario agregar un documento.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
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
|
||||||
@@ -3883,6 +3883,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'DOCUMENTOS RELACIONADOS AL MOVIMIENTO
|
||||||
|
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
|
||||||
|
If Not ErrorMovInv AndAlso Not GuardaDocumentoBitacora(ObjBitacora, CveMovimiento) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Alert("Ocurrió un error al guardar los datos adjuntos de la bitácora", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ Partial Class Ventas_PortalCliente
|
|||||||
|
|
||||||
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
|
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
|
||||||
Dim ObjClientes As New ClsClientes()
|
Dim ObjClientes As New ClsClientes()
|
||||||
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=CveClienteSucursal) Then
|
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, SelectTop, CveClienteSucursal:=CveClienteSucursal) Then
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||||
'Carga Generales
|
'Carga Generales
|
||||||
LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(0)
|
LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(0)
|
||||||
@@ -1726,7 +1726,7 @@ Partial Class Ventas_PortalCliente
|
|||||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha)
|
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha)
|
||||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha)
|
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha)
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
If ObjClientes.GetHistorialVentas(CveCliente, TopPedidos, CveClienteSucursal:=-1, TipoDocto:="Pd2", CveEstatusFactura:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF) Then
|
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, TopPedidos, CveClienteSucursal:=-1, TipoDocto:="Pd2", CveEstatusFactura:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF) Then
|
||||||
GvPedidos.DataSource = ObjClientes.DtResultados
|
GvPedidos.DataSource = ObjClientes.DtResultados
|
||||||
If ObjClientes.DtResultados.Rows.Count < 21 Then
|
If ObjClientes.DtResultados.Rows.Count < 21 Then
|
||||||
LnkVerMasPedidos.Visible = False
|
LnkVerMasPedidos.Visible = False
|
||||||
|
|||||||
@@ -683,10 +683,10 @@ Partial Class Clientes
|
|||||||
CargaCombos()
|
CargaCombos()
|
||||||
CreaDTVentas()
|
CreaDTVentas()
|
||||||
CreaDtPago()
|
CreaDtPago()
|
||||||
RegistraScript("CargaHeader();")
|
RegistraScript("CargaHeader();")
|
||||||
|
|
||||||
CargaEstados()
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CvePlataforma = 3 Then 'SI ES USUARIO GPS
|
If UsuarioActual.Empresa.CvePlataforma = 3 Then 'SI ES USUARIO GPS
|
||||||
TabFiscalContable.Visible = True
|
TabFiscalContable.Visible = True
|
||||||
TabRetenciones.Visible = False
|
TabRetenciones.Visible = False
|
||||||
@@ -767,7 +767,7 @@ Partial Class Clientes
|
|||||||
'Configuración de Modalidad Update
|
'Configuración de Modalidad Update
|
||||||
BtnGuardar.Text = "Guardar Cambios"
|
BtnGuardar.Text = "Guardar Cambios"
|
||||||
LtlTitulo.Text = "Consulta del Cliente:"
|
LtlTitulo.Text = "Consulta del Cliente:"
|
||||||
CargaDatosContrato()
|
'CargaDatosContrato()
|
||||||
|
|
||||||
|
|
||||||
'ImgAddVenta
|
'ImgAddVenta
|
||||||
@@ -813,8 +813,9 @@ Partial Class Clientes
|
|||||||
Tab.ActiveTabIndex = Request("ATI").ToEntero()
|
Tab.ActiveTabIndex = Request("ATI").ToEntero()
|
||||||
End If
|
End If
|
||||||
'CargaCuentasyConceptos()
|
'CargaCuentasyConceptos()
|
||||||
Else
|
Else
|
||||||
'Configuración de Modalidad Insert
|
'Configuración de Modalidad Insert
|
||||||
|
CargaEstados()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(525) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(525) = "1" Then
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
@@ -1376,14 +1377,14 @@ Partial Class Clientes
|
|||||||
If ObjCorporativo.GetCorporativo(UsuarioActual.CveEmpresa, 1) Then
|
If ObjCorporativo.GetCorporativo(UsuarioActual.CveEmpresa, 1) Then
|
||||||
If ObjCorporativo.DtResultados.Rows.Count > 0 Then
|
If ObjCorporativo.DtResultados.Rows.Count > 0 Then
|
||||||
Dim dt As DataTable = ObjCorporativo.DtResultados
|
Dim dt As DataTable = ObjCorporativo.DtResultados
|
||||||
DdlCorporativo.DataSource = dt
|
DdlCorporativo.DataSource = dt
|
||||||
DdlCorporativo.DataBind()
|
|
||||||
DdlCorporativo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlCorporativo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
Else
|
Else
|
||||||
DdlCorporativo.DataSource = Nothing
|
DdlCorporativo.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjCorporativo.Dispose()
|
ObjCorporativo.Dispose()
|
||||||
|
DdlCorporativo.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub CargaCuentasExistentes()
|
Protected Sub CargaCuentasExistentes()
|
||||||
'SELECTED VALUES
|
'SELECTED VALUES
|
||||||
@@ -1409,36 +1410,36 @@ Partial Class Clientes
|
|||||||
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus:=-1, TipoCliente:=-1) Then
|
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus:=-1, TipoCliente:=-1) Then
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||||
Existe = True
|
Existe = True
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|
||||||
CargaDdlSucursalCliente()
|
CargaDdlSucursalCliente()
|
||||||
CargaDocumentosVenta(CveCliente)
|
CargaDocumentosVenta(CveCliente)
|
||||||
|
|
||||||
Dim RetSC As Boolean = CargaSucursalesCliente()
|
Dim RetSC As Boolean = CargaSucursalesCliente()
|
||||||
|
|
||||||
|
CargaUsuariosPortal()
|
||||||
CargaPersonalAsignado()
|
'CargaPersonalAsignado()
|
||||||
CargaUsuariosPortal()
|
'CargaOrdenesServiciosCliente()
|
||||||
CargaOrdenesServiciosCliente()
|
|
||||||
CargaImpuestosLocales()
|
CargaImpuestosLocales()
|
||||||
CargaCuentasContablesDdls()
|
CargaCuentasContablesDdls()
|
||||||
CargaResponsables()
|
CargaResponsables()
|
||||||
CargaCondicionesEntrega()
|
CargaCondicionesEntrega()
|
||||||
'CargaClasificaciones()
|
'CargaClasificaciones()
|
||||||
CargaGridRetenciones()
|
' CargaGridRetenciones()
|
||||||
' CargaDocs()
|
' CargaDocs()
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
CargaDocumentacionCliente()
|
CargaDocumentacionCliente()
|
||||||
'CargaMetodosPago33()
|
'CargaMetodosPago33()
|
||||||
'CargaFormaPago33()
|
'CargaFormaPago33()
|
||||||
'CargaComboCFDI()
|
'CargaComboCFDI()
|
||||||
CargarPagosNoBancarios()
|
'CargarPagosNoBancarios()
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(279) Then
|
If UsuarioActual.TienePermisoProceso(279) Then
|
||||||
LnkPorcentajeMarcas.Visible = True
|
LnkPorcentajeMarcas.Visible = True
|
||||||
LnkPorcentajePrecios.Visible = True
|
LnkPorcentajePrecios.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True
|
If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CvePlataforma = 3 Then ' SI ES USUARIO DE GPS.
|
If UsuarioActual.Empresa.CvePlataforma = 3 Then ' SI ES USUARIO DE GPS.
|
||||||
@@ -1447,7 +1448,7 @@ Partial Class Clientes
|
|||||||
CargaCuentasEquipos()
|
CargaCuentasEquipos()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CargaCuentasCaracteristicas()
|
CargaCuentasCaracteristicas()
|
||||||
|
|
||||||
If ObjClientes.Pais = "" Then ObjClientes.Pais = "México"
|
If ObjClientes.Pais = "" Then ObjClientes.Pais = "México"
|
||||||
|
|
||||||
@@ -1583,9 +1584,9 @@ Partial Class Clientes
|
|||||||
HDLT.Value = If(ObjClientes.DtResultados(0)("LT").ToString() = "", "0", ObjClientes.DtResultados(0)("LT").ToString())
|
HDLT.Value = If(ObjClientes.DtResultados(0)("LT").ToString() = "", "0", ObjClientes.DtResultados(0)("LT").ToString())
|
||||||
HDLG.Value = If(ObjClientes.DtResultados(0)("LG").ToString() = "", "0", ObjClientes.DtResultados(0)("LG").ToString())
|
HDLG.Value = If(ObjClientes.DtResultados(0)("LG").ToString() = "", "0", ObjClientes.DtResultados(0)("LG").ToString())
|
||||||
|
|
||||||
DdlPais.SelectedValueExist(ObjClientes.CvePais)
|
DdlPais.SelectedValueExist(ObjClientes.CvePais)
|
||||||
CargaEstado()
|
|
||||||
|
|
||||||
|
CargaEstado()
|
||||||
|
|
||||||
CargaEstados(ObjClientes.DtResultados(0)("SATPais").ToString())
|
CargaEstados(ObjClientes.DtResultados(0)("SATPais").ToString())
|
||||||
|
|
||||||
@@ -1638,6 +1639,9 @@ Partial Class Clientes
|
|||||||
'If ObjClientes.CveMetodoPago33 > 0 Then DdlMetodoPago33.Items.RemoveAt(0)
|
'If ObjClientes.CveMetodoPago33 > 0 Then DdlMetodoPago33.Items.RemoveAt(0)
|
||||||
'If ObjClientes.CveFormaPago33 > 0 Then DdlFormaPago33.Items.RemoveAt(0)
|
'If ObjClientes.CveFormaPago33 > 0 Then DdlFormaPago33.Items.RemoveAt(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'DIAS DE PAGO
|
'DIAS DE PAGO
|
||||||
If ObjClientes.RecepcionPagos <> "" AndAlso ObjClientes.RecepcionPagos.Length = 11 Then
|
If ObjClientes.RecepcionPagos <> "" AndAlso ObjClientes.RecepcionPagos.Length = 11 Then
|
||||||
Dim array As String() = ObjClientes.RecepcionPagos.Split(New Char() {"-"c})
|
Dim array As String() = ObjClientes.RecepcionPagos.Split(New Char() {"-"c})
|
||||||
@@ -1676,27 +1680,31 @@ Partial Class Clientes
|
|||||||
TxtObsDiasRevision.Text = ObjClientes.ObservacionRevision
|
TxtObsDiasRevision.Text = ObjClientes.ObservacionRevision
|
||||||
TxtReferenciaFiscal.Text = ObjClientes.ReferenciaFiscal
|
TxtReferenciaFiscal.Text = ObjClientes.ReferenciaFiscal
|
||||||
TxtCelular.Text = ObjClientes.Celular
|
TxtCelular.Text = ObjClientes.Celular
|
||||||
TxtExtOtro.Text = ObjClientes.ExtOtros
|
TxtExtOtro.Text = ObjClientes.ExtOtros
|
||||||
|
|
||||||
|
|
||||||
If ObjClientes.IdCtaContClientes > 0 Then DdlCtaContableClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContClientes), ObjClientes.IdCtaContClientes.ToString())) : DdlCtaContableClientes.SelectedValue = ObjClientes.IdCtaContClientes.ToString()
|
If UsuarioActual.CveEmpresa.Contiene(119, 4, 7, 11, 12, 122, 145) Then
|
||||||
If ObjClientes.IdCtaContAnticipos > 0 Then
|
|
||||||
DdlCtaContableAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContAnticipos), ObjClientes.IdCtaContAnticipos.ToString()))
|
If ObjClientes.IdCtaContClientes > 0 Then DdlCtaContableClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContClientes), ObjClientes.IdCtaContClientes.ToString())) : DdlCtaContableClientes.SelectedValue = ObjClientes.IdCtaContClientes.ToString()
|
||||||
DdlCtaContableAnticipos.SelectedValue = ObjClientes.IdCtaContAnticipos.ToString()
|
If ObjClientes.IdCtaContAnticipos > 0 Then
|
||||||
End If
|
DdlCtaContableAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContAnticipos), ObjClientes.IdCtaContAnticipos.ToString()))
|
||||||
If ObjClientes.IdCtaContRetISR > 0 Then DdlCtaContableRetISR.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContRetISR), ObjClientes.IdCtaContRetISR.ToString())) : DdlCtaContableRetISR.SelectedValue = ObjClientes.IdCtaContRetISR.ToString()
|
DdlCtaContableAnticipos.SelectedValue = ObjClientes.IdCtaContAnticipos.ToString()
|
||||||
If ObjClientes.IdCtaContRetIVA > 0 Then DdlCtaContableRetIVA.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContRetIVA), ObjClientes.IdCtaContRetIVA.ToString())) : DdlCtaContableRetIVA.SelectedValue = ObjClientes.IdCtaContRetIVA.ToString()
|
End If
|
||||||
If ObjClientes.IdCtaContFondoGarantia > 0 Then DdlCtaContableFondoGarantia.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContFondoGarantia), ObjClientes.IdCtaContFondoGarantia.ToString())) : DdlCtaContableFondoGarantia.SelectedValue = ObjClientes.IdCtaContFondoGarantia.ToString()
|
If ObjClientes.IdCtaContRetISR > 0 Then DdlCtaContableRetISR.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContRetISR), ObjClientes.IdCtaContRetISR.ToString())) : DdlCtaContableRetISR.SelectedValue = ObjClientes.IdCtaContRetISR.ToString()
|
||||||
|
If ObjClientes.IdCtaContRetIVA > 0 Then DdlCtaContableRetIVA.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContRetIVA), ObjClientes.IdCtaContRetIVA.ToString())) : DdlCtaContableRetIVA.SelectedValue = ObjClientes.IdCtaContRetIVA.ToString()
|
||||||
|
If ObjClientes.IdCtaContFondoGarantia > 0 Then DdlCtaContableFondoGarantia.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContFondoGarantia), ObjClientes.IdCtaContFondoGarantia.ToString())) : DdlCtaContableFondoGarantia.SelectedValue = ObjClientes.IdCtaContFondoGarantia.ToString()
|
||||||
If ObjClientes.IdCtaContComplementaria > 0 Then DdlCtaContableCompClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContComplementaria), ObjClientes.IdCtaContComplementaria.ToString())) : DdlCtaContableCompClientes.SelectedValue = ObjClientes.IdCtaContComplementaria.ToString()
|
|
||||||
If ObjClientes.IdCtaContCompAnticipos > 0 Then DdlCtaContableCompAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContCompAnticipos), ObjClientes.IdCtaContCompAnticipos.ToString())) : DdlCtaContableCompAnticipos.SelectedValue = ObjClientes.IdCtaContCompAnticipos.ToString()
|
|
||||||
|
If ObjClientes.IdCtaContComplementaria > 0 Then DdlCtaContableCompClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContComplementaria), ObjClientes.IdCtaContComplementaria.ToString())) : DdlCtaContableCompClientes.SelectedValue = ObjClientes.IdCtaContComplementaria.ToString()
|
||||||
If ObjClientes.IdCtaMonedaExtranjera > 0 Then DdlMonedaExtranjeraClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjera), ObjClientes.IdCtaMonedaExtranjera.ToString())) : DdlMonedaExtranjeraClientes.SelectedValue = ObjClientes.IdCtaMonedaExtranjera.ToString()
|
If ObjClientes.IdCtaContCompAnticipos > 0 Then DdlCtaContableCompAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContCompAnticipos), ObjClientes.IdCtaContCompAnticipos.ToString())) : DdlCtaContableCompAnticipos.SelectedValue = ObjClientes.IdCtaContCompAnticipos.ToString()
|
||||||
If ObjClientes.IdCtaMonedaExtranjeraAnticipos > 0 Then DdlMonedaExtranjeraAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjeraAnticipos), ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString())) : DdlMonedaExtranjeraAnticipos.SelectedValue = ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString()
|
|
||||||
ActivarRegistroAutomatico()
|
If ObjClientes.IdCtaMonedaExtranjera > 0 Then DdlMonedaExtranjeraClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjera), ObjClientes.IdCtaMonedaExtranjera.ToString())) : DdlMonedaExtranjeraClientes.SelectedValue = ObjClientes.IdCtaMonedaExtranjera.ToString()
|
||||||
|
If ObjClientes.IdCtaMonedaExtranjeraAnticipos > 0 Then DdlMonedaExtranjeraAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjeraAnticipos), ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString())) : DdlMonedaExtranjeraAnticipos.SelectedValue = ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString()
|
||||||
'7eleven
|
ActivarRegistroAutomatico()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'7eleven
|
||||||
TxtProveedor.Text = ObjClientes.SevenEleven_NumProveedor
|
TxtProveedor.Text = ObjClientes.SevenEleven_NumProveedor
|
||||||
|
|
||||||
'FORD
|
'FORD
|
||||||
@@ -1723,18 +1731,27 @@ Partial Class Clientes
|
|||||||
|
|
||||||
If Not ObjClientes.Estatus Then
|
If Not ObjClientes.Estatus Then
|
||||||
Alert("El cliente actualmente se encuentra Inactivo.", TipoMensaje.MsgAdvertencia)
|
Alert("El cliente actualmente se encuentra Inactivo.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'watch.Stop()
|
||||||
|
'Alert(watch.ElapsedMilliseconds.ToString())
|
||||||
|
'watch.Start()
|
||||||
|
|
||||||
CargaEventoBitacora()
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(300) = "1" Then
|
CargaEventoBitacora()
|
||||||
' CargaCuentasConceptos()
|
'If UsuarioActual.Empresa.Funcionalidad(300) = "1" Then
|
||||||
' divCuentas.Visible = True
|
' CargaCuentasConceptos()
|
||||||
' divCuentasContp.Visible = False
|
' divCuentas.Visible = True
|
||||||
'Else
|
' divCuentasContp.Visible = False
|
||||||
' divCuentas.Visible = False
|
'Else
|
||||||
' divCuentasContp.Visible = True
|
' divCuentas.Visible = False
|
||||||
|
' divCuentasContp.Visible = True
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
'watch.Stop()
|
||||||
|
'Alert(watch.ElapsedMilliseconds.ToString())
|
||||||
|
'watch.Start()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
CargaCuentasConceptos()
|
CargaCuentasConceptos()
|
||||||
divCuentas.Visible = True
|
divCuentas.Visible = True
|
||||||
@@ -1801,14 +1818,14 @@ Partial Class Clientes
|
|||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
|
|
||||||
|
|
||||||
watch.Stop()
|
watch.Stop()
|
||||||
'Alert(watch.ElapsedMilliseconds.ToString())
|
' Alert(watch.ElapsedMilliseconds.ToString())
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
|
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
|
||||||
Dim ObjClientes As New ClsClientes()
|
Dim ObjClientes As New ClsClientes()
|
||||||
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
'Carga Grid
|
'Carga Grid
|
||||||
@@ -2057,6 +2074,8 @@ Partial Class Clientes
|
|||||||
ObjMovtos.Dispose()
|
ObjMovtos.Dispose()
|
||||||
GvBancos.DataBind()
|
GvBancos.DataBind()
|
||||||
|
|
||||||
|
CargarPagosNoBancarios()
|
||||||
|
|
||||||
UpBancos.Update()
|
UpBancos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -5786,7 +5805,7 @@ Partial Class Clientes
|
|||||||
If ObjContabilidad.GetCuentas(Id, "-1", -1) Then
|
If ObjContabilidad.GetCuentas(Id, "-1", -1) Then
|
||||||
Retorno = ObjContabilidad.DtResultados.FiltroPrimeroValor("CtaCodigo")
|
Retorno = ObjContabilidad.DtResultados.FiltroPrimeroValor("CtaCodigo")
|
||||||
End If
|
End If
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Private Sub SetValues()
|
Private Sub SetValues()
|
||||||
@@ -8408,20 +8427,20 @@ Partial Class Clientes
|
|||||||
DdlUsuario.DataBind()
|
DdlUsuario.DataBind()
|
||||||
|
|
||||||
'Carga Productos
|
'Carga Productos
|
||||||
DdlPSFiltro.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
DdlPSFiltro.setEsWebService(True)
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||||
DdlPSFiltro.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacionFilto.SelectedValue)
|
DdlPSFiltro.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacionFilto.SelectedValue)
|
||||||
DdlPSFiltro.SelectedText = ""
|
DdlPSFiltro.SelectedText = ""
|
||||||
DdlPSFiltro.SelectedValue = "-1"
|
DdlPSFiltro.SelectedValue = "-1"
|
||||||
Else
|
'Else
|
||||||
DdlPSFiltro.ddl.Items.Clear()
|
' DdlPSFiltro.ddl.Items.Clear()
|
||||||
DdlPSFiltro.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero())
|
' DdlPSFiltro.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero())
|
||||||
DdlPSFiltro.ddl.DataBind()
|
' DdlPSFiltro.ddl.DataBind()
|
||||||
DdlPSFiltro.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
' DdlPSFiltro.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
CargaGrupo()
|
CargaGrupo()
|
||||||
CargaTipoCentroCosto()
|
CargaTipoCentroCosto()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -10380,9 +10399,9 @@ Partial Class Clientes
|
|||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
If ObjVentas.GetClientesPersonalEntrega(-1, CveCliente, UsuarioActual.CveEmpresa, -1) Then
|
If ObjVentas.GetClientesPersonalEntrega(-1, CveCliente, UsuarioActual.CveEmpresa, -1) Then
|
||||||
GvClentesPersonalEntrega.DataSource = ObjVentas.DtResultados
|
GvClentesPersonalEntrega.DataSource = ObjVentas.DtResultados
|
||||||
GvClentesPersonalEntrega.DataBind()
|
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
GvClentesPersonalEntrega.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnAgregarClientePersonalEntrega_Click(sender As Object, e As EventArgs) Handles BtnAgregarClientePersonalEntrega.Click
|
Protected Sub BtnAgregarClientePersonalEntrega_Click(sender As Object, e As EventArgs) Handles BtnAgregarClientePersonalEntrega.Click
|
||||||
@@ -10438,7 +10457,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Private Sub CargaResumenHistorial()
|
Private Sub CargaResumenHistorial()
|
||||||
Dim ObjClientes As New ClsClientes()
|
Dim ObjClientes As New ClsClientes()
|
||||||
If ObjClientes.GetHistorialVentas(CveCliente, -1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, -1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
||||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
Dim Cantidad As Double
|
Dim Cantidad As Double
|
||||||
|
|||||||
@@ -2187,20 +2187,27 @@ Partial Class ProductosyServicios
|
|||||||
' CargaClasificacionesDetalles()
|
' CargaClasificacionesDetalles()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
|
||||||
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
|
If DdlClasificacion.SelectedValue.ToEntero > 0 Then
|
||||||
If Boolean.Parse(Dr("EsAcumulador").ToString) Then
|
Try
|
||||||
MostarOcultarDivTamanio(True)
|
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
|
||||||
Else
|
If Boolean.Parse(Dr("EsAcumulador").ToString) Then
|
||||||
MostarOcultarDivTamanio(False)
|
MostarOcultarDivTamanio(True)
|
||||||
End If
|
Else
|
||||||
'SI ES MOTOBATERIA
|
MostarOcultarDivTamanio(False)
|
||||||
If DdlClasificacion.SelectedValue = "20517" Then
|
End If
|
||||||
MostarOcultarDivTamanio(True)
|
'SI ES MOTOBATERIA
|
||||||
End If
|
If DdlClasificacion.SelectedValue = "20517" Then
|
||||||
Catch ex As Exception
|
MostarOcultarDivTamanio(True)
|
||||||
OnError("Ocurrió un error al mostrar los tamaños", ex)
|
End If
|
||||||
End Try
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al mostrar los tamaños", ex)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MostarOcultarDivTamanio(Mostrar As Boolean)
|
Private Sub MostarOcultarDivTamanio(Mostrar As Boolean)
|
||||||
|
|||||||
@@ -2435,15 +2435,15 @@ Partial Class Ventas
|
|||||||
LnkImprimirFormatoTelcel.Visible = True
|
LnkImprimirFormatoTelcel.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
'If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
||||||
Dim ObjInventario As New ClsInventarios
|
' Dim ObjInventario As New ClsInventarios
|
||||||
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
' If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
' If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
DivDevAlm.Visible = True
|
' DivDevAlm.Visible = True
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
ObjInventario.Dispose()
|
' ObjInventario.Dispose()
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -2770,7 +2770,7 @@ Partial Class Ventas
|
|||||||
CargaFormatoSucursal()
|
CargaFormatoSucursal()
|
||||||
|
|
||||||
InicializaDevolucionAlmacen()
|
InicializaDevolucionAlmacen()
|
||||||
CargaOtrosConceptos()
|
'CargaOtrosConceptos()
|
||||||
CargaFacturaOC()
|
CargaFacturaOC()
|
||||||
|
|
||||||
'SELECCIONA SUCURSAL DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
|
'SELECCIONA SUCURSAL DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
|
||||||
@@ -6003,7 +6003,7 @@ Partial Class Ventas
|
|||||||
DivVentasUsados.Visible = True
|
DivVentasUsados.Visible = True
|
||||||
|
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
If ObjClientes.GetHistorialVentas(CveCliente, CveClienteSucursal:=-1, TipoDocto:="Ing", CveEstatusFactura:=-1) Then
|
If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, CveClienteSucursal:=-1, TipoDocto:="Ing", CveEstatusFactura:=-1) Then
|
||||||
DdlVentaUsado.DataSource = ObjClientes.DtResultados.FiltraParametros("UsadoMarcado = 0")
|
DdlVentaUsado.DataSource = ObjClientes.DtResultados.FiltraParametros("UsadoMarcado = 0")
|
||||||
End If
|
End If
|
||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
@@ -6089,7 +6089,7 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaFacturasARelacionar()
|
Private Sub CargaFacturasARelacionar()
|
||||||
Using ObjClientes As New ClsClientes
|
Using ObjClientes As New ClsClientes
|
||||||
If ObjClientes.GetHistorialVentas(Me.CveCliente, TipoDocto:="Ing") Then
|
If ObjClientes.GetHistorialVentas(Me.CveCliente, UsuarioActual.CveEmpresa, TipoDocto:="Ing") Then
|
||||||
DdlFacturaARelacionar.DataSource = ObjClientes.DtResultados
|
DdlFacturaARelacionar.DataSource = ObjClientes.DtResultados
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
@@ -6738,7 +6738,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim CveSATNC = "84111506"
|
Dim CveSATNC = "84111506"
|
||||||
Dim dtt As New DataTable
|
Dim dtt As New DataTable
|
||||||
dtt = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC
|
dtt = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CodigoSATPS:=CveSATNC, AplicaParaVenta:=1) ', SATClavePS:=CveSATNC
|
||||||
|
|
||||||
If dtt IsNot Nothing Then
|
If dtt IsNot Nothing Then
|
||||||
DdlNCPS.DataSource = dtt
|
DdlNCPS.DataSource = dtt
|
||||||
@@ -21376,6 +21376,11 @@ Partial Class Ventas
|
|||||||
If ObjInv.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
If ObjInv.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||||
CargaGVInv(ObjInv.DtResultados)
|
CargaGVInv(ObjInv.DtResultados)
|
||||||
|
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
||||||
|
|
||||||
|
DivDevAlm.Visible = True
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
|
|||||||
Reference in New Issue
Block a user