<?php if (isset($_POST['apa']) && $_POST['apa'] != "") { //include '../inc/tes.php'; //include 'class.po.php'; include 'po/class.po.php'; $data = new po_po(); switch ($_POST['apa']) { case "isi-daftar-supplier": include 'supplier/class.supplier.php'; $supplier = new supplier(); if ($daftar = $supplier->daftar_supplier()) { while ($rs = $daftar->fetch_array()) { echo "<option value='" . $rs['id'] . "'>" . stripslashes($rs['nama']) . ", " . $rs['alamat'] . "</option>"; } } break; case "isi-daftar-do": if (isset($_POST['tglAwal']) && isset($_POST['tglAkhir'])) { include 'do/class.do.php'; $do = new do_do(); if ($daftar = $do->daftar_do("%", "%", $_POST['tglAwal'], $_POST['tglAkhir'], "2")) { while ($rs = $daftar->fetch_array()) { echo "<option value='" . $rs['id'] . "'>" . $rs['no'] . ", " . $rs['tgl_do'] . ", " . stripslashes($rs['nama']) . ", " . $rs['nama_area'] . "</option>"; } } } break; case "isi-daftar-item-do": if (isset($_POST['idDO'])) { include 'do/class.do.php';
<?php session_start(); include "../inc/blob.php"; include "../po/class.po.php"; require_once "../inc/PHPExcel.php"; $data = new po_po(); $idLogin = $_SESSION['media-id']; $objExcel = PHPExcel_IOFactory::load("../template-report/penerimaan-barang.xls"); $objWriter = new PHPExcel_Writer_Excel5($objExcel); $objPrintedSign = new PHPExcel_Worksheet_Drawing(); $tglAwal = $_GET['tglAwal']; $tglAkhir = $_GET['tglAkhir']; $supplier = $_GET['supplier']; $namaSupplier = $_GET['namasupplier']; $objExcel->setActiveSheetIndex(0); $styleBorder = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN))); $styleCenter = array('alignment' => array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER)); $q = "SELECT nama, ttd FROM karyawan WHERE id = '{$idLogin}'"; if ($query = $data->runQuery($q)) { while ($rs = $query->fetch_array()) { $printedBy = $rs['nama']; $ttdPrintedBy = $rs['ttd'] != null ? $rs['ttd'] : "-"; } } $objExcel->getActiveSheet()->SetCellValue('C3', $tglAwal . " s/d " . $tglAkhir); $objExcel->getActiveSheet()->SetCellValue('C4', $namaSupplier); $startRow = 7; $amount = 0; $totalHarga = 0; $totalJumlah = 0;
<?php session_start(); include "../inc/blob.php"; include "../po/class.po.php"; require_once "../inc/PHPExcel.php"; $data = new po_po(); $idLogin = $_SESSION['media-id']; $objExcel = PHPExcel_IOFactory::load("../template-report/all-po.xls"); $objWriter = new PHPExcel_Writer_Excel5($objExcel); $objPrintedSign = new PHPExcel_Worksheet_Drawing(); $tglAwal = $_GET['tglAwal']; $tglAkhir = $_GET['tglAkhir']; $supplier = $_GET['supplier']; $namaSupplier = $_GET['namasupplier']; $objExcel->setActiveSheetIndex(0); $styleBorder = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN))); $styleCenter = array('alignment' => array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER)); $q = "SELECT nama, ttd FROM karyawan WHERE id = '{$idLogin}'"; if ($query = $data->runQuery($q)) { while ($rs = $query->fetch_array()) { $printedBy = $rs['nama']; $ttdPrintedBy = $rs['ttd'] != null ? $rs['ttd'] : "-"; } } $objExcel->getActiveSheet()->SetCellValue('C3', $tglAwal . " s/d " . $tglAkhir); $objExcel->getActiveSheet()->SetCellValue('C4', $namaSupplier); $startRow = 7; $totalBiaya = 0; if ($query = $data->getDaftarPO("%", $supplier, $tglAwal, $tglAkhir, "%")) { while ($rs = $query->fetch_array()) {
<?php error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); date_default_timezone_set('Europe/London'); define('EOL', PHP_SAPI == 'cli' ? PHP_EOL : '<br \\>'); include "../inc/blob.php"; include "../po/class.po.php"; require_once "../inc/PHPExcel.php"; include "../inc/phpqrcode/qrlib.php"; // DEFINE ALL CLASSES $data = new po_po(); $objExcel = PHPExcel_IOFactory::load("../template-report/each-po.xls"); $objWriter = new PHPExcel_Writer_Excel5($objExcel); $objOrderedSign = new PHPExcel_Worksheet_Drawing(); $objApprovedSign = new PHPExcel_Worksheet_Drawing(); $id = $_GET['id']; $layout = $_GET['layout']; $objExcel->setActiveSheetIndex(0); // DEFINE STYLES MAY NEED IN EXCEL DOCUMENT $styleBorder = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN))); $styleCenter = array('alignment' => array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER)); // RETRIEVE DATA AND BIND IN VARIABLES $q = "SELECT `po`.*, `supplier`.`nama`,`supplier`.`alamat`,`supplier`.`telp`, `supplier`.`email`,`supplier`.`cp` FROM `po` \n\t\t\tINNER JOIN `supplier` ON `supplier`.`id` = `po`.`id_supplier`\n\t\t\tWHERE `po`.`id` = '{$id}'"; if ($query = $data->runQuery($q)) { while ($rs = $query->fetch_array()) { $noPO = $rs['no_po']; $tglPO = date("d-m-Y", strtotime($rs['tgl_po'])); $top = $rs['top']; $tglKirim = date("d-m-Y", strtotime($rs['tgl_kirim']));