Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Map field from opportunities to invoices
#1
Hi there.

Using ‘Opportunity No.’ as the main project number / reference.

I need to include it in an invoice, but I am having difficulty bringing it into the invoice module.

I think I remember doing something similar before in the editviewutils.php file by manipulating the getConvertQuoteToInvoice function.

But, here the field I need is in the opportunities / potential module, and only the opportunity name is brought into quotes / salesorders module.

Can anyone advise where I should be looking please?


PS Has anyone done up a logout button yet? Also, should 'fieldexpressions' now be used over workflow? What is the thinking behind this? Just started working with CoreBOS. Look forward to contributing.
Reply
#2
Hi Ronan. Thank you for collaborate with coreBOS project

ronankeane Wrote:Hi there.

Using ‘Opportunity No.’ as the main project number / reference.

I need to include it in an invoice, but I am having difficulty bringing it into the invoice module.

I think I remember doing something similar before in the editviewutils.php file by manipulating the getConvertQuoteToInvoice function.

But, here the field I need is in the opportunities / potential module, and only the opportunity name is brought into quotes / salesorders module.

Can anyone advise where I should be looking please?

If the Opportunity No is your identifier you have to unset the actual entity identifier "Opportunity Name". With the next script you can unset the potentialname field and set the potential_no, after that you will can see the potential_no in all the registers that are related with Opportunity.
Code:
<?php

// Turn on debugging level
$Vtiger_Utils_Log = true;

require_once 'include/utils/utils.php';
include_once('vtlib/Vtiger/Module.php');
require_once('config.inc.php');

$module = Vtiger_Module::getInstance('Potentials');

$module->unsetEntityIdentifier();//This unset the potentialname like a entity identifeir

$field = VTiger_Field::getInstance('potential_no',$module); //Now you get the field that you want to entity identifier

$module->setEntityIdentifier($field);//And finally you set this field.

?>

ronankeane Wrote:PS Has anyone done up a logout button yet?

The logout button exist is on top right, is a door with arrow.

ronankeane Wrote:Also, should 'fieldexpressions' now be used over workflow? What is the thinking behind this? Just started working with CoreBOS. Look forward to contributing.

The field formulas are dead, we will try to delete this code because the workflows are more powerfull than this, and is better to add more functuonallity to workflows than support this old code.

Thank you , again.
Reply
#3
I found this interesting and I've created a new entry in the wiki.

<!-- m --><a class="postlink" href="http://corebos.org/documentation/doku.php?id=en:devel:entityidentifier">http://corebos.org/documentation/doku.p ... identifier</a><!-- m -->
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)