[Vtigercrm-developers] vtws_revise not calculating totals on Inventory modules?

Satish Dvnk satish.dvnk at vtiger.com
Wed Oct 11 09:58:18 GMT 2017


Hi Alan,

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.




*regards,Satish.Dvnk*

On Wed, Oct 11, 2017 at 2:43 PM, Alan Lord <alanslists at gmail.com> wrote:

> I have some custom code which is modifying a Quote.
>
> 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.
>
> Anyone know if I'm doing something wrong?
>
> TIA
>
> Al
>
>
>         require_once('include/Webservices/Revise.php');
>>
>
> foreach($recHW as $prod) {
>>                     if(!in_array($prod['id'], $currentLineItems)) {
>>                             $id = vtws_getWebserviceEntityId('Products',
>> $prod['id']);
>>                         $products[] = array('productid' => $id,
>> 'listprice' => $prod['listprice'], 'quantity' => '1');
>>                     }
>>                 }
>>                 if($products) {
>>                     try {
>>                         $user = new Users();
>>                         $current_user = $user->retrieveCurrentUserInfo
>> FromFile(Users::getActiveAdminId());
>>                         $wsid = vtws_getWebserviceEntityId($moduleName,
>> $crmid);
>>                         $data = array (
>>                            'id'=> $wsid,
>>                            'LineItems' => $products,
>>                         );
>>                         $log->debug("About to update the line items of
>> the quote");
>>                         $log->debug("Data: " . print_r($data,true));
>>                         $ent = vtws_revise($data, $current_user);
>>                         $log->debug(print_r($ent,true));
>>                     } catch (WebServiceException $ex) {
>>                             echo $ex->getMessage();
>>                     }
>>
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20171011/3651854d/attachment.html>


More information about the vtigercrm-developers mailing list