My Products
Help
guidol
CHAMPION *

Duplicate rows in Customer Payment - Lines API

by guidol
The API /controller/api/v1/customerPayment/{paymentNumber} contains "paymentLines", an array of payments. However, the lines within the list of payment lines are not unique; it can contain duplicate lines due to missing fields such as batch number (which was different for the two lines with the positive amount in the UI) or an ID or GUID.
 
Making the lines not unique makes it hard to uniquely identify, leading to problems in reporting and integrity checks.
 
It would be great when an ID, line number or batch number could be added to make the lines within a customer payment unique.
 
1 REPLY 1
guidol
CHAMPION *

by guidol

Sample

[
  {
    "type":"VoidPayment",
    "refNbr":"405812",
    "status":"Closed",
    "hold":false,
    ...

    "paymentLines":[
      {
        "documentType":"Invoice",
        "refNbr":"987654321",
        "amountPaid":1234.7700,
        "cashDiscountTaken":0.0,
        "balanceWriteOff":0.0000,
        "writeOffReasonCode":{
          "id":"BK01",
          "description":"DESC"
        },
        "date":"2023-12-31T00:00:00",
        "dueDate":"2021-07-23T00:00:00",
        "cashDiscountDate":"2023-12-31T00:00:00",
        "balance":0.0,
        "cashDiscountBalance":0.0,
        "description":"FAKTUUR ORDER456",
        "currency":"EUR",
        "postPeriod":"202106",
        "customerOrder":"ORDER456",
        "crossRate":1.0
      },
      {
        "documentType":"Invoice",
        "refNbr":"987654321",
        "amountPaid":-1234.7700,
        "cashDiscountTaken":0.0,
        "balanceWriteOff":0.0000,
        "writeOffReasonCode":{
          "id":"BK01",
          "description":"DESC"
        },
        "date":"2023-12-31T00:00:00",
        "dueDate":"2021-07-23T00:00:00",
        "cashDiscountDate":"2023-12-31T00:00:00",
        "balance":0.0,
        "cashDiscountBalance":0.0,
        "description":"FAKTUUR ORDER456",
        "currency":"EUR",
        "postPeriod":"202106",
        "customerOrder":"ORDER456",
        "crossRate":1.0
      },
      {
        "documentType":"Invoice",
        "refNbr":"987654321",
        "amountPaid":1234.7700,
        "cashDiscountTaken":0.0,
        "balanceWriteOff":0.0000,
        "writeOffReasonCode":{
          "id":"BK01",
          "description":"DESC"
        },
        "date":"2023-12-31T00:00:00",
        "dueDate":"2024-01-01T00:00:00",
        "cashDiscountDate":"2023-12-31T00:00:00",
        "balance":0.0,
        "cashDiscountBalance":0.0,
        "description":"FAKTUUR ORDER456",
        "currency":"EUR",
        "postPeriod":"202312",
        "customerOrder":"ORDER456",
        "crossRate":1.0
      }
    ],
    ...
]