dealIncomplete
dealIncomplete($data, $options = array())
Description:
Incomplete - closing date is tomorrow or greater; not all TodoValues have been received.
Options:
You can pass $todoStats if you have them.
Example:
//
$dealIncomplete = $this->Deals->dealIncomplete($data);
//
echo 'This Deal is ' . ($dealIncomplete ? 'complete' : 'incomplete') . '.';
/**
* Incomplete - closing date is tomorrow or greater; not all TodoValues have been received.
*
* $data array() Deal
* return Boolean
*/
public function dealIncomplete($data, $options = array()) {
//
$return = false;
//
if (!$data) {
//
return $return;
}
//
$defaults = array(
'todoStats' => array()
,
);
//
$options = am($defaults , $options);
//
$closingDate = $this->closingDate($data);
//
if (date('Y-m-d') <= date('Y-m-d', $closingDate)) {
//
return $return;
}
//
if (empty($options['todoStats'])) {
//
$totals = $this->TodoValue->todoValueCount($data, $options);
} else {
//
$totals = $options['todoStats'];
}
//
return $totals['empty'];
}