My Products
Help
kashyap
PARTNER

Error: Invalid turnover class

by kashyap

Getting error while posting voucher

Request

mutation createBatchAndVoucherWithAttachment($batchId: Int = 0) {
  useCompany(no: xxxx037) {
    batch_create(
      values: [
        {
          voucherSeriesNo: null
          valueDate: 20241005
          description: "Z-rapport-1-44014"
        }
      ]
    ) {
      affectedRows
      items {
        batchNo @export(as: "batchId")
      }
    }
    voucher_create(
      values: [
        {
          creditAccountNo: 3102
          creditTaxCode: null
          amountDomestic: 30
          batchNo: $batchId
          voucherType: 3
          voucherNo: 44014
          voucherDate: 20241005
          text: "Z-rapport 44014 Salg Varer 0.00% MVA (05.10.2024)"
        }
        {
          creditAccountNo: 3005
          creditTaxCode: null
          amountDomestic: 6973
          batchNo: $batchId
          voucherType: 3
          voucherNo: 44014
          voucherDate: 20241005
          text: "Z-rapport 44014 Salg Varer 25.00% MVA (05.10.2024)"
        }
        {
          debitAccountNo: 7799
          debitTaxCode: null
          amountDomestic: 6431
          batchNo: $batchId
          voucherType: 3
          voucherNo: 44014
          voucherDate: 20241005
          text: "Z-rapport 44014 Terminal differanse (05.10.2024)"
        }
        {
          debitAccountNo: 1901
          debitTaxCode: null
          amountDomestic: 372
          batchNo: $batchId
          voucherType: 3
          voucherNo: 44014
          voucherDate: 20241005
          text: "Z-rapport 44014 Kontant differanse (05.10.2024) kan det være feil fra i går, fredagen?"
        }
        {
          debitAccountNo: 1576
          debitTaxCode: null
          amountDomestic: 200
          batchNo: $batchId
          voucherType: 3
          voucherNo: 44014
          voucherDate: 20241005
          text: "Z-rapport 44014 Vipps (05.10.2024)"
        }
      ]
    ) {
      affectedRows
      items {
        batchNo
        voucherNo
        voucherDate
      }
    }
    voucher_processings {
      addNewDocument(
        filter: { batchNo: { _eq: $batchId } }
        args: {
          fileName: "z-report-44014-32.pdf"
          description: "z-report-44014-32.pdf"
          fileBytes: "binarytext"
        }
      ) {
        succeeded
      }
    }
  }
}

 

Response

 

{
  "errors": [
    {
      "message": "Error: Invalid turnover class.",
      "path": [
        "useCompany",
        "voucher_create",
        "values/1"
      ],
      "extensions": {
        "data": {
          "status": 16,
          "status_name": "referenceNotAccepted"
        }
      }
    }
  ],
  "data": {
    "useCompany": {
      "batch_create": {
        "affectedRows": 1,
        "items": [
          {
            "batchNo": 309
          }
        ]
      },
      "voucher_create": {
        "affectedRows": 6,
        "items": [
          {
            "batchNo": 309,
            "voucherNo": 1004,
            "voucherDate": 20240906
          },
          {
            "batchNo": 309,
            "voucherNo": 0,
            "voucherDate": 0
          },
          {
            "batchNo": 309,
            "voucherNo": 1004,
            "voucherDate": 20240906
          },
          {
            "batchNo": 309,
            "voucherNo": 1004,
            "voucherDate": 20240906
          },
          {
            "batchNo": 309,
            "voucherNo": 1004,
            "voucherDate": 20240906
          },
          {
            "batchNo": 309,
            "voucherNo": 1004,
            "voucherDate": 20240906
          }
        ]
      },
      "voucher_processings": {
        "addNewDocument": {
          "succeeded": true
        }
      }
    }
  },
  "extensions": {
    "vbnxt-trace-id": "0000000000000000b8a0c8da36b3aa74"
  }
}
4 REPLIES 4
nano
CONTRIBUTOR *

by nano

It means you have registered your credit account as debit check it in Kontoplan

creditAccountNo: 3005

 

"batchNo": 309,
            "voucherNo": 0,
            "voucherDate": 0

 means the account is not found . 

VegardKR
STARTER

by VegardKR

@JonasVestaberg Can someone look into this? Almost 1 month without reply and we are still facing this issue when posting vouchers. 

kashyap
PARTNER

by kashyap

Any update on this?

by JonasVestaberg

Hi @kashyap 

Could you please send in a request to cloud.api.support@visma.com and we will look further into this case 🙏
If you are a Partner or ISV-partner, please register your case in the Partner Portal.