--puntos varios

This commit is contained in:
2024-07-24 17:37:16 -07:00
parent ec4e5c4072
commit d4140fad0b
9 changed files with 85 additions and 32 deletions

View File

@@ -7615,7 +7615,7 @@ Public Class ClsPaginas
End If
Dim urlHost As String = "hhttp://sig.adssistemas.mx:7998/"
If EsProduccion Then
urlHost = "http://sig.adssistemas.mx:6599/"
urlHost = "http://192.200.113.178:6599/"
End If
'SITIO DE PRUEBA EN IIS
Dim Url As Uri = New Uri(String.Format("{0}{1}", urlHost, Opcion))

View File

@@ -2159,13 +2159,14 @@ Public Class ClsVentas
#Region "V E N T A S - P R E C I O L I S T A S"
Public Function GetPreciosListaSPPermitidos(CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Public Function GetPreciosListaSPPermitidos(CveSubProyecto As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PrecioListaSPPermitdosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With

View File

@@ -6125,7 +6125,10 @@
// totalPoints += ToDouble($(this).val());
let txtvalue = ToDouble($(this).val());
//let asdasdasd = $(this).data('tcanticipo');
let TCAnticipo = ToDouble($(this).data('tcanticipo'));
let TCAnticipo = 1;
if ($(this).data('tcanticipo')) {
TCAnticipo = ToDouble($(this).data('tcanticipo'));
}
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
txtvalue = ToDouble(txtvalue / TCAnticipo);
@@ -6146,7 +6149,10 @@
$('input[name*=TxtComision]').each(function () {
//totalPoints += ToDouble($(this).val());
let txtvalue = ToDouble($(this).val());
let TCAnticipo = ToDouble($(this).data('tcanticipo'));
let TCAnticipo = 1;
if ($(this).data('tcanticipo')) {
TCAnticipo = ToDouble($(this).data('tcanticipo'));
}
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
txtvalue = ToDouble(txtvalue / TCAnticipo);
} else if (CveMonedaAnticipo == 2 && CveMonedaOriginal == 1) {

View File

@@ -9919,6 +9919,7 @@ Partial Class Compras_Compras
e.Row.FCTextBox("TxtAnticipo").Attributes.Add("data-tcanticipo", tTCFecha.ToString)
e.Row.FCTextBox("TxtComision").Attributes.Add("data-tcanticipo", tTCFecha.ToString)
Dim TCAnt As Decimal = If(DdlMoneda.SelectedValue = "1", 1, If(CveCompra > 0, LblTC.Text.Replace("TC:", "").ToDecimal, TxtTC.Text.ToDecimal))
@@ -13309,7 +13310,7 @@ Partial Class Compras_Compras
DDLDevolucion.Items.Clear()
Dim dtt As DataTable = objcompras.DtResultados
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then 'solo los últimos 3 meses
dtt = dtt.FiltraParametros($"Fecha >= #{NowADS.AddMonths(-6).ToString("yyyy/MM/dd")}#")
dtt = dtt.FiltraParametros($"Fecha >= #{NowADS.AddMonths(-12).ToString("yyyy/MM/dd")}#")
End If
DDLDevolucion.DataSource = dtt
DDLDevolucion.Items.Insert(0, New ListItem("Seleccione", "-1"))

View File

@@ -1557,6 +1557,16 @@ Partial Class PopUpVerFactura
Dim ConsultaPorSucursal As Boolean = UsuarioActual.Empresa.Funcionalidad(382) = "1"
If ConsultaPorSucursal Then
'SI NO TIENE ESTOS VALORES, SARCALOS DEL CORTE
If CveCorte > 0 AndAlso (FechaConsulta = ModExtensiones.MaxFecha OrElse CveSubProyecto <= 0) Then
Using ObjVta As New ClsPuntoVenta
If ObjVta.GetVta_Cortes("-1", "-1", -1, CveCorte, UsuarioActual.CveEmpresa, -1) AndAlso ObjVta.DtResultados.Rows.Count > 0 Then
FechaConsulta = ObjVta.DtResultados.FiltroPrimeroValor("FechaInicial").ToString().ToDate().Date
CveSubProyecto = ObjVta.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero()
End If
End Using
End If
CveCorte = -1
End If
@@ -1638,7 +1648,10 @@ Partial Class PopUpVerFactura
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then
If DtReporteCorte IsNot Nothing Then
Dim DtTT = GenerateTransposedTable(DtReporteCorte)
Dim dtDatos = DtReporteCorte.Clone()
dtDatos.ImportRow(DtReporteCorte.Rows(0))
Dim DtTT = GenerateTransposedTable(dtDatos)
Dim DtDatosVentas As New DataTable()
DtDatosVentas.Columns.Add(New DataColumn("Orden", GetType(Integer)))
DtDatosVentas.Columns.Add(New DataColumn("Columna", GetType(String)))

View File

@@ -1007,9 +1007,9 @@
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script src="/Scripts/PrintJS/print.min.js"></script>
<script type="text/javascript">
function impresionDirecta(urlPDF) {
printJS({ printable: urlPDF, type: 'pdf', showModal: true });
}
//function impresionDirecta(urlPDF) {
// printJS({ printable: urlPDF, type: 'pdf', showModal: true });
//}
function impresionBase64(pdfBase64) {
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });

View File

@@ -629,9 +629,12 @@ Partial Class Ventas_PVCobranza
PorcentajeIVA:=Dr("PorcentajeIVA").ToString().ToDecimal())
Next
ObjFactura.GenerarSalidaAlmacen = True
ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Copy()
ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero()
If UsuarioActual.Empresa.Funcionalidad(567) = "1" Then
ObjFactura.GenerarSalidaAlmacen = True
ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Copy()
ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero()
End If
ObjFactura.CalculaTotales()
ObjFactura.PreparaTimbre()

View File

@@ -1203,7 +1203,7 @@
</ContentTemplate>
</asp:UpdatePanel>
</th>
<th style="width: 120px;">
<th style="width: 130px;">
<div class="row" id="DivPrecioLista" runat="server" visible="false">
<div class="col-md-12">
<asp:DropDownList ID="DdlPrecioLista" runat="server" Width="100%" CssClass="select2me" DataValueField="CvePrecioLista" DataTextField="PrecioLista" OnSelectedIndexChanged="DdlPrecioLista_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
@@ -1300,7 +1300,7 @@
<asp:Literal ID="LtlUnidadMedida" runat="server" Text='<%# Eval("UM") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="DdlUnidadMedida" CssClass="form-control input-sm select2me " runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Style="width: 100%; max-width: 150px;"></asp:DropDownList>
<asp:DropDownList ID="DdlUnidadMedida" CssClass="form-control input-sm select2me " runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Style="width: 100%; max-width: 140px;"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVUnidadMedida" runat="server" ControlToValidate="DdlUnidadMedida" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEUnidadMedida" runat="server" HighlightCssClass="vco" TargetControlID="RFVUnidadMedida" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVUM2" runat="server" Type="Integer" MinimumValue="0" MaximumValue="999999999" ErrorMessage="El campo <b>''Unidad de Medida''</b> es necesario, por favor ingréselo." ControlToValidate="DdlUnidadMedida" Display="None" ValidationGroup="GprGV"></asp:RangeValidator>
@@ -9030,9 +9030,9 @@
<script src="/Scripts/PrintJS/print.min.js"></script>
<script type="text/javascript">
function impresionDirecta(urlPDF) {
printJS({printable:urlPDF, type:'pdf', showModal:true});
}
//function impresionDirecta(urlPDF) {
// printJS({printable:urlPDF, type:'pdf', showModal:true});
//}
function impresionBase64(pdfBase64) {
printJS({printable:pdfBase64, type:'pdf', showModal:true, base64: true});

View File

@@ -3732,18 +3732,31 @@ Partial Class Ventas
UpPS.Update()
End Sub
Private Sub CargaListasPreciosSubProyectos()
'If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
' DivPrecioLista.Visible = True
' Using ObjVta As New ClsVentas
' If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
' Dim Dt = ObjVta.DtResultados.Copy()
' DdlPrecioLista.DataSource = Dt
' DdlPrecioLista.SelectedValue = Dt.FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'")
' End If
' End Using
' UpPS.Update()
'End If
Private Sub CargaListasPreciosSubProyectos(CvePS As Integer)
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
DivPrecioLista.Visible = True
Using ObjVta As New ClsVentas
If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa) Then
Dim Dt As DataTable = Nothing
If UsuarioActual.TienePermisoProceso(384) Then
Dt = ObjVta.DtResultados.FiltraParametros("Predeterminada = 'True'")
Else
Dt = ObjVta.DtResultados.FiltraParametros("Predeterminada = 'True' AND Restringuida = 'False'")
End If
DdlPrecioLista.DataSource = Dt
If Dt IsNot Nothing Then
DdlPrecioLista.SelectedValueExist(Dt.FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'"))
End If
End If
End Using
DdlPrecioLista.DataBind()
UpPS.Update()
End If
End Sub
Private Sub BloqueaClasificaciones()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
@@ -9132,7 +9145,7 @@ Partial Class Ventas
Dim PrecioLista As String = ""
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(360) = "1" Then
CvePrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedValue.ToEntero()
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text
PrecioLista = GvPS.Rows(e.RowIndex).FCDropDownList("DdlPrecioListaEdit").SelectedItem.Text.Split("-"c)(0)
End If
AgregarProductoServicio(Cantidad, DdlUM.SelectedValue.ToEntero(), DdlUM.SelectedItem.Text, DdlCla.SelectedValue.ToEntero(), DdlCla.SelectedItem.Text,
@@ -17856,6 +17869,9 @@ Partial Class Ventas
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
If drPS IsNot Nothing Then
CargaListasPreciosSubProyectos(CvePSParametro)
'HdnUnidadMedida.Value = PS.Rows(0)("CveUnidadMedida").ToString()
HdnPS.Value = drPS("PS").ToString()
HdnCodigoPS.Value = drPS("PSCodigo").ToString()
@@ -17916,6 +17932,19 @@ Partial Class Ventas
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
ObjPrecioSugerido.CvePrecioLista = -1
ObjPrecioSugerido.PrecioSugerido = 0
tPrecioSugerido = 0
PrecioSugerido = 0
End If
End If
End If
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
@@ -18564,7 +18593,7 @@ Partial Class Ventas
DdlPS.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
End If
CargaListasPreciosSubProyectos()
CargaListasPreciosSubProyectos(-1)
UpDetalle.Update()
UpEmitirTransitorio.Update()
@@ -19400,7 +19429,7 @@ Partial Class Ventas
If DivPrecioLista.Visible Then
If DdlPrecioLista.SelectedValue.ToEntero() > 0 AndAlso DdlPrecioLista.SelectedValue.ToEntero() = Me.CvePrecioLista Then
CvePrecioListaPS = Me.CvePrecioLista
PrecioListaPS = DdlPrecioLista.SelectedItem.Text
PrecioListaPS = DdlPrecioLista.SelectedItem.Text.Split("-"c)(0)
Else
'sino es la seleccionada se recalcula de nuevo
CargaPrecioLista(DdlPS.SelectedValue.ToEntero)