MODCHQ - SET UP AND MAINTENANCE Ó UNCTAD – SITE (V1.15) 10.13 The syntax of Rules requires an   Endif  to follow an If .... Then  line. This rule would be inserted in the appropriate Commodity Code. Explanation: The rule first sets a temporary variable named ‘Num01’ which is the rate of import duty. Num01 IS TaxRate( "ID" ); The rule then sets a temporary variable named  ‘Num02’   which  is  the  amount  of  import  duty  as calculated by the Column taxation rule. Num02 IS TaxAmount( "ID" ); The rule then tests if the goods are using the CPC Additional code as part of the CPC. If NatProc = "001" Then If the Additional code is 001 then : Action IS UpdTax( "ID" , "1" , StatVal ,  Num01 / 2 , Num02 / 2 ); This  line  uses  the  ASYCUDA  Rules  function   ‘UpdTax(  )’    which   updates   or   provides   a   fresh calculation for the previously calculated Import Duty "ID". The updated tax figure is payable rather than guaranteed, (MOP "1"), the tax base is  ‘StatVal’,  the  rate  is  the  normal  rate  for  import  duty divided by 2, and finally, the tax is calculated as the normal import duty chargeable divided by 2. Action IS UpdTax("VAT", "1", ( ItmTotAmount – TaxAmount ( "VAT") ) + StatVal + ItmIfrNcy , 0 , 0 ); Again using the function ‘UpdTax( )’, this line updates the Value Added Tax ("VAT"), it is payable, (MOP "1"), the tax base is the calculated normal charges of ALL duties and taxes ‘ItmTotAmount’, minus the calculated VAT amount at the normal rate  ‘TaxAmount(“VAT”)’, plus ‘StatVal’ and the Item internal freight value ‘ItmIfrNcy’; the rate of tax is 0, and the tax is 0. Action IS AddAttDoc( "099" ); This line says that Attached Document code number 009 is required. This displays and prints the Attached Document Code Number ‘009’ on the SAD in Box 44. If the Additional code is not 001 the rule does not alter the normal rates for Import duty and VAT. The Endif follows and closes the If .... Then line. This rule would be inserted in the appropriate commodity codes and would apply when additional code 001 was quoted on the declaration. Example 2: Here is a more complex rule that relieves half of the Import duty and all of the Value Added Tax for goods imported under a CPC including an Additional code: Rule "INVESTMENT"; Num01 IS TaxRate(“ID”); Num02 IS TaxAmount(“ID”); If NatProc = "001" Then   Action IS UpdTax("ID","1",StatVal,Num01/2, Num02/2);   Action    IS    UpdTax("VAT","1",(ItmTotAmount-TaxAmount("VAT"))    + StatVal + ItmIfrNcy, 0, 0);   Action IS AddAttDoc("099"); Endif;