|
|
@ -1073,33 +1073,27 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
foreach ($gv as $lk => $lv){
|
|
|
|
foreach ($gv as $lk => $lv){
|
|
|
|
|
|
|
|
|
|
|
|
if ($lk > 0) {
|
|
|
|
if ($lk > 0) {
|
|
|
|
|
|
|
|
unset($lv['time']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$lv['row'] = count($gv);
|
|
|
|
|
|
|
|
$lv['week_amount'] = $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine'];
|
|
|
|
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
for (;;) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!$handle_data[$lk-$substract]['time']) {
|
|
|
|
if (!$gv[$lk+$substract]) {
|
|
|
|
// $nline++;
|
|
|
|
break;
|
|
|
|
$substract++;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$handle_data[$lk-$substract]['row'] += 1;
|
|
|
|
$lv['week_amount'] += $gv[$lk+$substract]['sum_money'] - $gv[$lk+$substract]['withhold'] + $gv[$lk+$substract]['reward'] - $gv[$lk+$substract]['fine'];
|
|
|
|
$handle_data[$lk-$substract]['week_amount'] += $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if ($is_export) {
|
|
|
|
$substract++;
|
|
|
|
// $handle_data[$lk-$substract]['week_amount'] = "=ROUND(SUM(I{$cline}:I{$nline}),2)";
|
|
|
|
unset($gv[$lk+$substract]['time']);
|
|
|
|
// }
|
|
|
|
|
|
|
|
unset($lv['time']);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$substract = 1;
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$lv['row'] = 1;
|
|
|
|
|
|
|
|
$lv['week_amount'] = $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine'];
|
|
|
|
|
|
|
|
// $nline++;
|
|
|
|
|
|
|
|
// if ($is_export) {
|
|
|
|
|
|
|
|
// $lv['week_amount'] = "=ROUND(SUM(I{$cline}:I{$nline}),2)";
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
array_push($handle_data,$lv);
|
|
|
|
array_push($handle_data,$lv);
|
|
|
@ -1111,11 +1105,13 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
foreach($handle_data as $hk => $hv) {
|
|
|
|
foreach($handle_data as $hk => $hv) {
|
|
|
|
$substract = 1;
|
|
|
|
$substract = 1;
|
|
|
|
if ($is_export) {
|
|
|
|
if ($is_export) {
|
|
|
|
// dump($hv);
|
|
|
|
if (!$hv['time']) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
for (;;) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!$handle_data[$hk+$substract]['time']&&$handle_data[$hk+$substract]&&$hv['time']) {
|
|
|
|
if (!$handle_data[$hk+$substract]['time']&&$handle_data[$hk+$substract]&&$hv['time']) {
|
|
|
|
// dump($handle_data[$hk+$substract]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$cline++;
|
|
|
|
$cline++;
|
|
|
|
$substract++;
|
|
|
|
$substract++;
|
|
|
@ -1125,40 +1121,15 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if (count($handle_data)>1) {
|
|
|
|
|
|
|
|
// $cline += count($handle_data)-1;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($hv['time']&&$hk!=0) {
|
|
|
|
|
|
|
|
$nline =+ $cline+1;
|
|
|
|
|
|
|
|
$cline = $nline;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(J{$nline}:J{$cline})-SUM(K{$nline}:K{$cline})+SUM(L{$nline}:L{$cline})-SUM(M{$nline}:M{$cline}),2)";
|
|
|
|
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(J{$nline}:J{$cline})-SUM(K{$nline}:K{$cline})+SUM(L{$nline}:L{$cline})-SUM(M{$nline}:M{$cline}),2)";
|
|
|
|
|
|
|
|
|
|
|
|
// if ($hk > 0) {
|
|
|
|
$cline++;
|
|
|
|
// $handle_data[0]['week_amount'] = str_replace($nline,$cline,$handle_data[0]['week_amount']);
|
|
|
|
$nline = $cline;
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (count($handle_data)>1) {
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $nline += count($handle_data);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $nline++;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// if(count($handle_data)>1) {
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $cline = $nline ;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $cline = $nline;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// die();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $handle_data;
|
|
|
|
return $handle_data;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1185,32 +1156,26 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
|
|
|
|
|
|
|
if ($lk > 0) {
|
|
|
|
if ($lk > 0) {
|
|
|
|
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
unset($lv['time']);
|
|
|
|
|
|
|
|
|
|
|
|
if (!$handle_data[$lk-$substract]['time']) {
|
|
|
|
|
|
|
|
// $nline++;
|
|
|
|
|
|
|
|
$substract++;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$handle_data[$lk-$substract]['row'] += 1;
|
|
|
|
|
|
|
|
$handle_data[$lk-$substract]['week_amount'] += $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if ($is_export) {
|
|
|
|
$lv['row'] = count($gv);
|
|
|
|
// $handle_data[$lk-$substract]['week_amount'] = "=ROUND(SUM(I{$cline}:I{$nline}),2)";
|
|
|
|
$lv['week_amount'] = $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine'];
|
|
|
|
// }
|
|
|
|
|
|
|
|
unset($lv['time']);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
for (;;) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!$gv[$lk+$substract]) {
|
|
|
|
|
|
|
|
break;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$lv['week_amount'] += $gv[$lk+$substract]['sum_money'] - $gv[$lk+$substract]['withhold'] + $gv[$lk+$substract]['reward'] - $gv[$lk+$substract]['fine'];
|
|
|
|
|
|
|
|
|
|
|
|
$lv['row'] = 1;
|
|
|
|
$substract++;
|
|
|
|
$lv['week_amount'] = $lv['sum_money'] - $lv['withhold'] + $lv['reward'] - $lv['fine'];
|
|
|
|
unset($gv[$lk+$substract]['time']);
|
|
|
|
// $nline++;
|
|
|
|
}
|
|
|
|
// if ($is_export) {
|
|
|
|
|
|
|
|
// $lv['week_amount'] = "=ROUND(SUM(I{$cline}:I{$nline}),2)";
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
$substract = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
array_push($handle_data,$lv);
|
|
|
|
array_push($handle_data,$lv);
|
|
|
@ -1222,11 +1187,13 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
foreach($handle_data as $hk => $hv) {
|
|
|
|
foreach($handle_data as $hk => $hv) {
|
|
|
|
$substract = 1;
|
|
|
|
$substract = 1;
|
|
|
|
if ($is_export) {
|
|
|
|
if ($is_export) {
|
|
|
|
// dump($hv);
|
|
|
|
if (!$hv['time']) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
for (;;) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!$handle_data[$hk+$substract]['time']&&$handle_data[$hk+$substract]&&$hv['time']) {
|
|
|
|
if (!$handle_data[$hk+$substract]['time']&&$handle_data[$hk+$substract]&&$hv['time']) {
|
|
|
|
// dump($handle_data[$hk+$substract]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$cline++;
|
|
|
|
$cline++;
|
|
|
|
$substract++;
|
|
|
|
$substract++;
|
|
|
@ -1236,40 +1203,14 @@ class CompanyStatementPoolController extends ThinkController
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if (count($handle_data)>1) {
|
|
|
|
|
|
|
|
// $cline += count($handle_data)-1;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($hv['time']&&$hk!=0) {
|
|
|
|
|
|
|
|
$nline =+ $cline+1;
|
|
|
|
|
|
|
|
$cline = $nline;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(L{$nline}:L{$cline})-SUM(M{$nline}:M{$cline})+SUM(N{$nline}:N{$cline})-SUM(O{$nline}:O{$cline}),2)";
|
|
|
|
$handle_data[$hk]['week_amount'] = "=ROUND(SUM(L{$nline}:L{$cline})-SUM(M{$nline}:M{$cline})+SUM(N{$nline}:N{$cline})-SUM(O{$nline}:O{$cline}),2)";
|
|
|
|
|
|
|
|
|
|
|
|
// if ($hk > 0) {
|
|
|
|
$cline++;
|
|
|
|
// $handle_data[0]['week_amount'] = str_replace($nline,$cline,$handle_data[0]['week_amount']);
|
|
|
|
$nline = $cline;
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (count($handle_data)>1) {
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $nline += count($handle_data);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $nline++;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// if(count($handle_data)>1) {
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// $cline = $nline ;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $cline = $nline;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// die();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $handle_data;
|
|
|
|
return $handle_data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|