Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to generate received payment report csv #30

Merged
merged 1 commit into from Jan 19, 2022

Conversation

kristapsk
Copy link
Member

Creates simple CSV report with actually paid invoices.

Also, thinking about potential use cases of SatSale, I would suggest adding two additional fields to the payments table in db. First, fiat currency in addition to fiat value, as it can be changed in config after first payment is done and also possibily multiple fiat currency selection could be added in future. Second, if weak hands mode is enabled, saving USDT value received might be useful for tax reporting purposes. In a lot of counries, income tax you need to pay depends on a fiat value you receive, so it changes whether you do BTC->L-USDT exchange at the moment of payment or you exchange BTC for fiat at some point in time later.

@nickfarrow
Copy link
Member

Just getting around to this, I'll have a play around with it

@kristapsk
Copy link
Member Author

Rebased

@nickfarrow
Copy link
Member

Ran it on my instance that actually has a couple payments, worked great! Ready to merge

Thoughts on starting a /scripts directory? Perhaps first of many? I could potentially put the paynym one in there too, makes more sense than /gateways.

@kristapsk
Copy link
Member Author

Thoughts on starting a /scripts directory?

I think that's good idea! Too much potentially random scripts in a root directory is not a good idea. Should I update PR?

@nickfarrow
Copy link
Member

yes please, thanks again

@kristapsk
Copy link
Member Author

Done

@nickfarrow nickfarrow merged commit d3b0e17 into SatSale:master Jan 19, 2022
@kristapsk kristapsk deleted the payment-report branch January 19, 2022 15:45
@kristapsk
Copy link
Member Author

Ehhh, and nobody re-tested it after moving to different directory. :(

$ python3.9 ./scripts/generate_payment_report.py 
Traceback (most recent call last):
  File "/home/satsale/git/SatSale/./scripts/generate_payment_report.py", line 5, in <module>
    import config
ModuleNotFoundError: No module named 'config'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants