Resource: accountingedit.nv
HTTP-method: POST
Accounting material edit can be used to edit existing vouchers, voucher lines, line cost objects, and voucher attachments in Netvisor. The voucher request must be directed to the accountingedit.nv resource without parameters. One request can include only one voucher. Accounting material edit can be used to edit the voucher's main information and voucher lines, but no edit history is saved for the main information. The main information does not need to be provided if only voucher lines are being edited. Accounting material edit invalidates the existing voucher lines and imports the lines provided in the edit message as new voucher lines to the voucher. If no voucher line information is provided in the edit message, they are not handled at all.
The data to be imported must be included in the request as an XML with the following structure:
Level | Element name | Type and length | Occurs | Description | Example |
Root | root | Aggr. | 1 | ||
1 | voucher | Aggr. | 1 | ||
2 | netvisorkey | Numeric | 1 | Netvisor key of the voucher being edited. Netvisor key can be retrieved with the resource accountingledger.nv. | |
2 | calculationmode | String | 0...1 | Calculation mode for the voucher. Handle voucher lines with net (net) or gross (gross) handling. In net handling, the system does not automatically calculate vat and rounding error lines. | net |
2 | voucherdate | Date | 0...1 | Date of the voucher | 2009-1-1 |
Attr. | format | String | 0...1 | Date format, always ansi | ansi |
2 | number | Numeric, max. 9 | 0...1 | Voucher number. If not given, the system automatically picks next number from the chosen voucher type | 1 |
2 | description | String, max. 255 | 0...1 | Voucher description. | Description |
2 | voucherclass | String | 1 | Voucher type. See possible voucher types above (It is also possible to create own voucher types). | Sales invoice |
2 | checked | String | 0...1 | Defines whether imported voucher rises to unchecked postings view. True or false, false by default. | false |
2 | comment | String, max 255 | 0...1 | A comment that can be seen in the voucher's processing history | Comment to processing history |
2 | voucherline | Aggr. | 0...n | ||
3 | linesum | Numeric | 1 | Row sum. Negative value is recorded to credit side and positive value on debet side. Two decimal maximum. | -100.00 |
Attr. | type | String | 0...1 | Sum type, net (tax-free) or gross (tax-included) | net |
3 | description | String, max. 255 | 1 | Voucher line description. | Description text |
3 | accountnumber | Numeric | 1 | Accounting account number, must be found or an error is returned. | 1701 |
3 | vatpercent | Numeric | 1 | VAT percent. Must not be in conflict with vatcode attribute. | 24 |
Attr. | vatcode | String | 0...1 | VAT code. If not given, value behind account number is used. Valid values are listed here. | KOMY |
3 | accountdimension | String | 0...1 | Voucher line's follow-up object | Follow-up object 1 |
Attr. | type | String | 1 | Follow-up object type, netvisorkey or name If "netvisorkey" is given, the element must provide the follow-up object's ID. The ID cannot be retrieved via the interface, but is visible in Netvisor. If "name" is given, the element must provide the follow-up object's name. The follow-up object is identified based on the name from all follow-up object names. | name |
3 | dimension | Aggr. | 0...n | ||
4 | dimensionname | String, max. 50 | 1 | Cost object header If the header is not found in the system, the interface creates it | Project 1 |
4 | dimensionitem | String, max. 200 | 1 | Cost object If the object is not found in the system, the interface creates it | Payroll |
2 | voucherattachments | Aggr. | 0...1 | ||
3 | voucherattachment | Aggr. | 1...n | ||
4 | mimetype | String | 1 | MIME-type of the attachment | Application/pdf |
4 | attachmentdescription | String | 1 | Description | |
4 | filename | String | 1 | File name of the attachment | Description.pdf |
4 | documentdata | String | 1 | Data of the attachment as base64 encoded string |
Did you find it helpful? Yes No
Send feedback