My Products
Help
Snuffsis
CONTRIBUTOR ***

Error for period when creating SupplierInvoice

by Snuffsis

We are trying to create a supplierinvoice for some testing.

 

We first got an error saying PostPeriod was not found in our system.

Which is correct (since it uses documentdate if it's empty by default)

So we changed to manually set the postperiod to a period that does exist, in this case 12-2020

 

However, then we recieve an error message that seem to indicate that the backend is somehow messing with the values we are sending in, and saying its wrong, because obviously what it seems to input is wrong.

 

'Error creating supplierInvoice. Error: An error in processing of field Post period value 12- 202 General ledger error: The financial period is not found in the system.'

 

This is a snippet of the relevant part of the JSON body we are sending in.

 

"financialPeriod": {
    "Value": "12-2020"
}

4 REPLIES 4

by Yıldırım

Hello,

you should send the value without dash 

 "financialPeriod": {
        "value": "122020"
    },
Snuffsis
CONTRIBUTOR ***

by Snuffsis (Updated ‎21-06-2023 11:17 by Snuffsis )

Doing that results in a similar error:

'Error creating supplierInvoice. Error: An error in processing of field Post period value 20-1220 General ledger error: The financial period is not found in the system.'

  "financialPeriod": {
    "Value": "122020"
  },

It worked when we changed to postPeriod though.

by Yıldırım

PostPeriod should also reflect the same valid data if the defaults are not used.

Snuffsis
CONTRIBUTOR ***

by Snuffsis

Yes, it seems like it.

 

But then the question here might be why it seems like the input for financialPeriod seem to get scrambled in the backend for the endpoint?

I would understand if it answered with "Post period value 12-2020 General ledger error: ..."

But now it scrambles it an ends up being "20-1220"