|
@@ -784,11 +784,11 @@ class InvoiceController extends DooController {
|
|
foreach ( $isList as $key => $value ) {
|
|
foreach ( $isList as $key => $value ) {
|
|
$irDetail = array ();
|
|
$irDetail = array ();
|
|
if ($value ['apStatus'] == 1) {
|
|
if ($value ['apStatus'] == 1) {
|
|
- array_push ( $irDetail, '<input disabled type="checkbox">' );
|
|
|
|
- array_push ( $irDetail, '' );
|
|
|
|
|
|
+ //array_push ( $irDetail, '' );
|
|
|
|
+ array_push ( $irDetail, '<input class="hide" disabled type="checkbox" >' );
|
|
} else {
|
|
} else {
|
|
- array_push ( $irDetail, '<input type="checkbox" name="isBox" value="' . $value ['storeKey'] . '" >' );
|
|
|
|
- array_push ( $irDetail, '<a href="/invoiceStoreEdit/' . $value ['storeKey'] . '.html">编辑</a>
|
|
|
|
|
|
+
|
|
|
|
+ array_push ( $irDetail, '<input type="checkbox" class="hide" id="' . $value ['storeKey'] . '" name="isBox" value="' . $value ['storeKey'] . '" > <a href="/invoiceStoreEdit/' . $value ['storeKey'] . '.html">编辑</a>
|
|
<a href="#confirm" onclick="invoiceStoreApproval(\'' . $value ['storeKey'] . '\')" data-toggle="modal">提交审批</a>
|
|
<a href="#confirm" onclick="invoiceStoreApproval(\'' . $value ['storeKey'] . '\')" data-toggle="modal">提交审批</a>
|
|
<a href="#del" node-iStore="del" data-key="' . $value ['storeKey'] . '" onclick="invoiceStoreDel(\'' . $value ['storeKey'] . '\')" data-toggle="modal" class="colRed">移除</a>' );
|
|
<a href="#del" node-iStore="del" data-key="' . $value ['storeKey'] . '" onclick="invoiceStoreDel(\'' . $value ['storeKey'] . '\')" data-toggle="modal" class="colRed">移除</a>' );
|
|
}
|
|
}
|
|
@@ -799,6 +799,13 @@ class InvoiceController extends DooController {
|
|
else
|
|
else
|
|
array_push ( $irDetail, $value ['invoiceTitle'] );
|
|
array_push ( $irDetail, $value ['invoiceTitle'] );
|
|
array_push ( $irDetail, $value ['TIN'] );
|
|
array_push ( $irDetail, $value ['TIN'] );
|
|
|
|
+
|
|
|
|
+ if (empty ( $value ['mailItems'])&&$value ['apStatus'] != 1){
|
|
|
|
+ array_push ( $irDetail, '<a href="#confirm-erro" onclick="invoiceStoreMail(\'' . $value ['storeKey'] . '\')" data-toggle="modal">设置邮寄物品</a>' );
|
|
|
|
+ }else
|
|
|
|
+ array_push ( $irDetail, $value ['mailItems'] );
|
|
|
|
+ array_push ( $irDetail, $value ['recipientsAddress'] . $value ['recipients'] . $value ['recipientsPhone'] );
|
|
|
|
+
|
|
array_push ( $irDetail, $value ['address'] . $value ['phone'] );
|
|
array_push ( $irDetail, $value ['address'] . $value ['phone'] );
|
|
array_push ( $irDetail, $value ['bank'] . $value ['bankAccount'] );
|
|
array_push ( $irDetail, $value ['bank'] . $value ['bankAccount'] );
|
|
array_push ( $irDetail, $value ['invoiceElement'] );
|
|
array_push ( $irDetail, $value ['invoiceElement'] );
|
|
@@ -810,11 +817,7 @@ class InvoiceController extends DooController {
|
|
else
|
|
else
|
|
array_push ( $irDetail, '¥' . $value ['invoicePrice'] );
|
|
array_push ( $irDetail, '¥' . $value ['invoicePrice'] );
|
|
array_push ( $irDetail, $value ['remark'] );
|
|
array_push ( $irDetail, $value ['remark'] );
|
|
- if (empty ( $value ['mailItems'] ))
|
|
|
|
- array_push ( $irDetail, '<a href="#confirm-erro" onclick="invoiceStoreMail(\'' . $value ['storeKey'] . '\')" data-toggle="modal">设置邮寄物品</a>' );
|
|
|
|
- else
|
|
|
|
- array_push ( $irDetail, $value ['mailItems'] );
|
|
|
|
- array_push ( $irDetail, $value ['recipientsAddress'] . $value ['recipients'] . $value ['recipientsPhone'] );
|
|
|
|
|
|
+
|
|
|
|
|
|
if ($value ['status'] == 1)
|
|
if ($value ['status'] == 1)
|
|
array_push ( $irDetail, '审批中' );
|
|
array_push ( $irDetail, '审批中' );
|
|
@@ -928,8 +931,9 @@ class InvoiceController extends DooController {
|
|
|
|
|
|
$exlArray = $this->_format_excel_to_array ( DOO::conf ()->SITE_PATH . "upload/invoiceTraining/" . $path, 'invoiceTrain' );
|
|
$exlArray = $this->_format_excel_to_array ( DOO::conf ()->SITE_PATH . "upload/invoiceTraining/" . $path, 'invoiceTrain' );
|
|
|
|
|
|
- $userName=$this->staff [0] ['userName'];
|
|
|
|
|
|
+ $userName=$this->staff [0] ['username'];
|
|
$sDetail = $staff->getStaffByName ( $userName );
|
|
$sDetail = $staff->getStaffByName ( $userName );
|
|
|
|
+
|
|
// 可以优化
|
|
// 可以优化
|
|
foreach ( $exlArray as $key => $value ) {
|
|
foreach ( $exlArray as $key => $value ) {
|
|
// 开票
|
|
// 开票
|
|
@@ -938,7 +942,7 @@ class InvoiceController extends DooController {
|
|
$invoice->trainId = $itid;
|
|
$invoice->trainId = $itid;
|
|
|
|
|
|
$invoice->invoiceType = 0;
|
|
$invoice->invoiceType = 0;
|
|
- if ($value ['invoiceType'] == '专')
|
|
|
|
|
|
+ if ($value ['invoiceType'] == '专'||$value ['invoiceType'] == '专票')
|
|
$invoice->invoiceType = 1;
|
|
$invoice->invoiceType = 1;
|
|
|
|
|
|
$invoice->invoiceQuantity = $value ['invoiceQuantity'];
|
|
$invoice->invoiceQuantity = $value ['invoiceQuantity'];
|
|
@@ -947,7 +951,7 @@ class InvoiceController extends DooController {
|
|
$invoice->invoicePrice = $value ['invoiceQuantity'] * $value ['invoiceUnitPrice'];
|
|
$invoice->invoicePrice = $value ['invoiceQuantity'] * $value ['invoiceUnitPrice'];
|
|
|
|
|
|
$invoice->invoiceTitle = $value ['invoiceTitle'];
|
|
$invoice->invoiceTitle = $value ['invoiceTitle'];
|
|
- if ($value ['invoiceType'] == '专')
|
|
|
|
|
|
+ if ($value ['invoiceType'] == '专'||$value ['invoiceType'] == '专票')
|
|
$invoice->invoiceCompany = $value ['invoiceTitle'];
|
|
$invoice->invoiceCompany = $value ['invoiceTitle'];
|
|
|
|
|
|
$invoice->userName =$userName;
|
|
$invoice->userName =$userName;
|
|
@@ -2067,6 +2071,7 @@ class InvoiceController extends DooController {
|
|
if (count ( $processApprovals ) == count ( $invoiceManage ) && $status != 4) {
|
|
if (count ( $processApprovals ) == count ( $invoiceManage ) && $status != 4) {
|
|
$invoice->status = $status;
|
|
$invoice->status = $status;
|
|
$invoice->pendingApprovals = 0;
|
|
$invoice->pendingApprovals = 0;
|
|
|
|
+ $invoice->approvalTime=date ( "Y-m-d H:i:s" );
|
|
} elseif ($status == 4) {
|
|
} elseif ($status == 4) {
|
|
$invoice->status = $status;
|
|
$invoice->status = $status;
|
|
$item = array (
|
|
$item = array (
|
|
@@ -2240,7 +2245,7 @@ class InvoiceController extends DooController {
|
|
|
|
|
|
$pageinfo = $this->get_page ( "CLD_invoice", $sql, $page, $page_size, $action, $get, "" );
|
|
$pageinfo = $this->get_page ( "CLD_invoice", $sql, $page, $page_size, $action, $get, "" );
|
|
$limit = $pageinfo ['lower'] . ',' . $page_size;
|
|
$limit = $pageinfo ['lower'] . ',' . $page_size;
|
|
- $list = $invoice->getInvoiceByUntreadStatusPage ( $limit, $sql );
|
|
|
|
|
|
+ $list = $invoice->getInvoiceByUntreadStatusPage ( $limit, $sql,'desc',5 );
|
|
|
|
|
|
$this->data ['MebSeaEn'] = $MebSea;
|
|
$this->data ['MebSeaEn'] = $MebSea;
|
|
$this->data ['MebSea'] = urlencode ( $MebSea );
|
|
$this->data ['MebSea'] = urlencode ( $MebSea );
|
|
@@ -2729,7 +2734,6 @@ class InvoiceController extends DooController {
|
|
|
|
|
|
// 获取未入账发票
|
|
// 获取未入账发票
|
|
$invoiceUnAccount = $invoice->getInvoiceByUnAccount ( $invoiceTC );
|
|
$invoiceUnAccount = $invoice->getInvoiceByUnAccount ( $invoiceTC );
|
|
-
|
|
|
|
$invoiceExistAccount = $invoice->getInvoiceByUnAccount ( '', true );
|
|
$invoiceExistAccount = $invoice->getInvoiceByUnAccount ( '', true );
|
|
|
|
|
|
foreach ( $invoiceUnAccount as $key => $value ) {
|
|
foreach ( $invoiceUnAccount as $key => $value ) {
|
|
@@ -2761,7 +2765,11 @@ class InvoiceController extends DooController {
|
|
|
|
|
|
$receivablesInput = $invoiceReceivables->getInvoiceReceivablesByInput ();
|
|
$receivablesInput = $invoiceReceivables->getInvoiceReceivablesByInput ();
|
|
|
|
|
|
- // print_r($receivablesList);
|
|
|
|
|
|
+ $halfList=$invoiceReceivables->getInvoiceReceivablesByHalf();
|
|
|
|
+ $this->data ['halfList'] = $halfList;
|
|
|
|
+ $this->data ['halfCount'] = count ( $halfList );
|
|
|
|
+
|
|
|
|
+ //print_r($receivablesList);
|
|
$this->data ['receivablesDate'] = date ( "Y-m-d" );
|
|
$this->data ['receivablesDate'] = date ( "Y-m-d" );
|
|
$this->data ['ieaCount'] = count ( $invoiceExistAccount );
|
|
$this->data ['ieaCount'] = count ( $invoiceExistAccount );
|
|
$this->data ['invoiceExistAccount'] = $invoiceExistAccount;
|
|
$this->data ['invoiceExistAccount'] = $invoiceExistAccount;
|
|
@@ -3218,10 +3226,13 @@ class InvoiceController extends DooController {
|
|
|
|
|
|
$list = $invoiceReceivables->getInvoiceReceivablesByClaim ( $this->staff [0] ['cid'], $this->staff [0] ['sid'] );
|
|
$list = $invoiceReceivables->getInvoiceReceivablesByClaim ( $this->staff [0] ['cid'], $this->staff [0] ['sid'] );
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
$this->data ['isMonth'] = $isMonth;
|
|
$this->data ['isMonth'] = $isMonth;
|
|
$this->data ['htm'] = $htm;
|
|
$this->data ['htm'] = $htm;
|
|
$this->data ['list'] = $list;
|
|
$this->data ['list'] = $list;
|
|
|
|
|
|
|
|
+
|
|
$this->data ['memu'] = "invoice";
|
|
$this->data ['memu'] = "invoice";
|
|
$this->data ['staff'] = $this->staff;
|
|
$this->data ['staff'] = $this->staff;
|
|
$this->data ['receiptMemu'] = 'invoiceMyReceivables';
|
|
$this->data ['receiptMemu'] = 'invoiceMyReceivables';
|
|
@@ -3253,17 +3264,39 @@ class InvoiceController extends DooController {
|
|
if ($detail ['untreadStatus'] == 3)
|
|
if ($detail ['untreadStatus'] == 3)
|
|
die ( 'illegal request' );
|
|
die ( 'illegal request' );
|
|
|
|
|
|
- // if ($detailM ['receivablesPrice'] >= $detail ['invoicePrice']) {
|
|
|
|
- // $price = $detailM ['receivablesPrice'] - $detail ['invoicePrice'];
|
|
|
|
- // die ( '<p>收款金额超出开票金额 ¥' . $price . '元,请谨慎操作</p><a href="/invoiceMyReceivables">返回</a>' );
|
|
|
|
- // }
|
|
|
|
|
|
+ //修改 绑定状态改为 金额
|
|
$invoiceReceivables = new invoiceReceivables ();
|
|
$invoiceReceivables = new invoiceReceivables ();
|
|
- $item = array (
|
|
|
|
|
|
+
|
|
|
|
+ $invoicePrice=$detail['invoicePrice']+$detailM['bindPrice'];
|
|
|
|
+ if ($detailM['receivablesPrice']>$invoicePrice){
|
|
|
|
+ $item=array(
|
|
|
|
+ 'bindPrice'=>$invoicePrice
|
|
|
|
+ );
|
|
|
|
+ }elseif ($detailM['receivablesPrice']<=$invoicePrice){
|
|
|
|
+ $item=array(
|
|
|
|
+ 'bindPrice'=>$invoicePrice,
|
|
|
|
+ 'bindStatus'=>1,
|
|
|
|
+ 'bindDate' => date ( "Y-m-d H:i:s" )
|
|
|
|
+ );
|
|
|
|
+ }else{
|
|
|
|
+ die ( 'illegal request' );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if($detailM['iid']==0){
|
|
|
|
+ $item+=array(
|
|
|
|
+ 'iid'=>$detail ['iid']
|
|
|
|
+ );
|
|
|
|
+ }else{
|
|
|
|
+ $iidExtend=explode(',', $detailM ['iidExtend']);
|
|
|
|
+ array_push($iidExtend, $detail ['iid']);
|
|
|
|
+ $item+=array(
|
|
|
|
+ 'iidExtend'=>implode(',', $iidExtend)
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $item += array (
|
|
'irid' => $detailM ['irid'],
|
|
'irid' => $detailM ['irid'],
|
|
- 'bindStatus' => 1,
|
|
|
|
- 'iid' => $detail ['iid'],
|
|
|
|
- 'accountClerk' => $this->staff [0] ['username'],
|
|
|
|
- 'bindDate' => date ( "Y-m-d H:i:s" )
|
|
|
|
|
|
+ 'accountClerk' => $this->staff [0] ['username']
|
|
);
|
|
);
|
|
$invoiceReceivables->setInvoiceReceivablesByCondition ( $item );
|
|
$invoiceReceivables->setInvoiceReceivablesByCondition ( $item );
|
|
|
|
|
|
@@ -3306,11 +3339,6 @@ class InvoiceController extends DooController {
|
|
Doo::loadModel ( 'invoiceStatistics' );
|
|
Doo::loadModel ( 'invoiceStatistics' );
|
|
$invoiceStatistics = new invoiceStatistics ();
|
|
$invoiceStatistics = new invoiceStatistics ();
|
|
|
|
|
|
- // $list = $invoiceReceivables->getInvoiceReceivablesInIridString ( $iridString );
|
|
|
|
- // $accountPrice = 0;
|
|
|
|
- // foreach ( $list as $key => $value ) {
|
|
|
|
- // $accountPrice += $value ['receivablesPrice'];
|
|
|
|
- // }
|
|
|
|
$item = array (
|
|
$item = array (
|
|
'date' => $detailM ['receivablesDate'],
|
|
'date' => $detailM ['receivablesDate'],
|
|
'priceClass' => 3,
|
|
'priceClass' => 3,
|
|
@@ -4005,7 +4033,7 @@ class InvoiceController extends DooController {
|
|
$MebSea = $this->get_args ( 'MebSea' ) ? $this->get_args ( 'MebSea' ) : "";
|
|
$MebSea = $this->get_args ( 'MebSea' ) ? $this->get_args ( 'MebSea' ) : "";
|
|
$timeType = $this->get_args ( 'timeType' ) ? $this->get_args ( 'timeType' ) : "CREATE";
|
|
$timeType = $this->get_args ( 'timeType' ) ? $this->get_args ( 'timeType' ) : "CREATE";
|
|
|
|
|
|
- $page_size = 6;
|
|
|
|
|
|
+ $page_size = 10;
|
|
$page = isset ( $this->params ['page'] ) && is_numeric ( $this->params ['page'] ) ? $this->params ['page'] : 1;
|
|
$page = isset ( $this->params ['page'] ) && is_numeric ( $this->params ['page'] ) ? $this->params ['page'] : 1;
|
|
$status = isset ( $this->params ['status'] ) ? $this->params ['status'] : 'All';
|
|
$status = isset ( $this->params ['status'] ) ? $this->params ['status'] : 'All';
|
|
|
|
|
|
@@ -4021,9 +4049,9 @@ class InvoiceController extends DooController {
|
|
$D2 = $dateArr [0]; // ." 23:59:59 ";//date ( "Y-m-d" );
|
|
$D2 = $dateArr [0]; // ." 23:59:59 ";//date ( "Y-m-d" );
|
|
}
|
|
}
|
|
|
|
|
|
- $descField = 'receivablesDate';
|
|
|
|
|
|
+ $descField = 'a.receivablesDate';
|
|
if ($timeType == 'CREATE')
|
|
if ($timeType == 'CREATE')
|
|
- $descField = 'date';
|
|
|
|
|
|
+ $descField = 'a.date';
|
|
|
|
|
|
$con = '1';
|
|
$con = '1';
|
|
if (! empty ( $D1 ) && ! empty ( $D2 ))
|
|
if (! empty ( $D1 ) && ! empty ( $D2 ))
|
|
@@ -4031,24 +4059,41 @@ class InvoiceController extends DooController {
|
|
|
|
|
|
// echo $con;
|
|
// echo $con;
|
|
if ($status == 'Unclaimed')
|
|
if ($status == 'Unclaimed')
|
|
- $con .= ' and bindStatus=0';
|
|
|
|
|
|
+ $con .= ' and a.bindStatus=0';
|
|
elseif ($status == 'Credited')
|
|
elseif ($status == 'Credited')
|
|
- $con .= ' and bindStatus=1';
|
|
|
|
|
|
+ $con .= ' and a.bindStatus=1';
|
|
elseif ($status == 'Claim')
|
|
elseif ($status == 'Claim')
|
|
- $con .= ' and bindStatus=0 and receivablesStaff="PUBLIC"';
|
|
|
|
|
|
+ $con .= ' and a.bindStatus=0 and a.receivablesStaff="PUBLIC"';
|
|
|
|
|
|
$get = "/" . $status . "?date=" . urlencode ( $date ) . "&MebSea=" . urlencode ( $MebSea );
|
|
$get = "/" . $status . "?date=" . urlencode ( $date ) . "&MebSea=" . urlencode ( $MebSea );
|
|
|
|
|
|
if (! empty ( $MebSea )) {
|
|
if (! empty ( $MebSea )) {
|
|
- $con .= ' and ( receivablesMessage like "%' . $MebSea . '%" or receivablesPrice like "%' . $MebSea . '%" )';
|
|
|
|
|
|
+ $con .= ' and ( a.receivablesMessage like "%' . $MebSea . '%" or a.receivablesPrice like "%' . $MebSea . '%" )';
|
|
}
|
|
}
|
|
$pageinfo ['page'] = array (
|
|
$pageinfo ['page'] = array (
|
|
'previous' => ''
|
|
'previous' => ''
|
|
);
|
|
);
|
|
- $pageinfo = $this->get_page ( "CLD_invoiceReceivables", $con, $page, $page_size, "invoiceReceivablesAS", $get, "" );
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ $sql = 'select count(*) as count
|
|
|
|
+ from CLD_invoiceReceivables as a left join CLD_invoice as b on
|
|
|
|
+ find_in_set(b.iid,a.iidExtend) or a.iid=b.iid
|
|
|
|
+ where ' . $con . ' group by a.irid
|
|
|
|
+ ';
|
|
|
|
+
|
|
|
|
+ $pageinfo =$this->getPageBySql($sql, $page, $page_size, "invoiceReceivablesAS", $get, "");
|
|
|
|
+
|
|
|
|
+ //print_r($pageinfo);
|
|
|
|
+
|
|
|
|
+ //$pageinfo = $this->get_page ( "CLD_invoiceReceivables", $con, $page, $page_size, "invoiceReceivablesAS", $get, "" );
|
|
$limit = $pageinfo ['lower'] . ',' . $page_size;
|
|
$limit = $pageinfo ['lower'] . ',' . $page_size;
|
|
|
|
|
|
- $list = $invoiceReceivables->getReceivablesByUntreadStatusPage ( $limit, $con, 'desc', $descField );
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ $list = $invoiceReceivables->getInvoiceReceivablesByConditionPage ( $limit, $con, 'desc', $descField );
|
|
// print_r($list);
|
|
// print_r($list);
|
|
|
|
|
|
$this->data ['timeType'] = $timeType;
|
|
$this->data ['timeType'] = $timeType;
|
|
@@ -4383,20 +4428,6 @@ class InvoiceController extends DooController {
|
|
<div class="modal-content"><div class="modal-header"><h3>发票单详情</h3></div>
|
|
<div class="modal-content"><div class="modal-header"><h3>发票单详情</h3></div>
|
|
<div class="modal-body saeaList">
|
|
<div class="modal-body saeaList">
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <table class="table table-bordered table-condensed" style="margin:15px 0;">
|
|
|
|
- <tbody>
|
|
|
|
-
|
|
|
|
- <tr>
|
|
|
|
- <th class="taC" >发票号</th><td><span class="colRed">*</span>No.<input name="invoiceNo" id="invoiceNo" value="" type="text" placeholder="输入发票号" aria-required="true" aria-invalid="true" class="n-invalid">
|
|
|
|
- <span class="red" id="p-msg"></span>
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<table class="table table-bordered table-condensed"><tbody>
|
|
<table class="table table-bordered table-condensed"><tbody>
|
|
<tr>
|
|
<tr>
|
|
<th class="taC" width="150">开票流水号</th><td>' . $detail ['invoiceSerial'] . '</td>
|
|
<th class="taC" width="150">开票流水号</th><td>' . $detail ['invoiceSerial'] . '</td>
|
|
@@ -4455,7 +4486,7 @@ class InvoiceController extends DooController {
|
|
<th class="taC" width="150">邮寄物品</th><td colspan="3">' . $detail ['mailItems'] . '</td>
|
|
<th class="taC" width="150">邮寄物品</th><td colspan="3">' . $detail ['mailItems'] . '</td>
|
|
</tr></tbody></table>';
|
|
</tr></tbody></table>';
|
|
if (! empty ( $invoiceOperationLogList )) {
|
|
if (! empty ( $invoiceOperationLogList )) {
|
|
- $html .= '<table class="table table-bordered table-condensed"><tbody><tr><th width="60%" class="taC">审批流程</th></tr><tr><td>';
|
|
|
|
|
|
+ $html .= '<table class="table table-bordered table-condensed"><tbody><tr><th width="60%" class="taC">审批流程</th><th class="taC">发票打印</th></tr><tr><td>';
|
|
foreach ( $invoiceOperationLogList as $key => $value ) {
|
|
foreach ( $invoiceOperationLogList as $key => $value ) {
|
|
if ($value ['status'] == 1 || $value ['status'] == 2 || $value ['status'] == 3 || $value ['status'] == 4) {
|
|
if ($value ['status'] == 1 || $value ['status'] == 2 || $value ['status'] == 3 || $value ['status'] == 4) {
|
|
$html .= '<blockquote><p><span class="colGray">' . $value ['date'] . '</span>
|
|
$html .= '<blockquote><p><span class="colGray">' . $value ['date'] . '</span>
|
|
@@ -4472,7 +4503,15 @@ class InvoiceController extends DooController {
|
|
$html .= $value ['operation'] . '</p></blockquote>';
|
|
$html .= $value ['operation'] . '</p></blockquote>';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- $html .= '</td></tr></tbody></table>';
|
|
|
|
|
|
+ $html .= '</td>
|
|
|
|
+
|
|
|
|
+ <td><span class="colRed">*</span>No.<input name="invoiceNo" id="invoiceNo" value="" type="text" placeholder="输入发票号" aria-required="true" aria-invalid="true" class="n-invalid">
|
|
|
|
+ <span class="red" id="p-msg"></span>
|
|
|
|
+ </td>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </tr></tbody></table>';
|
|
|
|
+
|
|
}
|
|
}
|
|
$html .= '</div><div class="modal-footer"><button type="submit" class="button btn-green" data-toggle="modal">完成打印</button><a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a></div>
|
|
$html .= '</div><div class="modal-footer"><button type="submit" class="button btn-green" data-toggle="modal">完成打印</button><a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a></div>
|
|
</div></div></form>
|
|
</div></div></form>
|
|
@@ -5658,6 +5697,61 @@ class InvoiceController extends DooController {
|
|
$result = $query->fetch ();
|
|
$result = $query->fetch ();
|
|
return $result ['count'];
|
|
return $result ['count'];
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获得分页数据
|
|
|
|
+ * @param unknown_type $table
|
|
|
|
+ * @param unknown_type $condition
|
|
|
|
+ * @param unknown_type $on_page
|
|
|
|
+ * @param unknown_type $page_size
|
|
|
|
+ */
|
|
|
|
+ function getPageBySql($sql= "", $on_page = 1, $page_size = 20, $action = "", $get = "", $other = "page") {
|
|
|
|
+ $page_c = "";
|
|
|
|
+ $page ['previous'] = $this->get_previous ( $on_page );
|
|
|
|
+ $page ['on_page'] = $on_page;
|
|
|
|
+ $total_count = $this->getTableCountBySql ( $sql );
|
|
|
|
+ $total = intval ( $total_count / $page_size );
|
|
|
|
+
|
|
|
|
+ $page ['total_page'] = ($total_count % $page_size) == 0 ? $total : $total + 1;
|
|
|
|
+ $page ['total_data'] = $total_count;
|
|
|
|
+ $page ['next'] = $on_page == $page ['total_page'] ? $page ['total_page'] : $on_page + 1;
|
|
|
|
+
|
|
|
|
+ $i = 1;
|
|
|
|
+ $page_max = 1;
|
|
|
|
+ $page_width = 3;
|
|
|
|
+
|
|
|
|
+ if ($on_page >= $page_width) {
|
|
|
|
+ $page_max = intval ( $on_page / $page_width ) + 1;
|
|
|
|
+ $i = intval ( $on_page / $page_width ) * $page_width - 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for(; $i <= $page ['total_page']; $i ++) {
|
|
|
|
+ if ($i == $on_page)
|
|
|
|
+ $page_c .= '<li class="active"><a href="javascript:void(0)">' . $i . '</a></li>';
|
|
|
|
+ else
|
|
|
|
+ $page_c .= '<li><a href="/' . $action . '/' . $i . $get . '">' . $i . '</a></li>';
|
|
|
|
+
|
|
|
|
+ if ($i == ($page_width * $page_max))
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $page ['page'] = $page_c;
|
|
|
|
+ $page ['lower'] = (-- $on_page) * $page_size;
|
|
|
|
+ return $page;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获得总页数 sql
|
|
|
|
+ * @param string $type
|
|
|
|
+ * @return boolean[]
|
|
|
|
+ */
|
|
|
|
+ public function getTableCountBySql($sql=""){
|
|
|
|
+ $query = Doo::db ()->query ( $sql );
|
|
|
|
+ $result = $query->fetch ();
|
|
|
|
+ return $result ['count'];
|
|
|
|
+ }
|
|
|
|
+
|
|
function isInvoiceNew($type = "GLOBAL") {
|
|
function isInvoiceNew($type = "GLOBAL") {
|
|
Doo::loadModel ( 'invoice' );
|
|
Doo::loadModel ( 'invoice' );
|
|
$invoice = new invoice ();
|
|
$invoice = new invoice ();
|