Forum Discussion

smagar's avatar
smagar
User
2 years ago

Adding Item to ItemInoiceLine doesn't get UnitPrice and calculate total automatically - using SDK

Hi,

I am wondering why MYOB Api expecting to pass all the ItemInvoiceLine details for unit such as 

- UnitPrice

- UnitOfMeasure

- Total 

even when passing Item GUID (created in Sales > Items) and UnitCount.

I am expecting to get above details automatically (as all the details about Item is in MYOB) when creating invoice by passing Item detail and UnitCount in Invoice line.

Please let me know if I am missing something to work as expected or there is a way to make it automatic.

Thanks in advance.

2 Replies

Replies have been turned off for this discussion
  • Hi smagar,

    You need to provide the Item UID, ShipQuantity and Total (the total sale price for the line) and TaxCode UID as a minimum.

    AR will calculate the Item price from these (the UnitPrice in your invoice may be  different from the price on file).

     

    You do not need to supply the UnitPrice or UnitOf Measure.

     

    You may need to supply Discount details and Location if applicable.

    • smagar's avatar
      smagar
      User

      Hi John, 

      Thank you for your reply. Yes I can create invoice with those minimum required field. However, what I am expecting is; when exporting invoice by passing those minimum required field and Item UID, it should add Unit Price and Total calculation (i.e., unit * unit price) by getting details from Item UID automatically like other Invoicing system does. 

      thanks