OK so here's what I have:
here is my logic_hooks.php file
Code:
<?php
$hook_version = 1;
$hook_array = Array();
$hook_array['before_save'] = Array(1,'Calculating field', 'custom/modules/AOS_Quotes/downpaymentcalc.php','calculate_field_class', 'calculate_field_function');
?>
In the downpaymentcalc.php
Code:
<?php
Class calculate_field_class
{
function calculate_field_function()
{
$bean->downpayment_c = $bean->total_amount / 2;
}
}
?> Both are in the /custom/modules/AOS_Quotes directory.
Will this work on existing DB entries? Or do I need to start from a new Quote?
Thanks
Bookmarks