🚀 Initial commit: Versão atual do TrackSteel APP

This commit is contained in:
2026-03-18 21:17:53 +00:00
commit bde410c9ad
633 changed files with 108150 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
-- Corrigir dados existentes: definir lote padrão para materiais sem lote
UPDATE estoque_materiais
SET lote_atual = 'LOTE-001'
WHERE lote_atual IS NULL OR lote_atual = '';
-- Corrigir a regra de quantidade disponível = quantidade total - quantidade empenhada
UPDATE estoque_materiais
SET quantidade_disponivel = quantidade_total - quantidade_empenhada
WHERE quantidade_disponivel != (quantidade_total - quantidade_empenhada);
-- Garantir que não há valores negativos
UPDATE estoque_materiais
SET quantidade_disponivel = 0
WHERE quantidade_disponivel < 0;