Skip to content

Commit

Permalink
Merge PR #76 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 b3deb09 + e7d10ae commit 3f3bb67
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fields:
parser: lines
start: Adresse de Facturation
end: Total Brut HT
line: ^ +(?P<product_code>\w+) +(?P<product_name>.*) +(?P<package_name>COL|PCE|KG|KGV|LOT|UNI|PAL|SAC) +(?P<origin>(\w+)\s(\/)?) +(BIO +)?((?P<optional_package_qty>\d+) +)? +(?P<quantity>\d+(\.\d+)?) +((?P<optional_brut_price_unit>\d+\.\d+) +(?P<optional_q>-\d+ +)?(?P<optional_g>\d+ +)?(?P<optional_p>\d+ +)?(?P<optional_e>\d+ +)?)?(?P<price_unit>\d+\.\d+) +(?P<price_subtotal>\d+\.\d+) ?(?P<vat_code>1|6)
line: ^ +(?P<product_code>\w+) +(?P<product_name>.*) +(?P<package_name>COL|PCE|KG|KGV|LOT|UNI|PAL|SAC) +(?P<origin>(\w+)\s(\/)?) +((BIO|REC) +)?((?P<optional_package_qty>\d+) +)? +(?P<quantity>\d+(\.\d+)?) +((?P<optional_brut_price_unit>\d+\.\d+) +(?P<optional_q>-\d+ +)?(?P<optional_g>\d+ +)?(?P<optional_p>\d+ +)?(?P<optional_e>\d+ +)?)?(?P<price_unit>\d+\.\d+) +(?P<price_subtotal>\d+\.\d+) ?(?P<vat_code>1|6)
types:
quantity: float
price_unit: float
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,28 @@ def test_relais_vert_2_03(self):
}
],
)

def test_relais_vert_2_04(self):
self._test_supplier_template(
"relais-vert__2024-10-08__3PP__FC12061180.pdf",
line_qty=86,
expected_values={
"issuer": "Relais Vert",
"version": 2,
"date": datetime(day=8, month=10, year=2024),
"invoice_number": "FC12061180",
"amount_untaxed": 1645.37,
"amount": 1755.83,
"amount_extra_parafiscal_tax_interfel_200": 0.79,
},
expected_lines=[
{
"product_code": "CHFLRORE",
"product_name": "CHOU FLEUR ROMANESCO X 8 CONV CAT II",
"vat_code": "1",
"quantity": 1.0,
"price_unit": 25.73,
"price_subtotal": 25.73,
}
],
)

0 comments on commit 3f3bb67

Please sign in to comment.