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

Alan Lord alanslists at gmail.com
Wed Oct 11 09:13:34 GMT 2017


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->retrieveCurrentUserInfoFromFile(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();
>                     }





More information about the vtigercrm-developers mailing list