Api2/sales-invoice-lines GET

Can’t seem to post in the “Bugs” category so reporting here in “Uncategorized”
When using api2/sales-invoice-lines GET
Each line returns the salesinvoice description (when maybe it shouldn’t?)
Whilst the lineDescription returns null when the lineDescription actually has value

GET api2/sales-invoioce-form returns the lines correctly

Only moderators and the developer have privileges move to posts to ideas and bugs after determining if these truly are. The issue you reported should ideally be accompanied by screenshots and code to determine if this truly an application bug or user error.

Thx eko
Should be fairly easy to reproduce, if not let me know and I’ll post some screenshots

You report it so it is up to you to provide more information as also asked for in the forum rules at FAQ - Manager Forum especially:

  • Be specific. Do not just tell us a feature does not work. Explain what you have done and why you think there is an issue. If your question relates to an apparent software problem (rather than an accounting topic), tell us your operating system (including the version), Manager edition (desktop, server, or cloud), and exactly what you think is wrong. If possible, post screen shots illustrating the problem. If your question is related to custom themes or custom reports, always post the code or report definition you have developed and the results it produces. Do not simply post a picture of something you want and ask other users to tell you how to achieve it.


In this example the SalesInvoice description is “xxx” and the lineDescription item has value, but is not returned

I do not appreciate how moderators on this forum invariably seem to assume that users are idiots
It takes away from what is a fine piece of software
Try a bit harder to respect your users guys…

I am not a moderator but a user. I can not find any evidence that my posts are personal I just state facts and the reference to the forum rules is about “… How can I increase my chances of getting useful information?..” Obviously you do not find the information useful as I only asked for more information. Also moderators are users like you and me and thus volunteer their support and deserve more respect.

ok
Let’s leave it at that
Sorry I mentioned it

Try &fields=HasLineDescription

/sales-invoice-lines
work well here

{
  "business": {
    "name": "test (2024-07-15)"
  },
  "skip": 0,
  "pageSize": 50,
  "totalRecords": 4,
  "salesInvoiceLines": [
    {
      "issueDate": "2024-08-05",
      "dueDate": "2024-08-05",
      "reference": "1",
      "customer": "CST01 - Customer 01",
      "description": "Document Description",
      "item": "ITEM 01",
      "account": "Tax payable",
      "lineDescription": "Line 1 Description",
      "qty": null,
      "unitPrice": {
        "value": 1000,
        "currency": null
      },
      "project": null,
      "division": null,
      "taxCode": "PPN 11%",
      "discount": null,
      "taxAmount": {
        "value": 110,
        "currency": null
      },
      "amount": {
        "value": 110,
        "currency": null
      }
    },
    {
      "issueDate": "2024-08-05",
      "dueDate": "2024-08-05",
      "reference": "1",
      "customer": "CST01 - Customer 01",
      "description": "Document Description",
      "item": "ITEM 01",
      "account": "Inventory - sales",
      "lineDescription": "Line 1 Description",
      "qty": 1,
      "unitPrice": {
        "value": 1000,
        "currency": null
      },
      "project": null,
      "division": null,
      "taxCode": "PPN 11%",
      "discount": null,
      "taxAmount": null,
      "amount": {
        "value": 1000,
        "currency": null
      }
    },
    {
      "issueDate": "2024-08-05",
      "dueDate": "2024-08-05",
      "reference": "1",
      "customer": "CST01 - Customer 01",
      "description": "Document Description",
      "item": "ITEM 02",
      "account": "Tax payable",
      "lineDescription": "Line 2 Description",
      "qty": null,
      "unitPrice": {
        "value": 1000,
        "currency": null
      },
      "project": null,
      "division": null,
      "taxCode": "PPN 11%",
      "discount": null,
      "taxAmount": {
        "value": 110,
        "currency": null
      },
      "amount": {
        "value": 110,
        "currency": null
      }
    },
    {
      "issueDate": "2024-08-05",
      "dueDate": "2024-08-05",
      "reference": "1",
      "customer": "CST01 - Customer 01",
      "description": "Document Description",
      "item": "ITEM 02",
      "account": "Inventory - sales",
      "lineDescription": "Line 2 Description",
      "qty": 1,
      "unitPrice": {
        "value": 1000,
        "currency": null
      },
      "project": null,
      "division": null,
      "taxCode": "PPN 11%",
      "discount": null,
      "taxAmount": null,
      "amount": {
        "value": 1000,
        "currency": null
      }
    }
  ]
}

1 Like

Thx @Mabaega
@eko was correct in that api2 was returning null due to HasLineDescription being false
As the api is just pulling data I had assumed that if a field had content it would be returned regardless of (cosmetic) display settings
I guess it can be looked at in 2 ways, but I still think the api should return that data regardless of display settings
Anyway, I guess it’s a feature rather than a bug :thinking:

No mention has been made of the parent Description data being returned within the GET /sales-invoice-lines structure
Is this also a “feature”?

Yes, this is a feature. and it is indeed needed, it would be even better if all data at the Document Level could be displayed here, this would be very useful for those who want to get sales reports through Advance Query.

GET /sales-invoice-lines is used to get data that we can see in the Sales Invoice Lines Tabs. If the data can be seen in the sales invoice lines tab, we should be able to get it with GET /sales-invoice-lines.