|
@@ -33,6 +33,7 @@ class invoiceReceivables extends DooModel {
|
|
public $unbundlingTime;
|
|
public $unbundlingTime;
|
|
public $accountClerk;
|
|
public $accountClerk;
|
|
public $sourcePrice;
|
|
public $sourcePrice;
|
|
|
|
+ public $bankBatchNumber;
|
|
public $_table = 'CLD_invoiceReceivables';
|
|
public $_table = 'CLD_invoiceReceivables';
|
|
public $_primarykey = 'irid';
|
|
public $_primarykey = 'irid';
|
|
public $_fields = array (
|
|
public $_fields = array (
|
|
@@ -59,7 +60,8 @@ class invoiceReceivables extends DooModel {
|
|
'bindDate',
|
|
'bindDate',
|
|
'unbundlingTime',
|
|
'unbundlingTime',
|
|
'accountClerk',
|
|
'accountClerk',
|
|
- 'sourcePrice'
|
|
|
|
|
|
+ 'sourcePrice',
|
|
|
|
+ 'bankBatchNumber'
|
|
);
|
|
);
|
|
public function getSumOfReceivablesPrice($iridString = "") {
|
|
public function getSumOfReceivablesPrice($iridString = "") {
|
|
if (empty ( $iridString ))
|
|
if (empty ( $iridString ))
|
|
@@ -102,19 +104,35 @@ class invoiceReceivables extends DooModel {
|
|
}
|
|
}
|
|
return $list;
|
|
return $list;
|
|
}
|
|
}
|
|
|
|
+ public function getInvoiceReceivablesByBBN($bankBatchNumber = "") {
|
|
|
|
+ if (empty ( $bankBatchNumber ))
|
|
|
|
+ return array ();
|
|
|
|
+ $list = $this->find ( array (
|
|
|
|
+ 'where' => "bankBatchNumber= '".$bankBatchNumber."'",
|
|
|
|
+ 'asArray' => TRUE
|
|
|
|
+ ) );
|
|
|
|
+ return $list;
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获得最近录入发票,不包含已经绑定的
|
|
* 获得最近录入发票,不包含已经绑定的
|
|
*/
|
|
*/
|
|
public function getInvoiceReceivablesByInput() {
|
|
public function getInvoiceReceivablesByInput() {
|
|
|
|
+
|
|
|
|
+ Doo::loadClass ( 'XDeode' );
|
|
|
|
+ $XDeode = new XDeode ( 5 );
|
|
|
|
+
|
|
$list = $this->find ( array (
|
|
$list = $this->find ( array (
|
|
- 'where' => "bindStatus=0",
|
|
|
|
|
|
+ 'where' => "bindStatus=0 and iid=0",
|
|
'desc' => 'irid',
|
|
'desc' => 'irid',
|
|
'asArray' => TRUE
|
|
'asArray' => TRUE
|
|
) );
|
|
) );
|
|
|
|
|
|
foreach ( $list as $key => $value ) {
|
|
foreach ( $list as $key => $value ) {
|
|
- $list [$key] ['receivablesCategory'] = explode ( ':', $value ['receivablesCategory'] );
|
|
|
|
|
|
+ if ($value ['receivablesCategory'] != 'PUBLIC')
|
|
|
|
+ $list [$key] ['receivablesCategory'] = explode ( ':', $value ['receivablesCategory'] );
|
|
|
|
+
|
|
|
|
+ $list [$key]['iridKeyXD'] = $XDeode->encode ( $value ['irid'] );
|
|
|
|
|
|
if ($value ['receivablesStaff'] != 'PUBLIC')
|
|
if ($value ['receivablesStaff'] != 'PUBLIC')
|
|
$list [$key] ['receivablesStaff'] = explode ( '-', $value ['receivablesStaff'] );
|
|
$list [$key] ['receivablesStaff'] = explode ( '-', $value ['receivablesStaff'] );
|
|
@@ -137,7 +155,7 @@ class invoiceReceivables extends DooModel {
|
|
$query = Doo::db ()->query ( $sql );
|
|
$query = Doo::db ()->query ( $sql );
|
|
$list = $query->fetchAll ();
|
|
$list = $query->fetchAll ();
|
|
|
|
|
|
- if (empty($list))
|
|
|
|
|
|
+ if (empty ( $list ))
|
|
return array ();
|
|
return array ();
|
|
if ($list [0] ['irid'] == NULL) {
|
|
if ($list [0] ['irid'] == NULL) {
|
|
return array ();
|
|
return array ();
|
|
@@ -160,7 +178,6 @@ class invoiceReceivables extends DooModel {
|
|
return $list;
|
|
return $list;
|
|
}
|
|
}
|
|
public function getInvoiceReceivablesByClaim($cid = 0, $sid = 0) {
|
|
public function getInvoiceReceivablesByClaim($cid = 0, $sid = 0) {
|
|
-
|
|
|
|
Doo::loadClass ( 'XDeode' );
|
|
Doo::loadClass ( 'XDeode' );
|
|
$XDeode = new XDeode ( 5 );
|
|
$XDeode = new XDeode ( 5 );
|
|
|
|
|
|
@@ -196,7 +213,7 @@ class invoiceReceivables extends DooModel {
|
|
$staff = explode ( "-", $value ['receivablesStaff'] );
|
|
$staff = explode ( "-", $value ['receivablesStaff'] );
|
|
$list ['arClaim'] [$key] ['sid'] = $staff [0];
|
|
$list ['arClaim'] [$key] ['sid'] = $staff [0];
|
|
$list ['arClaim'] [$key] ['username'] = $staff [1];
|
|
$list ['arClaim'] [$key] ['username'] = $staff [1];
|
|
- $list ['arClaim'] [$key]['iridKey']=$XDeode->encode ( $value ['irid'] );
|
|
|
|
|
|
+ $list ['arClaim'] [$key] ['iridKey'] = $XDeode->encode ( $value ['irid'] );
|
|
}
|
|
}
|
|
|
|
|
|
$list ['myClaim'] = $this->find ( array (
|
|
$list ['myClaim'] = $this->find ( array (
|
|
@@ -405,7 +422,6 @@ class invoiceReceivables extends DooModel {
|
|
}
|
|
}
|
|
return $list;
|
|
return $list;
|
|
}
|
|
}
|
|
-
|
|
|
|
function getInvoiceReceivablesByConditionPage($limit = 0, $con = "", $desc = 'desc', $descField = 'irid') {
|
|
function getInvoiceReceivablesByConditionPage($limit = 0, $con = "", $desc = 'desc', $descField = 'irid') {
|
|
if (empty ( $limit ))
|
|
if (empty ( $limit ))
|
|
return array ();
|
|
return array ();
|
|
@@ -413,9 +429,9 @@ class invoiceReceivables extends DooModel {
|
|
$sql = 'select group_concat(b.invoiceSerial) as invoiceSerial ,group_concat(b.iid) as invoiceId ,a.*,b.invoicePrice
|
|
$sql = 'select group_concat(b.invoiceSerial) as invoiceSerial ,group_concat(b.iid) as invoiceId ,a.*,b.invoicePrice
|
|
from ' . $this->_table . ' as a left join CLD_invoice as b on
|
|
from ' . $this->_table . ' as a left join CLD_invoice as b on
|
|
find_in_set(b.iid,a.iidExtend) or a.iid=b.iid
|
|
find_in_set(b.iid,a.iidExtend) or a.iid=b.iid
|
|
- where ' . $con . ' group by a.irid ORDER BY ' . $descField . ' '.$desc.' limit ' . $limit . '
|
|
|
|
|
|
+ where ' . $con . ' group by a.irid ORDER BY ' . $descField . ' ' . $desc . ' limit ' . $limit . '
|
|
';
|
|
';
|
|
-
|
|
|
|
|
|
+
|
|
$query = Doo::db ()->query ( $sql );
|
|
$query = Doo::db ()->query ( $sql );
|
|
$list = $query->fetchAll ();
|
|
$list = $query->fetchAll ();
|
|
|
|
|
|
@@ -428,11 +444,11 @@ class invoiceReceivables extends DooModel {
|
|
|
|
|
|
$invoiceSerial = explode ( ',', $value ['invoiceSerial'] );
|
|
$invoiceSerial = explode ( ',', $value ['invoiceSerial'] );
|
|
$invoiceId = explode ( ",", $value ['invoiceId'] );
|
|
$invoiceId = explode ( ",", $value ['invoiceId'] );
|
|
- if (empty($invoiceSerial[0]))
|
|
|
|
- $list [$key] ['invoiceList'] =array();
|
|
|
|
- else{
|
|
|
|
|
|
+ if (empty ( $invoiceSerial [0] ))
|
|
|
|
+ $list [$key] ['invoiceList'] = array ();
|
|
|
|
+ else {
|
|
foreach ( $invoiceId as $k => $v ) {
|
|
foreach ( $invoiceId as $k => $v ) {
|
|
- if (!empty($v))
|
|
|
|
|
|
+ if (! empty ( $v ))
|
|
$invoiceId [$k] = $XDeode->encode ( $v );
|
|
$invoiceId [$k] = $XDeode->encode ( $v );
|
|
}
|
|
}
|
|
$list [$key] ['invoiceList'] = array_combine ( $invoiceId, $invoiceSerial );
|
|
$list [$key] ['invoiceList'] = array_combine ( $invoiceId, $invoiceSerial );
|
|
@@ -440,14 +456,13 @@ class invoiceReceivables extends DooModel {
|
|
|
|
|
|
$list [$key] ['iridKeyK'] = $XDeode->encode ( $value ['irid'] );
|
|
$list [$key] ['iridKeyK'] = $XDeode->encode ( $value ['irid'] );
|
|
$list [$key] ['iridKey'] = $this->authcode ( $value ['irid'], '' );
|
|
$list [$key] ['iridKey'] = $this->authcode ( $value ['irid'], '' );
|
|
-
|
|
|
|
|
|
+
|
|
$list [$key] ['irolg'] = $invoiceROLog->getInvoiceROLogByIrid ( $value ['irid'], 'desc' );
|
|
$list [$key] ['irolg'] = $invoiceROLog->getInvoiceROLogByIrid ( $value ['irid'], 'desc' );
|
|
}
|
|
}
|
|
- //print_r($list);
|
|
|
|
|
|
+ // print_r($list);
|
|
|
|
|
|
return $list;
|
|
return $list;
|
|
}
|
|
}
|
|
-
|
|
|
|
function getReceivablesByUntreadStatusPage($limit = 0, $con = "", $desc = 'desc', $descField = 'irid') {
|
|
function getReceivablesByUntreadStatusPage($limit = 0, $con = "", $desc = 'desc', $descField = 'irid') {
|
|
if (empty ( $limit ))
|
|
if (empty ( $limit ))
|
|
return array ();
|
|
return array ();
|