[Vtigercrm-developers] getting invoice id and product id during event processing

Rishab K rishab.k at vtiger.com
Tue Jul 22 06:14:03 GMT 2014


Chris,

You can find the information about the invoice which is being created in
InvoiceHandler.php(handleEvent Api).
Products related to to the invoice are stored in separate
table(vtiger_inventoryproductrel)

example query to fetch the products related to invoice will be

SELECT productid FROM vtiger_inventoryproductrel INNER JOIN
vtiger_crmentity ON vtiger_crmentity.crmid =
vtiger_inventoryproductrel.productid
AND vtiger_crmentity.deleted=0 WHERE id = '?';

id will be the invoiceid on which the event is getting triggered.


On Tue, Jul 22, 2014 at 7:04 AM, Hamono, Chris (DPC) <Chris.Hamono at sa.gov.au
> wrote:

>  I need to do some post processing when a new invoice is created.
>
> It appears that when a new invoice is created and the onaftersave event is
> fired there is neither a productid nor an invoiceid in the invoice object
> sent to the event.
>
> 1/ When are they created?
> 2/ How do I find this information?
>
> The invoice is being created programmatically if that makes a difference
>
> Chris
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140722/5f871f58/attachment-0001.html>


More information about the vtigercrm-developers mailing list