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

@@ -1488,7 +1488,7 @@ Public Class ClsBancos
Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1, Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1,
Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False, Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False,
Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1, Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1,
Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha, Optional CveAutorizacion As String = "") As Integer Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha, Optional CveAutorizacion As String = "", Optional CveSubProyecto As Integer = -1) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Banc_IEAdd") DataAdapter("PA_Banc_IEAdd")
@@ -1532,6 +1532,7 @@ Public Class ClsBancos
.Add("@AnticipoPuntual", SqlDbType.Bit).Value = AnticipoPuntual .Add("@AnticipoPuntual", SqlDbType.Bit).Value = AnticipoPuntual
.Add("@FechaEmision", SqlDbType.Date).Value = FechaEmision .Add("@FechaEmision", SqlDbType.Date).Value = FechaEmision
.Add("@CveAutorizacion", SqlDbType.VarChar).Value = CveAutorizacion .Add("@CveAutorizacion", SqlDbType.VarChar).Value = CveAutorizacion
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With End With
Try Try

View File

@@ -13,6 +13,10 @@ Partial Class CatContrasenia
End Sub End Sub
Public Sub GuardaDatos() Public Sub GuardaDatos()
If TxtContrasenia1.Text.Length < 7 Then
Alert("La contraseña debe ser de al menos 8 caracteres.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Usuario As New ClsSisUsuarios Dim Usuario As New ClsSisUsuarios
Usuario.IniciaTransacSQL() Usuario.IniciaTransacSQL()

View File

@@ -111,7 +111,13 @@ Partial Class Ventas_PVCobranza
'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon)) DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon)) DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", CveMon))
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(195, 197) Then
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(CveMon <= 0, 1, CveMon)))
Else
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(CveMon <= 0, 1, CveMon)))
End If
'DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", CveMon))
DtCC.Dispose() DtCC.Dispose()
@@ -387,17 +393,9 @@ Partial Class Ventas_PVCobranza
End If End If
If LtlSaldo.Text.ToDecimal() > Pagado Then If LtlSaldo.Text.ToDecimal() > Pagado Then
If UsuarioActual.CveEmpresa = 189 Then
If (LtlSaldo.Text.ToDecimal() - Pagado) > 6 Then
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia) Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
Else
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal
Dim tCveCorte As Integer = CveCorte Dim tCveCorte As Integer = CveCorte
@@ -486,13 +484,13 @@ Partial Class Ventas_PVCobranza
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then
MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte) MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
SaldoPendiente -= TxtImporteCredito.Text.ToDecimal SaldoPendiente -= TxtImporteCredito.Text.ToDecimal
PagoAplicado += TxtImporteCredito.Text.ToDecimal PagoAplicado += TxtImporteCredito.Text.ToDecimal
End If End If
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then
MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte) MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
SaldoPendiente -= TxtImporteDebito.Text.ToDecimal SaldoPendiente -= TxtImporteDebito.Text.ToDecimal
PagoAplicado += TxtImporteDebito.Text.ToDecimal PagoAplicado += TxtImporteDebito.Text.ToDecimal
End If End If
@@ -503,13 +501,13 @@ Partial Class Ventas_PVCobranza
Obs = $"{VentaActual.SerieFolio} - Autorizó: {TxtAutorizo.Text}" Obs = $"{VentaActual.SerieFolio} - Autorizó: {TxtAutorizo.Text}"
End If End If
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, Obs:=Obs, CveAutorizacion:=TxtClaveAutorizacion.Text.Trim()) MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, Obs:=Obs, CveAutorizacion:=TxtClaveAutorizacion.Text.Trim(), CveSubProyecto:=VentaActual.CveSubProyecto)
SaldoPendiente -= TxtImporteCheque.Text.ToDecimal SaldoPendiente -= TxtImporteCheque.Text.ToDecimal
PagoAplicado += TxtImporteCheque.Text.ToDecimal PagoAplicado += TxtImporteCheque.Text.ToDecimal
End If End If
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then
MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte) MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
SaldoPendiente -= TxtImporteTransferencia.Text.ToDecimal SaldoPendiente -= TxtImporteTransferencia.Text.ToDecimal
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
End If End If
@@ -522,19 +520,13 @@ Partial Class Ventas_PVCobranza
TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero
PagoEfectivo = SaldoPendiente PagoEfectivo = SaldoPendiente
End If End If
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte) MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
SaldoPendiente -= PagoEfectivo SaldoPendiente -= PagoEfectivo
End If End If
If SaldoPendiente > 0 Then If SaldoPendiente > 0 Then
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If SaldoPendiente > 6 Then
MsgError = "Tiene saldo pendiente por aplicar" MsgError = "Tiene saldo pendiente por aplicar"
End If End If
Else
MsgError = "Tiene saldo pendiente por aplicar"
End If
End If
If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, tCveCorte) Then If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, tCveCorte) Then
MsgError = "Error al aplicar el corte" MsgError = "Error al aplicar el corte"
@@ -745,14 +737,14 @@ Partial Class Ventas_PVCobranza
Return Retorno Return Retorno
End Function End Function
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer, Optional Obs As String = "", Optional CveAutorizacion As String = "") As String Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer, Optional Obs As String = "", Optional CveAutorizacion As String = "", Optional CveSubProyecto As Integer = -1) As String
Dim Retorno As String = "" Dim Retorno As String = ""
Dim CveIEPago As Integer = 0 Dim CveIEPago As Integer = 0
Dim ErrorConta As Boolean Dim ErrorConta As Boolean
If String.IsNullOrEmpty(Obs) Then If String.IsNullOrEmpty(Obs) Then
Obs = VentaActual.SerieFolio Obs = VentaActual.SerieFolio
End If End If
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion) CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto)
If CveIEPago > 0 Then If CveIEPago > 0 Then
Dim Pago As New VentaPago Dim Pago As New VentaPago
Pago.ImportePagoVenta = ImportePago Pago.ImportePagoVenta = ImportePago

View File

@@ -3734,6 +3734,7 @@ Partial Class Ventas
Private Sub CargaListasPreciosSubProyectos(CvePS As Integer) Private Sub CargaListasPreciosSubProyectos(CvePS As Integer)
If UsuarioActual.CveEmpresa = 189 Then If UsuarioActual.CveEmpresa = 189 Then
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") Then
DivPrecioLista.Visible = True DivPrecioLista.Visible = True
Using ObjVta As New ClsVentas Using ObjVta As New ClsVentas
@@ -3755,6 +3756,10 @@ Partial Class Ventas
End Using End Using
DdlPrecioLista.DataBind() DdlPrecioLista.DataBind()
Else
DivPrecioLista.Visible = False
End If
UpPS.Update() UpPS.Update()
End If End If
End Sub End Sub
@@ -15758,7 +15763,7 @@ Partial Class Ventas
' DrPago("Importe") = DrPago("Importe").ToString().ToDecimal - TxtCambio.Text.ToDecimal ' DrPago("Importe") = DrPago("Importe").ToString().ToDecimal - TxtCambio.Text.ToDecimal
'End If '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 If CveIEPago > 0 Then
importeMovimiento = DrPago("Importe").ToString().ToDecimal * ValorMultiplicador importeMovimiento = DrPago("Importe").ToString().ToDecimal * ValorMultiplicador
@@ -17945,6 +17950,7 @@ Partial Class Ventas
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista) DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
If UsuarioActual.CveEmpresa = 189 Then If UsuarioActual.CveEmpresa = 189 Then
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") Then
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable) Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
If dt IsNot Nothing Then If dt IsNot Nothing Then
@@ -17981,6 +17987,21 @@ Partial Class Ventas
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 If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere 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() HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
HdnIVARetAPS.Value = drPS("RetIVA").ToString() HdnIVARetAPS.Value = drPS("RetIVA").ToString()
HdnCodigo.Value = drPS("Codigo").ToString() HdnCodigo.Value = drPS("Codigo").ToString()
If DdlClasificacion.SelectedIndex = 0 Then If DdlClasificacion.SelectedIndex = 0 Then
If drPS("CveClasificacion").ToString() IsNot Nothing Then If drPS("CveClasificacion").ToString() IsNot Nothing Then
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString()) DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
@@ -18028,7 +18050,7 @@ Partial Class Ventas
End If End If
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Egs", "Ant") Then
AgregarPS() AgregarPS()
End If End If
@@ -18490,6 +18512,18 @@ Partial Class Ventas
TrTipoContable.Visible = True TrTipoContable.Visible = True
End If 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() Updatetabs.Update()
UPCondicionesPago.Update() UPCondicionesPago.Update()
UpCliente.Update() UpCliente.Update()