|
@@ -1440,31 +1440,68 @@ class LivingAllowance extends AdminController {
|
|
|
$old["recommendAmount"] = 0;
|
|
|
return $old;
|
|
|
}
|
|
|
- if (!$old["actualSocialSecurity"] || $this->countByDates($old["actualSocialSecurity"]) < 3) {
|
|
|
- $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "首年申报:社保缴纳时间不足3个月,不予兑现;";
|
|
|
+ /* 旧政策
|
|
|
+ * if (!$old["actualSocialSecurity"] || $this->countByDates($old["actualSocialSecurity"]) < 3) {
|
|
|
+ $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "首年申报:社保缴纳时间不足3个月,不予兑现;";
|
|
|
+ $old["recommendIsPay"] = -1;
|
|
|
+ $old["recommendAmount"] = 0;
|
|
|
+ return $old;
|
|
|
+ } */
|
|
|
+ //首年:新政策社保和个税其中一个满足3个月以上予以兑现
|
|
|
+ $isActualSocialSecurityBigger3Month = $this->countByDates($old["actualSocialSecurity"]) < 3 ? false : true;
|
|
|
+ $isActualTaxBigger3Month = $this->countByDates($old["actualTax"]) < 3 ? false : true;
|
|
|
+ if (!$isActualSocialSecurityBigger3Month && !$isActualTaxBigger3Month) {
|
|
|
+ $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "首年申报:社保和个税缴纳时间均不足3个月,不予兑现;";
|
|
|
$old["recommendIsPay"] = -1;
|
|
|
$old["recommendAmount"] = 0;
|
|
|
return $old;
|
|
|
}
|
|
|
$old["recommendIsPay"] = 1;
|
|
|
- $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "首年申报:合同满足3年及以上,社保缴纳时间满足3个月及以上,予以兑现;\n";
|
|
|
+ //$old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "首年申报:合同满足3年及以上,社保缴纳时间满足3个月及以上,予以兑现;\n";
|
|
|
+ if ($isActualSocialSecurityBigger3Month && $isActualTaxBigger3Month) {
|
|
|
+ $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "首年申报:合同满足3年及以上,社保及个税缴纳时间均满足3个月及以上,予以兑现;\n";
|
|
|
+ } else if ($isActualTaxBigger3Month) {
|
|
|
+ $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "首年申报:合同满足3年及以上,个税缴纳时间满足3个月及以上,予以兑现;\n";
|
|
|
+ } else {
|
|
|
+ $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "首年申报:合同满足3年及以上,社保缴纳时间满足3个月及以上,予以兑现;\n";
|
|
|
+ }
|
|
|
$_old = $this->calculateAmount($old);
|
|
|
$old = array_merge($old, $_old);
|
|
|
} else {
|
|
|
- if (!$old["actualSocialSecurity"] || $this->countByDates($old["actualSocialSecurity"]) < 9) {
|
|
|
- $old["recommendJudgmentDetails"] = $old["recommendAmountDesc"] . "非首年申报:社保缴纳时间不足9个月,不予兑现";
|
|
|
- $old["recommendIsPay"] = -1;
|
|
|
- $old["recommendAmount"] = 0;
|
|
|
- return $old;
|
|
|
- }
|
|
|
- if (!$old["actualTax"] || $this->countByDates($old["actualTax"]) < 9) {
|
|
|
- $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "非首年申报:个税缴纳时间不足9个月,不予兑现";
|
|
|
+ /* 旧政策
|
|
|
+ * if (!$old["actualSocialSecurity"] || $this->countByDates($old["actualSocialSecurity"]) < 9) {
|
|
|
+ $old["recommendJudgmentDetails"] = $old["recommendAmountDesc"] . "非首年申报:社保缴纳时间不足9个月,不予兑现";
|
|
|
+ $old["recommendIsPay"] = -1;
|
|
|
+ $old["recommendAmount"] = 0;
|
|
|
+ return $old;
|
|
|
+ }
|
|
|
+ if (!$old["actualTax"] || $this->countByDates($old["actualTax"]) < 9) {
|
|
|
+ $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "非首年申报:个税缴纳时间不足9个月,不予兑现";
|
|
|
+ $old["recommendIsPay"] = -1;
|
|
|
+ $old["recommendAmount"] = 0;
|
|
|
+ return $old;
|
|
|
+ }
|
|
|
+ $old["recommendIsPay"] = 1;
|
|
|
+ $old["recommendJudgmentDetails"] = "非首年申报:社保缴纳时间满足9个月及以上,个税缴纳时间满足9个月及以上,予以兑现;\n";
|
|
|
+ *
|
|
|
+ */
|
|
|
+ //非首年:新政策社保和个税其中一个满足6个月以上予以兑现
|
|
|
+ $isActualSocialSecurityBigger6Month = $this->countByDates($old["actualSocialSecurity"]) < 6 ? false : true;
|
|
|
+ $isActualTaxBigger6Month = $this->countByDates($old["actualTax"]) < 6 ? false : true;
|
|
|
+ if (!$isActualSocialSecurityBigger6Month && !$isActualTaxBigger6Month) {
|
|
|
+ $old["recommendJudgmentDetails"] = $old["recommendJudgmentDetails"] . "非首年申报:社保和个税缴纳时间均不足6个月,不予兑现";
|
|
|
$old["recommendIsPay"] = -1;
|
|
|
$old["recommendAmount"] = 0;
|
|
|
return $old;
|
|
|
}
|
|
|
$old["recommendIsPay"] = 1;
|
|
|
- $old["recommendJudgmentDetails"] = "非首年申报:社保缴纳时间满足9个月及以上,个税缴纳时间满足9个月及以上,予以兑现;\n";
|
|
|
+ if ($isActualSocialSecurityBigger6Month && $isActualTaxBigger6Month) {
|
|
|
+ $old["recommendJudgmentDetails"] = "非首年申报:个税缴纳时间满足6个月及以上,个税缴纳时间满足6个月及以上,予以兑现;\n";
|
|
|
+ } else if ($isActualSocialSecurityBigger6Month) {
|
|
|
+ $old["recommendJudgmentDetails"] = "非首年申报:社保缴纳时间满足6个月及以上,予以兑现;\n";
|
|
|
+ } else {
|
|
|
+ $old["recommendJudgmentDetails"] = "非首年申报:个税缴纳时间满足6个月及以上,予以兑现;\n";
|
|
|
+ }
|
|
|
$_old = $this->calculateAmount($old);
|
|
|
$old = array_merge($old, $_old);
|
|
|
}
|
|
@@ -1477,7 +1514,8 @@ class LivingAllowance extends AdminController {
|
|
|
* @return type
|
|
|
*/
|
|
|
private function countByDates($dates) {
|
|
|
- $dateArr = explode(",", $dates);
|
|
|
+ $dates = $dates ?: "";
|
|
|
+ $dateArr = array_filter(explode(",", $dates));
|
|
|
$count = 0;
|
|
|
for ($i = 0; $i < count($dateArr); $i++) {
|
|
|
$date = $dateArr[$i];
|