Skip to content

vtws_revise on a quote remove all product/services lines

I have this issue since vTiger 6.3 (haven't tested before) and i'm using a custom function in a workflow to add a potential id to a quote :

($entity is the quote data i got from the function call : function createPotentialFromQuote( $entity ))
$data   = [ 'id' => $entity->data['id'], 'potential_id' => $potential['id'] ];
vtws_revise( $data, $current_user );

I can reproduce it each time, all the product/services lines from the quote are gone.

Adding LineItems in the array to revise seems to fix the issue :

$data   = [ 'id' => $entity->data['id'], 'potential_id' => $potential['id'], 'LineItems' => $entity->data['LineItems'] ];