Skip to content

Commit

Permalink
[fix] df ie validation and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiago370 committed Dec 9, 2024
1 parent a0cd735 commit 33848dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/erpbrasil/base/fiscal/ie.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"df": {
"tam": 13,
"val_tam": 11,
"starts_with": "07",
"format": lambda x: "{0}-{1}.{2}/{3}-{4}".format(
"format": lambda x: "{0}.{1}.{2}/{3}-{4}".format(
x[:2], x[2:5], x[5:8], x[8:11], x[11:13]
),
},
Expand Down
14 changes: 8 additions & 6 deletions tests/test_fiscal_ie_formata.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"0744409300183",
"0748774800134",
"0747987900103",
"0824761500136",
],
"es": [
"082376123",
Expand Down Expand Up @@ -210,12 +211,13 @@
"06.910859-5",
],
"df": [
"07-327.099/001-74",
"07-305.627/001-76",
"07-515.044/001-68",
"07-444.093/001-83",
"07-487.748/001-34",
"07-479.879/001-03",
"07.327.099/001-74",
"07.305.627/001-76",
"07.515.044/001-68",
"07.444.093/001-83",
"07.487.748/001-34",
"07.479.879/001-03",
"08.247.615/001-36",
],
"es": [
"082.376.12-3",
Expand Down
2 changes: 2 additions & 0 deletions tests/test_fiscal_ie_validar.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"0748774800131",
"0747987900101",
"07479879001010",
"0824761500137",
],
"es": [
"082376121",
Expand Down Expand Up @@ -279,6 +280,7 @@
"0744409300183",
"0748774800134",
"0747987900103",
"0824761500136",
],
"es": [
"082376123",
Expand Down

0 comments on commit 33848dd

Please sign in to comment.