Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Users can go to a branch to cash in and/or cash out from account. There are also commission fees for both cash in and cash out. Only supported currency is EUR. The program accepts a path to the input file. The program outputs result to the console. Result - calculated commission fees for each operation.

NotificationsYou must be signed in to change notification settings

Yipee-ki-yay/cash-operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Users can go to a branch to cash in and/or cash out from account.There are also commission fees for both cash in and cash out. Only supported currency is EUR.

The program accepts a path to the input file. The program outputs result to the console.Result - calculated commission fees for each operation.

Input data is given in JSON file. Performed operations are given in that file. In each object following data is provided:

{"date":"2016-01-05",// operation date in format `Y-m-d`"user_id":1,// user id, integer"user_type":"natural",// user type, one of “natural”(natural person) or “juridical”(legal person)"type":"cash_in",// operation type, one of “cash_in” or “cash_out”"operation": {"amount":200,// operation amount(for example `2.12` or `3`)"currency":"EUR"// operation currency `EUR`    }}

All operations are ordered by their date ascendingly.

Full version of the test asignment ishere.

  1. In order to calculate data you should provide a path for an input file. Then run the following command:
    npm run calc
    Project already has the input.json file in the root of project.

  2. Run tests
    npm run test

About

Users can go to a branch to cash in and/or cash out from account. There are also commission fees for both cash in and cash out. Only supported currency is EUR. The program accepts a path to the input file. The program outputs result to the console. Result - calculated commission fees for each operation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp