当前位置: 首页>>代码示例>>PHP>>正文


PHP DateModules::Now方法代码示例

本文整理汇总了PHP中DateModules::Now方法的典型用法代码示例。如果您正苦于以下问题:PHP DateModules::Now方法的具体用法?PHP DateModules::Now怎么用?PHP DateModules::Now使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DateModules的用法示例。


在下文中一共展示了DateModules::Now方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveDoc

function saveDoc()
{
    $obj = new ACC_docs();
    PdoDataAccess::FillObjectByArray($obj, $_POST);
    $obj->CycleID = $_SESSION["accounting"]["CycleID"];
    $obj->BranchID = $_SESSION["accounting"]["BranchID"];
    if ($obj->DocID == "") {
        $obj->RegDate = DateModules::Now();
        $obj->regPersonID = $_SESSION['USER']["PersonID"];
        $obj->DocDate = empty($obj->DocDate) ? PDONOW : $obj->DocDate;
        $return = $obj->Add();
    } else {
        $return = $obj->Edit();
    }
    if (!$return) {
        echo Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString());
        die;
    }
    /*$dt = PdoDataAccess::runquery("select count(*) from ACC_docs where DocID<? 
    		AND CycleID=" . $_SESSION["accounting"]["CycleID"] . 
    		" AND BranchID=" . $_SESSION["accounting"]["BranchID"] , array($obj->DocID));
    	echo Response::createObjectiveResponse(true, $dt[0][0] + 1);*/
    echo Response::createObjectiveResponse(true, "");
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:25,代码来源:doc.data.php

示例2: GetSavingLoanInfo

function GetSavingLoanInfo()
{
    if (isset($_SESSION["USER"]["portal"])) {
        $PersonID = $_SESSION["USER"]["PersonID"];
    } else {
        $PersonID = $_REQUEST["PersonID"];
    }
    //----------- check for all docs confirm --------------
    /*$dt = PdoDataAccess::runquery("select group_concat(distinct LocalNo) from ACC_docs 
    		join ACC_DocItems using(DocID) join ACC_tafsilis t using(TafsiliType,TafsiliID)
    		where TafsiliType=" . TAFTYPE_PERSONS . " 
    			AND ObjectID = ? AND CostID in(" . COSTID_saving . ")
    			AND DocType not in(" . DOCTYPE_STARTCYCLE . "," . DOCTYPE_ENDCYCLE . ")
    			AND DocStatus not in('CONFIRM','ARCHIVE')", array($PersonID));
    	if(count($dt) > 0 && $dt[0][0] != "")
    	{
    		$msg = "اسناد با شماره های [" . $dt[0][0] . "] تایید نشده اند.";
    		echo dataReader::getJsonData(array(), 0, $_GET["callback"], $msg);
    		die();
    	}*/
    //------------ get sum of savings ----------------
    $dt = PdoDataAccess::runquery("\n\t\tselect DocDate,sum(CreditorAmount-DebtorAmount) amount\n\t\tfrom ACC_DocItems di\n\t\t\tjoin ACC_docs d using(DocID)\n\t\t\tjoin ACC_tafsilis t using(TafsiliType,TafsiliID)\n\t\t\n\t\twhere TafsiliType=" . TAFTYPE_PERSONS . " \n\t\t\tAND ObjectID = ?\n\t\t\tAND CostID in(" . COSTID_saving . ")\n\t\t\tAND DocType not in(" . DOCTYPE_STARTCYCLE . "," . DOCTYPE_ENDCYCLE . ")\n\t\t\tAND BranchID=" . $_SESSION["accounting"]["BranchID"] . "\n\t\tgroup by DocDate\n\t\torder by DocDate", array($PersonID));
    if (count($dt) == 0) {
        $msg = "شخص مورد نظر فاقد حساب پس انداز می باشد";
        echo dataReader::getJsonData(array(), 0, $_GET["callback"], $msg);
        die;
    }
    //------------ get the Deposite amount -------------
    $totalAmount = 0;
    $totalDays = 0;
    for ($i = 1; $i < count($dt); $i++) {
        $days = DateModules::GDateMinusGDate($dt[$i]["DocDate"], $dt[$i - 1]["DocDate"]);
        $totalDays += $days;
        $totalAmount += $dt[$i - 1]["amount"] * $days;
    }
    $days = DateModules::GDateMinusGDate(DateModules::Now(), $dt[$i - 1]["DocDate"]);
    $totalDays += $days;
    $totalAmount += $dt[$i - 1]["amount"] * $days;
    $average = round($totalAmount / $totalDays);
    $returnArray = array("PersonID" => $PersonID, "FirstDate" => DateModules::miladi_to_shamsi($dt[0]["DocDate"]), "AverageAmount" => $average, "TotalMonths" => floor($totalDays / 30.5));
    echo dataReader::getJsonData($returnArray, 1, $_GET["callback"]);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:43,代码来源:saving.data.php

示例3: round

            $d = round($total - $y * 365.25 - $m * 30.4375);
            $history .= "<td align=right colspan=3>سنوات غير قابل قبول : " . $y . " سال و " . $m . " ماه و " . $d . " روز" . "</td></tr>";
            //----------------------------------------------
            $tags = array('<!--history-->' => $history);
            $content = str_replace(array_keys($tags), array_values($tags), $content);
            echo $content;
            if (!isset($data[$i])) {
                break;
            }
            echo "<div class='pageBreak'></div>";
        }
        $prof1 = $prof2 = "";
        if ($data[$i][person_type] == HR_PROFESSOR) {
            $prof1 = '<tr><td style="background-color:#F0F3FF">مرتبه :</td><td style="font-weight:bold">' . $data[$i][science_level_title] . '</td>
						  <td style="background-color:#F0F3FF">پايه :</td><td style="font-weight:bold">' . $data[$i][base] . '</td></tr>';
            if ($data[$i][exe_to_date] == "" || $data[$i][exe_to_date] == "0000-00-00" || DateModules::CompareDate($data[$i][exe_to_date], DateModules::Now()) > 0) {
                $prof2 = '<tr><td style="background-color:#F0F3FF">سمت اجرايي :</td><td style="font-weight:bold">' . $data[$i][exe_post_title] . '</td>
							  <td style="background-color:#F0F3FF">تاريخ سمت اجرايي :</td><td style="font-weight:bold">' . DateModules::miladi_to_shamsi($data[$i][exe_from_date]) . '</td></tr>';
            } else {
                $prof2 = '<tr><td style="background-color:#F0F3FF">سمت اجرايي :</td><td style="font-weight:bold"></td>
							  <td style="background-color:#F0F3FF">تاريخ سمت اجرايي :</td><td style="font-weight:bold"></td></tr>';
            }
        }
        $tags = array('<!--post_title-->' => $data[$i][person_type] == HR_WORKER ? 'عنوان شغل' : 'عنوان پست', '<!--fname-->' => $data[$i][pfname], '<!--lname-->' => $data[$i][plname], '<!--father_name-->' => $data[$i][father_name], '<!--staff_id-->' => $data[$i][staff_id], '<!--birth_date-->' => DateModules::miladi_to_shamsi($data[$i][birth_date]), '<!--birth_place-->' => $data[$i][birth_place], '<!--idcard_no-->' => $data[$i][idcard_no], '<!--national_code-->' => $data[$i][national_code], '<!--prof1-->' => $prof1, '<!--worktime_type-->' => $data[$i][worktime_type_title], '<!--military_type-->' => $data[$i][military_type_title], '<!--education_level-->' => $data[$i][education_level_title], '<!--field_title-->' => $data[$i][sf_sb_title], '<!--doc_date-->' => DateModules::miladi_to_shamsi($data[$i][doc_date]), '<!--studyPlace-->' => $data[$i][study_palce], '<!--razm-->' => $data[$i][razmAmount], '<!--janbaz-->' => $data[$i][janbazAmount], '<!--unit-->' => $data[$i][unitName], '<!--emp_state-->' => $data[$i][emp_state_title], '<!--post_no-->' => $data[$i][post_no], '<!--last_post_title-->' => $data[$i][post_title], '<!--prof2-->' => $prof2, '<!--now-->' => DateModules::shNow());
        // مشخص کردن فایل template  مربوط به خلاصه پرونده
        $content = file_get_contents("../../reports/summary_doc.htm");
        $content = str_replace(array_keys($tags), array_values($tags), $content);
        $cur_staff = $data[$i][staff_id];
        $index = $i;
        $row_index = $i;
        $history = "";
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:employment_history.php

示例4: AND

}

$qry = " " ; 
$selectStr = "" ; 

if(!empty($_POST['HavePost']) && $_POST['HavePost'] == 1 ){
	
	$qry = "  LEFT  JOIN managmnt_extra_bylaw_items bi
							ON(p.post_id = bi.post_id)
			  LEFT  JOIN management_extra_bylaw b 
							ON(bi.bylaw_id = b.bylaw_id) " ; 	
	
	$selectStr = ", bi.value mng_value " ; 
	
	$where.= " AND (((b.from_date <= '".DateModules::Now()."' AND ( b.to_date >= '".DateModules::Now()."' OR b.to_date IS NULL OR b.to_date = '0000-00-00')) OR bi.post_id IS NULL)) AND
				((pep.to_date IS NULL OR pep.to_date = '0000-00-00' OR pep.to_date >='".DateModules::Now()."')) " ; 		
}

$query = " SELECT s.staff_id , ps.PersonID, ps.pfname, ps.plname,
					p.post_no ,p.post_id , p.title, g2j(pep.from_date) from_date , pep.to_date to_date ,
					CASE p.included WHEN 1 THEN 'بلي' WHEN NULL THEN 'خير' END included_title,
					bi1.Title post_type_title, p.ouid /* , concat(o1.ptitle, ',', o.ptitle ) full_path */ $selectStr

				FROM professor_exe_posts pep

						INNER JOIN position p
								ON (pep.post_id = p.post_id )

						INNER JOIN staff s
								ON (pep.staff_id = s.staff_id)
开发者ID:jafarkhani,项目名称:rtfund,代码行数:30,代码来源:professor_posts_report.php

示例5: elseif

                } else {
                    $prof2 = '<tr><td style="background-color:#F0F3FF">سمت اجرايي :</td><td style="font-weight:bold"></td>
							  <td style="background-color:#F0F3FF">تاريخ سمت اجرايي :</td><td style="font-weight:bold"></td></tr>';
                }
            }
            $ptitle = "";
            if ($valid_writs[$k - 1][person_type] == HR_WORKER) {
                $ptitle = 'عنوان شغل';
            } elseif ($valid_writs[$k - 1][person_type] == HR_PROFESSOR) {
                $ptitle = 'عنوان پست';
            } elseif ($valid_writs[$k - 1][person_type] == HR_EMPLOYEE) {
                $ptitle = 'عنوان حکم';
            }
            $tags = array('<!--post_title-->' => $ptitle, '<!--fname-->' => $valid_writs[$k - 1][pfname], '<!--lname-->' => $valid_writs[$k - 1][plname], '<!--father_name-->' => $valid_writs[$k - 1][father_name], '<!--staff_id-->' => $valid_writs[$k - 1][staff_id], '<!--birth_date-->' => DateModules::miladi_to_shamsi($valid_writs[$k - 1][birth_date]), '<!--birth_place-->' => $valid_writs[$k - 1][birth_place], '<!--idcard_no-->' => $valid_writs[$k - 1][idcard_no], '<!--national_code-->' => $valid_writs[$k - 1][national_code], '<!--prof1-->' => $prof1, '<!--worktime_type-->' => $valid_writs[$k - 1][worktime_type_title], '<!--military_type-->' => $valid_writs[$k - 1][military_type_title], '<!--education_level-->' => $valid_writs[$k - 1][education_level_title], '<!--field_title-->' => $valid_writs[$k - 1][sf_sb_title], '<!--doc_date-->' => DateModules::miladi_to_shamsi($valid_writs[$k - 1][doc_date]), '<!--studyPlace-->' => $valid_writs[$k - 1][study_palce], '<!--razm-->' => $valid_writs[$k - 1][razmAmount], '<!--janbaz-->' => $valid_writs[$k - 1][janbazAmount], '<!--unit-->' => $valid_writs[$k - 1][unitName], '<!--emp_state-->' => $valid_writs[$k - 1][emp_state_title], '<!--post_no-->' => $valid_writs[$k - 1][post_no], '<!--last_post_title-->' => $valid_writs[$k - 1][post_title], '<!--prof2-->' => $prof2, '<!--unit_Title-->' => $valid_writs[$k - 1][Unit_Title], '<!--caption-->' => $valid_writs[$k - 1][person_type] == HR_EMPLOYEE ? "عنوان حکم :" : "عنوان پست :", '<!--now-->' => DateModules::shNow());
            if (isset($_REQUEST['Param1']) && $_REQUEST['Param1'] == 2) {
                $TodayDate = DateModules::Now();
                $totalDay = DateModules::getDateDiff($TodayDate, $valid_writs[$k - 1][birth_date]);
                $yAge = (int) ($totalDay / 365.25);
                $mAge = (int) (($totalDay - $yAge * 365.25) / 30.4375);
                $dAge = round($totalDay - $yAge * 365.25 - $mAge * 30.4375);
                $report .= "<tr>\n\t\t\t\t\t\t\t<td>" . $valid_writs[$k - 1][staff_id] . "</td>\n\t\t\t\t\t\t\t<td>" . $valid_writs[$k - 1][pfname] . "</td>\n\t\t\t\t\t\t\t<td>" . $valid_writs[$k - 1][plname] . "</td>\n\t\t\t\t\t\t\t<td>" . DateModules::miladi_to_shamsi($valid_writs[$k - 1][birth_date]) . "</td>\n\t\t\t\t\t\t\t<td>" . $valid_writs[$k - 1][Unit_Title] . "</td> \n\t\t\t\t\t\t\t<td>" . $valid_writs[$k - 1][science_level_title] . "</td> \n\t\t\t\t\t\t\t<td>" . $valid_writs[$k - 1][national_code] . "</td>\n\t\t\t\t\t\t\t<td>" . $yAge . " سال و " . $mAge . " ماه و " . $dAge . " روز" . "</td>\n\t\t\t\t\t\t";
            }
            // مشخص کردن فایل template  مربوط به خلاصه پرونده
            if (isset($_REQUEST['Param1']) && $_REQUEST['Param1'] == 2) {
                $content = file_get_contents("../../reports/employment_history.htm");
            } else {
                $content = file_get_contents("../../reports/summary_doc.htm");
            }
            $content = str_replace(array_keys($tags), array_values($tags), $content);
            //......................................
            $keys = array_keys($history_row);
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:summary_doc.php

示例6: AddMilitaryBase

 function AddMilitaryBase($PID)
 {
     $qry = " select * \r\n\t\t\t    from bases \r\n\t\t\t\twhere baseType = 1 and baseValue = 1 and   personid =" . $PID;
     $resRec = parent::runquery($qry);
     $query = "\tselect  personid ,\r\n\t\t\t\tif ((military_duration > (DATEDIFF( military_to_date ,military_from_date))/30.4375 ) ,military_duration , (DATEDIFF( military_to_date ,military_from_date))/30.4375 ) duration\r\n\r\n\t\t\t    from persons\r\n\t\t\t\twhere sex = 1 and person_type in (2,3,5) and personid = " . $PID;
     $res = parent::runquery($query);
     if ($res[0]['duration'] / 12 > 1 && count($resRec) == 0) {
         $this->PersonID = $PID;
         $this->BaseType = 1;
         $this->BaseValue = 1;
         $this->RegDate = DateModules::Now();
         $this->ExecuteDate = DateModules::Now();
         $this->BaseMode = 'SYSTEM';
         $this->ExtraInfo = $res[0]['duration'];
         $this->BaseStatus = 'NORMAL';
         $result = parent::insert($query, $this);
         if ($result === false) {
             return false;
         }
         $daObj = new DataAudit();
         $daObj->ActionType = DataAudit::Action_add;
         $daObj->MainObjectID = $this->PersonID;
         $daObj->SubObjectID = $this->BaseType;
         $daObj->TableName = "bases";
         $daObj->execute();
         return true;
     } else {
         if ($res[0]['duration'] / 12 < 1 && count($resRec) == 1) {
             $this->BaseStatus = 'DELETED';
             $result = parent::update("bases", $this, "BaseType = 1 and  BaseValue =1 and personid =" . $PID);
             if ($result === false) {
                 return false;
             }
             $daObj = new DataAudit();
             $daObj->ActionType = DataAudit::Action_update;
             $daObj->MainObjectID = $this->PersonID;
             $daObj->SubObjectID = $this->BaseStatus;
             $daObj->TableName = "bases";
             $daObj->execute();
             return true;
         } else {
             if ($res[0]['duration'] / 12 > 1 && count($resRec) == 1) {
                 if ($resRec[0]['BaseStatus'] == 'DELETED') {
                     $this->BaseStatus = 'NORMAL';
                     $result = parent::update("bases", $this, "BaseType = 1 and  BaseValue =1 and personid =" . $PID);
                     if ($result === false) {
                         return false;
                     }
                     $daObj = new DataAudit();
                     $daObj->ActionType = DataAudit::Action_update;
                     $daObj->MainObjectID = $this->PersonID;
                     $daObj->SubObjectID = $this->BaseStatus;
                     $daObj->TableName = "bases";
                     $daObj->execute();
                     return true;
                 } else {
                     return true;
                 }
             }
         }
     }
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:62,代码来源:bases.class.php

示例7: array

require_once '../request/request.class.php';
require_once '../request/request.data.php';

if(isset($_REQUEST["show"]))
{
	$RequestID = $_REQUEST["RequestID"];
	
	$dt = array();
	$returnArr = LON_requests::ComputePayments($RequestID, $dt);
	
	//............ get remain untill now ......................
	$PartObj = LON_ReqParts::GetValidPartObj($RequestID);
	$CurrentRemain = 0;
	foreach($dt as $row)
	{
		if($row["InstallmentDate"] <= DateModules::Now())
			$CurrentRemain = $row["TotalRemainder"];
	}
	//.........................................................
	
	$rpg = new ReportGenerator();
	$rpg->excel = !empty($_POST["excel"]);
	function dateRender($row, $val){
		return DateModules::miladi_to_shamsi($val);
	}	
	
	function amountRender($row, $val){
		return "<span dir=ltr>" . number_format($val) . "</span>";
	}
	
	$col = $rpg->addColumn("", "InstallmentID");
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:LoanPayment.php

示例8: join

$whereW = "";
$workDate = "";
$exitW = "";
if (!empty($_GET['fromDate'])) {
    // $workDate = " AND s.work_start_date >= '".DateModules::shamsi_to_miladi($_GET['fromDate'])."'" ;
    $whereW = " AND w.execute_date >= '" . DateModules::shamsi_to_miladi($_GET['fromDate']) . "'  ";
}
if (!empty($_GET['toDate'])) {
    $workDate .= " AND s.work_start_date <= '" . DateModules::shamsi_to_miladi($_GET['toDate']) . "'";
    $whereW .= " AND w.execute_date <= '" . DateModules::shamsi_to_miladi($_GET['toDate']) . "'";
    $exitW .= " AND w.execute_date <= '" . DateModules::shamsi_to_miladi($_GET['toDate']) . "'";
    $salaryDate = DateModules::shamsi_to_miladi($_GET['toDate']);
} else {
    $workDate .= " AND s.work_start_date <= '" . DateModules::Now() . "'";
    $exitW .= " AND w.execute_date <= '" . DateModules::Now() . "'";
    $salaryDate = DateModules::Now();
}
$title = "";
if (!empty($_GET['rasmiGh']) && $_GET['rasmiGh'] == 1) {
    $title = "گزارش کل کارکنان رسمی قطعی شاغل";
    $query = "  select  s.staff_id , p.pfname , p.plname , bi1.Title emp_state_title,bi2.Title emp_mode_title , bi3.Title person_type_title ,w.ouid\r\n                    from persons p inner join staff s\r\n                                       on p.personid = s.personid \r\n                              inner join (SELECT    staff_id,\r\n                                                    SUBSTRING_INDEX(SUBSTRING(max_execute_date,11),'.',1) writ_id,\r\n                                                    SUBSTRING_INDEX(max_execute_date,'.',-1) writ_ver\r\n                                                FROM (SELECT w.staff_id,\r\n                                                            max( CONCAT(w.execute_date,w.writ_id,'.',w.writ_ver) ) max_execute_date\r\n                                                        FROM writs w\r\n                                                                INNER JOIN staff ls\r\n                                                                        ON(w.staff_id = ls.staff_id)\r\n                                                        WHERE w.history_only = 0 " . $whereW . "\r\n                                                        GROUP BY w.staff_id)tbl2) tbl1\r\n                                             on s.staff_id = tbl1.staff_id \r\n                              inner join writs w\r\n                                       on tbl1.writ_id = w.writ_id and\r\n                                          tbl1.writ_ver = w.writ_ver and\r\n                                          tbl1.staff_id = w.staff_id\r\n                                    inner join Basic_Info bi1 on bi1.typeid = 3 and w.emp_state = bi1.infoid\r\n                                    inner join Basic_Info bi2 on bi2.typeid = 4 and w.emp_mode = bi2.infoid\r\n                                    inner join Basic_Info bi3 on bi3.typeid = 16 and s.person_type = bi3.infoid\r\n\r\n                        where w.emp_mode in(1,2,3,4,6,8,10,21) and s.person_type in (2) AND w.emp_state in (4)  {$whereW} ";
    $data = PdoDataAccess::runquery($query);
} else {
    if (!empty($_GET['rasmiAz']) && $_GET['rasmiAz'] == 1) {
        $title = "گزارش کل کارکنان رسمی آزمایشی شاغل";
        $query = "  select  s.staff_id , p.pfname , p.plname , bi1.Title emp_state_title,bi2.Title emp_mode_title , bi3.Title person_type_title ,w.ouid\r\n                    from persons p inner join staff s\r\n                                       on p.personid = s.personid \r\n                              inner join (SELECT    staff_id,\r\n                                                    SUBSTRING_INDEX(SUBSTRING(max_execute_date,11),'.',1) writ_id,\r\n                                                    SUBSTRING_INDEX(max_execute_date,'.',-1) writ_ver\r\n                                                FROM (SELECT w.staff_id,\r\n                                                            max( CONCAT(w.execute_date,w.writ_id,'.',w.writ_ver) ) max_execute_date\r\n                                                        FROM writs w\r\n                                                                INNER JOIN staff ls\r\n                                                                        ON(w.staff_id = ls.staff_id)\r\n                                                        WHERE w.history_only = 0 " . $whereW . "\r\n                                                        GROUP BY w.staff_id)tbl2) tbl1\r\n                                             on s.staff_id = tbl1.staff_id \r\n                              inner join writs w\r\n                                       on tbl1.writ_id = w.writ_id and\r\n                                          tbl1.writ_ver = w.writ_ver and\r\n                                          tbl1.staff_id = w.staff_id\r\n                                    inner join Basic_Info bi1 on bi1.typeid = 3 and w.emp_state = bi1.infoid\r\n                                    inner join Basic_Info bi2 on bi2.typeid = 4 and w.emp_mode = bi2.infoid\r\n                                    inner join Basic_Info bi3 on bi3.typeid = 16 and s.person_type = bi3.infoid\r\n\r\n                        where w.emp_mode in(1,2,3,4,6,8,10,21) and s.person_type in (2) AND w.emp_state in (3)  {$whereW} ";
        $data = PdoDataAccess::runquery($query);
    } else {
        if (!empty($_GET['Peymani']) && $_GET['Peymani'] == 1) {
            $title = "گزارش کل کارکنان پیمانی شاغل";
            $query = "  select  s.staff_id , p.pfname , p.plname , bi1.Title emp_state_title,bi2.Title emp_mode_title , bi3.Title person_type_title ,w.ouid\r\n                    from persons p inner join staff s\r\n                                       on p.personid = s.personid \r\n                              inner join (SELECT    staff_id,\r\n                                                    SUBSTRING_INDEX(SUBSTRING(max_execute_date,11),'.',1) writ_id,\r\n                                                    SUBSTRING_INDEX(max_execute_date,'.',-1) writ_ver\r\n                                                FROM (SELECT w.staff_id,\r\n                                                            max( CONCAT(w.execute_date,w.writ_id,'.',w.writ_ver) ) max_execute_date\r\n                                                        FROM writs w\r\n                                                                INNER JOIN staff ls\r\n                                                                        ON(w.staff_id = ls.staff_id)\r\n                                                        WHERE w.history_only = 0 " . $whereW . "\r\n                                                        GROUP BY w.staff_id)tbl2) tbl1\r\n                                             on s.staff_id = tbl1.staff_id \r\n                              inner join writs w\r\n                                       on tbl1.writ_id = w.writ_id and\r\n                                          tbl1.writ_ver = w.writ_ver and\r\n                                          tbl1.staff_id = w.staff_id\r\n                                    inner join Basic_Info bi1 on bi1.typeid = 3 and w.emp_state = bi1.infoid\r\n                                    inner join Basic_Info bi2 on bi2.typeid = 4 and w.emp_mode = bi2.infoid\r\n                                    inner join Basic_Info bi3 on bi3.typeid = 16 and s.person_type = bi3.infoid\r\n\r\n                        where w.emp_mode in(1,2,3,4,6,8,10,21) and s.person_type in (2) AND w.emp_state in (1,2,10)  {$whereW} ";
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:detailReport.php

示例9: process_subtract

 private function process_subtract()
 {
     $this->moveto_curStaff($this->subtracts_rs, 'SUB');
     while ($this->subRowID <= $this->subRowCount && $this->subRow['staff_id'] == $this->cur_staff_id) {
         if (!$this->validate_salary_item_id($this->subRow['validity_start_date'], $this->subRow['validity_end_date'])) {
             $this->subRow = $this->subtracts_rs->fetch();
             $this->subRowID++;
             continue;
         }
         $key = $this->subRow['salary_item_type_id'];
         //اين متغير صرفا جهت افزايش خوانايي کد تعريف شده است
         $param1 = null;
         if ($this->subRow['subtract_type'] == FIX_BENEFIT) {
             $entry_title_full = 'pay_value';
             $entry_title_empty = 'get_value';
             if (DateModules::CompareDate($this->subRow['start_date'], $this->month_start) == 1) {
                 $s_date = $this->subRow['start_date'];
             } else {
                 $s_date = $this->month_start;
             }
             if (!$this->subRow['end_date'] || $this->subRow['end_date'] == '0000-00-00' || DateModules::CompareDate($this->subRow['end_date'], $this->month_end) != -1) {
                 $e_date = DateModules::shamsi_to_miladi($this->__YEAR . "/" . $this->__MONTH . "/30");
             } else {
                 $e_date = $this->subRow['end_date'];
             }
             $distance = round(DateModules::GDateMinusGDate($e_date, $s_date) + 1);
             if ($distance < 0) {
                 $this->subRow = $this->subtracts_rs->fetch();
                 $this->subRowID++;
                 continue;
             }
             if ($distance > $this->cur_work_sheet) {
                 $distance = $this->cur_work_sheet;
             }
             $this->subRow['get_value'] *= $distance / $this->__MONTH_LENGTH;
             //ضرب مزاياي ثابت در کارکرد ماهانه
         } else {
             $entry_title_full = 'get_value';
             $entry_title_empty = 'pay_value';
         }
         $Remainder = 0;
         if ($this->subRow['subtract_type'] == LOAN) {
             $multiply = -1;
             $param1 = "'LOAN'";
             $Remainder = $this->subRow['remainder'];
         } else {
             if ($this->subRow['subtract_type'] == FIX_FRACTION) {
                 $multiply = 1;
                 $param1 = "'FIX_FRACTION'";
                 $Remainder = $this->subRow['receipt'];
             } else {
                 $multiply = 0;
             }
         }
         $temp_array = array('pay_year' => $this->__YEAR, 'pay_month' => $this->__MONTH, 'staff_id' => $this->cur_staff_id, 'salary_item_type_id' => $key, $entry_title_full => $this->subRow['get_value'], $entry_title_empty => 0, 'param1' => $param1, 'param2' => $this->subRow['subtract_id'], 'param3' => NULL, 'param4' => $Remainder + $this->subRow['get_value'] * $multiply, 'cost_center_id' => $this->staffRow['cost_center_id'], 'payment_type' => NORMAL);
         if (DateModules::CompareDate(DateModules::Now(), $this->month_end) == -1) {
             $flow_date = DateModules::Now();
         } else {
             $flow_date = $this->month_end;
         }
         if (!$this->backpay) {
             /*	array_push($this->person_subtract_array,
             			array('subtract_id' => $this->subRow['subtract_id'] ,
             			'staff_id' => $this->cur_staff_id,
             			'subtract_type' => $this->subRow['subtract_type'],
             			'bank_id' => $this->subRow['bank_id'],
             			'first_value' => $this->subRow['first_value'],
             			'instalment' => $this->subRow['instalment'],
             			'remainder' => $this->subRow['remainder'] + $this->subRow['get_value'] * $multiply,
             			'start_date' => $this->subRow['start_date'],
             			'end_date' => $this->subRow['end_date'],
             			'comments' => $this->subRow['comments'],
             			'salary_item_type_id' => $this->subRow['salary_item_type_id'],
             			'account_no' => $this->subRow['account_no'],				
             			'loan_no' => $this->subRow['loan_no'],
             			'flow_date' => $flow_date,
             			'flow_time' => DateModules::CurrentTime(),
             			'subtract_status' => $this->subRow['subtract_status'],
             			'contract_no' => $this->subRow['contract_no']
             			)
             			);				
             			array_push($this->person_subtract_flow_array,
             			array('subtract_id' => $this->subRow['subtract_id'] ,
             			'row_no' => $this->subRow['subtract_flow_id'] + 1,
             			'flow_type' => CALCULATE_FICHE_FLOW_TYPE,
             			'flow_date' => $flow_date,
             			'flow_time' => DateModules::CurrentTime(),
             			'old_remainder' => $this->subRow['remainder'],
             			'new_remainder' => $this->subRow['remainder'] + $this->subRow['get_value']* $multiply,
             			'old_instalment' => $this->subRow['instalment'],
             			'new_instalment' => $this->subRow['instalment'],
             			'comments' => 'فيش حقوقي' 
             			)
             			);*/
         }
         if (isset($this->payment_items[$key])) {
             //قسط
             $this->payment_items[$key][$entry_title_full] += $temp_array[$entry_title_full];
             //مانده
             $this->payment_items[$key]['param4'] += $temp_array['param4'];
//.........这里部分代码省略.........
开发者ID:jafarkhani,项目名称:rtfund,代码行数:101,代码来源:payment_calculation.class.php

示例10: CountRetMsg

 static function CountRetMsg($where, $whereParam)
 {
     $retDate = DateModules::AddToGDate(DateModules::Now(), 0, 1);
     $query = " select count(*)\n\n\t\t\t\t\tfrom staff s inner join writs w\n\t\t\t\t\t\t\t\t\ton s.staff_id = w.staff_id and\n\t\t\t\t\t\t\t\t\t\ts.last_writ_id = w.writ_id and s.last_writ_ver = w.writ_ver and\n\t\t\t\t\t\t\t\t\t\tw.emp_mode != 13\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t inner join persons p\n\t\t\t\t\t\t\t\t\t\t\ton p.personid = s.personid\n\n\t\t\t\t\t\t\t\t inner join Basic_Info bi\n\t\t\t\t\t\t\t\t\t\t\ton bi.typeid = 28 and bi.infoID = s.retired_state ";
     $where .= " and s.retired_date < '" . $retDate . "' and\n\t\t\t\t  ( s.retired_date != '0000-00-00' or s.retired_date is null ) ";
     $temp = PdoDataAccess::runquery($query, $whereParam);
     return $temp[0][0];
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:8,代码来源:staff.class.php

示例11: array

<?php

//-------------------------
// programmer:	Jafarkhani
// Create Date:	95.01
//-------------------------
include '../header.inc.php';
include_once inc_dataGrid;
require_once 'traffic.class.php';
$dt = ATN_traffic::Get(" AND t.PersonID=? AND TrafficDate=?", array($_SESSION["USER"]["PersonID"], DateModules::Now()));
$even = $dt->rowCount() == 0 ? true : $dt->rowCount() % 2 == 0;
$StartPageFormat = isset($_REQUEST["StartPage"]) ? true : false;
?>
<style>
	.start {
		background-image: url('/HumanResources/icons/start.png');
		background-position: center center !important;
		background-size: 70px 70px;
		height: 80px !important;
		width: 80px !important;
	}
	.stop {
		background-image: url('/HumanResources/icons/stop.png');
		background-position: center center !important;
		background-size: 70px 70px;
		height: 80px !important;
		width: 80px !important;
	}
</style>
<script>
开发者ID:jafarkhani,项目名称:rtfund,代码行数:30,代码来源:AddTraffic.php

示例12: compute_professors_salary_params

if (!empty($_POST['TINT:78']) && $_POST['TINT:78'] > 0 && $_POST['TINT:78'] < 41) {
    $to_base = $_POST['TINT:78'];
} else {
    $to_base = 40;
}
if (empty($_POST['SELECT:77']) || $_POST['SELECT:77'] == -1) {
    $from_science_level = 1;
    $to_science_level = 5;
} else {
    $from_science_level = $_POST['SELECT:77'];
    $to_science_level = $_POST['SELECT:77'];
}
$work_state_id = !empty($_POST['SELECT:93']) && $_POST['SELECT:93'] != '-1' ? $_POST['SELECT:93'] : '19';
$work_city_id = !empty($_POST['SELECT:94']) && $_POST['SELECT:94'] != '-1' ? $_POST['SELECT:94'] : '11';
$emp_state = 4;
$execute_date = !empty($_POST['FDATE:72']) ? DateModules::Shamsi_to_Miladi($_POST['FDATE:72']) : DateModules::Now();
$recordSet = compute_professors_salary_params($from_base, $to_base, $from_science_level, $to_science_level, $work_state_id, $work_city_id, $execute_date, $emp_state);
$content = "";
for ($i = 0; $i < count($recordSet); $i++) {
    $content .= "<tr><td>" . ($i + 1) . "</td>" . "<td>" . number_format(round($recordSet[$i]['total_sum'])) . "</td>" . "<td>" . number_format(round($recordSet[$i]['vijeh_extra'])) . "</td>" . "<td>" . number_format(round($recordSet[$i]['special_extra'])) . "</td>" . "<td>" . number_format(round($recordSet[$i]['absorb_extra'])) . "</td>" . "<td>" . number_format(round($recordSet[$i]['weather_bad_extra'])) . "</td>" . "<td>" . number_format(round($recordSet[$i]['base_salary'])) . "</td>" . "<td>" . $recordSet[$i]['base'] . "</td>" . "<td>" . $recordSet[$i]['science_level'] . "</td></tr>";
}
$tags = array('<!--data-->' => $content, '<!--now-->' => DateModules::shNow());
$content = file_get_contents("../../reports/proffesor_salary_param.html");
$content = str_replace(array_keys($tags), array_values($tags), $content);
echo $content;
die;
function compute_professors_salary_params($from_base, $to_base, $from_science_level, $to_science_level, $work_state_id, $work_city_id, $execute_date, $emp_state = EMP_STATE_APPROVED_CEREMONIOUS, $compute_heiat_omana_absorb_extra = true)
{
    $query = 'SELECT  validity_start_date,
    				validity_end_date,
    				salary_item_type_id
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:proffesor_salary_params.php

示例13: GetInstallments

function GetInstallments()
{
    $RequestID = $_REQUEST["RequestID"];
    $temp = array();
    $dt = LON_requests::ComputePayments($RequestID, $temp);
    $currentPay = 0;
    foreach ($dt as $row) {
        if ($row["InstallmentDate"] < DateModules::Now() && $row["TotalRemainder"] * 1 > 0) {
            $currentPay += $row["TotalRemainder"] * 1;
        }
    }
    echo dataReader::getJsonData($temp, count($temp), $_GET["callback"], $currentPay);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:14,代码来源:request.data.php

示例14: count

}
if (!empty($_POST['TDATE:72'])) {
    $whereDate .= " AND tbl2.execute_date<='" . DateModules::shamsi_to_miladi($_POST['TDATE:72']) . "'";
    $whereW .= " AND w.execute_date <= '" . DateModules::shamsi_to_miladi($_POST['TDATE:72']) . "'";
    $salaryDate = DateModules::shamsi_to_miladi($_POST['TDATE:72']);
    $toDate = $_POST['TDATE:72'];
} else {
    $salaryDate = DateModules::Now();
    $toDate = DateModules::shNow();
}
if (!empty($_POST['TDATE:72'])) {
    $workDate .= " AND s.work_start_date <= '" . DateModules::shamsi_to_miladi($_POST['TDATE:72']) . "'";
    $exitW = " AND w.execute_date <= '" . DateModules::shamsi_to_miladi($_POST['TDATE:72']) . "'";
} else {
    $workDate .= " AND s.work_start_date <= '" . DateModules::Now() . "'";
    $exitW = " AND w.execute_date <= '" . DateModules::Now() . "'";
}
$query = "        \r\n        \r\nselect count(*) cn , w.emp_state , s.person_type\r\n               from persons p inner join staff s\r\n                                       on p.personid = s.personid\r\n                              inner join (SELECT    staff_id,\r\n                                                    SUBSTRING_INDEX(SUBSTRING(max_execute_date,11),'.',1) writ_id,\r\n                                                    SUBSTRING_INDEX(max_execute_date,'.',-1) writ_ver\r\n                                                FROM (SELECT w.staff_id,\r\n                                                            max( CONCAT(w.execute_date,w.writ_id,'.',w.writ_ver) ) max_execute_date\r\n                                                        FROM writs w\r\n                                                                INNER JOIN staff ls\r\n                                                                        ON(w.staff_id = ls.staff_id)\r\n                                                        WHERE w.history_only = 0 " . $whereW . "\r\n                                                        GROUP BY w.staff_id)tbl2) tbl1\r\n                                             on s.staff_id = tbl1.staff_id \r\n                              inner join writs w\r\n                                       on tbl1.writ_id = w.writ_id and\r\n                                          tbl1.writ_ver = w.writ_ver and\r\n                                          tbl1.staff_id = w.staff_id\r\n\r\n            where w.emp_mode in(1,2,3,4,6,8,10,16,21) and s.person_type in (2,3,5) " . $whereW . "\r\n\r\n            group by s.person_type , w.emp_state ";
$data = PdoDataAccess::runquery($query);
$total = 0;
$rasmi_ghatee_count = 0;
$peymani_count = 0;
$rasmi_azmayeshi_count = 0;
$tarh_count = 0;
$roozmozd_count = 0;
$gharardadi_count = 0;
for ($i = 0; $i < count($data); $i++) {
    $total += $data[$i]['cn'];
    if ($data[$i]['person_type'] == 2 && ($data[$i]['emp_state'] == 1 || $data[$i]['emp_state'] == 2 || $data[$i]['emp_state'] == 10)) {
        $peymani_count += $data[$i]['cn'];
    }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:statistical_Report.php

示例15: selectArrearTransferWrits

function selectArrearTransferWrits()
{
    MakeAdvanceSearchWhere($where, $whereParam);
    $state;
    $state = isset($_REQUEST["return"]) ? "1" : "0";
    $stateWhere = "";
    $stateWhere = " w.arrear = " . $state . " AND ";
    $curYear = DateModules::GetYear(DateModules::miladi_to_shamsi(DateModules::Now()));
    $query = "select w.writ_id,\n                     w.writ_ver,\n                     w.staff_id,\n                     w.ouid,\n                     w.issue_date,\n                     w.history_only,\n                     w.corrective,\n                     w.execute_date,\n                     concat(wt.title,' - ', wst.title) as wt_title,\n                     bi_emp_state.title as emp_state_title,\n                     w.ref_letter_no,\n                     w.ref_letter_date,\n                     w.person_type,\n                     concat(p.pfname, ' ', p.plname) fullname,\n                     w.corrective_writ_id,\n                     w.correct_completed,\n\t\t\t\t\t w.view_flag\n\t\t\t\t\n\t\t\t\tfrom staff s\n                              \n        \t\t  LEFT OUTER JOIN writs w ON (w.staff_id = s.staff_id)\n                  LEFT OUTER JOIN writ_types wt ON ((w.writ_type_id = wt.writ_type_id) AND (w.person_type = wt.person_type))\n                  LEFT OUTER JOIN writ_subtypes wst ON (w.writ_subtype_id = wst.writ_subtype_id AND w.writ_type_id = wst.writ_type_id \n                  \t\t\t\t\t\t\t\t\t\t\tAND w.person_type = wst.person_type)\n                  LEFT OUTER JOIN persons p ON (s.PersonID = p.PersonID)\n                  LEFT OUTER JOIN org_new_units o ON (w.ouid = o.ouid)\n                  LEFT JOIN Basic_Info bi_emp_state on(bi_emp_state.TypeID=3 and w.emp_state=bi_emp_state.InfoID)\n                  LEFT JOIN payment_writs pw ON pw.writ_id = w.writ_id and pw.writ_ver = w.writ_ver and pw.staff_id = w.staff_id \n\t\t\t\t  \n\t\t\twhere w.execute_date >= '" . TRANSFER_WRIT_EXE_DATE . "' AND w.state = 3 AND  \n\t\t\t\t  w.execute_date < '" . str_replace("/", "-", DateModules::shamsi_to_miladi($curYear . "/01/01")) . "'  AND\t\t\t\t \n\t\t\t\t  substr(g2j(w.execute_date),1,4) < substr(g2j(writ_recieve_date),1,4) AND \n\t\t\t\t {$stateWhere}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n                s.person_type in (" . manage_access::getValidPersonTypes() . ") AND w.cost_center_id in (" . manage_access::getValidCostCenters() . ") AND\n\t\t\t\tw.emp_state <> 0 AND\n\t\t\t\t(w.history_only=0 OR w.history_only IS NULL) AND \n\t\t\t\t(w.dont_transfer = 0 OR w.dont_transfer IS NULL) AND\n                ( pw.writ_id is null ) AND\n\t\t\t\t(w.correct_completed!=" . WRIT_CORRECTING . ") AND " . $where . "\n\t\t\t\n\t\t\torder by p.plname,p.pfname,s.staff_id,w.execute_date,w.writ_id,w.writ_ver";
    $temp = PdoDataAccess::runquery($query, $whereParam);
    /*if($_SESSION['UserID'] == 'jafarkhani') {
    	echo PdoDataAccess::GetLatestQueryString(); 
    	die(); 
    }*/
    for ($i = 0; $i < count($temp); $i++) {
        $temp[$i]['full_unit_title'] = manage_units::get_full_title($temp[$i]['ouid']);
    }
    echo dataReader::getJsonData($temp, count($temp), $_GET["callback"]);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:20,代码来源:writ.data.php


注:本文中的DateModules::Now方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。