|
@@ -80,11 +80,6 @@ class InvoiceController extends DooController {
|
|
|
Doo::loadModel ( 'invoice' );
|
|
|
$invoice = new invoice ();
|
|
|
|
|
|
-// Doo::loadModel ( 'express' );
|
|
|
-// $express = new express ();
|
|
|
-// $expressList = $express->getExpressByAll ();
|
|
|
-// $this->data ['expressList'] = $expressList;
|
|
|
-
|
|
|
// Doo::loadModel ( 'invoiceReceivables' );
|
|
|
// $invoiceReceivables = new invoiceReceivables ();
|
|
|
// $list = $invoiceReceivables->getInvoiceReceivablesByClaim ( $this->staff [0] ['cid'], $this->staff [0] ['sid'] );
|
|
@@ -110,14 +105,19 @@ class InvoiceController extends DooController {
|
|
|
|
|
|
$sql = 'status=2 and printStatus=1 and irid!="" and sid=' . $sid;
|
|
|
$list = $invoice->getInvoiceByUntreadStatusPage ( 4, $sql );
|
|
|
+ //我的待入账发票
|
|
|
+ $sql = "status=2 and printStatus=1 and untreadStatus=0 and irid='' and ( (doPost=1 and postStatus=1) or doPost=0 ) and isDelete=0 and sid=" . $sid;
|
|
|
+ $myInvoiceUnAccount = $invoice->getInvoiceByUntreadStatusPage ( 4, $sql );
|
|
|
|
|
|
- // print_r($list);
|
|
|
+
|
|
|
+ //print_r($myInvoiceUnAccount);
|
|
|
|
|
|
$this->data ['isMonth'] = $isMonth;
|
|
|
$this->data ['htm'] = $htm;
|
|
|
|
|
|
$this->data ['invoiceList'] = $invoiceList;
|
|
|
$this->data ['receivablesList'] = $list;
|
|
|
+ $this->data ['myInvoiceUnAccount'] = $myInvoiceUnAccount;
|
|
|
|
|
|
$this->data ['memu'] = "invoice";
|
|
|
$this->data ['staff'] = $this->staff;
|
|
@@ -1078,7 +1078,7 @@ class InvoiceController extends DooController {
|
|
|
);
|
|
|
$invoice->setInvoiceByCondition ( $item );
|
|
|
|
|
|
- $this->setWXMsg ( $iid );
|
|
|
+ //$this->setWXMsg ( $iid );
|
|
|
|
|
|
return '/invoicePost';
|
|
|
}
|
|
@@ -2252,6 +2252,55 @@ class InvoiceController extends DooController {
|
|
|
$this->data ['receiptMemu'] = 'invoice';
|
|
|
$this->render ( "/admin/invoiceAchieve", $this->data );
|
|
|
}
|
|
|
+
|
|
|
+ function invoiceMyUnAccountAchieve() {
|
|
|
+ Doo::loadModel ( 'invoice' );
|
|
|
+ $invoice = new invoice ();
|
|
|
+ Doo::loadClass ( 'XDeode' );
|
|
|
+ $XDeode = new XDeode ( 5 );
|
|
|
+ $sid = $XDeode->decode ( $_COOKIE ["staff"] );
|
|
|
+ $MebSea = isset ( $this->params ['MebSea'] ) ? urldecode ( $this->params ['MebSea'] ) : '';
|
|
|
+
|
|
|
+ $page_size = 18;
|
|
|
+ $page = isset ( $this->params ['page'] ) && is_numeric ( $this->params ['page'] ) ? $this->params ['page'] : 1;
|
|
|
+ $date = isset ( $this->params ['date'] ) ? $this->params ['date'] : 'MONTHO';
|
|
|
+
|
|
|
+ $get = "/" . $date;
|
|
|
+
|
|
|
+ $con = '';
|
|
|
+ if ($date == 'MONTHO')
|
|
|
+ $con = ' and updateTime>DATE_SUB(CURDATE(), INTERVAL 1 MONTH)';
|
|
|
+ elseif ($date == 'MONTHT')
|
|
|
+ $con = ' and updateTime>DATE_SUB(CURDATE(), INTERVAL 3 MONTH)';
|
|
|
+ elseif ($date == 'MONTHY')
|
|
|
+ $con = ' and updateTime>DATE_SUB(CURDATE(), INTERVAL 1 YEAR)';
|
|
|
+
|
|
|
+ if (! empty ( $MebSea )) {
|
|
|
+ $con .= ' and ( invoiceTitle like "%' . $MebSea . '%" or invoiceCompany like "%' . $MebSea . '%" or invoicePrice like "%' . $MebSea . '%" )';
|
|
|
+ $get .= "/" . $MebSea;
|
|
|
+ }
|
|
|
+ $pageinfo ['page'] = array (
|
|
|
+ 'previous' => ''
|
|
|
+ );
|
|
|
+ $sql = 'status=2 and untreadStatus=3 and sid=' . $sid . $con;
|
|
|
+ $pageinfo = $this->get_page ( "CLD_invoice", $sql, $page, $page_size, "invoiceAchieve", $get, "" );
|
|
|
+
|
|
|
+ $limit = $pageinfo ['lower'] . ',' . $page_size;
|
|
|
+
|
|
|
+ $list = $invoice->getInvoiceByUntreadStatusPage ( $limit, $sql );
|
|
|
+ // print_r($pageinfo);
|
|
|
+ $this->data ['MebSeaEn'] = $MebSea;
|
|
|
+ $this->data ['MebSea'] = urlencode ( $MebSea );
|
|
|
+ $this->data ['get'] = $get;
|
|
|
+ $this->data ['page'] = $pageinfo;
|
|
|
+ $this->data ['list'] = $list;
|
|
|
+ $this->data ['date'] = $date;
|
|
|
+ $this->data ['memu'] = "invoice";
|
|
|
+ $this->data ['staff'] = $this->staff;
|
|
|
+ $this->data ['receiptMemu'] = 'invoice';
|
|
|
+ $this->render ( "/admin/invoiceAchieve", $this->data );
|
|
|
+ }
|
|
|
+
|
|
|
function invoiceReceivablesAchieve() {
|
|
|
Doo::loadModel ( 'invoiceReceivables' );
|
|
|
$invoiceReceivables = new invoiceReceivables ();
|