Forum Discussion

duyanhth's avatar
duyanhth
Contributing User
5 years ago

Detect sale layout type (or be able to change it by api)

My client is using Account Right package. He's switching back and fort between two layouts when creating an invoice. E.g. in same day, he creates 5 service invoices but 10 service and items ones. In our side, we support both in same times. However, when pushing those invoices to Myob, the layout type need to be changed accordingly.

My questions are:

1. Do we have any api to check what is the current layout setting for invoice?

2. Do we have any api to change layout setting for invoice?

 

duyanhth

4 Replies

Replies have been turned off for this discussion
  • Han-Solo's avatar
    Han-Solo
    MYOB Moderator
    5 years ago

    Hi duyanhth

     

    Thank you for reaching out, Yes we do have a couple of options. 

     

    1. If the card files have been set up with a default layout for the form we can view and edit this via the contacts endpoint.

     

    "SellingDetails": {
    "SaleLayout": "Item",
    "PrintedForm": "Plain Paper Invoice",
    "InvoiceDelivery": "Nothing",

     

    If an invoice has already been created in the system we can pull the endpoint /Sale/Invoice or /Purchase/Bill which will show all Item and Service invoices if you are unsure of what layout has been used.

     

    We also have the option to edit the layout and form if you are using the API to send the invoices via the endpoint /{cf_uri}/Sale/Invoice/Service/{invoice_uid}/Email. You can view our endpoint documentation here. 

     

    Let us know if you have any questions 

     

  • duyanhth's avatar
    duyanhth
    Contributing User
    5 years ago

    Thank you very much. The contact endpoint is what I'm after.

     

    Cheers

    duyanhth

  • duyanhth's avatar
    duyanhth
    Contributing User
    5 years ago
     
    Your help on the api works. I can make invoice layout change with our test account (web version) but with out customer, it still throw an error as bellow. We double checked our client version and it is latest one.
     
    Thank you very much
    Tran
     
    p.s: I can provide our developer id so you can find we sent multi invoice apis successfully.
     
    Invoice API IV000014 - Error: Encountered a validation error (https://ar1.api.myob.com/accountright/9e363c4f-c0bc-40e4-82e8-a4d70b7e432b/Sale/Invoice/Item/?returnBody=true) Hybrid Layout Is Not Supported.
     

     

  • duyanhth's avatar
    duyanhth
    Contributing User
    5 years ago

    Good day Han-Solo 

     

    Do you have any idea on this? My client is stucking on this and we haven't found any solution yet :(

     

    With the best regards

    duyanhth