/** Posting Transfer Dana **/
if ($param['kodeorgpengirim'] == $_SESSION['empl']['lokasitugas']) {
    #=================== Posting Pengirim =====================================
    $param['tanggal'] = tanggalsystem($param['tanggal']);
    $where = "tanggal='" . $param['tanggal'] . "' and kodeorgpengirim='" . $param['kodeorgpengirim'] . "' and kodeorgpenerima='" . $param['kodeorgpenerima'] . "' and nogiro='" . $param['nogiro'] . "'";
    $query = updateQuery($dbname, 'keu_transferdana', array('postingkirim' => 1), $where);
    if (!mysql_query($query)) {
        echo "DB Error : " . mysql_error();
    }
} else {
    # Get PT
    $pt1 = getPT($dbname, $param['kodeorgpengirim']);
    if ($pt1 == false) {
        $pt1 = getHolding($dbname, $param['kodeorgpengirim']);
    }
    $pt2 = getPT($dbname, $param['kodeorgpenerima']);
    if ($pt2 == false) {
        $pt2 = getHolding($dbname, $param['kodeorgpenerima']);
    }
    #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Akun Ayat Silang
    $ayatSilang = '1120400';
    #=================== Posting Penerima =====================================
    $param['tanggal'] = tanggalsystem($param['tanggal']);
    #============================ Extract Data ============================
    $where = "tanggal='" . $param['tanggal'] . "' and kodeorgpengirim='" . $param['kodeorgpengirim'] . "' and kodeorgpenerima='" . $param['kodeorgpenerima'] . "' and nogiro='" . $param['nogiro'] . "'";
    $query = selectQuery($dbname, 'keu_transferdana', '*', $where);
    $data = fetchData($query);
    # Kode Jurnal
    $queryKode = selectQuery($dbname, 'keu_5parameterjurnal', '*', "(noakunkredit<'" . $data[0]['noakunpengirim'] . "' and sampaikredit>'" . $data[0]['noakunpengirim'] . "') or " . "(noakundebet<'" . $data[0]['noakunpenerima'] . "' and sampaidebet>'" . $data[0]['noakunpenerima'] . "')");
    $resKode = fetchData($queryKode);
    foreach ($resKode as $row) {
 if ($tmpPeriod[1] == 12) {
     $bulanLanjut = 1;
     $tahunLanjut = $tmpPeriod[0] + 1;
 } else {
     $bulanLanjut = $tmpPeriod[1] + 1;
     $tahunLanjut = $tmpPeriod[0];
 }
 # Prep Hari untuk periode selanjutnya
 $jmlHari = cal_days_in_month(CAL_GREGORIAN, $bulanLanjut, $tahunLanjut);
 $tglAwal = $tahunLanjut . '-' . addZero($bulanLanjut, 2) . '-01';
 $tglAkhir = $tahunLanjut . '-' . addZero($bulanLanjut, 2) . '-' . addZero($jmlHari, 2);
 #==================== /Prep Periode ===================================
 #==================== Prep Jurnal =====================================
 #=== Extract Data ====
 # Get PT
 $pt = getPT($dbname, $param['kodeorg']);
 if ($pt == false) {
     $pt = getHolding($dbname, $param['kodeorg']);
 }
 # Tanggal dan Kode Jurnal
 $tgl = $tmpPeriod[0] . $tmpPeriod[1] . cal_days_in_month(CAL_GREGORIAN, $tmpPeriod[1], $tmpPeriod[0]);
 $kodejurnal = 'CLSM';
 #==================== Journal Counter ==================
 $nojurnal = $tgl . "/" . $param['kodeorg'] . "/" . $kodejurnal . "/999";
 #==================== Journal Counter ==================
 # Cek apakah tahun sudah ditutup
 $qCek = selectQuery($dbname, 'keu_jurnalht', '*', "nojurnal='" . $nojurnal . "'");
 //        echo "error:".$qCek;
 //        exit;
 $resCek = fetchData($qCek);
 if (!empty($resCek)) {
Exemple #3
0
        $mem->addServer(MEM_HOST, MEM_PORT);
    }
}
$db = new DB();
$db->init(DB_HOST, DB_USER, DB_PASS, DB_NAME);
$db->connect();
$user = new User();
$mo_settings = array();
$mo_request = '';
$mo_plugin = array();
$mo_theme = '';
$mo_theme_floder = '';
$mo_theme_file = '';
mo_load_settings();
$mo_request = mo_analyze();
getPT();
if (count($mo_plugin)) {
    foreach ($mo_plugin as $plugin) {
        require_once $plugin;
    }
}
if ($mo_theme_file) {
    require_once $mo_theme_file;
}
do_action('loadPT');
// Check if logged in or trying to
if ($user->autoLogin()) {
    $user->loadAll($_SESSION['uid']);
    $user->check();
}
do_action('loadBasic');