-
-
Notifications
You must be signed in to change notification settings - Fork 28
CAEA support #164
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
Draft
erebodino
wants to merge
61
commits into
WhyNotHugo:main
Choose a base branch
from
erebodino:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
CAEA support #164
Changes from 56 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
4e366c8
set enviroment and ignore files
erebodino fdf20c0
Caea model created
erebodino aff4096
added get_caea and consult_caea methods to TaxPayer
erebodino ce686b5
Added field generetad to Receipt to ensure compability with CAEA
erebodino 2af368f
Modified _validate method to add CAEA support, added serializers and …
erebodino 039b1ff
add field to ReceiptValidation, create CaeaCounter to store correlati…
erebodino 3284b40
reorder logic in Receipt.save()
erebodino d0cf1c0
Modified Receipt and validation model to register CAEA validation, mo…
erebodino 82fe800
Modified Receipt and validation model to register CAEA validation, mo…
erebodino ca587ea
Black formatting
erebodino fc02db2
added 2 new tests to ensure the type of insuance
erebodino ce40139
Modified logic in _validate to check if CAE or CAEA
erebodino 7f5e4d6
add pre_save to receipt, add __str__ to CaeaCounter, modify some test…
erebodino f25df0a
add method to consult and inform CAEA without movement
erebodino 4c9d26a
added test to check InformedCaea and rewrite some test with CaeaFactory
erebodino 521d3c7
Formatting of variables in docs
erebodino fd055bf
Added support for PDF generation with CAEA
erebodino 08a96c7
added tests to PDF creations
erebodino c29e0fc
Merge branch 'to-merge-1' into final-1
erebodino 4ac986a
change .gitignore and __init__
erebodino 0572768
merge all the migrations from remote-origin and local
erebodino d11f58f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d0e8e5f
Change number of POS in CAEA factory
erebodino 8b5edd9
Merge branch 'main' into main
erebodino 4e3e664
Solved errors marked by pre-commit.ci
erebodino f9db7c3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 27078ae
Added ready_to_print property on Receipt, refactor func generate_rece…
erebodino b284605
Refactor caea assignation on save for receipts, now can handle multip…
erebodino 44c3fca
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f5d2eaf
Uncomment settings.DATABASES
erebodino b0653f9
test_caea_creation_live change get(pk=1) for first()
erebodino 9c3a66c
Update django_afip/models.py
erebodino 5947663
Update django_afip/models.py
erebodino ff4ee10
Update django_afip/serializers.py
erebodino 198257a
Update django_afip/models.py
erebodino b1ecfaa
Added Unique Constraint to CAEA and refactor test
erebodino 50f6b89
Update aclarations on pdf.py, CAEA is now supported
erebodino ad53fa5
Ordering in Receipts fixed, test added to ensure that
erebodino 5c3d1a3
Fixed CaeaFactory, not CAEA in _validate
erebodino cab7ba1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] dc9fa86
Uncomment validation and receipt_validation on views
erebodino 1735e01
Rename get_cae for request_new_cae, rename consult_caea for fetch_cae…
erebodino 71f3243
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] fed9a7c
Refactor consult_caea and _inform_caea,methods moved from TaxPayer to…
erebodino bfcd5ba
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 41667dd
Refactor _validate from ReceiptQuerySet
erebodino 8c40a08
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1524dce
Added null=True to -generated- attribute from Receipt model
erebodino e542898
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 91cc5af
Rename final_date_inform attibute to report_deadline from Caea model
erebodino 2bcd233
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 4f2e04e
Moved active field of Caea to a property, create custom queryset tofi…
erebodino 1e0ccc4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c1138e6
Update django_afip/factories.py
erebodino 58ba38b
Change over ready_to_print if clause, and add some explanation
erebodino 13e4eb1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 32bc979
Deleted CaeaCounter, now the receipt_number is assigned filtering rec…
erebodino 3851a1a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 087248e
Modify caea is_active property, CaeaQueryset and tests
erebodino 7f1eff1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 578929f
Correct command for pytest on tox.ini
erebodino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,7 @@ django_afip/version.py | |
testapp/test_ticket.yaml | ||
test.csr | ||
test2.csr | ||
|
||
#Branch files | ||
Pipfile | ||
Pipfile.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Generated by Django 4.1.1 on 2022-09-06 15:02 | ||
|
||
import django.core.validators | ||
import django.db.models.deletion | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("afip", "0010_alter_authticket_service"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Caea", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"caea_code", | ||
models.BigIntegerField( | ||
help_text="CAEA code to operate offline AFIP", | ||
unique=True, | ||
validators=[ | ||
django.core.validators.RegexValidator(regex="[0-9]{14}") | ||
], | ||
), | ||
), | ||
( | ||
"period", | ||
models.IntegerField( | ||
help_text="Period to send in the CAEA request (yyyymm)" | ||
), | ||
), | ||
( | ||
"order", | ||
models.IntegerField( | ||
choices=[(1, "1"), (2, "2")], | ||
help_text="Month is divided in 1st quarter or 2nd quarter", | ||
), | ||
), | ||
("valid_since", models.DateTimeField(verbose_name="valid_to")), | ||
("expires", models.DateTimeField(verbose_name="expires")), | ||
("generated", models.DateTimeField(verbose_name="generated")), | ||
( | ||
"final_date_inform", | ||
models.DateTimeField(verbose_name="final_date_inform"), | ||
), | ||
( | ||
"service", | ||
models.CharField( | ||
help_text="Service for which this ticket has been authorized.", | ||
max_length=34, | ||
verbose_name="service", | ||
), | ||
), | ||
("active", models.BooleanField(default=False)), | ||
( | ||
"taxpayer", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="caea_tickets", | ||
to="afip.taxpayer", | ||
verbose_name="taxpayer", | ||
), | ||
), | ||
], | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 4.1.1 on 2022-09-06 15:15 | ||
|
||
import django.core.validators | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("afip", "0011_caea"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="caea", | ||
name="caea_code", | ||
field=models.BigIntegerField( | ||
help_text="CAEA code to operate offline AFIP", | ||
unique=True, | ||
validators=[ | ||
django.core.validators.RegexValidator(regex="[0-9]{14}"), | ||
django.core.validators.MinLengthValidator(14), | ||
django.core.validators.MaxLengthValidator(14), | ||
], | ||
), | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 4.1.1 on 2022-09-06 15:24 | ||
|
||
import django.core.validators | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("afip", "0012_alter_caea_caea_code"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="caea", | ||
name="caea_code", | ||
field=models.PositiveBigIntegerField( | ||
help_text="CAEA code to operate offline AFIP", | ||
unique=True, | ||
validators=[ | ||
django.core.validators.RegexValidator(regex="[0-9]{14}"), | ||
django.core.validators.MaxValueValidator(99999999999999), | ||
], | ||
), | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.1.1 on 2022-09-06 21:34 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("afip", "0013_alter_caea_caea_code"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="caea", | ||
name="service", | ||
), | ||
] |
29 changes: 29 additions & 0 deletions
29
django_afip/migrations/0015_alter_caea_expires_alter_caea_final_date_inform_and_more.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 4.1.1 on 2022-09-06 21:43 | ||
|
||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("afip", "0014_remove_caea_service"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="caea", | ||
name="expires", | ||
field=models.DateField(verbose_name="expires"), | ||
), | ||
migrations.AlterField( | ||
model_name="caea", | ||
name="final_date_inform", | ||
field=models.DateField(verbose_name="final_date_inform"), | ||
), | ||
migrations.AlterField( | ||
model_name="caea", | ||
name="valid_since", | ||
field=models.DateField(verbose_name="valid_to"), | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 4.1.1 on 2022-09-07 13:01 | ||
|
||
import django.utils.timezone | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("afip", "0015_alter_caea_expires_alter_caea_final_date_inform_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="receipt", | ||
name="generated", | ||
field=models.DateTimeField( | ||
auto_now_add=True, | ||
default=django.utils.timezone.now, | ||
verbose_name="Time when the receipt was created", | ||
), | ||
preserve_default=False, | ||
), | ||
] |
35 changes: 35 additions & 0 deletions
35
django_afip/migrations/0017_receipt_caea_receiptvalidation_caea.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Generated by Django 4.1.1 on 2022-09-08 19:18 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("afip", "0016_receipt_generated"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="receipt", | ||
name="caea", | ||
field=models.ForeignKey( | ||
blank=True, | ||
help_text="CAEA in case that the receipt must contain it", | ||
null=True, | ||
on_delete=django.db.models.deletion.PROTECT, | ||
to="afip.caea", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="receiptvalidation", | ||
name="caea", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="Indicate if the validation was from a CAEA receipt, in that case the field cae contains the CAEA number", | ||
verbose_name="is_caea", | ||
), | ||
), | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.