QAD Solution
To avoid having to create a different tax usage for each item type, you can call a custom program in the fiscal receiving or shipping processes to simplify CFOP setup. The open source custom program allows a CFOP code to be generated according to the fiscal rules of each company.
You can use a hook program, gpldcfop.p, in the Fiscal Receiving line area and in legal document creation in Shipper Maintenance to call the custom program. The custom program returns a CFOP code calculated according to custom rules. The custom program has a standard code that allows input and output parameters to be passed. A blank is returned in the CFOP code output parameter. The parameters passed by the hook program are:
• input lgdd_det.oid_lgdd_det
• input lgdd_tax_usage
• input c_ZoneFrom
• input c_ZoneTo
• output lgdd_det.lgdd_cfop_code
Note: Set up the hook program in Cust Program Detail Maint (36.4.28.3).