Validacion de carta porte, regimen de sociedad en nombre del cliente, habilitar textbox de TC en E13 y E83, limpiar adjuntos en "crear a partir de"

This commit is contained in:
2022-06-22 01:32:13 -07:00
parent d27cf078d2
commit 10a60e8db2
2 changed files with 132 additions and 66 deletions

View File

@@ -10355,6 +10355,7 @@ Namespace Modelos
Public Property CveCliente As Integer
Public Property Nombre As String
Public Property NombreComercial As String
Public Property RegimenSociedad As String
Public Property Codigo As String
Public Property Direccion As String
Public Property NoExt As String

View File

@@ -2695,9 +2695,6 @@ Partial Class Ventas
End If
End If
'PERMISO PARA CANCELAR PEDIDO
If GvInv.Rows.Count = 0 Then
If DdlTipoComprobante.SelectedValue.Contiene("Ped") And Not CveEstatus = 14 Then
@@ -3276,8 +3273,6 @@ Partial Class Ventas
HlFacturasRelaciondas.Visible = False
End If
End If
''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ???
If Not CveVenta > 0 Then
'LbDescargarExcel.Visible = True
@@ -3314,10 +3309,9 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
BtnModalAddPS.Enabled = False
End If
MostrarOpcionesPaqueteria()
'If ViewState("CveCotizacion").ToString().ToEntero() > 0 Then
'If Not AjustarTotalCotizacionFacturada(ViewState("CveCotizacion").ToString().ToEntero(), TxtTotal.Text.ToDecimal) Then
@@ -3327,7 +3321,6 @@ Partial Class Ventas
'End If
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
trRotacion.Visible = True
trRotacionlbl.Visible = True
@@ -3340,6 +3333,9 @@ Partial Class Ventas
UPObservaciones.Update()
End If
End If
End Sub
Private Sub BloqueaClasificaciones()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
@@ -5239,8 +5235,11 @@ Partial Class Ventas
TxtFech3.ReadOnly = True : ImgFech3.Enabled = False
ChkConvertirDoctoPesos.Enabled = False
ChkConvertirDolares.Enabled = False
TxtTipoCambio.Enabled = False
TxtTipoCambioDlls.Enabled = False
TxtTipoCambio.Enabled = UsuarioActual.CveEmpresa.Contiene(13, 83)
TxtTipoCambioDlls.Enabled = UsuarioActual.CveEmpresa.Contiene(13, 83)
TxtTipoCambio.ReadOnly = Not UsuarioActual.CveEmpresa.Contiene(13, 83)
TxtTipoCambioDlls.ReadOnly = Not UsuarioActual.CveEmpresa.Contiene(13, 83)
'Condiciones de Pago
RBLPago.Enabled = False
@@ -8376,6 +8375,37 @@ Partial Class Ventas
Alert("La carta porte no tiene un destino definido.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DdlChofer.SelectedValue.ToEntero() <= 0 Then
Alert("La carta porte no tiene un chofer definido.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DdlUnidadCamion.SelectedValue.ToEntero() <= 0 Then
Alert("La carta porte no tiene un chofer definido.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If String.IsNullOrEmpty(TxtDistancia.Text.Trim) Then
Alert("La carta porte no tiene la distancia definida.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If String.IsNullOrEmpty(TxtFechaEntregaCP.Text.Trim) Then
Alert("La carta porte no tiene la F.Salida definida.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If String.IsNullOrEmpty(TxtFechaLlegadaCP.Text.Trim) Then
Alert("La carta porte no tiene la F.Llegada definida.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DtMercancias Is Nothing OrElse DtMercancias.Rows.Count = 0 Then
Alert("La carta porte no tiene mercancía definida.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DvConfiguracionVeiculo.Visible Then
If DdlConfigAuto.SelectedValue.ToEntero() <= 0 Then
Alert("La carta porte no tiene la configuración definida.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
'CUANDO ES COTIZACION Y SE VA A FACTURAR SE HACE INGRESO
@@ -11572,7 +11602,7 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Else
Timbre.Receptor.Nombre = Obj.Cliente.NombreComercial
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
End If
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
End If
@@ -18103,7 +18133,7 @@ Partial Class Ventas
If CvePS.Contiene(402917, 402918) Then
PUPromocion = 40D
End If
PUModificado = Math.Round(PUPromocion / (1 + If(IncluyeImpuestos, PorcentajeIVA, 0)), 6)
PUModificado = Math.Round(PUPromocion / (1 + PorcentajeIVA), 6)
End If
End If
@@ -21681,6 +21711,15 @@ Partial Class Ventas
TxtTipoCambio.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString()
TrConversionTipoCambio.Visible = True
End Select
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
TxtTipoCambio.Enabled = True
TxtTipoCambioDlls.Enabled = True
TxtTipoCambio.ReadOnly = False
TxtTipoCambioDlls.ReadOnly = False
End If
UpPS.Update()
If CveCliente > 0 Then
@@ -31305,6 +31344,8 @@ Partial Class Ventas
' BtnCrearApartirDe.Visible = False
'End If
Dim FolioOriginal As String = TxtFolio.Text
HdnCveVenta.Value = ""
BtnCrearApartirDe.Visible = False '[IPP-2Novimebre2018] REEMPLAZA LO COMENTADO ARRIBA
@@ -31504,6 +31545,30 @@ Partial Class Ventas
HabilitarControlesCartaPorte(True)
End If
If DivAdjuntar.Visible Then
Dim FolioNuevo As String = TxtFolio.Text
If FolioNuevo <> FolioOriginal Then
If Adjunto <> "" Then
Adjunto = ""
BtnArchivoAdjunto.Text = ""
BtnArchivoAdjunto.Visible = False
BtnEliminarAdjunto.Visible = False
BtnAdjuntar.Visible = True
tdAdjuntar.Style.Item("display") = "block"
tdAdjunto.Style.Item("display") = "none"
Else
DivAdjuntar.Visible = True
End If
Else
DivAdjuntar.Visible = False
End If
UpAdjuntar.Update()
Else
DivAdjuntar.Visible = True
End If
UpnTools.Update()
UpCliente.Update()
UpParametros.Update()