Example #1
0
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once '../../include/phprechnung.inc.php';
define('FPDF_FONTPATH', '../../include/font/');
define('EUR', chr(128));
require_once 'mc_table.php';
$pdf = new PDF_MC_Table();
$pdf->Open();
$pdf->AddPage();
$pdf->AliasNbPages();
$pdf->SetY(45);
$pdf->SetFont($PDFFont, '', $PDFFontsize1);
require_once 'pos_pdf.inc.php';
$pdf->Ln();
$pdf->SetFont($PDFFont, '', $PDFFontsize2);
$pdf->SetWidths(array(50, 30));
$pdf->SetAligns(array('L', 'R'));
// Total amount
//
if (isset($CompanyCurrency) && $CompanyCurrency == 'EUR') {
    $Currency = EUR;
} else {
    $Currency = $CompanyCurrency;
}
if (isset($Type) && $Type == 'Booking_Details' or $Type == 'Customer_Booking_Details') {
    $pdf->SetFont($PDFFont, 'BU');
    $pdf->SetX(7.25);
    $qcb = mysql_query("select id, gudang from gl_gudang where area = '{$idarea}' order by gudang asc") or die(mysql_error());
    $jqcb = mysql_num_rows($qcb);
    if ($jqcb == '0') {
        $pdf->Cell(1, 1, "", 1, 0, 'C');
    } else {
        while (list($idgudang, $namagudang) = mysql_fetch_row($qcb)) {
            $pdf->Cell(1, 1, "CORP", 1, 0, 'C');
            $pdf->Cell(1, 1, "RTL", 1, 0, 'C');
            $pdf->Cell(1, 1, "TK", 1, 0, 'C');
            $pdf->Cell(1, 1, "UGC", 1, 0, 'C');
        }
    }
}
$h = 0;
$pdf->SetY(7.3);
$pdf->SetFont('Arial', '', 9);
//ISI TABEL
$str = "select distinct a.merk, b.merk, a.tipekendaraan, c.tipekendaraan, a.jeniskendaraan, d.jeniskendaraan from gl_masterkendaraan as a left join gl_merkkendaraan as b on (a.merk=b.id) left join gl_tipekendaraan as c on (a.tipekendaraan=c.id) inner join gl_jeniskendaraan as d on (a.jeniskendaraan=d.id) ";
//echo $str;
if ($area != '') {
    $str .= " where a.area='{$area}'";
}
$str .= " order by a.merk asc ";
//echo $str;
$query = mysql_query($str) or die(mysql_error());
//print_r($str);
$no = 1;
while (list($idmerk, $merk, $idtipe, $tipe, $idjenis, $jenis) = mysql_fetch_array($query)) {
    $pdf->SetX(0.25);
    /*$pdf->SetWidths(array(1,2,2,2));
$getquerykorporate = str_replace("+", " ", $_GET[query_korporate]);
//instansiasi fpdf
$pdf = new PDF_MC_Table('L', 'cm', 'A4');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetMargins(0.7, 0.7, 0.7, 0.7);
#tampilkan judul laporan
$pdf->SetFont('Arial', 'B', '16');
$pdf->Cell(0, 0, "CIPAGANTI RENTAL CAR & TRAVEL", '0', 1, 'C');
$pdf->Cell(0, 2, "HASIL SEWA KENDARAAN", '0', 1, 'C');
$pdf->SetFont('Arial', 'B', '12');
$pdf->Cell(3, 3, "CABANG : " . $gudang, 0, 0, 'L');
$pdf->Cell(25.2, 3, "PERIODE : " . DateToIndo($mulai) . " - " . DateToIndo($akhir), 0, 0, 'R');
//membuat kop tabel
$y = $pdf->GetY();
$pdf->SetY($y + 2.5);
$pdf->SetFont('Arial', 'B', 11);
$pdf->SetWidths(array(2.3, 2.5, 2.5, 2.5, 3.7, 2.2, 2.2, 2.6, 2.6, 2.6, 2.6));
$pdf->SetHeight(0.1);
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$pdf->Row(array("CSO", "Berangkat", "No. Order", "No. Kendaraan", "Merk Kendaraan", "Periode Awal", "Periode Akhir", "Customer", "T.Sewa", "T.Bayar", "Piutang"));
$pdf->SetFont('Arial', 'B', 9);
$pdf->SetWidths(array(28.3));
$pdf->Row(array("SEWA KENDARAAN RETAIL"));
//ISI TABEL
$pdf->SetFont('Arial', '', 9);
$pdf->SetWidths(array(2.3, 2.5, 2.5, 2.5, 3.7, 2.2, 2.2, 2.6, 2.6, 2.6, 2.6));
$pdf->SetHeight(0.1);
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$query_data = $getquery;
$query = mysql_query($query_data) or die("Query gagal");
Example #4
0
	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once 'phprechnung.inc.php';
define('FPDF_FONTPATH', 'font/');
define('EUR', chr(128));
require_once 'mc_table.php';
$pdf = new PDF_MC_Table();
$pdf->Open();
$pdf->AddPage();
$pdf->AliasNbPages();
if (isset($METHOD_OF_PAY_DATE) && $METHOD_OF_PAY_DATE != 0) {
    if ($Type != 'DeliveryNote') {
        $pdf->SetY(140);
    } else {
        $pdf->SetY(135);
    }
} else {
    $pdf->SetY(135);
}
$pdf->SetFont($PDFFont, '', $PDFFontsize1);
require_once 'pos_pdf.inc.php';
$pdf->Ln(5);
$pdf->SetFont($PDFFont, '', $PDFFontsize2);
$pdf->SetWidths(array(170, 25));
$pdf->SetAligns(array('R', 'R'));
// See if the company currency is set to EUR end print the Euro char
//
if ($CompanyCurrency == 'EUR') {