tillmo/erpnext-client

define a data model for the test data

Closed this issue · 1 comments

tillmo commented

Look at the json1 fields of the PreRechnungs and abstract them to a general json schema

Here is a sample json1 field:

{"supplier": "Kornkraft Naturkost GmbH", "posting_date": "2021-06-11", "bill_no": "877031", "total": 729.91, "grand_total": 797.92, "taxes": [{"rate": 7, "tax_amount": 41.23}, {"rate": 19, "tax_amount": 26.78}]}

Here is the start of a json schema:

{
  "title": "Intermediate format for Google AI Invoice parser",
  "required": [ "supplier", "posting_date","bill_no", "grand_total","taxes" ],
  "type": "object",
  "properties": {
    "supplier": {"type": "string" },
    "bill_no": {"type": "string" },
  ....
  }
}

This schema was added to prerechnung.py file.