Skip to content

Commit 3640d88

Browse files
authored
Merge pull request #132 from JanLosenicky/users/jan.losenicky/invoiceRecognition
Controls: Invoice Recognition documentation
2 parents b01cd95 + c12a7b5 commit 3640d88

3 files changed

Lines changed: 187 additions & 0 deletions

File tree

src/.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ module.exports = config({
389389
['/en/developer-guide/applications/controls/formbutton.md', 'Form Button'],
390390
['/en/developer-guide/applications/controls/htmlcontentdisplay.md', 'HTML Content Display'],
391391
['/en/developer-guide/applications/controls/infocard.md', 'Info Card'],
392+
['/en/developer-guide/applications/controls/invoicerecognition.md', 'Invoice Recognition'],
392393
['/en/developer-guide/applications/controls/keyfigures.md', 'Key Figures'],
393394
['/en/developer-guide/applications/controls/mappicker.md', 'Map Picker'],
394395
['/en/developer-guide/applications/controls/milestones.md', 'Milestones'],
528 KB
Loading
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
---
2+
Author: Jan Losenicky
3+
---
4+
# Invoice Recognition
5+
6+
This control displays the Correction UI component feature developed by Konica Minolta which enables you to verify data with the customer register and the rendered invoice and to modify the extracted data from Invoice Miner. Invoice Miner is a cloud-based extraction service that withdraws data from invoices and converts the data into structured JSON content.
7+
8+
<img src='/.attachments/applications/Controls/InvoiceRecognition/invoicerecognition-preview.png' />
9+
10+
This control is also providing a communication between Power Apps (dataverse) and Correction UI which allows us to verify the customer/supplier with the the existing records in database, trigger creation of new records and create a new invoice record after accepting the extracted data.
11+
12+
Control strongly relies on `talxis_purchaseinvoiceheader` and `talxis_purchaseinvoicedetail` entities which records are created after accepting the data.
13+
14+
## Data loaded from Invoice Miner
15+
16+
### Header
17+
There is a list of extracted which the control is working with. In TALXIS Logical Name there is a name of field on `talxis_purchainvoiceheader` entity, these fields are filled after creation of new invoice in dataverse.
18+
19+
| Name | Logical Name (Invoice Miner) | TALXIS Logical Name (default mapping) | Description |
20+
| --- | --- | --- | --- |
21+
| Due Date | dueDate | talxis_duedate | |
22+
| Invoice Issue Date | invoiceDate | talxis_dateofissue | |
23+
| Taxable Supply Date| taxableSupplyDate | talxis_dateoftaxablesupply | |
24+
| Variable Symbol | paymentReference | talxis_variablesymbol | Variable symbol/Payment reference |
25+
| Invoice ID | invoiceId | talxis_purchaseinvoicenumber |
26+
| Currency | currency | transactioncurrencyid | Currency is matched by iso code in dataverse |
27+
| Customer ID | customerExtCompanyId | talxis_customerid | guid of matched customer in database |
28+
| Supplier ID | vendorExtCompanyId | talxis_supplierid | guid of matched supplier in dataverse |
29+
| Customer Name | customerName | | |
30+
| Customer Tax ID | customerTaxId | | Used for matching customer with database |
31+
| Customer Identification Number | customerICO | | |
32+
| Customer Country Code | customerCountryCode | | |
33+
| Customer Address | customerAddress | | |
34+
| Customer Address Recipient | customerAddressRecipient | |
35+
| Supplier Name | vendorName | | |
36+
| Supplier Tax ID | vendorTaxId | | Used for matching supplier with database |
37+
| Supplier Identification Number | vendorICO | | |
38+
| Supplier Country Code | vendorCountryCode | | |
39+
| Supplier Address | vendorAddress | | |
40+
| Supplier Address Recipient | vendorAddressRecipient | | |
41+
| Total Amount with VAT | invoiceTotal | | |
42+
| Total Amount | amountsSumCheck | | |
43+
| Subtotal | subTotal | | |
44+
| Total Tax Amount | totalTax | | |
45+
| Amount Due | amountDue | | |
46+
| Payment Term | paymentTerm | | |
47+
| Purchase Order Number | purchaseOrder | | |
48+
49+
### Invoice Lines
50+
There is a list of extracted fields which the control is working with. In TALXIS Logical Name there is a name of field on `talxis_purchainvoicedetail` entity, these fields are filled in rows after creation of new invoice in dataverse.
51+
52+
| Name | Logical Name (Invoice Miner) | TALXIS Logical Name (default mapping) | Description |
53+
| --- | --- | --- | --- |
54+
| Line Name / Description | description | talxis_name | |
55+
| Unit Price | unitPrice | talxis_priceperunit | |
56+
| VAT Amount | tax | talxis_vatperunit_overridden | |
57+
| Quantity | quantity | talxis_quantity | |
58+
| Unit | unit | | |
59+
| Amount | amount | | Not used since total amount is calculated. |
60+
| Product Code | productCode | | Products are not matched with database. |
61+
| Total Amount | amountCheck | | Not used since total amount is calculated. |
62+
| Full Line | fullLine | | |
63+
64+
## Control Inputs
65+
66+
| Display Name | Name | Required | Type | Description |
67+
| --- | --- | --- | --- | --- |
68+
| Binding Field | bindingField | Yes | Singleline.Text | Binding field for the control |
69+
| Entity Name | entityName | Yes | Singleline.Text | Name of the entity where the control is bound |
70+
| Entity ID | entityId | Yes | Singleline.Text | ID of the record where the control is bound |
71+
| URL | url | Yes | Singleline.Text | Url of the target invoice from Invoice Miner |
72+
| Host Url | hostUrl | Yes | Singleline.Text | Host url of the Invoice Miner cloud service |
73+
| Auth Token | authToken | Yes | Singleline.Text | Auth Token used for authorization with Invoice Miner service |
74+
| Overwrite Default Mappings | overwriteDefaultMappings | No | Singleline.Text | Used to overwrite the default mappings to dataverse columns, example below. |
75+
| Additional Mappings | additionalMappings | No | Singleline.Text | Used to add mappings to the default ones, in case you want to leave the default but add some custom |
76+
77+
### Example of binding control to a form
78+
```
79+
<customControl formFactor="0" name="talxis_TALXIS.PCF.InvoiceRecognition">
80+
<parameters>
81+
<bindingField type="SingleLine.Text">data_bindingfield</bindingField>
82+
<url type="SingleLine.Text">data_invoiceurl</url>
83+
<authToken type="SingleLine.Text">data_authtoken</authToken>
84+
<hostUrl static="true" type="SingleLine.Text">https://{% environmentvariable talxis_apps_procurement_invoiceai_environmenturl %}</hostUrl>
85+
<entityName static="true" type="SingleLine.Text">talxis_document</entityName>
86+
<entityId type="SingleLine.Text">data_documentid</entityId>
87+
<additionalMappings static="true" type="SingleLine.Text" >[{"invoiceMinerPropertyName": "purchaseOrder","invoiceMinerLocation": "header","logicalName": "ntg_purchaseordernumber","type": "text"},{"invoiceMinerPropertyName": "totalTax","invoiceMinerLocation": "header","logicalName": "ntg_totalvatamount","type": "number"}]</additionalMappings>
88+
</parameters>
89+
</customControl>
90+
```
91+
92+
### Default column mappings object
93+
**Mappings**
94+
```
95+
[
96+
{
97+
invoiceMinerPropertyName: "vendorExtCompanyId",
98+
invoiceMinerLocation: "header",
99+
logicalName: "talxis_supplierid@odata.bind",
100+
type: "lookup",
101+
targetEntitySetName: "accounts"
102+
},
103+
{
104+
invoiceMinerPropertyName: "customerExtCompanyId",
105+
invoiceMinerLocation: "header",
106+
logicalName: "talxis_customerid@odata.bind",
107+
type: "lookup",
108+
targetEntitySetName: "accounts"
109+
},
110+
{
111+
invoiceMinerPropertyName: "invoiceDate",
112+
invoiceMinerLocation: "header",
113+
logicalName: "talxis_dateofissue",
114+
type: "date"
115+
},
116+
{
117+
invoiceMinerPropertyName: "dueDate",
118+
invoiceMinerLocation: "header",
119+
logicalName: "talxis_duedate",
120+
type: "date"
121+
},
122+
{
123+
invoiceMinerPropertyName: "taxableSupplyDate",
124+
invoiceMinerLocation: "header",
125+
logicalName: "talxis_dateoftaxablesupply",
126+
type: "date"
127+
},
128+
{
129+
invoiceMinerPropertyName: "invoiceId",
130+
invoiceMinerLocation: "header",
131+
logicalName: "talxis_purchaseinvoicenumber",
132+
type: "text"
133+
},
134+
{
135+
invoiceMinerPropertyName: "paymentReference",
136+
invoiceMinerLocation: "header",
137+
logicalName: "talxis_variablesymbol",
138+
type: "text"
139+
},
140+
{
141+
invoiceMinerPropertyName: "currency",
142+
invoiceMinerLocation: "header",
143+
logicalName: "transactioncurrencyid@odata.bind",
144+
type: "transactioncurrency"
145+
},
146+
{
147+
invoiceMinerPropertyName: "unitPrice",
148+
invoiceMinerLocation: "lineItems",
149+
logicalName: "talxis_priceperunit",
150+
type: "number"
151+
},
152+
{
153+
invoiceMinerPropertyName: "tax",
154+
invoiceMinerLocation: "lineItems",
155+
logicalName: "talxis_vatperunit_overridden",
156+
type: "number"
157+
},
158+
{
159+
invoiceMinerPropertyName: "quantity",
160+
invoiceMinerLocation: "lineItems",
161+
logicalName: "talxis_quantity",
162+
type: "number"
163+
},
164+
{
165+
invoiceMinerPropertyName: "description",
166+
invoiceMinerLocation: "lineItems",
167+
logicalName: "talxis_name",
168+
type: "text",
169+
defaultValue: "Generated line",
170+
maxLenght: 100
171+
}
172+
]
173+
```
174+
175+
**Interface**
176+
```
177+
{
178+
invoiceMinerPropertyName: string,
179+
invoiceMinerLocation: "header" | "lineItems",
180+
logicalName: string,
181+
type: "text" | "number" | "date" | "lookup" | "transactioncurrency",
182+
targetEntitySetName?: string | undefined,
183+
defaultValue?: any | undefined,
184+
maxLenght?: number | undefined
185+
}
186+
```

0 commit comments

Comments
 (0)