Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
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
bltdc
DataCenter_Core2.1_20190520
Commits
c17b5ba9
Commit
c17b5ba9
authored
Sep 23, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、增加分录明细页面,2、导入paypal收入明细时增加生成分录明细功能
parent
cd61e3b2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
213 additions
and
6 deletions
+213
-6
dc_mid_incoming_paypal.cs
Bailun.DC.Models/dc_mid_incoming_paypal.cs
+12
-0
FinanceReportServices.cs
Bailun.DC.Services/FinanceReportServices.cs
+0
-0
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+63
-6
ListPaypalIncomeAnalyze.cshtml
...reas/Reports/Views/Finance/ListPaypalIncomeAnalyze.cshtml
+135
-0
Main.cshtml
Bailun.DC.Web/Views/Home/Main.cshtml
+3
-0
No files found.
Bailun.DC.Models/dc_mid_incoming_paypal.cs
View file @
c17b5ba9
...
...
@@ -62,4 +62,16 @@ namespace Bailun.DC.Models
public
DateTime
createtime
{
get
;
set
;
}
}
/// <summary>
/// paypal收入统计模版
/// </summary>
public
class
mPaypalIncome
{
public
string
currency
{
get
;
set
;
}
public
decimal
gross
{
get
;
set
;
}
public
string
account
{
get
;
set
;
}
}
}
Bailun.DC.Services/FinanceReportServices.cs
View file @
c17b5ba9
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
c17b5ba9
...
...
@@ -4776,11 +4776,25 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
msg
=
new
Services
.
FinanceReportServices
().
SaveEbayPayPalInfo
(
list
);
}
//return Json(new
//{
// success = string.IsNullOrEmpty(result),
// msg = result
//});
if
(
string
.
IsNullOrEmpty
(
msg
)
&&
list
.
Count
>
0
)
{
var
objPaypal
=
list
.
OrderBy
(
a
=>
a
.
record_time
).
FirstOrDefault
();
if
(
objPaypal
!=
null
)
{
var
firstDay
=
DateTime
.
Parse
(
objPaypal
.
record_time
.
ToString
(
"yyyy-MM"
)
+
"-01"
);
var
r
=
new
Services
.
FinanceReportServices
().
Analyze_PaypalIncoming
(
accountname
,
firstDay
,
firstDay
.
AddMonths
(
1
).
AddDays
(-
1
));
if
(!
string
.
IsNullOrEmpty
(
r
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"保存"
+
file
.
FileName
+
"成功,生成分录信息失败,异常信息:"
+
r
,
});
}
}
}
if
(!
string
.
IsNullOrEmpty
(
msg
))
{
...
...
@@ -4808,7 +4822,50 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
msg
=
""
,
});
}
public
ActionResult
ListPaypalIncomeAnalyze
()
{
return
View
();
}
/// <summary>
/// paypal收入分录记录
/// </summary>
/// <param name="parameter">分页信息</param>
/// <param name="month">月份</param>
/// <param name="account">paypal帐号</param>
/// <returns></returns>
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
public
string
ListPaypalIncomeAnalyzeJson
(
BtTableParameter
parameter
,
string
month
,
string
account
)
{
var
companyid
=
HttpContextHelper
.
Current
?.
User
?.
GetCompanyId
().
ToInt32
();
var
total
=
0
;
var
obj
=
new
Services
.
FinanceReportServices
().
ListPaypalIncoming
(
parameter
,
month
,
account
,
ref
total
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
account_subject
,
amount
=
a
.
amount
.
ToString
(
"N0"
),
a
.
balance_impact
,
createtime
=
a
.
createtime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
a
.
currency
,
a
.
note
,
a
.
paypal_account
,
a
.
platform_bank
,
a
.
receive_account
,
a
.
recordtime
,
});
return
JsonConvert
.
SerializeObject
(
new
{
total
=
total
,
rows
=
list
,
companyid
});
}
#
region
Private
/// <summary>
...
...
Bailun.DC.Web/Areas/Reports/Views/Finance/ListPaypalIncomeAnalyze.cshtml
0 → 100644
View file @
c17b5ba9
@{
ViewData["Title"] = "Paypal收入流水";
Layout = "~/Pages/Shared/_MainLayout.cshtml";
ViewBag.Nav = new string[] { "财务报表", "Paypal分录信息" };
}
<div class="row">
<div class="col-sm-12">
<div class="alert alert-warning">
说明:1、只支持csv文件格式导入。2、导入csv文件时,文件名需要增加帐号信息,如[download.csv],增加帐号后的文件名:[download==dudios.csv]
</div>
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>Paypal帐号:</label>
<select id="account" name="account" class="form-control" style="width:160px;">
<option value="">选择Paypal帐号</option>
</select>
</div>
<div class="form-group">
<label>分录月份</label>
<input id="month" name="month" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM"))" />
</div>
<div class="form-group">
<label> </label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i> 查询</button>
</div>
</div>
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
</div>
</div>
</div>
@section css{
<link href="~/css/bootstrap-table-fixed-columns.css" rel="stylesheet" />
<style>
.mules {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
}
@section scripts{
<script src="~/js/bootstrap-table-fixed-columns.js" type="text/javascript"></script>
<script type="text/javascript">
var tb;
var companyid = 0;
$(document).ready(function () {
laydate.render({ elem: '#month', type: 'month' });
var height = document.body.clientHeight;
$("#roletable").attr("data-height", (height - 170));
list();
listAccount();
})
function list() {
var columns = [
{ field: 'recordtime', title: '月份', width: '100', sortable: true },
{ field: 'paypal_account', title: '帐号', width: '150' },
{ field: 'note', title: '摘要', width: '150'},
{ field: 'account_subject', title: '会计科目', width: '230', iscount: true},
{ field: 'platform_bank', title: '平台|银行', width: '150'},
{ field: 'receive_account', title: '帐号', width: '130' },
{ field: 'currency', title: '币种', width: '80' },
{ field: 'balance_impact', title: '方向', width: '80' },
{ field: 'amount', title: '金额', width: '100' },
{ field: 'createtime', title: '创建时间', width: '130' }
];
var url = '@Url.Content("~/Reports/Finance/ListPaypalIncomeAnalyzeJson")' + '?' + $("#toolbar").serialize();
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", {
showfooter: true, loadsuccess: function (d) {
//替换汇总行的相关列值
var tr = $('.fixed-table-footer').find('tr');
for (var c in columns) {
var key = columns[c].field;
if (columns[c].iscount) {
for (var v in d.count_row) {
if (key == v) {
tr.find('td').eq(c).children('div').first().html(d.count_row[v]);
break;
}
}
}
}
companyid = d.companyid;
}
}, {
fixedcol: true,
fixedcolnum:2
});
}
else {
tb.bootstrapTable('refresh', { url: url });
}
}
function listAccount() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListPaypalAccount")',
type:'POST',
paramData: '',
func: function (result) {
if (result != null && result != undefined) {
$('#account').html('<option value="">选择Paypal帐号</option>');
for (var i = 0; i < result.length; i++) {
$('#account').append('<option value="' + result[i] + '">' + result[i]+'</option>');
}
}
}
})
}
function exportlist() {
if (confirm("确定要导出吗?")) {
window.open('@Url.Content("~/Reports/Orders/ExportEbayOrders")' + '?' + $("#toolbar").serialize(), '_blank');
}
}
</script>
}
Bailun.DC.Web/Views/Home/Main.cshtml
View file @
c17b5ba9
...
...
@@ -375,6 +375,9 @@
<li>
<a
class=
"J_menuItem"
href=
"@Url.Content("
~/
Reports
/
Finance
/
ListEbayIncome
")"
data-index=
"0"
>
Paypal收入流水
</a>
</li>
<li>
<a
class=
"J_menuItem"
href=
"@Url.Content("
~/
Reports
/
Finance
/
ListPaypalIncomeAnalyze
")"
data-index=
"0"
>
Paypal分录信息
</a>
</li>
</ul>
</li>
<li>
...
...
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