-
-
Notifications
You must be signed in to change notification settings - Fork 775
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 tax management #5072
Add tax management #5072
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5072 +/- ##
==========================================
- Coverage 31.03% 30.91% -0.12%
==========================================
Files 218 218
Lines 17515 17575 +60
Branches 2404 2414 +10
==========================================
- Hits 5436 5434 -2
- Misses 11856 11918 +62
Partials 223 223
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #5072 +/- ##
=======================================
Coverage 26.79% 26.79%
=======================================
Files 293 293
Lines 27538 27538
Branches 4069 4069
=======================================
Hits 7380 7380
Misses 19890 19890
Partials 268 268 Continue to review full report at Codecov.
|
2572c6e
to
bc2c8db
Compare
2eeaddd
to
388d971
Compare
6d7935e
to
321bc83
Compare
321bc83
to
41df548
Compare
41df548
to
10612fc
Compare
Hi @thelostone-mc @octavioamu, I'm concluding this issue, right now i'm testing the env using docker and i have imported bounty from rinkeby but I would like to ask you how i can import to db some users profile info. I did it some months ago but unfortunately i did not remember how. For testing it properly in theory i should retrieve all user profile and bounties, tips, grants data from mainnet. I'm waiting to terminate the command |
b2f2ae7
to
2da7547
Compare
csv_record = [] | ||
us_workers = {} | ||
# Bounties | ||
for b in p.get_sent_bounties: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we still planning on using Earnings
instead?!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi kevin, if you want i can change it into the code without problems but it requires a little more time to make some tests. I could do it during next week.
One question: In Earning
the source_id
field correspond to id
in BountyFulfillment
, for instance in bounty case ? Because i try to compare Earning
source_id
-> BountyFulfillment
bounty_id
-> Bounty
id
and for instance the value_usd
does not seem to match between earning and bounty. Could you check it ? thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
scripts/crontab
Outdated
@@ -67,6 +67,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us | |||
#0 0 1 */3 * cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash send_quarterly_stats --live >> /var/log/gitcoin/send_quarterly_stats.log 2>&1 | |||
00 10 * * 5 cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash post_leaderboard_to_slack >> /var/log/gitcoin/post_leaderboard_to_slack.log 2>&1 | |||
0 9 * * * cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash no_applicants_email >> /var/log/gitcoin/no_applicants_email.log 2>&1 | |||
0 10 15 1 * cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash send_tax_report >> /var/log/gitcoin/send_tax_report.log 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id prefer to just send this manually instead of via cron
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok no problem, I'm going to delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
just did a pass ... code is looking good so far! |
yes please
source id == the object thats being refverenced... in the case of bountie
fulfillment its the bounty fulfillment id not the bounty id
…On Wed, Dec 18, 2019 at 12:15 PM andrea zuccarini ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In app/marketing/management/commands/send_tax_report.py
<#5072 (comment)>:
> +class Command(BaseCommand):
+
+ help = 'the tax report for last year'
+
+ def handle(self, *args, **options):
+ to_emails = []
+ zip_paths = []
+ profiles = Profile.objects.all()
+ tax_path = os.path.join(os.getcwd(), TAX_REPORT_PATH)
+ if not tax_path:
+ os.makedirs(tax_path)
+ for p in profiles:
+ csv_record = []
+ us_workers = {}
+ # Bounties
+ for b in p.get_sent_bounties:
Hi kevin, if you want i can change it into the code without problems but
it requires a little more time to make some tests. I could do it during
next week.
One question: In Earning the source_id field correspond to id in
BountyFulfillment, for instance in bounty case ? Because i try to compare
Earning source_id -> BountyFulfillment bounty_id -> Bounty id and for
instance the value_usd does not seem to match between earning and bounty.
Could you check it ? thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5072?email_source=notifications&email_token=AAD5PCJXWS4WSGNSQN6T3QTQZJZEFA5CNFSM4IPPG7H2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCPVYJ3I#discussion_r359521728>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD5PCJIWZTIWMSWJCU3DETQZJZEFANCNFSM4IPPG7HQ>
.
_________________________________________
gitcoin is live and has generated over $2.7mm for Open Source Software - see
our results <https://gitcoin.co/results>
|
Hi @owocki, |
yea the USD value will adjust depending upon price fluctuations. you want
to use bounty.value_in_usdt_then and itll stay constant
…On Thu, Dec 19, 2019 at 12:31 PM andrea zuccarini ***@***.***> wrote:
Hi @owocki <https://github.com/owocki>,
Yes i understood it, my question was little different.
In the case of bounty for instance, i followed in Earning the source_id
(bounty fulfillment id) to the corresponding bountyfulfillment record, in
this record there is bounty_id field, then i looked the record in bounty
model for this bounty_id and the value_usd does not seem to match. Maybe
i have to update the usd price with some commands.
Can you confirm that from Earning i can retrieve the correct bounty info ?
Thanks in advance.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5072?email_source=notifications&email_token=AAD5PCJPZW4I5FP63CAJR53QZPDZ5A5CNFSM4IPPG7H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHKVVCQ#issuecomment-567630474>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD5PCODVINXKST4EQFCAZ3QZPDZ5ANCNFSM4IPPG7HQ>
.
_________________________________________
gitcoin is live and has generated over $2.7mm for Open Source Software - see
our results <https://gitcoin.co/results>
|
Hi @owocki , Question: if a US worker has set only the location via UI and not the address, right now the command sets the address as |
Hi @owocki, You can test directly the command From comment above: |
yeah sure leave it empty testing now |
i get an exception when testing the mgmt command
|
app/marketing/views.py
Outdated
|
||
if request.POST: | ||
|
||
if 'preferred_payout_address' in request.POST.keys(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need all of these other settings inside of the tax settings update method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @owocki , I left them in this method because i see them in many other setting methods. I can remove this code part without problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think remove them. if its copy/pasted elsewhere then thats something that should be removed in another PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
<script> | ||
var csrftoken = jQuery("[name=csrfmiddlewaretoken]").val(); | ||
</script> | ||
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBaJ6gEXMqjw0Y7d5Ps9VvelzOOvfV6BvQ&libraries=places&callback=initPlacecomplete"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might make sense to move the API KEY somewhere else to DRY it??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, i just copied the approach used in job.html
. how would you like to do it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the api key on backend view. do you agree or you mean something different. sorry if i did not understand it.
just read through the code; excited for this :) |
Hi @owocki , |
4b6c651
to
6c93b0b
Compare
Hi @owocki , |
@PumpkingWok - thanks for the work, I've paid you out! Let me know if you got it. |
Hi there, I'm so sorry if it took so much time, it needs to be tested and maybe there could be very few fixes to do. If it is too late for this year, to calculate tax, we can keep in contact and i could refactor it for the next year, during this year. let me know. Thank you very much in any case. have a nice weekend !!! |
@frankchen07 / @owocki Do we wanna get this in now or would it make sense to get a new PR setup with all the changes (if any needed) when it's needed ? |
id love to get it in before 2021... but its not urgent before then (only to
the extent that the code might get stale and merge conflicts and
pumpkingwok might move on to other things).. i believe i've already paid
andrea
…On Mon, Apr 20, 2020 at 6:16 PM Aditya Anand M C ***@***.***> wrote:
@frankchen07 <https://github.com/frankchen07> / @owocki
<https://github.com/owocki> Do we wanna get this in now or would it make
sense to get a new PR setup with all the changes (if any needed) when it's
needed ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5072 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD5PCJGGB4XE25IXQDDEULRNTQXXANCNFSM4IPPG7HQ>
.
_________________________________________
gitcoin is live and has generated over $4.0mm for Open Source Software - see
our results <https://gitcoin.co/results>
|
Hi there, @frankchen07 already tipped me via gitcoin. |
@PumpkingWok I've resolved the conflcts but could you
|
Hi @thelostone-mc,
Also you could read more details about this issue in #4806 |
Ah gotcha ! Thanks for clarifying it |
@PumpkingWok could we try & get this in next week ? ^_^ |
Hi @thelostone-mc, |
@PumpkingWok yup! I'll add this back to review for wed deploy! |
Hi there, |
Hi @thelostone-mc, |
@PumpkingWok nah i'll squash it at my end ! Appreciate it :) |
Description
settings/tax
, the user can set own location in it, it is prepopulated with the last location registered from ip.Refers/Fixes
Fixes: #4806
Testing
I tested it locally using docker to setup the environment, i made the db migration manually.