This image describes the logic that the Generate Nota Fiscal Program (R76558B) uses to determine the nota fiscal type. in surrounding text.
When you run the program the system checks if the option "Electronic NF Apply" is checked. If not, then the system generates a classical nota fiscal or a Sao Paulo Nota Fiscal. If it is, then the system checks that all three of the following conditions are also applicable:
The taxpayer Classification is for a consumer. You enter this information in the Sales Order Brazilian Information program (P4210BR), in the header section.
The customer is present at the time of the transaction.You enter this information in the Sales Order Brazilian Information program (P4210BR), in the header section by selecting a value from the Presence Indicator UDC table (76B/PR) with a value of 1 in special handling code.
The state fiscal authority works with NFC-e. The states in Brazil that work with NFC-e (Electronic fiscal notes for end-consumer transactions) have a value of 1 in the Special Handling Code field, 1 indicates that the state accepts NFC-e Notas Fiscais.
If all these conditions apply, then the program generates an NFC-e. If any of these conditions is not applicable, then the program generates a National Fiscal Note.