Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
languagevb
themeMidnight
firstline1
titleCBRQEESPIMG01(ADVPL)
linenumberstrue
#include "PROTHEUS.ch"

User Function IMG01()

    Local nX        := 0
    Local nqtde 	:= If(len(paramixb) >= 1,paramixb[ 1],NIL)
    Local cCodSep 	:= If(len(paramixb) >= 2,paramixb[ 2],NIL)
    Local cCodID 	:= If(len(paramixb) >= 3,paramixb[ 3],NIL)
    Local nCopias	:= If(len(paramixb) >= 4,paramixb[ 4],0)
    Local cNFEnt  	:= If(len(paramixb) >= 5,paramixb[ 5],NIL)
    Local cSeriee   := If(len(paramixb) >= 6,paramixb[ 6],NIL)
    Local cFornec   := If(len(paramixb) >= 7,paramixb[ 7],NIL)
    Local cLojafo   := If(len(paramixb) >= 8,paramixb[ 8],NIL)
    Local cArmazem  := If(len(paramixb) >= 9,paramixb[ 9],NIL)
    Local cOP       := If(len(paramixb) >=10,paramixb[10],NIL)
    Local cNumSeq   := If(len(paramixb) >=11,paramixb[11],NIL)
    Local cLote     := If(len(paramixb) >=12,paramixb[12],NIL)
    Local cSLote    := If(len(paramixb) >=13,paramixb[13],NIL)
    Local cCC  	    := If(len(paramixb) >=15,paramixb[15],NIL)
    Local cLocOri   := If(len(paramixb) >=16,paramixb[16],NIL)
    Local nResto    := If(len(paramixb) >=22,paramixb[22],0)

    If nResto > 0 
        nCopias++
    EndIf

    For nX := 1 to nCopias
        If cCodID#NIL
            CBRetEti(cCodID)
            nqtde 	    := CB0->CB0_QTDE
            cCodSep     := CB0->CB0_USUARI
            cNFEnt      := CB0->CB0_NFENT
            cSeriee     := CB0->CB0_SERIEE
            cFornec     := CB0->CB0_FORNEC
            cLojafo     := CB0->CB0_LOJAFO
            cArmazem    := CB0->CB0_LOCAL
            cOP         := CB0->CB0_OP
            cNumSeq     := CB0->CB0_NUMSEQ
            cLote       := CB0->CB0_LOTE
            cSLote      := CB0->CB0_SLOTE
            cCC         := CB0->CB0_CC
            cLocOri     := CB0->CB0_LOCORI
        EndIf
    Next

    FWAlertWarning(nqtde)

return

...