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
c7c4c660
Commit
c7c4c660
authored
Jun 07, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
财务修改日志
parent
1d0d2497
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
17 deletions
+45
-17
Finance.php
application/index/controller/Finance.php
+45
-17
No files found.
application/index/controller/Finance.php
View file @
c7c4c660
...
...
@@ -695,6 +695,10 @@ class Finance extends Basic
$update_arr
[
$i
][
'confirm_status'
]
=
1
;
}
$i
++
;
$log_data
[]
=
"[分佣比例(%):
{
$item
[
'scale'
]
}
][应分佣金(元):
{
$item
[
'should_commission'
]
}
][实分佣金(元):
{
$item
[
'real_fee'
]
}
]"
.
"[手续费(元):
{
$item
[
'service_charge'
]
}
][慈善基金(元):
{
$item
[
'charity_fund'
]
}
]"
.
"[现金奖(元):
{
$item
[
'cash'
]
}
][实收佣金(元):
{
$item
[
'practical_fee'
]
}
]"
;
}
else
{
$add_arr
[
$j
][
'bargain_id'
]
=
$this
->
params
[
'bargain_id'
];
$add_arr
[
$j
][
'practical_fee'
]
=
$item
[
'practical_fee'
];
...
...
@@ -722,6 +726,8 @@ class Finance extends Basic
if
(
$i
>
0
)
{
$m_partial
->
addCommission
(
$update_arr
);
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
implode
(
','
,
$log_data
));
//log记录
}
if
(
$j
==
0
&&
$this
->
params
[
'is_account_commission'
]
>
0
){
//没有新增数据,则把最后一条数据的分佣比例和应分佣金改掉
...
...
@@ -808,21 +814,25 @@ class Finance extends Basic
$m_fee
=
new
OTaxes
();
$m_fee
->
editData
(
$insert_data
,
$this
->
params
[
'id'
]);
//开票新增和编辑
$father_id
=
0
;
if
(
$this
->
params
[
'id'
]
&&
$this
->
params
[
'id'
]
>
0
)
{
//编辑
$father_id
=
$this
->
params
[
'id'
];
}
else
{
$father_id
=
$m_fee
->
id
;
}
$m_agent
=
new
AAgents
();
$log_data
=
[];
foreach
(
$tax
as
$k
=>
$v
)
{
$tax
[
$k
][
'agent_name'
]
=
$m_agent
->
getAgentsById
(
$v
[
'agent_id'
],
'name'
);
$log_data
[]
=
'[经纪人:id:'
.
$v
[
'agent_id'
]
.
',名字:'
.
$tax
[
$k
][
'agent_name'
]
.
',税费:'
.
$v
[
'fee'
]
.
']'
;
}
if
(
$this
->
params
[
'id'
]
&&
$this
->
params
[
'id'
]
>
0
)
{
//编辑
$father_id
=
$this
->
params
[
'id'
];
}
else
{
$father_id
=
$m_fee
->
id
;
}
$data
=
$m_fee
->
addTaxes
(
$tax
,
$bargain_id
,
$this
->
userId
,
$father_id
,
$this
->
params
[
'total_fee'
],
$operation_date
);
$log_data_string
=
implode
(
','
,
$log_data
);
$content
=
"[开票金额:
{
$this
->
params
[
'total_fee'
]
}
][开票日期:
{
$operation_date
}
][
{
$log_data_string
}
]"
;
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
$content
);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
...
...
@@ -1149,6 +1159,7 @@ class Finance extends Basic
$msg
=
''
;
if
(
$data
>
0
)
{
$code
=
200
;
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
'[转到一级审核]'
,
3
);
//日志记录
}
else
{
$code
=
101
;
$msg
=
'操作失败!'
;
...
...
@@ -1181,7 +1192,9 @@ class Finance extends Basic
$code
=
200
;
$msg
=
""
;
if
(
!
$data
)
{
if
(
$data
)
{
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
'[财务结单]'
,
3
);
//日志记录
}
else
{
$code
=
101
;
$msg
=
'参数错误结单失败!'
;
}
...
...
@@ -1258,14 +1271,29 @@ class Finance extends Basic
*/
public
function
editRecordLog
(
int
$bargain_id
,
string
$step_content
=
''
,
int
$type
=
1
,
string
$house_number
=
''
,
int
$is_open
=
0
)
{
$insert_data
[
0
][
'bargain_id'
]
=
$bargain_id
;
$insert_data
[
0
][
'step_content'
]
=
$step_content
;
$insert_data
[
0
][
'type'
]
=
$type
;
$insert_data
[
0
][
'operation_id'
]
=
$this
->
userId
;
$insert_data
[
0
][
'operation_name'
]
=
$this
->
userName
;
$insert_data
[
0
][
'house_number'
]
=
$house_number
;
$insert_data
[
0
][
'is_open'
]
=
$is_open
;
$insert_data
[
0
][
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
if
(
is_array
(
$step_content
))
{
foreach
(
$step_content
as
$k
=>
$v
)
{
$insert_data
[
$k
][
'bargain_id'
]
=
$bargain_id
;
$insert_data
[
$k
][
'step_content'
]
=
$step_content
;
$insert_data
[
$k
][
'type'
]
=
$type
;
$insert_data
[
$k
][
'operation_id'
]
=
$this
->
userId
;
$insert_data
[
$k
][
'operation_name'
]
=
$this
->
userName
;
$insert_data
[
$k
][
'house_number'
]
=
$house_number
;
$insert_data
[
$k
][
'is_open'
]
=
$is_open
;
$insert_data
[
$k
][
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
}
}
else
{
$insert_data
[
0
][
'bargain_id'
]
=
$bargain_id
;
$insert_data
[
0
][
'step_content'
]
=
$step_content
;
$insert_data
[
0
][
'type'
]
=
$type
;
$insert_data
[
0
][
'operation_id'
]
=
$this
->
userId
;
$insert_data
[
0
][
'operation_name'
]
=
$this
->
userName
;
$insert_data
[
0
][
'house_number'
]
=
$house_number
;
$insert_data
[
0
][
'is_open'
]
=
$is_open
;
$insert_data
[
0
][
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
}
$m_bargain
=
new
OBargainLogModel
();
return
$m_bargain
->
addLog
(
$insert_data
);
}
...
...
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