facho/fe/form.py(AllownaceCharge): nueva clase.
se verificar FAU10. FossilOrigin-Name: 7946a106b46aa5df111662def21bc7c94dd2e37d9b01443cf45e8145ecd798f9
This commit is contained in:
@@ -36,5 +36,32 @@ def test_invoice_legalmonetary():
|
||||
assert inv.invoice_legal_monetary_total.line_extension_amount == 100.0
|
||||
assert inv.invoice_legal_monetary_total.tax_exclusive_amount == 100.0
|
||||
assert inv.invoice_legal_monetary_total.tax_inclusive_amount == 119.0
|
||||
# TODO
|
||||
# assert inv.invoice_legal_monetary_total.charge_total_amount == 19.0
|
||||
assert inv.invoice_legal_monetary_total.charge_total_amount == 0.0
|
||||
|
||||
|
||||
def test_FAU10():
|
||||
inv = form.Invoice()
|
||||
inv.add_invoice_line(form.InvoiceLine(
|
||||
quantity = 1,
|
||||
description = 'producto facho',
|
||||
item = form.StandardItem('test', 9999),
|
||||
price = form.Price(
|
||||
amount = 100.0,
|
||||
type_code = '01',
|
||||
type = 'x'
|
||||
),
|
||||
tax = form.TaxTotal(
|
||||
subtotals = [
|
||||
form.TaxSubTotal(
|
||||
percent = 19.0,
|
||||
)
|
||||
]
|
||||
)
|
||||
))
|
||||
inv.add_allownace_charge(form.AllowanceCharge(amount=19.0))
|
||||
|
||||
inv.calculate()
|
||||
assert inv.invoice_legal_monetary_total.line_extension_amount == 100.0
|
||||
assert inv.invoice_legal_monetary_total.tax_exclusive_amount == 100.0
|
||||
assert inv.invoice_legal_monetary_total.tax_inclusive_amount == 119.0
|
||||
assert inv.invoice_legal_monetary_total.charge_total_amount == 19.0
|
||||
|
||||
Reference in New Issue
Block a user