{"id":17972427,"url":"https://github.com/tarique-iqbal/sales-payroll","last_synced_at":"2025-04-03T22:42:07.335Z","repository":{"id":246929822,"uuid":"175470545","full_name":"tarique-iqbal/sales-payroll","owner":"tarique-iqbal","description":"Sales Payroll test","archived":false,"fork":false,"pushed_at":"2024-10-31T16:03:41.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T10:30:43.752Z","etag":null,"topics":["clean-code","dependency-container","dependency-injection","php82","pimple","solid"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarique-iqbal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-13T17:43:32.000Z","updated_at":"2024-11-28T14:15:00.000Z","dependencies_parsed_at":"2024-12-17T01:11:48.607Z","dependency_job_id":"6bd204c8-66de-41bc-9bfe-7e030cc5ce67","html_url":"https://github.com/tarique-iqbal/sales-payroll","commit_stats":null,"previous_names":["tarique-iqbal/sales-payroll"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarique-iqbal%2Fsales-payroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarique-iqbal%2Fsales-payroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarique-iqbal%2Fsales-payroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarique-iqbal%2Fsales-payroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarique-iqbal","download_url":"https://codeload.github.com/tarique-iqbal/sales-payroll/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092376,"owners_count":20882217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean-code","dependency-container","dependency-injection","php82","pimple","solid"],"created_at":"2024-10-29T16:15:41.927Z","updated_at":"2025-04-03T22:42:07.319Z","avatar_url":"https://github.com/tarique-iqbal.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sales Payroll Test\nA small command-line utility to help a fictional company determine the dates on which they need to pay salaries to their Sales Department. The company handles their Sales payroll in the following way:\n- Sales staff get a regular fixed base monthly salary, plus a monthly bonus\n- The base salaries are paid on the last day of the month, unless that day is a Saturday or a Sunday (weekend). In that case, salaries are paid before the weekend. For this application, public holidays are not taken into account.\n- On the 15th of every month bonuses are paid for the previous month, unless that day is a weekend. In that case, they are paid the first Wednesday after the 15th.\n\nThe output would be a CSV file, containing the payment dates for the next twelve months. The CSV file would contain three columns: Month Name, Salary Payment Date for that month, and Bonus Payment Date. The file name would be provided as an argument from cli command.\n\n## Prerequisites\n\n```\ncomposer\nphp (\u003e=8.2)\n```\n\n## Note\nThe application will now work if [register_argc_argv](http://php.net/manual/en/ini.core.php#ini.register-argc-argv) is disabled.\n\n## Installation and Run the script\n\n- All the `code` required to get started\n\n- Clone this repo to your local machine using\n```shell\n$ git clone https://github.com/tarique-iqbal/sales-payroll.git\n```\n\n- Need write permission to following `directories` through the PHP script\n\n`/path/to/log/directory`\n\n`/path/to/data/directory`\n\n- Install the script\n\n```shell\n$ cd /path/to/base/directory\n$ composer install --no-dev\n```\n\n- Run the script\n\n```shell\n$ php index.php --file=data.csv\nor\n$ php index.php -f=data.csv\nor\n$ php index.php data.csv\n```\n\n- Output file location\n\n`/path/to/data/directory`\n\n## Running the tests\n\n- Follow the Installation instructions.\n\nAdapt `phpunit.xml` PHP Constant according to your setup environment.\n\n```shell\n$ cd /path/to/base/directory\n$ composer update\n$ ./vendor/bin/phpunit tests\n```\n\nTest-cases, test unit and integration tests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarique-iqbal%2Fsales-payroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarique-iqbal%2Fsales-payroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarique-iqbal%2Fsales-payroll/lists"}