Prices in quotes

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Prices in quotes

Postby JuiceyBrucey » Fri Feb 27, 2026 10:19 am

Hi,
7.2.1.0
SR 16
When I send through a quote, the prices do not display in JIWA.
I assumed that JIWA would get its price rather than the website dictate what the price should be and sending it through. So I have not included it.
THis is what I am sending.
Code: Select all
{
                 "Type": "string",
                 "StaffUserName": "Admin",
                 "StaffTitle": "WEB GUY",
                 "StaffFirstName": "BRUCE",
                 "StaffSurname": "EVANS",
                 "InvoiceInitDate": "2026-02-27T09:44:47",
                 "OrderNo": "AWC_69a0b605a1728",
                 "DebtorID": "abb76cc328904834bff3",
                 "DebtorAccountNo": "013",
                 "DebtorName": "TESTING FROM BRUCE - IGNORE DEBTOR",
                 "DebtorEmailAddress": "[email protected]",
                 "DeliveryAddress1": "",
                 "DeliveryAddress2": "",
                 "DeliveryAddressSuburb": "",
                 "DeliveryAddressState": "",
                 "DeliveryAddressPostcode": "",
                 "DeliveryAddressCountry": "Australia",
                "Lines": [
{
                 "ItemNo": 1,
                 "QuoteLineID": "na",
                 "InventoryID": "eb9ff6fd0b33461995aa",
                 "Description": "PRYDES EASI BREED 20 KG",
                 "QuantityOrdered": 10}
]
}

should I be including any of this?
"PriceExGst": 0,
"PriceIncGst": 0,
"DiscountedPrice": 0,
"TaxToCharge": 0,
"TaxRate": 0,
"UnitCost": 0,

If yes, out of curiosity, would that mean the website can give a different price than JIWA has and that it will prevail in the quote?
Thank you.
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Prices in quotes

Postby Mike.Sheen » Fri Feb 27, 2026 10:33 am

POST or PATCH? Big difference between the behaviours.

In a PATCH, if you don't supply the DiscountedPrice then we don't touch the price already on the quote.

In a POST, if you don't supply the DiscountedPrice, then we use what Jiwa works out the price to be for the item, given the price scheme associated with the quote or debtor.

Sales orders and quotes both behave the same in regards to prices when POSTing - if you supply the DiscountedPrice, we'll use that - for web stores you have to - usually you have collected the money and the order placed, so the price has to be what that customer paid for - we can't go changing that, so that is why if you provide a DiscountedPrice, we'll always use that.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Prices in quotes

Postby JuiceyBrucey » Fri Feb 27, 2026 11:01 am

Hi Mike,
It is a post request to create the initial quote.
Cheers
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Prices in quotes

Postby Mike.Sheen » Sat Feb 28, 2026 1:25 pm

Using a Jiwa Demo database, I have proven this is true:

Mike.Sheen wrote:In a POST, if you don't supply the DiscountedPrice, then we use what Jiwa works out the price to be for the item, given the price scheme associated with the quote or debtor.


I POSTed to /SalesQuotes the following JSON:

Code: Select all
{
    "OrderNo": "Test",
    "DebtorAccountNo": "1001",   
    "Lines": [
        {
            "PartNo": "1170",
            "QuantityOrdered": 1.000000           
        }
    ]
}


And the result is the Discounted price was set to what the system determined:
QuotePost.png


If you open Jiwa, create a new quote for the same debtor, add the part in question - what price is shown? I'm willing to bet it is likely to be 0.00 also - so it's a something to do with the pricing rules for that debtor / product / warehouse / date / quantity.

Your starting point in isolating issues should always be "Does it happen in demo data?".

Also your sample JSON you showed had the following line:
Code: Select all
"QuoteLineID": "na",


Whilst this is luckily being ignored as it is a POST, it's not a good idea to supply that at all - it's used for PATCH operations and will throw an error if a value is supplied that does not exist on the Quote.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Prices in quotes

Postby JuiceyBrucey » Thu Mar 05, 2026 3:21 pm

Hi Mike,
Thank you very much.
So just so im 100% clear, I should not supply any prices in the lines, including not determining if the current price or forward price is in use, and just let JIWA determine the pricing, or if it is a debtor specific pricing?

So, apart from some minor other things, website order numbers etc, I dont need to supply anything more than this?
{
"OrderNo": "Test",
"DebtorAccountNo": "1001",
"Lines": [
{
"PartNo": "1170",
"QuantityOrdered": 1.000000
}
]
}

Is there any point in me including the InventoryID?
Thank you
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Prices in quotes

Postby Mike.Sheen » Thu Mar 05, 2026 3:31 pm

JuiceyBrucey wrote:So just so im 100% clear, I should not supply any prices in the lines, including not determining if the current price or forward price is in use, and just let JIWA determine the pricing, or if it is a debtor specific pricing?


It depends. If you want Jiwa to work out the price, don't supply one in the request. If you want to dictate the price (as often is the case from web stores), then you should provide the DiscountedPrice - then we'll use that.

JuiceyBrucey wrote:So, apart from some minor other things, website order numbers etc, I dont need to supply anything more than this?
{
"OrderNo": "Test",
"DebtorAccountNo": "1001",
"Lines": [
{
"PartNo": "1170",
"QuantityOrdered": 1.000000
}
]
}



It depends. The bare minimum you need to supply is just enough to determine the debtor - either the DebtorAccountNo or DebtorID. You probably would want to supply the InvoiceInitDate - which is the date of the quote - but if you don't the API will just use it's current date and time.

JuiceyBrucey wrote:Is there any point in me including the InventoryID?


It depends. If you supply an InventoryID, we'll use that even if you supply a PartNo. If you supply a PartNo and no InventoryID, we'll use the PartNo.

Where you would want to use InventoryID instead of PartNo is if there is a policy in place to allow the PartNo to be changed. You cannot change the InventoryID in Jiwa, but you can change the PartNo. Supply both to make it human readable and to make sure any PartNo changes don't cause issues.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Prices in quotes

Postby JuiceyBrucey » Thu Mar 05, 2026 4:18 pm

Thanks for that. I think I might stick with InventoryID as long as that is not a problem. As suggested, PartNo can change, but InventoryID cannot. Also the website works primarily off InventoryID.

So here is an example of the what I am POST ing to JIWA. I now realise that there is some extra info that could be taken out.
But with the below quote request, when the quote is converted to an order, it is generating its own DiscountGiven, Disc%, for items that are components of a kit.

Code: Select all
{
  "Type": "string",
  "StaffUserName": "Admin",
  "StaffTitle": "WEB GUY",
  "StaffFirstName": "*****",
  "StaffSurname": "*****",
  "InvoiceInitDate": "2026-03-05T14:04:41",
  "OrderNo": "*****",
  "DebtorID": "*****",
  "DebtorAccountNo": "*****",
  "DebtorName": "*****",
  "DebtorEmailAddress": "*****",
  "DeliveryAddress1": "FINAL COPY -  STOCKTAKE",
  "DeliveryAddress2": "",
  "DeliveryAddressSuburb": "",
  "DeliveryAddressState": "",
  "DeliveryAddressPostcode": "",
  "DeliveryAddressCountry": "Australia",
 "Lines": [
      {
        "ItemNo": 1,
        "QuoteLineID": "na",
        "InventoryID": "*****",
        "Description": "ADVANCE CAT OCEAN FISH WITH RICE 20 KG",
        "QuantityOrdered": 1
      },{
        "ItemNo": 2,
        "QuoteLineID": "na",
        "InventoryID": "*****",
        "Description": "MITAVITE ATHLETE PLUS BULKA-PER-KG  500KG BULKA-PER-KG 500KG",
        "QuantityOrdered": 500
     },{
        "ItemNo": 3,
        "QuoteLineID": "na",
        "InventoryID": "*****",
        "Description": "FREE RANGE POULTRY MIX 20KG 20 KG",
        "QuantityOrdered": 54},
     {
        "ItemNo": 4,
        "QuoteLineID": "na",
        "InventoryID": "*****",
        "Description": "HYGAIN ALL ROUNDER 20 KG PALLET BUY",
        "QuantityOrdered": 52,
        "KitLineType": "e_SalesQuoteKitHeader"
     },{
        "ItemNo": 5,
        "QuoteLineID": "na",
        "InventoryID": "*****",
        "Description": "HYGAIN ZERO 20 KG PALLET BUY",
        "QuantityOrdered": 52,
        "KitLineType": "e_SalesQuoteKitHeader"
     },{
        "ItemNo": 6,
        "QuoteLineID": "na",
        "InventoryID": "*****",
        "Description": "HYGAIN TRACKTORQUE 20 KG PALLET BUY",
        "QuantityOrdered": 52,
        "KitLineType": "e_SalesQuoteKitHeader"
     },{
        "ItemNo": 7,
        "QuoteLineID": "na",
        "InventoryID": "*****",
        "Description": "MITAVITE STUDGRO 20 KG PALLET BUY",
        "QuantityOrdered": 52,
        "KitLineType": "e_SalesQuoteKitHeader"
     },{
        "ItemNo": 8,
        "QuoteLineID": "na",
        "InventoryID": "*****",
        "Description": "IRON HORSE FIBREWELL 20 KG PALLET BUY",
        "QuantityOrdered": 48
     },{
        "ItemNo": 9,
        "QuoteLineID": "na",
        "InventoryID": "*****",
        "Description": "PINE WOODSHAVINGS BALES 14KG 14 KG PALLET BUY",
        "QuantityOrdered": 48,
        "KitLineType": "e_SalesQuoteKitHeader"
     }
    
   ]
}

SO taking HYGAIN ALL ROUNDER 20 KG PALLET BUY as an example,
Kit Style is: Kit,
unit of measure name is: PALLET,
UOM Inner is: BAG,
UOM Quantity Inners is: 52.00,
UOM Quantity Units is: 52,
UOM Purchase: ticked,
UOM Enabled: ticked.

Under Alternate->Components:
Component: HYALL,
Description: HYGAIN ALL ROUNDER 20KG,
Quantity: 1,
cost: 14.00,
Total Cost: 14.00.

The component Inventory Item HYALL, has a UOM of:
Name: PALLET,
Inner: BAG,
Quantity Inners: 52,
Quantity Units: 52,
Purchase: ticked,
Enabled: ticked.

I am not sure how it is generating a discount when converting a quote to an order.
Thank you.
Cheers
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Prices in quotes

Postby JuiceyBrucey » Thu Mar 05, 2026 5:23 pm

**** UPDATE.
I just created a quote with most of the same inventory item selections.
In the quote, prior to conversion to an order, there is no discount applied.
So far, the discount being applied only when converted to an order.
Hope this helps.
Cheers
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Prices in quotes

Postby Mike.Sheen » Thu Mar 05, 2026 5:51 pm

What do I need to do to see the problem?

I've created a new quote in our demo data, and added a kit 1091-K and set the price inc. to be something different than the system determined price - $300.00.

I then saved that quote, and then created a sales order from the quote.

Quote.png


The kit on the sales order was $300.00 inc. gst - the same as the quote.

SalesOrder.png


That to me seems like the expected behaviour.

What happens when you do that in your data? And what about demo data?

You need to remember I don't have the same customer data as you to test your payloads with. But you have the same data as me - the demo data, which is why I always go back to testing on demo data should be your first step before asking us for help.

If you continue to ignore my guidance, I'm afraid I cannot help you any further.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Prices in quotes

Postby JuiceyBrucey » Fri Mar 06, 2026 6:55 am

Attn Mike Sheen: This is probably not the place for it, but I have sent an email as well, I would like to sincerely appologise for my outburst on here yesterday. It was totally uncalled for and will not happen again.
Thank you very much for your assistance.
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Next

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest