riainvoice/application/helpers/client_helper.php
gandhimathi Bharathirajan c940cb1a2c all files
2017-09-11 14:38:03 +05:30

42 lines
791 B
PHP

<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
* InvoicePlane
*
* @author InvoicePlane Developers & Contributors
* @copyright Copyright (c) 2012 - 2017 InvoicePlane.com
* @license https://invoiceplane.com/license.txt
* @link https://invoiceplane.com
*/
/**
* @param object $client
* @return string
*/
function format_client($client)
{
if ($client->client_surname != "") {
return $client->client_name . " " . $client->client_surname;
}
return $client->client_name;
}
/**
* @param string $gender
* @return string
*/
function format_gender($gender)
{
if ($gender == 0) {
return trans('gender_male');
}
if ($gender == 1) {
return trans('gender_female');
}
return trans('gender_other');
}