Páginas filhas
  • Check on Bills - FINA390 - Financials - P12

Versões comparadas

Chave

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

...

Procedure automatically performed in the Checks on Bills routine (FINA390) without the display of screen - no interaction from the user required.
Used in customizations in which the process does not required user's interactions (MSEXECAUTO)Example of automatic routine Addition  Expandir origem
#Include

Bloco de código
languagejava
themeMidnight
titleExample of Automatic Routine
collapsetrue
#Include 'Protheus.ch'

...


//---------------------------------

...


// CHEQUE SOBRE TITULOS |

...


//---------------------------------

...


User Function 1DupPref()

...


Local aArray := {}

...


Local cCheque:= "2906001"

...


Local nOpc := 2 // 2 - Chq s/ titulo, 3 - Avulso

...


Private lMsErroAuto

...


aArray := { { "AUTBANCO" , "237" , NIL },;

...


{ "AUTAGENCIA" , "33901" , NIL },;

...


{ "AUTCONTA" , "125008 " , NIL },;

...


{ "AUTCHEQUE" , cCheque , NIL },;

...


{ "AUTVENCINI" , CtoD("21/06/2016"), NIL },; // Remover caso utilizar opc 3

...


{ "AUTVENCFIM" , CtoD("29/06/2016"), NIL },; // Remover caso utilizar opc 3

...


{ "AUTVALOR" , 5000 , NIL },;

...


{ "AUTFORN" , "001" , NIL },;

...


{ "AUTBENEF" , "F PADRAO ", NIL },;

...


{ "AUTNATUREZA" , "10101 " , NIL }}

...


MsExecAuto( { |x,y,z| FINA390(x,y,z)} ,0, aArray, nOpc)

...


If lMsErroAuto

...


MostraErro()

...


Else

...


Alert("O cheque "cCheque" foi gerado com sucesso!")

...


Endif
Return
Bloco de código
languagejava
themeMidnight
titleExample of

...

Automatic Routine Cancellation
collapsetrue
#Include 'Protheus.ch'

...


//---------------------------------

...


// CHEQUE SOBRE TITULOS |

...


//---------------------------------

...


User Function MyCanFA390()

...


Local aArray := {}

...


Local cCheque:= "2906001"

...


Private lMsErroAuto := .F.

...


aArray := { { "AUTBANCO" , "237" , NIL },;

...


{ "AUTAGENCIA" , "33901" , NIL },;

...


{ "AUTCONTA" , "125008 " , NIL },;

...


{ "AUTCHEQUE" , cCheque , NIL },;

...


{ "AUTCHQIMPR" , .T. , NIL }}// Identifica se deve ou não reutilizar o cheque caso impresso.

...


MsExecAuto( { |x,y,z| FINA390(x,y,z)} ,0, aArray, 5)

...


If lMsErroAuto

...


MostraErro()

...


Else

...


Alert("O cheque "cCheque" foi cancelado com sucesso!")

...


Endif

...


Return



03. OPERATIONS

  • Counter Checks 

...