Páginas filhas
  • M103CODR - Tax Withholding Code Validation

Entry Points

Description:

Entry Point M103CODR is offered only for validation / viewing whether the information found in array "aCodR" (Taxes / Withholding Codes) is correctly filled in.

Location:

The Entry Point runs when you confirm the addition of the incoming document.

Events:

Inflow Document

Source Program:

MATA103.PRX

Function:

 A103VldCodR

 Parameters:

Name

Type

Description

Required

PARAMIXB[1]

Array

Array with taxes / withholding codes

Yes

Return:

Name

Type

Description

Required

 lRet

 Logical

 .T. Continue the process and confirm addition of invoice; .F. Cancel the process, not confirming addition of invoice  

 Yes

 

Example:

#Include  'Protheus.ch'

User Function M103CODR() 

Local aCodR  :=  PARAMIXB[1]

Local nPos  :=  0 

Local lRet:=  .T.

 //User Validations.

If !Empty(aCodR)  //aCodR: Position 2 of array "Withholding Code; Position 4 of array "Tax";

     nPos  :=  aScan(  aCodR,  {|aX|  aX[4]=="IRR"})

    If nPos>0

       lRet:=  MsgYesNo  ("IRR withholding code found:"+  aCodR[nPos,2]+". Confirm it?")

   Else

      lRet:=  MsgYesNo  ("IRR withholding code not found. Confirm it?")

 EndIf

EndIf

Return  lRet