MostraErro()
Else
lRetorno:=.T.
EndIf
Return
Aviso |
---|
|
In accounting transfer, the Execauto call for each asset must be done separately, because the automatic execution is prepared for transferring one asset type at a time. |
PHYSICAL TRANSFER
#Include 'Protheus.ch'
#Include 'Protheus.ch'
#Include 'tbiconn.ch'
User Function MyATFA060()
Local aDadosAuto := {} // Array with data to be sent by MsExecAuto() for automatic recording.
Private lMsHelpAuto := .F. // Determine whether help messages must be directed to log file
Private lMsErroAuto := .F. // Determine whether any inconsistency occurred when running the routine in relation to
//ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
//³ The example below was considered using only ledger account and cost center data. If ³
//³ needed, transmit the fields related to accounting items and value classes. ³
//ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
dDatabase := cTod("08/02/2010")
aDadosAuto:= {{'N3_CBASE' , "TRANSF " , Nil},; // Base code of asset
{'N3_ITEM' , "001 " , Nil},; // Sequential item of asset base code
{'N3_TIPO' , "10" , Nil},; // Asset Type
{'N1_FILIAL' , "D MG 02 " , Nil},; // Asset Destination Branch
{'N4_DATA' , dDatabase , Nil},; // Asset acquisition date
{'N3_CCUSTO' , " " , Nil},; // Cost Center of Expense
{'N3_CCONTAB' , "101010100 " , Nil},; // Ledger Account
{'N3_CCORREC' , " " , Nil},; // Asset Correction Account
{'N3_CDEPREC' , "201010100 " , Nil},; // Depreciation Expense Account
{'N3_CCDEPR' , "101010300 " , Nil},; // Accrued Depreciation Account
{'N3_CDESP' , " " , Nil},; // Depreciation Correction Account
{'N3_CUSTBEM' , " " , Nil},; // Cost Center of Asset Account
{'N3_CCCORR' , " " , Nil},; // Indexation Correction Cost Center
{'N3_CCDESP' , " " , Nil},; // Depreciation Expense Cost Center
{'N3_CCCDEP' , " " , Nil},; // Accrued Expense Cost Center
{'N3_CCCDES' , " " , Nil},; // Depreciation Correction Cost Center
{'N1_GRUPO' , " " , Nil},; // Asset Group Code
{'N1_LOCAL' , " " , Nil},; // Asset Location
{'N1_NFISCAL' , " " , Nil},; // Invoice Number
{'N1_NSERIE' , " " , Nil},; // Invoice Series
{'N1_TAXAPAD' , " " , Nil}} // Default Rate Code
//ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
//³ If you want to transmit values to the fields, Group, Location, Invoice/Series, Default Rate, consider ³
//³ how the example above uses the corresponding fields of table SN1. ³
//ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
//ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
// You can set the fourth parameter with the following states.
//.T. = Mirror.
//.F. = Update.
//ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
MSExecAuto({|x, y, w, z| AtfA060(x, y, w, z)},aDadosAuto, 4, aParamAuto , .F.)
If lMsErroAuto
lRetorno := .F.
MostraErro()
Else
lRetorno:=.T.
EndIf
Return