Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
7709f748
Commit
7709f748
authored
May 17, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计是否开业
parent
4ec8cd17
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
Finance.php
application/index/controller/Finance.php
+6
-7
ORefundModel.php
application/model/ORefundModel.php
+0
-1
No files found.
application/index/controller/Finance.php
View file @
7709f748
...
@@ -994,9 +994,9 @@ class Finance extends Basic
...
@@ -994,9 +994,9 @@ class Finance extends Basic
//案场费和中介费是否开业
//案场费和中介费是否开业
if
(
isset
(
$this
->
params
[
'is_open'
]))
{
if
(
isset
(
$this
->
params
[
'is_open'
]))
{
if
(
$this
->
params
[
'is_open'
]
==
1
)
{
if
(
$this
->
params
[
'is_open'
]
==
1
)
{
$where
[
'
f
.is_open'
]
=
1
;
$where
[
'
d
.is_open'
]
=
1
;
}
else
{
}
else
{
$where
[
'
f
.is_open'
]
=
0
;
$where
[
'
d
.is_open'
]
=
0
;
}
}
if
(
!
isset
(
$where
[
'a.type'
]))
{
if
(
!
isset
(
$where
[
'a.type'
]))
{
...
@@ -4303,7 +4303,7 @@ class Finance extends Basic
...
@@ -4303,7 +4303,7 @@ class Finance extends Basic
$data
[
'intention_refund'
]
+=
$this
->
sumPayLogRefundByType
(
1
,
0
,
0
,
$where
);
//意向金退款
$data
[
'intention_refund'
]
+=
$this
->
sumPayLogRefundByType
(
1
,
0
,
0
,
$where
);
//意向金退款
$data
[
'intention_refund'
]
=
round
(
$data
[
'intention_refund'
],
2
);
$data
[
'intention_refund'
]
=
round
(
$data
[
'intention_refund'
],
2
);
//意向金入账-意向金调整-意向金退款
//意向金入账-意向金调整-意向金退款
$data
[
'total_intention_recorded'
]
=
$data
[
'intention_recorded'
]
-
$data
[
'intention_adjustment'
]
-
$data
[
'intention_refund'
]
;
//账上意向金
$data
[
'total_intention_recorded'
]
=
sprintf
(
"%.2f"
,
$data
[
'intention_recorded'
]
-
$data
[
'intention_adjustment'
]
-
$data
[
'intention_refund'
])
;
//账上意向金
$data
[
'custody_recorded'
]
=
$this
->
sumPayLogPriceByType
(
30
,
0
,
$where
);
//保管金入账
$data
[
'custody_recorded'
]
=
$this
->
sumPayLogPriceByType
(
30
,
0
,
$where
);
//保管金入账
$agent_fee
=
$this
->
sumPayLogPriceByType
(
4
,
1
,
$where
);
//保管金转中介费
$agent_fee
=
$this
->
sumPayLogPriceByType
(
4
,
1
,
$where
);
//保管金转中介费
...
@@ -4339,7 +4339,7 @@ class Finance extends Basic
...
@@ -4339,7 +4339,7 @@ class Finance extends Basic
if
(
isset
(
$params
[
'create_time'
]))
{
if
(
isset
(
$params
[
'create_time'
]))
{
$where
[
'a.create_time'
]
=
$params
[
'create_time'
];
$where
[
'a.create_time'
]
=
$params
[
'create_time'
];
}
}
$where
[
'
b
.is_open'
]
=
$is_open
;
$where
[
'
a
.is_open'
]
=
$is_open
;
$where
[
'a.type'
]
=
$type
;
$where
[
'a.type'
]
=
$type
;
$where
[
'b.status'
]
=
[
'<>'
,
'30'
];
$where
[
'b.status'
]
=
[
'<>'
,
'30'
];
$where
[
'b.father_id'
]
=
$where
[
'a.is_del'
]
=
0
;
$where
[
'b.father_id'
]
=
$where
[
'a.is_del'
]
=
0
;
...
@@ -4368,10 +4368,9 @@ class Finance extends Basic
...
@@ -4368,10 +4368,9 @@ class Finance extends Basic
}
}
if
(
$is_bargain
)
{
if
(
$is_bargain
)
{
$where
[
'
c
.is_open'
]
=
$is_open
;
$where
[
'
b
.is_open'
]
=
$is_open
;
$where
[
'a.type'
]
=
$type
;
$where
[
'a.type'
]
=
$type
;
$where
[
'c.status'
]
=
[
'<>'
,
'30'
];
$where
[
'a.is_del'
]
=
0
;
$where
[
'c.father_id'
]
=
$where
[
'a.is_del'
]
=
0
;
$where
[
'a.status'
]
=
[
'<>'
,
4
];
$where
[
'a.status'
]
=
[
'<>'
,
4
];
$price
=
$m_pay
->
sumBargainPrice
(
'a.refund_money'
,
$where
);
//未开业中介费
$price
=
$m_pay
->
sumBargainPrice
(
'a.refund_money'
,
$where
);
//未开业中介费
}
else
{
}
else
{
...
...
application/model/ORefundModel.php
View file @
7709f748
...
@@ -337,7 +337,6 @@ class ORefundModel extends Model{
...
@@ -337,7 +337,6 @@ class ORefundModel extends Model{
public
function
sumBargainPrice
(
$field
,
$where
)
{
public
function
sumBargainPrice
(
$field
,
$where
)
{
return
$this
->
db_
->
alias
(
'a'
)
return
$this
->
db_
->
alias
(
'a'
)
->
join
(
'o_paylog b'
,
'a.pay_log_id=b.id'
,
'left'
)
->
join
(
'o_paylog b'
,
'a.pay_log_id=b.id'
,
'left'
)
->
join
(
'o_bargain c'
,
'b.bargain_id=c.id'
,
'left'
)
->
where
(
$where
)
->
where
(
$where
)
->
sum
(
$field
);
->
sum
(
$field
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment