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"
  }
}
1 REPLY 1
kashyap
PARTNER

by kashyap

Any update on this?