rtorres Posted October 11, 2025 at 02:08 PM Report #635287 Posted October 11, 2025 at 02:08 PM Viva, Precisa de criar um script para converter multiplos dossier para compras no PHC? Pode ser em tecla de atalho ou criar um script para criar os registos directamente no sql server. Alguem já fez esta funcionalidade?
pc.cesar Posted January 16, 2026 at 11:04 AM Report #635548 Posted January 16, 2026 at 11:04 AM exemplo fornecedor 25 msel="select bo.nmdos, bo.obrano, bo.no, bo.nome, bi.ref, bi.design, bi.qtt, bi.qtt2, bi.edebito from bo (nolock) inner join bi on bi.bostamp=bo.bostamp where bo.ndos=1 and bo.fechada=0 and bo.no='25' " u_sqlexec(msel. [bo2fo]) select bo2fo sfo.newndoc(2) sfo.dointroduzir select fo replace fo.nome with bo2fo.nome replace fo.no with bo2fo.no *apagar a primeira linha para não ficar vazia select fn delete *copiar as linhas select bo2fo scan *adicionar uma nova linha em branco do foine2in *copiar os dados das linhas select fn replace fn.ref with bo2fo.ref Do Foactref with "NORMAL",.T.,"OKPRECOS" replace fn.qtt with bo2fo.qtt do foiliq do fotots endscan sfo.refresh César Faria
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now