--Ocultar ImgAnticipos

-- Atencion A siempre en mayusculas
This commit is contained in:
2024-12-26 18:57:26 -07:00
parent 01162a3232
commit d97c97aae2

View File

@@ -5469,7 +5469,11 @@ Partial Class Ventas
HplPagado.Text = "<b>CANCELADO<b>"
End If
If ViewState("CveCotizacion") IsNot Nothing AndAlso ViewState("CveCotizacion").ToString().ToEntero() > 0 AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
ImgAntiPend.Visible = True
If UsuarioActual.CveEmpresa = 189 Then
ImgAntiPend.Visible = False
Else
ImgAntiPend.Visible = True
End If
Else
ImgAntiPend.Visible = False
End If
@@ -5578,7 +5582,11 @@ Partial Class Ventas
If DbRowVenta("Saldo").ToString().ToDouble < 0.01 Then
If ViewState("CveCotizacion") IsNot Nothing AndAlso ViewState("CveCotizacion").ToString().ToEntero() > 0 AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
ImgAntiPend.Visible = True
If UsuarioActual.CveEmpresa = 189 Then
ImgAntiPend.Visible = False
Else
ImgAntiPend.Visible = True
End If
Else
ImgAntiPend.Visible = False
End If
@@ -17301,6 +17309,10 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DtMovtos IsNot Nothing AndAlso DtMovtos.Rows.Count = 0 Then
ImgAntiPend.Visible = False
End If
If UsuarioActual.CveEmpresa = 189 Then
ImgAntiPend.Visible = False
End If
Else
GVAnticipos.DataSource = Nothing
End If
@@ -18963,6 +18975,9 @@ Partial Class Ventas
ImgAntiPend.Visible = True
End If
If UsuarioActual.CveEmpresa = 189 Then
ImgAntiPend.Visible = False
End If
If ImgAntiPend.Visible Then
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
@@ -19008,6 +19023,10 @@ Partial Class Ventas
ImgAntiPend.Visible = True
End If
If UsuarioActual.CveEmpresa = 189 Then
ImgAntiPend.Visible = False
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','Ant') ", "")}")
@@ -23985,7 +24004,7 @@ Partial Class Ventas
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
UsuarioActual.CveEmpresa, CveVenta,
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim.ToUpper(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero,
@@ -32729,6 +32748,10 @@ Partial Class Ventas
GVAnticipos.DataSource = DtMovtos
GVAnticipos.DataBind()
If DtMovtos.Rows.Count > 0 Then ImgAntiPend.Visible = True
If UsuarioActual.CveEmpresa = 189 Then
ImgAntiPend.Visible = False
End If
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
@@ -33022,7 +33045,7 @@ Partial Class Ventas
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
UsuarioActual.CveEmpresa, CveVenta,
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim.ToUpper(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero()) Then
MensajeError = "Ocurrió un error al actualizar la información de la cotización"