コード例 #1
0
ファイル: class_weg.php プロジェクト: BerlusGmbH/Berlussimo
 function ihr_pdf_einzeln(Cezpdf &$pdf, $p_id)
 {
     $this->get_hga_profil_infos($p_id);
     $this->p_ihr_gk_id;
     $kk = new kontenrahmen();
     $kontenrahmen_id = $kk->get_kontenrahmen('Geldkonto', $this->p_ihr_gk_id);
     $bb = new buchen();
     $kontostand11 = $bb->kontostand_tagesgenau_bis($this->p_ihr_gk_id, "01.01.{$this->p_jahr}");
     if (!$kontostand11) {
         $kontostand11 = $this->get_kontostand_manuell($this->p_ihr_gk_id, $this->p_jahr . "-01-01");
     }
     $kontostand11_a = nummer_punkt2komma_t($kontostand11);
     $ze = 0;
     $tab_arr[$ze]['TEXT'] = "I. Anfangsbestand 01.01.{$this->p_jahr}";
     $tab_arr[$ze]['SOLL'] = "{$kontostand11_a} € ";
     $tab_arr[$ze]['IST'] = "{$kontostand11_a} € ";
     $ze++;
     $soll_summe_wp = $this->get_soll_betrag_wp(6040, $this->p_wplan_id);
     $soll_summe_wp_a = nummer_punkt2komma_t($soll_summe_wp);
     $tab_arr[$ze]['TEXT'] = "II. Soll-Zuführung zur Rücklage laut WP";
     $tab_arr[$ze]['SOLL'] = "";
     $tab_arr[$ze]['IST'] = "{$soll_summe_wp_a} € ";
     $ze++;
     $iii_arr[] = $this->III_tab_anzeigen_pdf($p_id);
     if (is_array($iii_arr)) {
         $iii_arr = $iii_arr[0];
         for ($a = 0; $a < sizeof($iii_arr); $a++) {
             $text3 = $iii_arr[$a]['TEXT'];
             $ist3 = $iii_arr[$a]['IST'];
             $tab_arr[$ze]['TEXT'] = $text3;
             $tab_arr[$ze]['IST'] = $ist3;
             $ze++;
         }
     }
     $soll_endbestand = $kontostand11 + $soll_summe_wp;
     $soll_endbestand_a = nummer_punkt2komma_t($soll_endbestand);
     $tab_arr[$ze]['TEXT'] = "IV. Soll-Endbestand 31.12.{$this->p_jahr}";
     $tab_arr[$ze]['SOLL'] = "";
     $tab_arr[$ze]['IST'] = "{$soll_endbestand_a} € ";
     $n_jahr = $this->p_jahr + 1;
     $kontostand11 = $bb->kontostand_tagesgenau_bis($this->p_ihr_gk_id, "01.01.{$n_jahr}");
     if (!$kontostand11) {
         $kontostand11 = $this->get_kontostand_manuell($this->p_ihr_gk_id, $this->p_jahr . "-12-31");
     }
     $kontostand11_a = nummer_punkt2komma_t($kontostand11);
     $ze++;
     $tab_arr[$ze]['TEXT'] = "V. Endbestand 31.12.{$this->p_jahr}";
     $tab_arr[$ze]['SOLL'] = "";
     $tab_arr[$ze]['IST'] = "{$kontostand11_a} € ";
     $this->footer_zahlungshinweis = $bpdf->zahlungshinweis;
     $pdf->setColor(0.6, 0.6, 0.6);
     $pdf->filledRectangle(50, 690, 500, 15);
     $pdf->setColor(0, 0, 0);
     $pdf->ezSety(720);
     // $pdf->ezSetY(650);
     $datum = date("d.m.Y");
     $p = new partners();
     $p->get_partner_info($_SESSION['partner_id']);
     $pdf->ezText("{$p->partner_ort}, den {$datum}", 10, array('justification' => 'right'));
     $pdf->ezSetY(705);
     $o = new objekt();
     $o->get_objekt_infos($this->p_objekt_id);
     $pdf->ezText(" <b>Entwicklung der Instandhaltungsrücklage {$this->p_jahr} | OBJEKT: {$o->objekt_kurzname}</b>", 10, array('justification' => 'full'));
     $pdf->ezSetDy(-15);
     $pdf->ezStopPageNumbers();
     // seitennummerirung beenden
     $p = new partners();
     $p->get_partner_info($_SESSION['partner_id']);
     $cols = array('TEXT' => "", 'IST' => "IST-BETRAG");
     $pdf->ezTable($tab_arr, $cols, "", array('rowGap' => 1.5, 'showLines' => 1, 'showHeadings' => 1, 'shaded' => 1, 'shadeCol' => array(0.9, 0.9, 0.9), 'titleFontSize' => 7, 'fontSize' => 10, 'xPos' => 'left', 'xOrientation' => 'right', 'width' => 500, 'cols' => array('TEXT' => array('justification' => 'left'), 'SOLL' => array('justification' => 'right', 'width' => 100), 'IST' => array('justification' => 'right', 'width' => 100))));
     $this->get_hga_profil_infos($p_id);
     $d = new detail();
     $anteile_g = $d->finde_detail_inhalt('OBJEKT', $this->p_objekt_id, 'Gesamtanteile');
     $einheiten_arr = $this->einheiten_weg_tabelle_arr($this->p_objekt_id);
     $anz_einheiten = count($einheiten_arr);
     $anz_konten = count($tab_arr);
     $gkkk = new geldkonto_info();
     $gkkk->geld_konto_details($this->p_ihr_gk_id);
     $datum_heute = date("d.m.Y");
     $kontostand_aktuell = nummer_punkt2komma_t($bb->kontostand_tagesgenau_bis($this->p_ihr_gk_id, "{$datum_heute}"));
     for ($a = 0; $a < $anz_einheiten; $a++) {
         $pdf->ezNewPage();
         $e_kn = $einheiten_arr[$a]['EINHEIT_KURZNAME'];
         $einheit_id = $einheiten_arr[$a]['EINHEIT_ID'];
         $einheit_anteile = $d->finde_detail_inhalt('EINHEIT', $einheit_id, 'WEG-Anteile');
         $pdf->setColor(0.6, 0.6, 0.6);
         $pdf->filledRectangle(50, 690, 500, 15);
         $pdf->setColor(0, 0, 0);
         $pdf->ezSety(720);
         $pdf->ezText("{$p->partner_ort}, den {$datum}", 10, array('justification' => 'right'));
         $pdf->ezSetDy(-2);
         $pdf->ezText("<b> Anteil in der Instandhaltungsrücklage für {$e_kn} | OBJEKT: {$o->objekt_kurzname} {$this->p_jahr}</b>", 10, array('justification' => 'full'));
         $pdf->ezSetDy(-10);
         $pdf->ezText("<b>Geldkontobezeichnung:</b> {$gkkk->geldkonto_bez}", 9);
         $pdf->ezText("<b>Geldinstitut:</b> {$gkkk->kredit_institut}", 9);
         $pdf->ezText("<b>IBAN:</b> {$gkkk->IBAN1}", 9);
         $pdf->ezText("<b>BIC:</b> {$gkkk->BIC}", 9);
         for ($b = 0; $b < $anz_konten; $b++) {
             $tab_arr_e[$b]['TEXT'] = $tab_arr[$b]['TEXT'];
             $tab_arr_e[$b]['IST'] = $tab_arr[$b]['IST'];
             $tab_arr_e[$b]['ANTEIL'] = nummer_punkt2komma_t(nummer_komma2punkt(str_replace('.', '', $tab_arr[$b]['IST'])) / $anteile_g * $einheit_anteile) . " € ";
         }
         $pdf->ezSetDy(-15);
         $cols = array('TEXT' => "", 'IST' => "IST-BETRAG");
         $pdf->ezTable($tab_arr, $cols, "", array('rowGap' => 1.5, 'showLines' => 1, 'showHeadings' => 1, 'shaded' => 1, 'shadeCol' => array(0.9, 0.9, 0.9), 'titleFontSize' => 7, 'fontSize' => 10, 'xPos' => 'left', 'xOrientation' => 'right', 'width' => 500, 'cols' => array('TEXT' => array('justification' => 'left'), 'SOLL' => array('justification' => 'right', 'width' => 100), 'IST' => array('justification' => 'right', 'width' => 100))));
         $pdf->ezSetDy(-15);
         $cols = array('TEXT' => "", 'IST' => "IST-BETRAG", 'ANTEIL' => "IHR ANTEIL");
         $pdf->ezTable($tab_arr_e, $cols, "", array('rowGap' => 1.5, 'showLines' => 1, 'showHeadings' => 1, 'shaded' => 1, 'shadeCol' => array(0.9, 0.9, 0.9), 'titleFontSize' => 7, 'fontSize' => 10, 'xPos' => 'left', 'xOrientation' => 'right', 'width' => 500, 'cols' => array('TEXT' => array('justification' => 'left'), 'ANTEIL' => array('justification' => 'right', 'width' => 100), 'IST' => array('justification' => 'right', 'width' => 100))));
         unset($tab_arr_e);
         /* WEG LAUTERSTR 2014 */
         $pdf->ezSetDy(-15);
         $cols_laut = array('TXT' => "", 'BETRAG' => "");
         $tab_laut[0]['TXT'] = "Kontostand des IHR-Geldkontos vom {$datum_heute}";
         $tab_laut[0]['BETRAG'] = "{$kontostand_aktuell} € ";
         $pdf->ezTable($tab_laut, $cols_laut, "Zusatzinformationen", array('rowGap' => 1.5, 'showLines' => 1, 'showHeadings' => 0, 'shaded' => 1, 'shadeCol' => array(0.9, 0.9, 0.9), 'titleFontSize' => 7, 'fontSize' => 10, 'xPos' => 'left', 'xOrientation' => 'right', 'width' => 500, 'cols' => array('TXXT' => array('justification' => 'left'), 'BETRAG' => array('justification' => 'right', 'width' => 100))));
     }
 }