-Cambios en columna ejercido

This commit is contained in:
2024-07-01 22:12:38 -07:00
5 changed files with 197 additions and 120 deletions

View File

@@ -377,9 +377,16 @@ Partial Class Ventas_Promociones
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then
If DdlClasificacion.SelectedValue.ToEntero <= 0 Then
If DdlPS.SelectedValue.ToEntero <= 0 Then
Alert("Debe seleccionar una clasificacion o un producto y/o servicio", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
If DdlPS.SelectedValue.ToEntero <= 0 Then
If DdlClasificacion.SelectedValue.ToEntero <= 0 Then
Alert("Debe seleccionar una clasificacion", TipoMensaje.MsgAdvertencia)
Alert("Debe seleccionar una clasificacion o un producto y/o servicio", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If

View File

@@ -10561,12 +10561,16 @@
function FnCambiaAnt(chk, txt, saldo) {
debugger;
var Total = ToDouble($get('TxtSubTotal').value);
let Total = ToDouble($get('TxtSubTotal').value);
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
if (TipoAnticipo == '4') {
Total = ToDouble($get('TxtTotal').value);
}
if (isNaN(importeTxt)) {
importeTxt = 0;
} else {
@@ -10580,7 +10584,6 @@
saldo = (importeTxt > saldo) ? saldo : importeTxt;
var SaldoCompra = (Total - FnSumaValoresAnt() + ToDouble(txt.value)).toFixed(2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
if (SaldoCompra < 0) txt.value = SaldoCompra - txt.value;
//minimo entre saldocompra y el saldoanticipo

View File

@@ -7047,6 +7047,12 @@ Partial Class Ventas
End If
If Not EsModuloCotizacion Then
LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva()
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(60) Then
LnkCotizaciones.Visible = False
LnkPedido2SinFacturar.Visible = False
LnkRemisiones.Visible = False
LnkOCs.Visible = False
End If
End If
End If
@@ -7073,7 +7079,14 @@ Partial Class Ventas
End If
DdlSucursalCliente.Items.Clear()
Dim dtts As DataTable = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltraParametros("CveClienteSucursal > 0")
'Dim dtts As DataTable = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltraParametros("CveClienteSucursal > 0")
Dim dtts As DataTable = New DataTable
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then
dtts = ObjClientes.DtResultados.Copy()
End If
ObjClientes.Dispose()
If dtts IsNot Nothing AndAlso dtts.Rows.Count > 0 Then
DdlSucursalCliente.DataSource = dtts
DdlSucursalCliente.Items.Insert(0, New ListItem("Matriz", "-1"))
@@ -7852,7 +7865,7 @@ Partial Class Ventas
DdlTipoAutorizacion.SelectedValueExist("1")
If Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
Dim Autorizacion As Integer = 0
Dim Autorizacion As Integer = 0
Dim ObjVentas As New ClsVentas
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
@@ -7872,12 +7885,12 @@ Partial Class Ventas
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
If Autorizacion <= 0 Then
BtnEmitirImprimir.Visible = False
TieneBloqueoPorCreditoVencimiento = 1
End If
BtnEmitirImprimir.Visible = False
TieneBloqueoPorCreditoVencimiento = 1
End If
End If
Case Else 'SI NO TIENE NINGUN TIPO DE AUTORIZACION CONFIGURADO
'VERIFICAR CANDADOS DE VENTA
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 Then
@@ -8237,6 +8250,13 @@ Partial Class Ventas
End If
If Not EsModuloCotizacion Then
LnkRemisiones.Visible = If(UsuarioActual.TienePermisoProceso(199), True, False) : LnkOCs.Visible = True : LnkCotizaciones.Visible = True : LnkPedido2SinFacturar.Visible = True : InicializaAplicarNCMasiva()
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(60) Then
LnkCotizaciones.Visible = False
LnkPedido2SinFacturar.Visible = False
LnkRemisiones.Visible = False
LnkOCs.Visible = False
End If
End If
End If
@@ -13869,10 +13889,21 @@ Partial Class Ventas
End If
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}")
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
Dim CveClientesucursatTemp As Integer = DdlClienteSucursalSucursal()
If CveClientesucursatTemp > 0 Then
'Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}")
Dim drr As DataRow = Nothing
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then
drr = ObjClientes.DtResultados.Copy().FiltroPrimero($" CveClienteSucursal = {CveClientesucursatTemp}")
End If
ObjClientes.Dispose()
If drr IsNot Nothing Then
If RBLTipoVenta.SelectedValue.Contiene("3") Then 'cuando es A-vista
CveAlmacenTraspasoDestino = drr("CveAlmacenAlterno").ToString.ToEntero
@@ -16760,6 +16791,7 @@ Partial Class Ventas
GVAnticipos.DataBind()
End If
UpAnticipos.Update()
UpPS.Update()
End Sub
Protected Sub GVAnticipos_RowCreated(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowCreated
@@ -18266,6 +18298,15 @@ Partial Class Ventas
ImgAntiPend.Visible = True
End If
If ImgAntiPend.Visible Then
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC') ", "")}")
If DtMovtos.Rows.Count = 0 Then
ImgAntiPend.Visible = False
End If
End If
End If
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
@@ -18301,6 +18342,15 @@ Partial Class Ventas
ImgAntiPend.Visible = True
End If
If ImgAntiPend.Visible Then
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC') ", "")}")
If DtMovtos.Rows.Count = 0 Then
ImgAntiPend.Visible = False
End If
End If
End If
MostrarOpcionesPaqueteria()
TrAtencionA.Visible = True
@@ -25128,13 +25178,9 @@ Partial Class Ventas
Else
DdlPS_SelectedIndexChanged(Nothing, Nothing)
End If
End Sub
Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs)
For Each row As GridViewRow In GvPS.Rows
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}")
TmpDT.Rows(row.RowIndex)("Orden") = row.FCTextBox("TxtOrden").Text.ToEntero()
Next
Next
Dim resultados = From OrdenDT In TmpDT
Order By OrdenDT("Orden").ToString().ToEntero()
@@ -37630,7 +37676,7 @@ Partial Class Ventas
Private Sub CargaDdlClientesSucursal()
DdlClienteSucursal.DataSource = GlobalDTClientesTodosSucursales(UsuarioActual.CveEmpresa)
DdlClienteSucursal.DataSource = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa)
DdlClienteSucursal.DataBind()
DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
@@ -38132,7 +38178,16 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
If DdlSucursalCliente.SelectedValue.ToEntero > 0 Then
Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}")
'Dim drr As DataRow = GlobalDTClientesSucursales(UsuarioActual.CveEmpresa, CveCliente).FiltroPrimero($"CveClienteSucursal={DdlSucursalCliente.SelectedValue}")
Dim drr As DataRow = Nothing
Dim ObjClientes As New ClsClientes
If ObjClientes.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then
drr = ObjClientes.DtResultados.Copy().FiltroPrimero($" CveClienteSucursal = {DdlSucursalCliente.SelectedValue.ToEntero}")
End If
ObjClientes.Dispose()
If drr IsNot Nothing Then
If RBLTipoVenta.SelectedValue.Contiene("6") Then
tCveAlmacenExistencia = drr("CveAlmacenAlterno").ToString.ToEntero