set excl on  // impede acesso compartilhado


alert("oi 1")
use se_movnf
dele all for mfges<>"E"
dele all for mfnum=0
pack
close all

alert("oi 2")

use sf_fatnf
copy to fatx
dele all for fgdev<>"E"
dele all for fMODELO="NS"
PACK
close all
use sf_fatf
repl all pfdatache with pfdataemi+1 for pfdataemi=pfdatache
close all

alert("oi 3")

use se_prod
recal all
repl all pvluven3 with pvluvenda*0.67 for pvluven3=pvluvenda
repl all pvluven3 with pvluvenda*0.67 for pvluven3>pvluvenda
repl all pvluven3 with pvluvenda*0.67 for pvluven3=0
repl all peatual with 0 for pvluven3=0
close all
USE FATX
COPY TO X05 FOR COD_SIT="05"
close all
USE SF_FATNF
APPEND FROM X05
close all


alert("oi 4")

set excl off  // permite acesso compartilhado
