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


PHP DateModules::shNow方法代码示例

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


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

示例1: AccDocFlow

function AccDocFlow()
{
    $CostID = $_REQUEST["CostID"];
    $CurYear = substr(DateModules::shNow(), 0, 4);
    $temp = PdoDataAccess::runquery_fetchMode("\r\n\t\tselect d.DocDate,\r\n\t\t\td.description,\r\n\t\t\tdi.DebtorAmount,\r\n\t\t\tdi.CreditorAmount,\r\n\t\t\tdi.details\r\n\t\tfrom ACC_DocItems di join ACC_docs d using(DocID)\r\n\t\tleft join ACC_tafsilis t1 on(t1.TafsiliType=1 AND di.TafsiliID=t1.TafsiliID)\r\n\t\tleft join ACC_tafsilis t2 on(t2.TafsiliType=1 AND di.TafsiliID2=t2.TafsiliID)\r\n\t\twhere CycleID=:year AND CostID=:cid AND (t1.ObjectID=:pid or t2.ObjectID=:pid)\r\n\t\t\tAND DocStatus in('CONFIRM','ARCHIVE')\r\n\t\torder by DocDate\r\n\t", array(":year" => $CurYear, ":pid" => $_SESSION["USER"]["PersonID"], ":cid" => $CostID));
    //print_r(ExceptionHandler::PopAllExceptions());
    $count = $temp->rowCount();
    $temp = PdoDataAccess::fetchAll($temp, $_GET["start"], $_GET["limit"]);
    echo dataReader::getJsonData($temp, $count, $_GET["callback"]);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:11,代码来源:global.data.php

示例2: MakeHeader

 public static function MakeHeader($title, $fromDate = "", $toDate = "", $pageNumber = "", $returnMode = false, $excel = false)
 {
     $str = "\r\n\t\t\t<div style='text-align: right;float:right;width:20%;' align=right><img width='60px' style='padding:2px' \r\n\t\t\t\t" . ($excel ? "" : "src='/framework/icons/logo.jpg'") . "></div>" . "<div style='float:right;font-family:b titr;font-size:15px;width:60%' align=center>" . "<br>" . SoftwareName . "<br>" . $title . "</div>\r\n\r\n\t\t\t<div style='text-align: left;float:right;width:20%;font-family:tahoma;font-size:11px' align=left>\r\n\t\t\t<br>تاریخ تهیه گزارش : " . DateModules::shNow() . "<br>";
     $str .= !empty($fromDate) ? "<br>گزارش از تاریخ : " . $fromDate . ($toDate != "" ? " - " . $toDate : "") : "";
     $str .= $pageNumber != "" ? "<br>شماره صفحه :" . $pageNumber : "";
     $str .= "</div>\r\n\t\t<br>";
     if ($returnMode) {
         return $str;
     } else {
         echo $str;
     }
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:12,代码来源:ManageReport.class.php

示例3: ShowReport


//.........这里部分代码省略.........
			$ShiftDuration = strtotime($returnArr[$i]["ToTime"]) - strtotime($returnArr[$i]["FromTime"]);
			$Absence = $totalAttend < $ShiftDuration ? $ShiftDuration - $totalAttend : 0;

			if($returnArr[$i]["holiday"])
			{
				$extra = $totalAttend + $mission;
				$lastAbsence = 0;
				$firstAbsence = 0;
				$Absence = 0;
				$Off = 0;
			}

			if($Absence == $ShiftDuration)
			{
				$SUM["DailyAbsence"]++;
				$Absence = 0;
			}

			$SUM["absence"] += $Absence;
			$SUM["attend"] += $totalAttend;
			$SUM["firstAbsence"] += $firstAbsence;
			$SUM["lastAbsence"] += $lastAbsence;
			$SUM["extra"] += $extra;
			$SUM["Off"] += $Off;
			$SUM["mission"] += $mission;		
		}
		$SUM["absence"] = TimeModules::SecondsToTime($SUM["absence"]);
		$SUM["attend"] = TimeModules::SecondsToTime($SUM["attend"] );
		$SUM["firstAbsence"] = TimeModules::SecondsToTime($SUM["firstAbsence"]);
		$SUM["lastAbsence"] = TimeModules::SecondsToTime($SUM["lastAbsence"]);
		$SUM["extra"] = TimeModules::SecondsToTime($SUM["extra"]);
		$SUM["Off"] = TimeModules::SecondsToTime($SUM["Off"]);
		$SUM["mission"] = TimeModules::SecondsToTime($SUM["mission"]);
			
		$returnStr .= "<tr>
			<td>" . $personRecord["fullname"] . "</td>
			<td>" . ShowTime($SUM["attend"]) . "</td>
			<td>" . ShowTime($SUM["extra"]) . "</td>
			<td>" . ShowTime($SUM["Off"]) . "</td>
			<td>" . ShowTime($SUM["mission"]) . "</td>
			<td>" . ShowTime($SUM["firstAbsence"]) . "</td>
			<td>" . ShowTime($SUM["lastAbsence"]) . "</td>
			<td>" . ShowTime($SUM["absence"]) . "</td>
			
			<td>" . $SUM["DailyOff_1"] . "</td>
			<td>" . $SUM["DailyOff_2"] . "</td>
			<td>" . $SUM["DailyOff_3"] . "</td>
			<td>" . $SUM["DailyMission"] . "</td>
			<td>" . $SUM["DailyAbsence"] . "</td>
		</tr>";
	}
?>
<META http-equiv=Content-Type content="text/html; charset=UTF-8" ><body dir="rtl">
<link rel="stylesheet" type="text/css" href="/generalUI/fonts/fonts.css" /></head>
<style>
	.reportTbl {border-collapse:collapse}
	.reportTbl td {padding:4px;font-family: nazanin; font-size:14px;}
	.reportTbl th {font-family: nazanin; font-size:14px;padding:4px;text-align: center; 
				  background-color: #efefef; font-weight: bold}
	.reportTbl .attend { text-align:center}
	.reportTbl .extra { background-color: #D0F7E2; text-align:center}
	.reportTbl .off { background-color: #D7BAFF; text-align:center}
	.reportTbl .mission { text-align:center}
	.reportTbl .sub { background-color: #FFcfdd; text-align:center}
	.reportTbl .footer { background-color: #eee; text-align:center; line-height: 18px}
</style>
<table style='border:2px groove #9BB1CD;border-collapse:collapse;width:100%'>
	<tr>
		<td width=60px><img src='/framework/icons/logo.jpg' style='width:120px'></td>
		<td align='center' style='height:100px;vertical-align:middle;font-family:b titr;font-size:15px'>
			گزارش خلاصه کارکرد پرسنل
			<br>از تاریخ <?= DateModules::miladi_to_shamsi($OrigStartDate) ?> تا تاریخ 
				<?= DateModules::miladi_to_shamsi($OrigEndDate) ?>
		</td>
		<td width='200px' align='center' style='font-family:tahoma;font-size:11px'>تاریخ تهیه گزارش : 
			<?= DateModules::shNow() ?>
		</td>
	</tr>
</table>
<table class="reportTbl" width="100%" border="1">
	<tr class="blueText">
		<th>نام و نام خانوادگی</th>
		<th>حضور</th>
		<th>اضافه کار</th>
		<th>مرخصی</th>
		<th>ماموریت</th>
		<th>تاخیر</th>
		<th>تعجیل</th>
		<th>غیبت</th>
		<th>مرخصی استعلاجی</th>
		<th>مرخصی استحقاقی</th>
		<th>مرخصی بدون حقوق</th>
		<th>ماموریت روزانه</th>
		<th>غیبت روزانه</th>
	</tr>
	<?= $returnStr ?>
</table>
<?	
	die();
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:101,代码来源:summary.php

示例4: ShowReport

function ShowReport(){
		
	$rpt = new ReportGenerator();
	$rpt->mysql_resource = PrepareData();
	?>
	<html>
	<head>
		<META http-equiv=Content-Type content="text/html; charset=UTF-8" >
	</head>
		<body dir=rtl>
			
	<?	
				
	$rpt->addColumn("شماره<br> شناسایی", "staff_id");
	$rpt->addColumn("نام خانوادگي", "plname");
	$rpt->addColumn("نام", "pfname");
        $rpt->addColumn("واحد اصلی محل خدمت", "unit_title");
        $rpt->addColumn("واحد فرعی محل خدمت", "sub_unit_title");
	$rpt->addColumn("کارکرد", "work_time");
	
	$rpt->header_alignment = "center";
	$rpt->headerContent = "
		<table width=100% border=0 style='font-family:b nazanin;'>
			<tr>
				<td width=120px><img src='/HumanResources/img/fum_symbol.jpg'></td>
				<td align=center style='font-weight:bold'>گزارش کارکرد کارکنان</td>
				<td width=120px>
					شماره : 
					<br>
					تاریخ : 
					" . DateModules::shNow() . "
				</td>
			</tr>
			
		</table>";
	$rpt->page_size = 30;
	$rpt->paging = true;
	$rpt->generateReport();
	die();
?>
	</body>		
</html>		
<?
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:44,代码来源:PersonWorkTime.php

示例5: number_format

        } else {
            $row["Sum"] = $prevRow["Sum"] + $row["CreditorAmount"] - $row["DebtorAmount"];
        }
        return "<div style=direction:ltr>" . number_format($row["Sum"]) . "</div>";
    }
    $col = $rpg->addColumn("مانده حساب", "CreditorAmount", "TotalRemainRender", $BeforeAmount);
    //$col->EnableSummary(true);
    $rpg->mysql_resource = $dataTable;
    $rpg->page_size = 12;
    $rpg->paging = true;
    if (!$rpg->excel) {
        BeginReport();
        //if($_SESSION["USER"]["UserName"] == "admin")
        //	echo PdoDataAccess::GetLatestQueryString ();
        echo "<div style=display:none>" . PdoDataAccess::GetLatestQueryString() . "</div>";
        echo "<table style='border:2px groove #9BB1CD;border-collapse:collapse;width:100%'><tr>\r\n\t\t\t\t<td width=60px><img src='/framework/icons/logo.jpg' style='width:120px'></td>\r\n\t\t\t\t<td align='center' style='height:100px;vertical-align:middle;font-family:b titr;font-size:15px'>\r\n\t\t\t\t\tگزارش گردش حساب ها \r\n\t\t\t\t\t <br> " . $_SESSION["accounting"]["BranchName"] . "<br>" . "دوره سال " . $_SESSION["accounting"]["CycleID"] . "</td>\r\n\t\t\t\t<td width='200px' align='center' style='font-family:tahoma;font-size:11px'>تاریخ تهیه گزارش : " . DateModules::shNow() . "<br>";
        if (!empty($_POST["fromDate"])) {
            echo "<br>گزارش از تاریخ : " . $_POST["fromDate"] . ($_POST["toDate"] != "" ? " - " . $_POST["toDate"] : "");
        }
        echo "</td></tr></table>";
    }
    echo $BeforeRemaindar;
    $rpg->generateReport();
    die;
}
?>
<script>
AccReport_flow.prototype = {
	TabID : '<?php 
echo $_REQUEST["ExtTabID"];
?>
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:flow.php

示例6:

    $rpg->addColumn("تاریخ چک", "PayDate", "dateRender");
    $rpg->addColumn("وضعیت چک", "ChequeStatusDesc");
    $col = $rpg->addColumn("مبلغ چک", "PayAmount", "moneyRender");
    $col->EnableSummary();
    //echo PdoDataAccess::GetLatestQueryString();
    $rpg->mysql_resource = $dataTable;
    if (!$rpg->excel) {
        echo '<META http-equiv=Content-Type content="text/html; charset=UTF-8" ><body dir="rtl">';
        echo "<table style='border:2px groove #9BB1CD;border-collapse:collapse;width:100%'><tr>\r\n\t\t\t\t<td width=60px><img src='/framework/icons/logo.jpg' style='width:120px'></td>\r\n\t\t\t\t<td align='center' style='font-family:b titr;font-size:15px'>اعتماد شما سرلوحه خدمت ماست<br>\r\n\t\t\t\t\tگزارش چک های دریافتی\r\n\t\t\t\t\t";
        if (!empty($_POST["l_fromDate"])) {
            echo "<br>سررسید چک ها از تاریخ : " . $_POST["l_fromDate"] . ($_POST["l_toDate"] != "" ? " - " . $_POST["l_toDate"] : "");
        }
        if (!empty($_POST["checkStatus"])) {
            echo "<br>وضعیت : " . $_POST["statusName"];
        }
        echo "</td>\r\n\t\t\t\t<td width='200px' align='center' style='font-family:tahoma;font-size:11px'>تاریخ تهیه گزارش : " . DateModules::shNow() . "<br>";
        if (!empty($_POST["fromDate"])) {
            echo "<br>گزارش از تاریخ : " . $_POST["fromDate"] . ($_POST["toDate"] != "" ? " - " . $_POST["toDate"] : "");
        }
        echo "</td></tr></table>";
    }
    $rpg->generateReport();
    die;
}
?>
<script>
AccReport_IncomeCheque.prototype = {
	TabID : '<?php 
echo $_REQUEST["ExtTabID"];
?>
',
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:IncomeCheques.php

示例7: array

            }
            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 = "";
        $i--;
        $valid_writs = array();
        $total_year = 0;
        $total_month = 0;
        $total_day = 0;
        $total_non_year = 0;
        $total_non_month = 0;
        $total_non_day = 0;
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:employment_history.php

示例8: substr

	this.YearFieldSet = new Ext.form.FieldSet({
		title: "انتخاب سال",
		width: 400,
		renderTo : this.get("div_Years"),
		frame: true,
		items : [{
			xtype : "combo",
			store: YearStore,   
			labelWidth : 50,
			width : 220,
			fieldLabel : "سال",
			displayField: 'title',
			name : "year",
			valueField : "id",
			value : '<?php 
echo substr(DateModules::shNow(), 0, 4);
?>
',
			listeners : {
				select : function(){
					me = HolidayObject;
					me.grid.getStore().proxy.extraParams = {
						Year : this.getValue()
					};
					me.grid.getStore().load();
				}
			}
		},{
			xtype : "form",
			title : "ورود اطلاعات از طریق فایل excel",
			itemId : "excelForm",
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:holidays.php

示例9:

    $rpg->excel = !empty($_POST["excel"]);
    $rpg->mysql_resource = $dataTable;
    $rpg->addColumn("شماره تضمین", "RequestID");
    $rpg->addColumn("نوع تضمین", "TypeDesc");
    $rpg->addColumn("تاریخ شروع", "StartDate", "dateRender");
    $rpg->addColumn("تاریخ پایان", "EndDate", "dateRender");
    $rpg->addColumn("مبلغ", "amount", "moneyRender");
    $rpg->addColumn("مشتری", "fullname");
    $rpg->addColumn("سازمان مربوطه", "organization");
    $rpg->addColumn("کارمزد", "wage");
    $rpg->addColumn("شماره نامه معرفی", "LetterNo");
    $rpg->addColumn("تاریخ نامه معرفی", "LetterDate");
    if (!$rpg->excel) {
        echo '<META http-equiv=Content-Type content="text/html; charset=UTF-8" ><body dir="rtl">';
        echo "<div style=display:none>" . PdoDataAccess::GetLatestQueryString() . "</div>";
        echo "<table style='border:2px groove #9BB1CD;border-collapse:collapse;width:100%'><tr>\r\n\t\t\t\t<td width=60px><img src='/framework/icons/logo.jpg' style='width:120px'></td>\r\n\t\t\t\t<td align='center' style='height:100px;vertical-align:middle;font-family:b titr;font-size:15px'>\r\n\t\t\t\t\tگزارش کلی تضمین ها\r\n\t\t\t\t</td>\r\n\t\t\t\t<td width='200px' align='center' style='font-family:tahoma;font-size:11px'>تاریخ تهیه گزارش : " . DateModules::shNow() . "<br>";
        if (!empty($_POST["fromReqDate"])) {
            echo "<br>گزارش از تاریخ : " . $_POST["fromReqDate"] . ($_POST["toReqDate"] != "" ? " - " . $_POST["toReqDate"] : "");
        }
        echo "</td></tr></table>";
    }
    $rpg->generateReport();
    die;
}
?>
<script>
WarrentyReport_total.prototype = {
	TabID : '<?php 
echo $_REQUEST["ExtTabID"];
?>
',
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:totalReport.php

示例10: substr

<?php

//-----------------------------
//	Programmer	: SH.Jafarkhani
//	Date		: 1394.06
//-----------------------------
require_once '../header.inc.php';
require_once inc_dataGrid;
$COSTID_ShortDeposite = 66;
$COSTID_LongDeposite = 119;
$CurYear = substr(DateModules::shNow(), 0, 4);
$temp = PdoDataAccess::runquery("\r\n\tselect CostID, sum(CreditorAmount-DebtorAmount) amount \r\n\tfrom ACC_DocItems di join ACC_docs d using(DocID)\r\n\tleft join ACC_tafsilis t1 on(t1.TafsiliType=1 AND di.TafsiliID=t1.TafsiliID)\r\n\tleft join ACC_tafsilis t2 on(t2.TafsiliType=1 AND di.TafsiliID2=t2.TafsiliID)\r\n\twhere CycleID=:year AND CostID in({$COSTID_ShortDeposite},{$COSTID_LongDeposite}) \r\n\t\tAND (t1.ObjectID=:pid or t2.ObjectID=:pid) \r\n\t\tAND DocStatus in('CONFIRM','ARCHIVE')\r\n\tgroup by CostID\r\n\torder by CostID\r\n", array(":year" => $CurYear, ":pid" => $_SESSION["USER"]["PersonID"]));
$ShortDeposite = 0;
$LongDeposite = 0;
for ($i = 0; $i < count($temp); $i++) {
    $ShortDeposite = $temp[$i]["CostID"] == $COSTID_ShortDeposite ? $temp[$i]["amount"] : $ShortDeposite;
    $LongDeposite = $temp[$i]["CostID"] == $COSTID_LongDeposite ? $temp[$i]["amount"] : $LongDeposite;
}
//------------------------------------------------------------------------------
$dg = new sadaf_datagrid("dg", "global/global.data.php?task=AccDocFlow", "");
$col = $dg->addColumn("تاریخ", "DocDate", GridColumn::ColumnType_date);
$col->width = 80;
$col = $dg->addColumn("شرح سند", "description", "");
$col->width = 250;
$col = $dg->addColumn("شرح ردیف", "details", "");
$col = $dg->addColumn("مبلغ بدهکار", "DebtorAmount", GridColumn::ColumnType_money);
$col->width = 100;
$col = $dg->addColumn("مبلغ بستانکار", "CreditorAmount", GridColumn::ColumnType_money);
$col->width = 100;
$dg->HeaderMenu = false;
$dg->emptyTextOfHiddenColumns = true;
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:DepositeInfo.php

示例11:

				می باشد و سهام مذکور در دفتر ثبت سهام تحت شماره
				<b><u> &nbsp;&nbsp;" . $dataTable[$i]["ShareNo"] . "</u></b> &nbsp;( " . CurrencyModulesclass::CurrencyToString($dataTable[$i]["ShareNo"]) . " ) &nbsp;&nbsp; 
				ثبت گردیده است.
				<br><br>
				</td>
			</tr>
			<tr>
				<td style=padding-right:40px align=center>رسول عبدالهی<br> مدیر عامل</td>
				<td align=center>مهر صندوق</td>
				<td style=padding-left:40px align=center>دکتر جواد بهارآرا <br> رئیس هیئت مدیره</td>
			</tr>
		</table></div>";
		
		echo "<div style='width:285mm;font-family:Homa;font-size:12px'>
			<center>با صدور این برگ اوراق صادره قبلی باطل اعلام می گردد.( تاریخ صدور : " .
			DateModules::shNow(). " )</center></div>";
		
		if($i != count($dataTable)-1)
			echo Manage_Report::PageBreak();
	}
	echo "</center></body></html>";
	die();
}

?>
<script>
PrintShare.prototype = {
	TabID : '<?= $_REQUEST["ExtTabID"]?>',
	address_prefix : "<?= $js_prefix_address?>",

	DocID : "",
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:PrintShare.php

示例12: ShowReport

function ShowReport()
{
    $query = "SELECT c.*,concat_ws(' ',p1.fname,p1.lname,p1.CompanyName) fullname,\r\n\t\t\tconcat_ws(' ',p2.fname,p2.lname,p2.CompanyName)fullname2,bf.InfoDesc ContractTypeDesc \r\n\t\tFROM CNT_contracts c \r\n\t\t\tjoin BaseInfo bf on(bf.TypeID=18 AND bf.InfoID=ContractType)\r\n\t\t\tleft join CNT_ContractItems ci using(ContractID)\r\n\t\t\tleft join BSC_persons p1 on(c.PersonID=p1.PersonID)\r\n\t\t\tleft join BSC_persons p2 on(c.PersonID2=p2.PersonID)\r\n\t\twhere 1=1\r\n\t";
    $params = array();
    $index = 0;
    $itemsWhere = "1=0 ";
    $keys = array_keys($_POST);
    foreach ($keys as $key) {
        if (empty($_POST[$key])) {
            continue;
        }
        switch ($key) {
            case "TemplateID":
            case "ContractType":
            case "PersonID":
            case "PersonID2":
                $query .= " AND c." . $key . "=:p" . $index;
                $params[":p" . $index++] = $_POST[$key];
                break;
            case "FromContractAmount":
            case "FromStartDate":
            case "FromEndDate":
                $query .= " AND c." . $key . " <= :p" . $index;
                $params[":p" . $index++] = $_POST[$key];
                break;
            case "ToContractAmount":
            case "ToStartDate":
            case "ToEndDate":
                $query .= " AND c." . $key . " >= :p" . $index;
                $params[":p" . $index++] = $_POST[$key];
                break;
            case "description":
                $query .= " AND c." . $key . " like :p" . $index;
                $params[":p" . $index++] = "%" . $_POST[$key] . "%";
                break;
            default:
                if (strpos($key, "TplItem_") !== false) {
                    $key = substr($key, 8);
                    $itemsWhere .= " OR if(ci.TemplateItemID=" . $key . ",ItemValue like :p" . $index . ",1=0)";
                    $params[":p" . $index++] = "%" . $_POST["TplItem_" . $key] . "%";
                }
        }
    }
    $data = PdoDataAccess::runquery($query . " AND ({$itemsWhere})" . " group by c.ContractID", $params);
    //echo PdoDataAccess::GetLatestQueryString();
    $rpg = new ReportGenerator();
    $rpg->excel = !empty($_POST["excel"]);
    $rpg->mysql_resource = $data;
    function dateRender($row, $val)
    {
        return DateModules::miladi_to_shamsi($val);
    }
    function moneyRender($row, $value)
    {
        return number_format($value);
    }
    function ContractRender($row, $value)
    {
        return "<a target=blank href=../contract/PrintContract.php?ContractID=" . $value . ">" . $value . "</a>";
    }
    $rpg->addColumn("شماره قرارداد", "ContractID", "ContractRender");
    $rpg->addColumn("تاریخ شروع", "StartDate", "dateRender");
    $rpg->addColumn("تاریخ پایان", "EndDate", "dateRender");
    $rpg->addColumn("نوع قرارداد", "ContractTypeDesc");
    $rpg->addColumn("طرف اول قرارداد", "fullname");
    $rpg->addColumn("طرف دوم قرارداد", "fullname2");
    $rpg->addColumn("مبلغ قرارداد", "ContractAmount", "moneyRender");
    if (!$rpg->excel) {
        echo '<META http-equiv=Content-Type content="text/html; charset=UTF-8" ><body dir="rtl">';
        echo "<table style='border:2px groove #9BB1CD;border-collapse:collapse;width:100%'><tr>\r\n\t\t\t\t<td width=60px><img src='/framework/icons/logo.jpg' style='width:120px'></td>\r\n\t\t\t\t<td align='center' style='height:100px;vertical-align:middle;font-family:b titr;font-size:15px'>\r\n\t\t\t\t\tگزارش قرارداد ها\r\n\t\t\t\t</td>\r\n\t\t\t\t<td width='200px' align='center' style='font-family:tahoma;font-size:11px'>تاریخ تهیه گزارش : " . DateModules::shNow() . "<br>";
        echo "</td></tr></table>";
    }
    $rpg->generateReport();
    die;
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:76,代码来源:TotalReport.php

示例13: on

    $rpt->mysql_resource = $temp;
    $rpt->headerContent = "\r\n\t\t<table id=header width=100%>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=45%>کد وام : <b>" . $ReqObj->RequestID . "</b>\r\n\t\t\t\t\t<br>نوع وام : <b>" . $ReqObj->_LoanDesc . "</b>\r\n\t\t\t\t\t<br>وام گیرنده : <b>" . $ReqObj->_LoanPersonFullname . "</b>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td width=20% style='font-family:titr'>اسناد ضمانتی</td>\r\n\t\t\t\t<td width=45% align=left>تاریخ صدور قبض : <b>" . DateModules::shNow() . "</b></td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\t";
    $rpt->addColumn("نوع ضمانت", "DocTypeDesc");
    $rpt->addColumn("اطلاعات ضمانت", "paramValues");
}
//..............................................................................
$dt = PdoDataAccess::runquery("\r\n\tselect p.*,i.*,\r\n\t\t\tb.BankDesc, \r\n\t\t\tbi.InfoDesc PayTypeDesc, \r\n\t\t\tt.TafsiliDesc ChequeStatusDesc\r\n\t\t\t\r\n\t\tfrom LON_BackPays p\r\n\t\tleft join BaseInfo bi on(bi.TypeID=6 AND bi.InfoID=p.PayType)\r\n\t\tleft join ACC_IncomeCheques i using(IncomeChequeID)\r\n\t\tleft join ACC_banks b on(ChequeBank=BankID)\r\n\t\tleft join ACC_tafsilis t on(t.TafsiliType=" . TAFTYPE_ChequeStatus . " AND t.TafsiliID=i.ChequeStatus)\r\n\twhere p.RequestID=? AND PayType=9", array($ReqObj->RequestID));
//print_r(ExceptionHandler::PopAllExceptions());
$SumCheques = 0;
foreach ($dt as $row) {
    $SumCheques += $row["PayAmount"] * 1;
}
if (count($dt) > 0) {
    $rpt2 = new ReportGenerator();
    $rpt2->mysql_resource = $dt;
    $rpt2->headerContent = "\r\n\t\t<table id=header width=100%>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=45%></td>\r\n\t\t\t\t<td width=20% style='font-family:titr'>چک های اقساط</td>\r\n\t\t\t\t<td width=45% align=left>تاریخ صدور قبض : <b>" . DateModules::shNow() . "</b></td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\t";
    function dateRender($row, $value)
    {
        return DateModules::miladi_to_shamsi($value);
    }
    function amountRender($row, $value)
    {
        return number_format($value);
    }
    $rpt2->addColumn("تاریخ چک", "PayDate", "dateRender");
    $rpt2->addColumn("نام بانک", "BankDesc");
    $rpt2->addColumn("شعبه", "ChequeBranch");
    $rpt2->addColumn("شماره چک", "ChequeNo");
    $rpt2->addColumn("مبلغ چک", "PayAmount", "amountRender");
}
?>
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:PrintLoanDocs.php

示例14: showReport


//.........这里部分代码省略.........
	function moneyRender($row, $val) {
		return number_format($val, 0, '.', ',');
	}

	function bdremainRender($row){
		$v = $row["bdAmount"] - $row["bsAmount"];
		return $v < 0 ? 0 : number_format($v);
	}
	
	function bsremainRender($row){
		$v = $row["bsAmount"] - $row["bdAmount"];
		return $v < 0 ? 0 : number_format($v);
	}
	
	$col = $rpg->addColumn("بدهکار", "StartCycleDebtor", "moneyRender");
	$col->GroupHeader = "حساب ابتدای دوره";
	$col->EnableSummary(true);
	$col = $rpg->addColumn("بستانکار", "StartCycleCreditor", "moneyRender");
	$col->GroupHeader = "حساب ابتدای دوره";
	$col->EnableSummary(true);
	
	$col = $rpg->addColumn("بدهکار", "bdAmount" , "moneyRender");
	$col->GroupHeader = "گردش طی دوره";
	$col->EnableSummary();
	$col = $rpg->addColumn("بستانکار", "bsAmount", "moneyRender");
	$col->GroupHeader = "گردش طی دوره";
	$col->EnableSummary();

	$col = $rpg->addColumn("مانده بدهکار", "bdAmount", "bdremainRender");
	$col->GroupHeader = "مانده پایان دوره";
	$col->EnableSummary(true);
	$col = $rpg->addColumn("مانده بستانکار", "bsAmount", "bsremainRender");
	$col->GroupHeader = "مانده پایان دوره";
	$col->EnableSummary(true);

	if(!$rpg->excel)
	{
		BeginReport();
		echo "<div style=display:none>" . PdoDataAccess::GetLatestQueryString() . "</div>";
		echo "<table style='border:2px groove #9BB1CD;border-collapse:collapse;width:100%'><tr>
				<td width=60px><img src='/framework/icons/logo.jpg' style='width:120px'></td>
				<td align='center' style='height:100px;vertical-align:middle;font-family:b titr;font-size:15px'>
					تراز دفتر 
				".$levelsDescArr[$level]." <br> ".
				 $_SESSION["accounting"]["BranchName"]. "<br>" . "دوره سال " .
				$_SESSION["accounting"]["CycleID"] .
				"</td>
				<td width='200px' align='center' style='font-family:tahoma;font-size:11px'>تاریخ تهیه گزارش : " 
			. DateModules::shNow() . "<br>";
		if(!empty($_POST["fromDate"]))
		{
			echo "<br>گزارش از تاریخ : " . $_POST["fromDate"] . ($_POST["toDate"] != "" ? " - " . $_POST["toDate"] : "");
		}
		echo "</td></tr></table>";
	}
	
	$rpg->mysql_resource = $dataTable;
	$rpg->generateReport();
	
	?>
	<script>
		function changeLevel(curlevel,level1,level2,level3,TafsiliGroup,TafsiliID)
		{
			nextLevel = (curlevel.substring(1)*1);
			nextLevel = (nextLevel == 4 || nextLevel == 5) ? nextLevel+2 : nextLevel+1
				
			var form = document.getElementById("subForm");
			form.action = "taraz.php?show=true&level=" + "l" + nextLevel;
			
			if(curlevel >= "l1")
				form.action += "&level1=" + level1;
			if(curlevel >= "l2")
				form.action += "&level2=" + level2;
			if(curlevel >= "l3")
				form.action += "&level3=" + level3;
			if(curlevel >= "l4")
				form.action += "&tafsiligroup=" + TafsiliGroup;
			if(curlevel >= "l5")
				form.action += "&TafsiliID=" + TafsiliID;
			
			form.submit();
			return;
		}
	</script>
<form id="subForm" method="POST" target="_blank">
	
	<input type="hidden" name="fromDate" value="<?= !empty($_REQUEST["fromDate"]) ? $_REQUEST["fromDate"] : "" ?>">
	<input type="hidden" name="toDate" value="<?= !empty($_REQUEST["toDate"]) ? $_REQUEST["toDate"] : "" ?>">
	<input type="hidden" name="fromLocalNo" value="<?= !empty($_REQUEST["fromLocalNo"]) ? $_REQUEST["fromLocalNo"] : "" ?>">
	<input type="hidden" name="toLocalNo" value="<?= !empty($_REQUEST["toLocalNo"]) ? $_REQUEST["toLocalNo"] : "" ?>">
	<input type="hidden" name="IncludeRaw" value="<?= !empty($_REQUEST["IncludeRaw"]) ? $_REQUEST["IncludeRaw"] : "" ?>">
	<input type="hidden" name="BranchID" value="<?= !empty($_REQUEST["BranchID"]) ? $_REQUEST["BranchID"] : "" ?>">
	
	<input type="hidden" name="level1s" id="level1s" value="<?= $_POST["level1s"] ?>">
	<input type="hidden" name="level2s" id="level2s" value="<?= $_POST["level2s"] ?>">
	<input type="hidden" name="level3s" id="level3s" value="<?= $_POST["level3s"] ?>">
</form>
	<?
	die();
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:101,代码来源:taraz.php

示例15: RegisterOuterCheque

function RegisterOuterCheque($DocID, $InChequeObj, $pdo, $CostID = "", $TafsiliID = "", $TafsiliID2 = "", $CenterAccount = "", $BranchID = "", $FirstCostID = "", $SecondCostID = "")
{
    /*@var $InChequeObj ACC_IncomeCheques */
    $CycleID = substr(DateModules::shNow(), 0, 4);
    //------------- get CostCodes --------------------
    $CostCode_guaranteeAmount_daryafti = FindCostID("904-04");
    $CostCode_guaranteeAmount2_daryafti = FindCostID("905-04");
    //-------------------- BranchID -----------------------
    $BackPays = $InChequeObj->GetBackPays($pdo);
    if (count($BackPays) > 0) {
        $FirstBranchID = $BackPays[0]["BranchID"];
    } else {
        $FirstBranchID = $_SESSION["accounting"]["BranchID"];
    }
    //---------------- add doc header --------------------
    if ($DocID == "") {
        $obj = new ACC_docs();
        $obj->RegDate = PDONOW;
        $obj->regPersonID = $_SESSION['USER']["PersonID"];
        $obj->DocDate = PDONOW;
        $obj->CycleID = $CycleID;
        $obj->BranchID = $FirstBranchID;
        $obj->DocType = DOCTYPE_INCOMERCHEQUE;
        $obj->description = "چک شماره " . $InChequeObj->ChequeNo;
        if (!$obj->Add($pdo)) {
            ExceptionHandler::PushException("خطا در ایجاد سند");
            return false;
        }
    } else {
        $obj = new ACC_docs($DocID, $pdo);
    }
    //----------------- add Doc items ------------------------
    $__ChequeAmount = $InChequeObj->ChequeAmount;
    $__ChequeID = $InChequeObj->IncomeChequeID;
    $__TafsiliID = $InChequeObj->TafsiliID;
    if ($__TafsiliID == "") {
        $dt = $InChequeObj->GetBackPays();
        if (count($dt) == 1) {
            $__TafsiliID = $dt[0]["TafsiliID"];
        }
    }
    $__SourceType = DOCTYPE_INCOMERCHEQUE;
    $itemObj = new ACC_DocItems();
    $itemObj->DocID = $obj->DocID;
    $itemObj->locked = "YES";
    $itemObj->TafsiliType = TAFTYPE_PERSONS;
    $itemObj->TafsiliID = $__TafsiliID;
    $itemObj->TafsiliType2 = TAFTYPE_ChequeStatus;
    $itemObj->TafsiliID2 = $InChequeObj->ChequeStatus;
    $itemObj->SourceType = $__SourceType;
    $itemObj->SourceID = $__ChequeID;
    $itemObj->details = "چک شماره " . $InChequeObj->ChequeNo;
    //............................................................
    if ($InChequeObj->ChequeStatus == INCOMECHEQUE_NOTVOSUL) {
        unset($itemObj->ItemID);
        $itemObj->CostID = $CostCode_guaranteeAmount_daryafti;
        $itemObj->DebtorAmount = $__ChequeAmount;
        $itemObj->CreditorAmount = 0;
        $itemObj->Add($pdo);
        unset($itemObj->ItemID);
        $itemObj->CostID = $CostCode_guaranteeAmount2_daryafti;
        $itemObj->DebtorAmount = 0;
        $itemObj->CreditorAmount = $__ChequeAmount;
        $itemObj->Add($pdo);
        if (ExceptionHandler::GetExceptionCount() > 0) {
            return false;
        }
        return $obj->DocID;
    }
    //............................................................
    if ($InChequeObj->ChequeStatus == INCOMECHEQUE_VOSUL) {
        unset($itemObj->ItemID);
        $itemObj->CostID = $CostCode_guaranteeAmount2_daryafti;
        $itemObj->DebtorAmount = $__ChequeAmount;
        $itemObj->CreditorAmount = 0;
        $itemObj->Add($pdo);
        unset($itemObj->ItemID);
        $itemObj->CostID = $CostCode_guaranteeAmount_daryafti;
        $itemObj->DebtorAmount = 0;
        $itemObj->CreditorAmount = $__ChequeAmount;
        $itemObj->Add($pdo);
        if (count($BackPays) > 0) {
            foreach ($BackPays as $row) {
                $BackPayObj = new LON_BackPays($row["BackPayID"]);
                $ReqObj = new LON_requests($BackPayObj->RequestID);
                $PersonObj = new BSC_persons($ReqObj->ReqPersonID);
                if ($PersonObj->IsSupporter == "YES") {
                    $result = RegisterSHRTFUNDCustomerPayDoc($obj, $BackPayObj, $CostID, $TafsiliID, $TafsiliID2, $CenterAccount, $BranchID, $FirstCostID, $SecondCostID, $pdo);
                } else {
                    $result = RegisterCustomerPayDoc($obj, $BackPayObj, $CostID, $TafsiliID, $TafsiliID2, $CenterAccount, $BranchID, $FirstCostID, $SecondCostID, $pdo);
                }
            }
        } else {
            if ($CenterAccount == "true") {
                unset($itemObj->ItemID);
                unset($itemObj->TafsiliType);
                unset($itemObj->TafsiliType2);
                unset($itemObj->TafsiliID2);
                unset($itemObj->TafsiliID);
                $itemObj->locked = "NO";
//.........这里部分代码省略.........
开发者ID:jafarkhani,项目名称:rtfund,代码行数:101,代码来源:import.data.php


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