- Copy or clone the repo and run
composer install
- type or copy (change the file path)
php.exe artisan processTransaction C:/Users/myPC/Desktop/cash_transaction.csv > output.log
- output directory will be in the root folder of cashEx
- or you can run
php.exe artisan processTransaction C:/Users/myPC/Desktop/cash_transaction.csv
- it will output result on the command line
- go to root folder
- type
./vendor/bin/phpunit --testdox
- paysera lib-money :
https://github.com/paysera/lib-money
- PHP spreedsheet :
https://phpspreadsheet.readthedocs.io/en/latest/topics/reading-and-writing-to-file/
ProcessTransaction.php
: This will be called when run the command in the console.
CSVReader.php
: handles reading of CSV fileCurrencyConversion.php
: convert EUR to Other Currency(JPY,USD) and vice versaDateTime.php
: check if the date is on the same week.
CashTransactionRepository.php
: all the logic and processing methods are inside.
ConstantVar.php
: all the Constant variable for computations are here.
CashTransactionTest.php
: Will check if the commission of cash in / cash out is correct.CurrencyHelperTest.php
: Test Currency Helpers.DateTimeHelperTest.php
: Test DateTime Helpers.