Process script to calculate withholding and PIS/COFINS/CSLL calculation99c3132c-990c-4cb6-8554-31f1e5925ee3

06a436b5-ee79-48c7-8482-cf6c9d4a6c75

To calculate PIS/Cofins/CSLL, the system evaluates rate definitions according to the following completion priority.

For Withholding:

admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd - Enter how to get the PIS rate for withholding:
Only Nature Register.
From Product Register, or Nature Register, or parameter admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd (standard content). The first percentage filled out is considered in this priority sequence.
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd - Enter how to get the Cofins rate for withholding:
Only Nature Register.
From Product Register, Nature Register, or parameter admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd (standard content). The first percentage filled out is considered in this priority sequence.

For calculation of CSLL, configurations are considered according to the following priorities:

1. Product Register - percentages defined by field CSLL Percentage.
2. Register of Financial Natures - percentages defined for the financial nature.

If percentages referring to CSLL are zeroed in the Financial Nature Register and in the Product register as well, the CSLL will not be calculated.

For PIS/COFINS calculation:

1. Product Register - percentages established in fields COFINS Percentage and PIS Percentage.
2. Parameters - percentages defined by the parameters admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd and admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd.

See an example for calculation configuration of Cofins/PIS/CSLL:

1. Parameters:
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd - Rate for PIS withholding/calculation.
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd- Rate for COFINS withholding/calculation.
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd- Minimum value for COFINS withholding.
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd- Minimum value for PIS withholding.
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd- Minimum value for CSLL withholding.
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccdIt defines whether, in the outbound document, the deduction bills from financial taxes (IR, INSS, ISS, PIS, CSLL, Cofins) for the customer must be apportioned in installments:
T - apportion deductions in n installments
F - generate a single deduction bill for the first installment (standard content).
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd - Duties to be considered to define PIS calculation base. Content may be:
I = ICMS only - Only when there is ICMS credit. The system deducts the ICMS value to compose the PIS calculation basis.
P = IPI only - Only when there is no IPI credit. The system sums the IPI amount to compose the PIS calculation basis.
S = Both - Treatment is performed for both ICMS and IPI, according to previous contents.
N - None - PIS calculation basis is the total amount of the invoice, that is, Goods Value + Freight + Insurance + Ancillary. Expenses - Discounts - Reduction (if any).
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd - Duties to be considered to define COFINS calculation base. The configuration of this parameter follows the definition of the MV_DEDBPIS parameter.
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd - Enter how to get the PIS rate for withholding:
1 = Nature register only.
2 = From product register, class register, or from the admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd parameter (standard content). The first percentage filled out is considered in this priority sequence.
admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd - Enter how to get the Cofins rate for withholding:
1 = Nature register only.
2 = From product register, class register, or from the admin-IN-316fd0ae-5f3c-4db9-ac26-cbdf4ff8a7d1-1507579308097-69d4f855-c669-42e4-85fb-b3ee1d2c7ccd parameter (standard content). The first percentage filled out is considered in this priority sequence.
2. Product Register - Enter the percentages for COFINS, PIS or CSLL, according to the operation in the invoice, and whether the product calculates tax withholding.
Fields: Percentage Cofins, Percentage PIS, Percentage CSLL, Calculate PIS, Calculate Cofins and Calculate CSLL.
3. TIO Register - For PIS/COFINS credit/debit purposes, configure fields Calculate PIS/COFINS and Credit PIS/COFINS.
Important to stress the calculation of inflow costs, on the field Cred. PIS/COF, enter if tax is credited or debited and the field Updt. Stock the content is Yes.
4. Nature Register - Enter withholding/calculation of duties (PIS, COFINS and CSLL) in Financials environment.
Fields: Calculate Cofins, Calculate PIS, Calculate CSLL, Percentage Cofins, Percentage PIS and Percentage CSLL.

73553989-c5e8-46ed-892c-1e2246de09dcImportant

The financial nature must be entered in the customer register. For the supplier, the financial nature can be informed in the supplier register or when entering the inbound document.

5. Supplier Register - In this register, set who makes the tax withholding on inflow invoice.
Fields: Collect PIS, Collect Cofins and Collect CSLL.

Example:

If these fields are set to Yes, it means that the supplier paid all duties. Therefore, taxes will not generate bills in Financials module. In this case, configurations of financial nature and product are not checked in the system.

If these fields are configured as No, it means that the company must pay the duties. Therefore, in Financials module, bills of TX type are generated based on configuration in product and classes registers (for duty withholding) and in TIO register (for PIS/COFINS calculation), according to the number of installments defined in the payment term.

6. Customer Register - Considering registers of financial class, product and TIO, three fields of the customer register define whether PIS, COFINS and CSLL are calculated in the outflow invoice.
Fields: Calculate PIS, Calculate Cofins and Calculate CSLL.

These fields can be filled out with:

Yes - Rebate bills are generated (CF-, CS- and PI-) in favor of the customer, referring to amounts of each one of the duties, indicating that the customer will pay them.
No - Rebate bills are not generated, indicating that the customer will not pay duties.

73553989-c5e8-46ed-892c-1e2246de09dcImportant

Configurations related to PIS, COFINS and CSLL calculation, in Customer and Supplier registers, are used to calculate the withholding of such duties, not affecting their calculations.

7. Inflow Document - when registering the inflow tax document, PIS, COFINS and CSLL values are viewed on the tab Taxes. In this tax, Code, Description, Tax Calculation Base, Rate and Amount are available, where:

Code

Referring to

PIS

PIS Withholding

COF

COFINS Withholding

PS2

PIS Calculation

CF2

COFINS Calculation

CSLL  
(this information is shown if the fields  
D1_VALIMP4, D1_BASIMP4 and D1_ALQIMP4 are created)

CSLL Withholding

The implementation of PIS, COFINS and CSLL calculation already exist, but withholding of these bills were not made by the System. The withholding is performed upon creation of the fields mentioned in this document and upon the update of Protheus repository.

Taxes are withheld in inbound document and manual creation of a bill payable, depending on tax calculation parameters:

Bills Payable

When creating a bill payable, calculation and withholding occur when the financial nature indicates calculation of taxes, and there is no need the supplier collects them.

Inbound Document

In inbound document, tax is calculated through TIO and product, as described in the example. Tax is also withheld when the financial class indicates the tax calculation and the supplier is not paying it.

Note that the difference is in the calculation, not in tax withholding.

Due Dates of PIS, COFINS and CSLL Bills in Accounts Receivable

Due dates of PIS, COFINS and CSLL bills, which are generated in Accounts Receivable as rebate bills (CS-, CF- and PI-), are the same as due dates of the main bill.

Therefore, bills are correctly treated in the cash flow. It sets the tax bill record date (child bill) to the same date as the parent bill.