From 44f2980173d83f7b1b6dd6ebaa95bbebb31372bd Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 10 Feb 2025 11:05:00 -0700 Subject: [PATCH] =?UTF-8?q?--=20COMENTAR=20C=C3=93DGIO=20DE=20E72=20Y=20E8?= =?UTF-8?q?0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 87 ++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 55 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 6412f6354..f0859deeb 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5284,9 +5284,6 @@ Partial Class Ventas HlCuentaTerminal.Visible = True End If - If UsuarioActual.CveEmpresa = 80 Then - LtlImprimir.Text = String.Format("
  • Imprimir
  • ", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta))) - End If DiasCredito = DbRowVenta("DiasCredito").ToString().ToEntero() EsDiasCreditoFijo = CBool(DbRowVenta("EsDiasCreditoFijo").ToString()) @@ -7078,12 +7075,6 @@ Partial Class Ventas PlazoCobranza = ObjCliente.PlazoCobranza PlazoCobranzaRemision = ObjCliente.PlazoCobranzaRemision - If UsuarioActual.CveEmpresa.Contiene(72, 80) Then - TxtFechaPago.ReadOnly = True - Calendario.Enabled = False - imgCalendario.Visible = False - End If - 'funcionalidad EnviarSMSTimbrado 'If CveVenta <= 0 And UsuarioActual.Empresa.Funcionalidad(152) <> "" And DdlTipoComprobante.SelectedValue = "Ing" Then ' If ObjCliente.CobranzaTelefono <> "" Then @@ -10045,16 +10036,16 @@ Partial Class Ventas End If 'SI TIENE ANTICIPOS Y ESTA AMORTIZADO AL 100% EL DOCUMENTO (SALDO = 0) | NO VALIDA PU DEL CONCEPTO - If Not (LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0) Then - If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then - If UsuarioActual.CveEmpresa.Contiene(72, 80) Then - If TmpDT.FiltraParametros($"TotalImporte = 0").Rows.Count > 0 Then - Alert("El importe de cada concepto debe ser mayor a cero. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - End If - End If - End If + 'If Not (LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0) Then + ' If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then + ' If UsuarioActual.CveEmpresa.Contiene(72, 80) Then + ' If TmpDT.FiltraParametros($"TotalImporte = 0").Rows.Count > 0 Then + ' Alert("El importe de cada concepto debe ser mayor a cero. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + ' Exit Sub + ' End If + ' End If + ' End If + 'End If Dim CveContratoTipo As Integer = 0 If CveContrato > 0 Then @@ -10730,14 +10721,14 @@ Partial Class Ventas ' End If 'End If - If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then - If UsuarioActual.CveEmpresa.Contiene(72, 80) Then - If ObjFactura.SubTotal <= 0 Then - Alert("Es necesario especificar el importe en los conceptos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - End If - End If + 'If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then + ' If UsuarioActual.CveEmpresa.Contiene(72, 80) Then + ' If ObjFactura.SubTotal <= 0 Then + ' Alert("Es necesario especificar el importe en los conceptos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + ' Exit Sub + ' End If + ' End If + 'End If 'cuando es contado debe de tener especificado la forma de pago 'If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") AndAlso ObjFactura.Total > 0 AndAlso RBLPago.SelectedValue = "2" AndAlso ObjFactura.Total - If(DtPagos Is Nothing, 0, DtPagos.SUM("Importe")) > 0 Then ' AndAlso ObjFactura.CveCorte > 0 @@ -11280,12 +11271,12 @@ Partial Class Ventas If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "RNC", "Cot", "Ped", "DPe", "PA", "Ped")) Then Dim DebeTimbrar As Boolean = True - If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then - 'si tiene anticipos seleccionados y el total es cero, que no se timbre(previo empresa72) - If LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0 Then - DebeTimbrar = False - End If - End If + 'If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then + ' 'si tiene anticipos seleccionados y el total es cero, que no se timbre(previo empresa72) + ' If LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0 Then + ' DebeTimbrar = False + ' End If + 'End If 'Si es AMORTIZACIÓN ANTICIPO SOBRE FACTURA EN CERO no debe timbrar If DdlTipoAmortizacionAnticipo.SelectedValue = "3" Then @@ -17319,9 +17310,9 @@ Partial Class Ventas If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}") - If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then - DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}") - End If + 'If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then + ' DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}") + 'End If If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then DtMovtos = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('RNC','IxC','Ant') {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")} ", "")}") @@ -17349,11 +17340,11 @@ Partial Class Ventas divAmortizacionTipoRelacion.Visible = True End If - If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146) Then - If Not DdlTipoAmortizacionAnticipo.Items.Cast(Of ListItem).Any(Function(x) x.Value = "3") Then - DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo sobre factura en cero", "3")) - End If - End If + 'If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 146) Then + ' If Not DdlTipoAmortizacionAnticipo.Items.Cast(Of ListItem).Any(Function(x) x.Value = "3") Then + ' DdlTipoAmortizacionAnticipo.Items.Add(New ListItem("Amortización anticipo sobre factura en cero", "3")) + ' End If + 'End If If UsuarioActual.Empresa.Funcionalidad(343) = "1" Then DdlTipoAmortizacionAnticipo.Items.Remove(DdlTipoAmortizacionAnticipo.Items.FindByValue("1")) @@ -24920,13 +24911,6 @@ Partial Class Ventas If Me.CveVenta > 0 AndAlso (Not Me.EsCreaApartirDe) AndAlso Me.CveFormaPago33Venta > 0 Then DdlFormaPago33.SelectedValueExist(Me.CveFormaPago33Venta) End If - - - If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then - DdlFormaPago33.Enabled = False - DdlFormaPago33.SelectedValueExist("20") - End If - End If Case 2 'CONTADO @@ -24947,9 +24931,6 @@ Partial Class Ventas DdlMetodoPago33.SelectedValueExist("1") DdlMetodoPago33.Enabled = False - If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then - DdlFormaPago33.Enabled = True - End If CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero()) 'SI ES VENTA NUEVA, ASIGNA LA DEL CLIENTE @@ -33401,10 +33382,6 @@ Partial Class Ventas Else Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}") divAmortizacionTipoRelacion.Visible = True - If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then - DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}") - If DtMovtos.Rows.Count > 0 Then ImgAntiPend.Visible = True - End If End If End If