My Products
Help
Steinar Møller
PARTNER

Posting to SalesOrder CustomerVATZone

by Steinar Møller

We must post CustomerVATZone on salesorder in order to update according to new tax rules in EU. 

Trying to post, but nothing are updated on the field. In UI there are an "override VAT zone" Are not able to find that in API dok?

 

Steinar

16 REPLIES 16
Snuffsis
CONTRIBUTOR ***

by Snuffsis (Updated ‎25-08-2021 13:40 by Snuffsis )

As a workaround, as Magnus mentioned its related to the shipping field, and if that is included. We set up locations, with the relevant zones on each location, and then added the location field to the sales order, which made it work.

 

So, we added one location for Sweden, one for EU and one for outside EU. 

by Magnus Johnsen

Hi, 

 

We are not able to reproduce this, when we have tested in our company, both POST and PUT of the field "customerVATZone" changed the VAT zone under the financialsTab of the SalesOrder.

 

Posted without including the "customerVATZone" field:

2021-08-25 09_21_11-Sales orders - Brave.png

 

Posted with "customerVATZone": {"value""02"}:

2021-08-25 09_21_44-Sales orders - Brave.png


In Visma.net ERP Financials, generally the system automatically performs VAT calculation based on what has been configured in the ERP. Those details should be covered in the company that your integration working with.
The following documentation might be helpful:


How to set up Vat calculation
-About VAT calculation

-Set up VAT calculation
-About prerequisites and preparation

Steinar Møller
PARTNER

Thanks for testing. I have tested on a demo client, but are not able to get the field updated. I stilles says "01" although I posted the value "02". 
Can you please send me the code example for the order you posted in your test?

 

Hi,

 

The JSON used is this:

{
    "customer": {
        "value""10000"
    },
    "orderType": {
        "value""SO"
    },
    "lines": [
        {
            "operation""Insert",
            "unitPrice": {
                "value"10
            },
            "quantity": {
                "value"1
            },
            "inventoryId": {
                "value""teststock"
            },
            "warehouse": {
                "value""2"
            },
            "lineDescription": {
                "value""TestVAT"
            },
            "salesOrderOperation": {
                "value""Issue"
            }
        }
    ],
     "customerVATZone": {
    "value""03"
  },
    "currency": {
        "value""NOK"
    },
    "date": {
        "value""2019-06-19T13:57:42Z"
    }
}
 
We have tested this in both the V1 for PUT/POST and V2 POST.
We have not been able to find any settings restricting changing the value so far.
Could you please try the JSON and also send us a screenshot of the available zones when trying to change it in the UI?
Thank you. 
Steinar Møller
PARTNER

Thank you, this is working. I will compare with my code. 

Hi,

 

The issue seems to be related to the shipping address field, when it is included it seems to be overriding the value sent in the "customerVATZone".

We'll report this to the development team.

Thank you.

Steinar Møller
PARTNER

Hi,

What is status on this issue?
We still have the problem and need this to be solved.

Hi Steinar,

We have asked the development team for an update.

It looks like they are testing a solution, we will give you an update as soon as they reply. 

Thank you. 

Steinar Møller
PARTNER

Hi,

We still haven't get any update on this issue. The customer must still manually adjust all the salesorder when they are posted. 
Can you please give me an update on this?

 

brgds Steinar

Hi,

This issue should have been resolved, are they sending the invoices with the shipping address now?

Steinar Møller
PARTNER

Hi,

This is still not working and we have done a lot of testing with the json posted, I have removed one by one field from the code for finding what is affecting why CustomerVATZone are not posted. 
When we post with the shipVia field CustomerVATZone are not posted, without the shipVia, the customerVATZone are posted.
Ex:
},

"shipVia": {
"value": "UPS STANDARD"
},

Please test this and confirm if this is a bug.  

Hi,

So would you say that the original issue in this thread is solved or is this still causing an issue for you?

1. Shipping address causes CustomerVatZone to be omitted.

2. Ship via causes CustomerVatZone to be omitted.

Are both these issues true for you?

Steinar Møller
PARTNER

Hi,

Yes the original issue is solved.
1. Shipping address issue is solved and now working.
2. This is still an issue, when ShipVia is posted along with CustomerVATZone.

 

Thank you, we'll test it and send it on to the development team.

Yıldırım
VISMA

by Yıldırım (Updated ‎25-08-2021 13:34 by Yıldırım VISMA )

In addition to what Magnus has mentioned, PUT Operation with Sales Order V1 for 

 

{
    "customerVATZone": {
        "value": "03"
    },
    "orderType": {
        "value": "SO"
    }
}

 

 should also get the field updated, and we think this can be used as a workaround.

Snuffsis
CONTRIBUTOR ***

by Snuffsis

I would like to add that we have the same issue as the OP does. We can override shipping contact, address, same with billing. We can override the currency used etc.

But CustomerVATZone does not change.

The zone exists in the company, with the correct ID, and the inspected JSON object sent to visma had the correct value and name on the json object etc.

   "customerVATZone": {
        "value": "03"
    },
 

Skärmbild 2021-08-25 113118.png

 

We are using a custom OrderType though. If that is anything that can cause a problem?