Skip to content

Commit

Permalink
Merge PR #78 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
github-grap-bot committed Nov 18, 2024
2 parents 1a6dcc6 + 418d4ac commit 4eaf761
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ options:

# Move product name of the second line in the first line,
# and remove useless EAN code
- ['EAN +: +\d+ +(?P<price_unit>\d+\.\d+) +((?P<discount>-\d+(\.\d+)?%) +)?(?P<net_price_unit>\d+\.\d+) +(?P<price_subtotal>\d+\.\d+) +(?P<vat_code>\d+\.\d+)\s+(?P<product_name>.*)', '\g<product_name> \g<price_unit> \g<discount> \g<net_price_unit> \g<price_subtotal> \g<vat_code>']
- ['EAN +:( +\d+)? +(?P<price_unit>\d+\.\d+) +((?P<discount>-\d+(\.\d+)?%) +)?(?P<net_price_unit>\d+\.\d+) +(?P<price_subtotal>\d+\.\d+) +(?P<vat_code>\d+\.\d+)\s+(?P<product_name>.*)', '\g<product_name> \g<price_unit> \g<discount> \g<net_price_unit> \g<price_subtotal> \g<vat_code>']

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions grap_account_invoice_invoice2data_templates/tests/test_ecodis_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,30 @@ def test_ecodis_2_03(self):
},
],
)

def test_ecodis_2_04(self):
self._test_supplier_template(
"ecodis__2024-10-10__CHE__387499.pdf",
line_qty=19,
expected_values={
"issuer": "Ecodis",
"version": 2,
"date": datetime(day=10, month=10, year=2024),
"date_due": datetime(day=10, month=11, year=2024),
"invoice_number": "387499",
"amount_untaxed": 558.29,
"amount": 663.79,
},
expected_lines=[
{
"product_code": "AE638",
"product_name": "Recharges vrac souple pour brosse à dents",
"vat_code": "20.00",
"quantity": 2,
"quantity2": 20,
"price_unit": 0.67,
"discount": 2.5,
"price_subtotal": 26.12,
},
],
)

0 comments on commit 4eaf761

Please sign in to comment.