342 |
$amenagement_terrain=""; |
$amenagement_terrain=""; |
343 |
|
|
344 |
//Terrain |
//Terrain |
345 |
$amenagement_terrain .= ((isset($this->row[$nom.'1']))?$this->maj(substr(floor($this->row['am_terr_surf']),0,7)):0)."|"; |
$amenagement_terrain .= ((isset($this->row['am_terr_surf'])) ? $this->maj(substr(floor($this->row['am_terr_surf']),0,7)) : 0)."|"; |
346 |
|
|
347 |
//Lotissement |
//Lotissement |
348 |
$amenagement_terrain .= ((isset($this->row['am_lotiss']) && $this->maj($this->row['am_lotiss']) == 't') ? 1 : 0)."|"; |
$amenagement_terrain .= ((isset($this->row['am_lotiss']) && $this->maj($this->row['am_lotiss']) == 't') ? 1 : 0)."|"; |
422 |
|
|
423 |
$shon = ""; |
$shon = ""; |
424 |
|
|
425 |
$shon .= ((isset($this->row[$nom.'1']))?$this->maj(substr(floor($this->row[$nom.'1']),0,7)):0)."|"; |
$shon .= ((isset($this->row[$nom.'1'])) ? $this->maj(substr(floor($this->row[$nom.'1']),0,7)) : 0)."|"; |
426 |
$shon .= ((isset($this->row[$nom.'2']))?$this->maj(substr(floor($this->row[$nom.'2']),0,7)):0)."|"; |
$shon .= ((isset($this->row[$nom.'2'])) ? $this->maj(substr(floor($this->row[$nom.'2']),0,7)) : 0)."|"; |
427 |
$shon .= ((isset($this->row[$nom.'3']))?$this->maj(substr(floor($this->row[$nom.'3']),0,7)):0)."|"; |
$shon .= ((isset($this->row[$nom.'3'])) ? $this->maj(substr(floor($this->row[$nom.'3']),0,7)) : 0)."|"; |
428 |
$shon .= ((isset($this->row[$nom.'4']))?$this->maj(substr(floor($this->row[$nom.'4']),0,7)):0)."|"; |
$shon .= ((isset($this->row[$nom.'4'])) ? $this->maj(substr(floor($this->row[$nom.'4']),0,7)) : 0)."|"; |
429 |
$shon .= ((isset($this->row[$nom.'5']))?$this->maj(substr(floor($this->row[$nom.'5']),0,7)):0)."|"; |
$shon .= ((isset($this->row[$nom.'5'])) ? $this->maj(substr(floor($this->row[$nom.'5']),0,7)) : 0)."|"; |
430 |
$shon .= ((isset($this->row[$nom.'6']))?$this->maj(substr(floor($this->row[$nom.'6']),0,7)):0)."|"; |
$shon .= ((isset($this->row[$nom.'6'])) ? $this->maj(substr(floor($this->row[$nom.'6']),0,7)) : 0)."|"; |
431 |
$shon .= ((isset($this->row[$nom.'7']))?$this->maj(substr(floor($this->row[$nom.'7']),0,7)):0)."|"; |
$shon .= ((isset($this->row[$nom.'7'])) ? $this->maj(substr(floor($this->row[$nom.'7']),0,7)) : 0)."|"; |
432 |
$shon .= ((isset($this->row[$nom.'8']))?$this->maj(substr(floor($this->row[$nom.'8']),0,7)):0)."|"; |
$shon .= ((isset($this->row[$nom.'8'])) ? $this->maj(substr(floor($this->row[$nom.'8']),0,7)) : 0)."|"; |
433 |
$shon .= ((isset($this->row[$nom.'9']))?$this->maj(substr(floor($this->row[$nom.'9']),0,7)):0)."|"; |
$shon .= ((isset($this->row[$nom.'9'])) ? $this->maj(substr(floor($this->row[$nom.'9']),0,7)) : 0)."|"; |
434 |
|
|
435 |
return $shon; |
return $shon; |
436 |
} |
} |
478 |
|
|
479 |
$destination = ""; |
$destination = ""; |
480 |
|
|
481 |
$destination .= ((isset($this->row['co_sp_transport']) && $this->maj($this->row['co_anx_pisc']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_sp_transport']) && $this->row['co_sp_transport'] == 't') ? 1 : 0); |
482 |
$destination .= ((isset($this->row['co_sp_enseign']) && $this->maj($this->row['co_sp_enseign']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_sp_enseign']) && $this->row['co_sp_enseign'] == 't') ? 1 : 0); |
483 |
$destination .= ((isset($this->row['co_sp_sante']) && $this->maj($this->row['co_sp_sante']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_sp_sante']) && $this->row['co_sp_sante'] == 't') ? 1 : 0); |
484 |
$destination .= ((isset($this->row['co_sp_act_soc']) && $this->maj($this->row['co_sp_act_soc']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_sp_act_soc']) && $this->row['co_sp_act_soc'] == 't') ? 1 : 0); |
485 |
$destination .= ((isset($this->row['co_sp_ouvr_spe']) && $this->maj($this->row['co_sp_ouvr_spe']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_sp_ouvr_spe']) && $this->row['co_sp_ouvr_spe'] == 't') ? 1 : 0); |
486 |
$destination .= ((isset($this->row['co_sp_culture']) && $this->maj($this->row['co_sp_culture']) == 't') ? 1 : 0)."|"; |
$destination .= ((isset($this->row['co_sp_culture']) && $this->row['co_sp_culture'] == 't') ? 1 : 0)."|"; |
487 |
|
|
488 |
$destination .= ((isset($this->row['dm_tot_log_nb']) && $this->maj($this->row['dm_tot_log_nb']) == 't') ? 1 : 0)."|"; |
$destination .= ((isset($this->row['dm_tot_log_nb']) && !empty($this->row['dm_tot_log_nb'])) ? $this->row['dm_tot_log_nb'] : 0)."|"; |
489 |
$destination .= ((isset($this->row['co_tot_ind_nb']) && $this->maj($this->row['co_tot_ind_nb']) == 't') ? 1 : 0)."|"; |
$destination .= ((isset($this->row['co_tot_ind_nb']) && !empty($this->row['co_tot_ind_nb'])) ? $this->row['co_tot_ind_nb'] : 0)."|"; |
490 |
$destination .= ((isset($this->row['co_tot_coll_nb']) && $this->maj($this->row['co_tot_coll_nb']) == 't') ? 1 : 0)."|"; |
$destination .= ((isset($this->row['co_tot_coll_nb']) && !empty($this->row['co_tot_coll_nb'])) ? $this->row['co_tot_coll_nb'] : 0)."|"; |
491 |
$destination .= ((isset($this->row['co_tot_log_nb']) && $this->maj($this->row['co_tot_log_nb']) == 't') ? 1 : 0)."|"; |
$destination .= ((isset($this->row['co_tot_log_nb']) && !empty($this->row['co_tot_log_nb'])) ? $this->row['co_tot_log_nb'] : 0)."|"; |
492 |
|
|
493 |
$destination .= ((isset($this->row['co_resid_agees']) && $this->maj($this->row['co_resid_agees']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_resid_agees']) && $this->row['co_resid_agees']) ? 1 : 0); |
494 |
$destination .= ((isset($this->row['co_resid_etud']) && $this->maj($this->row['co_resid_etud']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_resid_etud']) && $this->row['co_resid_etud']) ? 1 : 0); |
495 |
$destination .= ((isset($this->row['co_resid_tourism']) && $this->maj($this->row['co_resid_tourism']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_resid_tourism']) && $this->row['co_resid_tourism']) ? 1 : 0); |
496 |
$destination .= ((isset($this->row['co_resid_hot_soc']) && $this->maj($this->row['co_resid_hot_soc']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_resid_hot_soc']) && $this->row['co_resid_hot_soc']) ? 1 : 0); |
497 |
$destination .= ((isset($this->row['co_resid_soc']) && $this->maj($this->row['co_resid_soc']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_resid_soc']) && $this->row['co_resid_soc']) ? 1 : 0); |
498 |
$destination .= ((isset($this->row['co_resid_hand']) && $this->maj($this->row['co_resid_hand']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_resid_hand']) && $this->row['co_resid_hand']) ? 1 : 0); |
499 |
$destination .= ((isset($this->row['co_resid_autr']) && $this->maj($this->row['co_resid_autr']) == 't') ? 1 : 0)."|"; |
$destination .= ((isset($this->row['co_resid_autr']) && $this->row['co_resid_autr']) ? 1 : 0)."|"; |
500 |
|
|
501 |
$destination .= ((isset($this->row['co_resid_autr_desc']) && $this->maj($this->row['co_resid_autr_desc']) == 't') ? 1 : 0)."|"; |
$destination .= (isset($this->row['co_resid_autr_desc']) ? $this->maj($this->row['co_resid_autr_desc']) : "")."|"; |
502 |
|
|
503 |
$destination .= ((isset($this->row['co_uti_pers']) && $this->maj($this->row['co_uti_pers']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_uti_pers']) && $this->row['co_uti_pers']) ? 1 : 0); |
504 |
$destination .= ((isset($this->row['co_uti_princ']) && $this->maj($this->row['co_uti_princ']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_uti_princ']) && $this->row['co_uti_princ']) ? 1 : 0); |
505 |
$destination .= ((isset($this->row['co_uti_secon']) && $this->maj($this->row['co_uti_secon']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_uti_secon']) && $this->row['co_uti_secon']) ? 1 : 0); |
506 |
$destination .= ((isset($this->row['co_uti_vente']) && $this->maj($this->row['co_uti_vente']) == 't') ? 1 : 0); |
$destination .= ((isset($this->row['co_uti_vente']) && $this->row['co_uti_vente']) ? 1 : 0); |
507 |
$destination .= ((isset($this->row['co_uti_loc']) && $this->maj($this->row['co_uti_loc']) == 't') ? 1 : 0)."|"; |
$destination .= ((isset($this->row['co_uti_loc']) && $this->row['co_uti_loc']) ? 1 : 0)."|"; |
508 |
|
|
509 |
$destination .= ((isset($this->row['co_foyer_chamb_nb']) && $this->maj($this->row['co_foyer_chamb_nb']) == 't') ? 1 : 0)."|"; |
$destination .= ((isset($this->row['co_foyer_chamb_nb']) && !empty($this->row['co_foyer_chamb_nb'])) ? $this->row['co_foyer_chamb_nb'] : 0)."|"; |
510 |
|
|
511 |
return $destination; |
return $destination; |
512 |
} |
} |
521 |
|
|
522 |
$repartitionFinan = ""; |
$repartitionFinan = ""; |
523 |
|
|
524 |
$repartitionFinan .= ((isset($this->row['co_fin_lls_nb']) && $this->maj($this->row['co_fin_lls_nb']) == 't') ? 1 : 0)."|"; |
$repartitionFinan .= ((isset($this->row['co_fin_lls_nb']) && $this->row['co_fin_lls_nb']) ? $this->row['co_fin_lls_nb'] : 0)."|"; |
525 |
$repartitionFinan .= ((isset($this->row['co_fin_aa_nb']) && $this->maj($this->row['co_fin_aa_nb']) == 't') ? 1 : 0)."|"; |
$repartitionFinan .= ((isset($this->row['co_fin_aa_nb']) && $this->row['co_fin_aa_nb']) ? $this->row['co_fin_aa_nb'] : 0)."|"; |
526 |
$repartitionFinan .= ((isset($this->row['co_fin_ptz_nb']) && $this->maj($this->row['co_fin_ptz_nb']) == 't') ? 1 : 0)."|"; |
$repartitionFinan .= ((isset($this->row['co_fin_ptz_nb']) && $this->row['co_fin_ptz_nb']) ? $this->row['co_fin_ptz_nb'] : 0)."|"; |
527 |
$repartitionFinan .= ((isset($this->row['co_fin_autr_nb']) && $this->maj($this->row['co_fin_autr_nb']) == 't') ? 1 : 0)."|"; |
$repartitionFinan .= ((isset($this->row['co_fin_autr_nb']) && $this->row['co_fin_autr_nb']) ? $this->row['co_fin_autr_nb'] : 0)."|"; |
528 |
|
|
529 |
return $repartitionFinan; |
return $repartitionFinan; |
530 |
} |
} |
603 |
return $contenu; |
return $contenu; |
604 |
} |
} |
605 |
|
|
606 |
|
/** |
607 |
|
* Permet de mettre en forme les données du mouvement suivi pour une ouverture de chantier |
608 |
|
* @return string chaîne en forme |
609 |
|
*/ |
610 |
function chantier(){ |
function chantier(){ |
611 |
//datereoc| |
|
612 |
$suivi1=""; |
$chantier=""; |
613 |
$suivi1.=substr($this->row['date_chantier'],8,2).substr($this->row['date_chantier'],5,2). |
|
614 |
substr($this->row['date_chantier'],0,4)."|"; // *** au format francais |
if(isset($this->row['doc_date'])) { |
615 |
//nblogoc|nbmaisoc|nbcolloc| |
$chantier .= substr($this->row['doc_date'],8,2).substr($this->row['doc_date'],5,2). |
616 |
$suivi1.=$this->p('nblogoc')."|".$this->p('nbmaisoc')."|".$this->p('nbcolloc')."|"; |
substr($this->row['doc_date'],0,4)."|"; // *** au format francais |
617 |
//shonoc| |
} else { |
618 |
$suivi1.=floor($this->row['shon'])."|"; // ok *** enlever les decimales |
$chantier .= "|"; |
619 |
//*finisoc*|*finaaoc*|*finptzoc*|*finafoc|*indoc*| |
} |
620 |
$suivi1.=$this->p('finisoc')."|".$this->p('finaaoc')."|". |
$chantier .= ((isset($this->row['doc_nb_log']) AND $this->row['doc_nb_log'] != "" ) ? $this->row['doc_nb_log'] : "vm")."|"; |
621 |
$this->p('finptzoc')."|".$this->p('finafoc')."|".$this->p('indoc')."|"; |
$chantier .= ((isset($this->row['doc_nb_log_indiv']) AND $this->row['doc_nb_log_indiv'] != "" ) ? $this->row['doc_nb_log_indiv'] : "vm")."|"; |
622 |
$suivi1.="|||||||||||"; // achevement 11| |
$chantier .= ((isset($this->row['doc_nb_log_coll']) AND $this->row['doc_nb_log_coll'] != "" ) ? $this->row['doc_nb_log_coll'] : "vm")."|"; |
623 |
return $suivi1; |
$chantier .= ((isset($this->row['doc_surf']) AND $this->row['doc_surf'] != "" ) ? substr(floor($this->row['doc_surf']),0,7) : "vm")."|"; |
624 |
|
$chantier .= ((isset($this->row['doc_nb_log_lls']) AND $this->row['doc_nb_log_lls'] != "" ) ? $this->row['doc_nb_log_lls'] : "vm")."|"; |
625 |
|
$chantier .= ((isset($this->row['doc_nb_log_aa']) AND $this->row['doc_nb_log_aa'] != "" ) ? $this->row['doc_nb_log_aa'] : "vm")."|"; |
626 |
|
$chantier .= ((isset($this->row['doc_nb_log_ptz']) AND $this->row['doc_nb_log_ptz'] != "" ) ? $this->row['doc_nb_log_ptz'] : "vm")."|"; |
627 |
|
$chantier .= ((isset($this->row['doc_nb_log_autre']) AND $this->row['doc_nb_log_autre'] != "" ) ? $this->row['doc_nb_log_autre'] : "vm")."|"; |
628 |
|
// indice de la tranche commencée |
629 |
|
$chantier .= "vm|"; |
630 |
|
|
631 |
|
$chantier.="|||||||||||"; // achevement 11| |
632 |
|
return $chantier; |
633 |
} |
} |
634 |
|
|
635 |
function achevement(){ |
function achevement(){ |
636 |
$suivi2="||||||||||"; // occupation 10 | |
$achevement="||||||||||"; // occupation 10 | |
637 |
//datereat| |
if(isset($this->row['daact_date'])) { |
638 |
$suivi2.=substr($this->row['date_achevement'],8,2). |
$achevement .= substr($this->row['daact_date'],8,2).substr($this->row['daact_date'],5,2). |
639 |
substr($this->row['date_achevement'],5,2). |
substr($this->row['daact_date'],0,4)."|"; // *** au format francais |
640 |
substr($this->row['date_achevement'],0,4)."|"; // ok *** au format francais |
} else { |
641 |
//nblogat|nbmaisat|nbcollat| |
$achevement .= "|"; |
642 |
$suivi2.=$this->p('nblogat')."|".$this->p('nbmaisat')."|".$this->p('nbcollat')."|"; |
} |
643 |
//shonat| |
$achevement .= ((isset($this->row['daact_nb_log']) AND $this->row['daact_nb_log'] != "" ) ? $this->row['daact_nb_log'] : "vm")."|"; |
644 |
$suivi2.=floor($this->row['shon'])."|"; // ok *** enlever les decimales |
$achevement .= ((isset($this->row['daact_nb_log_indiv']) AND $this->row['daact_nb_log_indiv'] != "" ) ? $this->row['daact_nb_log_indiv'] : "vm")."|"; |
645 |
//finisat|finaaat|finptzat|finafat|indat| |
$achevement .= ((isset($this->row['daact_nb_log_coll']) AND $this->row['daact_nb_log_coll'] != "" ) ? $this->row['daact_nb_log_coll'] : "vm")."|"; |
646 |
$suivi2.=$this->p('finisat')."|".$this->p('finaaat')."|".$this->p('finptzat'). |
$achevement .= ((isset($this->row['daact_surf']) AND $this->row['daact_surf'] != "" ) ? substr(floor($this->row['daact_surf']),0,7) : "vm")."|"; |
647 |
"|".$this->p('finafat')."|".$this->p('indat')."|"; |
$achevement .= ((isset($this->row['daact_nb_log_lls']) AND $this->row['daact_nb_log_lls'] != "" ) ? $this->row['daact_nb_log_lls'] : "vm")."|"; |
648 |
|
$achevement .= ((isset($this->row['daact_nb_log_aa']) AND $this->row['daact_nb_log_aa'] != "" ) ? $this->row['daact_nb_log_aa'] : "vm")."|"; |
649 |
|
$achevement .= ((isset($this->row['daact_nb_log_ptz']) AND $this->row['daact_nb_log_ptz'] != "" ) ? $this->row['daact_nb_log_ptz'] : "vm")."|"; |
650 |
|
$achevement .= ((isset($this->row['daact_nb_log_autre']) AND $this->row['daact_nb_log_autre'] != "" ) ? $this->row['daact_nb_log_autre'] : "vm")."|"; |
651 |
|
// indice de la tranche complétée |
652 |
|
$achevement .= "vm|"; |
653 |
// Finchantier 1 si etat=cloturer sinon 0 |
// Finchantier 1 si etat=cloturer sinon 0 |
654 |
if ($this->row['etat']=="cloturer"){ |
if ($this->row['statut_di']=="cloture"){ |
655 |
$suivi2.="1|"; |
$achevement.="1|"; |
656 |
}else{ |
}else{ |
657 |
$suivi2.="0|"; |
$achevement.="0|"; |
658 |
} |
} |
659 |
// Origat 1 par defaut |
// indique la provenance de l'info d'achèvement des travaux (déclaration/DGI) |
660 |
$suivi2.=$this->p('origat'); |
$achevement .= "vm|"; |
661 |
return $suivi2; |
return $achevement; |
662 |
} |
} |
663 |
|
|
664 |
function p($champ){ |
function p($champ){ |
694 |
*/ |
*/ |
695 |
function testVM($champ) { |
function testVM($champ) { |
696 |
if ( $champ == "" ) { |
if ( $champ == "" ) { |
697 |
return "Vm"; |
return "vm"; |
698 |
} else { |
} else { |
699 |
return $champ; |
return $champ; |
700 |
} |
} |