本文整理汇总了PHP中DateModules::Miladi_to_Shamsi方法的典型用法代码示例。如果您正苦于以下问题:PHP DateModules::Miladi_to_Shamsi方法的具体用法?PHP DateModules::Miladi_to_Shamsi怎么用?PHP DateModules::Miladi_to_Shamsi使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateModules
的用法示例。
在下文中一共展示了DateModules::Miladi_to_Shamsi方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$res[$i]['city_title'] = 'مشهد' ;
/* $res[$i]['plname'] = 'ئ' ;
echo $cnv->convertStringMs2Dos(iconv('UTF-8','WINDOWS-1256',$res[$i]['plname'])) ;
die() ; */
$record = array($res[$i]['daily_work_place_no'],
substr($_POST['pay_year'],2,2),
$_POST['pay_month'],
NULL, /* شماره ليست*/
$cnv->correctDigitDir($res[$i]['insure_no']),
$cnv->convertStringMs2Dos(iconv('UTF-8','WINDOWS-1256',$res[$i]['pfname'])),
$cnv->convertStringMs2Dos(iconv('UTF-8','WINDOWS-1256',$res[$i]['plname'])),
$cnv->convertStringMs2Dos(iconv('UTF-8','WINDOWS-1256',$res[$i]['father_name'])),
$cnv->convertDigitDosEnToFa($cnv->correctDigitDir($res[$i]['idcard_no'])),
$cnv->convertStringMs2Dos(iconv('UTF-8','WINDOWS-1256',$res[$i]['city_title'])),
substr(DateModules::Miladi_to_Shamsi($res[$i]['issue_date']),2),
NULL, /*DSW_BDATE*/
$cnv->convertStringMs2Dos(iconv('UTF-8','WINDOWS-1256',$sex)),
$cnv->convertStringMs2Dos(iconv('UTF-8','WINDOWS-1256',$res[$i]['country_title'])),
$cnv->convertStringMs2Dos(iconv('UTF-8','WINDOWS-1256',$res[$i]['job_title'])),
substr($contract_start_date,2),
substr($contract_end_date,2),
round($res[$i]['work_sheet']),
round($res[$i]['daily_fee']),
round($res[$i]['monthly_fee']),
round($res[$i]['monthly_premium']),
round($res[$i]['monthly_insure_include']),
round($res[$i]['pay']),
round($res[$i]['worker_insure_include']),
NULL, /* نرخ پورسانتاژ */
NULL, /* DSW_JOB */
示例2: compute_salary_other_premium
private function compute_salary_other_premium($writ_rec) {
//$param1 گروه معادل استخدام كشوري افراد
//$param2 افزايش سنواتي سال جاري
//$param3 افزايش سنواتي سال قبل
//$param4 ضريب فوق العاده شغل .
//$param5 ضريب فوق العاده جذب
$worker_salary = $this->compute_writ_items_sum($writ_rec["writ_id"], $writ_rec["writ_ver"], $writ_rec["staff_id"]
, '( ' . SIT_WORKER_BASE_SALARY . ' , ' . SIT_WORKER_ANNUAL_INC . ')');
// ________________________________________
//compute_other_premium_base_salary
$rial_coef = manage_salary_params::get_salaryParam_value("", $writ_rec["person_type"].",101", SPT_RIAL_COEF, $writ_rec['execute_date']);
if (!$rial_coef) {
parent::PushException(RIAL_COEF_NOT_FOUND);
return false;
}
$worker_emp_base_salary = $rial_coef * manage_writ_item::Get_employee_base_number($this->param1);
//_________________________________________
$worker_emp_annual_inc = $this->param2;
$worker_emp_job_extra = $this->param4 * $worker_emp_base_salary;
//_________________________________________
//compute_other_premium_min_salary
$min_sal_value = manage_salary_params::get_salaryParam_value("", $writ_rec["person_type"].",101", SPT_MIN_SALARY, $writ_rec['execute_date']);
$worker_emp_min_salary = max($min_sal_value - ($worker_emp_base_salary + $worker_emp_annual_inc + $worker_emp_job_extra), 0);
//_________________________________________
//compute_other_premium_absorb_extra
$worker_emp_absorb_extra = $this->param5 *
($worker_emp_base_salary + $worker_emp_annual_inc + $worker_emp_job_extra + $worker_emp_min_salary);
//_________________________________________
//compute_other_premium_bad_weather_extra
$worker_emp_bad_wheader = 0;
if ($writ_rec['emp_mode'] == EMP_MODE_ENGAGEMENT || $writ_rec['emp_mode'] == EMP_MODE_EDUCATIONAL_MISSION)
$worker_emp_bad_wheader = 0;
$this->param1 = manage_salary_params::get_salaryParam_value("", $writ_rec["person_type"].",101", SPT_WHEATHER_COEF, $writ_rec['execute_date']);
if (!$this->param1) {
parent::PushException('WHEATHER_COEF_NOT_FOUND');
$worker_emp_bad_wheader = 0;
}
$value = $this->param1 * $worker_emp_base_salary;
if (!($value > 0)) {
parent::PushException('WHEATHER_ITEM_CALC_ERR');
$worker_emp_bad_wheader = 0;
}
//_________________________________________
//compute_other_premium_8_9_absorb
//// محاسبه فوق العاده جذب بندهاي 8 و 9
// به دست آوردن اولين روز سال قبل
$this_writ_year = substr(DateModules::Miladi_to_Shamsi($writ_rec['execute_date']), 0, 4);
$one_year_ago = $this_writ_year - 1;
$one_year_ago_first_day = $one_year_ago . "/01/01";
$Gone_year_ago_first_day = DateModules::Shamsi_to_Miladi($one_year_ago_first_day);
// ضريب ريالي سال قبل
$rial_coef = manage_salary_params::get_salaryParam_value("", $writ_rec["person_type"].",101", SPT_RIAL_COEF, $Gone_year_ago_first_day);
if (!$rial_coef) {
parent::PushException('RIAL_COEF_NOT_FOUND');
return false;
}
// حقوق پايه سال قبل
$prior_base_salary = $rial_coef * manage_writ_item::Get_employee_base_number($this->param1);
// افزايش سنواتي سال قبل
$prior_annual_inc = $this->param3;
//فوق العاده شغل سال قبل
$prior_job_extra = $prior_base_salary * $this->param4;
// حداقل دريافتي سال قبل
$min_sal_value = manage_salary_params::get_salaryParam_value("", $writ_rec["person_type"].",101", SPT_MIN_SALARY, $Gone_year_ago_first_day);
$prior_min_salary = max($min_sal_value - ($prior_base_salary + $prior_annual_inc + $prior_job_extra), 0);
// جمع اقلام مرتبط با فوق العاده تعديل
$adjust_sal_items_sum = $prior_base_salary + $prior_annual_inc + $prior_job_extra + $prior_min_salary;
// محاسبه فوق العاده تعديل سال قبل
$max_value = manage_writ_item::Get_employee_base_number(1) * $rial_coef * 1.5;
if ($adjust_sal_items_sum <= 3000000)
$value = $max_value;
elseif ($adjust_sal_items_sum >= 5700000)
$value = 0;
else
$value = (1 - (intval(($adjust_sal_items_sum - 3000000) / 300000) + 1) * 0.1) * $max_value;
$worker_emp_8_9_absorb = $value * 1.5;
//_________________________________________
$worker_emp_salary =
$worker_emp_base_salary +
$worker_emp_annual_inc +
$worker_emp_job_extra +
$worker_emp_min_salary +
//.........这里部分代码省略.........
示例3:
شروع خدمت وظيفه :
</td>
<td width="25%">
<input type="text" id="military_from_date" name="military_from_date" class="x-form-text x-form-field" style="width: 80px"
value="<?php
echo DateModules::Miladi_to_Shamsi($obj->military_from_date);
?>
">
</td>
<td width="25%">
پايان خدمت وظيفه :
</td>
<td width="25%">
<input type="text" id="military_to_date" name="military_to_date" class="x-form-text x-form-field" style="width: 80px"
value="<?php
echo DateModules::Miladi_to_Shamsi($obj->military_to_date);
?>
">
</td>
</tr>
<tr>
<td width="25%">
مدت خدمت :
</td>
<td width="25%">
<table><tr><td>
<input type="text" id="military_duration" name="military_duration" class="x-form-text x-form-field" style="width: 50px"
value="<?php
echo $obj->military_duration;
示例4: compute_year_work_days
static function compute_year_work_days($staff_id, $start_date, $end_date)
{
//ط§طع©ط§ظ… ظ…ظˆط¬ظˆط¯ ط¯ط± ط§ظٹظ† ط¨ط§ط²ظ‡ طھط§ط±ظٹط®ظٹ ط±ط§ ط§ط³طھط®ط±ط§ط¬ ظ…ظٹ ع©ظ†ط¯.
$query = "select wst.annual_effect,w.execute_date\n\t \t\t\tfrom writs w\n\t \t\t\t\tINNER JOIN writ_subtypes wst\n\t\t\t\t\t\t\t\t\t ON (w.writ_type_id = wst.writ_type_id AND \n\t\t\t\t\t\t\t\t\t \t w.writ_subtype_id = wst.writ_subtype_id)\n\t\t\t\t\t\twhere execute_date >= '{$start_date}' AND execute_date <= '{$end_date}' AND\n\t \n\t (history_only !=" . HISTORY_ONLY . " OR history_only is null) AND\n\t staff_id = {$staff_id}\n\t\t\t\t\t\torder by execute_date";
$writDT = PdoDataAccess::runquery($query);
$writ_duration = 0;
$duration = 0;
$prev_end_date = null;
for ($i = 0; $i < count($writDT); $i++) {
if ($i + 1 < count($writDT)) {
$writ_duration = DateModules::getDateDiff(DateModules::Miladi_to_Shamsi($writDT[$i + 1]["execute_date"]), DateModules::Miladi_to_Shamsi($writDT[$i]["execute_date"]));
if ($prev_end_date == $writDT[$i]['execute_date']) {
$writ_duration--;
}
$prev_end_date = $writDT[$i + 1]['execute_date'];
} else {
$writ_duration = DateModules::getDateDiff(DateModules::Miladi_to_Shamsi($end_date), DateModules::Miladi_to_Shamsi($writDT[$i]["execute_date"]));
if ($prev_end_date == $writDT[$i]['execute_date']) {
$writ_duration--;
}
//$prev_end_date = $writ_recSet[$key+1]['execute_date'];
}
switch ($writDT[$i]['annual_effect']) {
case HALF_COMPUTED:
$writ_duration *= 0.5;
break;
case DOUBLE_COMPUTED:
$writ_duration *= 2;
break;
case NOT_COMPUTED:
$writ_duration = 0;
break;
}
$duration += $writ_duration;
}
$duration++;
return $duration;
}
示例5: get_last_writ_of_prior_year
/**
* آخرين حکم سال قبل فرد را نسبت به تاريخ فرستاده شده برمي گرداند
*
* @return manage_writ object
*/
static function get_last_writ_of_prior_year($staff_id, $current_execute_date)
{
$this_writ_year = substr(DateModules::Miladi_to_Shamsi($current_execute_date), 0, 4);
$one_year_ago = $this_writ_year - 1;
$prior_writ = manage_writ::get_last_writ_by_date($staff_id, DateModules::Shamsi_to_Miladi($one_year_ago . "-12-30"));
return $prior_writ;
}
示例6:
}
}
?>
<tr>
<td>قابل پرداخت ؟</td>
<td><input type="checkbox" name="must_pay" class="x-form-text x-form-field" id="must_pay"
value="1" <?php
echo $writSalaryItemObj->must_pay == "1" ? "checked" : "";
?>
></td>
</tr>
<tr>
<td>تاريخ ياد آوري :</td>
<td><input type="text" id="remember_date" name="remember_date"
value="<?php
echo $writSalaryItemObj->remember_date != "" ? DateModules::Miladi_to_Shamsi($writSalaryItemObj->remember_date) : "";
?>
"></td>
</tr>
<tr>
<td>پيام يادآوري :</td>
<td><input type="text" id="remember_message" class="x-form-text x-form-field" name="remember_message"
style="width: 98%" value="<?php
echo $writSalaryItemObj->remember_message;
?>
">
</td>
</tr>
<tr>
<td>مبلغ :</td>
示例7: get_mobilizations_coefs
static function get_mobilizations_coefs($staff_id, $from_j_year, $to_j_year)
{
$query = " SELECT *\n FROM\n mobilization_lists ml\n INNER JOIN mobilization_list_items mli\n ON ml.list_id = mli.list_id\n WHERE staff_id = {$staff_id}\n ORDER BY list_date\n ";
$res = parent::runquery($query);
$mobilizations = array();
for ($i = 0; $i < count($res); $i++) {
$list_date = $res[$i]['list_date'];
$list_j_date = DateModules::Miladi_to_Shamsi($list_date);
$year = substr($list_j_date, 0, 4);
if ($year >= $from_j_year && $year <= $to_j_year) {
$mobilizations[$year] = $res[$i]['mobilization_coef'];
}
}
return $mobilizations;
}
示例8:
تاريخ شروع اعتبار :
</td>
<td width="25%">
<input type="text" id="validity_start_date" name="validity_start_date" class="x-form-text x-form-field" style="width: 80px"
value="<?php
echo DateModules::Miladi_to_Shamsi($obj->validity_start_date);
?>
" >
</td>
<td width="25%">
تاريخ پايان اعتبار :
</td>
<td width="25%">
<input type="text" id="validity_end_date" name="validity_end_date" class="x-form-text x-form-field" style="width: 80px"
value="<?php
echo DateModules::Miladi_to_Shamsi($obj->validity_end_date);
?>
">
</td>
</tr>
<tr>
<td width="25%">
نحوه محاسبه:
</td>
<td width="25%"><input type="text" id="salary_compute_type"></td>
<td width="25%">
مضروب فيه:
</td>
<td width="25%"><input type="text" id="multiplicand"></td>
</tr>
<tr>
示例9:
<td width="75%" colspan="3">
<textarea id="description" name="description" rows="4" cols="83"
class=" x-form-field" ><?php
echo $objWrt->description;
?>
</textarea>
</td>
</tr>
<tr>
<td>
تاريخ يادآوري :
</td>
<td class="blueText" >
<input type="text" id="warning_date" name="warning_date" class="x-form-text x-form-field"
value="<?php
echo DateModules::Miladi_to_Shamsi($objWrt->warning_date);
?>
" style="width: 80px" >
</td>
<td>
پيام ياد آوري :
</td>
<td class="blueText" >
<input type="text" id="warning_message" name="warning_message" class="x-form-text x-form-field" style="width: 130px"
value="<?php
echo $objWrt->warning_message;
?>
" >
</td>
</tr>
<tr>
示例10: similar_year
/**
* مشخص مي کند که دو تاريخ در يک سال هستند يا خير
*
* @param miladi_date $gdate1
* @param miladi_date $gdate2
*
* @return boolean
*/
static function similar_year($gdate1, $gdate2)
{
$year_changed = false;
list($day1, $month1, $year1) = preg_split('/\\//', DateModules::Miladi_to_Shamsi($gdate1));
list($day2, $month2, $year2) = preg_split('/\\//', DateModules::Miladi_to_Shamsi($gdate2));
if ($year1 != $year2) {
$year_changed = true;
}
return $year_changed;
}
示例11: substr
echo DateModules::Miladi_to_Shamsi($FullWrt[0]['writ_transfer_date']);
?>
</font> ساعت :
<font class="blueText" > <?php
echo substr($FullWrt[0]['writ_transfer_date'], 11, 5);
?>
</font>
</td>
</tr>
<tr>
<td>زمان دریافت حقوق :
</td>
<td>
<font class="blueText" ><?php
echo DateModules::Miladi_to_Shamsi($FullWrt[0]['writ_recieve_date']);
?>
</font> ساعت :
<font class="blueText" > <?php
echo substr($FullWrt[0]['writ_recieve_date'], 11, 5);
?>
</font>
</td>
</tr>
<tr>
<td colspan="4" align="center"><br><hr><br>
<div id="div_fs"></div>
</td>
</tr>
</table>
示例12: getdate
<?php
//---------------------------
// programmer: Mahdipour
// create Date: 94.11
//---------------------------
require_once '../../../header.inc.php';
require_once '../class/writ.class.php';
require_once inc_dataReader;
//$WritTypeArr = manage_domains::DRP_writType_writSubType("form_issueWrit","writ_type_id", "writ_subtype_id", "" , "" , "" , "" , "200");
$today = getdate();
$current_date = DateModules::Miladi_to_Shamsi($today['year'] . "-" . $today['mon'] . "-" . $today['mday']);
list($year, $month, $day) = explode('/', $current_date);
$start_date = $year . "/01/01";
$end_date = $year . "/12/29";
require_once '../js/issue_writ.js.php';
?>
<form id="form_issueWrit" method="post">
<center>
<div id="errordiv_issueWrit" style="width: 600px"></div>
<br>
<div id="newWrit_DIV" style="width: 600px">
<table id="newWrit_TBL" cellpadding="2">
<tr>
<td>انتخاب فرد :</td>
<td>
<input type="text" id="issueWrit_PID">
<input type="hidden" name="staff_id" id="staff_id" >
<input type="hidden" name="person_type" id="person_type">
<input type="hidden" name="OrdinaryWrit" id="OrdinaryWrit">