AF060GAT - Trigger in the asset transfer routine

Description

An entry point that will work as a trigger in the asset transfer routine, in the target fields of accounting data of entities (Ledger Account, Cost Center, Value Class, and Accounting Item).

Examples

User Function AF060GAT()
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="935dd9e9-3dbe-41d7-9f9e-e144d878603a"><ac:plain-text-body><![CDATA[Local cCampoA   := Paramixb[1]  
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f030432a-ae5e-4926-bc74-9738700c914d"><ac:plain-text-body><![CDATA[Local cCod          :=Paramixb[2]
]]></ac:plain-text-body></ac:structured-macro>
Local aVal            :={}
 
If cCampoA == 'N3_CUSTBEM' 
                AADD(aVal,{'N3_CCCORR',cCod})
                AADD(aVal,{'N3_CCDESP',cCod})
                AADD(aVal,{'N3_CCCDEP',cCod})
                AADD(aVal,{'N3_CCCDES',cCod})
EndIF
 
Return aVal

Language

Portuguese(Brazil)

Versions

Microsiga_Protheus11

Operating Systems Supported

All

Compatible with the following Databases

All

Parameters

cCpoAtu = Current field cCodigo = Code of the accounting data.

Return

Array updated with the new information

Call events of the Entry Point

If ExistBlock("AF060GAT")
cCpoAtu := ReadVar() //The field to be updated
aValue := {} //Array
aValue := Execblock("AF060GAT",.F.,.F., { cCpoAtu, cCodigo, aVar } )

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="eb270662-7877-4dab-8156-d5390b313ec5"><ac:plain-text-body><![CDATA[

Variables

Local cCampoA:= Paramixb[1]
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6f669d8d-4380-4c2a-8771-ead207b2135d"><ac:plain-text-body><![CDATA[Local cCod:=Paramixb[2]
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="15a16830-b0a4-4609-980f-00e027419e9c"><ac:plain-text-body><![CDATA[Local aVarivel:=Paramixb[3]
]]></ac:plain-text-body></ac:structured-macro>
Local aVal:={}

Source Program

ATFA060.PRX