[Vtigercrm-developers] Access quote lineitems from custom module

lajeesh k lajeeshk at gmail.com
Thu Feb 5 15:23:24 GMT 2015


Use getAssociatedProducts function  in include/utils/EditViewUtils.php

$focus = CRMEntity::getInstance($module);
$focus->id = $recordId;
$related_products = getAssociatedProducts($module,$focus);




Regards,
Lajeesh

On Thu, Feb 5, 2015 at 3:53 PM, Uma S <uma.s at vtiger.com> wrote:

> Hi,
>
> Using getProducts() api on Inventory record model, will get information
> regarding line-items linked with inventory modules (SalesOrder/ Quotes/
> Invoice/ PurchaseOrder).
>
> On Thu, Feb 5, 2015 at 1:11 PM, Alan Lord <alanslists at gmail.com> wrote:
>
>> On 04/02/15 22:22, Richard Hills - Technologywise wrote:
>>
>>> I am now doing this as follows:
>>>
>>>                  include_once 'modules/Quotes/QuotePDFController.php';
>>>>                 $controller = new Vtiger_QuotePDFController('Quotes');
>>>> $controller->loadRecord(vtlib_purify($request->get('quote')));
>>>>                 foreach($controller->associated_products as $lineitem)
>>>> ...
>>>>
>>> Happy to hear of any better methods.
>>>
>>
>> I haven't looked at the Quote/Inventory design but I would have thought
>> you should be simply getting the Record model for the
>> Quote/SalesOrder/Invoice. I would have assumed that the line item data will
>> be present (or accessible) in the Record itself.
>>
>> HTH
>>
>> Al
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
>
> --
> With
> Best Regards
> Uma.S
> Vtiger Team
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150205/2fa54c49/attachment.html>


More information about the vtigercrm-developers mailing list