diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb
index 825a06a64..277667dc0 100644
--- a/App_Code/ClsCompras.vb
+++ b/App_Code/ClsCompras.vb
@@ -195,7 +195,8 @@ Public Class ClsCompras
AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional IdPoliza As Integer = -1,
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
- Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1) As Boolean
+ Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
+ Optional CveContrato As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -246,6 +247,7 @@ Public Class ClsCompras
.Add("@TotalOriginal", SqlDbType.Money).Value = TotalOriginal
.Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
+ .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
End With
Try
@@ -267,10 +269,9 @@ Public Class ClsCompras
Return Retorno
End Function
Public Function UpdateCompra(Descripcion As String, FolioSecundario As String, FechaVencimiento As Date, AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer,
- Descuento As Double, SubTotal As Double, IVA As Double, Total As Double, CveUsuario As Integer,
- CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1,
- Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Double = 0,
- Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveFactura As Integer = -1) As Boolean
+ Descuento As Double, SubTotal As Double, IVA As Double, Total As Double, CveUsuario As Integer, CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1,
+ Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Double = 0, Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Boolean = False,
+ Optional CveFactura As Integer = -1, Optional CveContrato As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -297,6 +298,7 @@ Public Class ClsCompras
.Add("@CveTipoCompra", SqlDbType.Int).Value = CveTipoCompra
.Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible
.Add("@CveFactura", SqlDbType.Int).Value = CveFactura
+ .Add("@CveContrato", SqlDbType.Int).Value = CveContrato
End With
Try
@@ -2206,7 +2208,7 @@ Public Class ClsCompras
Return Retorno
End Function
- Public Function UpdateEstatusAlmacenDetalle(CveCompraDetalle As Integer, ValorEstatus As Integer, CveUsuario As Integer) As Boolean
+ Public Function UpdateEstatusAlmacenDetalle(CveCompraDetalle As Integer, ValorEstatus As Integer, CveUsuario As Integer, Optional CantidadDevolucion As Decimal = 0) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComprasDetalleEstatusAlmacenUpdate")
@@ -2214,6 +2216,7 @@ Public Class ClsCompras
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
.Add("@Estatus", SqlDbType.Int).Value = ValorEstatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CantidadDevolucion", SqlDbType.Decimal).Value = CantidadDevolucion
End With
Try
diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb
index 2f6dc4b60..e7b9a2971 100644
--- a/App_Code/ClsContratos.vb
+++ b/App_Code/ClsContratos.vb
@@ -1007,14 +1007,16 @@ Public Class ClsContratos
End Try
Return Retorno
- End Function
-
-
-
+ End Function
+
+
+
#End Region
-
+
#Region "CONTRATOS DETALLE"
- Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, Optional Observacion As String = "") As Boolean
+
+ Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String,
+ Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosDetalleAdd")
@@ -1029,6 +1031,10 @@ Public Class ClsContratos
.Add("@OCInterna", SqlDbType.VarChar).Value = OCInterna
.Add("@LimitarCantidad", SqlDbType.Bit).Value = If(LimitarCantidad, 1, 0)
.Add("@Observacion", SqlDbType.VarChar).Value = Observacion
+ .Add("@CveRubro", SqlDbType.Int).Value = CveRubro
+ .Add("@CveActividad", SqlDbType.Int).Value = CveActividad
+ .Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo
+ .Add("@Dias", SqlDbType.Int).Value = Dias
'NoIdentificacion
End With
@@ -1044,7 +1050,8 @@ Public Class ClsContratos
End Function
- Public Function UpdateContratosDetalle(CveContratoDetalle As Integer, CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, Optional Observacion As String = "") As Boolean
+ Public Function UpdateContratosDetalle(CveContratoDetalle As Integer, CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String,
+ Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosDetalleUpdate")
@@ -1058,7 +1065,11 @@ Public Class ClsContratos
.Add("@NoIdentificacion", SqlDbType.VarChar).Value = NoIdentificacion
.Add("@OCInterna", SqlDbType.VarChar).Value = OCInterna
.Add("@LimitarCantidad", SqlDbType.Bit).Value = If(LimitarCantidad, 1, 0)
- .Add("@Observacion", SqlDbType.VarChar).Value = Observacion
+ .Add("@Observacion", SqlDbType.VarChar).Value = Observacion
+ .Add("@CveRubro", SqlDbType.Int).Value = CveRubro
+ .Add("@CveActividad", SqlDbType.Int).Value = CveActividad
+ .Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo
+ .Add("@Dias", SqlDbType.Int).Value = Dias
End With
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 61f19b032..b89221914 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -1309,8 +1309,14 @@ Public Class ClsInventarios
Retorno = True
End If
Catch Ex1 As SqlException
+
If Ex1.Message.Contains("50019") Then
Me.OnError(" El producto no tiene existencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+
+ ElseIf Ex1.Message.Contains("CK_Inv_MovimientosDetalle_MetodoInventario") Then
+
+ Me.OnError("El movimiento debe de tener una Serie.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+
Else
If Ex1.Message.Contains("50021") Then
Me.OnError(" El producto ingresado previamente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
@@ -1437,7 +1443,7 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function GetMovimientosTransitorios(CveAlmacenDestino As Integer, CveTipoAlmacenDestino As Integer, CveAlmacenTransitorio As Integer, CveUsuarioResponsable As Integer, Folio As Integer, CveEmpresa As Integer) As Boolean
+ Public Function GetMovimientosTransitorios(CveAlmacenDestino As Integer, CveTipoAlmacenDestino As Integer, CveAlmacenTransitorio As Integer, CveUsuarioResponsable As Integer, Folio As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_MovimientosTransitoriosGet")
@@ -1448,6 +1454,7 @@ Public Class ClsInventarios
.Add("@Folio", SqlDbType.Int).Value = Folio
.Add("@CveUsuarioResponsable", SqlDbType.Int).Value = CveUsuarioResponsable
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
@@ -1868,7 +1875,7 @@ Public Class ClsInventarios
Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha,
Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1,
- Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Decimal
+ Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1) As Decimal
Dim Retorno As Decimal = -1
If FechaMovto = "-1" Then
@@ -1893,6 +1900,7 @@ Public Class ClsInventarios
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
+ .Add("@ExcluyeTransitorios", SqlDbType.Int).Value = ExcluyeTransitorios
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
@@ -1920,7 +1928,7 @@ Public Class ClsInventarios
Optional FechaMovto As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
Optional Serie As String = "-1", Optional Lote As String = "-1", Optional Caducidad As Date = MinFecha,
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1,
- Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
+ Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ExistenciasGet")
@@ -1941,6 +1949,7 @@ Public Class ClsInventarios
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
+ .Add("@ExcluyeTransitorios", SqlDbType.Int).Value = ExcluyeTransitorios
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
@@ -2675,6 +2684,7 @@ Public Class ClsInventarios
DataAdapter("PA_Inv_InventarioFisicoResultadoAvance")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index a8636cb31..be81c310e 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -634,6 +634,8 @@ Public Class ClsPaginas
Application("GlobalDTEmpresas") = value
End Set
End Property
+
+
Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa)
@@ -664,6 +666,41 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
+
+
+
+
+ Property GlobalDTRHActividades(CveEmpresa As Integer) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTRHActividades-{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If Application(AppNombre) Is Nothing Then
+
+ Dim ObjRH As New ClsRH
+ If ObjRH.GetActividades(CveEmpresa) Then Application(AppNombre) = ObjRH.DtResultados
+ ObjRH.Dispose()
+
+ End If
+
+ If CveEmpresa <> -1 Then
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
+ GlobalDTRHActividades = Dv.ToTable
+ Dv.Dispose()
+ Else
+ GlobalDTRHActividades = DirectCast(Application(AppNombre), DataTable)
+ End If
+
+
+
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTRHActividades-{0}", CveEmpresa)
+ Application(AppNombre) = value
+ End Set
+ End Property
+
Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTClasificaciones2-{0}", CveEmpresa)
@@ -4847,7 +4884,7 @@ Public Class ClsPaginas
PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
- PaginaDict.Add("/RH/CatChecadorEstaciones.aspx".ToUpper(), 627)
+
PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
PaginaDict.Add("/RH/RepUniformes.aspx".ToUpper(), 630)
diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb
index de7538cf9..9d5bfabce 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -1359,6 +1359,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Public Property CveUniforme As Integer
+ Public Property CveActividad As Integer
+
Public ReadOnly Property DtResultados() As DataTable
Get
@@ -6865,21 +6867,65 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al eliminar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
- End Function
+ End Function
#End Region
+
+#Region " A C T I V I D A D E S"
+
+
+ Public Function GetActividades(CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_RH_ActividadesGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener el listado de actividades ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+
+
+ Public Function AddActividades(Actividad As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ CveActividad = -1
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_RH_ActividadesAdd")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@Actividad", SqlDbType.VarChar).Value = Actividad
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveActividad", SqlDbType.Int).Direction = ParameterDirection.Output
+ End With
+ Try
+ SqlAdapter.Fill(Data)
- 'Public msgsError As New StringBuilder()
- 'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
- ' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
- ' msgsError.AppendLine(Mensaje)
- ' msgsError.Append(" ")
- ' 'Alert(Obj, Mensaje, TipoMensaje.MsgError)
- ' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
- 'End Sub
-
+ CveActividad = SqlAdapter.SelectCommand.Parameters("@CveActividad").Value.ToString.ToEntero
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener el listado de ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+
+
+#End Region
+
+
+ 'Public msgsError As New StringBuilder()
+ 'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
+ ' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
+ ' msgsError.AppendLine(Mensaje)
+ ' msgsError.Append(" ")
+ ' 'Alert(Obj, Mensaje, TipoMensaje.MsgError)
+ ' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
+ 'End Sub
+
#Region " IDisposable Support "
- ' IDisposable
+ ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
'If msgsError.ToString().Length > 0 Then
' Alert(msgsError.ToString(), TipoMensaje.MsgError)
diff --git a/App_Code/DtDatos.xsd b/App_Code/DtDatos.xsd
index 59b50901b..60d776208 100644
--- a/App_Code/DtDatos.xsd
+++ b/App_Code/DtDatos.xsd
@@ -233,7 +233,7 @@
-
+
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index bbe9ae2b3..1dead2777 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -2886,7 +2886,7 @@ Namespace Modelos
Next
- DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"})
+ DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
If DT.Rows.Count > 0 Then
'Se agrega movimiento separado por la cuenta de ventas (ER)
@@ -2919,7 +2919,7 @@ Namespace Modelos
' CveCuentaContabilizacion = 0
'End If
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
ErrorPrepoliza = True
Else
ObjFactura.SeGuardoPrePoliza = True
@@ -2961,7 +2961,7 @@ Namespace Modelos
End If
- DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"})
+ DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
If DT.Rows.Count > 0 Then
'Se agrega movimiento separado por la cuenta de ventas (ER)
@@ -3006,7 +3006,7 @@ Namespace Modelos
' CveCuentaContabilizacion = 0
'End If
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
ErrorPrepoliza = True
Else
ObjFactura.SeGuardoPrePoliza = True
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index d8325a81b..c16a3ca10 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -446,7 +446,7 @@ Partial Class Bancos_ProveedoresAbonar
HlSaldarCuentasSinPagar.Visible = True
End If
- If UsuarioActual.CveEmpresa = 119 And CveUsuarioProgramo <> -1 Then
+ If UsuarioActual.CveEmpresa.Contiene(119, 158) And CveUsuarioProgramo <> -1 Then
LnkPDFSolicitud.Visible = True
LnkExcelSolicitud.Visible = True
End If
@@ -942,6 +942,9 @@ Partial Class Bancos_ProveedoresAbonar
Dim TipoCambioGeneral As Decimal = 0
Dim tipoCambioCompraValuacion As Decimal = 1
+ Dim UsaComplementariaBancos As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
+ Dim UsaComplementariaProveedores As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
+
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
Dim TipoCambioFluctuacion As Decimal = 1
@@ -1046,7 +1049,7 @@ Partial Class Bancos_ProveedoresAbonar
ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaProveedorExtranjera
- If ImporteMovimiento <> 0 AndAlso (UsuarioActual.CveEmpresa = 119 Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
+ If ImporteMovimiento <> 0 AndAlso (UsaComplementariaProveedores Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
importeMX = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, CveConceptoComplementaria, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion, CveCuenta:=CveCuentaComplementaria) Then
MsgError = "No se pudo insertar la póliza"
@@ -2034,7 +2037,7 @@ Partial Class Bancos_ProveedoresAbonar
If (Not DivTarjeta.Visible Or DdlTarjeta.SelectedValue.ToEntero = -1) Then
If TipoCambioPago > 1 AndAlso CveMoneda = 2 Then
- If UsuarioActual.CveEmpresa = 119 Or (CveCuentaBancariaComplementaria > 0 OrElse IdCuentaBancariaComplementaria > 0) Then
+ If UsaComplementariaBancos Or (CveCuentaBancariaComplementaria > 0 OrElse IdCuentaBancariaComplementaria > 0) Then
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
TipoCambioPago = TxtTCDolares.Text.ToDecimal
ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
@@ -3121,6 +3124,7 @@ Partial Class Bancos_ProveedoresAbonar
Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero
Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate
Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero
+ Dim UsaComplementariaProveedores As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False)
Dim CveConceptoContablePago As Integer = 17
If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor
@@ -3141,7 +3145,7 @@ Partial Class Bancos_ProveedoresAbonar
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaIncobrable.Text.ToDate, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then
+ If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsaComplementariaProveedores) Then
IdCtaContable = IdCtaContComplementaria
CveCuenta = CveCuentaProveedorExtranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, 0.00D, gr.DataKey("SerieFolio").ToString, CveConceptoContableComplementaria, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Round(Saldo * TCCompra - Saldo, 2, MidpointRounding.AwayFromZero), ImporteME:=Saldo, TipoCambio:=TCCompra, CveCuenta:=CveCuentaComplementaria) Then
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index d0118d925..b5bfea7dd 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -80,6 +80,17 @@
+
+
+
+
+
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 2a8f5fe6a..596aa860d 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -1165,6 +1165,26 @@ Partial Class Compras_Compras
End Set
End Property
+
+ Private Property CveContratoObra As Integer
+ Get
+ If ViewState("CveContratoObra") Is Nothing Then
+ Return -1
+ Else
+ Return ViewState("CveContratoObra").ToString.ToEntero
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("CveContratoObra") = value
+ End Set
+ End Property
+
+
+
+
+
+
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
@@ -1186,6 +1206,7 @@ Partial Class Compras_Compras
CveConceptoContableAlmacen = 0
EsNoDeducible = False
CveTipoConcepto = 1
+ CargaContratos()
'******** Prorrateo ********************************************
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
btnProrateo.Visible = True
@@ -1314,7 +1335,7 @@ Partial Class Compras_Compras
Dim ObjPersonal As New ClsRH
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
DdlPersonal.DataSource = ObjPersonal.DtResultados
- DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados
+ DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
ObjPersonal.Dispose()
DdlPersonal.DataBind()
DdlPersonalReembolso.DataBind()
@@ -1442,6 +1463,8 @@ Partial Class Compras_Compras
DivEsNoDeducible.Visible = True
DivActualizarVincular.Visible = True
+ 'LiAccionesContratos.Visible = False
+
Else
ViewState("CveProveedor") = -1
@@ -4604,19 +4627,18 @@ Partial Class Compras_Compras
CveEstatusFactura = 6
End If
'hay amortización directa como descuento. RMF Temporal
- If UsuarioActual.CveEmpresa = 119 Then
- 'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then
- ' TxtDescuento.Text = LblAmortizacion.Text
- ' LblAmortizacion.Text = "0.00"
- 'End If
- 'o si el descuento es igual a la amortizacion
- 'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then
- ' TxtDescuento.Text = LblAmortizacion.Text
- ' LblAmortizacion.Text = "0.00"
- 'End If
+ 'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then
+ ' TxtDescuento.Text = LblAmortizacion.Text
+ ' LblAmortizacion.Text = "0.00"
+ 'End If
+
+ 'o si el descuento es igual a la amortizacion
+ 'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then
+ ' TxtDescuento.Text = LblAmortizacion.Text
+ ' LblAmortizacion.Text = "0.00"
+ 'End If
- End If
'si el registro es manual, toma el mismo dato
If CveFactura <= 0 Then TotalOriginal = TxtTotal.Text.ToDecimal
@@ -4637,7 +4659,7 @@ Partial Class Compras_Compras
TxtRedondeo.Text.ToDouble, TxtTotal.Text.ToDouble, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero,
AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen,
- CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto) Then
+ CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto, CveContrato:=CveContratoObra) Then
ViewState("CveCompra") = ObjCompras.CveCompra
If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString
@@ -5030,7 +5052,7 @@ Partial Class Compras_Compras
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
- If UsuarioActual.CveEmpresa = 119 AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then
+ If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then
AutoConta = False
End If
@@ -6897,7 +6919,7 @@ Partial Class Compras_Compras
If Not RegistroCuentaPuente AndAlso Not ChkNCInvNC.Checked Then
'GASTO
- If UsuarioActual.CveEmpresa = 119 Then
+ If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
DT = TmpDT
Else
DT = TmpDT.FiltraParametros("ISNULL(AplicaCostoIndirecto,0) <> 1")
@@ -7034,6 +7056,7 @@ Partial Class Compras_Compras
End If
Case 5 'Proveedores
If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor
+ Dim UsaComplementaria As Boolean = UsuarioActual.CveEmpresa.Contiene(119, 158)
If tipoCambioActual <> 1 Then
Select Case ConceptoContable
Case 5
@@ -7059,7 +7082,7 @@ Partial Class Compras_Compras
Else
IdCtaContable = CtaProveedorComplementaria
CveCuenta = CveCuentaProveedorComplementaria
- If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then
+ If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 OrElse UsaComplementaria) Then 'Cuando tiene complementaria lo dividimos en dos Then
importeMN = importeMovimiento
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
@@ -15228,7 +15251,7 @@ Partial Class Compras_Compras
'SI PUEDE RECIBIR POR OC Y COMPRA
' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre
- If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
+ If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
DivOCVinculaInv.Visible = True
End If
@@ -15270,7 +15293,7 @@ Partial Class Compras_Compras
'PROMOCIONES
LtOCPromocion.Text = StrPromos.ToString
- If LtOCPromocion.Text.Length > 0 And UsuarioActual.CveEmpresa = 119 Then
+ If LtOCPromocion.Text.Length > 0 And UsuarioActual.CveEmpresa.Contiene(119, 158) Then
DivOCPromocion.Visible = True
End If
@@ -15544,12 +15567,6 @@ Partial Class Compras_Compras
'If DdlOCVinculaInv.SelectedValue.ToEntero = 237 And Not CveFlete > 0 Then Alert("Necesita vincular un flete si selecciona Factura de Flete", TipoMensaje.MsgAdvertencia) : Exit Sub
'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub
- 'If UsuarioActual.CveEmpresa = 119 And DdlTipoComprobante.SelectedValue = "Fac" Then
- ' If Not VerificarProductosCompraConOC() Then
- ' Exit Sub
- ' End If
- 'End If
-
Dim SubTotalGV = 0.0D
Dim Amortizacion As Decimal = TmpDT.SUMD("Total")
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
@@ -15612,7 +15629,7 @@ Partial Class Compras_Compras
'SI PUEDE RECIBIR POR OC Y COMPRA
- If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
+ If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
If DdlOCVinculaInv.SelectedValue.ToEntero <= 0 Then
Alert("El campo Tipo de recepción almacén es necesario. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
@@ -16603,12 +16620,19 @@ Partial Class Compras_Compras
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
+ LiAccionesContratos.Visible = False
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
If DdlTipoComprobante.SelectedValue = "NC" Then
DivReembolso.Visible = False
RBLPago.Items(2).Enabled = False
+
+
+ If Not CveCompra > 0 Then
+ LiAccionesContratos.Visible = True
+ End If
+
Else
DivReembolso.Visible = True
RBLPago.Items(2).Enabled = True
@@ -16632,6 +16656,8 @@ Partial Class Compras_Compras
End If
+
+ UpAccionesContratos.Update()
UPCondicionesPago.Update()
End Sub
@@ -17275,7 +17301,7 @@ Partial Class Compras_Compras
LblAmortizacion.Text = "0.00"
End If
- If UsuarioActual.CveEmpresa = 119 AndAlso TieneAmortizacion Then
+ If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso TieneAmortizacion Then
Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString
End If
@@ -18798,9 +18824,9 @@ Partial Class Compras_Compras
For Each gvr As GridViewRow In GvSolDev.Rows
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
'actualiza el estatus del detalle
- ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0, UsuarioActual.CveUsuario)
+ ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0, UsuarioActual.CveUsuario, CantidadDevolucion:=gvr.FCTextBox("TxtCant").Text.ToDecimal)
Else
- ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1, UsuarioActual.CveUsuario)
+ ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1, UsuarioActual.CveUsuario, CantidadDevolucion:=0)
End If
Next
End If
@@ -20447,6 +20473,24 @@ Partial Class Compras_Compras
End If
Return True
End Function
+
+
+ Private Sub CargaContratos()
+ DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
+ DdlContrato.DataBind()
+ DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
+ End Sub
+
+ Protected Sub BtnModalContratos_Click(sender As Object, e As EventArgs)
+
+ RegistraScript("$('#DvModalContratos').modal('hide');")
+ CveContratoObra = DdlContrato.SelectedValue.ToEntero
+
+
+ End Sub
+ Protected Sub LnkContratos_Click(sender As Object, e As EventArgs)
+ RegistraScript("$('#DvModalContratos').modal('show');")
+ End Sub
End Class
Public Class MMensajeDevolucion
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index a2dd6a426..b39460360 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -6,7 +6,7 @@ Imports System.Data
Imports Microsoft.Reporting.WebForms
Imports System.Xml
Imports System.IO
-Imports iTextSharp.text
+Imports iTextSharp.text
Imports iTextSharp.text.pdf
Imports Stimulsoft.Report
@@ -17,8 +17,8 @@ Imports Stimulsoft.Report.Web
Partial Class PopUpVerFactura
Inherits ClsPaginas
- Private Shared missing As Object = System.Reflection.Missing.Value
-
+ Private Shared missing As Object = System.Reflection.Missing.Value
+
#Region " PROPIEDADES "
Public Property DtMovimientos() As DataTable
Get
@@ -85,18 +85,18 @@ Partial Class PopUpVerFactura
End If
Return ""
End Get
- End Property
- 'Private Property SessionPorImpresion As Boolean
- ' Get
- ' Return CBool(IfNull(ViewState("SessionPorImpresion"), False, ViewState("SessionPorImpresion")))
- ' End Get
- ' Set(value As Boolean)
- ' ViewState("SessionPorImpresion") = value
- ' End Set
- 'End Property
+ End Property
+ 'Private Property SessionPorImpresion As Boolean
+ ' Get
+ ' Return CBool(IfNull(ViewState("SessionPorImpresion"), False, ViewState("SessionPorImpresion")))
+ ' End Get
+ ' Set(value As Boolean)
+ ' ViewState("SessionPorImpresion") = value
+ ' End Set
+ 'End Property
#End Region
-
-
+
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
'CREA EL OBJECTO USUARIO A PARTIR DEL TOKEN
@@ -201,10 +201,10 @@ Partial Class PopUpVerFactura
End If
- End Sub
-
+ End Sub
+
#Region "U S U A R I O - T O K E N"
-
+
Private Function ValidaUsuarioSistema(CveEmpresa As Integer, Optional CveUsuario As Integer = 100) As Usuario
Dim UsuarioToken As Usuario = Nothing
@@ -238,9 +238,9 @@ Partial Class PopUpVerFactura
UsuarioToken.Empresa = ObjEmpresa.Empresa
End If
ObjEmpresa.Dispose()
- End Sub
+ End Sub
#End Region
-
+
Private Sub SeleccionaReporte(UrlParametros As Hashtable)
'DESCARGA COMPROBANTE
@@ -501,10 +501,10 @@ Partial Class PopUpVerFactura
URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
Next
Return URLParametros
- End Function
-
+ End Function
+
#Region "OP = CORT - IMPRIMIR CORTE"
-
+
Private Sub ImprimeCorte(CveCorte As Integer, Formato As String)
Dim ObjVenta As New ClsVentas
Dim ObjPuntoVenta As New ClsPuntoVenta
@@ -549,10 +549,10 @@ Partial Class PopUpVerFactura
ImprimirPDF("Empresas/Grales/Formatos/RepCortes.rdlc", lrds, params, "ReporteCortes", Formato)
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region " OP = FACTURA - IMPRIME COMPRA"
Private Sub DescargaComprobante(Parametros As Hashtable)
If Parametros("COMPROBANTE") IsNot Nothing Then
@@ -591,9 +591,9 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "OP DesXmlVIA- DESCARGAR XML DE VIATICOS"
Private Sub DescargaXMLViaticos(Parametros As Hashtable)
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
@@ -613,10 +613,10 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP DesXmlNom- DESCARGAR XML DE UTILIDADES"
Private Sub DescargaXMLUtilidades(Parametros As Hashtable)
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
@@ -636,9 +636,9 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'CONG' - IMPRIME GASTO DE CONTRATO"
Private Sub ImprimeGastoContrato(CveContrato As Integer, CveContratoGasto As Integer)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -680,10 +680,10 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/ContratoGasto.rdlc", dt, params, $"{Nombre}-Gastos", Formato:="PDF")
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "OP = 'CIC' - IMPRIME FORMATO CICOVISA"
Private Sub ImprimeFormatoCICOVISA(CveVenta As Integer)
If CveVenta > 0 Then
@@ -720,10 +720,10 @@ Partial Class PopUpVerFactura
ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString))
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = 'CARPO' - IMPRIME FORMATO CARTA PORTE"
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
If CveMovimiento > 0 Then
@@ -848,12 +848,12 @@ Partial Class PopUpVerFactura
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = 'DesXmlTra' - IMPRIME XML TRASLADO"
-
+
Private Sub DescargaXMLTraslado(Parametros As Hashtable)
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
@@ -872,12 +872,12 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = 'DesPdfTra' - IMPRIME PDF TRASLADO"
-
+
Private Sub DescargaPDFTraslado(Parametros As Hashtable)
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
@@ -896,10 +896,10 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region " OP = 'Vta,Fact' - IMPRIME PDF VENTAS"
Private Sub DescargaFacturaVenta(Parametros As Hashtable)
If Parametros("CVEVENTA") IsNot Nothing AndAlso Parametros("CVEVENTA").ToString.ToEntero > 0 Then
@@ -1223,11 +1223,11 @@ Partial Class PopUpVerFactura
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
-
+
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer)
Dim ObjInventarios As New ClsInventarios
@@ -1298,8 +1298,8 @@ Partial Class PopUpVerFactura
Dim CveMovimientoRelacionado As Integer = -1
Dim FolioRelacionado As String = ""
- Dim CveConceptoMovtoRelacionado As Integer = -1
-
+ Dim CveConceptoMovtoRelacionado As Integer = -1
+
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacen}").ToString.ToEntero
'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO
@@ -1310,7 +1310,7 @@ Partial Class PopUpVerFactura
CveConceptoMovtoRelacionado = 37
ElseIf CveConcepto.Contiene(36, 37) Then
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
- CveConceptoMovtoRelacionado = 3
+ CveConceptoMovtoRelacionado = 3
ElseIf CveConcepto.Contiene(2) AndAlso CveTipoAlmacen.Contiene(24, 25) Then
FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado")
CveConceptoMovtoRelacionado = 3
@@ -1322,10 +1322,10 @@ Partial Class PopUpVerFactura
Dim CantidadProductos As Decimal = 0
Dim CantidadUsados As Decimal = 0
- If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Then 'SALIDA Y DEVOLUCION DEL CLIENTE
+ If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Or CveConcepto = 40 Then 'SALIDA Y DEVOLUCION DEL CLIENTE
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa) Then
DtMovimientos = ObjInventarios.DtResultados
-
+ Alert("asdf")
DtMovimientos.Columns("No").AutoIncrement = True
DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1
DtMovimientos.Columns("No").AutoIncrementStep = 1
@@ -1369,27 +1369,27 @@ Partial Class PopUpVerFactura
End If
End If
- If UsuarioActual.CveEmpresa = 140 AndAlso CveCompra > 0 Then
- If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
- Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0")
- If DtFaltante.Rows.Count > 0 Then
- Dim SbPendientes As New StringBuilder
- SbPendientes.AppendFormat("Los siguientes productos quedaron pendientes por recibir:")
- For Each Row As DataRow In DtFaltante.Rows
- SbPendientes.AppendFormat(" PS:{0} Cant.:{1:N0},", Row("CodigoPS"), Row("CantidadF"))
- Next
- SbPendientes.Remove(SbPendientes.Length - 1, 1)
-
- SbPendientes.AppendFormat(" Total Cant.:{0:N0}, Total Costo:{1:N2}", DtFaltante.SUM("CantidadF"), DtFaltante.SUM("Total"))
-
- If Not String.IsNullOrEmpty(Observaciones) Then
- Observaciones = SbPendientes.ToString() + ". " + Observaciones
- Else
- Observaciones = SbPendientes.ToString()
- End If
- End If
- DtFaltante.Dispose()
- End If
+ If UsuarioActual.CveEmpresa = 140 AndAlso CveCompra > 0 Then
+ If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
+ Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0")
+ If DtFaltante.Rows.Count > 0 Then
+ Dim SbPendientes As New StringBuilder
+ SbPendientes.AppendFormat("Los siguientes productos quedaron pendientes por recibir:")
+ For Each Row As DataRow In DtFaltante.Rows
+ SbPendientes.AppendFormat(" PS:{0} Cant.:{1:N0},", Row("CodigoPS"), Row("CantidadF"))
+ Next
+ SbPendientes.Remove(SbPendientes.Length - 1, 1)
+
+ SbPendientes.AppendFormat(" Total Cant.:{0:N0}, Total Costo:{1:N2}", DtFaltante.SUM("CantidadF"), DtFaltante.SUM("Total"))
+
+ If Not String.IsNullOrEmpty(Observaciones) Then
+ Observaciones = SbPendientes.ToString() + ". " + Observaciones
+ Else
+ Observaciones = SbPendientes.ToString()
+ End If
+ End If
+ DtFaltante.Dispose()
+ End If
End If
If CveTipoAlmacen = 20 Then
@@ -1549,38 +1549,38 @@ Partial Class PopUpVerFactura
End If
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Entradas.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio), RDSName:="DsInventarios")
- ElseIf UsuarioActual.CveEmpresa = 140 Then
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
- End If
- Dim concepto As String = ""
- If CveConcepto.Contiene(2, 32, 33) Then
- concepto = "ENTRADA DE ALMACÉN"
- ElseIf CveConcepto.Contiene(36) Then
- concepto = "ENTRADA VIRTUAL"
- End If
-
- params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("Concepto", concepto))
- params.Add(New ReportParameter("Almacen", Almacen))
- params.Add(New ReportParameter("Fecha", Fecha))
- params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("Folio", Folio))
- params.Add(New ReportParameter("FacturadoA", NombreCliente))
- params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, "")))
- params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
- params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
- params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
- 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
- params.Add(New ReportParameter("Observaciones", Observaciones))
- params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
- params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
- params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
-
- ImprimirPDF(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
+ ElseIf UsuarioActual.CveEmpresa = 140 Then
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+ Dim concepto As String = ""
+ If CveConcepto.Contiene(2, 32, 33) Then
+ concepto = "ENTRADA DE ALMACÉN"
+ ElseIf CveConcepto.Contiene(36) Then
+ concepto = "ENTRADA VIRTUAL"
+ End If
+
+ params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("Concepto", concepto))
+ params.Add(New ReportParameter("Almacen", Almacen))
+ params.Add(New ReportParameter("Fecha", Fecha))
+ params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("Folio", Folio))
+ params.Add(New ReportParameter("FacturadoA", NombreCliente))
+ params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, "")))
+ params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
+ params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
+ params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
+ 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
+ params.Add(New ReportParameter("Observaciones", Observaciones))
+ params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
+ params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
+ params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
+
+ ImprimirPDF(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
Else
params.Add(New ReportParameter("TipoDocumento", String.Format("Compras {0}", Almacen)))
@@ -1630,6 +1630,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Descuentos", If(CveCompra > 0 AndAlso dr IsNot Nothing, (dr("Descuentos").ToString.ToDouble).FormatoNumero(2), "")))
params.Add(New ReportParameter("IVA", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("IVA").ToString.FormatoNumero(2), "")))
params.Add(New ReportParameter("Total", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("Total").ToString.FormatoNumero(2), "")))
+ params.Add(New ReportParameter("Observaciones", Observaciones))
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
If (UsuarioActual.CveEmpresa = 72) Then
@@ -1638,7 +1639,7 @@ Partial Class PopUpVerFactura
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
End If
- Case 3, 16, 37 ' S A L I D A S
+ Case 3, 16, 37, 40 ' S A L I D A S
'Dim Archivo As New System.IO.FileInfo(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72))
'Dim Imagen As New System.IO.FileInfo(String.Format("Empresas/{0}/Logo.png", 72))
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Salidas.rdlc", UsuarioActual.Empresa.Ruta))
@@ -1646,7 +1647,7 @@ Partial Class PopUpVerFactura
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim params As New List(Of ReportParameter)
Dim concepto As String = ""
- If CveConcepto = 3 Then
+ If CveConcepto.Contiene(3, 40) Then
concepto = "SALIDA DE ALMACÉN"
ElseIf CveConcepto = 37 Then
concepto = "SALIDA VIRTUAL"
@@ -1811,7 +1812,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("NombreRecibio", Recibio))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
- params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
+ params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
params.Add(New ReportParameter("UsuarioRegistro", UsuarioRegistro))
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
@@ -2337,7 +2338,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString()))
params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado))
End If
@@ -3341,10 +3342,10 @@ Partial Class PopUpVerFactura
ImprimirbytesPDF(reporte, $"OrdenCompra-{Folio.ToString}")
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = 'VAL' - IMPRIME PDF VAL"
Private Sub GenerarPDFVale(CveVale As Integer)
@@ -3374,9 +3375,9 @@ Partial Class PopUpVerFactura
'End If
End If
ObjAF.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'OS' - IMPRIMIR PDF OS"
Private Sub GenerarPDFOS(CveOS As Integer)
Dim ObjOS As New ClsOS()
@@ -3495,9 +3496,9 @@ Partial Class PopUpVerFactura
TmpDTMaterialesOS.Columns.Add("Clasificacion", GetType(String))
TmpDTMaterialesOS.Columns.Add("PS", GetType(String))
TmpDTMaterialesOS.Columns.Add("UM", GetType(String))
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'OI' - Crear Archivo "
Private Sub CrearArchivo(Archivo As String)
Dim ObjEventos As New ClsOIEventos
@@ -3506,11 +3507,11 @@ Partial Class PopUpVerFactura
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path) '-- if the file exists on the server
DescargarArchivo(file)
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "OP = 'Contratos' - Crear Archivo "
Private Sub CrearArchivoContratos(Archivo As String)
@@ -3518,11 +3519,11 @@ Partial Class PopUpVerFactura
Dim file As System.IO.FileInfo = New System.IO.FileInfo(Archivo) '-- if the file exists on the server
DescargarArchivo(file)
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "OP = 'OI' - Descargar Archivo "
Private Sub DescargarArchivo(File As System.IO.FileInfo)
If File.Exists Then 'set appropriate headers
@@ -3552,11 +3553,11 @@ Partial Class PopUpVerFactura
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
End If 'nothing in the URL as HTTP GET
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'AFR' - AF"
-
+
Private Sub ImprimirPDFAFR(CveAFR As Integer, Tipo As Integer)
Dim ObjAF As New ClsAF
'Dim ObjSubProyecto As New ClsSubProyectos
@@ -3660,7 +3661,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("RFC", dr("RFC").ToString))
params.Add(New ReportParameter("Puesto", dr("Puesto").ToString))
params.Add(New ReportParameter("PuestoEntrego", dr("PuestoEntrego").ToString))
- params.Add(New ReportParameter("Departamento", dr("Departamento").ToString))
+ params.Add(New ReportParameter("Departamento", dr("Departamento").ToString))
params.Add(New ReportParameter("DepartamentoEntrego", dr("DepartamentoEntrego").ToString))
params.Add(New ReportParameter("Folio", dr("Folio").ToString))
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
@@ -3743,9 +3744,9 @@ Partial Class PopUpVerFactura
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/ResguardoAF.rdlc", dtVC, params, NomArchivo)
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'POL' "
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
'Dim ObjConta As New ClsContabilidad
@@ -3784,9 +3785,9 @@ Partial Class PopUpVerFactura
ObjPoliza.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'CAN' - CANCELACION"
Public Sub ImprimeCancelacion(CveVenta As Integer)
Dim ObjVentas As New ClsVentas
@@ -3811,9 +3812,9 @@ Partial Class PopUpVerFactura
End If
ObjVentas.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'DC' - DEPOSITOS CAJA"
Private Sub CargaDepositosCaja(CveIE As Integer, CuentaCaja As String, CuentaDeposito As String)
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DepositoCaja.rdlc", UsuarioActual.Empresa.Ruta))
@@ -3840,11 +3841,11 @@ Partial Class PopUpVerFactura
ObjIE.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "I E C H E Q U E S"
-
+
Private Sub ImprimirIE(CveIE As Integer, CveEmpresa As Integer)
Dim CveTipoTransaccion = -1
Dim ObjIE As New ClsBancos()
@@ -4251,21 +4252,21 @@ Partial Class PopUpVerFactura
ParamComprobacion.Dispose()
ObjIE.Dispose()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = RECIBO DE PAGOS"
Private Sub ImprimirReciboDePagos(CveIE As Integer, CveVenta As Integer)
PDFReciboDePagos(CveVenta, CveIE, -1)
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = VTA - PyME"
-
- ' 04/05/2018 - Pruebas de impresion de factura PyME
+
+ ' 04/05/2018 - Pruebas de impresion de factura PyME
Private Sub GeneraPDFVtaPyMe(Venta As Modelos.Factura, Optional Formato As String = "PDF")
Dim Directorio1 As String = String.Format("{0}Empresas\{1}\Formatos\Factura.mrt", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
Dim File As FileInfo = New FileInfo(Directorio1)
@@ -4320,9 +4321,9 @@ Partial Class PopUpVerFactura
Else
RegistraScript("alert('No hay un formato de factura predefinido,favor de comunicar a soporte tecnico')")
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = ENTREGAS - Entregas por realizar"
Public Sub ImprimeEntregasPorRealizar(CveAsignacionEntrega As Long, pUsuarioEntregar As String)
Dim Correcto As Boolean = False
@@ -4345,79 +4346,79 @@ Partial Class PopUpVerFactura
End Sub
#End Region
-#Region "OP = Etiqueta - Etiquetas de recepcion"
- Private Sub ImprimirEtiqueta(CveMovimiento As Integer, Modalidad As String)
-
- Dim ObjInventarios As New ClsInventarios
-
- Dim All As Byte()
- Using ms As New MemoryStream
- Using d As New Document
- Using Copy As New PdfCopy(d, ms)
- d.Open()
- If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
- If ObjInventarios.DtResultados IsNot Nothing Then
- For Each DetalleRow As DataRow In ObjInventarios.DtResultados.Rows
- Dim CvePS As Integer = DetalleRow.Item("CvePS").ToString.ToEntero
- Dim Lote As String = DetalleRow.Item("Lote").ToString
- Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
- Dim PS As String = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString)
- If Modalidad = "Individual" Then
- Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
-
- Dim reader As New PdfReader(reporteByte)
- Dim Paginas As Integer = reader.NumberOfPages
- Dim Contador As Integer = 0
- While Contador < Paginas
- Contador += 1
- Copy.AddPage(Copy.GetImportedPage(reader, Contador))
- End While
- Else
- Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
-
- For contador As Integer = 0 To Cant
- Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
-
- Dim reader As New PdfReader(reporteByte)
- Dim Paginas As Integer = reader.NumberOfPages
- Dim Cont As Integer = 0
- While Cont < Paginas
- Cont += 1
- Copy.AddPage(Copy.GetImportedPage(reader, Cont))
- End While
- Next
- End If
- Next
- End If
- End If
- d.Close()
-
- End Using
- End Using
- All = ms.ToArray()
- End Using
- ImprimirbytesPDF(All, "Etiquetas")
-
-
- If Modalidad = "Individual" Then
- Else
-
- End If
- ObjInventarios.Dispose()
- End Sub
-
- Private Function GenerarEtiqueta(CvePS As Integer, Lote As String, FechaCaducidad As Date, PS As String) As Byte()
- Dim QrDescarga As String = ""
- Dim Cfdi As New RVCFDI33.GeneraCFDI()
- Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, Format(FechaCaducidad, "dd/MM/yyyy").ToString()))
- QrDescarga = Convert.ToBase64String(b)
- Dim params As New List(Of ReportParameter)
- params.Add(New ReportParameter("QR", QrDescarga))
- params.Add(New ReportParameter("PS", PS))
- params.Add(New ReportParameter("Lote", Lote))
- params.Add(New ReportParameter("FechaCad", FechaCaducidad.ToString()))
- Return StreamPDF("Empresas/Grales/Formatos/EtiquetaDeRecepcion.rdlc", New DataTable, params)
+#Region "OP = Etiqueta - Etiquetas de recepcion"
+ Private Sub ImprimirEtiqueta(CveMovimiento As Integer, Modalidad As String)
+
+ Dim ObjInventarios As New ClsInventarios
+
+ Dim All As Byte()
+ Using ms As New MemoryStream
+ Using d As New Document
+ Using Copy As New PdfCopy(d, ms)
+ d.Open()
+ If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
+ If ObjInventarios.DtResultados IsNot Nothing Then
+ For Each DetalleRow As DataRow In ObjInventarios.DtResultados.Rows
+ Dim CvePS As Integer = DetalleRow.Item("CvePS").ToString.ToEntero
+ Dim Lote As String = DetalleRow.Item("Lote").ToString
+ Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
+ Dim PS As String = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString)
+ If Modalidad = "Individual" Then
+ Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
+
+ Dim reader As New PdfReader(reporteByte)
+ Dim Paginas As Integer = reader.NumberOfPages
+ Dim Contador As Integer = 0
+ While Contador < Paginas
+ Contador += 1
+ Copy.AddPage(Copy.GetImportedPage(reader, Contador))
+ End While
+ Else
+ Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
+
+ For contador As Integer = 0 To Cant
+ Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
+
+ Dim reader As New PdfReader(reporteByte)
+ Dim Paginas As Integer = reader.NumberOfPages
+ Dim Cont As Integer = 0
+ While Cont < Paginas
+ Cont += 1
+ Copy.AddPage(Copy.GetImportedPage(reader, Cont))
+ End While
+ Next
+ End If
+ Next
+ End If
+ End If
+ d.Close()
+
+ End Using
+ End Using
+ All = ms.ToArray()
+ End Using
+ ImprimirbytesPDF(All, "Etiquetas")
+
+
+ If Modalidad = "Individual" Then
+ Else
+
+ End If
+ ObjInventarios.Dispose()
+ End Sub
+
+ Private Function GenerarEtiqueta(CvePS As Integer, Lote As String, FechaCaducidad As Date, PS As String) As Byte()
+ Dim QrDescarga As String = ""
+ Dim Cfdi As New RVCFDI33.GeneraCFDI()
+ Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, Format(FechaCaducidad, "dd/MM/yyyy").ToString()))
+ QrDescarga = Convert.ToBase64String(b)
+ Dim params As New List(Of ReportParameter)
+ params.Add(New ReportParameter("QR", QrDescarga))
+ params.Add(New ReportParameter("PS", PS))
+ params.Add(New ReportParameter("Lote", Lote))
+ params.Add(New ReportParameter("FechaCad", FechaCaducidad.ToString()))
+ Return StreamPDF("Empresas/Grales/Formatos/EtiquetaDeRecepcion.rdlc", New DataTable, params)
End Function
-#End Region
+#End Region
End Class
diff --git a/Compras/ProveedoresAuxiliar.aspx.vb b/Compras/ProveedoresAuxiliar.aspx.vb
index 529a6887d..41bcfe68c 100644
--- a/Compras/ProveedoresAuxiliar.aspx.vb
+++ b/Compras/ProveedoresAuxiliar.aspx.vb
@@ -83,7 +83,7 @@ Partial Class Compras_ProveedoresAuxiliar
If ObjConta.GetProveedoresAuxiliar(DdlProveeedores.SelectedValue.ToEntero, -1, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa,
DdlOpcion.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero, DdlOpcionContabilizable.SelectedValue.ToEntero) Then
If DdlOpcion.SelectedValue.ToEntero = 2 Then
- GvP.DataSource = ObjConta.DtResultados.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) = 5 AND Importe >= 0,0,1) = 1 ")
+ GvP.DataSource = ObjConta.DtResultados '.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) in (5,311) AND Importe >= 0,0,1) = 1 ") 'excluye las provisiones
Else
GvP.DataSource = ObjConta.DtResultados
End If
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb
index f5d83d58c..4b00fbc2c 100644
--- a/Compras/ReembolsosComprobaciones.aspx.vb
+++ b/Compras/ReembolsosComprobaciones.aspx.vb
@@ -93,33 +93,40 @@ Partial Class Compras_ReembolsosComprobaciones
Dim ObjPersonal As New ClsRH
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
- DdlPersonal.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
- ObjPersonal.Dispose()
- DdlPersonal.DataBind()
- CargaTipoTransaccion()
-
- If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then
- CbPermitirExcedente.Visible = True
+ If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
+ DdlPersonal.DataSource = ObjPersonal.DtResultados
Else
- CbPermitirExcedente.Visible = False
+ DdlPersonal.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1")
End If
- If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
- rowComisiones.Visible = True
+
+ ObjPersonal.Dispose()
+ DdlPersonal.DataBind()
+
+ CargaTipoTransaccion()
+
+ If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then
+ CbPermitirExcedente.Visible = True
+ Else
+ CbPermitirExcedente.Visible = False
+ End If
+
+ If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
+ rowComisiones.Visible = True
+ End If
+
+ If UsuarioActual.CveEmpresa = 119 Then
+ ChkReembolsarSinBancos.Visible = True
+ End If
+
+ TxtFechaPrePoliza.Text = Date.Now.ToShortDateString
+
+ 'CargaCuentasDiferencia()
+
+ 'TableDiferencia.Visible = False
End If
- If UsuarioActual.CveEmpresa = 119 Then
- ChkReembolsarSinBancos.Visible = True
- End If
-
- TxtFechaPrePoliza.Text = Date.Now.ToShortDateString
-
- 'CargaCuentasDiferencia()
-
- 'TableDiferencia.Visible = False
- End If
-
End Sub
#Region " FILTROS "
diff --git a/Compras/RepComprasDetalle.aspx.vb b/Compras/RepComprasDetalle.aspx.vb
index e7a5e5439..9e2776116 100644
--- a/Compras/RepComprasDetalle.aspx.vb
+++ b/Compras/RepComprasDetalle.aspx.vb
@@ -291,7 +291,10 @@ Partial Class Compras_RepComprasDetalle
FechaICaptura = If(IsDate(TxtFechaICaptura.Text.Trim()), TxtFechaICaptura.Text.Trim(), "-1")
FechaFCaptura = If(IsDate(TxtFechaFCaptura.Text.Trim()), TxtFechaFCaptura.Text.Trim(), "-1")
-
+ Dim AnioMes As String = If(FechaF <> "-1", "-1", IfNull(Request("AnioMes"), "-1").ToString())
+
+
+
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDouble
Else
@@ -301,7 +304,7 @@ Partial Class Compras_RepComprasDetalle
Dim SubProyectos As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
Dim TipoGasto As String = IIf(DdlTipoGasto.GetSelectedValuesM = "", "-1", DdlTipoGasto.GetSelectedValuesM).ToString
- If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, IfNull(Request("AnioMes"), "-1").ToString(), IfNull(Request("Fecha"), "-1").ToString(),
+ If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, AnioMes, IfNull(Request("Fecha"), "-1").ToString(),
DdlProveedores.SelectedValue.ToEntero, CveMoneda, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, DDlUsuarioCaptura.SelectedValue.ToEntero,
IfNull(Request("NumeroRemesa"), "-1").ToString.ToEntero, IfNull(Request("CveUsuarioRemesa"), "-1").ToString.ToEntero, FechaICaptura, FechaFCaptura, IfNull(Request("FechaCaptura"), "-1").ToString,
SubProyectos, DdlTipoDocto.SelectedValue, UsuarioActual.CveEmpresa,
diff --git a/Contabilidad/PlantillasPolizasDetalle.aspx b/Contabilidad/PlantillasPolizasDetalle.aspx
index c4351d6ed..34fb74f4f 100644
--- a/Contabilidad/PlantillasPolizasDetalle.aspx
+++ b/Contabilidad/PlantillasPolizasDetalle.aspx
@@ -229,16 +229,21 @@
-
+
+
+
+
+
-
+
+
-
+
@@ -299,8 +304,18 @@
@@ -308,7 +323,8 @@
-
+
+
diff --git a/Contabilidad/PlantillasPolizasDetalle.aspx.vb b/Contabilidad/PlantillasPolizasDetalle.aspx.vb
index 282658576..8b5143a0e 100644
--- a/Contabilidad/PlantillasPolizasDetalle.aspx.vb
+++ b/Contabilidad/PlantillasPolizasDetalle.aspx.vb
@@ -231,9 +231,14 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
If CvePlantillaPoliza > 0 Then
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then
TxtOrden.Text = ""
- updatatos()
- Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
- UpTitulos.Update()
+ If Not ChkSeguirAgregando.Checked Then
+ updatatos()
+ Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion)
+ Else
+ RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
+ UpModal.Update()
+ End If
+
Else
ErrorDetalle = True
End If
diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx
index 2418a9532..1d8e59b17 100644
--- a/Contabilidad/RepIVA.aspx
+++ b/Contabilidad/RepIVA.aspx
@@ -298,14 +298,14 @@
diff --git a/Ventas/ActualizarPrecios.aspx.vb b/Ventas/ActualizarPrecios.aspx.vb
index b63f2978b..22ef5da09 100644
--- a/Ventas/ActualizarPrecios.aspx.vb
+++ b/Ventas/ActualizarPrecios.aspx.vb
@@ -221,7 +221,7 @@ Partial Class Ventas_ActualizarPrecios
Next
- If Correcto Then
+ If Correcto AndAlso Not TieneError Then
Alert("Los Precios de lista de los Productos/Servicios se actualizaron correctamente")
End If
@@ -531,29 +531,38 @@ Partial Class Ventas_ActualizarPrecios
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, Codigo As String, PS As String, Precio As Decimal, PrecioMinimo As Decimal, PrecioLista As String) As Boolean
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
- Dim Franquicias = FranquiciasStr.Split(","c)
- Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
Dim StrMsg As New StringBuilder
- For Each Franquicia In Franquicias
- Dim CveFranquicia As Integer = Franquicia.ToEntero
- Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
- Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", PrecioLista)).ToEntero
+ Dim StrMsgError As New StringBuilder
+ If FranquiciasStr <> "" Then
- If CvePS <= 0 Then
- Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
- StrMsg.AppendFormat("El producto '{0}' no se encuentra en la Franquicia '{1}'", PS, EmpresaFranquicia)
+ Dim Franquicias = FranquiciasStr.Split(","c)
+ Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
- End If
- If CvePrecioLisa <= 0 Then
- Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
- StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}'", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
- End If
- If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
- StrMsg.AppendFormat("No se pudo actualizar el producto")
- End If
- Next
+ For Each Franquicia In Franquicias
+ Dim CveFranquicia As Integer = Franquicia.ToEntero
+ Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
+ Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", PrecioLista)).ToEntero
- If StrMsg.ToString = "" Then
+ If CvePS <= 0 Then
+ Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
+ StrMsg.AppendFormat("El producto '{0}' no se encuentra en la Franquicia '{1}' ", PS, EmpresaFranquicia)
+
+ End If
+ 'If CvePrecioLisa <= 0 Then
+ ' Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
+ ' StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}' ", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
+ 'End If
+ If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
+ StrMsgError.AppendFormat("No se pudo actualizar el producto")
+ End If
+ Next
+
+ End If
+
+ If StrMsgError.ToString = "" Then
+ If StrMsg.ToString <> "" Then
+ Alert(StrMsg.ToString, TipoMensaje.MsgAdvertencia)
+ End If
Return False
Else
Return True
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index 55ce1f097..a01b7bf92 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -9141,7 +9141,7 @@ Partial Class Clientes
End If
Dim ImporteBonificacion As Decimal = 0
- If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
+ If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count >= 4 Then
GvUsadosResumen.DataSource = ObjAcum.DtResultados
ImporteBonificacion = ObjAcum.DtResultados.Rows(4)("Valor").ToString().ToDecimal()
End If
diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx
index b3a9d6d14..6887e39d7 100644
--- a/Ventas/ClientesAbonar.aspx
+++ b/Ventas/ClientesAbonar.aspx
@@ -261,7 +261,7 @@
@@ -358,7 +358,15 @@
CveVenta
-
+
+
+
+
+
+
+ Complemento Pago
+
+
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index 98735344f..4a8e19e4e 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -636,6 +636,17 @@ Partial Class Ventas_ClientesAbonar
e.Row.FCCheckBox("Chk").Visible = False
End If
+
+ If e.Row.DBCampo("CveVenta").ToEntero > 0 Then
+ If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then
+ e.Row.FCLinkButton("LnkComplemento").Text = ""
+ e.Row.FCLinkButton("LnkComplemento").CssClass = "text-danger"
+ End If
+ Else
+ e.Row.FCLinkButton("LnkComplemento").Visible = False
+ End If
+
+
End If
End Sub
@@ -2071,8 +2082,13 @@ Partial Class Ventas_ClientesAbonar
Dim SubProyecto = DrSubProyecto("SubProyecto").ToString
Dim Proyecto = DrSubProyecto("Proyecto").ToString
- Dim CveSATNC = "84111506"
- Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("")
+ Dim CveSATNC As Integer
+ Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray())
+ Dim NCBonificacion As Integer = 0
+ If ArrayNC.Length > 6 Then 'CONCEPTO DE PRONTO PAGO
+ CveSATNC = ArrayNC(6).ToEntero()
+ End If
+ Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("")
For Each Dr As DataRow In DtImpuestos.Rows
AgregaTempDTNC(ObjFacturaDevolucion.DtDetalle, DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, DrPS("Codigo").ToString, DrPS("PSCodigo").ToString, DrPS("CveTipoPS").ToString.ToEntero, DrPS("Inv_CveMetodoInventario").ToString.ToEntero,
@@ -2505,6 +2521,18 @@ Partial Class Ventas_ClientesAbonar
'For i = 0 To CveVentas.Count - 1
Dim ObjBancos As New ClsBancos
+
+
+ If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, If(CveIESustitucion > 0, 2, 1), UsuarioActual.CveEmpresa, -1) Then
+ If Not ObjBancos.DtResultados.Rows.Count > 0 Then
+ ObjBancos.Dispose()
+ Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia)
+ Return ""
+ End If
+ End If
+
+
+
ObjBancos.IniciaTransacSQL()
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then
diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb
index da4fa3f72..18fb5bee9 100644
--- a/Ventas/PV.aspx.vb
+++ b/Ventas/PV.aspx.vb
@@ -2700,6 +2700,8 @@ Partial Class PV
Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
+ Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1")
+
If AplicaAlmacen Then
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
Else
diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx
index 7a5c4faa1..d83ba7ada 100644
--- a/Ventas/ProductosServicios.aspx
+++ b/Ventas/ProductosServicios.aspx
@@ -132,7 +132,7 @@
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 70a6134cf..69d5f99cf 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -8312,7 +8312,7 @@ Partial Class Ventas
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
If DT.Rows.Count > 0 Then
- ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
+ ObjFacturaDevolucion.Serie = DT.Rows(0)("Serie").ToString()
End If
DT.Dispose()
End If
@@ -8590,7 +8590,7 @@ Partial Class Ventas
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
If DT.Rows.Count > 0 Then
- ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
+ ObjFacturaBonificacion.Serie = DT.Rows(0)("Serie").ToString()
End If
DT.Dispose()
End If
@@ -9117,7 +9117,7 @@ Partial Class Ventas
ObjFactura.NumeroPersonas = 0
- If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
+ If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Egs" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
CveContrato = DdlContratosModal.SelectedValue.ToEntero
End If
@@ -16417,6 +16417,10 @@ Partial Class Ventas
Dim TotalCalculableImpuestosIVA As Decimal = 0
PU = PU.RoundAD(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
+ If Not TmpDT.Columns.Contains("RetIVA") Then
+ TmpDT.Columns.Add("RetIVA", GetType(Decimal))
+ End If
+
Row = TmpDT.NewRow()
Row("CveProyecto") = CveProyecto
Row("Proyecto") = Proyecto
@@ -16543,7 +16547,11 @@ Partial Class Ventas
Row("IVA") = Row("PorcentajeIVA")
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundAD(NumeroDecimales)
Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
+
+
+
Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
+
Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
Row("PorcentajeRetIVA") = ClienteRetIVA
Row("PorcentajeRetISR") = ClienteRetISR
@@ -16741,6 +16749,8 @@ Partial Class Ventas
TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
TmpDT.Columns.Add("Total", GetType(Decimal))
+ TmpDT.Columns.Add("RetIVA", GetType(Decimal))
+ TmpDT.Columns.Add("RetISR", GetType(Decimal))
'Para uso del módulo contable
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
@@ -22613,6 +22623,42 @@ Partial Class Ventas
If Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoSalidaGeneral, CveAlmacenOrigenContrato) Then
Return False
End If
+
+ Dim RealizarMovimientoVirtual As Boolean = False
+ If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
+ RealizarMovimientoVirtual = True
+ End If
+
+ 'VIRTUAL SALIDA
+ If RealizarMovimientoVirtual Then
+
+ Dim dtvirtual As DataTable = Nothing
+ Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenOrigenContrato).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
+ Dim CveMovimientoVirtualSalida As Integer
+
+ If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalidaGeneral, UsuarioActual.CveEmpresa) Then
+
+ dtvirtual = ObjInventario.DtResultados
+
+ If dtvirtual.Rows.Count > 0 Then
+ CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral)
+ 'FolioVirtualSalida = ObjInventario.Folio
+
+ For Each RowVirtual As DataRow In dtvirtual.Rows
+ Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
+ Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
+ Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
+ Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
+
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualSalida, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+ Return False
+ End If
+ Next
+ End If
+ Else
+ Return False
+ End If
+ End If
Else
Return False
End If
@@ -28910,11 +28956,11 @@ Partial Class Ventas
Alert("Se selecciono un contrato de obra, para continuar seleccione una estimación.", TipoMensaje.MsgAdvertencia)
End If
- ElseIf DdlTipoComprobante.SelectedValue = "Ant" Then
+ ElseIf DdlTipoComprobante.SelectedValue = "Ant" Or DdlTipoComprobante.SelectedValue = "Egs" Then
Respuesta = True
Else
Alert("Tipo de documento no valido para contratos de obra.", TipoMensaje.MsgAdvertencia)
- Respuesta = True
+ Respuesta = False
End If
Else
diff --git a/vwd.webinfo b/vwd.webinfo
index ce767c892..02418376d 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -140,6 +140,10 @@
+
+
+
+