Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
914cf751
Commit
914cf751
authored
Apr 10, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
86c7289c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
23 deletions
+19
-23
xgg-admin/app/base/controller/impl/invoice/invoiceCtl.js
+14
-12
xgg-admin/app/base/service/impl/business/businessmenSve.js
+2
-8
xgg-admin/app/base/service/impl/invoice/invoiceSve.js
+3
-3
No files found.
xgg-admin/app/base/controller/impl/invoice/invoiceCtl.js
View file @
914cf751
...
@@ -124,6 +124,19 @@ class InvoiceCtl extends CtlBase {
...
@@ -124,6 +124,19 @@ class InvoiceCtl extends CtlBase {
return
res
;
return
res
;
}
}
/**
* 发票试算接口
* @param {*} pobj
*/
async
calcInvoice
(
pobj
)
{
try
{
return
await
this
.
invoiceSve
.
calcInvoice
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResultFail
(
500
,
`接口错误 错误信息
${
error
}
`
);
}
}
// /**
// /**
// * 申请发票校验
// * 申请发票校验
// * @param {*} pobj
// * @param {*} pobj
...
@@ -175,18 +188,7 @@ class InvoiceCtl extends CtlBase {
...
@@ -175,18 +188,7 @@ class InvoiceCtl extends CtlBase {
// }
// }
// }
// }
/**
* 发票试算接口
* @param {*} pobj
*/
async
calcInvoice
(
pobj
)
{
try
{
return
await
this
.
invoiceSve
.
calcInvoice
(
pobj
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResultFail
(
500
,
`接口错误 错误信息
${
error
}
`
);
}
}
// /**
// /**
// * 计算发票增值税
// * 计算发票增值税
...
...
xgg-admin/app/base/service/impl/business/businessmenSve.js
View file @
914cf751
...
@@ -174,10 +174,4 @@ class BusinessmenService extends ServiceBase {
...
@@ -174,10 +174,4 @@ class BusinessmenService extends ServiceBase {
}
}
}
}
module
.
exports
=
BusinessmenService
;
module
.
exports
=
BusinessmenService
;
// var task=new UserService();
\ No newline at end of file
// task.getUserStatisticGroupByApp().then(function(result){
// console.log((result));
// }).catch(function(e){
// console.log(e);
// });
\ No newline at end of file
xgg-admin/app/base/service/impl/invoice/invoiceSve.js
View file @
914cf751
...
@@ -307,11 +307,11 @@ class InvoiceService extends ServiceBase {
...
@@ -307,11 +307,11 @@ class InvoiceService extends ServiceBase {
}
}
let
additional_tax_total
=
invoiceRes
.
data
.
addValueRes
.
additional_tax_total
,
//附加税累计总和
let
additional_tax_total
=
invoiceRes
.
data
.
addValueRes
.
additional_tax_total
,
//附加税累计总和
value_added_tax_total
=
invoiceRes
.
data
.
addValueRes
.
value_added_tax_total
,
//增值税累计总和
value_added_tax_total
=
invoiceRes
.
data
.
addValueRes
.
value_added_tax_total
,
//增值税累计总和
invoice_amount_total
=
new
Decimal
(
invoiceRes
.
data
.
addValueRes
.
invoice_amount_total
).
plus
(
params
.
invoice_amount
);
//增值税累计价税总和 (计算不对)
invoice_amount_total
=
new
Decimal
(
invoiceRes
.
data
.
addValueRes
.
invoice_amount_total
).
plus
(
params
.
invoice_amount
)
.
toNumber
()
;
//增值税累计价税总和 (计算不对)
let
personal_invoice_tax_total
=
invoiceRes
.
data
.
taxValueRes
.
personal_invoice_tax_total
;
//个税累计总和
let
personal_invoice_tax_total
=
invoiceRes
.
data
.
taxValueRes
.
personal_invoice_tax_total
;
//个税累计总和
let
personal_invoice_amount_total
=
new
Decimal
(
invoiceRes
.
data
.
taxValueRes
.
personal_invoice_amount_total
).
plus
(
params
.
invoice_amount
);
//个税价税累计总和 (计算不对)
let
personal_invoice_amount_total
=
new
Decimal
(
invoiceRes
.
data
.
taxValueRes
.
personal_invoice_amount_total
).
plus
(
params
.
invoice_amount
)
.
toNumber
()
;
//个税价税累计总和 (计算不对)
//**********************************************************一下是计算个税********************************************************************************************** */
//**********************************************************一下是计算个税********************************************************************************************** */
...
@@ -348,7 +348,7 @@ class InvoiceService extends ServiceBase {
...
@@ -348,7 +348,7 @@ class InvoiceService extends ServiceBase {
value_added_tax
=
system
.
f2y
(
value_added_tax
);
value_added_tax
=
system
.
f2y
(
value_added_tax
);
additional_tax
=
system
.
f2y
(
additional_tax
);
additional_tax
=
system
.
f2y
(
additional_tax
);
service_amount
=
system
.
f2y
(
service_amount
);
service_amount
=
system
.
f2y
(
service_amount
);
return
system
.
getResult
(
personal_invoice_tax
,
value_added_tax
,
additional_tax
,
service_amount
);
return
system
.
getResult
(
{
personal_invoice_tax
,
value_added_tax
,
additional_tax
,
service_amount
}
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
return
system
.
getResult
(
null
,
`系统错误`
);
...
...
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