Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3866,7 +3866,7 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional Sat As Integer = 0) As Boolean
|
||||
Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional Sat As Integer = 0, Optional NivelCuenta As Integer = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
|
||||
@@ -3880,6 +3880,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@SAT", SqlDbType.Int).Value = Sat
|
||||
.Add("@NivelCuenta", SqlDbType.Int).Value = NivelCuenta
|
||||
End With
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ Public Class ClsMovimientos
|
||||
TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
|
||||
Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, Optional CveMoneda As Integer = -1,
|
||||
Optional TieneLineaAdicional As Integer = -1) As Boolean
|
||||
Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
@@ -287,7 +287,8 @@ Public Class ClsMovimientos
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional
|
||||
.Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -338,7 +339,8 @@ Public Class ClsMovimientos
|
||||
CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
|
||||
Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1,
|
||||
Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1, Optional TieneLineaAdicional As Integer = -1) As Boolean
|
||||
Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1,
|
||||
Optional TieneLineaAdicional As Integer = -1, Optional CveContrato As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DS = New DataSet
|
||||
@@ -382,6 +384,7 @@ Public Class ClsMovimientos
|
||||
.Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
|
||||
.Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados
|
||||
.Add("@TieneLineaAdicional", SqlDbType.Int).Value = TieneLineaAdicional
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -726,7 +726,7 @@ Public Class ClsOS
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosFinalizaUpdate")
|
||||
@@ -736,6 +736,7 @@ Public Class ClsOS
|
||||
.Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
|
||||
End With
|
||||
|
||||
@@ -744,7 +745,16 @@ Public Class ClsOS
|
||||
Retorno = True
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los cambios en La Orden de Servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
|
||||
If Opcion = 1 Then
|
||||
OnError("Ocurrió un error al finalizar la orden de servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
ElseIf Opcion = 2 Then
|
||||
OnError("Ocurrió un error al cencelar la orden de servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió un error al finalizar la orden de servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
|
||||
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
@@ -1316,7 +1316,7 @@ Public Class ClsSisUsuarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetPermisosPorUsuarioProcesos(CveUsuario As Integer, CvePadre As Integer, CveRol As Integer, CveModulo As Integer, CveProceso As Integer, Optional CveUsuarioActual As Integer = -1) As Boolean
|
||||
Public Function GetPermisosPorUsuarioProcesos(CveUsuario As Integer, CvePadre As Integer, CveRol As Integer, CveModulo As Integer, CveProceso As Integer, Optional CveUsuarioActual As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Sis_PermisosPorUsuarioProcesosGet")
|
||||
@@ -1327,6 +1327,7 @@ Public Class ClsSisUsuarios
|
||||
.Add("@CveModulo", SqlDbType.Int).Value = CveModulo
|
||||
.Add("@CveProceso", SqlDbType.Int).Value = CveProceso
|
||||
.Add("@CveUsuarioActual", SqlDbType.Int).Value = CveUsuarioActual
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa 'Opcional si se envia en -1 se cargan los usuarios de la empresa de los usuarios enviados
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -418,7 +418,7 @@ Public Class ClsVentas
|
||||
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
|
||||
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1) As Boolean
|
||||
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasAdd")
|
||||
@@ -517,6 +517,7 @@ Public Class ClsVentas
|
||||
.Add("@DevolucionImportePagado", SqlDbType.Money).Value = DevolucionImportePagado
|
||||
.Add("@EsGarantia", SqlDbType.Bit).Value = EsGarantia
|
||||
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||
.Add("@DescripcionVenta", SqlDbType.VarChar).Value = DescripcionVenta
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
'SqlTypes.SqlDateTime.Null
|
||||
|
||||
@@ -2109,10 +2109,10 @@ Namespace Modelos
|
||||
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
||||
For Each RowSalida As DataRow In DtMovimientos.Rows
|
||||
Dim Cantidad As Decimal = RowSalida("Cantidad").ToString().ToDecimal() * -1
|
||||
Dim Puntos As Decimal = RowSalida("Puntos").ToString().ToDecimal()
|
||||
Dim Puntos As Decimal = RowSalida("Puntos").ToString().ToDecimal() * -1
|
||||
|
||||
Dim ImporteCargo As Decimal = RowSalida("ImporteCargo").ToString().ToDecimal()
|
||||
Dim ImporteBonificacion As Decimal = RowSalida("ImporteBonificacion").ToString().ToDecimal()
|
||||
Dim ImporteCargo As Decimal = RowSalida("ImporteCargo").ToString().ToDecimal() * -1
|
||||
Dim ImporteBonificacion As Decimal = RowSalida("ImporteBonificacion").ToString().ToDecimal() * -1
|
||||
|
||||
Dim FacturadoBonificacion = False
|
||||
Dim CveVentaBonificacion As Integer = -1
|
||||
@@ -2194,6 +2194,10 @@ Namespace Modelos
|
||||
|
||||
For Each Dr As DataRow In factura.DtMovimientosUsados.Rows
|
||||
|
||||
If factura.EsGarantia Then
|
||||
ImporteConcepto = Dr("PU").ToString().ToDecimal()
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
'Mensaje = "Error al guardar los movimientos"
|
||||
Resultado = False
|
||||
@@ -2591,27 +2595,63 @@ Namespace Modelos
|
||||
CveMovimientoReferencia = CveMovimiento
|
||||
End If
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
|
||||
Dim Importe68 As Decimal = 0
|
||||
If ObjFactura.EsGarantia Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
|
||||
Dim Importe68 As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL * ValorMultiplicador
|
||||
|
||||
Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
Dim Importe318 As Decimal = (Math.Abs(importeMovimiento) - Math.Abs(Importe68)) * ValorMultiplicador
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, Importe318, Referencia, 318, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Importe318, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
|
||||
Dim Importe68 As Decimal = 0
|
||||
|
||||
Dim IdCtaContable68 = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto68, Importe68, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable68, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoReferencia, ImporteMX:=Importe68, Contabilizable:=False) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
|
||||
importeMovimiento = 0
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
|
||||
@@ -383,7 +383,10 @@ Public Class E141 : Implements IHttpHandler
|
||||
'TAREAS PROGRAMADAS
|
||||
Select Case Metodo
|
||||
Case "CrearActualizarProductos"
|
||||
|
||||
GuardaLogAD("NP-Inicia actualizacion de productos", "LogE141")
|
||||
respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False))
|
||||
GuardaLogAD("NP-Finaliza actualizacion de productos", "LogE141")
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
@@ -392,7 +395,9 @@ Public Class E141 : Implements IHttpHandler
|
||||
Case "CrearActualizarProductosJson"
|
||||
retorno = CrearActualizarProductosJson(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarPrecios"
|
||||
GuardaLogAD("AP-Inicia actualizacion de precios", "LogE141")
|
||||
respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False))
|
||||
GuardaLogAD("AP-Finaliza actualizacion de precios", "LogE141")
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
@@ -401,7 +406,9 @@ Public Class E141 : Implements IHttpHandler
|
||||
Case "ActualizarPreciosJson"
|
||||
retorno = ActualizarPreciosJson(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarExistencias"
|
||||
GuardaLogAD("AE-Inicia actualizacion de existencias", "LogE141")
|
||||
respuesta = ActualizarExistencias()
|
||||
GuardaLogAD("AE-Finaliza actualizacion de existencias", "LogE141")
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
@@ -410,7 +417,9 @@ Public Class E141 : Implements IHttpHandler
|
||||
Case "ActualizarExistenciasJson"
|
||||
retorno = ActualizarExistenciasJson(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarVendedores"
|
||||
GuardaLogAD("AV-Inicia actualizacion de vendedores", "LogE141")
|
||||
respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False))
|
||||
GuardaLogAD("AV-Finaliza actualizacion de vendedores", "LogE141")
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
@@ -1923,7 +1932,12 @@ Public Class E141 : Implements IHttpHandler
|
||||
Dim respuesta = JObject.Parse(resp)
|
||||
If respuesta("status").ToString() = "success" Then
|
||||
CountPeticionesExitosas += 1
|
||||
GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141")
|
||||
Else
|
||||
GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141")
|
||||
End If
|
||||
Else
|
||||
GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141")
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -1958,7 +1972,12 @@ Public Class E141 : Implements IHttpHandler
|
||||
Dim respuesta = JObject.Parse(resp)
|
||||
If respuesta("status").ToString() = "success" Then
|
||||
CountPeticionesExitosas += 1
|
||||
GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141")
|
||||
Else
|
||||
GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141")
|
||||
End If
|
||||
Else
|
||||
GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141")
|
||||
End If
|
||||
|
||||
Threading.Thread.Sleep(1000)
|
||||
@@ -2071,8 +2090,13 @@ Public Class E141 : Implements IHttpHandler
|
||||
If IsValidJson(resp) Then
|
||||
Dim respuesta = JObject.Parse(resp)
|
||||
If respuesta("status").ToString() = "success" Then
|
||||
GuardaLogAD("AP-Actualizacion de precios exitosa", "LogE141")
|
||||
CountPeticionesExitosas += 1
|
||||
Else
|
||||
GuardaLogAD($"AP-No se pudo actualizar precios ${respuesta.ToString()}", "LogE141")
|
||||
End If
|
||||
Else
|
||||
GuardaLogAD($"AP-No se pudo actualizar precios ${resp}", "LogE141")
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -2103,7 +2127,12 @@ Public Class E141 : Implements IHttpHandler
|
||||
Dim respuesta = JObject.Parse(resp)
|
||||
If respuesta("status").ToString() = "success" Then
|
||||
CountPeticionesExitosas += 1
|
||||
GuardaLogAD("AP-Actualizacion de precios exitosa", "LogE141")
|
||||
Else
|
||||
GuardaLogAD($"AP-No se pudo actualizar precios ${respuesta.ToString()}", "LogE141")
|
||||
End If
|
||||
Else
|
||||
GuardaLogAD($"AP-No se pudo actualizar precios ${resp}", "LogE141")
|
||||
End If
|
||||
|
||||
Threading.Thread.Sleep(1000)
|
||||
@@ -2186,7 +2215,12 @@ Public Class E141 : Implements IHttpHandler
|
||||
Dim respuesta = JObject.Parse(resp)
|
||||
If respuesta("status").ToString() = "success" Then
|
||||
CountPeticionesExitosas += 1
|
||||
GuardaLogAD("AE-Actualizacion de existencias exitosa", "LogE141")
|
||||
Else
|
||||
GuardaLogAD($"AE-No se pudo actualizar existencias ${respuesta.ToString()}", "LogE141")
|
||||
End If
|
||||
Else
|
||||
GuardaLogAD($"AE-No se pudo actualizar existencias ${resp}", "LogE141")
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -2217,7 +2251,12 @@ Public Class E141 : Implements IHttpHandler
|
||||
Dim respuesta = JObject.Parse(resp)
|
||||
If respuesta("status").ToString() = "success" Then
|
||||
CountPeticionesExitosas += 1
|
||||
GuardaLogAD("AE-Actualizacion de existencias exitosa", "LogE141")
|
||||
Else
|
||||
GuardaLogAD($"AE-No se pudo actualizar existencias ${respuesta.ToString()}", "LogE141")
|
||||
End If
|
||||
Else
|
||||
GuardaLogAD($"AE-No se pudo actualizar existencias ${resp}", "LogE141")
|
||||
End If
|
||||
Threading.Thread.Sleep(1000)
|
||||
End While
|
||||
@@ -2338,7 +2377,12 @@ Public Class E141 : Implements IHttpHandler
|
||||
Dim respuesta = JObject.Parse(resp)
|
||||
If respuesta("status").ToString() = "success" Then
|
||||
CountPeticionesExitosas += 1
|
||||
GuardaLogAD("AV-Actualizacion de vendedores exitosa", "LogE141")
|
||||
Else
|
||||
GuardaLogAD($"AV-No se pudo actualizar vendedores ${respuesta.ToString()}", "LogE141")
|
||||
End If
|
||||
Else
|
||||
GuardaLogAD($"AV-No se pudo actualizar vendedores ${resp}", "LogE141")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -4198,6 +4198,13 @@ Partial Class Compras_Compras
|
||||
|
||||
'------------------ INICIA VALIDACIONES ------------------
|
||||
|
||||
If Not ValidaVincuacionNotaFactura() Then
|
||||
Alert("Se requiere que la nota este aplciada a las facturas", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not ValidaSeleccionAnticipo() Then
|
||||
Alert("El proveedor tiene anticipos sin aplicar, favor de especiar uno.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -8327,6 +8334,34 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ValidaVincuacionNotaFactura() As Boolean
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531).ToString.ToEntero = 1 Then
|
||||
|
||||
For Each GvRow As GridViewRow In GvFacturaNC.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
If GvRow.FCCheckBox("ChkFacturaNC").Checked Then
|
||||
Respuesta = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
Private Function AjustaCombustibles() As Boolean
|
||||
|
||||
@@ -16127,6 +16162,15 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If CveFactura > 0 Then
|
||||
If DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
NCSeleccionFacturasRelacionadas(UUIDSList)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
UPCondicionesPago.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Cuentas:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm" runat="server" ID="DdlTipoCuentas" Width="150px">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" runat="server" ID="DdlTipoCuentas" Width="150px">
|
||||
<asp:ListItem Text="Todas" Value="1" />
|
||||
<asp:ListItem Text="Con Movimientos" Value="2" />
|
||||
<asp:ListItem Text="Saldo Actual no igual a cero" Value="3" />
|
||||
@@ -76,23 +76,31 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<label class="col-md-1" >SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Tipo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<label class="col-md-1" >Nivel: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlNivel" runat="server" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todo" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Último nivel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -101,7 +101,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa, 0) Then
|
||||
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa, 0, DdlNivel.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
|
||||
|
||||
|
||||
@@ -362,6 +362,14 @@
|
||||
<asp:ListItem Text="Sin lineas adicionales" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top">
|
||||
Contrato:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" AppendDataBoundItems="true" DataTextField="TituloInfo" DataValueField="CveContrato" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -172,6 +172,20 @@ Partial Class RepCxC
|
||||
' Next
|
||||
'End If
|
||||
'ObjSisUsuarios.Dispose()
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
CargaContratos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaContratos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente:=-1) Then
|
||||
DdlContrato.DataSource = ObjContratos.DtResultados
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
DdlContrato.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -454,6 +454,8 @@
|
||||
|
||||
<label for="<%= HLkFolio.ClientID.ToString()%>" style="font-size:20px" >Folio: </label>
|
||||
<asp:HyperLink ID="HLkFolio" runat="server" CssClass="Texto" Target="_blank" />
|
||||
|
||||
<asp:HyperLink ID="HLKPDF" runat="server" CssClass="Texto" Target="_blank" ToolTip="Descargar PDF" ><i class="fa fa-file-pdf-o" aria-hidden="true"></i></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@@ -662,6 +664,8 @@
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton runat="server" ID="LnkModalAsignar" CssClass="btn btn-success" Text="Guardar" OnClick="LnkModalAsignar_Click" ValidationGroup="GrpAsignar"></asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
<asp:LinkButton runat="server" ID="LnkCancelarOrden" CssClass="btn btn-danger" Text="Cancelar Orden" OnClick="LnkCancelarOrden_Click" Visible="false" >
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -722,32 +726,8 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVHoraFin" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= TxtHorarioEnvio.ClientID.ToString() %>" style="font-size: 13px; color: #888888;">Hora de Envío:</label>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<cc1:TimeSelector ID="TxtHorarioEnvio" runat="server" DisplaySeconds="false" DisplayButtons="false">
|
||||
</cc1:TimeSelector>
|
||||
<asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TxtHorarioEnvio" Display="None" ErrorMessage="El campo <b>''Hora''</b> es necesario, por favor seleccione la hora correcta." ValidationGroup="GrpObligatorio" ValidateEmptyText="true"></asp:CustomValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="CVHoraInicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton runat="server" ID="LnkGuardarHorarioNoOpeartivo" CssClass="btn btn-success" Text="Guardar" OnClick="LnkGuardarHorarioNoOpeartivo_Click" ></asp:LinkButton>
|
||||
@@ -759,6 +739,45 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DVModalCancelacionOrden" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpmodalCacelaOrden" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label runat="server" ID="LblModalCancelarTitulo">Cancelar Orden de Servicio</asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtModalCancelarOrdenMotivo" CssClass="form-control" runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtAnio" runat="server" Text="Motivo:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtModalCancelarOrdenMotivo" runat="server" ControlToValidate="TxtModalCancelarOrdenMotivo" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpCancelaOrden"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton runat="server" ID="LnkmodalCancelarORdenServicio" CssClass="btn btn-danger" Text="Cancelar Orden" OnClick="LnkmodalCancelarORdenServicio_Click" ValidationGroup="GrpCancelaOrden" CausesValidation="true"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="display:none">
|
||||
|
||||
|
||||
@@ -255,6 +255,22 @@ Partial Class OS_RepServicioDomicilio
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTTecnicos As DataTable
|
||||
Get
|
||||
If ViewState("DTTecnicos") Is Nothing Then
|
||||
ViewState("DTTecnicos") = New DataTable
|
||||
End If
|
||||
|
||||
Return DirectCast(ViewState("DTTecnicos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DTTecnicos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Enum OSModalTipoAccion
|
||||
Agregar
|
||||
@@ -268,7 +284,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
CargaUsuariosTecnicos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyectoEtiqueta)
|
||||
LblSubProyectoFiltro.Text = LblSubProyectoEtiqueta.Text
|
||||
' LblModalSubProyectoLabel.Text = LblSubProyectoEtiqueta.Text
|
||||
@@ -281,10 +297,15 @@ Partial Class OS_RepServicioDomicilio
|
||||
cargaDropsModal()
|
||||
CargaClientePublicoGeneral()
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(348) Then
|
||||
DVModalAsignacion.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(352) Then
|
||||
LnkCancelarOrden.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'RegistraScript(" PrimeraCargaCalendario = true;")
|
||||
@@ -293,6 +314,18 @@ Partial Class OS_RepServicioDomicilio
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaUsuariosTecnicos()
|
||||
|
||||
DTTecnicos = New DataTable
|
||||
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetPermisosPorUsuarioProcesos(-1, -1, -1, -1, 351, UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
DTTecnicos = ObjUsuarios.DtResultados.FiltraParametros(" CveProcesoUsuarioAcceso > 0")
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
|
||||
#End Region
|
||||
@@ -323,7 +356,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTecnicos()
|
||||
DdlTecnico.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlTecnico.DataSource = DTTecnicos 'GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlTecnico.DataBind()
|
||||
DdlTecnico.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
@@ -352,7 +385,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
|
||||
'ObjOS.Dispose()
|
||||
|
||||
DdlTecnicoAsignar.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
|
||||
DdlTecnicoAsignar.DataSource = DTTecnicos 'GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
|
||||
DdlTecnicoAsignar.DataBind()
|
||||
DdlTecnicoAsignar.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
@@ -716,6 +749,9 @@ Partial Class OS_RepServicioDomicilio
|
||||
HLkFolio.Text = ObjOS.Folio.ToString
|
||||
HLkFolio.NavigateUrl = $"/OS/OrdenesServicios.aspx?CveOS={ObjOS.CveOS}"
|
||||
|
||||
HLKPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=OS&CVEOS={0}", ObjOS.CveOS))}"
|
||||
|
||||
|
||||
HFCveOS.Value = ObjOS.CveOS.ToString
|
||||
HFCveOsDetalle.Value = ObjOS.CveOSDetalle.ToString
|
||||
TxtDescripcion.Text = ObjOS.Descripcion
|
||||
@@ -743,18 +779,31 @@ Partial Class OS_RepServicioDomicilio
|
||||
FechaInicioOriginal = ObjOS.FechaInicio
|
||||
TxtModalFechaOS.Text = ObjOS.FechaInicio.ToString.ToDate.ToString("dd/MM/yyyy HH:mm")
|
||||
DvModalSubProyecto.Visible = True
|
||||
LblModalOStitulo.Text = "Actualizar Orden de Servicio"
|
||||
'TSTimeSelector.Hour = If(ObjOS.FechaInicio.Hour > 12, ObjOS.FechaInicio.Hour - 12, ObjOS.FechaInicio.Hour)
|
||||
'TSTimeSelector.Minute = ObjOS.FechaInicio.Minute
|
||||
'TSTimeSelector.AmPm = If(ObjOS.FechaInicio.Hour > 12, MKB.TimePicker.TimeSelector.AmPmSpec.PM, MKB.TimePicker.TimeSelector.AmPmSpec.AM)
|
||||
End If
|
||||
|
||||
|
||||
Dim TipoEstatus As Integer = 0
|
||||
TipoEstatus = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("TipoEstatus", String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio), "CveEstatusOrdenServicio ASC").ToEntero
|
||||
|
||||
LnkModalAsignar.Visible = If(TipoEstatus.Contiene(5), False, True)
|
||||
LnkCancelarOrden.Visible = If(TipoEstatus.Contiene(5), False, True)
|
||||
|
||||
If (TipoEstatus = 5) Then
|
||||
LblModalOStitulo.Text = "Orden Cancelada"
|
||||
End If
|
||||
|
||||
RegistraScript("$('#DVModalOS').modal('show');")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
ObjOS.Dispose()
|
||||
|
||||
LblModalOStitulo.Text = "Actualizar Orden de Servicio"
|
||||
|
||||
|
||||
ElseIf False Then ' Anterior
|
||||
|
||||
@@ -1255,7 +1304,7 @@ Partial Class OS_RepServicioDomicilio
|
||||
|
||||
DdlTecnicoAsignarHorario.Items.Clear()
|
||||
|
||||
DdlTecnicoAsignarHorario.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
|
||||
DdlTecnicoAsignarHorario.DataSource = DTTecnicos 'GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True'")
|
||||
DdlTecnicoAsignarHorario.DataBind()
|
||||
DdlTecnicoAsignarHorario.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlTecnicoAsignarHorario.SelectedValueExist("-1")
|
||||
@@ -1393,4 +1442,89 @@ Partial Class OS_RepServicioDomicilio
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkCancelarOrden_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
RegistraScript($"$('#{TxtModalCancelarOrdenMotivo.ClientID}').focus();;$('#DVModalCancelacionOrden').modal('show');")
|
||||
|
||||
|
||||
TxtModalCancelarOrdenMotivo.Focus()
|
||||
TxtModalCancelarOrdenMotivo.Text = ""
|
||||
UpmodalCacelaOrden.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
|
||||
' Dim ObjEventoBitacora As New ClsOIEventos
|
||||
|
||||
' Dim FileExtension As String = "-1"
|
||||
' Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||
' Dim filemove As String = ""
|
||||
|
||||
' For Each fileItem As Archivo In filesgral
|
||||
' FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
' filemove = fileItem.filename
|
||||
' Next
|
||||
|
||||
' If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveOS, -1, -1, -1, -1) Then
|
||||
' If filemove <> "" Then
|
||||
' filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
' End If
|
||||
|
||||
' GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
' TxtEventoDescripcion.Text = ""
|
||||
' Anexo.Text = "[]"
|
||||
' Alert("La bitácora/observación se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||
' RegistraScript("$('#ModalBitacora').modal('hide')", "hidemodal")
|
||||
' End If
|
||||
' ObjEventoBitacora.Dispose()
|
||||
' GvEB.DataBind()
|
||||
|
||||
' UPEventoBitacora.Update()
|
||||
' CargaEventoBitacora()
|
||||
' UPAddEventoBitacora.Update()
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkmodalCancelarORdenServicio_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim TieneError As Boolean = True
|
||||
|
||||
Dim CveOS As Integer = HFCveOS.Value.ToEntero
|
||||
|
||||
|
||||
Dim objOS As New ClsOS
|
||||
Dim ObjEventoBitacora As New ClsOIEventos(objOS.IniciaTransacSQL)
|
||||
|
||||
|
||||
If objOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa, Opcion:=2) Then 'Opcion:=2 Es para cancelar
|
||||
If ObjEventoBitacora.AddEventoBitacora($"Motivo Cancelación: {TxtModalCancelarOrdenMotivo.Text.Trim}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveOS, -1, -1, -1, -1) Then
|
||||
TieneError = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
objOS.RollBack()
|
||||
Else
|
||||
objOS.Commit()
|
||||
End If
|
||||
|
||||
objOS.Dispose()
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
Alert("Orden Cancelada Correctamente", TipoMensaje.MsgInformacion, "location.reload(true);")
|
||||
RegistraScript("$('#DVModalCancelacionOrden').modal('hide');")
|
||||
RegistraScript("$('#DVModalFinalizarOrden').modal('hide');")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -206,13 +206,20 @@ Partial Class CatSubProyectos
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjSubProyectos As New ClsSubProyectos
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
|
||||
Dim ObjSubProyectos As New ClsSubProyectos
|
||||
|
||||
ObjSubProyectos.IniciaTransacSQL()
|
||||
|
||||
If ObjSubProyectos.RemoveSubProyecto(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
ObjSubProyectos.Commit()
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTSubProyectos") = ObjSubProyectos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTSubProyectos(UsuarioActual.CveEmpresa) = ObjSubProyectos.DtResultados
|
||||
Alert("El SubProyecto se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Alert("El SubProyecto se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjSubProyectos.RollBack()
|
||||
End If
|
||||
|
||||
ObjSubProyectos.Dispose()
|
||||
|
||||
@@ -804,6 +804,10 @@ Partial Class RH_Reclutamiento
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CrearEstructuraTablasTemporales()
|
||||
|
||||
DDLEstadoCivil4.DataSource = GlobalDTEstadoCivil
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
<asp:ListItem Text="GlobalDTClasificacionPorcentaje" Value="GlobalDTClasificacionPorcentaje"></asp:ListItem>
|
||||
<asp:ListItem Text="GlobalDTInvPSSeccionesAlmacen" Value="GlobalDTInvPSSeccionesAlmacen"></asp:ListItem>
|
||||
<asp:ListItem Text="GlobalDTTipoTransacciones" Value="GlobalDTTipoTransacciones"></asp:ListItem>
|
||||
<asp:ListItem Text="GlobalSATGenerales" Value="GlobalSATGenerales"></asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
|
||||
|
||||
@@ -99,12 +99,26 @@ Partial Class Sistemas_CatSesiones
|
||||
CargaDTInvPSSeccionesAlmacen()
|
||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTTipoTransacciones" Then
|
||||
CargaGlobalDTTipoTransacciones()
|
||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalSATGenerales" Then
|
||||
CargaSATGenerales()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaSATGenerales()
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATUsosCFDI Then Application("GlobalDTSATUsosCFDI") = ObjGrales.DtResultados
|
||||
If ObjGrales.GetSATFraccionArancelaria Then Application("GlobalDTFraccionArancelaria") = ObjGrales.DtResultados.AsEnumerable()
|
||||
If ObjGrales.GetSATIncoterm Then Application("GlobalDTIncoterm") = ObjGrales.DtResultados
|
||||
If ObjGrales.GetSATTipoOperacion Then Application("GlobalDTTipoOperacion") = ObjGrales.DtResultados
|
||||
If ObjGrales.GetSATMotivoTraslado Then Application("GlobalDTSATMotivoTraslado") = ObjGrales.DtResultados
|
||||
If ObjGrales.GetSATUnidadesAduana Then Application("GlobalDTUnidadAduana") = ObjGrales.DtResultados
|
||||
If ObjGrales.GetSATClavePedimento Then Application("GlobalDTClavePedimento") = ObjGrales.DtResultados
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGlobalDTTipoTransacciones()
|
||||
Using ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetBancos_TiposTransaccion(-1) Then Application("GlobalDTTipoTransacciones") = ObjBancos.DtResultados Else Application("GlobalDTTipoTransacciones") = Nothing
|
||||
|
||||
@@ -1644,20 +1644,20 @@
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-8">
|
||||
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Parametros</span>
|
||||
<span class="caption-subject bold uppercase">Parametros</span>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<asp:CheckBox ID="ChkPermiteCredito" runat="server" Text="Permite Crédito" />
|
||||
|
||||
<div class="tools">
|
||||
<asp:CheckBox ID="ChkPermiteCredito" runat="server" Text="Permite Crédito" />
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpParametros" UpdateMode="Conditional" runat="server">
|
||||
@@ -1675,15 +1675,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="width:150px">
|
||||
<asp:TextBox ID="TxtFechaLimiteCredito" CssClass="form-control" runat="server" Width="150px"></asp:TextBox>
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
|
||||
<asp:LinkButton ID="LnkTxtFechaLimiteCredito" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
|
||||
<label for="<%= TxtFechaLimiteCredito.ClientID.ToString()%>" style="color: #888888;">F. Limite Crédito: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaLimiteCredito" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkTxtFechaLimiteCredito" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="METxtFechaLimiteCredito" runat="server" TargetControlID="TxtFechaLimiteCredito" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtFechaLimiteCredito" TargetControlID="TxtFechaLimiteCredito" PopupButtonID="LnkTxtFechaLimiteCredito" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<label for="<%= TxtFechaLimiteCredito.ClientID.ToString()%>">F. Limite Crédito: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1782,7 +1783,7 @@
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtCobranzaContacto" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCobranzaContacto" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtCobranzaContacto.ClientID.ToString()%>">Nombre Contacto de Pagos: </label>
|
||||
</div>
|
||||
|
||||
@@ -1790,7 +1791,7 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtCobranzaTelefono" CssClass="form-control" runat="server" MaxLength="13"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtCobranzaTelefono" ClearMaskOnLostFocus="false" MaskType="None" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtCobranzaTelefono" ClearMaskOnLostFocus="false" MaskType="None" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<label for="<%= TxtCobranzaTelefono.ClientID.ToString()%>">Tel. Pagos: </label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1820,7 +1821,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
@@ -1836,25 +1837,25 @@
|
||||
<label for="<%= TxtPortalFacturacion.ClientID.ToString()%>">Portal de Facturas: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivPortal" runat="server" visible="false" >
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtUsuarioPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtUsuarioPortalFacturacion.ClientID.ToString()%>">Usuario Portal: </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivPortal" runat="server" visible="false">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtContraseñaPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtContraseñaPortalFacturacion.ClientID.ToString()%>">Contraseña Portal: </label>
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtUsuarioPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtUsuarioPortalFacturacion.ClientID.ToString()%>">Usuario Portal: </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtContraseñaPortalFacturacion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtContraseñaPortalFacturacion.ClientID.ToString()%>">Contraseña Portal: </label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -1877,54 +1878,61 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
|
||||
<asp:CheckBox ID="ChkAntIXCNC" Text="Anticipos / NC / IXC" runat="server" Checked="true" OnCheckedChanged="ChkAntIXCNC_CheckedChanged" AutoPostBack="true" />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker " style="width:120px">
|
||||
<asp:TextBox ID="TxtFechaInicioCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaInicioCxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaInicioCxP" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
|
||||
<label for="<%= TxtFechaInicioCxP.ClientID.ToString()%>">Fecha Inicio: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaInicioCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaInicioCxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarioDel" TargetControlID="TxtFechaInicioCxP" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker " style="width:120px">
|
||||
<asp:TextBox ID="TxtFechaFinCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;" >
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaFinCxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaFinCxP" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
|
||||
<label for="<%= TxtFechaFinCxP.ClientID.ToString()%>">Fecha Fin: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="TxtFechaFinCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaFinCxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarioAl" TargetControlID="TxtFechaFinCxP" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker " style="width:120px">
|
||||
<asp:TextBox ID="TxtFechaVICxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
|
||||
<asp:LinkButton ID="ImgCalendarioFIV" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
|
||||
<label for="<%= TxtFechaVICxP.ClientID.ToString()%>">Fecha V. Inicio: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaVICxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioFIV" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFIV" runat="server" TargetControlID="TxtFechaVICxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioFIV" runat="server" TargetControlID="TxtFechaVICxP" PopupButtonID="ImgCalendarioFIV" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<label for="<%= TxtFechaVICxP.ClientID.ToString()%>">Fecha V. Inicio: </label>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarioFIV" TargetControlID="TxtFechaVICxP" PopupButtonID="ImgCalendarioFIV" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker " style="width:120px">
|
||||
<asp:TextBox ID="TxtFechaVFCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
|
||||
<asp:LinkButton ID="ImgCalendarioFFV" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFFV" runat="server" TargetControlID="TxtFechaVFCxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioFFV" runat="server" TargetControlID="TxtFechaVFCxP" PopupButtonID="ImgCalendarioFFV" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px">
|
||||
<label for="<%= TxtFechaVFCxP.ClientID.ToString()%>">Fecha V. Fin: </label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaVFCxP" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioFFV" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFFV" runat="server" TargetControlID="TxtFechaVFCxP" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarioFFV" TargetControlID="TxtFechaVFCxP" PopupButtonID="ImgCalendarioFFV" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1932,7 +1940,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label>Movimientos</label>
|
||||
<asp:DropDownList CssClass="form-control input-sm" ID="DdlTipoCuentasCxC" runat="server" Width="120px">
|
||||
<asp:DropDownList CssClass="form-control input-sm" ID="DdlTipoCuentasCxC" runat="server" Width="100%">
|
||||
<asp:ListItem Value="-1" Text="Todas" />
|
||||
<asp:ListItem Selected="True" Value="1" Text="Con Saldo" />
|
||||
</asp:DropDownList>
|
||||
@@ -1940,7 +1948,7 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>Tipo Docto</label>
|
||||
<asp:ListBox ID="DdlTipoDocto" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Width="150px" runat="server">
|
||||
<asp:ListBox ID="DdlTipoDocto" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Width="100%" runat="server">
|
||||
<asp:ListItem Selected="True" Value="Ing" Text="Ingresos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Rem" Text="Remisión"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
@@ -1949,12 +1957,6 @@
|
||||
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="RNC" Text="Remisión de Nota de crédito"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
<%-- <asp:DropDownList CssClass="form-control input-sm" ID="DdlTipoDocto" runat="server" Width="120px">
|
||||
<asp:ListItem Selected="True" Value="-1" Text="Todos" />
|
||||
<asp:ListItem Value="Ing" Text="Factura" />
|
||||
<asp:ListItem Value="Rem" Text="Remisión " />
|
||||
<asp:ListItem Value="Ant" Text="Anticipo" />
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -1975,13 +1977,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-footer" >
|
||||
<div class="portlet-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
@@ -1992,8 +1994,16 @@
|
||||
<div class="btn-group">
|
||||
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel2">
|
||||
<ContentTemplate>
|
||||
<asp:HyperLink ID="HplAbonarMasivo" Visible="True" runat="server" NavigateUrl="#" ToolTip="Pago de múltiples facturas">Pago múltiples facturas <img src="/Imagenes/Money_Add.png" alt="Pagar múltiples facturas" /></asp:HyperLink>
|
||||
|
||||
<asp:LinkButton ID="LnkCxCActivasPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkCxCActivasExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkCxCActivasExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<input type="text" id="TxtCxCActivas" class="form-control input-sm"
|
||||
onkeyup="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GvCxC.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GVHistorial.ClientID) %>"
|
||||
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkCxCActivasPDF" />
|
||||
@@ -2004,11 +2014,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<asp:HyperLink ID="HplAbonarMasivo" Visible="True" runat="server" NavigateUrl="#" ToolTip="Pago de múltiples facturas">Pago múltiples facturas <img src="/Imagenes/Money_Add.png" alt="Pagar múltiples facturas" /></asp:HyperLink>  
|
||||
|
||||
</div>
|
||||
<%--<div class="row">
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -2017,7 +2023,7 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -2069,7 +2075,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonar">
|
||||
<ItemTemplate>
|
||||
|
||||
|
||||
<asp:HyperLink ID="ImgAbonar" CssClass="Texto thickbox" runat="server" ImageUrl="~/Imagenes/Money_add.png" ToolTip="Registrar Pago/Abono"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -2087,10 +2093,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
@@ -2103,6 +2106,11 @@
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkHistorialCxCPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkHistorialCxCExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<input type="text" id="TxtCxCHistorial" class="form-control input-sm"
|
||||
onkeyup="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GvCxCHistorial.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GVHistorial.ClientID) %>"
|
||||
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkHistorialCxCPDF" />
|
||||
@@ -2112,15 +2120,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<div class="col-md-12" align="right">
|
||||
<input type="text" id="TxtCxCHistorial" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GvCxCHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GvCxCHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvCxCHistorial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Cuentas X Cobrar"
|
||||
@@ -6761,7 +6761,7 @@
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -599,16 +599,16 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
||||
{
|
||||
e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Row.DBCampo("PuedeRefacturar") == "0" && e.Row.DBCampo("CveEstatusFactura") == "23" && e.Row.DBCampo("CveVentaSustitucion").ToEntero() > 0)
|
||||
{
|
||||
if (e.Row.FCLinkButton("LnkCancelar")!= null) e.Row.FCLinkButton("LnkCancelar").Visible = true;
|
||||
if (e.Row.FCLinkButton("LnkCancelar") != null) e.Row.FCLinkButton("LnkCancelar").Visible = true;
|
||||
//SOLO MOSTRAR SI LA FACTURA NUEVA ESTA EMITIDA
|
||||
if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3")
|
||||
{
|
||||
if (e.Row.FCLinkButton("LnkCancelarFolioSustitucion") != null) e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true;
|
||||
}
|
||||
//if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3")
|
||||
//{
|
||||
// if (e.Row.FCLinkButton("LnkCancelarFolioSustitucion") != null) e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@
|
||||
<td width="95px"><b>Empresa:</b> </td>
|
||||
<td width="200px">
|
||||
<asp:Label ID="LblEmpresaCRM" runat="server" Text="Cliente"></asp:Label></td>
|
||||
<td width="135px" runat="server" id="Td5"><b>Enviar Mail:</b></td>
|
||||
<td width="135px" runat="server" id="Td5"><b>Enviar Mail:</b></td>
|
||||
<td width="85px">
|
||||
<asp:CheckBox ID="ChkEnviarFacturaCRM" runat="server" /></td>
|
||||
</tr>
|
||||
@@ -907,6 +907,32 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDescripcionVenta" runat="server" class="portlet light xspadding bordered whitoutcol" style="margin-left: auto" UpdateMode="Conditional" Visible="false">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span1" runat="server" class="caption-subject bold uppercase">Descripción </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<table border="0" width="250px">
|
||||
<tr align="left">
|
||||
<td>
|
||||
<asp:TextBox ID="TxtDescripcionVenta" runat="server" Rows="3" TextMode="MultiLine" Width="250px" MaxLength="800" CssClass="form-control input-sm" Enabled="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="Updatetabs" runat="server" UpdateMode="Conditional">
|
||||
@@ -2578,7 +2604,7 @@
|
||||
<div class="row rowpadding">
|
||||
<div class="col-md-2 form-group form-md-line-input" id="DivLblDestino" runat="server" visible="false"><span>Destino:</span></div>
|
||||
<div class="col-md-4 form-group form-md-line-input" id="DivDdlDestino" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlDirecionDestinatario" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="DireccionEnvioContacto" DataValueField="CveDireccionEnvio"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlDirecionDestinatario" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="DireccionEnvioContacto" DataValueField="CveDireccionEnvio"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -2615,7 +2641,7 @@
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
@@ -2280,6 +2280,14 @@ Partial Class Ventas
|
||||
ViewState("SaldoLineaAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property SaldoIngresosLineaAdicional As Decimal
|
||||
Get
|
||||
Return (IfNull(ViewState("SaldoIngresosLineaAdicional"), "0", ViewState("SaldoIngresosLineaAdicional"))).ToString().ToDecimal()
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("SaldoIngresosLineaAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveCategoriaLineaAdicional As Integer
|
||||
Get
|
||||
@@ -2298,6 +2306,14 @@ Partial Class Ventas
|
||||
ViewState("CveMonedaLineaAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property HabilitoFacturacionIngresoLineaAdicional As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("HabilitoFacturacionIngresoLineaAdicional")), False, CType(ViewState("HabilitoFacturacionIngresoLineaAdicional"), Boolean))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("HabilitoFacturacionIngresoLineaAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -3447,6 +3463,13 @@ Partial Class Ventas
|
||||
UPObservaciones.Update()
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
UpDescripcionVenta.Visible = True
|
||||
If CveVenta <= 0 Then
|
||||
TxtDescripcionVenta.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -4797,6 +4820,11 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
UpDescripcionVenta.Visible = True
|
||||
TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString()
|
||||
End If
|
||||
|
||||
|
||||
HplDownXML.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", DbRowVenta("SerieFolio"), DbRowVenta("TipoDocto"))))
|
||||
Case "Egs"
|
||||
@@ -8839,6 +8867,11 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlLineaAdicional.SelectedValue.ToEntero() > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
Alert("No se puede seleccionar una linea adicional de crédito si no se genera una remisón.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'SI TIENE ANTICIPOS Y ESTA AMORTIZADO AL 100% EL DOCUMENTO (SALDO = 0) | NO VALIDA PU DEL CONCEPTO
|
||||
If Not (LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0) Then
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then
|
||||
@@ -9057,18 +9090,6 @@ Partial Class Ventas
|
||||
Alert("El saldo de la linea adicional debe ser mayor a cero", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA
|
||||
If Me.CveMonedaLineaAdicional <> DdlMoneda.SelectedValue.ToEntero() Then
|
||||
Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
|
||||
If Me.SaldoLineaAdicional <= TxtTotal.Text.ToDecimal() Then
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -9406,6 +9427,38 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(705) = "1" AndAlso DdlLineaAdicional.SelectedValue.ToEntero() > 0 Then
|
||||
'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA
|
||||
If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
|
||||
If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional <= ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la remisión", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Ing" AndAlso (DtRemisionesPS Is Nothing OrElse DtRemisionesPS.Rows.Count = 0) Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("No se puede generar un ingreso con una linea adicional de credito si este no viene de una remisión", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional <= ObjFactura.Total Then
|
||||
TmpDT = TmpDTError.Copy()
|
||||
CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
||||
Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'If Not CveEmpresaCRM > 0 Then
|
||||
' If ObjFactura.Cliente.AplicaComercioExterior Then
|
||||
' If Not ValidaComercioExterior() Then
|
||||
@@ -9742,6 +9795,24 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ErrorList.Count = 0 AndAlso ObjFactura.TipoDocto = "Ing" Then
|
||||
Dim RowVenta As DataRow = Nothing
|
||||
If ObjVentas.GetVenta(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
RowVenta = ObjVentas.DtResultados.Rows(0)
|
||||
Else
|
||||
ErrorList.Add("No se pudieron validar los datos de la venta")
|
||||
End If
|
||||
|
||||
If RowVenta IsNot Nothing Then
|
||||
'SI FUE VENTA DE CONTADO VALIDA QUE SE HAYA PAGADO EN SU TOTALIDAD
|
||||
If RowVenta("CondicionesPago").ToString().ToEntero() = 0 AndAlso RowVenta("Saldo").ToString().ToDecimal() > 0.01D Then
|
||||
ErrorList.Add("La venta no fue pagada en su totalidad")
|
||||
End If
|
||||
Else
|
||||
ErrorList.Add("No se pudieron validar los datos de la venta")
|
||||
End If
|
||||
End If
|
||||
|
||||
'MARCA PARA NO SURTIR VENTA DE COTNRATO DE CONSIGNACION DE VENTA | [IPP] : PARCHE
|
||||
If ErrorList.Count = 0 Then
|
||||
If ObjFactura.CveVenta > 0 And CveAlmacenExistenciasContrato > 0 And DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
@@ -13008,6 +13079,11 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
Dim DescripcionVenta As String = ""
|
||||
If factura.TipoDocto = "Ing" AndAlso UsuarioActual.CveEmpresa = 13 Then
|
||||
DescripcionVenta = TxtDescripcionVenta.Text
|
||||
End If
|
||||
|
||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
@@ -13024,7 +13100,7 @@ Partial Class Ventas
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero()) Then
|
||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
||||
@@ -18659,28 +18735,40 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Private Sub CalculaLineasAdicionales()
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "PA") AndAlso UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||
DdlLineaAdicional.DataSource = Nothing
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
'SI ES VENTA EXISTENTE , SI SE VA EDITAR SOLO MOSTRAR LAS CON SALDO, FECHA DE VENCIMIENTO VIGENTE O LA LINEA ACTUAL
|
||||
If CveVenta > 0 Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TrLineaAdicional.Visible = True
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento <= '{Now.ToString("dd/MM/yyyy")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TrLineaAdicional.Visible = True
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados
|
||||
'SI SE ESTA FACTURANDO UNA REMISION DEBE SELECCIONAR LA LINEA ADICIONAL DE ESTA
|
||||
If Me.CveLineaAdicionalVenta > 0 Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(Me.CveLineaAdicionalVenta, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TrLineaAdicional.Visible = True
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TrLineaAdicional.Visible = True
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlLineaAdicional.DataBind()
|
||||
|
||||
DdlLineaAdicional.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
If Me.CveLineaAdicionalVenta > 0 Then
|
||||
@@ -22296,9 +22384,9 @@ Partial Class Ventas
|
||||
CargaAnticipos(CveCliente)
|
||||
End If
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
CalculaLineasAdicionales()
|
||||
End If
|
||||
'If CveVenta <= 0 Then
|
||||
' CalculaLineasAdicionales()
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
Private Sub btnBuscarPrecio_Click(sender As Object, e As EventArgs) Handles btnBuscarPrecio.Click
|
||||
@@ -31616,6 +31704,13 @@ Partial Class Ventas
|
||||
DdlMoneda.SelectedValue = GlobalDTMonedas.FiltroPrimeroValor("CveMoneda", $"Abreviatura = '{dtSeleccionadas.FiltroPrimeroValor("Abreviatura")}'")
|
||||
DdlMoneda.Enabled = False
|
||||
CambiaMoneda()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||
Me.CveLineaAdicionalVenta = dtSeleccionadas.FiltroPrimeroValor("CveLineaAdicional", "CveLineaAdicional > 0").ToEntero()
|
||||
CalculaLineasAdicionales()
|
||||
End If
|
||||
|
||||
|
||||
DdlUsoCFDI.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveUsoCFDI"))
|
||||
DdlMetodoPago33.SelectedValueExist(dtSeleccionadas.FiltroPrimeroValor("CveMetodoPago"))
|
||||
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero())
|
||||
@@ -36097,42 +36192,76 @@ Partial Class Ventas
|
||||
RBLPago.Enabled = False
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, -1, UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim RowLinea As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
If RowLinea IsNot Nothing Then
|
||||
TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
|
||||
If CveVenta <= 0 Then
|
||||
TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
|
||||
|
||||
'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL
|
||||
If RowLinea("TipoLinea").ToString() = "2" Then
|
||||
TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy")
|
||||
TxtFechaPago.Enabled = False
|
||||
imgCalendario.Visible = False
|
||||
'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL
|
||||
If RowLinea("TipoLinea").ToString() = "2" Then
|
||||
TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy")
|
||||
TxtFechaPago.Enabled = False
|
||||
imgCalendario.Visible = False
|
||||
End If
|
||||
|
||||
TxtOrdenCompra.Text = RowLinea("LineaAdicionalComercializador").ToString()
|
||||
End If
|
||||
|
||||
Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero()
|
||||
Me.CveMonedaLineaAdicional = RowLinea("CveMoneda").ToString().ToEntero()
|
||||
Me.SaldoLineaAdicional = RowLinea("Saldo").ToString().ToDecimal()
|
||||
Me.SaldoIngresosLineaAdicional = RowLinea("SaldoIngresos").ToString().ToDecimal()
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("PA") Then
|
||||
'SI NO TIENE LA OPCION DE FACTURAR LA PERMITE
|
||||
If DdlTipoComprobante.Items.FindByValue("Rem") Is Nothing Then
|
||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Remisión", "Rem"))
|
||||
HabilitoFacturacionIngresoLineaAdicional = True
|
||||
End If
|
||||
DdlTipoComprobante.SelectedValueExist("Rem")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
Alert("No se pudieron obtener datos de la linea adicional", TipoMensaje.MsgAdvertencia)
|
||||
Me.SaldoLineaAdicional = 0
|
||||
Me.SaldoIngresosLineaAdicional = 0
|
||||
Me.CveCategoriaLineaAdicional = 0
|
||||
End If
|
||||
Else
|
||||
Alert("No se pudieron obtener datos de la linea adicional", TipoMensaje.MsgAdvertencia)
|
||||
Me.SaldoLineaAdicional = 0
|
||||
Me.SaldoIngresosLineaAdicional = 0
|
||||
Me.CveCategoriaLineaAdicional = 0
|
||||
End If
|
||||
End Using
|
||||
Else
|
||||
Me.SaldoLineaAdicional = 0
|
||||
Me.SaldoIngresosLineaAdicional = 0
|
||||
Me.CveCategoriaLineaAdicional = 0
|
||||
TxtFechaPago.Text = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
TxtFechaPago.Text = Now.ToString("dd/MM/yyyy")
|
||||
TxtOrdenCompra.Text = ""
|
||||
|
||||
'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO
|
||||
If HabilitoFacturacionIngresoLineaAdicional Then
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
|
||||
DdlTipoComprobante.SelectedValueExist("PA")
|
||||
|
||||
UpParametros.Update()
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
UpParametros.Update()
|
||||
UPCondicionesPago.Update()
|
||||
UPObservaciones.Update()
|
||||
End Sub
|
||||
Protected Sub LnkUpdateLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||
'VALIDAR LINEAS ADICIONALES
|
||||
|
||||
Reference in New Issue
Block a user