Note
This routine was adjusted to comply with the General Personal Data Protection Law (Statute No. 13.70), so that some fields containing data regarded as sensitive and/or personal are blurred, becoming illegible.
This routine enables a company to transfer clients debts (bills receivable) between company's branches and/or other clients. This resource specially supplies the transportation segment. A company is able to register its debits for branches which originated the bills from Accounts Receivable.
A checklist , defined in table AA - Checklist for Debit Transfer, in the Configurator module, is available for the company to define whether the collection must be transferred. However, if you need to add checking options to the checklist, the AA table can be changed in the Configurator module. Then, it is only allowed to add the request if all questions from the checklist are answered with Yes (marked with an X).
Table SE6 - Transfer Requests stores all transfer information, where each request is saved with a sequential number. Request
The field Dest. Installment stores the installment of the bill generated in destination branch (debit) through routine Transfer of Bills Receivable Among Branches, saving and validating such code.
To confirm the transfer, the destination branch may accept or reject the request through the Request Approval/Rejection routine.
Hint:
The field Debit Branch saves the bill debit branch (in customization) through the Transport Management module (original system). This field is the reference to select transfer requests, since it indicates, on a shared Accounts Receivable database, which is the debit branch.
Information
The system does not allow transfer request when:
To request a transfer:
Important: A transfer request can only be added if all checklist questions have been answered with Yes (checked with an X). |
The routine has two ways of using the automatic routine, one by calling the Fa620Auto function, the other via execauto.
By calling the Fa620Auto function, you can request inter-branch transfers, and via execauto you can change the customer as well.
Example of using the automatic routine by the Fa620Auto function:
User Function FINA620AUTO( ) LOCAL nRecSe1 := 18 //Main bill Recno LOCAL cfilDest := "02" //Destination branch LOCAL cHist := "Transfer Test" //Transfer history LOCAL lAprov := .T. //Runs the transfer approval automatically LOCAL lMsgErro := .T. //Displays error message "Mostraerro( )". PRIVATE lMsErroAuto := .F. Fa620Auto(nRecSe1,cfilDest,cHist, lAprov, lMsgErro) If lMsErroAuto MostraErro( ) Else Alert("Bill transferred successfully") Endif Return
Example of using the automatic routine by execauto:
User function ExFin620() Local cE1_Pref := " " Local cE1_Num := "00102031 " Local cE1_Cliente := "000001" Local cE1_Loja := "01" Local cFilSE1 := "D MG 01 " Local cFilDest := "D MG 01 " Local aCab := {} Private lMsErroAuto := .F. RPCSETENV("T1", "D MG 01", "teste", "123", "FIN", "FINA620") If SE1->( dbSeek( cFilSE1+cE1_Pref+cE1_Num+" "+"NF")) aadd(aCab, {"E6_FILDEB",cFilDest}) aadd(aCab, {"E6_CLIENTE",cE1_Cliente}) aadd(aCab, {"E6_LOJA",cE1_Loja}) aadd(aCab, {"AUTHISTDEB","Teste"}) //Adding Transfer Request MSExecAuto({|a, b| FINA620(a,b)}, aCab,3) If lMsErroAuto mostraerro() Else MsgStop("Process successful.") EndIf Else MsgStop("Bill not found.") EndIf Return