Páginas filhas
  • AF060VLAU - Validate item selection screen in the automatic transfer

Versões comparadas

Chave

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

AF060VLAU - Validate item selection screen in the automatic transfer

Description

The entry point AF060VLAU validates the item selection screen for transfer in automatic mode at the confirmation time.

Notes

The entry point AF060VLAU triggers the screen confirmation option after the selection of items for transfer and before saving. It receives, as parameters, the data needed for the validation of the items selected.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7bb888a2-19d3-45cb-8997-2642171a0401"><ac:plain-text-body><![CDATA[

Examples

#Include "Protheus.ch"

User Function AF060VLAU()

Local aArea := GetArea()

Local lRet := .T.

 Local

 

Local cMarca := PARAMIXB[1]

Local aDados := PARAMIXB[2]

Local dDataBase := PARAMIXB[3]

Local cFilDest := PARAMIXB[4]

 Local

 

Local cFilOrig := PARAMIXB[5]

Local cFiltro := PARAMIXB[6]

If cFilDest <>

cFilOrigAlert

cFilOrig

Alert("Cannot transfer to this branch.")

lRet := .F.

EndIf

 If lRet  DbSelectArea

 

If lRet  

DbSelectArea("SN3")SN3->(DbSetOrder(1))

SN3->

SN3→(MsSeek(xFilial("SN3")+aDados[1]+aDados[2],.T.))

While SN3->(!Eof()) .And. xFilial("SN3") == SN3->N3_FILIAL .And. SN3->N3_CBASE <= aDados[3] .And. SN3->N3_ITEM <= aDados[4]

 If

 

If Empty(cFiltro) .Or. &(cFiltro)

If SN3->N3_OK == cMarca .And.

SN3->N3_TIPO == "01"

Alert("Cannot transfer item with Type 01.")

lRet := .F.

 Exit  EndifEndif  SN3

 

Exit  

Endif

Endif  

SN3->(DbSkip())

 EndDo EndIf RestArea

EndDo

EndIf

RestArea(aArea)

Return

lRet

lRet

]]></ac:plain-text-body></ac:structured-macro>

Language

Portuguese(Brazil)

Versions

Microsiga_Protheus10

Operating Systems Supported

All

Compatible with the following Databases

All

Parameters

cMarca,

{cBaseI,cItemI,cBaseF,cItemF},dDataBAse,cFilDest,cFilOrig,cExpFiltro

Return

.F. (Not valid) Or .T. (Valid)

Call events of the Entry Point

EnchoiceBar(oDlg1,IIF(AF060VLAUTO(cExpFiltro),(nOpca := 1,oDlg1:End()),)

Static Function AF060VLAUTO(cExpFiltro)

Local lAF060VLAU := ExistBlock("AF060VLAU")

If

lAF060VLAUlRet

lAF060VLAU

lRet := ExecBlock("AF060VLAU",.F.,.F.,cMarca {cBaseI,cItemI,cBaseF,cItemF},dDataBAse,cFilDest,cFilOrig,cExpFiltro)

EndIf

 Return

 

Return

lRet

Source Program

ATFA060.PRW