Пример #1
0
        //	$pdf->MultiCell(175,7,$isselectline,1,'C');
    }
    //display pdf
    $pdf->Output();
    exit(1);
} else {
    include_once "menu.php";
    include_once 'class/Log.php';
    include_once 'class/SelectCtrl.php';
    include_once "../../class/datepicker/class.datepicker.php";
    $dp = new datepicker("{$tableprefix}");
    $dp->dateFormat = 'Y-m-d';
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
    $ctrl = new SelectCtrl();
    $accountsctrl = $ctrl->getSelectAccounts(0, 'N');
    $periodfrom = $ctrl->getSelectPeriod(0, 'Y', "", "period_from");
    $periodto = $ctrl->getSelectPeriod(0, 'Y', "", "period_to");
    $showDateFrom = $dp->show("datefrom");
    $showDateTo = $dp->show("dateto");
    $datefrom = getMonth(date("Ymd", time()), 0);
    $dateto = getMonth(date("Ymd", time()), 1);
    echo <<<EOF
<table border='1'>
<tbody>
<tr><TH colspan='4' style='text-align: center'>Criterial</TH></tr>
\t<FORM name='frmIncome' method='POST' atarget="_blank" action="viewincome.php">
\t<tr>
\t\t<Td class='head'>Account From</Td>
\t\t<Td  class='odd'><input name='accounts_codefrom' value="{$accounts_codefrom}"></Td>
\t\t<Td class='head'>Account To</Td>
\t\t<Td class='odd'><input name='accounts_codeto' value="{$accounts_codeto}"></Td>
Пример #2
0
     $wherestring=" WHERE bpartner_id>=0 ";
     $o->getSelectBpartner($wherestring);
     $getHandler->completeGet();
     break;*/
 case "edit":
     include "menu.php";
     //    include_once 'class/Employee.php';
     //    $empclass = new Employee();
     //    $empclass->fetchEmployee( $employee_id);
     if ($o->fetchBatch($o->batch_id)) {
         //success fetch data
         $save->checkCurrentVersionRecord("updated", "sim_hr_batch", $o->updated, "batch_id", $o->batch_id);
         if ($o->period_id == "") {
             $o->period_id = 0;
         }
         $o->periodctrl = $ctrl->getSelectPeriod($o->period_id, 'N');
         $o->orgctrl = $ctrl->selectionOrg($o->createdby, $defaultorganization_id, 'N', "", 'Y');
         $o->getInputForm("edit", 0, $token);
         //$o->getBatchlineform();
     } else {
         //failed fetch data
     }
     require XOOPS_ROOT_PATH . '/footer.php';
     break;
 case "search":
     include "menu.php";
     $o->getIncludeFileMenu();
     $o->showSearchForm();
     require XOOPS_ROOT_PATH . '/footer.php';
     break;
 case "getdeparment":
    //display pdf
    //$pdf->Output("doc.pdf","D");
    $pdf->Output("Accounts.pdf", "I");
    exit(1);
} else {
    include_once "menu.php";
    include_once 'class/Log.php';
    include_once 'class/SelectCtrl.php';
    include_once "../../class/datepicker/class.datepicker.php";
    $dp = new datepicker("{$tableprefix}");
    $dp->dateFormat = 'Y-m-d';
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
    $ctrl = new SelectCtrl();
    $accountsctrlfrom = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codefrom");
    $accountsctrlto = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codeto");
    $periodctrl = $ctrl->getSelectPeriod(0, 'Y');
    $showDateFrom = $dp->show("datefrom");
    $showDateTo = $dp->show("dateto");
    $datefrom = getMonth(date("Ymd", time()), 0);
    $dateto = getMonth(date("Ymd", time()), 1);
    echo <<<EOF
<table border='1'>
<tbody>
<tr><TH colspan='4' style='text-align: center'>Criterial</TH></tr>
\t<FORM name='frmTrialBalance' method='POST' target="_blank" >
\t<tr>
\t\t<!--
\t\t<Td class='head'>Account From</Td>
\t\t<Td  class='odd'><input name='accounts_codefrom1' value="{$accounts_codefrom}"></Td>
\t\t<Td class='head'>Account To</Td>
\t\t<Td class='odd'><input name='accounts_codeto1' value="{$accounts_codeto}"></Td>-->
Пример #4
0
 //When user submit new organization
 case "create":
     // if the token is exist and not yet expired
     $log->showLog(4, "Accessing create record event, with financialyear name={$o->financialyear_name}");
     if ($s->check(true, $token, "CREATE_ACG")) {
         if ($o->isValid($o->periodfrom_id, $o->periodto_id)) {
             if ($o->insertFinancialYear()) {
                 $latest_id = $o->getLatestFinancialYearID();
                 $l->createFinancialYearLine($latest_id, $o->periodfrom_id, $o->periodto_id);
                 $o->periodqty = $l->createdline + $o->periodqty;
                 $o->updateFinancialYear();
                 redirect_header("financialyear.php?action=edit&financialyear_id={$latest_id}", $pausetime, "Your data is saved, the new id={$latest_id}");
             } else {
                 $token = $s->createToken($tokenlife, "CREATE_ACG");
                 $o->orgctrl = $ctrl->selectionOrg($o->createdby, $o->organization_id, 'N', "", 'Y');
                 $o->periodfromctrl = $ctrl->getSelectPeriod($o->periodfrom_id, 'N', "", "periodfrom_id");
                 $o->periodtoctrl = $ctrl->getSelectPeriod($o->periodto_id, 'N', "", "periodto_id");
                 $o->getInputForm("new", -1, $token);
                 $o->showFinancialYearTable("WHERE financialyear_id>0 and organization_id={$defaultorganization_id}", "ORDER BY f.financialyear_name");
             }
         } else {
             $log->showLog(1, "Error: Record cannot create, please verified your input!");
             $token = $s->createToken($tokenlife, "CREATE_ACG");
             $o->orgctrl = $ctrl->selectionOrg($o->createdby, $o->organization_id, 'N', "", 'Y');
             $o->periodfromctrl = $ctrl->getSelectPeriod($o->periodfrom_id, 'N', "", "periodfrom_id");
             $o->periodtoctrl = $ctrl->getSelectPeriod($o->periodto_id, 'N', "", "periodto_id");
             $o->getInputForm("new", -1, $token);
             $o->showFinancialYearTable("WHERE financialyear_id>0 and organization_id={$defaultorganization_id}", "ORDER BY f.financialyear_name");
         }
     } else {
         // if the token is not valid or the token is expired, it back to previous form with previous inputed data