Eventos de chamada do Ponto de Entrada | VEC_DESVAR := VEC_COMVEN + VEC_COMGER VEC_LUCLIQ := VEC_LUCBRU - VEC_JUREST - VEC_DESVAR - VEC_DESDEP - VEC_DESADM - VEC_DESFIX VEC_DESFIX := 0 VEC_CUSFIX := 0 VEC_DESDEP := 0 VEC_DESADM := 0 VEC_RESFIN := 0 VEC_BALOFI := "B" //Balcao VEC_DEPVEN := "" VEC_TIPTEM := "" //Gravar qdo Ordem de Servico VEC_NUMOSV := "" //Gravar qdo Ordem de Servico VEC_RESFIN := VEC_LUCLIQ - VEC_CUSFIX VEC_NUMNFI := "" VEC_VALBRU := VEC_VALVDA + VEC_VALDES VEC_VMFBRU := FG_CALCMF( \{ \{dDataBase,VEC_VALBRU\} \}) VEC_VMFVDA := VEC_VMFBRU - FG_CALCMF( \{\{dDataBase,VEC_VALDES\}\} ) VEC_VMFICM := FG_CALCMF( \{ \{FG_RTDTIMP("ICM",dDataBase),VEC_VALICM\} \}) VEC_VMFPIS := FG_CALCMF( \{ \{FG_RTDTIMP("PIS",dDataBase),VEC_VALPIS\} \}) VEC_VMFCOF := FG_CALCMF( \{ \{FG_RTDTIMP("COF",dDataBase),VEC_VALCOF\} \}) VEC_TMFIMP := VEC_VMFICM + VEC_VMFCOF + VEC_VMFPIS VEC_CMFMED := FG_CALCMF( \{ \{dDataBase,VEC_CUSMED\} \}) VEC_JMFEST := FG_CALCMF( \{ \{dDataBase,VEC_JUREST\} \}) VEC_CMFTOT := VEC_CMFMED + VEC_JMFEST VEC_LMFBRU := VEC_VMFVDA - VEC_TMFIMP - VEC_CMFTOT VEC_CMFVEN := FG_CALCMF( \{ \{FG_RTDTIMP("PIS",dDataBase),VEC_COMVEN\} \}) VEC_CMFGER := FG_CALCMF( \{ \{FG_RTDTIMP("PIS",dDataBase),VEC_COMGER\} \}) VEC_DMFVAR := VEC_CMFVEN + VEC_CMFGER VEC_LMFLIQ := VEC_LMFBRU - VEC_DMFVAR VEC_DMFFIX := 0 VEC_CMFFIX := 0 VEC_CMFDEP := 0 VEC_DMFADM := 0 VEC_RMFFIN := VEC_LMFLIQ - VEC_DMFFIX - VEC_CMFFIX - VEC_DMFDEP - VEC_DMFADM dbSelectArea("TRB") MsUnlock() If ExistBlock("OX001VEC") // Ponto de Entrada para Atualizacao dos campos referentes ao ST (VEC_ICMSST + VEC_DCLBST + VEC_COPIST) ExecBlock("OX001VEC",.f.,.f.,\{SB1->B1_COD,VEC_DATVEN,oGetPecas:aCols[oGetPecas:nAt,FG_POSVAR("VS3_CODTES","aHeaderP")],nBaseIcm,VEC_QTDITE,"TRB"\}) EndIf dbSelectArea("VS5") FG_Seek("VS5","cCodMap",1,.f.) dbSelectArea("VOQ") FG_Seek("VOQ","cCodMap",1,.f.) while !eof() .and. VOQ->VOQ_FILIAL == xFilial("VOQ") if VOQ_INDATI # "1" && Sim dbSkip() Loop Endif if VOQ_CODMAP # cCodMap Exit Endif cDescVOQ :=if(VOQ->VOQ_ANASIN#"0",Space(7)+VOQ_DESAVA,VOQ_DESAVA) aadd(aStru,\{ VS1->VS1_NUMORC,,SB1->B1_COD,VOQ_CLAAVA,cDescVOQ,VOQ_ANASIN,; VOQ_CODIGO,VOQ_SINFOR,0,0,SB1->B1_CODITE,0,0,.f.,VOQ->VOQ_PRIFAI,; VOQ->VOQ_SEGFAI,VOQ_FUNADI,VOQ_CODIMF,VS1->VS1_DATORC,0,0,VOQ_CTATOT\}) dbSkip() Enddo |
---|