diff --git a/Acumuladores/RepRecolecciones.aspx b/Acumuladores/RepRecolecciones.aspx
index cec6b1743..a61ec7b92 100644
--- a/Acumuladores/RepRecolecciones.aspx
+++ b/Acumuladores/RepRecolecciones.aspx
@@ -136,8 +136,7 @@
-
-
+
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 0eafa3c5b..d49198115 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -6676,6 +6676,28 @@ Public Class ClsContabilidad
Return Retorno
End Function
+
+ Public Function GetAjusteFluctuacion(Opcion As Integer, Fecha As Date, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Conta_Banc_FluctuacionesVerificaciones")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@Opcion", SqlDbType.Int).Value = Opcion
+ .Add("@Fecha", SqlDbType.Date).Value = Fecha
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ Me.OnError("Ocurrió un error al actualizar el tipo de cambio", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+
#End Region
Public Function GetPolizas(Ejercicio As Integer, Periodo As Integer, TipoPoliza As Integer, CveSubProyecto As Integer, FolioPoliza As Integer, CveEmpresa As Integer) As Boolean
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index eeaf57f4e..262aed25e 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -1766,7 +1766,7 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function GetRepPedidosSTF(CveSubProyecto As Integer, CveVendedor As Integer, CveEmpresa As Integer, Opcion As Integer, FechaInicio As Date, FechaFin As Date) As Boolean
+ Public Function GetRepPedidosSTF(CveSubProyecto As Integer, CveVendedor As Integer, CveEmpresa As Integer, Opcion As Integer, FechaInicio As Date, FechaFin As Date, CveCliente As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PedidosSTFRep")
@@ -1777,6 +1777,7 @@ Public Class ClsVentas
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
End With
Try
diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb
index a593378e5..c926a33b8 100644
--- a/App_Code/Timbrado.vb
+++ b/App_Code/Timbrado.vb
@@ -917,7 +917,14 @@ Public Class Timbrado
.NumParcialidad = VentaNumParcialidad,
.ObjetoImpuesto = ObjetoImpuesto} 'If(drr("MetodoPago").ToString = "PUE", 0, drr("NumParcialidad").ToString.ToEntero)}
- For Each drp As DataRow In dttpagosimpuestos.FiltraParametros(String.Format("FolioFiscal = '{0}'", VentaFolioFiscal.ToLower)).Rows
+
+ 'dtTempdttpagosimpuestos se esta usando para el caso de que el objeto de impuesto del ps de la venta sea 01 (la consulta por default genera 02)
+ Dim dtTempdttpagosimpuestos As DataTable = dttpagosimpuestos.FiltraParametros(String.Format("FolioFiscal = '{0}'", VentaFolioFiscal.ToLower))
+ If dtTempdttpagosimpuestos IsNot Nothing AndAlso doc.ObjetoImpuesto = "02" AndAlso dtTempdttpagosimpuestos.Rows.Count = 0 Then
+ doc.ObjetoImpuesto = "01"
+ End If
+
+ For Each drp As DataRow In dtTempdttpagosimpuestos.Rows
doc.Impuestos.Add(New CFDIConceptosImpuestos With {
.TrasladooRetencion = drp("Tipo").ToString,
.Base = drp("Base").ToString.ToDecimal.RoundSQL,
diff --git a/Bancos/ConciliacionesBancarias.aspx.vb b/Bancos/ConciliacionesBancarias.aspx.vb
index 8394d6218..d7655d6e1 100644
--- a/Bancos/ConciliacionesBancarias.aspx.vb
+++ b/Bancos/ConciliacionesBancarias.aspx.vb
@@ -279,8 +279,8 @@ Partial Class Bancos_ConciliacionesBancariasaspx
End If
End If
Next
- If SumaSIGAbono <> SumaExcelAbono Or SumaSIGCargo <> SumaExcelCargo Then
- Alert("La suma de los importes no cuadran", TipoMensaje.MsgAdvertencia)
+ If SumaSIGCargo <> SumaExcelCargo OrElse SumaSIGAbono <> SumaExcelAbono Then
+ Alert($"La suma de los importes no cuadran ({SumaSIGCargo}-{SumaExcelCargo}**{SumaSIGAbono}-{SumaExcelAbono})", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim ObjBancos As New ClsBancos
diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx
index 1c2baa635..8dc66da28 100644
--- a/Bancos/DepositosCaja.aspx
+++ b/Bancos/DepositosCaja.aspx
@@ -102,11 +102,11 @@
+
-
+
-
MSI3M
@@ -116,9 +116,7 @@
-
-
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index a8e75f504..dd10e1160 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -6372,7 +6372,7 @@ Partial Class Compras_Compras
If DifSubTotales > 0 Or (Not CveCompraRefacturacion > 0 OrElse (ChkRefacNC.Checked)) Then
'AF TipoAF 2 Es para las compras
DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) = 2 And ISNULL(AplicaCostoIndirecto,0) <> 1 ")
- If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
+ If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("DEV", "Ant") Then
For Each Row2 As DataRow In DT.Rows
importeMovimiento = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, Row2("ImporteSinImpuestos").ToString.ToDecimal, Row2("Total").ToString.ToDecimal)
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index 8a0b376d3..618b6ce5f 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -1513,7 +1513,7 @@ Partial Class Compras_Proveedores
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
- Alert("El Proveedor se guardó correctamente. " & " " & MsgCuentaContable, TipoMensaje.MsgInformacion, If(Request("CveFactura") Is Nothing, "document.location.href=""/Compras/CatProveedores.aspx""", "window.opener.location.href = window.opener.location.href; window.close();"))
+ Alert("El Proveedor se guardó correctamente. " & " " & MsgCuentaContable, TipoMensaje.MsgInformacion, If(Request("CveFactura") Is Nothing, "document.location.href=""/Compras/CatProveedores.aspx""", "if (window.opener && !window.opener.closed) { window.opener.location.href = window.opener.location.href; window.close(); }else{ alert('No se pudo recargar la pestaña origen, recargue manualmente si lo necesita.'); }"))
RecargaGlobalCuentasBancarias()
End If
End If
diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx
index fc05ef3e2..c95928cab 100644
--- a/Compras/eFacturas.aspx
+++ b/Compras/eFacturas.aspx
@@ -435,7 +435,7 @@
-
+
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb
index def2e8d5f..36010d5c9 100644
--- a/Inventarios/RecepcionAlmacen.aspx.vb
+++ b/Inventarios/RecepcionAlmacen.aspx.vb
@@ -3443,7 +3443,7 @@ Partial Class Inventarios_RecepcionAlmacen
Exit For
End If
Else
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalCostoDetalle, TotalCostoDetalle, CveConceptoContableCosto, SerieFolio, SerieFolio, CveCompra:=CveCompraSurtir, CveOC:=CveOCSurtir, CveSubProyecto:=CveSubProyecto, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalCostoDetalle, TotalCostoDetalle, CveConceptoContableCosto, SerieFolio, SerieFolio, CveCompra:=CveCompraSurtir, CveOC:=CveOCSurtir, CveSubProyecto:=CveSubProyecto, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimiento, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, Contabilizable:=EsContabilizable) Then
ErrorMovInv = True
Exit For
End If
diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb
index aff991241..432d0e1ea 100644
--- a/OC/OC.aspx.vb
+++ b/OC/OC.aspx.vb
@@ -9219,7 +9219,7 @@ Partial Class OC_OC
Select row.Field(Of Decimal)(ColumnaSaldo)).Sum()
If saldoTotal > 0 Then
- Dim TotalAcumuladoTabla As Decimal = (DtDetalle.SUM("Total", $" CveSubProyecto = {ValCveSubProyecto} AND CveClasificacion = {ValCveClasificacion} "))
+ Dim TotalAcumuladoTabla As Decimal = (DtDetalle.SUM("Total", $" CveOrdenCompraDetalle is null AND CveSubProyecto = {ValCveSubProyecto} AND CveClasificacion = {ValCveClasificacion} "))
Dim Diferencia As Decimal = saldoTotal - TotalAcumuladoTabla - ValImporte
If (Diferencia) < 0 Then
diff --git a/OI/Proyecto.aspx b/OI/Proyecto.aspx
index a0ce32782..59132a3d1 100644
--- a/OI/Proyecto.aspx
+++ b/OI/Proyecto.aspx
@@ -437,6 +437,7 @@
}
gantt.render();
}
+
var datosGant = [];
function loadGant() {
gantt.config.date_format = "%Y-%m-%d %H:%i";
diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb
index e9acb1d41..95c6f8f08 100644
--- a/OS/OrdenesServicios.aspx.vb
+++ b/OS/OrdenesServicios.aspx.vb
@@ -1220,7 +1220,7 @@ Partial Class OS_OrdenesServicios
Exit Sub
End If
- UpGuardar.Visible = False
+ BtnGuardar.Visible = False
End Sub
#End Region
@@ -3099,6 +3099,7 @@ Partial Class OS_OrdenesServicios
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL())
Dim GenerarRemisionMovimientos As Boolean = False
+ Dim AplicaDevolucion As Boolean = False
If DdlTipoVenta.SelectedValue = "5" Then 'Consignación - Uso Material
'genera una salida de almacen.
@@ -3188,7 +3189,6 @@ Partial Class OS_OrdenesServicios
'' otros opciones <> 5
If ProcesoOK Then
- Dim AplicaDevolucion As Boolean = False
Dim StrCveVentasDetalle As New StringBuilder
For Each GvRow As GridViewRow In GvMU.Rows
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero
@@ -3384,11 +3384,17 @@ Partial Class OS_OrdenesServicios
Alert("El material utilizado se guardó correctamente")
End If
End If
+ Dim Contenido As String = $" OS #{LblFolio.Text} Hospital: {If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedItem.Text, LblCliente.Text)} Folio {LblFolio.Text} "
+ 'genera notificación
+ If AplicaDevolucion Then 'notif a almacen
+ EnviaNotificacion("listado productos")
+ End If
+
RegistraScript("$('#DivModalMaterialUtilizado').modal('hide');")
- CargaEventoBitacora()
- Else
- ObjV.RollBack()
+ CargaEventoBitacora()
+ Else
+ ObjV.RollBack()
Alert("Se presento un error al guardar el material", TipoMensaje.MsgAdvertencia)
End If
@@ -3396,6 +3402,28 @@ Partial Class OS_OrdenesServicios
End If
End Sub
+ Private Sub EnviaNotificacion(Contenido As String)
+ Dim ObjMail As New ClsSisMail()
+ Dim Asunto As String = "Notificación de recolección de Producto"
+ Dim CorreoDestino As String = ""
+
+ If ObjMail.SendMail(UsuarioActual.Empresa, CorreoDestino, Asunto, Contenido) Then
+
+ End If
+
+ End Sub
+
+ Private Sub EnviaNotificacionSMS(Tipo As Integer, Folio As String, FechaCirugía As DateTime, Hospital As String, Medico As String, Procedimiento As String, Técnico As String, Vendedor As String, Remision As String, dtMaterial As DataTable)
+ Dim ObjMail As New ClsSisMail()
+ Dim Asunto As String = "Notificación de recolección de Producto"
+ Dim CorreoDestino As String = ""
+
+ If ObjMail.SendMail(UsuarioActual.Empresa, CorreoDestino, Asunto, Contenido) Then
+
+ End If
+
+ End Sub
+
Private Function GuardarArchivoConfirmacion(ByRef transaccion As SqlTransaction, CveOSActual As Integer, CveVentaRemisionGenerada As Integer) As Boolean
Dim respuesta As Boolean = False
diff --git a/Transportes/RepContratosCalendario.aspx b/Transportes/RepContratosCalendario.aspx
index c9591f344..0c09024d6 100644
--- a/Transportes/RepContratosCalendario.aspx
+++ b/Transportes/RepContratosCalendario.aspx
@@ -23,7 +23,75 @@
width: 100%;
height: 600px;
}
+
+
+ .fc-month-view .fc-day {
+ border-left: 4px solid #464646;
+ border-right: 4px solid #464646
+ }
+ .fc-month-view .fc-week {
+ border-left: 4px solid #464646;
+ border-right: 4px solid #464646;
+ border-top: 4px solid #464646;
+ }
+ .fc-month-view .fc-row.fc-week.fc-widget-content:last-of-type {
+ border-bottom: 4px solid #464646!important;
+ }
+
+
+
+
+
+
+
+
+
+
+
@@ -287,6 +355,61 @@
<%--Calendario Tab--%>
+
+
+
+
+
+
+
+ Formato:
+
+
+
+
+
+
+
+ |
+ Mostrar:
+
+
+
+
+
+ |
+ Mostrar:
+
+
+
+
+
+
+
+
+
+
+
@@ -560,6 +683,7 @@
+
diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb
index fb8d508e1..6832a1032 100644
--- a/Transportes/RepContratosCalendario.aspx.vb
+++ b/Transportes/RepContratosCalendario.aspx.vb
@@ -39,9 +39,17 @@ Partial Class RepContratosCalendario
End Property
#End Region
-
+ Public Property RCveEvento As Integer
+ Get
+ Return If(ViewState("RCveEvento") IsNot Nothing, ViewState("RCveEvento").ToString().ToEntero(), 0)
+ End Get
+ Set(value As Integer)
+ ViewState("RCveEvento") = value
+ End Set
+ End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
+ RCveEvento = 0
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString()
txtFechaF.Text = GetLastDayOfMonth(NowADS()).ToShortDateString()
InicializaCombos()
@@ -83,16 +91,16 @@ Partial Class RepContratosCalendario
Private Sub CargaCronograma(Optional TipoVista As Integer = -1)
If DtAvance IsNot Nothing Then
+ Dim separator As String = ""
+ Dim str As New StringBuilder()
+ str.AppendLine("datosGant=[")
+
+
Dim StrFiltro As String = ""
If DdlTipoUnidad.SelectedValue.ToEntero > 0 Then StrFiltro = " AND CveTipoActivoFijo = " & DdlTipoUnidad.SelectedValue
Dim DtUnidades As DataTable = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros("Codigo <> '' AND MedidaVehicular IN (2,3) " & StrFiltro, Orderby:=" TipoActivoFijo ASC, CodigoNumeroOrden ASC", DistinctColumns:={"Codigo", "CveActivoFijo"})
- 'For Each Row As DataRow In DtAvance.Rows
- ' If String.IsNullOrEmpty(Row("CodigoAF").ToString()) Then
- ' Row("CodigoAF") = "Unidad no asignada"
- ' End If
- 'Next
Dim jsonData As New JArray()
Dim jsonCategorias As New JArray()
@@ -117,6 +125,16 @@ Partial Class RepContratosCalendario
)
jsonData.Add(obj)
strAF.AppendFormat("{0},", Row("CveAF"))
+
+ 'uniad contrato y duracion
+
+ Dim unidad As String = $"{Row("CodigoAF")}-{Row("NombreAF")}"
+ Dim duracion As String = $"{Row("FechaInicial").ToString.ToDate.ToString("dd/MM/yyyy HH:mm")} - {Row("FechaFinal").ToString.ToDate.ToString("dd/MM/yyyy HH:mm")}"
+
+ str.AppendLine(String.Format("{0}{{id: {1}, text: ""{2}"", start_date: ""{3:yyyy/MM/dd HH:mm}"", end_date: ""{4:yyyy/MM/dd HH:mm}"", parent: {5}, progress:{6}, open: true, unidad: ""{7}"",duracion: ""{8}""}}",
+ separator, Row("CveContrato"), Row("NumeroContrato").ToString().Replace("\\", "\\\\").Replace("""", "\"""), Row("FechaInicial"), Row("FechaFinal"), 0, 100, unidad, duracion))
+ separator = ","
+
Next
If TipoVista = 1 Then 'solo con viajes
@@ -134,11 +152,45 @@ Partial Class RepContratosCalendario
Dim FechaF = txtFechaF.Text.ToDateTime()
Dim ScriptZoom = $"zoomAxis({FechaI.Year},{FechaI.Month - 1},{FechaI.Day},{FechaF.Year},{FechaF.Month - 1},{FechaF.Day});"
-
RegistraScript($"cargaDiagramaGrant({jsonData.ToString()},{jsonCategorias.ToString()},{TipoVista});{ScriptZoom}", "A1")
+
+
+ str.AppendLine("];loadGant();")
+ RegistraScript(str.ToString())
+
UPPGantt.Update()
+ UPGat.Update()
End If
End Sub
+
+ 'Public Sub loadEvento()
+ ' Dim separator As String = ""
+ ' Dim str As New StringBuilder()
+ ' str.AppendLine("datosGant=[")
+
+ ' Using oieve As New ClsOIEventos()
+ ' If oieve.GetEventos2(RCveEvento, UsuarioActual.CveEmpresa) AndAlso oieve.DtResultados.Rows.Count > 0 Then
+ ' Dim drow As System.Data.DataRow = oieve.DtResultados.Rows(0)
+ ' LblAsunto.Text = drow("Asunto").ToString()
+ ' End If
+
+ ' If oieve.GetTareaConHijos(RCveEvento, UsuarioActual.CveEmpresa) Then
+ ' For Each dr As System.Data.DataRow In oieve.DtResultados.Select("Nivel > 0")
+ ' str.AppendLine(String.Format("{0}{{id: {1}, text: ""{2}"", start_date: ""{3:yyyy/MM/dd}"", end_date: ""{4:yyyy/MM/dd}"", parent: {5}, progress:{6}, open: true }}",
+ ' separator, dr("CveEvento"), dr("Asunto").ToString().Replace("\\", "\\\\").Replace("""", "\"""), dr("FechaInicio"), dr("FechaFin"), If(dr("Nivel").ToString().ToEntero() <= 1, 0, dr("CveEventoPadre").ToString().ToEntero()), dr("Avance").ToString().ToDecimal() / 100))
+ ' separator = ","
+ ' Next
+ ' End If
+ ' End Using
+
+ ' str.AppendLine("];loadGant();")
+ ' RegistraScript(str.ToString())
+ ' UpContenido.Update()
+ ' ' { id: 2, text: "Direccion: evaluación de mercado", start_date: "2020/04/29 00:00", end_date: "2020/05/02 00:00",/*duration: 3,*/ parent: 1, progress: 0.25 }
+ 'End Sub
+
+
+
Private Sub InicializaCalendar()
RegistraScript("InitCalendar();")
diff --git a/Ventas/CatMotivosCancelacion.aspx.vb b/Ventas/CatMotivosCancelacion.aspx.vb
index bf91326fe..80ce4ab88 100644
--- a/Ventas/CatMotivosCancelacion.aspx.vb
+++ b/Ventas/CatMotivosCancelacion.aspx.vb
@@ -89,6 +89,7 @@ Partial Class Ventas_CatMotivosCancelacion
End If
End If
ObjVentas.Dispose()
+ GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa) = Nothing
RegistraScript("$('#DivMotivo').modal('hide');")
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb
index 9ecaeb674..a28a9f9f2 100644
--- a/Ventas/ClientesAbonar.aspx.vb
+++ b/Ventas/ClientesAbonar.aspx.vb
@@ -1345,7 +1345,7 @@ Partial Class Ventas_ClientesAbonar
MsgError = "No se pudo insertar la póliza"
End If
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, Importe / TxtTC.Text.ToDecimal, Importe), If(CveMoneda = 2, (Importe * tipoCambioPago) - Importe, Importe), 227, ReferenciaVenta, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioPago}", "")), CveIE:=CveIE, CveCliente:=ViewState("CveCliente").ToString.ToEntero, ImporteME:=If(CveMoneda = 2, Importe, 0), CveVenta:=CveVenta, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, Importe / TxtTC.Text.ToDecimal, Importe), If(CveMoneda = 2, (Importe * tipoCambioPago) - Importe, Importe), 332, ReferenciaVenta, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioPago}", "")), CveIE:=CveIE, CveCliente:=ViewState("CveCliente").ToString.ToEntero, ImporteME:=If(CveMoneda = 2, Importe, 0), CveVenta:=CveVenta, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
Else
diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx
index dda8acbec..fe804f650 100644
--- a/Ventas/ProductosServicios.aspx
+++ b/Ventas/ProductosServicios.aspx
@@ -2017,7 +2017,7 @@
-
+
<%----%>
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb
index 034d1b9b0..f6173c45f 100644
--- a/Ventas/ProductosServicios.aspx.vb
+++ b/Ventas/ProductosServicios.aspx.vb
@@ -282,9 +282,7 @@ Partial Class ProductosyServicios
'CargaFamilia(ViewState("CveSubFamilia").ToString.ToEntero)
CargaSucursaless()
CargaImpuestosLocales()
- If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
- CargaListaPrecios()
- End If
+ CargaListaPrecios()
If UsuarioActual.TienePermisoProceso(122) Then
BtnEliminar.Visible = False
@@ -2986,16 +2984,18 @@ Partial Class ProductosyServicios
#Region "LISTA PRECIOS"
Private Sub CargaListaPrecios()
-
- Dim objPS As New ClsProductosServicios
- If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CveClasificacion:=-1, CvePS:=CvePS,
- CveProveedor:=-1, Estado:=-1, Marcas:="-1", CveModelo:=-1) Then
- DtPreciosMultiple = objPS.DtResultados.Copy()
- GvMultiple.DataSource = DtPreciosMultiple
+ If UsuarioActual.TienePermisoProceso(389) Then 'si puede actualizar precios se muestra
+ Dim objPS As New ClsProductosServicios
+ If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CveClasificacion:=-1, CvePS:=CvePS,
+ CveProveedor:=-1, Estado:=-1, Marcas:="-1", CveModelo:=-1) Then
+ DtPreciosMultiple = objPS.DtResultados.Copy()
+ GvMultiple.DataSource = DtPreciosMultiple
+ End If
+ objPS.Dispose()
+ DivListaPrecios.Visible = True
+ GvMultiple.DataBind()
End If
- objPS.Dispose()
- DivListaPrecios.Visible = True
- GvMultiple.DataBind()
+
End Sub
Protected Sub GvMultiple_RowDataBound(sender As Object, e As GridViewRowEventArgs)
diff --git a/Ventas/Promociones.aspx b/Ventas/Promociones.aspx
index b3f400918..5b8f32de4 100644
--- a/Ventas/Promociones.aspx
+++ b/Ventas/Promociones.aspx
@@ -292,7 +292,7 @@
-
+ Imprimir Pedidos
+
+ Excel Pedidos
+
+
@@ -114,6 +118,11 @@
+
+
+
+
+
diff --git a/Ventas/RepPedidosSTF.aspx.vb b/Ventas/RepPedidosSTF.aspx.vb
index 66871f51e..f687e60a2 100644
--- a/Ventas/RepPedidosSTF.aspx.vb
+++ b/Ventas/RepPedidosSTF.aspx.vb
@@ -33,9 +33,6 @@ Partial Class Ventas_RepPedidosSTF
End Set
End Property
-
-
-
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -64,10 +61,13 @@ Partial Class Ventas_RepPedidosSTF
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
DdlVendedor.Enabled = False
End If
+ DdlClientes.setEsWebService(True)
End Sub
Protected Sub CargaDatos()
LnkImprimirPedidos.Visible = False
+ LnkImprimirPedidosExcel.Visible = False
+
DatosGV = New DataTable
@@ -75,6 +75,9 @@ Partial Class Ventas_RepPedidosSTF
Dim Opcion As Integer = 1
Dim FechaInicio As Date = MinFecha
Dim FechaFin As Date = MaxFecha
+ Dim tCveCliente As Integer = DdlClientes.SelectedValue.ToEntero
+ LnkImprimirPedidos.Visible = False
+ DatosGV = New DataTable
If TabG.ActiveTabIndex = 1 Then ' entregados
Opcion = 2
@@ -82,7 +85,7 @@ Partial Class Ventas_RepPedidosSTF
FechaFin = txtFechaF.Text.ToDate
Dim ObjVentas As New ClsVentas
- If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion, FechaInicio, FechaFin) Then
+ If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion, FechaInicio, FechaFin, tCveCliente) Then
GvE.DataSource = ObjVentas.DtResultados
End If
@@ -92,7 +95,7 @@ Partial Class Ventas_RepPedidosSTF
FechaInicio = txtFechaI.Text.ToDate
FechaFin = txtFechaF.Text.ToDate
Dim ObjVentas As New ClsVentas
- If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion, FechaInicio, FechaFin) Then
+ If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion, FechaInicio, FechaFin, tCveCliente) Then
DatosGV = ObjVentas.DtResultados
DatosGV.Columns.Add("CantidadOrg", GetType(Decimal))
@@ -102,6 +105,7 @@ Partial Class Ventas_RepPedidosSTF
GvDatos.DataSource = DatosGV
If DatosGV IsNot Nothing AndAlso DatosGV.Rows.Count > 0 Then
LnkImprimirPedidos.Visible = True
+ LnkImprimirPedidosExcel.Visible = True
End If
End If
ObjVentas.Dispose()
@@ -375,7 +379,15 @@ Partial Class Ventas_RepPedidosSTF
End Sub
Protected Sub LnkImprimirPedidos_Click(sender As Object, e As EventArgs)
+ ImprimirReporte("PDF")
+ End Sub
+ Protected Sub LnkImprimirPedidosExcel_Click(sender As Object, e As EventArgs)
+ ImprimirReporte("Excel")
+ End Sub
+
+
+ Private Sub ImprimirReporte(Formato As String)
Dim FechaI As String = txtFechaI.Text
Dim FechaF As String = txtFechaF.Text
If txtFechaI.Text = "" Then FechaI = "-1"
@@ -411,13 +423,13 @@ Partial Class Ventas_RepPedidosSTF
- ImprimirPDF("Empresas/Grales/Formatos/RepPedidos.rdlc", DatosGV, params, "ReportePedidos")
+ ImprimirPDF("Empresas/Grales/Formatos/RepPedidos.rdlc", DatosGV, params, "ReportePedidos", Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
-
End Sub
+
Protected Sub BtnEditarHorariosPedidos_Click(sender As Object, e As EventArgs)
Dim objSisEmpresas As New ClsSisEmpresas
If objSisEmpresas.UpdateEmpresaFuncionalidad(546, $"{TxtHorarioDe.Text}|{TxtHorarioA.Text}", UsuarioActual.CveEmpresa) Then
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index f7ca5c1bf..26a8e02ba 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -15240,14 +15240,15 @@ Partial Class Ventas
If ObjFactura.CveMoneda = 2 AndAlso CveMonedaAnticipo = 1 Then
Importe11MX = Importe11MX * tipoCambio
End If
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, Importe11MX, Importe11MX, 11, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambioAnticipo = 1, 0, importeMovimiento), CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioAnticipo) Then
+ Dim ConPrePAnt As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(12, VentaActual.CveMoneda, True, 1)
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, Importe11MX, Importe11MX, ConPrePAnt.CveConcepto, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambioAnticipo = 1, 0, importeMovimiento), CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioAnticipo) Then
ErrorPrepoliza = True
Exit For
End If
If row2.DataKey("CveMoneda").ToString.ToEntero = 2 Then
- If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteAnticipo * tipoCambioAnticipo - ImporteAnticipo, ImporteAnticipo * tipoCambioAnticipo - ImporteAnticipo, 227, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteME:=If(tipoCambioAnticipo = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioAnticipo) Then
+ If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteAnticipo * tipoCambioAnticipo - ImporteAnticipo, ImporteAnticipo * tipoCambioAnticipo - ImporteAnticipo, ConPrePAnt.CveConceptoComplementario, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteME:=If(tipoCambioAnticipo = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioAnticipo) Then
ErrorPrepoliza = True
Exit For
End If