read invoice taxes from xml
This commit is contained in:
parent
530f37a06b
commit
816687d572
1 changed files with 17 additions and 0 deletions
17
document.py
17
document.py
|
@ -526,6 +526,23 @@ class Incoming(metaclass=PoolMeta):
|
|||
if bank_accounts:
|
||||
self.parsed_data['payment']['bank'] = bank_accounts
|
||||
|
||||
# invoice-taxes
|
||||
xpath_invoice_taxes = xpath_payment + ['ram:ApplicableTradeTax']
|
||||
taxes = self._readxml_read_listdata(xmltree, xpath_invoice_taxes, [], [
|
||||
('ram:CalculatedAmount', 'amount', Decimal),
|
||||
('ram:TypeCode', 'type'),
|
||||
('ram:ExemptionReason', 'reason'),
|
||||
('ram:BasisAmount', 'base', Decimal),
|
||||
('ram:LineTotalBasisAmount', 'basetotal', Decimal),
|
||||
('ram:AllowanceChargeBasisAmount', 'feebase', Decimal),
|
||||
('ram:CategoryCode', 'category_code'),
|
||||
('ram:ExemptionReasonCode', 'reason_code'),
|
||||
('ram:TaxPointDate', 'taxdate', date),
|
||||
('ram:DueDateTypeCode', 'duecode'),
|
||||
('ram:RateApplicablePercent', 'percent', Decimal)])
|
||||
if taxes:
|
||||
self.parsed_data['payment']['taxes'] = taxes
|
||||
|
||||
def _readxml_getinvoiceline(self, invoice, line_data):
|
||||
""" create invoice line in memory
|
||||
|
||||
|
|
Loading…
Reference in a new issue