|
@@ -10,16 +10,64 @@
|
|
|
class InvoiceController extends DooController {
|
|
|
public $staff;
|
|
|
private $INVOICEKEY = "APPROVAL";
|
|
|
+ private $INVOICECOLLECTPATH = "protected/cache/invoiceCollect/";
|
|
|
+
|
|
|
+ public function beforeRun($resource, $action) {
|
|
|
+ Doo::loadModel ( "invoiceManage" );
|
|
|
+ $invoiceManage = new invoiceManage ();
|
|
|
+ header ( 'Content-Type:text/html;charset=utf-8' );
|
|
|
+ $moldList=$invoiceManage->getInvoiceByStaff($_COOKIE ["staff"]);
|
|
|
+ //print_r($moldList);
|
|
|
+
|
|
|
+ if (empty($moldList))
|
|
|
+ $uGroups='ordinary';
|
|
|
+ else{
|
|
|
+ $flag=false;
|
|
|
+ array_push($moldList, array('mold'=>'ordinary'));
|
|
|
+ foreach ($moldList as $value){
|
|
|
+ //echo $value['mold'];
|
|
|
+ //echo $action;
|
|
|
+
|
|
|
+ if (Doo::acl()->isAllowed($value['mold'], $resource, $action)){
|
|
|
+ $flag=true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ Doo::acl()->isAllowed($uGroups['groups'], $resource, $action);
|
|
|
+ */
|
|
|
+ //var_dump($flag) ;
|
|
|
+ if (!$flag)
|
|
|
+ die('illegal request');
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
function __construct() {
|
|
|
if (isset ( $_COOKIE ["staff"] )) {
|
|
|
if (! empty ( $_COOKIE ["staff"] )) {
|
|
|
Doo::loadModel ( 'staff' );
|
|
|
$staff = new staff ();
|
|
|
- Doo::loadModel ( "invoiceManage" );
|
|
|
- $invoiceManage = new invoiceManage ();
|
|
|
+
|
|
|
|
|
|
// $invoiceManage
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+// $uname = $this->auth->getUname();
|
|
|
+// if ($uname) {
|
|
|
+// $uGroups = $this->users->getUidByname($this->auth->getUname());
|
|
|
+// } else {
|
|
|
+// $uGroups['groups'] = 'anonymous';
|
|
|
+// }
|
|
|
+// $falg = Doo::acl()->isAllowed($uGroups['groups'], $resource, $action);
|
|
|
+// if (!$falg)
|
|
|
+// return Doo::conf()->APP_URL;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
$this->staff = $staff->getUserByIdList ( $_COOKIE ["staff"] );
|
|
|
return "/";
|
|
|
}
|
|
@@ -34,6 +82,7 @@ class InvoiceController extends DooController {
|
|
|
@header ( "Location: /login" );
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
function invoice() {
|
|
|
Doo::loadModel ( 'invoice' );
|
|
|
$invoice = new invoice ();
|
|
@@ -41,13 +90,29 @@ class InvoiceController extends DooController {
|
|
|
$express = new express ();
|
|
|
Doo::loadModel ( 'invoiceReceivables' );
|
|
|
$invoiceReceivables = new invoiceReceivables ();
|
|
|
+ Doo::loadModel ( 'invoiceStatistics' );
|
|
|
+ $invoiceStatistics = new invoiceStatistics ();
|
|
|
+
|
|
|
+ $isMonth = $invoiceStatistics->getStatisticsByMonth ();
|
|
|
+
|
|
|
+ $year = date ( "Y" );
|
|
|
+ $tmp_date = date ( "Ym" );
|
|
|
+ $tmp_year = substr ( $tmp_date, 0, 4 );
|
|
|
+ $tmp_mon = substr ( $tmp_date, 4, 2 );
|
|
|
+ $tmp_forwardmonth = mktime ( 0, 0, 0, $tmp_mon - 1, 1, $tmp_year );
|
|
|
+ $fm_forward_month = date ( "m", $tmp_forwardmonth );
|
|
|
+ $path = SITE_PATH . $this->INVOICECOLLECTPATH . "invoiceCollect_" . $year . "_" . $fm_forward_month . ".htm";
|
|
|
+ $htm=$this->showCache($path);
|
|
|
|
|
|
$expressList = $express->getExpressByAll ();
|
|
|
$invoiceList = $invoice->getMyInvoice ( $_COOKIE ["staff"] );
|
|
|
|
|
|
$list = $invoiceReceivables->getInvoiceReceivablesByClaim ( $this->staff [0] ['cid'], $this->staff [0] ['sid'] );
|
|
|
|
|
|
- // print_r($list);
|
|
|
+ //print_r($invoiceList);
|
|
|
+
|
|
|
+ $data ['isMonth'] = $isMonth;
|
|
|
+ $data ['htm'] = $htm;
|
|
|
|
|
|
$data ['expressList'] = $expressList;
|
|
|
$data ['invoiceList'] = $invoiceList;
|
|
@@ -249,7 +314,7 @@ class InvoiceController extends DooController {
|
|
|
$data ['invoiceDetail'] = $invoiceDetail;
|
|
|
$data ['memu'] = "invoice";
|
|
|
$data ['staff'] = $this->staff;
|
|
|
- $data ['receiptMemu'] = 'invoiceApproval';
|
|
|
+ $data ['receiptMemu'] = 'invoice';
|
|
|
$this->render ( "/admin/invoiceEdit", $data );
|
|
|
}
|
|
|
/**
|
|
@@ -405,11 +470,20 @@ class InvoiceController extends DooController {
|
|
|
$invoice = new invoice ();
|
|
|
Doo::loadModel ( 'invoiceOperationLog' );
|
|
|
$invoiceOperationLog = new invoiceOperationLog ();
|
|
|
+ Doo::loadModel ( 'invoiceReceivables' );
|
|
|
+ $invoiceReceivables = new invoiceReceivables ();
|
|
|
|
|
|
$iid = $invoice->authcode ( $untreadIidKey );
|
|
|
if (! empty ( $iid ) && ! is_numeric ( $iid ))
|
|
|
die ( 'illegal request' );
|
|
|
|
|
|
+ $lt=$invoiceReceivables->getInvoiceReceivablesByIid($iid);
|
|
|
+
|
|
|
+ if (empty($lt)){
|
|
|
+ header ( 'Content-Type:text/html;charset=utf-8' );
|
|
|
+ die('该发票有收款绑定,请先移除!');
|
|
|
+ }
|
|
|
+
|
|
|
$item = array (
|
|
|
'iid' => $iid,
|
|
|
'untreadStatus' => 1,
|
|
@@ -508,8 +582,12 @@ class InvoiceController extends DooController {
|
|
|
$invoiceList [$key] ['lastApprover'] = $lastApprover;
|
|
|
}
|
|
|
|
|
|
- $data ['invoiceList'] = $invoiceList;
|
|
|
+ $ilist=$invoice->getInvoiceByProcessStatus();
|
|
|
+
|
|
|
+ //print_r($ilist);
|
|
|
|
|
|
+ $data ['invoiceList'] = $invoiceList;
|
|
|
+ $data ['ilist'] = $ilist;
|
|
|
$data ['memu'] = "invoice";
|
|
|
$data ['staff'] = $this->staff;
|
|
|
$data ['receiptMemu'] = 'invoiceApproval';
|
|
@@ -962,8 +1040,10 @@ class InvoiceController extends DooController {
|
|
|
elseif ($receivablesCategory != 'PUBLIC' && $receivablesStaff != 'PUBLIC') {
|
|
|
$receivablesStaff = explode ( '-', $receivablesStaff );
|
|
|
$item = array (
|
|
|
- 'operation' => $this->staff [0] ['username'] . " 转入 " . $receivablesStaff [1]
|
|
|
+ 'operation' => $this->staff [0] ['username'] . " 转入 " . $receivablesStaff [1],
|
|
|
+ 'bindDate'=>date ( "Y-m-d H:i:s" )
|
|
|
);
|
|
|
+
|
|
|
}
|
|
|
$item += array (
|
|
|
'date' => date ( "Y-m-d" ),
|
|
@@ -1069,9 +1149,25 @@ class InvoiceController extends DooController {
|
|
|
function invoiceMyReceivables() {
|
|
|
Doo::loadModel ( 'invoiceReceivables' );
|
|
|
$invoiceReceivables = new invoiceReceivables ();
|
|
|
+ Doo::loadModel ( 'invoiceStatistics' );
|
|
|
+ $invoiceStatistics = new invoiceStatistics ();
|
|
|
+
|
|
|
+ $isMonth = $invoiceStatistics->getStatisticsByMonth ();
|
|
|
+
|
|
|
+ $year = date ( "Y" );
|
|
|
+ $tmp_date = date ( "Ym" );
|
|
|
+ $tmp_year = substr ( $tmp_date, 0, 4 );
|
|
|
+ $tmp_mon = substr ( $tmp_date, 4, 2 );
|
|
|
+ $tmp_forwardmonth = mktime ( 0, 0, 0, $tmp_mon - 1, 1, $tmp_year );
|
|
|
+ $fm_forward_month = date ( "m", $tmp_forwardmonth );
|
|
|
+ $path = SITE_PATH . $this->INVOICECOLLECTPATH . "invoiceCollect_" . $year . "_" . $fm_forward_month . ".htm";
|
|
|
+ $htm=$this->showCache($path);
|
|
|
+
|
|
|
|
|
|
$list = $invoiceReceivables->getInvoiceReceivablesByClaim ( $this->staff [0] ['cid'], $this->staff [0] ['sid'] );
|
|
|
|
|
|
+ $data ['isMonth'] = $isMonth;
|
|
|
+ $data ['htm'] = $htm;
|
|
|
$data ['list'] = $list;
|
|
|
|
|
|
$data ['memu'] = "invoice";
|
|
@@ -1094,16 +1190,19 @@ class InvoiceController extends DooController {
|
|
|
Doo::loadModel ( 'invoiceOperationLog' );
|
|
|
$invoiceOperationLog = new invoiceOperationLog ();
|
|
|
|
|
|
+ if (empty ( $invoiceKey ) || empty ( $claimKey ))
|
|
|
+ die ( 'illegal request' );
|
|
|
+
|
|
|
$detail = $invoice->getInvoiceByIid ( $invoiceKey );
|
|
|
$detailM = $invoiceReceivables->getInvoiceReceivablesByIrid ( $claimKey );
|
|
|
|
|
|
if (empty ( $detail ) && empty ( $detailM ))
|
|
|
die ( 'illegal request' );
|
|
|
|
|
|
- if ($detailM ['receivablesPrice'] >= $detail ['invoicePrice']) {
|
|
|
- $price = $detailM ['receivablesPrice'] - $detail ['invoicePrice'];
|
|
|
- die ( '<p>收款金额超出开票金额 ¥' . $price . '元,请谨慎操作</p><a href="/invoiceMyReceivables">返回</a>' );
|
|
|
- }
|
|
|
+// if ($detailM ['receivablesPrice'] >= $detail ['invoicePrice']) {
|
|
|
+// $price = $detailM ['receivablesPrice'] - $detail ['invoicePrice'];
|
|
|
+// die ( '<p>收款金额超出开票金额 ¥' . $price . '元,请谨慎操作</p><a href="/invoiceMyReceivables">返回</a>' );
|
|
|
+// }
|
|
|
|
|
|
$item = array (
|
|
|
'irid' => $detailM ['irid'],
|
|
@@ -1199,13 +1298,13 @@ class InvoiceController extends DooController {
|
|
|
return "/invoice";
|
|
|
}
|
|
|
function invoiceAggregate() {
|
|
|
+ $year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( "Y" );
|
|
|
+
|
|
|
Doo::loadModel ( 'invoiceStatistics' );
|
|
|
$invoiceStatistics = new invoiceStatistics ();
|
|
|
Doo::loadModel ( 'L_category' );
|
|
|
$Lcategory = new L_category ();
|
|
|
|
|
|
- $year = date ( "Y" );
|
|
|
-
|
|
|
$isList = $invoiceStatistics->getInvoiceStatisticsByYear ( $year );
|
|
|
$LcategoryList = $Lcategory->getCategory ();
|
|
|
// print_r($isList);
|
|
@@ -1287,7 +1386,7 @@ class InvoiceController extends DooController {
|
|
|
$this->render ( "/admin/invoiceAggregate", $data );
|
|
|
}
|
|
|
function invoiceAggregateStaff() {
|
|
|
- $year = date ( "Y" );
|
|
|
+ $year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( "Y" );
|
|
|
|
|
|
Doo::loadModel ( 'invoiceStatistics' );
|
|
|
$invoiceStatistics = new invoiceStatistics ();
|
|
@@ -1414,17 +1513,16 @@ class InvoiceController extends DooController {
|
|
|
$data ['receiptMemu'] = 'invoiceAggregate';
|
|
|
$this->render ( "/admin/invoiceAggregateStaff", $data );
|
|
|
}
|
|
|
-
|
|
|
function invoiceAggregateCategory() {
|
|
|
Doo::loadClass ( 'XDeode' );
|
|
|
$XDeode = new XDeode ( 5 );
|
|
|
|
|
|
- $cid = isset ( $this->params ['cid'] ) ? $this->params ['cid'] : "";
|
|
|
+ $cid = $cidKey = isset ( $this->params ['cid'] ) ? $this->params ['cid'] : "";
|
|
|
$cid = $XDeode->decode ( $cid );
|
|
|
if (! is_numeric ( $cid ))
|
|
|
die ( 'illegal request' );
|
|
|
|
|
|
- $year = date ( "Y" );
|
|
|
+ $year = $this->get_args ( 'year' ) ? $this->get_args ( 'year' ) : date ( "Y" );
|
|
|
|
|
|
Doo::loadModel ( 'invoiceStatistics' );
|
|
|
$invoiceStatistics = new invoiceStatistics ();
|
|
@@ -1435,8 +1533,8 @@ class InvoiceController extends DooController {
|
|
|
$isCategory = $invoiceStatistics->getInvoiceStatisticsByStaff ( $year, $cid );
|
|
|
$toteList = $invoiceStatistics->getInvoiceStatisticsByTote ( $year, $cid );
|
|
|
|
|
|
- if (empty($list))
|
|
|
- die('该办事处没有成员');
|
|
|
+ if (empty ( $list ))
|
|
|
+ die ( '该办事处没有成员' );
|
|
|
$htmlA = $htmlB = $htmlC = $html = '';
|
|
|
foreach ( $list as $key => $value ) {
|
|
|
$htmlA = '<tr><th rowspan="3">' . $value ['username'] . '</th><th class="taC">开票</th>';
|
|
@@ -1459,7 +1557,7 @@ class InvoiceController extends DooController {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- if ($flag){
|
|
|
+ if ($flag) {
|
|
|
$htmlA .= '<td class="taR">-</td>';
|
|
|
$htmlB .= '<td class="taR">-</td>';
|
|
|
$htmlC .= '<td class="taR"><b>-</b></td>';
|
|
@@ -1475,7 +1573,7 @@ class InvoiceController extends DooController {
|
|
|
$html .= $htmlA . $htmlB . $htmlC;
|
|
|
}
|
|
|
|
|
|
- $htmlA = $htmlB = $htmlC ="";
|
|
|
+ $htmlA = $htmlB = $htmlC = "";
|
|
|
|
|
|
$htmlA = '<tr><th rowspan="3">月合计</th><th class="taC">开票</th>';
|
|
|
$htmlB = '<tr><th class="taC">收款</th>';
|
|
@@ -1486,7 +1584,7 @@ class InvoiceController extends DooController {
|
|
|
for($month = 1; $month <= 12; $month ++) {
|
|
|
$flag = true;
|
|
|
foreach ( $isCategory ['statisticsMonth'] as $k => $v ) {
|
|
|
- if ( $month == $v ['month']) {
|
|
|
+ if ($month == $v ['month']) {
|
|
|
$htmlA .= '<td class="taR colRed">¥' . $v ['invoicePrice'] . '</td>';
|
|
|
$htmlB .= '<td class="taR colOrange">¥' . $v ['receivablesPrice'] . '</td>';
|
|
|
$htmlC .= '<td class="taR colGreen"><b>¥' . $v ['accountPrice'] . '</b></td>';
|
|
@@ -1497,7 +1595,7 @@ class InvoiceController extends DooController {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- if ($flag){
|
|
|
+ if ($flag) {
|
|
|
$htmlA .= '<td class="taR">-</td>';
|
|
|
$htmlB .= '<td class="taR">-</td>';
|
|
|
$htmlC .= '<td class="taR"><b>-</b></td>';
|
|
@@ -1506,7 +1604,7 @@ class InvoiceController extends DooController {
|
|
|
$htmlA .= '<td class="taR colRed">' . $invoicePriceStaffYear . '</td>';
|
|
|
$htmlB .= '<td class="taR colOrange">' . $receivablesPriceStaffYear . '</td>';
|
|
|
$htmlC .= '<td class="taR colGreen"><b>' . $accountPriceStaffYear . '</b></td>';
|
|
|
-
|
|
|
+
|
|
|
$htmlA .= '</tr>';
|
|
|
$htmlB .= '</tr>';
|
|
|
$htmlC .= '</tr>';
|
|
@@ -1514,6 +1612,7 @@ class InvoiceController extends DooController {
|
|
|
|
|
|
$data ['html'] = $html;
|
|
|
|
|
|
+ $data ['cidKey'] = $cidKey;
|
|
|
$data ['slist'] = $list;
|
|
|
$data ['isList'] = $toteList;
|
|
|
$data ['year'] = $year;
|
|
@@ -1523,6 +1622,15 @@ class InvoiceController extends DooController {
|
|
|
$this->render ( "/admin/invoiceAggregateCategory", $data );
|
|
|
}
|
|
|
|
|
|
+ function invoiceAchieve(){
|
|
|
+
|
|
|
+
|
|
|
+ $data ['memu'] = "invoice";
|
|
|
+ $data ['staff'] = $this->staff;
|
|
|
+ $data ['receiptMemu'] = 'invoiceAggregate';
|
|
|
+ $this->render ( "/admin/invoiceAchieve", $data );
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获得与我有关可收款的发票
|
|
|
*/
|
|
@@ -1731,7 +1839,7 @@ class InvoiceController extends DooController {
|
|
|
foreach ( $list as $key => $value ) {
|
|
|
$receivablesPrice += $value ['receivablesPrice'];
|
|
|
}
|
|
|
- if ($receivablesPrice >= $detail ['invoicePrice']) {
|
|
|
+ if ($receivablesPrice > $detail ['invoicePrice']) {
|
|
|
$price = $receivablesPrice - $detail ['invoicePrice'];
|
|
|
$priceStatus = 1;
|
|
|
}
|
|
@@ -2081,12 +2189,134 @@ class InvoiceController extends DooController {
|
|
|
'priceStatus' => $priceStatus
|
|
|
) );
|
|
|
}
|
|
|
+ function ajaxGetInvoiceInfoByType() {
|
|
|
+ $type = $this->get_args ( 'type' ) ? $this->get_args ( 'type' ) : "";
|
|
|
+ $serial = $this->get_args ( 'serial' ) ? $this->get_args ( 'serial' ) : "";
|
|
|
+
|
|
|
+ if (empty($serial)){
|
|
|
+ echo json_encode ( array (
|
|
|
+ 'status' => 2,
|
|
|
+ 'msg' => 'illegal request'
|
|
|
+ ) );
|
|
|
+ die();
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($type=='INVOICE'){
|
|
|
+ Doo::loadModel ( 'invoice' );
|
|
|
+ $invoice = new invoice ();
|
|
|
+
|
|
|
+ $detail=$invoice->getInvoiceByIsid($serial,$this->staff[0]['sid']);
|
|
|
+ if (empty($detail))
|
|
|
+ $html='';
|
|
|
+ else{
|
|
|
+ $html='
|
|
|
+ <div class="modal-dialog modal-lg">
|
|
|
+ <div class="modal-content"><div class="modal-header"><h3>发票单详情</h3></div>
|
|
|
+ <div class="modal-body saeaList"><table class="table table-bordered table-condensed"><tbody>
|
|
|
+ <tr>
|
|
|
+ <th class="taC" width="150">开票流水号</th><td>'.$detail['invoiceSerial'].'</td>
|
|
|
+ <th class="taC" width="150">提交时间</th><td>'.$detail['date'].'</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="taC" width="150">所在办事处</th><td>'.$detail['categoryName'].'('.$detail['userName'].')</td>
|
|
|
+ <th class="taC" width="150">备注</th><td>'.$detail['remark'].'</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="taC">开票金额</th><td><b class="colOrange" style="font-size:18px">¥'.$detail['invoicePrice'].'</b></td>
|
|
|
+ <th class="taC">开票内容</th><td>'.$detail['invoiceElement'].'</td>
|
|
|
+ </tr></tbody></table>';
|
|
|
+
|
|
|
+ if ($detail['invoiceType']==0)
|
|
|
+ $html.='<table class="table table-bordered table-condensed"><tbody><tr><th colspan="4" class="taC">增值税普通发票</th></tr><tr>
|
|
|
+ <th class="taC" width="150">发票抬头</th><td colspan="3">'.$detail['invoiceTitle'].'</td></tr></tbody></table>';
|
|
|
+ else
|
|
|
+ $html.='<table class="table table-bordered table-condensed"><tbody><tr><th colspan="4" class="taC">增值税专用发票</th></tr><tr>
|
|
|
+ <th class="taC" width="150">单位名称</th><td>'.$detail['invoiceCompany'].'</td>
|
|
|
+ <th class="taC" width="150">纳税人识别码</th><td>'.$detail['TIN'].'</td></tr><tr>
|
|
|
+ <th class="taC">注册地址</th><td>'.$detail['address'].'</td>
|
|
|
+ <th class="taC">注册电话</th><td>'.$detail['phone'].'</td>
|
|
|
+ </tr><tr>
|
|
|
+ <th class="taC">开户银行</th><td>'.$detail['bankAccount'].'</td>
|
|
|
+ <th class="taC">银行账户</th><td>'.$detail['bank'].'</td>
|
|
|
+ </tr></tbody></table>';
|
|
|
+ if ($detail['doPost']==1)
|
|
|
+ $html.='<table class="table table-bordered table-condensed"><tbody><tr><th colspan="4" class="taC">邮寄信息</th></tr><tr>
|
|
|
+ <th class="taC" width="150">收件人</th><td>'.$detail['recipients'].'</td>
|
|
|
+ <th class="taC" width="150">收件人手机/电话</th><td>'.$detail['recipientsPhone'].'</td>
|
|
|
+ </tr><tr>
|
|
|
+ <th class="taC" width="150">收件地址</th><td colspan="3">'.$detail['recipientsAddress'].'</td>
|
|
|
+ </tr><tr>
|
|
|
+ <th class="taC" width="150">邮寄物品</th><td colspan="3">'.$detail['mailItems'].'</td>
|
|
|
+ </tr></tbody></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();
|
|
|
+ }elseif ($type=='RECEIVABLES'){
|
|
|
+ Doo::loadModel ( 'invoiceReceivables' );
|
|
|
+ $invoiceReceivables = new invoiceReceivables ();
|
|
|
+
|
|
|
+ $detail=$invoiceReceivables->getInvoiceReceivablesByIrsid($serial,$this->staff[0]['sid']);
|
|
|
+ if (empty($detail))
|
|
|
+ $html='';
|
|
|
+ else{
|
|
|
+ $html='<div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><h3>收款单详情</h3></div><div class="modal-body saeaList"><table class="table table-bordered table-condensed">
|
|
|
+ <tbody><tr>
|
|
|
+ <th class="taC">收款流水号</th><td>'.$detail['receivablesSerial'].'</td>
|
|
|
+ <th class="taC">录入收款</th><td>'.$detail['inputStaff'].' '.$detail['date'].'</td>
|
|
|
+ </tr><tr>
|
|
|
+ <th class="taC">收款金额</th><td><b>¥'.$detail['receivablesPrice'].'</b></td>
|
|
|
+ <th class="taC">收款信息</th><td>'.$detail['receivablesMessage'].'</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="taC">收款银行</th><td>'.$detail['receivablesBank'].'</td>
|
|
|
+ <th class="taC">银行到帐</th><td>'.$detail['receivablesDate'].'</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th class="taC">认领收款</th><td colspan="3">'.$detail['inputStaff'].' 转入 '.$detail['username'].' '.$detail['bindDate'].'</td>
|
|
|
+ </tr>
|
|
|
+ </tbody></table></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 _GetFileEXT($filename) {
|
|
|
$pics = explode ( '.', $filename );
|
|
|
$num = count ( $pics );
|
|
|
return $pics [$num - 1];
|
|
|
}
|
|
|
|
|
|
+ function showCache($path = "") {
|
|
|
+ if (file_exists ( $path )) {
|
|
|
+ $htm=file_get_contents($path);
|
|
|
+ }else{
|
|
|
+ Doo::loadModel ( 'invoiceStatistics' );
|
|
|
+ $invoiceStatistics = new invoiceStatistics ();
|
|
|
+
|
|
|
+ $isBriefly = $invoiceStatistics->getBrieflyStatistics ();
|
|
|
+ $htm = '<tr><th class="taC">' . $isBriefly ['statisticsMonth'] [0] ['month'] . '月累计开票</th>
|
|
|
+ <td>¥' . $isBriefly ['statisticsMonth'] [0] ['invoicePrice'] . '</td>
|
|
|
+ <th class="taC">' . $isBriefly ['statisticsMonth'] [0] ['month'] . '月累计入账</th>
|
|
|
+ <td>¥' . $isBriefly ['statisticsMonth'] [0] ['accountPrice'] . '</td></tr>';
|
|
|
+ /*
|
|
|
+ '<tr><th class="taC">今年累计开票</th><td>¥' . $isBriefly ['statisticsYear'] [0] ['invoicePrice'] . '</td>
|
|
|
+ <th class="taC">今年累计入账</th><td>¥' . $isBriefly ['statisticsYear'] [0] ['accountPrice'] . '</td></tr>';
|
|
|
+ */
|
|
|
+ file_put_contents ( $path, $htm, FILE_APPEND );
|
|
|
+ }
|
|
|
+ return $htm;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取get或者POST值
|
|
|
*
|