Required to use VB script to read and manipulate the source.txt file and produce an output file in the required format (output.txt). The criteria is to capture the Ending Balance of the Account which is trailed with "-0000", for example "11100006-0000" and if the Ending balance Value is trailed by "cr", then the value should be considered as negative value. Inscription of the base account should be considered as the description for example description for the account "11100006-0000" should "MYR BANK A/C - RBS".
Source:
Beginning Balance Period Activity Ending Balance
Account Description 01/12/11 31/12/11 Adjustments Balance
--------------- ------------------------ ------------------- ------------------- ------------------- ----------- -------
11100006 MYR BANK A/C - RBS
11100006-0000 Default 2,800,000.00 .00 2,800,000.00
11100007 USD BANK A/C - RBS
11100007-0000 Default
USD 98,908.76cr .00 98,908.76cr
16120033 COST REVAL RAW MATL
16120033-0000 Default 145,912.81 .00 145,912.81
16120033-2000 General Mfg 57,539.67cr .00 57,539.67cr
16120033-B000 COMMON-SS 88,373.14cr .00 88,373.14cr
16200013 INVENTORY - WIP
16200013-0000 Default 109.36 .00 109.36
16200013-2000 General Mfg 109.36cr .00 109.36cr
16300013 INVENTORY-FINISHED GOODS
16300013-0000 Default 1,059,683.90cr .00 1,059,683.90cr
16300013-2000 General Mfg 1,059,683.90 .00 1,059,683.90
16320013 COST REVAL-FINISHED GOOD
16320013-0000 Default 400,538.47cr .00 400,538.47cr
16320013-2000 General Mfg 400,538.47 .00 400,538.47
16400017 INVENTORY-FG BUY/RESELL
16400017-0000 Default 74,030.51cr .00 74,030.51cr
16400017-3000 BUY/RESELL 74,030.51 .00 74,030.51
16420017 COST REVAL BUY/RESELL
16420017-0000 Default 144,346.58cr .00 144,346.58cr
16420017-3000 BUY/RESELL 144,346.58 .00 144,346.58
18100090 PREPAID EXPENSE-SUNDRY
18100090-0000 Default 1,111,644.46 .00 1,111,644.46
18100090-9999 CHINA OPERATION 1,115,922.50cr .00 1,115,922.50cr
18100090-A109 QA - LCS 4,521.96cr .00 4,521.96cr
18100090-D203 MAINTENANCE - COMMON 8,800.00 .00 8,800.00
Output required as:
11100006| MYR BANK A/C|2,800,000.0016300013|INVENTORY-FINISHED GOODS|-1,059,683.90
Can Someone Help Me pls???