--SMS - 2024.01.24

--En la opción de venta directa: no importa el cliente/hospital que se seleccione, la lista de precios predeterminada debe de ser la de venta directa
--Al cancelar una cirugía se debe de ver reflejado en almacén y en ordenes de servicio
This commit is contained in:
2024-01-26 16:24:36 -07:00
parent c2b5a707a1
commit 9ce9702618
5 changed files with 64 additions and 14 deletions

View File

@@ -1839,8 +1839,21 @@ Partial Class Inventarios_EntregaAlmacen
End If
ObjVentaInv.Dispose()
If TipoEstatus = 5 Or EsDevolucionVenta.Contiene(2, 3) Then
Alert("No se puede surtir esta venta, verifique que no esté cancelada o ya registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia)
Dim VerificaCancelada As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso TipoDocto = "Ped" Then
VerificaCancelada = False
End If
If VerificaCancelada Then
If TipoEstatus = 5 Then
Alert("No se puede surtir esta venta, verifique que no esté cancelada", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
If EsDevolucionVenta.Contiene(2, 3) Then
Alert("No se puede surtir esta venta, verifique que no esté registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -2739,10 +2752,12 @@ Partial Class Inventarios_EntregaAlmacen
End If
'se registra
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
ErrorMovInv = True
End If
If Not ErrorMovInv Then
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
ErrorMovInv = True
End If
End If
Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN
ErrorMovInv = Not GenerarPrePoliza(ObjInventario, ObjVentas, ObjConta, CveMovimiento, TextoError)
End If