Reviewing EFD PIS COFINS Changes to Block D

Block D contains fiscal documents II - services ICMS/IPI taxes for freights, transportation services, inbound, and so on.

Review the changes to Block D that support the EFD PIS COFINS report:

Register Number

Field Number

Field Name

Description

D001

1

REG

D001

D001

2

IND_MOV

Indicates if the block has information in the file.

D010

1

REG

D010

D010

2

CNPJ

With establishment AN8 inform F0101.TAX. This is the Company's CNPJ Nota Fiscal.

D100

1

REG

D100

D100

2

IND_OPER

F76101B.BRNOP < 5000 "0". Otherwise, "1".

D100

3

IND_EMIT

F7611B.fdBNFS

D100

4

COD_PART

If F7601B.BNFS < 5 then F7601B.AN8V. Otherwise, F7601B.AN8.

D100

5

COD_MOD

With nota fiscal number, access F76B030.B76MOTY.

D100

6

COD_SIT

Sales Orders Classic and Sao Paolo: If F7601B.CNDJ = Blanks then 00 else 02 (Cancelled)

National Sales orders:

Access with nota fiscal to F76B12TE with B76SACT=Y, find B76NFST:

C = 02

U = 05

R = 04

The value is in the special handling code field in UDC 76B/ST.

For purchase order if F7601B.CNDJ = Blanks 08. Otherwise, 02.

D100

7

SER

If the nota fiscal is paper, then the F7601B.BSER value.

If the nota fiscal has a legal number in the F7601BTE table then the series number of it. For BRNFI-NA: Serie 3 digits from position 10, BRNFI-TE: NF Number: if length of B76ELN is equal to 13, then NF Series = Blank. If length of B76ELN is equal to 15, then NF Series = Characters 14 and 15.

If length of B76ELN is equal to 24, then NF Series = S.U. For BRNFI-SP: Blanks.

D100

9

NUM_DOC

If the nota fiscal is paper, (not in the F76B01TE table) then the F7601B.BNNF value.

If the nota fiscal is at F7601BTE and nota fiscal type = BRNFI-NA first 9 characters of B76ELN, if nota fiscal type = BRNFI-TE the first 13 characters of B76ELN, if BRNFI-SP B76ELN.

D100

11

DT_DOC

Issue Date

D100

12

DT_A_P

F7601B.ADDJ

D100

15

VL_DOC

F7601B.BVTN

D100

16

VL_DESC

F7611B.BDES

D100

17

IND_FRT

With F7601B.FRTH, access UDC 76B/FO with the F7601B.FRTH value and retrieve the second description. If description is blank or FRTH does not exist then 9.

D100

18

VL_SERV

F76101B.BRAVAL

D100

19

VL_BC_ICMS

Sum F7611B. BBCL

D100

20

VL_ICMS

Sum F7611B.BICM

D100

21

VL_NT

Blanks

D100

22

COD_INF

F7601B.BINM - Fiscal Message

D101

1

REG

D101

D101

2

IND_NAT_FRT

A) If F7601B. BNFS is > 4

a.1) Access F4201/9 and retrieve F4201.RCTO (Related Order Type) and F4201. RORN (Related order number)

a.1.1) If RCTO and RORN= Blanks, then Find Freight Mode (With F7601B.FRTH access UDC 76B|FO with F7601B.FRTH value and retrieve the second description.

a.1.1.1) If Freight mode=0(Payment by third party) then 1, if Freight mode=1 (Payment by emitter) then 0. Otherwise, 9.

a.1.2) If RCTO and RORN<> Blanks then find item and retrieve F4101. STKT- If STKT= S then 4 Else 5

B) If F7601B. BNFS is < 5

b.1) Access F4301 and retrieve F4301.RCTO (Related Order Type) and F4301. RORN (Related order number)

b.1.1) If RCTO and RORN= Blanks

Find F7611B. BCFC (Purchase Use Code) and retrieve value at UDC 76/PU, Special Handling Code, Positions 5 (PIS)

b.1.1.1)If value =1 then 2

else 3

b.1.2.) If RCTO and RORN <> Blanks find item and retrieve F4101. STKT. If STKS= S then 4. Otherwise, 5.

D101

3

VL_ITEM

F7611B. AEXP

D101

4

CST_PIS

F76B012.B76TSPIS

D101

6

VL_BC_PIS

F76B011.TDBRTXB where F76B011.TDBNNF = F7611B.FDBNNF and F76B011.TDBSER = F7611B.FDBSER and F76B011.TDN001 = F7611B.FDN001 and F76B011.TDDCT = F7611B.FDDCT and F76B011.TDLNID = F7611B.FDLNID and F76B011.TDBRTX = "05".

D101

7

ALIQ_PIS

F76B011.TDBRTXR where F76B011.TDBNNF = F7611B.FDBNNF and F76B011.TDBSER = F7611B.FDBSER and F76B011.TDN001 = F7611B.FDN001 and F76B011.TDDCT = F7611B.FDDCT and F76B011.TDLNID = F7611B.FDLNID and F76B011.TDBRTX = "05"

D101

8

VL_PIS

F76B001.THBRTXA where F76B001.THBNNF = F7601B.FHBNNF and F76B001.THBSER = F7601B.FHBSER and F76B001.THN001 = F7601B.FHN001 and F76B001.THDCT = F7601B.FHDCT and F76B001.THBRTX = "05"

D105

1

REG

D105

D105

2

IND_NAT_FRT

A) If F7601B. BNFS is > 4

a.1) Access F4201/9 and retrieve F4201.RCTO (Related Order Type) and F4201. RORN (Related order number)

a.1.1) If RCTO and RORN = Blanks then Find Freight Mode (With F7601B.FRTH access UDC 76B/FO with F7601B.FRTH value and retrieve the second description

a.1.1.1) If Freight mode = 0(Payment by third party) then 1, if Freight mode = 1 (Payment by emitter) then 0. Otherwise 9.

a.1.2) If RCTO and RORN<> Blanks then find item and retrieve F4101. STKT- If STKT= S then 4. Otherwise 5.

B) If F7601B. BNFS is < 5

b.1) Access F4301 and retrieve F4301.RCTO (Related Order Type) and F4301. RORN (Related order number)

b.1.1) If RCTO and RORN= Blanks then find F7611B. BCFC (Purchase Use Code) and retrieve value at UDC 76/PU, Special Handling Code, Positions 6 (COFI NS)

b.1.1.1) If value = 1 then 2. Otherwise, 3

b.1.2.) If RCTO and RORN <> Blanks find item and retrieve F4101. STKT. If STKS = S then 4.

Otherwise, 5.

D105

3

VL_ITEM

F7611B. AEXP

D105

4

CST_COFINS

F76B012.B76TSCOF

D105

6

VL_BC_COFINS

F76B011.TDBRTXB where F76B011.TDBNNF = F7611B.FDBNNF and F76B011.TDBSER = F7611B.FDBSER and F76B011.TDN001 = F7611B.FDN00 and F76B011.TDDCT = F7611B.FDDCT and F76B011.TDLNID = F7611B.FDLNID and F76B011.TDBRTX = "06"

D105

7

ALIQ_COFINS

F76B011.TDBRTXR where F76B011.TDBNNF = F7611B.FDBNNF and F76B011.TDBSER = F7611B.FDBSER and F76B011.TDN001 = F7611B.FDN001 and F76B011.TDDCT = F7611B.FDDCT and F76B011.TDLNID = F7611B.FDLNID and F76B011.TDBRTX = "06"

D105

8

VL_COFINS

F76B001.THBRTXA where F76B011.THBNNF = F7601B.FHBNNF and F76B011.THBSER = F7601B.FHBSER and F76B011.THN001 = F7601B.FHN001 and F76B011.THDCT = F7601B.FHDCT and F76B001.THBRTX = "06".

D111

1

REG

D111

D111

2

NUM_PROC

Select from F76B038 and F76B036 related process.

D111

3

IND_PROC

B76POI from the F76B035 table and F76B037 for the process selected before.

D500

1

REG

D500

D500

2

IND_OPER

F76101B.BRNOP <5000 "0". Otherwise, "1".

D500

3

IND_EMIT

F7611B.fdBNFS

D500

4

COD_PART

If F7601B.BNFS < 5 then F7601B.AN8V. Otherwise, F7601B.AN8.

D500

5

COD_MOD

With nota fiscal number, access F76B030.B76MOTY.

D500

6

COD_SIT

Sales Orders Classic and Sao Paolo: If F7601B.CNDJ <> Blanks =00 else 02 (Cancelled)

National Sales orders:

Access with nota fiscal to F76B12TE with B76SACT=Y, find B76NFST:

C = 02

U = 05

R = 04

The value is in the special handling code field in UDC 76B/ST.

D500

7

SER

If the nota fiscal is paper, then the F7601B.BSER.

If the nota fiscal have a legal number in the table F7601BTE then the series number of it. For BRNFI-NA: Serie 3 digits from position 10, BRNFI-TE: NF Number: if length of B76ELN is equal to 13, then NF Series = Blank. If length of B76ELN is equal to 15, then NF Series = Characters 14 and 15.

If length of B76ELN is equal to 24, then NF Series = S.U. For BRNFI-SP: Blanks.

D500

9

NUM_DOC

If the nota fiscal is paper, (not in the F76B01TE table) then the F7601B.BNNF.

If the nota fiscal is at F7601BTE and nota fiscal type = BRNFI-NA first 9 characters of B76ELN, if nota fiscal type = BRNFI-TE the first 13 characters of B76ELN, if BRNFI-SP B76ELN.

D500

10

DT_DOC

Issue Date

D500

11

DT_A_P

F7601B.ADDJ

D500

12

DT_A_P

F7601B.BVTN

D500

13

VL_DESC

F7601B.BDES

D500

14

VL_SERV

NF total amount

D500

15

VL_SERV_NT

ICMS Exempt

D500

17

VL_DA

F7601.BDFN

D500

18

VL_BC_ICMS

F7601B.BBCL

D500

19

VL_ICMS

Sum F7611B.BRAVCI

D500

20

COD_INF

F7601B.BINM - Fiscal Message

D500

21

VL_PIS

Sum F76B011.THBRTXA where F76B011.THBNNF = F7601B.FHBNNF and F76B001.THBSER = F7601B.FHBSER and F76B001.THN001 = F7601B.FHN001 and F76B001.THDCT = F7601B.FHDCT and F76B011.THBRTX = "05"

D500

22

VL_COFINS

Sum F76B011.THBRTXA where F76B011.THBNNF = F7601B.FHBNNF and F76B011.THBSER = F7601B.FHBSER and F76B011.THN001 = F7601B.FHN001 and F76B011.THDCT = F7601B.FHDCT and F76B011.THBRTX = "06"

D501

1

REG

D501

D501

2

CST_PIS

F76B012.B76TSPIS

D501

3

VL_ITEM

F7611B. AEXP

D501

5

VL_BC_PIS

Summarize F76B011.TDBRTXB where F76B011.TDBNNF = F7611B.FDBNNF and F76B011.TDBSER = F7611B.FDBSER and F76B011.TDN001 = F7611B.FDN001 and F76B011.TDDCT = F7611B.FDDCT and F76B011.TDLNID = F7611B.FDLNID and F76B011.TDBRTX = "05"

D501

6

ALIQ_PIS

F76B011.TDBRTXR where F76B011.TDBNNF = F7611B.FDBNNF and F76B011.TDBSER = F7611B.FDBSER and F76B011.TDN001 = F7611B.FDN001 and F76B011.TDDCT = F7611B.FDDCT and F76B011.TDLNID = F7611B.FDLNID and F76B011.TDBRTX = "05"

D501

7

VL_PIS

F76B001.THBRTXA where F76B001.THBNNF = F7601B.FHBNNF and F76B001.THBSER = F7601B.FHBSER and F76B001.THN001 = F7601B.FHN001 and F76B001.THDCT = F7601B.FHDCT and F76B001.THBRTX = "05"

D505

1

REG

D505

D505

2

CST_COFINS

F76B012.B76TSCOF

D505

3

VL_ITEM

F7611B. AEXP

D505

5

VL_BC_COFINS

F76B011.TDBRTXB where F76B011.TDBNNF = F7611B.FDBNNF and F76B011.TDBSER = F7611B.FDBSER and F76B011.TDN001 = F7611B.FDN001 and F76B011.TDDCT = F7611B.FDDCT and F76B011.TDLNID = F7611B.FDLNID and F76B011.TDBRTX = "06"

D505

6

ALIQ_COFINS

F76B011.TDBRTXR where F76B011.TDBNNF = F7611B.FDBNNF and F76B011.TDBSER = F7611B.FDBSER and F76B011.TDN001 = F7611B.FDN001 and F76B011.TDDCT = F7611B.FDDCT and F76B011.TDLNID =F7611B.FDLNID and F76B011.TDBRTX = "06"

D505

7

VL_COFINS

Sum F76B001.THBRTXA where F76B011.THBNNF = F7601B.FHBNNF and F76B011.THBSER = F7601B.FHBSER and F76B011.THN001 = F7601B.FHN001 and F76B011.THDCT = F7601B.FHDCT and F76B001.THBRTX = "06"

D509

1

REG

D509

D509

2

NUM_PROC

Select from F76B038 and F76B036 related process

D509

3

IND_PROC

B76POI from the F76B035 table and F76B037 for the process selected before.

D990

1

REG

D990

D990

2

QTD_LIN_D

Total of lines in block D