/* * [PrepNorthDakota.java] * * Summary: One shot program to process tax data for NorthDakota. Generates code for AmericanTax.java table. * * Copyright: (c) 1999-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2010-12-14 initial version. */ package com.mindprod.americantax; import com.mindprod.csv.CSVReader; import java.io.IOException; /* NOT FINISHED. Can't find list of counties or method for City -> county home: http://www.nd.gov/tax/salesanduse/pubs/index.html download http://www.nd.gov/tax/salesanduse/pubs/guide/gl-21847.pdf northdakota.pdf ignore lodging tax on front. Export is terrible, You have to manually key sections of it and all rates. Table is out of date. Must apply various city updates. # city rate without state tax Anamoose, 1 Aneta, 1 Ashley, 1 Beach, 1 We have no county info, just cities. */ /** * One shot program to process tax data for NorthDakota. Generates code for AmericanTax.java table. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2010-12-14 initial version. * @since 2010-12-10 */ public final class PrepNorthDakota extends PrepStateBase { /** * Constructor */ private PrepNorthDakota() { super( "ND", "northdakota", 5.0, false /* counties */, true /* cities */, false /* files include state rate */, false /* convert to book case */, /* guess country rates */ 150 ); } /** * Default method to read and prepare one county record. * You must read, and add SalesTaxItem to salesTaxItems, and skipToNewLine * * @param c open CSV reader. * * @throws java.io.IOException if cannot read file */ void prepareCity( final CSVReader c ) throws IOException { final String city = c.get(); final double percent = c.getDouble(); // we don't have any county info, so we treat cities as if they were counties. c.skipToNextLine(); salesTaxItems.add( new SalesTaxItem( "", city, percent ) ); } // default count and city processors are fine. @SuppressWarnings( { "InfiniteLoopStatement" } ) public static void main( String[] args ) throws IOException { new PrepNorthDakota().prepare(); } }