Correction affichage chiffre d'affaire

This commit is contained in:
Michael RICOIS 2009-10-29 09:55:13 +00:00
parent ff0c083d0f
commit 6850657474

View File

@ -526,16 +526,18 @@ function identite_capital($capital, $capitaldev, $capitallib, $capitaltype, $bil
function identite_ca($bilan, $trancheCALib)
{
global $firephp;
$firephp->log($bilan, 'bilan');
$lib = 'Chiffre d\'affaire';
$title = '';
if(isset($bilan['CA'])) $title.='Chiffre d\'affaire de '.moneyKM($bilan['CA']).deviseText($bilan['Devise']);
if(isset($bilan['Resultat'])) $title.=' et Résultat de '.moneyKM($bilan['Resultat']).deviseText($bilan['Devise']);
if(isset($bilan['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$bilan['Cloture']));
if(isset($bilan['CA']) && !empty($bilan['CA']) ) $title.='Chiffre d\'affaire de '.moneyKM($bilan['CA']).deviseText($bilan['Devise']);
if(isset($bilan['Resultat']) && !empty($bilan['Resultat']) ) $title.=' et Résultat de '.moneyKM($bilan['Resultat']).deviseText($bilan['Devise']);
if(isset($bilan['Cloture']) && !empty($bilan['Cloture']) ) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$bilan['Cloture']));
if(isset($bilan['CA']) && (!isset($trancheCALib) || $trancheCALib=='N/C'))
if(isset($bilan['CA']) && !empty($bilan['CA']) && ( !isset($trancheCALib) || $trancheCALib=='N/C'))
{
$data = moneyKM($bilan['CA']).deviseText($bilan['Devise']).' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$bilan['Cloture']));
}elseif(isset($trancheCALib) && $trancheCALib!='N/C'){
}elseif( !empty($trancheCALib) && $trancheCALib!='N/C'){
$data = strWsToHtml($trancheCALib);
}else{
$data = 'N/C';