Commit bf342691 authored by Florian Duguet's avatar Florian Duguet Committed by Vincent A

[edfprofessionnel] fix documents scrapping

* price and vat are not always available
* day at first in date
* handle pre_taxe_price
parent 7ecc2109
......@@ -117,10 +117,11 @@ class AuraPage(LoggedPage, JsonPage):
obj__id = CleanText(Dict('identiteFacture/identifiant'))
obj_id = Format('%s_%s', Env('subid'), Field('_id'))
obj_price = CleanDecimal.SI(Dict('montantFacture/montantTTC'))
obj_vat = CleanDecimal.SI(Dict('taxesFacture/montantTVA'))
obj_date = Date(Dict('caracteristiquesFacture/dateLegaleFacture'))
obj_duedate = Date(Dict('caracteristiquesFacture/dateEcheanceFacture'))
obj_total_price = CleanDecimal.SI(Dict('montantFacture/montantTTC', default=NotAvailable), default=NotAvailable)
obj_pre_tax_price = CleanDecimal.SI(Dict('montantFacture/montantHT', default=NotAvailable), default=NotAvailable)
obj_vat = CleanDecimal.SI(Dict('taxesFacture/montantTVA', default=NotAvailable), default=NotAvailable)
obj_date = Date(Dict('caracteristiquesFacture/dateLegaleFacture'), dayfirst=True)
obj_duedate = Date(Dict('caracteristiquesFacture/dateEcheanceFacture'), dayfirst=True)
obj_format = 'pdf'
def obj_label(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment