to get a personalized navigation.
to get a personalized navigation.
Hi,
We have an issue when trying to create a customer invoice with restriction for subaccounts enabled. It's similar to earlier issues we've had when creating supplier invoices and also journal transactions. We get the response:
Hello,
please send the following information via developersupport@visma.com
1) Request URL & Type (Post-Put)
2) Used JSON
3) ipp-company-id
4) Details of the restriction settings for the specified company
Thanks.
1. POST controller/api/v2/customerinvoice
2.
{
"Note": {
"Value": "2371"
},
"DocumentDate": {
"Value": "2023-06-12T10:46:17.667+02:00"
},
"CurrencyId": {
"Value": "SEK"
},
"CustomerRefNumber": {
"Value": "Matilda Holletrz"
},
"InvoiceText": {
"Value": "2023-06-09 - Mathilda Hollertz - SLF Styrelsem\u00F6te"
},
"CustomerNumber": {
"Value": "10318"
},
"SalesPerson": {
"Value": "94"
},
"InvoiceLines": [
{
"Description": {
"Value": "Atmosf\u00E4ren"
},
"Quantity": {
"Value": 1
},
"UnitPriceInCurrency": {
"Value": 0
},
"Subaccount": [
{
"SegmentId": 1,
"SegmentValue": "937"
},
{
"SegmentId": 2,
"SegmentValue": "999000"
},
{
"SegmentId": 3,
"SegmentValue": "00"
},
{
"SegmentId": 4,
"SegmentValue": "0000"
}
],
"VatCodeId": {
"Value": "04"
},
"AccountNumber": {
"Value": "3911"
},
"Operation": "Insert"
},
{
"Description": {
"Value": "Bredd sm\u00F6rg\u00E5s med ost och skinka"
},
"Quantity": {
"Value": 8
},
"UnitPriceInCurrency": {
"Value": 31
},
"Subaccount": [
{
"SegmentId": 1,
"SegmentValue": "931"
},
{
"SegmentId": 2,
"SegmentValue": "999000"
},
{
"SegmentId": 3,
"SegmentValue": "00"
},
{
"SegmentId": 4,
"SegmentValue": "0000"
}
],
"VatCodeId": {
"Value": "04"
},
"AccountNumber": {
"Value": "3230"
},
"Operation": "Insert"
},
{
"Description": {
"Value": "Bricklunch - serveras mellan 11.00 - 13.00"
},
"Quantity": {
"Value": 6
},
"UnitPriceInCurrency": {
"Value": 107
},
"Subaccount": [
{
"SegmentId": 1,
"SegmentValue": "931"
},
{
"SegmentId": 2,
"SegmentValue": "999000"
},
{
"SegmentId": 3,
"SegmentValue": "00"
},
{
"SegmentId": 4,
"SegmentValue": "0000"
}
],
"VatCodeId": {
"Value": "04"
},
"AccountNumber": {
"Value": "3230"
},
"Operation": "Insert"
}
]
}
3. 4468219
4. Segment 1 and 2 are not allowed to be 0 for specific accounts. This is the same issue which we have experienced regarding supplier invoice and journal transactions for this company.
Thanks
Thanks for the information, the case has been conveyed to the team, and we'll keep you informed of any progress.
Could you please also send us a print screen from the UI showing that the Customer Invoice can manually be created&saved with the same subaccount values in the specified ERP company ?
Copyright © 2022 Visma.com. All rights reserved.
Development team checked the database of this customer and:
Because Restriction groups are inactive now, when testing the API json POST customer invoice, it works and the system creates the invoice.
When activating the groups "Kb ej noll inverta" and "Kst ej noll invert" the Restriction by GL account for accounts 3911 and 3230 get activated and the Restriction by subsegment segmentID 1 with segment value 000 and segmentID 2 with segment value 000000 get activated. When testing the API json POST customer invoice, we get an error "message": "VismaId: 14a2619c-9e1d-47a0-b8e8-8660659e6e99. Error creating document. Error: Kostnadsställe of SubID do not exist." even if the subaccounts 937-999000-00-0000 and 931-999000-00-0000 are not restricted.
This is reproducible on the company database.