[Vtigercrm-developers] Is it possible to get the vtiger_quotestagehistory table to set a custom date field when a quote first become e.g 'delivered'

Alan Lord alanslists at gmail.com
Fri Jun 21 06:58:51 GMT 2019


Hi

Grepping the source I see the function get_quotestagehistory in the 
Quotes class so you could probably modify this for information 
retrieval. In include/utils/InventoryUtils.php is the function 
addInventoryHistory which is where the history table is written to.

But tbh - I'd probably just write a custom workflow function to populate 
your custom date field(s) with "NOW()" when whatever condition occurs 
that you want. I don't see any need to hack core code to do this.

HTH

Al

FWIW - for other customers we have created a kind of "sub module" which 
records a "snapshot" of the status of a record, e.g. a Contract, when 
some condition happens (defined in workflows) and stores various fields 
and dates of that module into a separate table when it reaches a certain 
state. These "Contract History" records are displayed like any other 
related module. I can't think of a reason why, if it was to be made into 
an entity module it couldn't be used in Reports and things too.



On 20/06/2019 22:32, ian_hammersley wrote:
> hi guys,
> 
> i'd like to do this for all quotes we have in vtiger for the past few years.
> 
> i want to see how many quotes were set to a certain quote stage by month.
> 
> to confirm, i have :
> 
> created a date field on the quote with the label of 'date of approved'
> i want to set the date, that the quote first became 'current project'
> (which is one of our quote stages)
> 
> 
> i can see the vtiger_quotestagehistory showing me the quoteid and when it
> first became each stage, but how can i get this to date stamp this field?
> 
> we have the workflow designer, if that helps.
> 
> thanks everyone!
> 
> Ian
> 
> 
> 
> --
> Sent from: http://vtiger-crm.2324883.n4.nabble.com/vtigercrm-developers-f4.html
> _______________________________________________
> http://www.vtiger.com/
> 




More information about the vtigercrm-developers mailing list