Páginas filhas
  • ATF010SAL - Customization of Asset Inclusion Validation



Description

Entry Point ATF010SAL allows the customization of the validation performed when including a new fixed asset. This validation checks the asset type x balance type x depreciation method.

Examples

#include "rwmake.ch"
  #include "protheus.ch"

User Function   ATF010SAL()

 Local aConfig := aClone(ParamIxb1)

/*

 Structure of original aConfig (conveyed as parameter) is an array with three positions, each as follows:


Type of Asset

Type of Balance

Depreciation Method

 

aConfig1

\     {"01|02|03|04|05|06|07|11|13" ,"1|"     ,"1|7|8|9" }

     

aConfig2

\     {"09|08" ,"1|" ,"1|" }

     

aConfig3

\     {"10|12|14|15" ,"*" ,"*" }

     

Each array position corresponds to a set of configurations with respect to the hierarchy:

      

aConfig1

1 - Asset Type

2 - Balance Type  

3 - Depreciation Method

     

aConfig2

1 - Asset Type

2 - Balance Type

3 - Depreciation Method

    

aConfig3

1 - Asset Type

2 - Balance Type

3 - Depreciation Method

 

*/   

//Suggestion of entry point implementation

//(this validation type allows ALL combination of type:  

//ASSET TYPE X BALANCE TYPE X DEPRECIATION METHOD

  

aConfig11 :=     "01|02|03|04|05|06|07|11|13"

aConfig12 := "*"  

aConfig13 := "*"

  

aConfig21     := "09|08"  

aConfig22 := "*"

aConfig23 := "*"

    

aConfig31     := "10|12|14|15"

aConfig32 := "*"  

aConfig33 := "*"

 

MsgAlert("Executed the entry point ATF010SAL") 

Return     aClone(aConfig)

Language

Portuguese(Brazil)

Versions

Microsiga Protheus 10 and Microsiga Protheus 11

Operating Systems Supported

All

Compatible with the following Databases

All

Parameters

ParamIxb - Array containing the original aConfig array in its first position, with the following structure:

Structure of original aConfig (conveyed as parameter) is an array with three positions, each as follows:


Type of Asset

Type of Balance

Depreciation Method

 aConfig1

\{"01|02|03|04|05|06|07|11|13" ,"1|" ,"1|7|8|9" }

 

aConfig2

\ {"09|08" ,"1|" ,"1|" }

 

aConfig3

\{"10|12|14|15" ,"*" ,"*" }

 

 

Each array position corresponds to a set of configurations with respect to the hierarchy:

 

aConfig1

1 - Asset Type

2 - Balance Type

3 - Depreciation Method

 

aConfig2

1 - Asset Type

2 - Balance Type

3 - Depreciation Method

 

aConfig3

1 - Asset Type

2 - Balance Type

3 - Depreciation Method


 


Return

aRet - Array containing the same structure as the original aConfig (see parameter above).

Source Program

ATFXFUN.PRX