sparqapi/api/application/helpers/otherincomeform_helper.php
2019-05-09 23:14:41 +05:30

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;
}
}
?>