This commit is contained in:
2024-05-24 19:35:47 -07:00
17 changed files with 549 additions and 561 deletions

View File

@@ -88,7 +88,7 @@
<div class="row">
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
<asp:ListBox ID="DdlSubProyectos" CssClass="select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100%" data-text="Todos" SelectionMode="Multiple"></asp:ListBox>
</div>
<div class="col-md-1 truncate">
Fecha Inicio:

View File

@@ -54,7 +54,7 @@ Partial Class Ventas_RepPS
End Sub
Private Sub CargaCombos()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind()
@@ -75,14 +75,15 @@ Partial Class Ventas_RepPS
DivMarca.Visible = True
LblMarca.Visible = True
LblLinea.Visible = True
DivLinea.Visible = True
Using ObjMarcas As New ClsProductosServicios
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
DdlMarcaPSDes.DataBind()
End If
End Using
DivLinea.Visible = True
DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
'Using ObjMarcas As New ClsProductosServicios
' If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
' DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
' DdlMarcaPSDes.DataBind()
' End If
'End Using
End If
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
@@ -95,7 +96,8 @@ Partial Class Ventas_RepPS
Dim Clasificacion As String = If(DdlClasificacion.GetSelectedValuesM = "", "-1", DdlClasificacion.GetSelectedValuesM)
Dim Linea As String = If(DdlLinea.GetSelectedValuesM = "", "-1", DdlLinea.GetSelectedValuesM)
Dim Marca As String = If(DdlMarcaPSDes.GetSelectedValuesM = "", "-1", DdlMarcaPSDes.GetSelectedValuesM)
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
'Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
Dim CveSubProyectos As String = If(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM)
Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero()
Dim CveMoneda As Integer = -1
@@ -106,7 +108,7 @@ Partial Class Ventas_RepPS
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then
If ObjVentas.GetRepPSEcono(CveSubProyectos, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then
DtReporte = ObjVentas.DtResultados.Copy()
GvDatos.DataSource = DtReporte
Else
@@ -167,7 +169,7 @@ Partial Class Ventas_RepPS
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
If DtReporte IsNot Nothing AndAlso DtReporte.Rows.Count > 0 Then
Dim SbParametros As New StringBuilder
SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyecto.SelectedItem.Text)
SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyectos.GetSelectedText)
SbParametros.AppendFormat(", Orden:{0}", DdlGrupo.SelectedItem.Text)
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")

View File

@@ -5576,7 +5576,6 @@ Partial Class Ventas
HdnFolioFiscalNC.Value = DbRowVenta("FolioFiscalPadre").ToString()
End If
TxtOrdenCompra.Text = DbRowVenta("OrdenCompra").ToString()
TxtOrdenCompra.Enabled = False
@@ -12179,6 +12178,11 @@ Partial Class Ventas
ObjFactura.Alfa1 = TxtAlfa1.Text.Trim
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
ObjFactura.Medico = DdlMedico.SelectedItem.Text
ObjFactura.Procedimiento = DdlProcedimiento.SelectedItem.Text
End If
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
If (ObjFactura.CveMoneda = 2 AndAlso ObjFactura.ConvertirPesos = True AndAlso ObjFactura.TipodeComprobante = "Ingresos" AndAlso RemisionesLista.Count > 0) Then
Dim TotalCalculableImpuestos, TotalCalculableImpuestosIVA As Decimal
@@ -25673,7 +25677,7 @@ Partial Class Ventas
Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000
SegundosRespuesta = SegundosRespuesta.ToEntero
If SegundosRespuesta >= 5 Then
If SegundosRespuesta >= 5 AndAlso ObjFacturaCancelacion.TipoDocto.Contiene("Ing", "Ant", "Dev", "Egs") Then
Alert($"Los servicios de cancelación del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastAdventencia, "")
End If
@@ -32535,11 +32539,11 @@ Partial Class Ventas
For Each Dr As DataRow In dtSeleccionadas.Rows
If Dr("Medico").ToString().Trim().Length > 0 Then
If Dr("Medico").ToString.Trim.Length > 0 Then
MensajeRemisionesMedicas.Append($"Dr. {Dr("Medico").ToString}{vbCrLf}")
EsRemisionMedica = True
End If
If Dr("Medico").ToString().Trim().Length > 0 Then
If Dr("Procedimiento").ToString.Trim.Length > 0 Then
MensajeRemisionesMedicas.Append($"Procedimiento {Dr("Procedimiento")}{vbCrLf}")
EsRemisionMedica = True
End If
@@ -32562,7 +32566,6 @@ Partial Class Ventas
TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "")
End If
TxtOrdenCompra.Text = If(ObsOC.ToString().Length > 0, ObsOC.ToString().Substring(0, ObsOC.ToString().Length - 2), "")
TxtPedidoContrato.Text = If(ObsPedido.ToString().Length > 0, ObsPedido.ToString().Substring(0, ObsPedido.ToString().Length - 2), "")
TxtObsAlmacen.Text = If(ObsInv.ToString().Length > 0, ObsInv.ToString().Substring(0, ObsInv.ToString().Length - 2), "")