diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 5d28a3a5a..5e08bcb3a 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -1344,7 +1344,7 @@ Namespace Modelos
Public Sub GuardarVenta(ByRef factura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNotaCredito As Boolean = False, Optional ObjAcum As ClsAcumuladores = Nothing)
Dim Msgok As New StringBuilder
- factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVentaM", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa)
+ factura.CvePrePoliza = ObjConta.AddPrePolizas("Modelos/GuardarVentaM", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa)
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx
index c1e46ead0..06a0be6c8 100644
--- a/Ashx/SIGFacturacion.ashx
+++ b/Ashx/SIGFacturacion.ashx
@@ -2275,24 +2275,44 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
HttpContext.Current.Application("GlobalDTAlmacen") = value
End Set
End Property
- Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
- Get
- If CveEmpresa <> -1 Then
- Dim Str As New StringBuilder
- Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
- If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
-
- Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
- GlobalDTAlmacenUsuarios = Dv.ToTable
- Dv.Dispose()
- Else
- GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable)
- End If
-
- End Get
- Set(value As DataTable)
- HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value
- End Set
+ Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1) As DataTable
+ Get
+ Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
+ 'sino existe, recarga los datos
+ If HttpContext.Current.Application(AppNombre) Is Nothing Then
+ Dim ObjUsr As New ClsSisUsuarios
+ If ObjUsr.GetAlmacen(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados
+ ObjUsr.Dispose()
+ End If
+ Dim Str As New StringBuilder
+ Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
+ If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
+
+ Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ GlobalDTAlmacenUsuarios = Dv.ToTable
+ Dv.Dispose()
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTAlmacenUsuarios-{0}", CveEmpresa)
+ HttpContext.Current.Application(AppNombre) = value
+ End Set
+ 'Get
+ ' If CveEmpresa <> -1 Then
+ ' Dim Str As New StringBuilder
+ ' Str.AppendFormat("CveUsuario = {0} AND CveEmpresa = {1} ", CveUsuario, CveEmpresa)
+ ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
+
+ ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
+ ' GlobalDTAlmacenUsuarios = Dv.ToTable
+ ' Dv.Dispose()
+ ' Else
+ ' GlobalDTAlmacenUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTAlmacenUsuarios"), DataTable)
+ ' End If
+
+ 'End Get
+ 'Set(value As DataTable)
+ ' HttpContext.Current.Application("GlobalDTAlmacenUsuarios") = value
+ 'End Set
End Property
Property GlobalDTNom_Periodos() As DataTable
Get
diff --git a/Bancos/RegistroPagoIntermediario.aspx.vb b/Bancos/RegistroPagoIntermediario.aspx.vb
index cd7f32ce5..17e4bc86e 100644
--- a/Bancos/RegistroPagoIntermediario.aspx.vb
+++ b/Bancos/RegistroPagoIntermediario.aspx.vb
@@ -246,7 +246,7 @@ Partial Class Bancos_PagosIntermediarios
Else
ObjIE.RollBack()
Alert(String.Format("Ocurrió un error al registrar el movimiento."), TipoMensaje.MsgError)
- GuardaLog(MsgError)
+ GuardaLog($"RegistroPagoIntermediario --> {MsgError}")
End If
ObjIE.Dispose()
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 03865ea0d..ffdea1526 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -7712,7 +7712,7 @@ Partial Class Compras_Compras
' ImporteAnticipo += Ant.Importe ' RESTO DEL IMPORTE POR SI QUEDA DIFERENCIA DE LA SUMA DE LOS ANTICIPOS Y EL PROVEEDOR TIENE QUE PAGAR
'movimiento de pago proveedor, --no se regisra porque no se registra el total de la compra como deuda del proveedor, solo lo que queda a deber
'si es l moviemiento es de amortizacion con descuento, no registra el pago, ya esta descontado
- If TieneAnticiposXML = False AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe) Then
+ If TieneAnticiposXML = False AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, Ant.Importe, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=Ant.Importe, CveCompraAmortizacion:=CveCompraNC) Then
ErrorMovtosCxP = True
End If
PorcentajePago = (Ant.Importe) / TxtTotal.Text.ToDecimal
@@ -10630,7 +10630,7 @@ Partial Class Compras_Compras
e.Row.Cells(0).ToolTip = "Producto/Servicio NO Registrado"
e.Row.Cells(0).ID = String.Format("tr{0}", e.Row.RowIndex)
e.Row.Cells(0).ClientIDMode = ClientIDMode.Static
- e.Row.Cells(0).Attributes.Add("onclick", String.Format("fnAltaPS('{0}','{1}',{2})", String.Format("tr{0}", e.Row.RowIndex), e.Row.DBCampo("PS").Replace("'", "").Replace(Chr(13), "").Replace(Chr(10), ""), e.Row.RowIndex))
+ e.Row.Cells(0).Attributes.Add("onclick", String.Format("fnAltaPS('{0}','{1}',{2})", String.Format("tr{0}", e.Row.RowIndex), e.Row.DBCampo("PS").Replace("'", "'").Replace(Chr(13), "").Replace(Chr(10), ""), e.Row.RowIndex))
If e.Row.FCTextBox("TxtPrecioEdit") IsNot Nothing Then e.Row.FCTextBox("TxtPrecioEdit").Enabled = False
If e.Row.FCTextBox("TxtCantidadEdit") IsNot Nothing Then e.Row.FCTextBox("TxtCantidadEdit").Enabled = False
End If
@@ -17979,7 +17979,7 @@ Partial Class Compras_Compras
CvePS = DdlPSAlias2.SelectedValue.ToEntero
tPS = DdlPSAlias2.SelectedText
- If PS.AddPSAlias(TxtPSAlias.Text.Trim, CvePS) Then
+ If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS) Then
GlobalDTProductosServiciosAlias(-1) = PS.DtResultados
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 3b343b278..b55948612 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -2335,16 +2335,16 @@ Partial Class PopUpVerFactura
Dim ObjCompra As New ClsCompras()
If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
- Dim FechaCompra As Date = dr("Fecha").ToString.ToDate
+ Dim FechaCompra As Date = dr("FechaMovto").ToString.ToDate
Dim FechaVencimiento As Date = dr("FechaVencimiento").ToString.ToDate
params.Add(New ReportParameter("Fecha", FechaCompra.ToShortDateString))
params.Add(New ReportParameter("FechaVencimiento", FechaVencimiento.ToShortDateString))
params.Add(New ReportParameter("Plazo", DateDiff(DateInterval.Day, FechaCompra, FechaVencimiento).ToString))
- params.Add(New ReportParameter("Folio", Folio.ToString))
+ 'params.Add(New ReportParameter("Folio", Folio.ToString))
params.Add(New ReportParameter("Serie", dr("Serie").ToString))
'params.Add(New ReportParameter("NumeroOrden", dr("OCVinculada").ToString))
- 'params.Add(New ReportParameter("FacturaProveedor", dr("SerieFolio").ToString))
+ params.Add(New ReportParameter("FacturaProveedor", dr("SerieFolio").ToString))
params.Add(New ReportParameter("NombreProveedor", dr("RazonSocial").ToString))
params.Add(New ReportParameter("DireccionProveedor", dr("Direccion").ToString))
params.Add(New ReportParameter("CiudadProveedor", " "))
diff --git a/Contratos/RepPedidosDevolucionesXContrato.aspx b/Contratos/RepPedidosDevolucionesXContrato.aspx
index 39f3f78d6..834e5f7d5 100644
--- a/Contratos/RepPedidosDevolucionesXContrato.aspx
+++ b/Contratos/RepPedidosDevolucionesXContrato.aspx
@@ -140,7 +140,7 @@