コード例 #1
0
ファイル: sepa.php プロジェクト: BerlusGmbH/Berlussimo
 case "mandat_mieter_neu_send":
     echo "<hr><br><br><br><br><br><br><br><br><br><br>";
     if (isset($_REQUEST['Button'])) {
         if (!empty($_REQUEST['mv_id'])) {
             $kos_typ = $_REQUEST['M_KOS_TYP'];
             if ($kos_typ == 'Mietvertrag') {
                 $mref = 'MV' . $_REQUEST['mv_id'];
                 $n_art = 'MIETZAHLUNG';
             }
             if ($kos_typ == 'Eigentuemer') {
                 $mref = 'WEG-ET' . $_REQUEST['mv_id'];
                 $n_art = 'HAUSGELD';
             }
             // $mref = 'MV'.$_REQUEST['mv_id'];
             $sep = new sepa();
             if ($sep->check_m_ref($mref)) {
                 fehlermeldung_ausgeben("Mandat {$mref} existiert schon!!!");
             } else {
                 // echo "existiert nicht";
                 if (!empty($_REQUEST['einzugsart']) && !empty($_REQUEST['BEGUENSTIGTER']) && !empty($_REQUEST['NAME']) && !empty($_REQUEST['ANSCHRIFT']) && !empty($_REQUEST['IBAN']) && !empty($_REQUEST['BIC']) && !empty($_REQUEST['BANK']) && !empty($_REQUEST['M_UDATUM']) && !empty($_REQUEST['M_ADATUM']) && !empty($_REQUEST['GK_ID']) && !empty($_REQUEST['GLAEUBIGER_ID'])) {
                     // echo "POST ok";
                     /*
                      * [BEGUENSTIGTER] => Katrin Buchmann c/o Berlus GmbH
                      * [GLAEUBIGER_ID] => DE97ZZZ00000825342
                      * [mv_id] => 861
                      * [einzugsart] => Nur die Summe aus Vertrag
                      * [NAME] => Sanel Sivac
                      * [ANSCHRIFT] => Gartenfelder Str. 76A, 13599 Berlin
                      * [IBAN] => IB389123812939312938
                      * [BIC] => BIC30912931239129312
                      * [BANK] => Berliner Sparkasse
コード例 #2
0
ファイル: class_weg.php プロジェクト: BerlusGmbH/Berlussimo
 function get_eigentumer_id_infos3($e_id)
 {
     $this->eigentuemer_id = $e_id;
     $this->et_code = $e_id;
     if ($this->et_code < 1000) {
         $this->et_code = substr($this->et_code, 1) . $this->et_code . '1';
     }
     if (strlen($this->et_code) > 4) {
         $abs = strlen($this->et_code) - 4;
         $this->et_code = substr($this->et_code, $abs);
     }
     if (isset($this->GLAEUBIGER_ID)) {
         unset($this->GLAEUBIGER_ID);
     }
     $einheit_id = $this->get_einheit_id_from_eigentuemer($e_id);
     $this->einheit_id = $einheit_id;
     $e = new einheit();
     $e->get_einheit_info($einheit_id);
     $this->einheit_kurzname = $e->einheit_kurzname;
     $this->einheit_lage = $e->einheit_lage;
     $this->einheit_qm = $e->einheit_qm;
     $this->einheit_qm_d = $e->einheit_qm_d;
     $det = new detail();
     $versprochene_miete = $det->finde_detail_inhalt('EINHEIT', $einheit_id, 'WEG-KaltmieteINS');
     if ($versprochene_miete) {
         $this->versprochene_miete = nummer_komma2punkt($versprochene_miete);
     }
     $this->einheit_qm_weg_d = $det->finde_detail_inhalt('EINHEIT', $einheit_id, 'WEG-Fläche');
     // kommt als Kommazahl
     if ($this->einheit_qm_weg_d) {
         $this->einheit_qm_weg = nummer_komma2punkt($this->einheit_qm_weg_d);
     } else {
         $this->einheit_qm_weg = $this->einheit_qm;
         $this->einheit_qm_weg_d = $this->einheit_qm_d;
     }
     $this->haus_strasse = $e->haus_strasse;
     $this->haus_nummer = $e->haus_nummer;
     $this->haus_plz = $e->haus_plz;
     $this->haus_stadt = $e->haus_stadt;
     $this->einheit_kurzname = $e->einheit_kurzname;
     $this->objekt_id = $e->objekt_id;
     $this->post_anschrift_haus = "{$this->haus_strasse} {$this->haus_nummer}\n<b>{$this->haus_plz} {$this->haus_stadt}</b>";
     $this->personen_id_arr = $this->get_person_id_eigentuemer_arr($e_id);
     $this->anz_personen = count($this->personen_id_arr);
     for ($a = 0; $a < $this->anz_personen; $a++) {
         $person_id = $this->personen_id_arr[$a]['PERSON_ID'];
         $p = new personen();
         $p->get_person_infos($person_id);
         $this->personen_id_arr[$a]['geschlecht'] = $p->geschlecht;
         if ($p->geschlecht == 'weiblich') {
             if ($this->anz_personen > 1) {
                 $this->personen_id_arr[$a]['anrede_p'] = "Frau {$p->person_vorname} {$p->person_nachname}";
                 $this->personen_id_arr[$a]['anrede_t'] = "Sehr geehrte Frau {$p->person_nachname},";
             } else {
                 $this->personen_id_arr[$a]['anrede_p'] = "Frau\n{$p->person_vorname} {$p->person_nachname}";
                 $this->personen_id_arr[$a]['anrede_t'] = "Sehr geehrte Frau {$p->person_nachname},";
             }
         }
         if ($p->geschlecht == 'männlich') {
             if ($this->anz_personen > 1) {
                 $this->personen_id_arr[$a]['anrede_p'] = "Herr {$p->person_vorname} {$p->person_nachname}";
                 $this->personen_id_arr[$a]['anrede_t'] = "Sehr geehrter Herr {$p->person_nachname},";
             } else {
                 $this->personen_id_arr[$a]['anrede_p'] = "Herr\n{$p->person_vorname} {$p->person_nachname}";
                 $this->personen_id_arr[$a]['anrede_t'] = "Sehr geehrter Herr {$p->person_nachname},";
             }
         }
         if (empty($p->geschlecht)) {
             $this->personen_id_arr[$a]['anrede_p'] = "{$p->person_vorname} {$p->person_nachname}";
             $this->personen_id_arr[$a]['anrede_t'] = "geehrte Damen und Herren,";
         }
         if (isset($p->anschrift)) {
             $this->anschriften[] = $p->anschrift;
             $this->anschriften_p[$person_id] = br2n($p->anschrift);
         }
         if (isset($p->zustellanschrift)) {
             $this->zustellanschriften[] = br2n($p->zustellanschrift);
             $this->zustellanschriften_p[$person_id] = $p->zustellanschrift;
         }
     }
     /* Sortieren nach Geschlecht */
     $this->personen_id_arr1 = array_sortByIndex($this->personen_id_arr, 'geschlecht', SORT_DESC);
     unset($this->personen_id_arr);
     $this->anrede_brief = '';
     /* Anredetext */
     for ($a = 0; $a < $this->anz_personen; $a++) {
         $person_id = $this->personen_id_arr1[$a]['PERSON_ID'];
         if ($a < $this->anz_personen - 1) {
             $this->anrede_brief .= $this->personen_id_arr1[$a]['anrede_t'] . "\n";
             $this->empf_namen_u .= $this->personen_id_arr1[$a]['anrede_p'] . "\n";
         } else {
             /* Kleinbuchstaben zweite Zeile sehr... */
             if ($this->anz_personen > 1) {
                 $this->anrede_brief .= lcfirst($this->personen_id_arr1[$a]['anrede_t'] . "\n");
                 $this->empf_namen_u .= $this->personen_id_arr1[$a]['anrede_p'] . "";
             } else {
                 $this->anrede_brief .= $this->personen_id_arr1[$a]['anrede_t'] . "\n";
                 $this->empf_namen_u .= $this->personen_id_arr1[$a]['anrede_p'] . "";
             }
         }
     }
     /* Anschriften zählen */
     if (isset($this->zustellanschriften)) {
         $this->anz_zustell = count($this->zustellanschriften);
     }
     if (isset($this->anschriften)) {
         $this->anz_anschrift = count($this->anschriften);
     }
     /* Postanschrift kreiren */
     if (!isset($this->anz_anschrift) && !isset($this->anz_zustell)) {
         $this->post_anschrift = "{$this->empf_namen_u}\n{$this->post_anschrift_haus}";
     }
     if (isset($this->anz_anschrift) && !isset($this->anz_zustell)) {
         $this->post_anschrift = br2n($this->anschriften[0]);
     }
     if (!isset($this->anz_anschrift) && isset($this->anz_zustell)) {
         $this->post_anschrift = br2n($this->zustellanschriften[0]);
     }
     if (isset($this->anz_anschrift) && isset($this->anz_zustell)) {
         $this->post_anschrift = br2n($this->zustellanschriften[0]);
     }
     $this->empf_namen = bereinige_string($this->empf_namen_u);
     $gg = new geldkonto_info();
     $gg->geld_konto_ermitteln('Objekt', $this->objekt_id);
     $this->geldkonto_id = $gg->geldkonto_id;
     $this->OBJ_KONTONUMMER = $gg->kontonummer;
     $this->OBJ_BLZ = $gg->blz;
     $this->OBJ_BEGUENSTIGTER = $gg->beguenstigter;
     $this->OBJ_GELD_INSTITUT = $gg->geld_institut;
     $this->OBJ_BIC = $gg->BIC;
     $this->OBJ_IBAN = $gg->IBAN;
     $this->OBJ_IBAN1 = $gg->IBAN1;
     $this->SEPA_MANDAT = 'WEG-ET' . $e_id;
     $this->GLAEUBIGER_ID = '';
     $sep = new sepa();
     if ($sep->check_m_ref($this->SEPA_MANDAT)) {
         $this->SEPA_MANDAT_AKTIV = 1;
         $sep->get_mandat_infos_mref($this->SEPA_MANDAT);
         $this->MAND = $sep->mand;
         $this->BIC = $sep->mand->BIC;
         $this->IBAN = $sep->mand->IBAN;
         $this->NAME = $sep->mand->NAME;
         $this->GLAEUBIGER_ID = $sep->mand->GLAEUBIGER_ID;
     } else {
         $this->SEPA_MANDAT_AKTIV = 0;
         $this->IBAN = 'FEHLT';
         $this->BIC = 'FEHLT';
         $this->NAME = 'FEHLT';
         $d = new detail();
         $glaeubiger_id = $d->finde_detail_inhalt('GELD_KONTEN', $gg->geldkonto_id, 'GLAEUBIGER_ID');
         if ($glaeubiger_id == false) {
             $this->GLAEUBIGER_ID = "<b>Zum Geldkonto wurde die Gläubiger ID nicht gespeichert, siehe DETAILS vom GK</b>";
         } else {
             $this->GLAEUBIGER_ID = $glaeubiger_id;
         }
     }
 }