<div dir="ltr"><div>Hi Alan,<br><br>Calculations of lineitems and inventory record are depending on the element which passed for vtws_revise. So while adding / updating any lineitem of Inventory record, first get the element using vtws_retrieve and call vtws_revise. <br></div><br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b><span style="font-family:verdana,sans-serif"><span style="color:rgb(153,153,153)"><span style="background-color:rgb(255,255,255)">regards,</span></span><br>Satish.Dvnk</span></b><br></div></div></div>
<br><div class="gmail_quote">On Wed, Oct 11, 2017 at 2:43 PM, Alan Lord <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have some custom code which is modifying a Quote.<br>
<br>
It adds some lineitems as below. But none of the total/taxes boxes that are displayed below the Quote line items are being populated/calculated as part of this revise process.<br>
<br>
Anyone know if I'm doing something wrong?<br>
<br>
TIA<br>
<br>
Al<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
        require_once('include/Webservi<wbr>ces/Revise.php');<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
foreach($recHW as $prod) {<br>
                    if(!in_array($prod['id'], $currentLineItems)) {<br>
                            $id = vtws_getWebserviceEntityId('Pr<wbr>oducts', $prod['id']);<br>
                        $products[] = array('productid' => $id, 'listprice' => $prod['listprice'], 'quantity' => '1');<br>
                    }<br>
                }<br>
                if($products) {<br>
                    try {<br>
                        $user = new Users();<br>
                        $current_user = $user->retrieveCurrentUserInfo<wbr>FromFile(Users::<wbr>getActiveAdminId());<br>
                        $wsid = vtws_getWebserviceEntityId($mo<wbr>duleName, $crmid);<br>
                        $data = array (<br>
                           'id'=> $wsid,<br>
                           'LineItems' => $products,<br>
                        );<br>
                        $log->debug("About to update the line items of the quote");<br>
                        $log->debug("Data: " . print_r($data,true));<br>
                        $ent = vtws_revise($data, $current_user);<br>
                        $log->debug(print_r($ent,true)<wbr>);<br>
                    } catch (WebServiceException $ex) {<br>
                            echo $ex->getMessage();<br>
                    }<br>
</blockquote>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>