{"id":44315548,"url":"https://github.com/fccn/nau-financial-manager","last_synced_at":"2026-02-11T05:08:08.552Z","repository":{"id":212505795,"uuid":"672883551","full_name":"fccn/nau-financial-manager","owner":"fccn","description":"A Django Module to manage financial information on NAU ecommerce","archived":false,"fork":false,"pushed_at":"2023-12-18T10:06:45.000Z","size":497,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-12-18T11:28:11.935Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fccn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-07-31T11:38:08.000Z","updated_at":"2023-12-20T15:48:07.472Z","dependencies_parsed_at":"2023-12-20T15:48:02.916Z","dependency_job_id":null,"html_url":"https://github.com/fccn/nau-financial-manager","commit_stats":null,"previous_names":["fccn/nau-financial-manager"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/fccn/nau-financial-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccn%2Fnau-financial-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccn%2Fnau-financial-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccn%2Fnau-financial-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccn%2Fnau-financial-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fccn","download_url":"https://codeload.github.com/fccn/nau-financial-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fccn%2Fnau-financial-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29327111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T03:52:29.695Z","status":"ssl_error","status_checked_at":"2026-02-11T03:52:23.094Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-11T05:08:08.457Z","updated_at":"2026-02-11T05:08:08.540Z","avatar_url":"https://github.com/fccn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Nau Financial Manager\n\nThis is a Django application intended to manage financial process and also share revenue between partners.\n\n## Running the project\n\nWe have two ways to run the project, using docker or using poetry.\n\n## Using Docker (Recommended if you will not develop)\n\nYou will need to have docker and docker-compose installed in your machine.\n\n```bash\nmake run-docker\n```\n\nOR\n\n## Preparing enviromnent\n\nThis guide is to setup project using `poetry` with Python version 3.11.4 for the project.\noptional: you can use docker files to get instances of database and application.\n\n## Setting up `poetry`(version 1.5.1) with Python 3.11.4\n\nOne dependency of poetry is `pyenv`.\n\n### Linux (Debian based distributions)\n\n#### Install Developer Packages\n\n```bash\nsudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \\\nlibreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \\\nxz-utils tk-dev libffi-dev liblzma-dev git\n```\n\n#### Install `pyenv` (Same for Linux and Mac)\n\n```bash\ngit clone https://github.com/pyenv/pyenv.git ~/.pyenv\nif [ -n \"$ZSH_VERSION\" ]; then\n    echo 'export PATH=\"$HOME/.pyenv/bin:$PATH\"' \u003e\u003e ~/.zshrc\nelse\n    echo 'export PATH=\"$HOME/.pyenv/bin:$PATH\"' \u003e\u003e ~/.bashrc\nfi\n```\n\n#### Install `poetry` Linux\n\n```bash\ncurl -sSL https://install.python-poetry.org | python3 -\n```\n\n#### Install `poetry` MacOS\n\n```bash\nbrew install poetry\n```\n\n## Set Python version in folder the project\n\nNavigate to the folder project and execute:\n\n```bash\npyenv install 3.11.4\npyenv local 3.11.4\n```\n\n## Create and activate a virtual environment\n\n```bash\npoetry env use 3.11.4\npoetry env use -- $HOME/.pyenv/versions/3.11.4/bin/python\n\n# Activate the virtual environment\npoetry shell\n```\n\n## Run locally\n\n### for local development\n\nTo start the application outside docker, execute the next command inside a virtual environment.\nThis will start all the dependencies services on each docker container and the application directly\non the host using the development server:\n\n```bash\nmake run\n```\n\nTo start the app and its dependencies on docker, on development mode, run:\n\n```bash\nmake run-docker\n```\n\nYou have to install the app package dependencies and run the migrations.\n```bash\nmake install-packages migrate\n```\n\n### for local testing the production mode\n\nTo check if everything is ok and running using the production mode of the docker images, we have a\nwait to run the application on production mode.\nThis will use the docker target `production` of the docker application image.\n\n```bash\nDOCKER_TARGET=production make run-docker\n```\n\n## API\n\nThis project uses the Django Rest Framework using a token approach for authentication.\n\nThe important API are:\n\n- /billing/receipt-link/{transaction_id}/\n- /billing/transaction-complete/\n\nYou can view the API documentation on:\n\n- Swagger http://localhost:8000/api/docs/\n- Redocs  http://localhost:8000/api/redocs/\n\n### Generate a local token for development\n\nTo generate a token for local development you should use one of this two commands:\n\nThis will create a token for `admin` user.\n```bash\nmake create-token\n```\n\n### Generate a token for a production environment\n\n```bash\npython manage.py createsuperuser --noinput --username \u003cusername\u003e --email \u003cemail\u003e\n\npython manage.py drf_create_token \u003cusername\u003e\n```\n\n## Client\nIn Headers of request you need to declare a key 'Authorization' with the value 'Token generated_token'\n\nHere is a example:\n```bash\nheaders = { \"Authorization\": \"Token generated_token\" }\n```\n\n## Troubleshooting\n\n```bash\n# TODO: Automate this installation after validation of method and structure\n```\n\nError:\n```\norg.freedesktop.DBus.Error.UnknownMethod] ('No such interface “org.freedesktop.DBus.Properties\n```\n\nSolution:\n```bash\nexport PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring\n```\n\n\n# Django commands\n\n  ## Retry all failed transactions of SageX3\n\n  ###### How to use:\n```bash\npython manage.py retry_failed_transactions\n```\n\n  ## Export shared revenue\n\n  This command triggers the export of all the transactions splitted based on the given parameters.\n\n###### Required parameters:\n  - start_date: YYYY-MM-DD\n  - end_date: YYYY-MM-DD\n\n###### Optional parameters:\n  - product_id\n  - organization_code\n\n###### How to use:\n```bash\npython manage.py export_split_revenue  {start_date} {end_date} --product_id={product_id} --organization_code={organization_code}\n```\n\n###### Example:\n```bash\npython manage.py export_split_revenue 2023-12-01 2024-01-01\n```\n  ## Export shared revenue per organization\n\n  This command triggers the export of all the transactions splitted based on the given parameters per organization.\n\n###### Required parameters:\n  - start_date: YYYY-MM-DD\n  - end_date: YYYY-MM-DD\n  - send_file: true / false\n\n###### Optional parameters:\n  - bcc: email@email.com\n\n###### How to use:\n\nTo add more than one email as bcc, just open a string and add the emails.\n\n```bash\npython manage.py export_split_revenue_per_organizations  {start_date} {end_date} --send_email={send_email} --bcc=\"{bcc1 bcc2}\"\n```\n\n###### Example:\n```bash\npython manage.py export_split_revenue_per_organizations 2023-12-01 2024-01-01 --send_email=true --bcc=\"bcc1@email.com bcc2@email.com\"\n```\n\n## Troubleshooting\n\nTo create missing `SageX3TransactionInformation` objects that for a bug hasn't been created.\n\n```python\nfrom apps.billing.models import SageX3TransactionInformation, Transaction\ntransactions = Transaction.objects.all()\nfor t in transactions:\n    SageX3TransactionInformation.objects.get_or_create(transaction=t)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffccn%2Fnau-financial-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffccn%2Fnau-financial-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffccn%2Fnau-financial-manager/lists"}