Skip to main content

Hi,

I looking for a API that updates total price of a demand when Billable flag is set to Fixed.

I tried below api, but only the billable flas is set to Fixed but total price does not change.

 

How do i set the total price is billable is set to fixed?

<root
xmlns:dt='urn:schemas-microsoft-com:datatypes'>
<session email='' alias=''>
<state bc_name='service_order'>
<action name='data'>
<main>
<row number='1'>
<order_id dtype='string' in_var='' out_var=''>CS2501020038@@1</order_id>
</row>
</main>
<demand_material>
<row number='1'>
<demand_id dtype='int' in_var='' out_var=''>9513058</demand_id>
<is_billable in_var='' out_var=''>F</is_billable>
<total_price in_var="" out_var="">100.99</total_price>
</row>
</demand_material>
</action>
</state>
</session>
</root>

 

Thanks,

Robin

Hi Robin,

I am not sure if this is what you are looking for but I took your AP:I, created a new service order with a single material demand and ran that API with the appropriate modifications for the different data:

<root
    xmlns:dt='urn:schemas-microsoft-com:datatypes'>
    <session email='' alias=''>
        <state bc_name='service_order'>
            <action name='data'>
                <main>
                    <row number='1'>
                        <order_id dtype='string' in_var='' out_var=''>SV2505150004@@1</order_id>
                    </row>
                </main>
                <demand_material>
                    <row number='1'>
                        <demand_id dtype='int' in_var='' out_var=''>1823379</demand_id>
                        <is_billable in_var='' out_var=''>F</is_billable>
                        <price in_var="" out_var="">2000</price>
                    </row>
                </demand_material>
            </action>
        </state>
    </session>
</root>

When I did this, the material demand does show the updated information in the material info tab:

 

Then I went to to the Complete Order tab of the Resolve page, saw the value was NA.  Executed a Display Prices as by default the total prices have not yet been calculated on this display screen.  After this, it shows the total value for the row per the supplied data:

 

 

The invoice it generated looked correct also with the pricing:

 

 

Please note, you don’t ‘set’ the total price directly but it is calculated from the unit price * qty.

Perhaps I am not understanding where or what you are trying to do but this seems working to me.


Hi Phil,

 

Because in application when set to Fixed in resolved completion page, the total price input field is enable, so i was focus on total_price and not price itself.

 

It works now thanks again.

 

Robin


Reply