Validaciones de año del vehiculo, cod ensamble en motobaterias
This commit is contained in:
@@ -4031,6 +4031,7 @@ Partial Class PV
|
||||
HdnTipoInv.Value = drPS("Inv_CveMetodoInventario").ToString
|
||||
HdnAplicaIEPS.Value = drPS("AplicaIEPS").ToString
|
||||
HdnPorcentajeIEPS.Value = drPS("IEPSPorcentaje").ToString
|
||||
HdnCveClasificacion.Value = drPS("CveClasificacion").ToString
|
||||
'Muestra la tabla de tamaños
|
||||
If drPS("CveTamaño").ToString().ToEntero() > 0 Then
|
||||
DivRecepcionUsados.Visible = True
|
||||
@@ -4736,6 +4737,7 @@ Partial Class PV
|
||||
HdnCodigoPS.Value = "-1"
|
||||
HdnTipoPS.Value = "-1"
|
||||
HdnTipoInv.Value = "-1"
|
||||
HdnCveClasificacion.Value = "-1"
|
||||
|
||||
DdlClasificacion.SelectedIndex = 0
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(141).ToString = "1" Then
|
||||
@@ -5360,33 +5362,26 @@ Partial Class PV
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DrPS IsNot Nothing Then
|
||||
'SOLO DEBE AGREGAR POLIZA VIRTUAL SI ES ACUMULADOR
|
||||
If DrPS("CveClasificacion").ToString().ToEntero().Contiene(20520, 20522, 20513, 20511, 20521, 20512, 20514, 20229) Then
|
||||
If String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
|
||||
Alert("El campo año esta vacío.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
|
||||
Alert("El campo año debe ser mayor a 1900.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If DrPS IsNot Nothing Then
|
||||
'SOLO DEBE AGREGAR POLIZA VIRTUAL SI ES ACUMULADOR
|
||||
If DrPS("CveClasificacion").ToString().ToEntero().Contiene(20520, 20522, 20513, 20511, 20521, 20512, 20514, 20229) Then
|
||||
If String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
|
||||
Alert("El campo año esta vacío.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtAnioVehiculo.Text.ToDecimal() <= 1900 Then
|
||||
Alert("El campo año debe ser mayor a 1900.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtAnioVehiculo.Text.ToDecimal() > Now.Year Then
|
||||
Alert("El campo año no puede ser mayor al año actual.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If DrPS IsNot Nothing Then
|
||||
'SOLO DEBE AGREGAR POLIZA VIRTUAL SI ES ACUMULADOR
|
||||
If DrPS("CveClasificacion").ToString().ToEntero().Contiene(20520, 20522, 20513, 20511, 20521, 20512, 20514, 20229) Then
|
||||
If Not String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
|
||||
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
|
||||
Alert("El año del vehiculo del vehículo no tiene el formato correcto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -5448,9 +5443,14 @@ Partial Class PV
|
||||
PU = ObjDescuento.PU
|
||||
End If
|
||||
|
||||
Dim RowSP As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)
|
||||
Dim CveProyecto As Integer = -1 '
|
||||
Dim Proyecto As String = ""
|
||||
|
||||
Dim CveProyecto As Integer = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveProyecto").ToString.ToEntero
|
||||
Dim Proyecto As String = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("Proyecto").ToString
|
||||
If RowSP IsNot Nothing Then
|
||||
CveProyecto = RowSP("CveProyecto").ToString.ToEntero
|
||||
Proyecto = RowSP("Proyecto").ToString
|
||||
End If
|
||||
|
||||
Dim Consec = AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
||||
CvePS, "", TxtObsPS.Text.Trim, PU, ObjDescuento.ImporteDescuento,
|
||||
|
||||
Reference in New Issue
Block a user