-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect documentation for required_fields
option
#577
Comments
Which section are you referring to? It is listed as "optional'. In the section of simple invoice template there is an example.
Since it is used in templates already. The code does not have to be changed. #576 Includes documentation improvements. Do you have any suggestions, how it could be improved? |
I am referring to the Options section (under Template Structure). The example you give does not use issuer: Microsoft Regional Sales Corporation
keywords:
- Microsoft
- M9-0002526-N
exclude_keywords:
- Already\s+paid
- Do not pay
fields:
amount: GrandTotal(\d+\.\d+)HKD
date: DocumentDate:(\d{1,2}\/\d{1,2}\/\d{4})
invoice_number: InvoiceNo.:(\w+)
options:
remove_whitespace: true
currency: HKD
required_fields:
- invoice_number However, I can't get it to work like this. Instead, the correct version seems to be: issuer: Microsoft Regional Sales Corporation
keywords:
- Microsoft
- M9-0002526-N
exclude_keywords:
- Already\s+paid
- Do not pay
fields:
amount: GrandTotal(\d+\.\d+)HKD
date: DocumentDate:(\d{1,2}\/\d{1,2}\/\d{4})
invoice_number: InvoiceNo.:(\w+)
options:
remove_whitespace: true
currency: HKD
required_fields:
- invoice_number To reflect this, I think the info about required fields should be in its own section and not under Options. Or at least it should be clarified that it is not be nested under |
In TUTORIAL.md,
required_fields
is listed as an option, nested below theoptions
key. I couldn't get this to work so I looked into the code and it seemsrequired_fields
should actually be at the same level asoptions
. Is the documentation erroneous or should the code be changed to match what the docs say?The text was updated successfully, but these errors were encountered: