Commit b5552d47 by 王昆

dd

parent e49c1810
...@@ -882,15 +882,23 @@ class OorderstatusService extends ServiceBase { ...@@ -882,15 +882,23 @@ class OorderstatusService extends ServiceBase {
} }
if (!params.common_tax_ladder) { if (!params.common_tax_ladder) {
return system.getResult(null, `参数错误 普票个税阶梯不能为空`); return system.getResult(null, `参数错误 普票个税阶梯不能为空`);
}else{
params.common_tax_ladder = this.formatMoney(params.common_tax_ladder);
} }
if (!params.common_other_ladder) { if (!params.common_other_ladder) {
return system.getResult(null, `参数错误 普票增值税、附加税阶梯不能为空`); return system.getResult(null, `参数错误 普票增值税、附加税阶梯不能为空`);
}else{
params.common_other_ladder = this.formatMoney(params.common_other_ladder);
} }
if (!params.special_tax_ladder) { if (!params.special_tax_ladder) {
return system.getResult(null, `参数错误 专票个税阶梯不能为空`); return system.getResult(null, `参数错误 专票个税阶梯不能为空`);
}else{
params.special_tax_ladder=this.formatMoney(params.special_tax_ladder);
} }
if (!params.special_other_ladder) { if (!params.special_other_ladder) {
return system.getResult(null, `参数错误 专票增值税、附加税阶梯不能为空`); return system.getResult(null, `参数错误 专票增值税、附加税阶梯不能为空`);
}else{
params.special_other_ladder=this.formatMoney(params.special_other_ladder);
} }
if (!params.add_value_up_type && this.TAXTYPE.indexOf(Number(params.add_value_up_type)) == -1) { if (!params.add_value_up_type && this.TAXTYPE.indexOf(Number(params.add_value_up_type)) == -1) {
return system.getResult(null, `参数错误 增值税累计类型不能为空`); return system.getResult(null, `参数错误 增值税累计类型不能为空`);
...@@ -926,6 +934,27 @@ class OorderstatusService extends ServiceBase { ...@@ -926,6 +934,27 @@ class OorderstatusService extends ServiceBase {
} }
/** /**
* 接收核定税种中的金额梯度 ,将里面的金额元转分
* @param {*} arr
*/
formatMoney(arr){
if(arr instanceof Array){
//将数组中的金额转换成分 {"minValue":"3000001","maxValue":"500000","rate":"30","quiCalDed":"40500"}
if(arr.length>0){
for (let item of arr) {
item.minValue = system.y2f(item.minValue);
item.maxValue = system.y2f(item.maxValue);
if(item.hasOwnProperty("quiCalDed")){
item.quiCalDed = system.y2f(item.quiCalDed)
}
}
}
}
return arr;
}
/**
* 交付商提交审核 * 交付商提交审核
* @param {*} params * @param {*} params
* @id 订单ID * @id 订单ID
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment