2312收款单外币本币计算调整-张鑫0417

This commit is contained in:
zhangxinah@yonyou.com 2025-04-17 18:39:31 +08:00
parent 74484103f1
commit ce99f9aeb1
1 changed files with 11 additions and 6 deletions

View File

@ -138,7 +138,7 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
Object tr = dao.executeQuery( Object tr = dao.executeQuery(
"select ntaxrate from so_saleorder_b where csaleorderid = '" + csaleorderid + "'", "select ntaxrate from so_saleorder_b where csaleorderid = '" + csaleorderid + "'",
new ColumnProcessor()); new ColumnProcessor());
ntaxrate = new UFDouble(tr.toString()); //ntaxrate = new UFDouble(tr.toString());
// 税码 // 税码
Object ctaxcodeid = hybo.findColValue("so_saleorder_b", "ctaxcodeid", Object ctaxcodeid = hybo.findColValue("so_saleorder_b", "ctaxcodeid",
"csaleorderid = '" + csaleorderid + "' "); "csaleorderid = '" + csaleorderid + "' ");
@ -240,8 +240,12 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
itemvo.setNotax_cr(notax_cr); itemvo.setNotax_cr(notax_cr);
// zhangxinah增加组织本币无税金额(贷方) // zhangxinah增加组织本币无税金额(贷方)
itemvo.setLocal_notax_cr(notax_cr); itemvo.setLocal_notax_cr(notax_cr);
// // 汇率为空时默认为1
itemvo.setRate(UFDouble.ZERO_DBL); if (headvo.getRate() == null) {
itemvo.setRate(UFDouble.ONE_DBL);
} else {
itemvo.setRate(headvo.getRate());
}
// //
itemvo.setTaxcodeid(ctaxcode); itemvo.setTaxcodeid(ctaxcode);
// //
@ -249,7 +253,8 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
// 收支项目 // 收支项目
itemvo.setPk_subjcode("201"); itemvo.setPk_subjcode("201");
money = money.add(itemvo.getMoney_cr()); money = money.add(itemvo.getMoney_cr());
itemvo.setLocal_money_cr(itemvo.getMoney_cr()); itemvo.setLocal_money_cr(
itemvo.getMoney_cr().multiply(itemvo.getRate()).setScale(2, UFDouble.ROUND_HALF_UP));
Object def2 = itemvo.getDef2(); Object def2 = itemvo.getDef2();
if (def2 != null) if (def2 != null)
itemvo.setDef2(hybo.findColValue("bd_defdoc", "pk_defdoc", " code = '" + def2 + "' ") + ""); itemvo.setDef2(hybo.findColValue("bd_defdoc", "pk_defdoc", " code = '" + def2 + "' ") + "");
@ -288,8 +293,8 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
headvo.setMoney(money); headvo.setMoney(money);
headvo.setGloballocal(money); headvo.setGloballocal(money);
headvo.setRate(new UFDouble(1)); // headvo.setRate(new UFDouble(1));
headvo.setLocal_money(money); headvo.setLocal_money(money.multiply(headvo.getRate()).setScale(2, UFDouble.ROUND_HALF_UP));
AggGatheringBillVO bill = new AggGatheringBillVO(); AggGatheringBillVO bill = new AggGatheringBillVO();
bill.setParentVO(headvo); bill.setParentVO(headvo);
bill.setChildrenVO((CircularlyAccessibleValueObject[]) itemvos.toArray(new GatheringBillItemVO[0])); bill.setChildrenVO((CircularlyAccessibleValueObject[]) itemvos.toArray(new GatheringBillItemVO[0]));