17 lines
486 B
PHP
17 lines
486 B
PHP
<?php
|
|
|
|
class Otherincomeform
|
|
{
|
|
public static function getIncomeDetails($values){
|
|
$values = array_map(function($tag) {
|
|
return array(
|
|
'source' => $tag['source']==1 ? $tag['others_source'] : $tag['source_master'],
|
|
'amount' => $tag['amount'],
|
|
'frequency' => $tag['frequency']==1 ? $tag['others_frequency'] : $tag['frequency_master'],
|
|
'earned_by' => $tag['income_earned_by'][0]['name']
|
|
);
|
|
}, $values);
|
|
return $values;
|
|
}
|
|
}
|
|
?>
|