MYOBCommunity
Partner Zone
|
|
Partner Zone

Need to pass negative price or quantity PHP AccountRight API

3 REPLIES
MYOB Staff Post DeveloperJack
133 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

133Posts

28Kudos

17Solutions

Re: Need to pass negative price or quantity PHP AccountRight API

Hi there @BlinQ,

I believe you'll need to do a negative quantity on that line as well but, given that you'll need to share with us the full API request (including private data) could you please email us your error + API trace to developers@myob.com?

Cheers,

Jack

Jack Skinner
MYOBapi Evangelist

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/
Contributing Partner BlinQ
5 Posts
Contributing Partner
BlinQ
Contributing Partner

5Posts

1Kudos

0Solutions

Re: Need to pass negative price or quantity PHP AccountRight API

 

$line_item[] = [
                  "Type" => "Transaction",
                  "Description" => htmlentities($description),
                  "ShipQuantity" => 1,
                  "Total" => -$discount,
                  "Item" => [
                        "UID" => $myob_item_uid
                  ],
                  "TaxCode" => [
                        "UID" => $myob_taxcode_uid
                  ]
 ];

 

Error Message:

{
  "Errors": [
    {
      "Name": "ValidationError",
      "Message": "CommonRules_DecimalMinValue",
      "AdditionalDetails": "UnitAmountSmiley SadSaleEventItemLine)",
      "ErrorCode": 1007,
      "Severity": "Error"
    }
  ],
  "Information": "Warning, error messages have not been finalised in this release and may change"
}

 

iamthas
MYOB Staff Post DeveloperJack
133 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

133Posts

28Kudos

17Solutions

Re: Need to pass negative price or quantity PHP AccountRight API

Hi there @BlinQ,

We don't currently support negative inventory in ARL but you should be able to create a negative line item on an invoice. If you can drop through a copy of your API request and the error you're getting through to our support team via developers@myob.com then we'll be able to help in more detail.

Cheers,

Jack

Jack Skinner
MYOBapi Evangelist

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/
Contributing Partner BlinQ
5 Posts
Contributing Partner
BlinQ
Contributing Partner

5Posts

1Kudos

0Solutions

Need to pass negative price or quantity PHP AccountRight API

Hi,

 

I am trying to pass negative price or quantity via PHP AccountRight API for the discount coupon as a line item under selected Items.

But api gives an error. Please help


Thank you & Cheers!

iamthas
Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post