Example #1
0
function makeBody($salaryItems){
	
	global $GroupCostCenter;
	global $GroupPersonType;
	
	$pay_val_sum = vals_sum($salaryItems,1);
	$diff_pay_val_sum = vals_sum($salaryItems,1,'diff_get');
	$get_val_sum = vals_sum($salaryItems,2);
	
//echo $get_val_sum .'---------' ;  die() ; 
	
	$diff_get_val_sum = vals_sum($salaryItems,2,'diff_get');
	$i149 = isset($salaryItems[149]) ? $salaryItems[149] : 0;
	$i150 = isset($salaryItems[150]) ? $salaryItems[150] : 0;
	$i144 = isset($salaryItems[144]) ? $salaryItems[144] : 0;
	$i145 = isset($salaryItems[145]) ? $salaryItems[145] : 0;
	$i744 = isset($salaryItems[744]) ? $salaryItems[744] : 0;
	$i9920 = isset($salaryItems[9920]) ? $salaryItems[9920] : 0;
	$i38   = isset($salaryItems[38]) ? $salaryItems[38] : 0;
	$i143  = isset($salaryItems[143]) ? $salaryItems[143] : 0;
	//+items+
	$hoghogh = getSum('1,2,34,3,4,36,283,10264,10364',$salaryItems);//'حقوق '
	$diff_hoghogh = getSum('1,2,34,3,4,36,283,10264 , 10364 ',$salaryItems,'diff_pay');//'تفاوت حقوق '
	$foghaladeh_shoghl = getSum('17,6,10267, 10367',$salaryItems);//'فوق العاده شغل '
	$diff_foghaladeh_shoghl = getSum('17,6,10267, 10367',$salaryItems,'diff_pay');//'تفاوت فوق العاده شغل '
	$foghaladeh_jazb = getSum('15,21,22,167,10266,10366',$salaryItems);//'فوق العاده جذب '
	$diff_foghaladeh_jazb = getSum('15,21,22,167,10266,10366',$salaryItems,'diff_pay');//'تفاوت فوق العاده جذب '
	$aelemandi_oulad = getSum('29,30,7,8,9,10,32,50,51,10330,10371,10329,10370',$salaryItems);//'عائله مندي و حق اولاد و مسكن'
	$diff_aelemandi_oulad = getSum('29,30,7,8,9,10,32,50,51,10330,10371,10329,10370',$salaryItems,'diff_pay');//'تفاوت عائله مندي و حق اولاد و مسكن'
	$sakhtikar_noubatkari = getSum('26,27,23,49,55,10328,10369,10331,10372,10334,10375',$salaryItems);//'سختي کار و يا نوبت کاري '
	$diff_sakhtikar_noubatkari = getSum('26,27,23,49,55,10328,10369,10331,10372,10334,10375',$salaryItems,'diff_pay');//'تفاوت سختي کار و يا نوبت کاري '
	$badi_ab_hava = getSum('24,25,14,46,10333,10374',$salaryItems);//'بدي آب و هوا '
	$diff_badi_ab_hava = getSum('24,25,14,46,10333,10374',$salaryItems,'diff_pay');//'تفاوت بدي آب و هوا '
	$tafavot_tatbigh = getSum('33,168,12,183,9969,56,47,10327,10368,10335,10376',$salaryItems);//'تفاوت تطبيق '
	$diff_tafavot_tatbigh = getSum('33,168,12,183,9969,56,47,10327,10368,10335,10376',$salaryItems,'diff_pay');//'تفاوت تفاوت تطبيق '
	$ezafekar_haghotadris = getSum('39,152,9922,9921',$salaryItems);//'اضافه کار يا حق التدريس '
	$diff_ezafekar_haghotadris = getSum('39,152,9922,9921',$salaryItems,'diff_pay');//'تفاوت اضافه کار يا حق التدريس '
	$mazaya1 = getSum('16,510,41',$salaryItems);//'ساير مزايا 1 '
	$diff_mazaya1 = getSum('16,510,41',$salaryItems,'diff_pay');//'تفاوت ساير مزايا 1 '
	$mazaya2 = getSum('518,35,166,284,9901,10265,10365,10332,10377,10373',$salaryItems);//'ساير مزايا 2 '
	$diff_mazaya2 = getSum('518,35,166,284,9901,10265,10365,10332,10377,10373',$salaryItems,'diff_pay');//'تفاوت ساير مزايا 2 '
	$mazaya3 = getSum('42,43',$salaryItems);//'ساير مزايا 3 '
	$diff_mazaya3 = getSum('42,43',$salaryItems,'diff_pay');//'تفاوت ساير مزايا 3 '
	$mazaya4 = getSum('513,509',$salaryItems);//'ساير مزايا 4 '
	$diff_mazaya4 = getSum('513,509',$salaryItems,'diff_pay');//'تفاوت ساير مزايا 4 '
	$mazaya5 = getSum('18',$salaryItems);//'ساير مزايا 5 '
	$diff_mazaya5 = getSum('18',$salaryItems,'diff_pay');//'تفاوت ساير مزايا 5 '
	$haghbime_janbaz = getSum('506,524',$salaryItems);//'حق بيمه درماني جانبازان '
	$diff_haghbime_janbaz = getSum('506,524',$salaryItems,'diff_pay');//'تفاوت حق بيمه درماني جانبازان '
	//-items-
	$bime_taminejtemaie = getSum('9920,145,144,744',$salaryItems);//'بيمه تامين اجتماعي '
	$diff_bime_taminejtemaie = getSum('9920,145,144,744',$salaryItems,'diff_pay');//'تفاوت بيمه تامين اجتماعي '
	$bazneshastegi_rasmi = getSum('149,150',$salaryItems);//'بازنشستگي پرسنل رسمي '
	$diff_bazneshastegi_rasmi = getSum('149,150',$salaryItems,'diff_pay');//'تفاوت بازنشستگي پرسنل رسمي '
	$bime_rasmi = getSum('38,143',$salaryItems);//'بيمه درماني پرسنل رسمي'
	$diff_bime_rasmi = getSum('38,143',$salaryItems,'diff_pay');//'بيمه درماني پرسنل رسمي'
	$maliat = getSum('146,147,148,747',$salaryItems);//'ماليات'
	$diff_maliat = getSum('146,147,148,747',$salaryItems,'diff_pay');//'ماليات'
	$saham_sandogh_edare = getSum('9903,244',$salaryItems);//'سهام صندوق اداره'
	$diff_saham_sandogh_edare = getSum('9903,244',$salaryItems,'diff_pay');//'تفاوت سهام صندوق اداره'
	$mogharari_maheaval = getSum('9915,9911,9933',$salaryItems);//'مقرري ماه اول پرسنل رسمي'
	$diff_mogharari_maheaval = getSum('9915,9911,9933',$salaryItems,'diff_pay');//'تفاوت مقرري ماه اول پرسنل رسمي'
	$bedehi_motafareghe1 = getSum('245,9929',$salaryItems);//'بدهي متفرقه 1'
	$diff_bedehi_motafareghe1 = getSum('245,9929',$salaryItems,'diff_pay');//'تفاوت بدهي متفرقه 1'
	$bedehi_motafareghe2 = getSum('248',$salaryItems);//'بدهي متفرقه 2'
	$diff_bedehi_motafareghe2 = getSum('248',$salaryItems,'diff_pay');//'تفاوت بدهي متفرقه 2'
	$bedehi_motafareghe3 = getSum('436',$salaryItems);//'بدهي متفرقه 3'
	$diff_bedehi_motafareghe3 = getSum('436',$salaryItems,'diff_pay');//'تفاوت بدهي متفرقه 3'
	$bedehi_motafareghe4 = getSum('250,395',$salaryItems);//'بدهي متفرقه 4'
	$diff_bedehi_motafareghe4 = getSum('250,395',$salaryItems,'diff_pay');//'تفاوت بدهي متفرقه 4'
	$pasanadz_sandogh_alghadir = getSum('251,397',$salaryItems);//'پس انداز صندوق الغدير'
	$diff_pasanadz_sandogh_alghadir = getSum('251,397',$salaryItems,'diff_pay');//'تفاوت پس انداز صندوق الغدير'
	$bime_takmili_iran = getSum('9919',$salaryItems);//'بيمه تکميلي ايران'
	$diff_bime_takmili_iran = getSum('9919',$salaryItems,'diff_pay');//'تفاوت بيمه تکميلي ايران'
	$saham_sandogh_emamali = getSum('276',$salaryItems);//'سهام صندوق امام علي(ع)'
	$diff_saham_sandogh_emamali = getSum('276',$salaryItems,'diff_pay');//'تفاوت سهام صندوق امام علي(ع)'
	$bedehi_yekmahe = getSum('279',$salaryItems);//'بدهي يکماهه'
	$diff_bedehi_yekmahe = getSum('279',$salaryItems,'diff_pay');//'تفاوت بدهي يکماهه'
	$bedehi_yekmahe = getSum('282',$salaryItems);//'بيمه عمر و حوادث'
	$diff_bedehi_yekmahe = getSum('282',$salaryItems,'diff_pay');//'تفاوت بيمه عمر و حوادث'
	$ezafe_daryafti = getSum('254',$salaryItems);//'اضافه دريافتي'
	$diff_ezafe_daryafti = getSum('254',$salaryItems,'diff_pay');//'تفاوت اضافه دريافتي'
	
	$bime_omr = 0;
	$diff_bime_omr = 0;
//echo $get_val_sum.'****'  ; die() ; 
	$bedehihaye_aghsati = $get_val_sum -
						( $bime_taminejtemaie +
							$bazneshastegi_rasmi +
							$bime_rasmi +
							$maliat +
							$saham_sandogh_edare +
							$mogharari_maheaval +
							$bedehi_motafareghe1 +
							$bedehi_motafareghe2 +
							$bedehi_motafareghe3 +
							$bedehi_motafareghe4 +
							$pasanadz_sandogh_alghadir +
							$bime_takmili_iran +
							$saham_sandogh_emamali +
							$bedehi_yekmahe +
							$ezafe_daryafti);//'بديهاي اقساطي'
	$diff_bedehihaye_aghsati = $diff_get_val_sum -
								( $diff_bime_taminejtemaie +
								$diff_bazneshastegi_rasmi +
								$diff_bime_rasmi +
								$diff_maliat +
								$diff_saham_sandogh_edare +
								$diff_mogharari_maheaval +
								$diff_bedehi_motafareghe1 +
								$diff_bedehi_motafareghe2 +
								$diff_bedehi_motafareghe3 +
								$diff_bedehi_motafareghe4 +
								$diff_pasanadz_sandogh_alghadir +
								$diff_bime_takmili_iran +
								$diff_saham_sandogh_emamali +
								$diff_bedehi_yekmahe +
								$diff_ezafe_daryafti);//'تفاوت بديهاي اقساطي'
		
	?>
	<tr>
		<td style="vertical-align: top;">
			<table id="inner" cellpadding=0 cellspacing=0>
				<tr class="header">
					<td width="40%">قلم حقوقي</td>
					<td width="20%">مبلغ</td>
					<td width="20%">تفاوت</td>
					<td width="20%">جمع</td>
				</tr>
				<tr>
					<td>حقوق <?= $_SESSION["UserID"] == "jafarkhani" ? "[1,2,34,3,4,36,283,10264,10364]" : ""?></td>
					<td><?= number_format($hoghogh, 0, '.', ',') ?></td>
					<td><?= number_format($diff_hoghogh, 0, '.', ',') ?></td>
					<td><?= number_format($hoghogh + $diff_hoghogh, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>فوق العاده شغل <?= $_SESSION["UserID"] == "jafarkhani" ? "[17,6,10267, 10367]" : ""?></td>
					<td><?= number_format($foghaladeh_shoghl, 0, '.', ',') ?></td>
					<td><?= number_format($diff_foghaladeh_shoghl, 0, '.', ',') ?></td>
					<td><?= number_format($foghaladeh_shoghl + $diff_foghaladeh_shoghl, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>فوق العاده جذب <?= $_SESSION["UserID"] == "jafarkhani" ? "[15,21,22,167,10266,10366]" : ""?></td>
					<td><?= number_format($foghaladeh_jazb, 0, '.', ',') ?></td>
					<td><?= number_format($diff_foghaladeh_jazb, 0, '.', ',') ?></td>
					<td><?= number_format($diff_foghaladeh_jazb + $foghaladeh_jazb, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>حق اولاد ، عائله مندي و مسكن <?= $_SESSION["UserID"] == "jafarkhani" ? "[29,30,7,8,9,10,32,50,51,10330,10371,10329,10370]" : ""?></td>
					<td><?= number_format($aelemandi_oulad, 0, '.', ',') ?></td>
					<td><?= number_format($diff_aelemandi_oulad, 0, '.', ',') ?></td>
					<td><?= number_format($diff_aelemandi_oulad + $aelemandi_oulad, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>سختي کار و يا نوبت کاري <?= $_SESSION["UserID"] == "jafarkhani" ? "[26,27,23,49,55,10328,10369,10331,10372,10334,10375]" : ""?></td>
					<td><?= number_format($sakhtikar_noubatkari, 0, '.', ',') ?></td>
					<td><?= number_format($diff_sakhtikar_noubatkari, 0, '.', ',') ?></td>
					<td><?= number_format($diff_sakhtikar_noubatkari + $sakhtikar_noubatkari, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بدي آب و هوا <?= $_SESSION["UserID"] == "jafarkhani" ? "[24,25,14,46,10333,10374]" : ""?></td>
					<td><?= number_format($badi_ab_hava, 0, '.', ',') ?></td>
					<td><?= number_format($diff_badi_ab_hava, 0, '.', ',') ?></td>
					<td><?= number_format($diff_badi_ab_hava + $badi_ab_hava, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>تفاوت تطبيق <?= $_SESSION["UserID"] == "jafarkhani" ? "[33,168,12,183,9969,56,47,10327,10368,10335,10376]" : ""?></td>
					<td><?= number_format($tafavot_tatbigh, 0, '.', ',') ?></td>
					<td><?= number_format($diff_tafavot_tatbigh, 0, '.', ',') ?></td>
					<td><?= number_format($diff_tafavot_tatbigh + $tafavot_tatbigh, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>ساير مزايا 1 <?= $_SESSION["UserID"] == "jafarkhani" ? "[16,510,41]" : ""?></td>
					<td><?= number_format($mazaya1, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya1, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya1 + $mazaya1, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>ساير مزايا 2 <?= $_SESSION["UserID"] == "jafarkhani" ? "[518,35,166,284,9901,10265,10365,10332,10377,10373]" : ""?></td>
					<td><?= number_format($mazaya2, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya2, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya2 + $mazaya2, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>ساير مزايا 3 <?= $_SESSION["UserID"] == "jafarkhani" ? "[42,43]" : ""?></td>
					<td><?= number_format($mazaya3, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya3, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya3 + $mazaya3, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>ساير مزايا 4 <?= $_SESSION["UserID"] == "jafarkhani" ? "[513,509]" : ""?></td>
					<td><?= number_format($mazaya4, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya4, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya4 + $mazaya4, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>ساير مزايا 5 <?= $_SESSION["UserID"] == "jafarkhani" ? "[18]" : ""?></td>
					<td><?= number_format($mazaya5, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya5, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mazaya5 + $mazaya5, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>حق بيمه درماني جانبازان <?= $_SESSION["UserID"] == "jafarkhani" ? "[506,524]" : ""?></td>
					<td><?= number_format($haghbime_janbaz, 0, '.', ',') ?></td>
					<td><?= number_format($diff_haghbime_janbaz, 0, '.', ',') ?></td>
					<td><?= number_format($diff_haghbime_janbaz + $haghbime_janbaz, 0, '.', ',') ?></td>
				</tr>
				<? print_remained($salaryItems, 1); ?>
				<tr>
					<td>اضافه کار يا حق التدريس <?= $_SESSION["UserID"] == "jafarkhani" ? "[39,152,9922,9921]" : ""?></td>
					<td><?= number_format($ezafekar_haghotadris, 0, '.', ',') ?></td>
					<td><?= number_format($diff_ezafekar_haghotadris, 0, '.', ',') ?></td>
					<td><?= number_format($diff_ezafekar_haghotadris + $ezafekar_haghotadris, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>جمع</td>
					<td><?= number_format($pay_val_sum, 0, '.', ',') ?></td>
					<td><?= number_format($diff_pay_val_sum, 0, '.', ',') ?></td>
					<td><?= number_format($diff_pay_val_sum + $pay_val_sum, 0, '.', ',') ?></td>
				</tr>
			</table>
		</td>
		<td style="vertical-align: top;">
			<table id="inner" cellpadding=0 cellspacing=0>
				<tr class="header">
					<td width="40%">قلم حقوقي</td>
					<td width="20%">مبلغ</td>
					<td width="20%">تفاوت</td>
					<td width="20%">جمع</td>
				</tr>
				<tr>
					<td>ماليات</td>
					<td><?= number_format($maliat, 0, '.', ',') ?></td>
					<td><?= number_format($diff_maliat, 0, '.', ',') ?></td>
					<td><?= number_format($diff_maliat + $maliat, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بازنشستگي پرسنل رسمي</td>
					<td><?= number_format($bazneshastegi_rasmi, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bazneshastegi_rasmi, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bazneshastegi_rasmi + $bazneshastegi_rasmi, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>مقرري ماه اول پرسنل رسمي</td>
					<td><?= number_format($mogharari_maheaval, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mogharari_maheaval, 0, '.', ',') ?></td>
					<td><?= number_format($diff_mogharari_maheaval + $mogharari_maheaval, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بيمه تامين اجتماعي</td>
					<td><?= number_format($bime_taminejtemaie, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bime_taminejtemaie, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bime_taminejtemaie + $bime_taminejtemaie, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بيمه درماني پرسنل رسمي</td>
					<td><?= number_format($bime_rasmi, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bime_rasmi, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bime_rasmi + $bime_rasmi, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بيمه تکميلي ايران</td>
					<td><?= number_format($bime_takmili_iran, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bime_takmili_iran, 0, '.', ',') ?></td>
					<td><?= number_format($bime_takmili_iran + $diff_bime_takmili_iran, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>اضافه دريافتي</td>
					<td><?= number_format($ezafe_daryafti, 0, '.', ',') ?></td>
					<td><?= number_format($diff_ezafe_daryafti, 0, '.', ',') ?></td>
					<td><?= number_format($ezafe_daryafti + $diff_ezafe_daryafti, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بدهي يکماهه</td>
					<td><?= number_format($bedehi_yekmahe, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bedehi_yekmahe, 0, '.', ',') ?></td>
					<td><?= number_format($bedehi_yekmahe + $diff_bedehi_yekmahe, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>سهام صندوق اداره</td>
					<td><?= number_format($saham_sandogh_edare, 0, '.', ',') ?></td>
					<td><?= number_format($diff_saham_sandogh_edare, 0, '.', ',') ?></td>
					<td><?= number_format($saham_sandogh_edare + $diff_saham_sandogh_edare, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بديهاي اقساطي</td>
					<td><?= number_format($bedehihaye_aghsati, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bedehihaye_aghsati, 0, '.', ',') ?></td>
					<td><?= number_format($bedehihaye_aghsati + $diff_bedehihaye_aghsati, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بدهي متفرقه 1</td>
					<td><?= number_format($bedehi_motafareghe1, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bedehi_motafareghe1, 0, '.', ',') ?></td>
					<td><?= number_format($bedehi_motafareghe1 + $diff_bedehi_motafareghe1, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بدهي متفرقه 2</td>
					<td><?= number_format($bedehi_motafareghe2, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bedehi_motafareghe2, 0, '.', ',') ?></td>
					<td><?= number_format($bedehi_motafareghe2 + $diff_bedehi_motafareghe2, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بدهي متفرقه 3</td>
					<td><?= number_format($bedehi_motafareghe3, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bedehi_motafareghe3, 0, '.', ',') ?></td>
					<td><?= number_format($bedehi_motafareghe3 + $diff_bedehi_motafareghe3, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>بدهي متفرقه 4</td>
					<td><?= number_format($bedehi_motafareghe4, 0, '.', ',') ?></td>
					<td><?= number_format($diff_bedehi_motafareghe4, 0, '.', ',') ?></td>
					<td><?= number_format($bedehi_motafareghe4 + $diff_bedehi_motafareghe4, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>پس انداز صندوق الغدير</td>
					<td><?= number_format($pasanadz_sandogh_alghadir, 0, '.', ',') ?></td>
					<td><?= number_format($diff_pasanadz_sandogh_alghadir, 0, '.', ',') ?></td>
					<td><?= number_format($pasanadz_sandogh_alghadir + $diff_pasanadz_sandogh_alghadir, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>سهام صندوق امام علي(ع)</td>
					<td><?= number_format($saham_sandogh_emamali, 0, '.', ',') ?></td>
					<td><?= number_format($diff_saham_sandogh_emamali, 0, '.', ',') ?></td>
					<td><?= number_format($saham_sandogh_emamali + $diff_saham_sandogh_emamali, 0, '.', ',') ?></td>
				</tr>
				<tr>
					<td>جمع کل کسورات</td>
					<td><?= number_format($get_val_sum, 0, '.', ',') ?></td>
					<td><?= number_format($diff_get_val_sum, 0, '.', ',') ?></td>
					<td><?= number_format($get_val_sum + $diff_get_val_sum, 0, '.', ',') ?></td>
				</tr>
				<? 
				if(!$GroupCostCenter && !$GroupPersonType){				
					ComputePurePay();
					}
				else{
				?>
				<tr>
					<td>قابل پرداخت</td>
					<td><?= number_format($pay_val_sum - $get_val_sum, 0, '.', ',') ?></td>
					<td><?= number_format($diff_pay_val_sum - $diff_get_val_sum, 0, '.', ',') ?></td>
					<td><?= number_format($diff_pay_val_sum + $pay_val_sum - $get_val_sum - $diff_get_val_sum, 0, '.', ',') ?></td>
				</tr>
				<?}?>
			</table>
		</td>
	</tr>
	<tr>
		<td style="vertical-align: top;">
			<table id="inner" cellpadding=0 cellspacing=0>
				<tr>
					<td width="40%">فصل اول </td>
					<td width="20%"><?= number_format($pay_val_sum - $mazaya3, 0, '.', ',')?></td>
					<td width="20%"><?= number_format($diff_pay_val_sum - $diff_mazaya3, 0, '.', ',')?></td>
					<td width="20%"><?= number_format($pay_val_sum + $diff_pay_val_sum - $mazaya3 - $diff_mazaya3, 0, '.', ',')?></td>
				</tr>
				<tr>
					<td>بازنشستگي سهم سازمان(زير سي سال) <?= $_SESSION["UserID"] == "jafarkhani" ? "[149,150]" : ""?></td>
					<td><?= number_format($i149['retired_for_org_dn30'] + $i150['retired_for_org_dn30'], 0, '.', ',')?></td>
					<td><?= number_format($i149['diff_retired_for_org_dn30'] + $i150['diff_retired_for_org_dn30'], 0, '.', ',')?></td>
					<td><?= number_format($i149['diff_retired_for_org_dn30'] + $i150['diff_retired_for_org_dn30'] + 
							$i149['retired_for_org_dn30'] + $i150['retired_for_org_dn30'], 0, '.', ',')?></td>
				</tr>
				<tr>
					<td>بازنشستگي سهم سازمان(بالاي سي سال) <?= $_SESSION["UserID"] == "jafarkhani" ? "[149,150]" : ""?></td>
					<td><?= number_format($i149['retired_for_org_up30'] + $i150['retired_for_org_up30'], 0, '.', ',')?></td>
					<td><?= number_format($i149['diff_retired_for_org_up30'] + $i150['diff_retired_for_org_up30'], 0, '.', ',')?></td>
					<td><?= number_format($i149['diff_retired_for_org_up30'] + $i150['diff_retired_for_org_up30'] + 
							$i149['retired_for_org_up30'] + $i150['retired_for_org_up30'], 0, '.', ',')?></td>
				</tr>
				<tr>
					<td>بيمه خدمات درماني (سهم سازمان) <?= $_SESSION["UserID"] == "jafarkhani" ? "[38,143]" : ""?></td>
					<td><?= number_format($i38["param7"] + $i143["param7"], 0, '.', ',')?></td>
					<td><?= number_format($i38["diff_param7"] + $i143["diff_param7"], 0, '.', ',')?></td>
					<td><?= number_format($i38["param7"] + $i143["param7"] + $i38["diff_param7"] + $i143["diff_param7"], 0, '.', ',')?></td>
				</tr>
				<tr>
					<?
					if($_POST['pay_year'] >= '1393' &&  $_POST['pay_month']  >= '10' )	
						$coef_dolat = 1 ;
					elseif($_POST['pay_year'] >= '1390' && $_POST['pay_month']  >= '5' )
						$coef_dolat = 1.7 / 1.65 ;
					else if ($_POST['pay_year'] >= '1391')	
						$coef_dolat = 1.7 / 1.65 ;
                    else
						$coef_dolat = 3/2 ;
					?>
					<td>بیمه خدمات درمانی (سهم دولت) <?= $_SESSION["UserID"] == "jafarkhani" ? "[38,143 coaf:".$coef_dolat ."]" : ""?></td>
					<td><?= number_format($i38["param7"] *  $coef_dolat + $i143["param7"] * $coef_dolat, 0, '.', ',')?></td>
					<td><?= number_format($i38["diff_param7"] *  $coef_dolat + $i143["diff_param7"] * $coef_dolat, 0, '.', ',')?></td>
					<td><?= number_format($i38["param7"] *  $coef_dolat + $i143["param7"] * $coef_dolat  + $i38["diff_param7"] * $coef_dolat + 
							$i143["diff_param7"] * $coef_dolat, 0, '.', ',')?></td>
				</tr>
				<tr>
					<td>بيمه عمر و حوادث سهم سازمان <?= $_SESSION["UserID"] == "jafarkhani" ? "[0]" : ""?></td>
					<td><?= number_format($bime_omr, 0, '.', ',')?></td>
					<td><?= number_format($diff_bime_omr, 0, '.', ',')?></td>
					<td><?= number_format($diff_bime_omr + $bime_omr, 0, '.', ',')?></td>
				</tr>
				<tr>
					<?
				   
  				    // $i744["param3"]  ;  //  از sum1 حذف شد چون بچه های قراردادی این پارامتر بیمه بیکاری سهم سازمان را ندارند
					// +  + $i744["diff_param3"]  
					
					$sum1 = ($pay_val_sum) +
						($i149['retired_for_org_up30'] + $i149['retired_for_org_dn30']) +
						($i150['retired_for_org_up30'] + $i150['retired_for_org_dn30']) +
						($i144["param2"]+$i9920["param2"])+ 						
						($i145["param2"] + $i744["param2"] ) +						
						($i145["param3"])+
						$bime_omr +
						($i38["param7"] + $i143["param7"]) + ($i38["param7"] * $coef_dolat + $i143["param7"] * $coef_dolat) ;
						
						
						
					$sum2 = ($diff_pay_val_sum) +
							($i149['diff_retired_for_org_up30'] + $i149['diff_retired_for_org_dn30']) +
							($i150['diff_retired_for_org_up30'] + $i150['diff_retired_for_org_dn30']) +
							($i144["diff_param2"]+$i9920["diff_param2"]) + 
							($i145["diff_param2"] + $i744["diff_param2"] ) +
							($i145["diff_param3"] )+
							 $diff_bime_omr +
							($i38["diff_param7"] + $i143["diff_param7"]  ) +
							($i38["diff_param7"] * $coef_dolat + $i143["diff_param7"] * $coef_dolat);
					?>
					<td>جمع کل</td>
					<td><?= number_format($sum1, 0, '.', ',')?></td>
					<td><?= number_format($sum2, 0, '.', ',')?></td>
					<td><?= number_format($sum1 + $sum2, 0, '.', ',')?></td>
				</tr>
			</table>
		</td>
		<td style="vertical-align: top;">
			<table id="inner" cellpadding=0 cellspacing=0>
				<tr>
					<td width="40%">ساير فصول</td>
					<td width="20%"><?= number_format($mazaya3, 0, '.', ',')?></td>
					<td width="20%"><?= number_format($diff_mazaya3, 0, '.', ',')?></td>
					<td width="20%"><?= number_format($mazaya3 + $diff_mazaya3, 0, '.', ',')?></td>
				</tr>
				<tr>
					<td>بيمه اجتماعي سهم سازمان (پيماني و خريد خدمت) <?= $_SESSION["UserID"] == "jafarkhani" ? "" : ""?></td>
					<td><?= number_format($i144["param2"]+$i9920["param2"], 0, '.', ',')?></td>
					<td><?= number_format($i144["diff_param2"]+$i9920["diff_param2"], 0, '.', ',')?></td>
					<td><?= number_format($i144["param2"]+$i9920["param2"]+$i144["diff_param2"]+$i9920["diff_param2"], 0, '.', ',')?></td>
				</tr>
				<tr>
					<td>بيمه بيکاري سهم سازمان (پيماني و خريد خدمت) <?= $_SESSION["UserID"] == "jafarkhani" ? "" : ""?></td>
					<td><?= number_format(0, 0, '.', ',')?></td>
					<td><?= number_format(0, 0, '.', ',')?></td>
					<td><?= number_format(0, 0, '.', ',')?></td>
				</tr>
				<tr>
					<td>بیمه اجتماعی سهم سازمان(روزمزد/قراردادی) <?= $_SESSION["UserID"] == "jafarkhani" ? "" : ""?></td>
					<td><?= number_format(( $i145["param2"] + $i744["param2"] ), 0, '.', ',')?></td>
					<td><?= number_format(($i145["diff_param2"] + $i744["diff_param2"]), 0, '.', ',')?></td>
					<td><?= number_format($i145["param2"] + $i145["diff_param2"] + $i744["param2"] + $i744["diff_param2"] , 0, '.', ',')?></td>
				</tr>
				<? if( /*empty($_POST['PersonType_1']) && empty($_POST['PersonType_2']) &&*/ empty($_POST['PersonType_3']) /*&& $_POST['PersonType_5'] == true*/ ){ ?>
				<tr>
					<td>بیمه بیکاری سهم سازمان(روزمزد/قراردادی) <?= $_SESSION["UserID"] == "jafarkhani" ? "" : ""?></td> 
					<td>0</td>
					<td>0</td>
					<td>0</td>
				</tr>
				<? } elseif(!empty($_POST['PersonType_3'])) {
				?>
				<tr>
					<td>بیمه بیکاری سهم سازمان(روزمزد/قراردادی) <?= $_SESSION["UserID"] == "jafarkhani" ? "" : ""?></td> 
					<td><?= number_format($i145["param3"] /*+ $i744["param3"] */ , 0, '.', ',')?></td>
					<td><?= number_format($i145["diff_param3"] /*+ $i744["diff_param3"]*/ , 0, '.', ',')?></td>
					<td><?= number_format($i145["param3"] + $i145["diff_param3"] /*+ $i744["param3"] + $i744["diff_param3"]*/, 0, '.', ',')?></td>
				</tr>
				<?
				}?>
			</table>			
		</td>
	</tr>
	<?
	
	echo "</table><br><div class=pageBreak></div>";
}
Example #2
0
				$Bedehi2_1 += $v ;
				
				$v = getSum('436',$SalaryItem);  //بدهي3
		echo	'<td align="center" >'.number_format($v, 0, '.', ',').'</td>';
				$Bedehi3_1 += $v ;
							
				$v = getSum('250',$SalaryItem);  //بدهي4
		echo	'<td align="center" >'.number_format($v, 0, '.', ',').'</td>';
				$Bedehi4_1 += $v ;
			
				$v = vals_sum($SalaryItem,2);//جمع کسور
		echo	'<td align="center" >'.number_format($v, 0, '.', ',').'</td>';
				$Jamkosoor_1 += $v;
				
				$v = vals_sum($SalaryItem,1) + vals_sum($SalaryItem,1,2)-
					 vals_sum($SalaryItem,2) + vals_sum($SalaryItem,2,2);//مانده	
		echo	'<td align="center" >'.number_format($v, 0, '.', ',').'</td>';
				$Mande_1 += $v;
				
		echo    '</tr>'; 
				
//......................................................................................
echo "<tr style='background-color:#E2F0FF'>
			<td colspan=3 rowspan=2 style='font-weight:bold'>جمع :</td>
			<td>".number_format($SumHoghoogh_1, 0, '.', ',')."</td><td>".number_format($Shoghl_1, 0, '.', ',')."</td><td>".number_format($Matab_1, 0, '.', ',')."</td>
			<td>".number_format($Jazb_1, 0, '.', ',')."</td><td>".number_format($Ashae_1, 0, '.', ',')."</td><td>".number_format($Karane_1, 0, '.', ',')."</td>
			<td>".number_format($Aele_1, 0, '.', ',')."</td><td>".number_format($Sakhti_1, 0, '.', ',')."</td>
		    <td>".number_format($Tashilat_1, 0, '.', ',')."</td><td>".number_format($Tatbigh_1, 0, '.', ',')."</td><td>".number_format($Bime_1, 0, '.', ',')."</td>
			<td>".number_format($Maliat_1, 0, '.', ',')."</td><td>".number_format($Bazneshast_1, 0, '.', ',')."</td><td>".number_format($Saham_1, 0, '.', ',')."</td>
			<td>".number_format($Yekmahe_1, 0, '.', ',')."</td><td>".number_format($Aghsat_1, 0, '.', ',')."</td><td>".number_format($Jam, 0, '.', ',')."</td><td>&nbsp;</td><td>&nbsp;</td>
	  </tr>" ;