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:

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.