The project is to create an applicaiton that can take an input csv file and output a specifically formated csv file for upload into Dynamics acconting system. A new input csv file will be created each day with each line containing specific invoice detail. The columns are Invoice Number, PO Number, Invoice Date, Company ID, Vendor Name, Vendor ID, Terms, Financial Period, Primary GL Account, Additional GL Accounts, Primary GL Sub-Account, Additoanl GL Sub-Account, Total Amount, Workticket, and Task ID. Most lines will only contain Primary GL Account and Primary GL Sub Account but if the amount of the invoice is to be split between muliple GL Accounts the additional account numbers will be in the Additioanl GL Account field with the corresponding GL SubAccount in the Additional GL SubAccount field. If multiple additioanl GL Accounts and Sub Accounts the values will be seperated by a space(could have a character seperator if preferred, like a ; for example) If multiple GL Accounts there will be a corresponding Work Ticket number with a : seperating the Work Ticket number and the specific amount to apply to that number. These work tickets and amounts will equal the total amount. If only one GL account the Total amount will be applied to the work ticket number.
The output file must create a batch heading, A line 1 for every invoice which will show Invoice Number, PO Number, Invoice Date, Company ID, Vendor Name, Vendor ID, Terms, total amount and Financial Period. A line4 will follow each line 1 for every GL account, Sub Account, Work Ticket, Task ID, and unit amount.
I've attached the sample files from the previous window. Information about the ouput file.
1. The perpost field is the translation of the financial period field ie November 2010 = 201011
2. The ctrltot filed is the batch total amount for all invoices being processed ie add total amount from all line 1's
3. doctype is always VO
4. discbal is always 0
5. statusd is always A
6. cdiscdate, duedate, and paydate are determined by taking invdate and adding the terms
7. capcpny3 and cpny are always set to the company ID field
8. linetype is always N
9. all fields left blank on sample output file will be blank but need to have a place holder so the fields line up appropriately.