|
@@ -2303,7 +2303,6 @@ class ReceiptController extends DooController {
|
|
|
'asArray' => true
|
|
|
) );
|
|
|
$verifyList = json_decode ( $verifyList ['staff'], true ); // status opinion
|
|
|
-
|
|
|
$verifyStaff = json_decode ( $value ['verifyStaff'], true );
|
|
|
|
|
|
Doo::loadModel ( 'role' );
|
|
@@ -3589,7 +3588,6 @@ class ReceiptController extends DooController {
|
|
|
$receipt->nowStaff = $nowStaff;
|
|
|
$receipt->verifyStaff = $vStaffString;
|
|
|
|
|
|
-
|
|
|
$loanReceipt->nowStaff = $nowStaff;
|
|
|
$loanReceipt->verifyStaff = $vStaffString;
|
|
|
} else {
|
|
@@ -3867,35 +3865,32 @@ class ReceiptController extends DooController {
|
|
|
return "/approvalExpenses/2";
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
function ajaxExamineExe() {
|
|
|
$rid = $this->get_args ( 'rid' ) && is_numeric ( $this->get_args ( 'rid' ) ) ? $this->get_args ( 'rid' ) : 0;
|
|
|
-
|
|
|
+
|
|
|
Doo::loadModel ( 'receipt' );
|
|
|
$receipt = new receipt ();
|
|
|
Doo::loadClass ( 'XDeode' );
|
|
|
$XDeode = new XDeode ( 5 );
|
|
|
if (! empty ( $rid )) {
|
|
|
-
|
|
|
+
|
|
|
$rLRes = $receipt->find ( array (
|
|
|
'where' => 'executeCopy like \'%["' . $this->staff [0] ['sid'] . '%\' and executeStaff not like \'%{"' . $this->staff [0] ['sid'] . '%\' and (status=1 or status=6) and rid!=' . $rid,
|
|
|
- 'asArray' => true
|
|
|
+ 'asArray' => true
|
|
|
) );
|
|
|
- $rLRes [0]['ridKey']=$XDeode->encode ( $rLRes [0] ['rid'] );
|
|
|
+ $rLRes [0] ['ridKey'] = $XDeode->encode ( $rLRes [0] ['rid'] );
|
|
|
echo json_encode ( array (
|
|
|
'status' => 1,
|
|
|
- 'receipt' => $rLRes [0]
|
|
|
+ 'receipt' => $rLRes [0]
|
|
|
) );
|
|
|
die ();
|
|
|
}
|
|
|
echo json_encode ( array (
|
|
|
'status' => 0,
|
|
|
- 'receipt' => array ()
|
|
|
+ 'receipt' => array ()
|
|
|
) );
|
|
|
die ();
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
function implement() {
|
|
|
$rid = isset ( $this->params ['rid'] ) ? $this->params ['rid'] : 0;
|
|
|
Doo::loadClass ( 'XDeode' );
|
|
@@ -4343,7 +4338,7 @@ class ReceiptController extends DooController {
|
|
|
$implementOpinions = $this->get_args ( 'opinion' ) ? $this->get_args ( 'opinion' ) : "";
|
|
|
$amount = $this->get_args ( 'amount' ) && is_numeric ( $this->get_args ( 'amount' ) ) ? $this->get_args ( 'amount' ) : 0;
|
|
|
|
|
|
- if (! empty ( $rid )&&!empty($amount)) {
|
|
|
+ if (! empty ( $rid ) && ! empty ( $amount )) {
|
|
|
Doo::loadModel ( 'receipt' );
|
|
|
$receipt = new receipt ();
|
|
|
Doo::loadClass ( 'XDeode' );
|
|
@@ -4387,13 +4382,13 @@ class ReceiptController extends DooController {
|
|
|
} else {
|
|
|
$receipt->executeStaff = json_encode ( $executeStaff );
|
|
|
}
|
|
|
- $receipt->amount=$amount;
|
|
|
+ $receipt->amount = $amount;
|
|
|
$receipt->update ( array (
|
|
|
'where' => 'rid=' . $rid
|
|
|
) );
|
|
|
}
|
|
|
$ridKey = $XDeode->encode ( $rid );
|
|
|
- return "/implement/".$ridKey.".html";
|
|
|
+ return "/implement/" . $ridKey . ".html";
|
|
|
}
|
|
|
function receiptburEdi() {
|
|
|
$rid = isset ( $this->params ['rid'] ) ? $this->params ['rid'] : 0;
|
|
@@ -4932,7 +4927,6 @@ class ReceiptController extends DooController {
|
|
|
$condition = " and Rtype=2 ";
|
|
|
$sopString = "";
|
|
|
|
|
|
-
|
|
|
$dateCondition = " and Year(date) =" . $year;
|
|
|
if ($sop != 'SOP')
|
|
|
$sopString = " and staff=" . $sop;
|
|
@@ -7097,6 +7091,451 @@ class ReceiptController extends DooController {
|
|
|
$data ['executeId'] = $this->executeId;
|
|
|
$this->render ( "/admin/saeaReportListReport", $data );
|
|
|
}
|
|
|
+ function remittanceHky() {
|
|
|
+ $year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( "Y" );
|
|
|
+ $moth = $this->get_args ( 'moth' ) ? $this->get_args ( 'moth' ) : 'MONTH';
|
|
|
+ $day = $this->get_args ( 'day' ) ? $this->get_args ( 'day' ) : 'DAY';
|
|
|
+
|
|
|
+ $page = isset ( $this->params ['page'] ) && is_numeric ( $this->params ['page'] ) ? $this->params ['page'] : 1;
|
|
|
+ $page_size = 15;
|
|
|
+
|
|
|
+ $get = "?year=".$year."&moth=".$moth."&day=".$day;
|
|
|
+
|
|
|
+ Doo::loadModel ( 'receipt' );
|
|
|
+ $receipt = new receipt ();
|
|
|
+ Doo::loadModel ( 'staff' );
|
|
|
+ $staff = new staff ();
|
|
|
+
|
|
|
+ $dateCondition = " and Year(executeDate) =" . $year;
|
|
|
+ if ($moth != 'MONTH')
|
|
|
+ $dateCondition = " and Year(executeDate) =" . $year . " and Month(executeDate) = " . $moth;
|
|
|
+ if ($day != 'DAY'&&$moth != 'MONTH')
|
|
|
+ $dateCondition = " and Year(executeDate) =" . $year . " and Month(executeDate) = " . $moth . " and day(executeDate)=" . $day;
|
|
|
+
|
|
|
+ $sql = ' (status =8 or status=9 ) and amount!=0 ' . $dateCondition;
|
|
|
+ $table='(SELECT count(*) FROM CLD_receipt WHERE '.$sql.' group by executeDate ) a ';
|
|
|
+ $pageinfo = $this->get_page ( $table, ' ', $page, $page_size, "remittanceHky", $get, "" );
|
|
|
+ $limit = $pageinfo ['lower'] . ',' . $page_size;
|
|
|
+
|
|
|
+ $dayList = $receipt->find ( array (
|
|
|
+ 'select' => 'executeDate,sum(amount) as amount',
|
|
|
+ 'where' => $sql,
|
|
|
+ 'desc' => 'executeDate',
|
|
|
+ 'groupby' => 'executeDate',
|
|
|
+ 'limit' => $limit,
|
|
|
+ 'asArray' => true
|
|
|
+ ) );
|
|
|
+ //print_r($dayList);
|
|
|
+ foreach ( $dayList as $key => $value ) {
|
|
|
+ $remitString = "";
|
|
|
+ $receiptList = $receipt->find ( array (
|
|
|
+ 'select' => 'rid,executeDate,amount,staff,cid',
|
|
|
+ 'where' => '(status =8 or status=9 ) and amount!=0 and executeDate="' . $value ['executeDate'].'"',
|
|
|
+ 'desc' => 'executeDate',
|
|
|
+ 'asArray' => true
|
|
|
+ ) );
|
|
|
+
|
|
|
+ foreach ( $receiptList as $k => $v ) {
|
|
|
+ $sinfo = $staff->getOne ( array (
|
|
|
+ 'select' => 'username,category',
|
|
|
+ 'where' => ' sid=' . $v ['staff'],
|
|
|
+ 'asArray' => true
|
|
|
+ ) );
|
|
|
+ $remitString .= $sinfo ['category'] . '-' . $sinfo ['username'] . '(' . $v ['amount'] . ') ';
|
|
|
+ }
|
|
|
+ $dayList [$key] ['staff'] = $remitString;
|
|
|
+ $dayList [$key] ['ridKey'] = strtotime ( $value ['executeDate'] );
|
|
|
+ }
|
|
|
+
|
|
|
+ //print_r($dayList);
|
|
|
+ $mothHtml = "";
|
|
|
+ for($i = 1; $i <= 12; $i ++) {
|
|
|
+ if ($moth == $i)
|
|
|
+ $mothHtml .= '<option selected value="' . $i . '">' . $i . '月</option>';
|
|
|
+ else
|
|
|
+ $mothHtml .= '<option value="' . $i . '">' . $i . '月</option>';
|
|
|
+ }
|
|
|
+ $dayHtml = "";
|
|
|
+ if ($day != "DAY" || $moth != "MONTH") {
|
|
|
+ for($i = 1; $i <= 31; $i ++) {
|
|
|
+ if ($day == $i)
|
|
|
+ $dayHtml .= '<option value="' . $i . '" selected >' . $i . '日</option>';
|
|
|
+ else
|
|
|
+ $dayHtml .= '<option value="' . $i . '" >' . $i . '日</option>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $data ['page'] = $pageinfo;
|
|
|
+ $data ['year'] = $year;
|
|
|
+ $data ['moth'] = $moth;
|
|
|
+ $data ['day'] = $day;
|
|
|
+ $data ['get'] = $get;
|
|
|
+ $data ['dayHtml'] = $dayHtml;
|
|
|
+ $data ['mothHtml'] = $mothHtml;
|
|
|
+ $data ['receiptList'] = $dayList;
|
|
|
+
|
|
|
+ $data ['memu'] = "receipt";
|
|
|
+ $data ['staff'] = $this->staff;
|
|
|
+ $data ['receiptMemu'] = 'remittanceHky';
|
|
|
+ $data ['verifyId'] = $this->verifyId;
|
|
|
+ $data ['executeId'] = $this->executeId;
|
|
|
+ $this->render ( "/admin/remittanceHky", $data );
|
|
|
+ }
|
|
|
+
|
|
|
+ function remittancep(){
|
|
|
+ $timeStamp = isset ( $this->params ['timeStamp'] ) && is_numeric ( $this->params ['timeStamp'] ) ? $this->params ['timeStamp'] : 0;
|
|
|
+
|
|
|
+ Doo::loadModel ( 'receipt' );
|
|
|
+ $receipt = new receipt ();
|
|
|
+ Doo::loadModel ( 'staff' );
|
|
|
+ $staff = new staff ();
|
|
|
+ Doo::loadClass ( 'XDeode' );
|
|
|
+ $XDeode = new XDeode ( 5 );
|
|
|
+
|
|
|
+ $dateCondition=' and executeDate="'.date('Y-m-d', $timeStamp).'"';
|
|
|
+
|
|
|
+ $rplist = $receipt->find ( array (
|
|
|
+ 'where' => ' (status =8 or status=9 ) and amount!=0 ' . $dateCondition,
|
|
|
+ 'asArray' => true
|
|
|
+ ) );
|
|
|
+
|
|
|
+ $dayList = $receipt->find ( array (
|
|
|
+ 'where' => ' (status =8 or status=9 ) and amount!=0 ' . $dateCondition,
|
|
|
+ 'desc' => 'executeDate',
|
|
|
+ 'groupby' => 'staff',
|
|
|
+ 'asArray' => true
|
|
|
+ ) );
|
|
|
+
|
|
|
+ $html='';
|
|
|
+ foreach ( $dayList as $key => $value ) {
|
|
|
+ $sinfo = $staff->getOne ( array (
|
|
|
+ 'select' => 'username,category',
|
|
|
+ 'where' => ' sid=' . $value ['staff'],
|
|
|
+ 'asArray' => true
|
|
|
+ ) );
|
|
|
+ $html.='<table class="table table-bordered table-condensed"><thead><tr><th class="taC" colspan="3">'.$sinfo['category'].'-'.$sinfo['username'].'</th></tr></thead><tbody>
|
|
|
+ <tr><td class="taC">费用单号</td><td class="taC">汇款金额</td></tr>';
|
|
|
+ $au=0;
|
|
|
+ foreach ($rplist as $k=>$v){
|
|
|
+ if ($value ['staff']==$v['staff']){
|
|
|
+ $html.='<tr><td><a href="#saea-detail" node-invoice="INFO" data-iskey="'.$XDeode->encode ( $v ['rid'] ).'" data-toggle="modal">'.$v['receiptOrder'].'</a></td><td class="taR">¥'.$v['amount'].'</td></tr>';
|
|
|
+ $au+=$v['amount'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $html.='<tr><td>合计</td><td class="taR"><b>¥'.$au.'</b></td></tr></tbody></table>';
|
|
|
+ }
|
|
|
+ $data ['html'] =$html;
|
|
|
+
|
|
|
+ $data ['memu'] = "receipt";
|
|
|
+ $data ['staff'] = $this->staff;
|
|
|
+ $data ['receiptMemu'] = 'remittanceHky';
|
|
|
+ $data ['verifyId'] = $this->verifyId;
|
|
|
+ $data ['executeId'] = $this->executeId;
|
|
|
+ $this->render ( "/admin/remittancep", $data );
|
|
|
+ }
|
|
|
+
|
|
|
+ function ajaxGetReceiptDetails(){
|
|
|
+
|
|
|
+ $rid = $this->get_args ( 'serial' ) ? $this->get_args ( 'serial' ) : "";
|
|
|
+
|
|
|
+ Doo::loadClass ( 'XDeode' );
|
|
|
+ $XDeode = new XDeode ( 5 );
|
|
|
+ $rid=$XDeode->decode($rid);
|
|
|
+
|
|
|
+ if (empty ( $rid )) {
|
|
|
+ echo json_encode ( array (
|
|
|
+ 'status' => 2,
|
|
|
+ 'msg' => 'illegal request'
|
|
|
+ ) );
|
|
|
+ die ();
|
|
|
+ }
|
|
|
+
|
|
|
+ Doo::loadModel ( 'receipt' );
|
|
|
+ $receipt = new receipt ();
|
|
|
+ Doo::loadModel ( 'staff' );
|
|
|
+ $staff = new staff ();
|
|
|
+
|
|
|
+ $rinfo = $receipt->getOne ( array (
|
|
|
+ 'where' => 'rid= ' . $rid,
|
|
|
+ 'asArray' => true
|
|
|
+ ) );
|
|
|
+ $sinfo = $staff->getOne ( array (
|
|
|
+ 'select' => 'username,category',
|
|
|
+ 'where' => ' sid=' . $rinfo ['staff'],
|
|
|
+ 'asArray' => true
|
|
|
+ ) );
|
|
|
+
|
|
|
+ $rinfo['reviseDetail'] = array ();
|
|
|
+ if (! empty ( $rinfo ['reviseDetail'] ))
|
|
|
+ $rinfo['reviseDetail'] = json_decode ( $rinfo ['reviseDetail'], true );
|
|
|
+ $rinfo['accountItem'] = json_decode ( $rinfo ['accountItem'], true );
|
|
|
+ $rinfo['loanItem'] = json_decode ( $rinfo ['loanItem'], true );
|
|
|
+ $rinfo['category'] = $sinfo ['category'];
|
|
|
+ $verifyStaff=array();
|
|
|
+ if (!empty($rinfo ['verifyStaff']))
|
|
|
+ $verifyStaff = json_decode ( $rinfo ['verifyStaff'], true );
|
|
|
+
|
|
|
+ $relust = $rinfo ['sum'] - $rinfo ['loanSum'];
|
|
|
+ $rinfo ['relust'] = $relust;
|
|
|
+ $rinfo['relustCN'] = $this->num_to_rmb ( $relust );
|
|
|
+ $rinfo ['sumCN'] = $this->num_to_rmb ( $rinfo ['sum'] );
|
|
|
+ $rinfo ['loanSumCN'] = $this->num_to_rmb ( $rinfo ['loanSum'] );
|
|
|
+ $rinfo ['amountCN'] = $this->num_to_rmb ( $rinfo ['amount'] );
|
|
|
+
|
|
|
+ // 费用执行人相关数据
|
|
|
+ $executeCopy = json_decode ( $rinfo ['executeCopy'], true );
|
|
|
+ $executeStaff = json_decode ( $rinfo ['executeStaff'], true );
|
|
|
+ foreach ( $executeCopy as $k => $v ) {
|
|
|
+ $executeCopy [$k] ['date'] = '';
|
|
|
+ $executeCopy [$k] ['opinion'] = '';
|
|
|
+ $executeCopy [$k] ['status'] = '';
|
|
|
+ if (! empty ( $executeStaff ))
|
|
|
+ foreach ( $executeStaff as $m => $u ) {
|
|
|
+ if ($v [0] == $m) {
|
|
|
+ $executeCopy [$k] ['date'] = $u ['date'];
|
|
|
+ $executeCopy [$k] ['opinion'] = $u ['opinion'];
|
|
|
+ $executeCopy [$k] ['status'] = $u ['status'];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $rinfo ['executeCopy'] = $executeCopy;
|
|
|
+
|
|
|
+
|
|
|
+ $html='<div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><h3>费用详情</h3></div><div class="modal-body saeaList">';
|
|
|
+
|
|
|
+
|
|
|
+ if ($rinfo['Rtype']==1){//借款费用
|
|
|
+ $html.='<table class="table table-bordered table-condensed table-hover"><tbody>
|
|
|
+ <tr><th colspan="2" class="taC">借款费用</th></tr>';
|
|
|
+
|
|
|
+ foreach ($rinfo['loanItem']['借款费用'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taC" colspan="2">产生费用所在办事处</th></tr>
|
|
|
+ <tr><th style="text-align:center" colspan="2">'.$rinfo['category'].'</th></tr>
|
|
|
+ <tr><th class="taC" colspan="2">费用说明</th>
|
|
|
+ </tr><tr><td colspan="2">'.$rinfo['explanation'].'</td></tr>
|
|
|
+ <tr class="warning"><td class="taR"><b>('.$rinfo['receiptOrder'].')本次费用合计</b></td>
|
|
|
+ <td class="taR"><b style="font-size:24px">¥'.$rinfo['loanSum'].'</b><br>'.$rinfo['loanSumCN'].'</td></tr>
|
|
|
+ </tbody></table>';
|
|
|
+ if ($rinfo['loanRid']!=0&&!empty($rinfo['accountItem'])){
|
|
|
+
|
|
|
+
|
|
|
+ $html.='<table class="table table-bordered table-condensed table-hover"><tbody>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">日常相关费用</th></tr>';
|
|
|
+ foreach ($rinfo['accountItem']['日常相关费用'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['accountItem']['cSum']['agencySum'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">差旅相关费用</th></tr>';
|
|
|
+ foreach ($rinfo['accountItem']['差旅相关费用'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['accountItem']['cSum']['travelSum'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">培训班费用</th></tr>';
|
|
|
+ foreach ($rinfo['accountItem']['培训班费用'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['accountItem']['cSum']['trainSum'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">其他</th></tr>';
|
|
|
+ foreach ($rinfo['accountItem']['其他'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['accountItem']['cSum']['otherSum'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">报销金额调整</th></tr>';
|
|
|
+ foreach ($rinfo['reviseDetail'] as $value){
|
|
|
+ $html.='<tr><th><span class="interval">|</span>'.$value['name'].':'.$value['description'].'</th>
|
|
|
+ <td class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['revisePrice'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th class="taC" colspan="2">产生费用所在办事处</th></tr>
|
|
|
+ <tr><th style="text-align:center" colspan="2">'.$rinfo['category'].'</th></tr>
|
|
|
+ <tr><th class="taC" colspan="2">报销说明</th></tr>
|
|
|
+ <tr><td colspan="2">'.$rinfo['explanation'].'</td></tr>
|
|
|
+ <tr class="warning"><td class="taR"><b>('.$rinfo['receiptOrder'].')本次报销费用合计</b></td>
|
|
|
+ <td class="colGreed taR"><b style="font-size:24px">¥'.$rinfo['sum'].'</b><br>'.$rinfo['sumCN'].'</td></tr>
|
|
|
+ <tr';
|
|
|
+ if($rinfo['relust']>=0){
|
|
|
+ $html.='class="success"';
|
|
|
+ }else{
|
|
|
+ $html.='class="error"';
|
|
|
+ }
|
|
|
+ $html.='><td class="taR"><b>借款结余</b></td>
|
|
|
+ <td class="taR"><b style="font-size:24px">¥'.$rinfo['relust'].'</b><br>'.$rinfo['relustCN'].'</td></tr>
|
|
|
+ </tbody></table>
|
|
|
+ ';
|
|
|
+ }
|
|
|
+ }elseif ($rinfo['Rtype']==2){//对公汇款
|
|
|
+
|
|
|
+ $html.='<table class="table table-bordered table-condensed table-hover"><tbody>
|
|
|
+ <tr><th colspan="2" class="taC">办事处相关费用</th></tr>';
|
|
|
+
|
|
|
+ foreach ($rinfo['accountItem']['日常相关费用'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['accountItem']['cSum']['agencySum'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th class="taC" colspan="2">产生费用所在办事处</th></tr>
|
|
|
+ <tr><th style="text-align:center" colspan="2">'.$rinfo['category'].'</th></tr>
|
|
|
+ <tr><th class="taC" colspan="2">费用说明</th>
|
|
|
+ </tr><tr><td colspan="2">'.$rinfo['explanation'].'</td></tr>
|
|
|
+ <tr class="warning"><td class="taR"><b>('.$rinfo['receiptOrder'].')本次费用合计</b></td>
|
|
|
+ <td class="taR"><b style="font-size:24px">¥'.$rinfo['sum'].'</b><br>'.$rinfo['sumCN'].'</td></tr>
|
|
|
+ </tbody></table>';
|
|
|
+ }else{
|
|
|
+
|
|
|
+ $html.='<table class="table table-bordered table-condensed table-hover"><tbody>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">日常相关费用</th></tr>';
|
|
|
+ foreach ($rinfo['accountItem']['日常相关费用'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['accountItem']['cSum']['agencySum'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">差旅相关费用</th></tr>';
|
|
|
+ foreach ($rinfo['accountItem']['差旅相关费用'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['accountItem']['cSum']['travelSum'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">培训班费用</th></tr>';
|
|
|
+ foreach ($rinfo['accountItem']['培训班费用'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['accountItem']['cSum']['trainSum'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">其他</th></tr>';
|
|
|
+ foreach ($rinfo['accountItem']['其他'] as $value){
|
|
|
+ $html.='<tr><th>'.$value['name'].'</th>
|
|
|
+ <td width="140" class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['accountItem']['cSum']['otherSum'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th colspan="2" class="taC">报销金额调整</th></tr>';
|
|
|
+ foreach ($rinfo['reviseDetail'] as $value){
|
|
|
+ $html.='<tr><th><span class="interval">|</span>'.$value['name'].':'.$value['description'].'</th>
|
|
|
+ <td class="taR">¥'.$value['price'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='<tr><th class="taR">合计</th>
|
|
|
+ <td class="colGreen taR">¥'.$rinfo['revisePrice'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='<tr><th class="taC" colspan="2">产生费用所在办事处</th></tr>
|
|
|
+ <tr><th style="text-align:center" colspan="2">'.$rinfo['category'].'</th></tr>
|
|
|
+ <tr><th class="taC" colspan="2">报销说明</th></tr>
|
|
|
+ <tr><td colspan="2">'.$rinfo['explanation'].'</td></tr>
|
|
|
+ <tr class="warning"><td class="taR"><b>('.$rinfo['receiptOrder'].')本次报销费用合计</b></td>
|
|
|
+ <td class="colGreed taR"><b style="font-size:24px">¥'.$rinfo['sum'].'</b><br>'.$rinfo['sumCN'].'</td></tr>';
|
|
|
+
|
|
|
+ $html.='</tbody></table>';
|
|
|
+
|
|
|
+ /*
|
|
|
+ <table class="table table-bordered table-condensed table-hover">
|
|
|
+ <tbody>
|
|
|
+
|
|
|
+ <tr><th colspan="2" class="taC">日常相关费用</th></tr>
|
|
|
+ <!-- loop receiptList' value.accountItem.日常相关费用 -->
|
|
|
+ <tr><th>{{receiptList' value' value.name}}</th><td width="140" class="taR">¥{{receiptList' value' value.price}}</td></tr>
|
|
|
+ <!-- endloop -->
|
|
|
+ <tr><th class="taR">合计</th><td class="colGreen taR">¥{{receiptList' value.accountItem.cSum.agencySum}}</td></tr>
|
|
|
+
|
|
|
+ <tr><th colspan="2" class="taC">差旅相关费用</th></tr>
|
|
|
+ <!-- loop receiptDetail' value.accountItem.差旅相关费用 -->
|
|
|
+ <tr><th>{{receiptDetail' value' value.name}}</th><td width="140" class="taR">¥{{receiptDetail' value' value.price}}</td></tr>
|
|
|
+ <!-- endloop -->
|
|
|
+ <tr><th class="taR">合计</th><td class="colGreen taR">¥{{receiptDetail' value.accountItem.cSum.travelSum}}</td></tr>
|
|
|
+
|
|
|
+ <tr><th colspan="2" class="taC">培训班费用</th></tr>
|
|
|
+ <!-- loop receiptDetail' value.accountItem.培训班费用 -->
|
|
|
+ <tr><th>{{receiptDetail' value' value.name}}</th><td width="140" class="taR">¥{{receiptDetail' value' value.price}}</td></tr>
|
|
|
+ <!-- endloop -->
|
|
|
+ <tr><th class="taR">合计</th><td class="colGreen taR">¥{{receiptDetail' value.accountItem.cSum.trainSum}}</td></tr>
|
|
|
+
|
|
|
+ <tr><th colspan="2" class="taC">其他</th></tr>
|
|
|
+ <!-- loop receiptDetail' value.accountItem.其他 -->
|
|
|
+ <tr><th>{{receiptDetail' value' value.name}}</th><td width="140" class="taR">¥{{receiptDetail' value' value.price}}</td></tr>
|
|
|
+ <!-- endloop -->
|
|
|
+ <tr><th class="taR">合计</th><td class="colGreen taR">¥{{receiptDetail' value.accountItem.cSum.otherSum}}</td></tr>
|
|
|
+
|
|
|
+ <tr><th colspan="2" class="taC">报销金额调整</th></tr>
|
|
|
+ <!-- loop receiptList' value.reviseDetail -->
|
|
|
+ <tr><th><span class="interval">|</span>{{receiptList' value' value.name}}:{{receiptList' value' value.description}}</th><td class="taR">¥{{receiptList' value' value.price}}</td></tr>
|
|
|
+ <!-- endloop -->
|
|
|
+ <tr><th class="taR">合计</th><td class="colOrange taR">¥{{receiptList' value.revisePrice}}</td></tr>
|
|
|
+
|
|
|
+ <tr><th class="taC" colspan="2">产生费用所在办事处</th></tr>
|
|
|
+ <tr><th style="text-align:center" colspan="2">{{receiptDetail' value.category}}</th></tr>
|
|
|
+ <tr><th class="taC" colspan="2">报销说明</th></tr>
|
|
|
+ <tr><td colspan="2">{{receiptDetail' value.explanation}}</td></tr>
|
|
|
+ <tr class="warning"><td class="taR"><b>({{receiptDetail' value.receiptOrder}})本次报销费用合计</b></td>
|
|
|
+ <td class="colGreed taR"><b style="font-size:24px">¥{{receiptDetail' value.sum}}</b><br>{{receiptDetail' value.sumCN}}</td></tr>
|
|
|
+
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ */
|
|
|
+ }
|
|
|
+ //print_r($verifyStaff);die;
|
|
|
+ $html.='<table class="table table-bordered table-condensed"><tbody><tr><th class="taC" width="90">审批人</th><th class="taC">审批意见</th></tr>';
|
|
|
+ foreach ($verifyStaff as $key=>$value){
|
|
|
+ $key=trim(strtr($key,'_R',' '));
|
|
|
+ $sinfo = $staff->getOne ( array (
|
|
|
+ 'select' => 'username',
|
|
|
+ 'where' => ' sid=' . $key,
|
|
|
+ 'asArray' => true
|
|
|
+ ) );
|
|
|
+ $html.='<tr><td>'.$sinfo['username'].'</td><td>'.$value['opinion'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='</tbody></table>';
|
|
|
+
|
|
|
+ $html.='<table class="table table-bordered table-condensed"><tbody><tr><th class="taC" width="90">执行人</th><th class="taC">执行意见</th></tr>';
|
|
|
+ foreach ($rinfo['executeCopy'] as $value){
|
|
|
+ $html.='<tr><td>'.$value[1].'</td><td>'.$value['opinion'].'</td></tr>';
|
|
|
+ }
|
|
|
+ $html.='</tbody></table>';
|
|
|
+
|
|
|
+ $html.='<table class="table table-bordered table-condensed"><tr class="warning"><td class="taR"><b>汇款金额</b></td>
|
|
|
+ <td width="140" class="taR"><b style="font-size:24px">¥'.$rinfo['amount'].'</b><br>'.$rinfo['amountCN'].'</td>
|
|
|
+ </tr></table>';
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ $html.='</div><div class="modal-footer"><a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a></div></div></div>';
|
|
|
+
|
|
|
+ echo json_encode ( array (
|
|
|
+ 'status' => 1,
|
|
|
+ 'html' => $html
|
|
|
+ ) );
|
|
|
+
|
|
|
+ die;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
function remittance() {
|
|
|
$year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( 'Y' );
|
|
|
$month = $this->get_args ( 'month' ) ? $this->get_args ( 'month' ) : "";
|
|
@@ -7771,7 +8210,7 @@ class ReceiptController extends DooController {
|
|
|
// 微信企业号通知
|
|
|
$this->setWXMsg ( $rid, 1 );
|
|
|
}
|
|
|
- $receipt->amount=$amount;
|
|
|
+ $receipt->amount = $amount;
|
|
|
$receipt->update ( array (
|
|
|
'where' => ' rid = ' . $rid
|
|
|
) );
|
|
@@ -11057,9 +11496,10 @@ class ReceiptController extends DooController {
|
|
|
*/
|
|
|
public function get_table_count($table = "", $condition = "") {
|
|
|
// $sql = "select count(*) as count from " . $table . " where 1 " . $condition;
|
|
|
+
|
|
|
$sql = "select count(*) as count from " . $table . " where 1 " . $condition;
|
|
|
|
|
|
- // echo $sql;die;
|
|
|
+ //echo $sql;die;
|
|
|
$query = Doo::db ()->query ( $sql );
|
|
|
$result = $query->fetch ();
|
|
|
return $result ['count'];
|