facho/fe/form.py(Invoice): adiciona prepaid_payment.
FossilOrigin-Name: feceabdbddaa65c5c767ae46cc79f7d7c158e9ffa01c3f0d507a02caef8ac33c
This commit is contained in:
@@ -65,3 +65,29 @@ def test_FAU10():
|
||||
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
|
||||
|
||||
|
||||
def test_FAU14():
|
||||
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.add_prepaid_payment(form.PrePaidPayment(paid_amount = 50.0))
|
||||
inv.calculate()
|
||||
|
||||
assert inv.invoice_legal_monetary_total.payable_amount == 119.0 + 19.0 - 50.0
|
||||
|
||||
Reference in New Issue
Block a user