Puntos GDiaz

--Venta.aspx quitar listas de precios al generar anticipos.
--Venta.aspx al cargar el tipo docto "Ant" mostrar el PS de anticipo.
--PVCobranza.aspx cuentas de transferencias a caja chica.
--PVCobranza.aspx, Ventas.aspx agregar el subproyecto al pago.
--CatContrasenia.aspx mejorar restricciones de contraseñas.
This commit is contained in:
2024-08-03 11:48:50 -07:00
parent 039c20f9e9
commit 0e41e4c959
4 changed files with 94 additions and 63 deletions

View File

@@ -3734,27 +3734,32 @@ Partial Class Ventas
Private Sub CargaListasPreciosSubProyectos(CvePS As Integer)
If UsuarioActual.CveEmpresa = 189 Then
DivPrecioLista.Visible = True
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") Then
DivPrecioLista.Visible = True
Using ObjVta As New ClsVentas
If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa) Then
Dim Dt As DataTable = Nothing
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.Copy()
Else
Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'")
End If
DdlPrecioLista.DataSource = Dt
If Dt IsNot Nothing Then
DdlPrecioLista.SelectedValueExist(Dt.FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'"))
End If
If UsuarioActual.TienePermisoProceso(384) Then
Dt = ObjVta.DtResultados.Copy()
Else
Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'")
End If
End Using
DdlPrecioLista.DataSource = Dt
If Dt IsNot Nothing Then
DdlPrecioLista.SelectedValueExist(Dt.FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'"))
End If
DdlPrecioLista.DataBind()
Else
DivPrecioLista.Visible = False
End If
End If
End Using
DdlPrecioLista.DataBind()
UpPS.Update()
End If
End Sub
@@ -15758,7 +15763,7 @@ Partial Class Ventas
' DrPago("Importe") = DrPago("Importe").ToString().ToDecimal - TxtCambio.Text.ToDecimal
'End If
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString().ToEntero(), DrPago("CveTipoMovimiento").ToString().ToEntero(), Fecha, FolioIE.ToString(), String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString().ToDouble, DdlMoneda.SelectedValue.ToEntero(), tipoCambio, DrPago("Observaciones").ToString(), "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString().ToEntero(), Modulo:="Ventas/Guardar")
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString().ToEntero(), DrPago("CveTipoMovimiento").ToString().ToEntero(), Fecha, FolioIE.ToString(), String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString().ToDouble, DdlMoneda.SelectedValue.ToEntero(), tipoCambio, DrPago("Observaciones").ToString(), "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString().ToEntero(), Modulo:="Ventas/Guardar", CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero())
If CveIEPago > 0 Then
importeMovimiento = DrPago("Importe").ToString().ToDecimal * ValorMultiplicador
@@ -17945,19 +17950,28 @@ Partial Class Ventas
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
If UsuarioActual.CveEmpresa = 189 Then
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
If dt IsNot Nothing Then
If dt.Rows.Count > 0 Then
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
If ObjPrecioSugerido.CvePrecioLista = Me.CvePrecioListaCliente Then
Alert("La lista de precios del cliente no esta permitido en la sucursal actual", TipoMensaje.MsgAdvertencia)
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") Then
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
If dt IsNot Nothing Then
If dt.Rows.Count > 0 Then
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
If ObjPrecioSugerido.CvePrecioLista = Me.CvePrecioListaCliente Then
Alert("La lista de precios del cliente no esta permitido en la sucursal actual", TipoMensaje.MsgAdvertencia)
End If
ObjPrecioSugerido.CvePrecioLista = -1
ObjPrecioSugerido.PrecioSugerido = 0
tPrecioSugerido = 0
PrecioSugerido = 0
End If
Else
ObjPrecioSugerido.CvePrecioLista = -1
ObjPrecioSugerido.PrecioSugerido = 0
tPrecioSugerido = 0
PrecioSugerido = 0
Alert("No se encontro una lista de precios permitida en la sucursal actual", TipoMensaje.MsgAdvertencia)
End If
Else
ObjPrecioSugerido.CvePrecioLista = -1
@@ -17965,22 +17979,29 @@ Partial Class Ventas
tPrecioSugerido = 0
PrecioSugerido = 0
Alert("No se encontro una lista de precios permitida en la sucursal actual", TipoMensaje.MsgAdvertencia)
Alert("No se encontraron listas de precio disponibles", TipoMensaje.MsgAdvertencia)
End If
Else
ObjPrecioSugerido.CvePrecioLista = -1
ObjPrecioSugerido.PrecioSugerido = 0
tPrecioSugerido = 0
PrecioSugerido = 0
Alert("No se encontraron listas de precio disponibles", TipoMensaje.MsgAdvertencia)
End If
End If
End If
End If
If UsuarioActual.CveEmpresa = 189 Then
If DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
DdlPrecioLista.SelectedValueExistInsert("-1", "Sin lista")
Me.CvePrecioLista = -1
ObjPrecioSugerido.CvePrecioLista = -1
ObjPrecioSugerido.PrecioSugerido = 0
tPrecioSugerido = 0
PrecioSugerido = 0
End If
End If
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
@@ -17996,6 +18017,7 @@ Partial Class Ventas
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
HdnCodigo.Value = drPS("Codigo").ToString()
If DdlClasificacion.SelectedIndex = 0 Then
If drPS("CveClasificacion").ToString() IsNot Nothing Then
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
@@ -18028,7 +18050,7 @@ Partial Class Ventas
End If
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Egs", "Ant") Then
AgregarPS()
End If
@@ -18490,6 +18512,18 @@ Partial Class Ventas
TrTipoContable.Visible = True
End If
CargaListasPreciosSubProyectos(If(DdlPS.SelectedValue.ToEntero() <= 0, -1, DdlPS.SelectedValue.ToEntero()))
If UsuarioActual.CveEmpresa = 189 Then
Dim DatarowPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:="84111506").FiltroPrimero("")
If DatarowPS IsNot Nothing Then
DdlPS.SelectedValue = DatarowPS("CvePS").ToString()
DdlPS.SelectedText = DatarowPS("CodigoPS").ToString()
DdlPS_SelectedIndexChanged(Nothing, Nothing)
End If
End If
Updatetabs.Update()
UPCondicionesPago.Update()
UpCliente.Update()