Páginas filhas
  • CTB120OK - External appointments validation -- 115459

Entry Point: CTB120OK - External appointments validation


Scope:

Microsiga Protheus 10, Microsiga Protheus 11

Versions:

Microsiga Protheus 10, Microsiga Protheus 11

Compatible Countries:

All

Operating Systems:

All

Compatible with the Databases:

All

Languages:

Portuguese (Brazil) , Portuguese (Portugal) , Spanish , English


Description:

The entry point CTB120OK allows for validation of the entered data. It is executed when the 'OK' option is used on the external appointments recording/maintenance screen.

Source Program

CTBA120.PRW

Syntax

CTB120OK - External appointments validation ( [ nopc ] ) --> lRet

Parameters:



Name



Type



Description



Default



Mandatory



Reference



nopc



Numeric



The option number equivalent to the operation to be validated nopc 3 = Add nopc 4 = Change nopc 5 = Deletion












Return

lRet(logical)

Return value of the entry point validation

Notes

The variable 'nopc' is used to differentiate between the operations: nopc 3 = Add nopc 4 = Change nopc 5 = Deletion"  

Examples

User Function CTB120OK()Local lRet := .T.       dbSelectArea("TMP")        dbGotop()While !Eof()           if paramixb[1] == 3           if TMP->CTJ_DEBITO == TMP->CTJ_CREDIT               msgalert("The apportionments accounts cannot be the same during Add")
lRet := .F.                         End if               Elseif paramixb[1] == 4       if TMP->CTJ_DEBITO == TMP->CTJ_CREDIT               msgalert("The allocation accounts cannot be the same during change.")               lRet := .F.                         End if                     Elseif paramixb[1] == 5       if TMP->CTJ_DEBITO == TMP->CTJ_CREDIT                 msgalert("Deletions with the same account are not allowed.")              lRet := .F.                         End if                        Endif       dbSkip()                       EndDo Return lRet