Páginas filhas
  • Collection Letter - Financials - P12

Versões comparadas

Chave

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

Collection Letter - Financials - P12

Tempo aproximado para leitura: 05 min

INDEX

...

Índice


Informações
titleNote
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.

01. OVERVIEW

This process aims to make available the sending of collection letters to customers who have overdue, maturing, or custom situations.

The routine of sending a collection letter allows the bills that are overdue or due to be duly collected through the sending of electronic (e-mail) and/or physical collection letters.
So that the letters can be generated and sent, you must first define the types of collection statuses to be considered, the period in which the collection notices lie (referring to the overdue and/or due period), and also define the content of the collection text to be presented.

The letters sent will contain the interest and fines calculated up to a predefined date (in a parameter), allowing recipients to know the updated collection value.

It is possible to send the letter with different text types, and it is also possible to supplement the validations specifically for the customers who will receive the collection letters.

A report of collections already made is available to facilitate the follow-up of sent collection letters and their respective recipients and collected bills.

02. RULES AND DEFINITIONS


Expandir
titleOperational Flow
Image Modified
Expandir
titleProcess

...

Description

Initial Parameters: The initial parameters will allow you to filter which customers, the due date range, amount, collection status, branches, bills still to fall due, and to determine the interest and fine calculation date that will be considered for sending the collection letters. It is possible to complement the filters in a customized way; to do this, an entry point (F811QRY see details in the entry points section of this document) must be implemented to allow complementing the query that will consider the default parameters.

Layout selection: You will be presented with a list of the registered collection letter layouts so that you can select which layout will be used for sending. Only one collection letter layout can be sent at a time.

Customer Selection: A list of customers who meet the filter criteria will be presented, so that they can be selected to send the collection letter. All of them will be displayed on screen as selected.

Bill selection: The selection process of the bills that will compose the collection letter follows the criteria defined and suggested in the sending of the letters.

You can also send bills that are to be due. This means adding them as a reminder, not as a dunning. They will be suggested

...

but can be removed from the letter if desired.

It is important to note that with the implementation of the Collection Status Block (see {+}http://tdn.totvs.com/pages/viewpage.action?pageId=381044073+), the bills in a collection status with block set up for the collection letters will not be available in this e-mail sending process. Therefore, they will not be listed for selection. To perform this blocking, a new standard process will be added to the existing ones, and it will be validated at each submission.

In addition, a title is eligible for sending letters as long as it still has an outstanding balance.

Expandir
titleExample of

...

Use

1 - On 03/01/2015, an email was sent with the bills below for the collection, considering due dates more than 10 days late:

Bill

...

 

...

Due date

Days in arrears

DUP

22513

01

02/1/2015

28

DUP

22221

02

01/1/2015

59

DUP

25512

01

12/15/2014

76


2 - On 03/15/2015, the customer paid the two most overdue installments, but did not pay the installment for 02/01/2015. In this way, the unpaid bill will continue to be sent in the new collection letters, with the updated number of days in arrears.

Bill

...

...

 

Due date

Days in arrears

DUP

22513

01

02/1/2015

48


We emphasize that this example considers only the due date, but that the bill must respect all the filter rules.


Layout definition

Expandir
titleLayout Definition

Routine: FINA811 - Collection Letter Layout

Each letter sent will be defined according to the collection content, that is, you can include a text of

...

certain content for different collection types.

To this end, ways of configuring the text of the letters and associating them with certain rules will be made available via registration. Only customer characteristics will be available for validation in combination with the from/to filter. If not required, it can be kept blank, so that letters can be sent to any customer.

The letters obey the filters informed in the sending routine, validating the data of the associated client, to the content of the letter. This configuration can use customized fields for its composition.

As for the listing of bills, the columns that are considered the default are below:

  • Bill key – Prefix, number, and installment
  • Due date
  • Days in arrears
  • Original Value
  • Bill balance
  • Fine
  • Interest

There will be the possibility of adding or removing new columns, as long as they are part of the bill receivable (SE1), considering that, because it is an e-mail and/or physical letter, there may be some kind of restriction on the amount of information contained in the letter/sheet.

Regardless of the shipping method selected, email, physical, or both, the letter will contain at the top the shipping data such as the customer's name and address. The address used will be the billing address contained in the customer's record. If this address is blank, the shipment will be sent to the customer's address. In the letter layout, you can set the alignment of the customer's address at the top of the letter.

  - Typing the record header where the sending method is defined, the texts (main letter, greeting and conclusion), as well as the address position (for printed letters).

Image Modified

 - In the footer, there are 2 tabs where you define the fields of the accounts receivable (table SE1) that will be shown in the letter (bill number, amount, due date, etc.), as well as the custom sending rules. In this field, you must enter an expression like the browse filters in Protheus. The Customers Table (SA1) is selected. 

Image Modified

Expandir
titleLetter

...

Submission

Routine: FINA811 - Collection Letter Submission

In order to send the letters, each step of the wizard must be answered, as explained below.

 - Wizard's initial screen

...

:

Image Modified
 - Definition of the parameters for searching and filtering the information. 

...

Image Added

  1. From customer and store (initial range of customer and store);
  2. To customer and store (final range of customer and store);
  3. From due date (initial due date range of bills);
  4. To due date (final due date range of bills);
  5. From value (initial value range of bills);
  6. To value (final value range of bills);
  7. Select branches (if set to "Yes", the default branch selection screen will appear, so that branches can be selected);
  8. Collection status (the same query already used in the "SERASA Processes" requirement will be presented, allowing one or more collection statuses to be selected. This field is validated not to be left blank when moving forward in the process);
  9. Bills due (if it is set to yes, the filter will consider the bills that are yet to be due);

...

  1. The reference date for calculating interest and fine for the bills;
  2. Consider Value (if set to "1-Total Value", the system will filter the records with content in the E1_VALUE field between the values entered in items 5 and 6 of this window. If it is set to "2-Balance", the system will filter the records with contents in the field E1_SALANCE between the values informed in items 5 and 6 of this window);
  3. Consider blocked customer? This question will validate the A1_MSBLQL customer field. If populated with YES, it will consider all customers, regardless of the status of the block field. If NO, it will consider only active customers. 


 - Selection of the letter layout (only one layout can be selected)

...

:

Image Modified


 - Customers selection

...

:

Image Modified


 - Bills selection

...

:

Image Modified


It is important to note that the selection of bills must consider the collection status block set (as mentioned above).

 - Letter submission or printing

...

:

Image Modified


 - Log query for submissions and completion of the process

...

:

Image Modified

 - Log query:

...

Image Added


 - E-mail template sent to the customer

...

:

Image Modified

Expandir
titleImportant Considerations

For each and every letter (sent or printed) a record is generated in the FWT table, which contains the layout used, the date sent, and the identification key.
All grids have the option to select or deselect all records (with the exception of the collection letter layouts grid, where only one layout can be selected).
IMPORTANT: It is a premise that the e-mail address in the client's registration is filled out for the collection to be sent, and that the Protheus e-mail sending service is configured.
At the end of the sending, a log record of the sent letter will be recorded for reporting purposes. For this purpose, the following information will be stored for each bill sent:

    • Process number - for identifying the letter sent.
    • Bill key
    • Sending date
    • Layout code

IMPORTANT: A bill can have N occurrences in this table

...

but in different processes. It may happen that a letter is sent more than once to a customer on the same date, and there will be no restriction on this

...

because during the day new documents can be posted and added to Protheus.
This data alone is enough to reproduce the e-mail with the collection sent:

    • Letter text (optional)
    • Number of bills fallen due
    • List of bills due

Bills of the following types are disregarded in the selection, in addition to the parameters entered, as they do not represent collection due amounts:

  • Temporary (PR)
  • Advance Receipts (RA)
  • Fees (TX, TXA) 
  • NCC
  • Deductions
Expandir
titleCollection

...

Letter Report

Routine: FINR811 - Collection Letters Report

The report can be run in 2 ways (detailed or summarized). In the detailed form, the complete letter is displayed, containing the texts and other details. In the summarized form, only the letters that have been sent are displayed, but without the texts, i.e. only a summary.

Besides the type of printout (detailed or summarized), the report allows the following parameterizations:

...

Image Added


 - Printout in a detailed template:

...

Image Added
There will be a page jump with each letter print, and the columns of the bills will not follow the one configured in the layout, since the report requires a fixed structure. 

 - Printout in a summarized template:

...

Image Added
Other fields from table SE1 will be available for addition to the report, considering the limitation of print area x page size.

Remember that the report template must be the same as the email sent, reassembled at the print time with the stored data.

03. PARAMETERS USED

For sending the letters by e-mail, the already existing parameters are used:

  • MV_RELSERV - Server name for sending the email.
  • MV_RELACNT - E-mail account to use for sending.
  • MV_RELPSW  - E-mail account's password;
  • MV_RELFROM - E-mail used in the FROM field when sending the e-mail;
  • MV_RELBODY - Determines the default subject for the e-mail;
  • MV_RELAUTH - Determines if the server demands authentication
  • MV_RELAUSR - Username for authentication if demanded in the e-mail server;
  • MV_RELAPSW - Password for authentication if demanded in the e-mail server.


The routines for the Collection Letter process do not create new parameters.

04. ENTRY POINTS

  • F811PAR: Entry point for initializing the private variables of the second wizard window (parameters) for sending collection letters. Available variables are:

cCliDe: Customer from

cLojaDe: Customer store from

cCliAte: Customer to

cLojaAte: Customer Store to

dDataDe: Issue Date from

dDataAte: Issue Date To

...

nValDe: Value from

nValAte: Value to

cComboFil: Select Branch ("1"=Yes ; "2" = No)

cSitCob: Select Collection Status ("1"=Yes ; "2" = No)

cComboVenc: Bill due ("1"=Yes ; "2" = No)

dDtRef: Reference date

cComboConVl: Consider Value ("1"=Yes ; "2" = No)

  • F811QRY: Entry point that allows you to supplement the query that considers the parameters entered to list available customers. This entry point is executed in the third window of the wizard (Customer Selection) for sending the collection letters.

...

  • F811MAILTO: Entry point that allows changing the variable cTo, which contains the e-mail address to which the collection letter will be sent electronically. The Entry Point receives as a parameter an array containing the following structure:


Wiki Markup
Array\[1\] = concatenated string of A1_FILIAL + A1_COD + A1_LOJA selected
Array\[2\] = Bills array
Array\[2\]\[1\] = Array of the first bill
Array\[2\]\[1\]\[1\] = Process Number of the correction letter selected in the Wizard
Array\[2\]\[1\]\[2\] = String with the value referring to the FK7_IDDOC field
Array\[2\]\[1\]\[3\] = String of E1_FILORIG 

05. TECHNICAL DATA

...


Expandir
titleDictionaries Implemented

Dictionaries Implemented
File: FWP - Collection Letter

Table

Description

Acronym

FWP

Name

Collection Letters

Mod. Ac. Branch

Exclusive

Mod. Ac. Unit

Exclusive

Mod. Ac. Company

Exclusive

Single key

FWP_FILIAL+FWP_CODCRT

Index

Key

01

FWP_FILIAL+FWP_CODCRT

Field

FWP_FILIAL

Type

Character

Size

8

Description

System Branch

Bill

Branch

Picture

@!

Field Group

033

Field Help

System Branch

Field

FWP_CODCRT

Type

Character

Size

6

Description

Layout code

Bill

Layout Code

Picture

@!

Field Help

Set the collection letter layout code.

Field

FWP_DESCRI

Type

Character

Size

40

Description

Layout description

Bill

Description

Picture

@!

Field Help

Set the collection letter layout description. This description will be displayed in the routine for sending collection letters and in the report of outgoing collection notices.

Field

FWP_STATUS

Type

Character

Size

1

Description

Layout status

Bill

Status

Picture

@!

Validation

Belong("12")

Options List

1=Active; 2=Inactive

Field Help

Defines whether the collection letter layout is active or inactive. Only active layouts can be sent on collection.

Field

FWP_TXTSAU

Type

Character

Size

60

Description

Greeting Text

Bill

Greeting

Field Help

Greeting text to be sent in the collection letter. The greeting text represents the opening of the letter. Example: "Dear customer".

Field

FWP_TXTCRT

Type

Memo

Length

500

Description

Letter text

Bill

Letter Txt

Field Help

The text entered in this field is the text that will be sent in the body of the letter containing the content of the collection.

Field

FWP_TXTCON

Type

Memo

Length

500

Description

Conclusion text

Bill

Conclusion

Field Help

The conclusion text, if informed, will be sent at the end of the letter, as a complement to the collection made or with additional information.

Field

FWP_ENVIO

Type

Character

Size

1

Description

Submission type

Bill

Subm Tp

Picture

@!

Options List

1=E-mail;2=Physical Letter;3=Both

Validation

Belong("123")

Field Help

Collection letter submission type. Options are: E-mail - the letters will be sent to the e-mail registered in the customer registration; Physical letter - the letter will be physically sent, i.e., a printed version will be sent directly to the customer; Both - the letter will be sent in both ways.

Field

FWP_POSVER

Type

Numeric

Size

4

Description

Address' vertical pos

Bill

Vertical Pos

Picture

@E 9999

Field Help

Initial vertical position for the address in pixels. This field is only enabled when the layout's submission method is set to "Physical letter" or "Both".

Field

FWP_POSHOR

Type

Numeric

Size

4

Description

Address' Horizontal P

Bill

Horizontal P

Picture

@E 9999

Field Help

Initial horizontal position for the address in pixels. This field is only enabled when the layout's submission method is set to "Physical letter" or "Both".


File: FWQ – Submission Rules 

Table

Description

Acronym

FWQ

Name

Submission Rules

Mod. Ac. Branch

Exclusive

Mod. Ac. Unit

Exclusive

Mod. Ac. Company

Exclusive

Single key

FWQ_FILIAL+FWQ_LAYOUT

Index

Key

01

FWQ_FILIAL+FWQ_LAYOUT

Field

FWQ_FILIAL

Type

Character

Size

8

Description

System Branch

Title

Branch

Picture

@!

Field Group

033

Field Help

System Branch

Field

FWQ_LAYOUT

Type

Character

Size

6

Description

Layout code

Title

Layout Cd

Picture

@!

Field Help

Code of the Collection Letter layout

Field

FWQ_FILTRA

Type

Character

Size

254

Description

Exp for additional filters

Title

Expression

Picture

@!

Field Help

Filter expression that will be used to filter the bills that can be selected for collection in the Collection Submission routine. The expression will be built based on fields from the Bills Receivable table.


File: FWS – Bills' Data 

Table

Description

Acronym

FWS

Name

Bills' Data

Mod. Ac. Branch

Exclusive

Mod. Ac. Unit

Exclusive

Mod. Ac. Company

Exclusive

Single key

FWS_FILIAL+FWS_LAYOUT+FWS_CAMPO

Index

Key

01

FWS_FILIAL+FWS_LAYOUT+FWS_SEQ+FWS_CAMPO

Field

FWS_FILIAL

Type

Character

Size

8

Description

System branch

Title

Branch

Picture

@!

Field Group

033

Field Help

System Branch

Field

FWS_LAYOUT

Type

Character

Size

6

Description

Layout code

Title

Layout Code

Picture

@!

Field Help

Layout code

Field

FWS_SEQ

Type

Character

Size

4

Description

Fields Sequence

Title

Sequence

Picture

@!

Field Help

This field stores the writing sequence for the fields that will be displayed in the letter sent by e-mail.

Field

FWS_CAMPO

Type

Character

Size

10

Description

Bill field

Title

Field

Picture

@!

Field Help

The field that will be displayed in the body of the collection letter.

Field

FWS_DESCRI

Type

Character

Size

15

Description

Field Description

Title

Description

Field Help

Description of the field that will be presented in the collection letter. If the description is blank, the field's default description will be used.


File: FWT – Letters Sent 

Table

Description

Acronym

FWT

Name

Letters Sent

Mod. Ac. Branch

Exclusive

Mod. Ac. Unit

Exclusive

Mod. Ac. Company

Exclusive

Single key

FWT_FILIAL+FWT_LAYOUT+FWT_PROCES+FWT_CHAVE

Index

Key

01

FWT_FILIAL+FWT_LAYOUT+FWT_PROCES+FWT_CHAVE

Field

FWT_LAYOUT

Type

Character

Size

6

Description

Layout code

Title

Layout Code

Picture

@!

Field Help

Layout code

Field

FWT_DTENVI

Type

Date

Size

8

Description

Sending date

Title

Sending Dt

Field Help

Sending date of the Collection Letter

Field

FWT_CHAVE

Type

Character

Size

32

Description

Document Key

Title

Key

Picture

@!

Field Help

The key of the bill that was sent in the collection letter

Field

FWT_PROCES

Type

Character

Size

32

Description

Process Number

Title

Process

Picture

@!

Field Help

The number of the process in which the collection letter was sent.

Field

FWT_DTREFE

Type

Date

Size

8

Description

Reference Date

Title

Reference Dt.

Field Help

The reference date for correcting values


Question Group (SX1): FINR810

X1_ORDEM

01

X1_PERGUNT

Collection letter from

X1_TIPO

Character

X1_TAMANHO

6

X1_GSC

Get

X1_VAR01

MV_PAR01

X1_F3

FWP

X1_HELP

This defines the initial range for the collection letter layout.

X1_ORDEM

02

X1_PERGUNT

Collection letter to

X1_TIPO

Character

X1_TAMANHO

6

X1_GSC

Get

X1_VAR01

MV_PAR02

X1_F3

FWP

X1_HELP

This defines the final range for the collection letter layout.

X1_ORDEM

03

X1_PERGUNT

Sending date from

X1_TIPO

Date

X1_TAMANHO

8

X1_GSC

Get

X1_VAR01

MV_PAR03

X1_HELP

Define the initial date of the range of collections sent.

X1_ORDEM

04

X1_PERGUNT

Sending date to

X1_TIPO

Date

X1_TAMANHO

8

X1_GSC

Get

X1_VAR01

MV_PAR04

X1_HELP

Define the final date of the range of collections sent.

X1_ORDEM

05

X1_PERGUNT

Customer from

X1_TIPO

Character

X1_TAMANHO

6

X1_GSC

Get

X1_VAR01

MV_PAR05

X1_F3

 SA1

X1_GRPSXG

001

X1_HELP

Define the initial Customer from the range.

X1_ORDEM

06

X1_PERGUNT

Store From

X1_TIPO

Character

X1_TAMANHO

2

X1_GSC

Get

X1_VAR01

MV_PAR06

X1_GRPSXG

002

X1_HELP

Define the initial store from the range.



X1_ORDEM

07

X1_PERGUNT

Customer to

X1_TIPO

Character

X1_TAMANHO

6

X1_GSC

Get

X1_VAR01

MV_PAR07

X1_F3

 SA1

X1_GRPSXG

001

X1_HELP

Define the final Customer from the range.

X1_ORDEM

08

X1_PERGUNT

Store to

X1_TIPO

Character

X1_TAMANHO

2

X1_GSC

Get

X1_VAR01

MV_PAR08

X1_GRPSXG

002

X1_HELP

Define the final store from the range.

X1_ORDEM

09

X1_PERGUNT

Print

X1_TIPO

Character

X1_TAMANHO

1

X1_GSC

Combo

X1_VAR01

MV_PAR09

X1_DEF01

Detailed

...

X1_DEF02

Summarized

X1_HELP

Defines whether the report will be printed in detailed format (with the complete letter, containing the texts and other details) or in summarized format (with only the records sent on the collection and their breaks).


      Standard Query (SXB): FWP

Description

Collection Letters

Type

Standard Query

List

FWP

Index

Code

Field

Code;Description

Return

FWP_CODCRT 

...

Expandir
titleAutomatic

...

Execution

...

For

...

the

...

correct

...

execution

...

of

...

routine

...

*FINA811{*},

...

you

...

must

...

enter

...

the

...

function

...

parameters

...

as

...

below:

...

*nOpcAuto{*} =

...

This

...

parameter

...

is

...

not

...

in

...

use

...

at

...

the

...

moment,

...

send

...

value

...

0.

...

*a811Param{*} =

...

This

...

array

...

must

...

receive

...

the

...

desired

...

filter

...

for

...

selecting

...

records

...

and

...

sending

...

the

...

collection

...

letters.

...

All

...

records

...

returned

...

by

...

the

...

filter

...

will

...

have

...

a

...

collection

...

letter

...

generated. 

...

Example:

...

a811Param

...

[01

...

]

...

:=

...

From

...

customer

...

code

...

(character

...

type)

...

a811Param

...

[02

...

]

...

:= From

...

customer

...

store

...

(character

...

type)

...

a811Param

...

[03

...

]

...

:=

...

To

...

customer

...

code

...

(character

...

type)

...

a811Param

...

[04

...

]

...

:= To

...

customer

...

store

...

(character

...

type)

...

a811Param

...

[05

...

]

...

:=

...

From

...

issue

...

date

...

(date

...

type) 

...

a811Param[06

...

]

...

:= To

...

issue

...

date

...

(date

...

type)  

...

a811Param

...

[07

...

]

...

:= Reference

...

date

...

(date

...

type) 

...

 

...

 

...

a811Param

...

[08

...

]

...

:=

...

From

...

value

...

(numeric

...

type) 

...

 

...

 

...

a811Param

...

[09

...

]

...

:=

...

To

...

value

...

(numeric

...

type) 

...

 

...

 

...

  

...

a811Param

...

[10

...

]

...

:=

...

"2"

...

(character

...

type)

...

-

...

IMPORTANT: 

...

ALWAYS

...

2

...

TO

...

PREVENT

...

DISPLAYING

...

THE

...

BRANCH

...

SELECTION

...

SCREEN

...

a811Param

...

[11

...

]

...

:=

...

Bills

...

due

...

(character

...

type,

...

"1"

...

=

...

Yes

...

or

...

"2"

...

=

...

No)

...

a811Param

...

[12

...

]

...

:=

...

Consider

...

value

...

(character

...

type,

...

"1"

...

=

...

Total

...

or 

...

"2"

...

=

...

Balance)

...

a811Param

...

[13

...

]

...

:="2" (character

...

type)

...

-

...

IMPORTANT:

...

ALWAYS

...

2

...

TO

...

PREVENT

...

DISPLAYING

...

THE

...

COLLECTION

...

STATUS

...

SELECTION

...

SCREEN

...

a811Param

...

[14

...

]

...

:=

...

{

...

}

...

(array

...

type)

...

-

...

IMPORTANT:

...

SEND

...

EMPTY

...

ARRAY

...

a811Param

...

[15

...

]

...

:=

...

""

...

(character

...

type)

...

-

...

IMPORTANT:

...

ALWAYS

...

EMPTY

...

a811Param

...

[16

...

]

...

:=

...

Letter

...

layout

...

code

...

to

...

be

...

used

...

(character

...

type) 

...

a811Param

...

[17

...

]

...

:=

...

Consider

...

blocked

...

customers

...

(A1_MSBLQL)

...

in

...

the

...

filter.

...

Content

...

"1"

...

to

...

consider

...

blocked

...

customers,

...

or

...

"2"

...

to

...

consider

...

only

...

active

...

customers