-- mejora en relación cveventadetalle en remisión
This commit is contained in:
@@ -374,8 +374,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
'CargaEstatusOS()
|
'CargaEstatusOS()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
'PermisosSegunEstatus()
|
'PermisosSegunEstatus()
|
||||||
CargaDetalles()
|
|
||||||
CargaMateriales()
|
|
||||||
|
|
||||||
DivSeFactura.Visible = True
|
DivSeFactura.Visible = True
|
||||||
BtnGuardar.Text = "Guardar Cambios"
|
BtnGuardar.Text = "Guardar Cambios"
|
||||||
@@ -706,7 +705,8 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
CargaEventoBitacora()
|
CargaEventoBitacora()
|
||||||
CargaHistorial()
|
CargaHistorial()
|
||||||
|
CargaDetalles()
|
||||||
|
CargaMateriales()
|
||||||
|
|
||||||
If TipoEstatus.Contiene(1, 2, 3) Then
|
If TipoEstatus.Contiene(1, 2, 3) Then
|
||||||
LnkAccionesMaterialUtilizado.Visible = True
|
LnkAccionesMaterialUtilizado.Visible = True
|
||||||
@@ -3032,8 +3032,6 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ProcesoOK As Boolean = True
|
Dim ProcesoOK As Boolean = True
|
||||||
Dim ObjV As New ClsVentas
|
Dim ObjV As New ClsVentas
|
||||||
Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL())
|
Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL())
|
||||||
@@ -3041,8 +3039,6 @@ Partial Class OS_OrdenesServicios
|
|||||||
Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL())
|
Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL())
|
||||||
Dim GenrarRemisionMovimientos As Boolean = False
|
Dim GenrarRemisionMovimientos As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||||
|
|
||||||
For Each GVRow As GridViewRow In GvMU.Rows
|
For Each GVRow As GridViewRow In GvMU.Rows
|
||||||
@@ -3054,20 +3050,15 @@ Partial Class OS_OrdenesServicios
|
|||||||
Dim Serie As String = If(GVRow.DataKey("Serie") = "", "-1", GVRow.DataKey("Serie"))
|
Dim Serie As String = If(GVRow.DataKey("Serie") = "", "-1", GVRow.DataKey("Serie"))
|
||||||
Dim Lote As String = If(GVRow.DataKey("Lote") = "", "-1", GVRow.DataKey("Lote"))
|
Dim Lote As String = If(GVRow.DataKey("Lote") = "", "-1", GVRow.DataKey("Lote"))
|
||||||
Dim FechaCaducidad As DateTime = If(GVRow.DataKey("FechaCaducidad") = "", MinFecha, GVRow.DataKey("FechaCaducidad").ToDate)
|
Dim FechaCaducidad As DateTime = If(GVRow.DataKey("FechaCaducidad") = "", MinFecha, GVRow.DataKey("FechaCaducidad").ToDate)
|
||||||
|
|
||||||
If Not ObjOS.AddOrdenesServicioMateriales(CveOS, CvePS, CantidadRegistro, Serie, Lote, FechaCaducidad, UsuarioActual.CveUsuario) Then
|
If Not ObjOS.AddOrdenesServicioMateriales(CveOS, CvePS, CantidadRegistro, Serie, Lote, FechaCaducidad, UsuarioActual.CveUsuario) Then
|
||||||
Alert("Ocurrió un error al guardar el material.", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al guardar el material.", TipoMensaje.MsgAdvertencia)
|
||||||
ProcesoOK = False
|
ProcesoOK = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If ProcesoOK Then
|
If ProcesoOK Then
|
||||||
|
|
||||||
Dim CveOSEstatusFinalizada As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 4").ToEntero
|
Dim CveOSEstatusFinalizada As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 4").ToEntero
|
||||||
|
|
||||||
If CveOSEstatusFinalizada > 0 Then
|
If CveOSEstatusFinalizada > 0 Then
|
||||||
If Not ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOS) Then
|
If Not ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOS) Then
|
||||||
ProcesoOK = False
|
ProcesoOK = False
|
||||||
@@ -3144,7 +3135,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||||
|
|
||||||
If CantidadRegistro > 0 Then
|
If CantidadRegistro > 0 Then
|
||||||
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero ' DtVentaDetalle.Rows(IndexMov1)("CveVentaDetalle").ToString.ToEntero
|
Dim CveVentaDetalle As Integer = DtVentaDetalle.FiltroPrimeroValor("CveVentaDetalle", $"CveVentaDetallePadre = {GvRow.DataKey("CveVentaDetalle")}").ToEntero
|
||||||
Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||||
|
|
||||||
Dim Serie As String = GvRow.DataKey("Serie")
|
Dim Serie As String = GvRow.DataKey("Serie")
|
||||||
@@ -3225,13 +3216,9 @@ Partial Class OS_OrdenesServicios
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ProcesoOK Then
|
If ProcesoOK Then
|
||||||
|
|
||||||
ObjV.Commit()
|
ObjV.Commit()
|
||||||
|
|
||||||
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
|
||||||
Dim Liga As String = $" document.location.href=""/OS/OrdenesServicios.aspx?CveOS={CveOS}""; "
|
Dim Liga As String = $" document.location.href=""/OS/OrdenesServicios.aspx?CveOS={CveOS}""; "
|
||||||
Alert("El material utilizado se guardó correctamente", TipoMensaje.MsgInformacion, Liga)
|
Alert("El material utilizado se guardó correctamente", TipoMensaje.MsgInformacion, Liga)
|
||||||
@@ -3288,7 +3275,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
Dim Obs As String = GvRow.DataKey("Observaciones")
|
Dim Obs As String = GvRow.DataKey("Observaciones")
|
||||||
|
|
||||||
If CantidadRegistro > 0 Then
|
If CantidadRegistro > 0 Then
|
||||||
If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido) Then
|
If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido, CveVentaDetallePadre:=GvRow.DataKey("CveVentaDetalle").ToEntero) Then
|
||||||
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
|
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
|
||||||
ProcesoOK = False
|
ProcesoOK = False
|
||||||
Exit For
|
Exit For
|
||||||
|
|||||||
Reference in New Issue
Block a user