When an Outgoing Document is generated for a Sales Order that uses an advance in its Payment Condition, the System performs the following validations:
At least one advance is associated with the Sales Order
The payment is performed, and the advance is processed in the first installment of the Outgoing Document.
No advance is associated with the Sales Order
The system displays a screen that allows you to associate the advance with the Sales Order used in the Outgoing Document.
If nothing is associated, this Sales Order will not generate the Outgoing Document.
Note:
Deleting or canceling the bill paid in this process can only be done if the Outgoing Document is deleted and, if other payments exist for this bill, they can be manually deleted. Only the payment related to the Outgoing Document generation cannot be deleted or canceled by the Financial module.
To print, it is necessary to develop a printing program in AdvPl syntax used as a User Function, in which the criteria are developed for printing the outgoing documents of each company, including layout and invoice size, form, printer, and exceptions.
To issue the Outgoing Documents, TOTVS sends a file, e.g. NFEXAMP._PRX, developed for adjustments when deploying the environment in each company.
According to the Federal Senate Resolution no. 13/2012, the 4% (four percent) ICMS rate is charged in the interstate operations with foreign products and issued as of January 1st, 2013, whether in Financial and/or Tax Records modules by this Outgoing Document routine.
The following procedures are necessary:
- In the Customers File, enter a customer and, in the Person Type field, enter the state registration.
- In the Inflow/Outflow Types File, enter a TIO with the following details:
- Field Consumption Material = N – Indicates that it is not a consumption material.
- Field Calculate ICMS = S – Indicates that ICMS is calculated.
- Field Tax Stat. = 00 or = 10 or = 20 or = 70 or = 90 – Indicates that the tax must be calculated.
- In the Products File, enter a product with the following details:
- Field Person Type = 1 or = 2 or = 3 - Indicates that the product is foreign.
- Tax document issue from 01/01/2013.
For handling taxes in the Outgoing Document, check the following parameters:
MV_RTIPESP
MV_RTIPFIN
Parameter MV_RTIPESP has 6 positions considering the following structure:

The configuration of parameter MV_RTIPESP is connected to parameter MV_RTIPFIN.
Each parameter position represents the apportionment of the respective tax, where:
- 0 - respects the configuration of parameter MV_RTIPFIN;
- 1 - the financial taxes are apportioned in all installments;
- 2 - the taxes are attributed to the first installment.
Example:
When setting parameter MV_RTIPFIN to .T., and parameter MV_RTIPESP to 000000 or 111111, in the Outgoing Document, the taxes will be apportioned in all installments.
If set to 222222, the taxes will be attributed to the first installment.
When setting parameter MV_RTIPFIN to .F., and parameter MV_RTIPESP to 000000 or 222222, in the Outgoing Document, the taxes will be attributed to the first installment.
If set to 111111, they will be apportioned to all installments.
The parameters' content can be edited in all positions, for example:
Example:
Parameter MV_RTIPFIN = .T.
Parameter MV_RTIPESP = 012021
Taxes to be attributed:
- ISS: in all installments
- IRRF: in all installments
- INSS: in the first installment
- CSLL: in all installments
- COFINS: in the first installment
- PIS: in all installments
ParameterMV_RTIPFIN =.F.
Parameter MV_RTIPESP = 012021
Taxes to be attributed:
- ISS: in the first installment
- IRRF: in all installments
- INSS: in the first installment
- CSLL: in the first installment
- COFINS: in the first installment
- PIS: in all installments
610 Accounting of the outgoing document items
Tables available are the Type of inflow and outflow, product, outgoing document, and Customer or Supplier, according to the document type.
611 Accounting of purchase returns - Document apportionment items (SDE)
Tables of Incoming Document Header, Outgoing Document Header, Incoming Document Item, Outgoing Document Item, and Incoming Apportionment Item are available.
In the Configurator module, observe the content of parameter MV_OPTNFS, which indicates if offline accounting entries are prepared to use queries.
If parameter MV_OPTNFS is enabled, in the default entry 611 registration, you can use alias CTBANFE to identify the outgoing document and the aliases SF1, SD1, and SDE to account for the incoming document. This is necessary because it is not possible to associate these tables with the main accounting query.
620 Accounting of outgoing document
Customer or Supplier tables are available according to the document type.
630 Accounting of outgoing document items deletion
Tables available are the Type of inflow and outflow, product, outgoing document, and Customer or Supplier, according to the document type.
635 Accounting of outgoing document deletion.
Customer or Supplier tables are available according to the document type.
641 Account deletion of purchase return - Document apportionment items (SDE)
The positioned tables are Incoming Document Header, Outgoing Document Header, Incoming Document Item, Outgoing Document Item, and Incoming Apportionment Item.