What does $bean
stand for in this code:
<?php
// prevents directly accessing this file from a web browser
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
class Process {
function process(&$bean, $event) {
// calculate item profit
$bean->t_profit_c = ($bean->t_sale_price_c - $bean->t_item_cost_c);
// calculate sale profit
if (!empty($bean->t_qty_sold_c)) {
$bean->t_sale_profit_c = ($bean->t_qty_sold_c * $bean->t_profit_c);
}
}
}
?>
And can I use SQL queries in code like this to get other module's field's content to a field in an other?