Páginas filhas
  • TSLFR1_DT_AF380VLIN_Valida_linha_acerto_VLR_RECUPERAVEL

Versões comparadas

Chave

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

TSLFR1_DT_AF380VLIN_Valida_linha_acerto_VLR_RECUPERAVEL

TSLFR1_DT_AF380VLIN_Valida_linha_acerto_VLR_RECUPERAVEL

Requirement Characteristics

Product Line:

Microsiga Protheus

Industry:

Services

Module:

Fixed Asset

Routine:

RoutineTechnical Name

ATFA380.PRW

Recoverable Value Adjustment
Entry Point:

AF380VLIN

Related Tickets

TSLFR1

Countries:

All

Database:

All

Tables Used:

SNI/SNJ

Operating Systems:

All

Versions/Release:

11.80

Description

The entry point AF380VLIN validates the grid row in the recoverable value adjustment routine. If the entry point returns .F., do not display the default system message and do not continue to run the process.

Entry Point

Description:

The entry point AF380VLIN validates the grid row in the recoverable value adjustment routine.

Events:

AF380VLIN

Source Program:

ATFA380.PRW

Function:

Af380GrvWz()

Return:

NameTypeDescription
lRet
 L
L
 Returns
Returns .T. or .F.

Parameter:

NameTypeDescriptionMandatory
 aHeader
aHeader
 A
A
 Grid
Grid Header
 

aCols
 aCols Grid
A

 A

Grid Rows
 

nLin
 nLin Row
N

 N

Row position

 


nOpcAuxN

3-Add

4-Edit

5-Delete

6-Export

7-Import

 


lEfetivaL.T. - Activate
.F.- Simulate

 


Example:

Image Added

Image Added Wiki MarkupExample: #Include '[<span style="color: #0000ee"><span style="text-decoration: underline; ">Protheus.ch</span></span>|http://Protheus.ch]' //Example entry point to validate row in export or import User Function AF380VLIN()Local aHeader__ := ParamIXB\[1\]Local aCols__ := ParamIXB\[2\]Local nLinAt__ := ParamIXB\[3\]Local nOpcAux__ := ParamIXB\[4\]Local lEfetiva_ := ParamIXB\[5\]Local lRet := .T.Local cQuery := ""Local aArea := GetArea() Local cAliasQry := CriaTrab(,.F.)Local nPosBem := aScan( aHeader__, \{|x| Upper( AllTrim( x\[2\] ) ) == "NJ_BEM" \} )Local nPosItBem := aScan( aHeader__, \{|x| Upper( AllTrim( x\[2\] ) ) == "NJ_ITBEM" \} ) If nOpcAux__ == 7 .And. lEfetiva_ .And. nPosBem > 0 .And. nPosItBem > 0 //import with activation has to validate whether the asset is not in a different simulationcQuery := " SELECT NI_STATUS FROM "cQuery += RetSqlName("SNI")+" SNI, "+RetSqlName("SNJ")+" SNJ "cQuery += " WHERE "cQuery += " NI_FILIAL = '"+xFilial("SNI")+"' "cQuery += " AND NI_STATUS = '1' "cQuery += " AND SNI.D_E_L_E_T_ = ' ' "cQuery += " AND NI_FILIAL = NJ_FILIAL "cQuery += " AND NI_PROC = NJ_PROC "cQuery += " AND NJ_BEM = '"+aCols__\[nLinAt__, nPosBem\]+"'"cQuery += " AND NJ_ITBEM = '"+aCols__\[nLinAt__, nPosItBem\]+"'"cQuery += " AND SNJ.D_E_L_E_T_ = ' ' " dbUseArea(.T., "TOPCONN", TcGenQry(,, cQuery ), cAliasQry, .T.,.F. )If (cAliasQry)->( !Eof() ) //if found, returns .F. to caller (cAliasQry)->( DbCloseArea() )MsgInfo("Asset: "+aCols__\[nLinAt__, nPosBem\]+"/"+aCols__\[nLinAt__, nPosItBem\]+" - found in a different simulation, file cannot be imported.")lRet := .F.EndIfEndIf RestArea(aArea)Return(lRet)   !worddavaf485e25f57cd86bb5b0fc63f3f1b1cc.png|height=32,width=32!