-
This commit is contained in:
@@ -343,8 +343,8 @@ Partial Class OS_OrdenesServicios
|
|||||||
CargaPS(-1, DdlPSDetalle)
|
CargaPS(-1, DdlPSDetalle)
|
||||||
CargaPsMateriales()
|
CargaPsMateriales()
|
||||||
'CargaClasificaciones()
|
'CargaClasificaciones()
|
||||||
CargaPSCaracteristicasOpciones()
|
'CargaPSCaracteristicasOpciones()
|
||||||
CargaCuentasCaracteristicas()
|
'CargaCuentasCaracteristicas()
|
||||||
CargaAlmacen()
|
CargaAlmacen()
|
||||||
CargaModelos()
|
CargaModelos()
|
||||||
|
|
||||||
@@ -847,14 +847,13 @@ Partial Class OS_OrdenesServicios
|
|||||||
If Row("Estatus").ToString = "Activo" Then Estatus = True Else Estatus = False
|
If Row("Estatus").ToString = "Activo" Then Estatus = True Else Estatus = False
|
||||||
If Row("SeSuperviso").ToString = "Sí" Then SeSuperviso = True Else SeSuperviso = False
|
If Row("SeSuperviso").ToString = "Sí" Then SeSuperviso = True Else SeSuperviso = False
|
||||||
|
|
||||||
|
|
||||||
CargaMaterialesDetalle(CveOsDetalle, IDOSDetalle, IDOSDetalle)
|
CargaMaterialesDetalle(CveOsDetalle, IDOSDetalle, IDOSDetalle)
|
||||||
For Each R As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", IDOSDetalle)).Rows
|
For Each R As DataRow In TmpDTMaterialesDetalle.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", IDOSDetalle)).Rows
|
||||||
If Materiales = "-1" Then Materiales = "" Else Materiales = Materiales + "<br>"
|
If Materiales = "-1" Then Materiales = "" Else Materiales = Materiales + "<br>"
|
||||||
Materiales = Materiales + String.Format("{0} {1}", R("Cantidad").ToString, R("PS").ToString)
|
Materiales = Materiales + String.Format("{0} {1}", R("Cantidad").ToString, R("PS").ToString)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
CargaEspecificaciones(CveOsDetalle, IDOSDetalle, IDOSDetalle)
|
'CargaEspecificaciones(CveOsDetalle, IDOSDetalle, IDOSDetalle)
|
||||||
For Each R As DataRow In TmpDTCaracteristica.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", IDOSDetalle)).Rows
|
For Each R As DataRow In TmpDTCaracteristica.FiltraParametros(String.Format("CveConsecutivoDetalle = {0}", IDOSDetalle)).Rows
|
||||||
If Especificaciones = "-1" Then Especificaciones = "" Else Especificaciones = Especificaciones + ","
|
If Especificaciones = "-1" Then Especificaciones = "" Else Especificaciones = Especificaciones + ","
|
||||||
Especificaciones = Especificaciones + String.Format("{0}:{1}:{2}:{3}:{4}:{5}", R("CveCaracteristica").ToString, R("Caracteristica").ToString, R("CveCaracteristicaTipo"), R("CveOpcion").ToString, R("Opcion").ToString, R("Valor").ToString)
|
Especificaciones = Especificaciones + String.Format("{0}:{1}:{2}:{3}:{4}:{5}", R("CveCaracteristica").ToString, R("Caracteristica").ToString, R("CveCaracteristicaTipo"), R("CveOpcion").ToString, R("Opcion").ToString, R("Valor").ToString)
|
||||||
@@ -3112,11 +3111,20 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
'---------------- FIN VALIDACIONES -----------------
|
'---------------- FIN VALIDACIONES -----------------
|
||||||
|
|
||||||
Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual").ToEntero
|
'Validación solo para que no sean uso de material
|
||||||
|
Dim ValidaPU As String = ""
|
||||||
|
If Not DdlTipoVenta.SelectedValue.Contiene("5") Then ValidaPU = "PU > 0"
|
||||||
|
|
||||||
|
Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual", ValidaPU).ToEntero 'PU>0, para indicar que solo los productos que no se han retornado.
|
||||||
Dim CveMoneda As Integer = DTSolicitudDev.FiltroPrimeroValor("CveMoneda").ToEntero
|
Dim CveMoneda As Integer = DTSolicitudDev.FiltroPrimeroValor("CveMoneda").ToEntero
|
||||||
Dim CveVentaPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveVenta").ToEntero
|
Dim CveVentaPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveVenta").ToEntero
|
||||||
Dim CveVentaRemisionGenerada As Integer = -1
|
Dim CveVentaRemisionGenerada As Integer = -1
|
||||||
|
|
||||||
|
If CveAlmacenActual <= 0 Then
|
||||||
|
Alert("No se pudo determinar el almacen del material", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjV As New ClsVentas
|
Dim ObjV As New ClsVentas
|
||||||
Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL())
|
Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL())
|
||||||
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
||||||
@@ -3774,6 +3782,11 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
CancelarOS()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CancelarOS()
|
||||||
Dim CveEstatusOrdenServicioCancelacion As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", " TipoEstatus = 5 ").ToEntero
|
Dim CveEstatusOrdenServicioCancelacion As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", " TipoEstatus = 5 ").ToEntero
|
||||||
Dim CveAlmacenDevolucion As Integer
|
Dim CveAlmacenDevolucion As Integer
|
||||||
Dim CveMotivoCancelacion As Integer = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMotivoCancelacion", "CveSATMotivoCancelacion IN (3)").ToEntero
|
Dim CveMotivoCancelacion As Integer = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMotivoCancelacion", "CveSATMotivoCancelacion IN (3)").ToEntero
|
||||||
@@ -3836,7 +3849,6 @@ Partial Class OS_OrdenesServicios
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("Se presento un error al cancelar la orden de servicio")
|
Alert("Se presento un error al cancelar la orden de servicio")
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CancelarRemision(CveVenta As Integer, CveAlmacenDevolucion As Integer, CvePedido As Integer)
|
Private Sub CancelarRemision(CveVenta As Integer, CveAlmacenDevolucion As Integer, CvePedido As Integer)
|
||||||
@@ -3848,6 +3860,12 @@ Partial Class OS_OrdenesServicios
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'If DdlTipoVenta.SelectedValue.Contiene("5", "6") Then
|
||||||
|
' CancelarOS() 'uso de material
|
||||||
|
' Exit Sub
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
Dim ObjFacturaCancelacion As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=True, VerificaAlmacen:=True)
|
Dim ObjFacturaCancelacion As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=True, VerificaAlmacen:=True)
|
||||||
Try
|
Try
|
||||||
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
|
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
|
||||||
@@ -3869,7 +3887,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
Dim HuboError As Boolean = False
|
Dim HuboError As Boolean = False
|
||||||
If Not resp.HuboError Then
|
If Not resp.HuboError Then
|
||||||
|
|
||||||
If resp.CveEstatus = 12 Then
|
If resp.CveEstatus.Contiene(12) Then '12 - Rem - Cancelado, 14 - Pedido - cancelado
|
||||||
Dim cveoo As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", $" TipoEstatus = 3").ToEntero
|
Dim cveoo As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", $" TipoEstatus = 3").ToEntero
|
||||||
If objos.UpdateOrdenesServiciosEstatus(cveoo, UsuarioActual.CveUsuario, CveOS) Then
|
If objos.UpdateOrdenesServiciosEstatus(cveoo, UsuarioActual.CveUsuario, CveOS) Then
|
||||||
'retornar el estatus de la OS,
|
'retornar el estatus de la OS,
|
||||||
@@ -3879,11 +3897,15 @@ Partial Class OS_OrdenesServicios
|
|||||||
Else
|
Else
|
||||||
HuboError = True
|
HuboError = True
|
||||||
End If
|
End If
|
||||||
Else
|
ElseIf resp.CveEstatus.Contiene(14) Then ' 14 - Pedido - cancelado
|
||||||
'si tiene pagos
|
If Not ObjVenta.UpdateVentasDevolucionAlmacen(1, CvePedido) Then
|
||||||
HuboError = True
|
HuboError = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
|
HuboError = True 'si tiene pagos
|
||||||
|
End If
|
||||||
|
Else
|
||||||
HuboError = True
|
HuboError = True
|
||||||
End If
|
End If
|
||||||
strMensaje.Append(resp.Mensaje)
|
strMensaje.Append(resp.Mensaje)
|
||||||
|
|||||||
Reference in New Issue
Block a user