MYOBCommunity
Partner Zone
|
|
Partner Zone

Creating Line Items with Negative Amounts using AccountRight API

1 REPLY
Contributing Partner spiffybrian
7 Posts
Contributing Partner
spiffybrian
Contributing Partner

7Posts

1Kudos

1Solutions

Re: Creating Line Items with Negative Amounts using AccountRight API

I should also say that it's a real shame you can't mix Items with Service Items to deal with this sort of problem.

 

As I've experienced in other accounting packages, a line item is a service item unless an SKU is supplied, in which case it's treated as an Item (with or without Inventory). Nice and easy to use.

Brian
Contributing Partner spiffybrian
7 Posts
Contributing Partner
spiffybrian
Contributing Partner

7Posts

1Kudos

1Solutions

Creating Line Items with Negative Amounts using AccountRight API

I am creating invoices using the Item layout as our clients require inventory tracking and revenue account linking.

 

In some cases, miscellaneous items need to be created to deal with store credit amounts and discounts and these items need to be negative.

 

I have tried creating line items with a negative Total, but to no avail as it appears to require a positive value.

 

The Windows interface allows a negative Ship quantity, which generates the required negative amount. When I try this with the API, I get the error - CommonRules_DecimalMinValue, UnitAmountSmiley SadSaleEventItemLine).

 

Here's an example of what I'm submitting -

 

 {"Type"=>"Transaction", "Description"=>"Discount for A Suitcase - Plastic/Red/Small - Two none", "ShipQuantity"=>-1, "Total"=>50.0, "TaxCode"=>{"UID"=>"5b7f388f-623f-44fe-8498-89e0e29b0698"}, "Account"=>{"UID"=>"40ecbafd-51c0-40f3-9a28-d6a2b6d7422a"}, "Item"=>{"UID"=>"a7bde63e-c065-48e3-9b52-63f8766fd55e"}}

 

Any ideas would be appreciated.

 

 

Brian
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