多税率计算
This commit is contained in:
parent
e31f35e6ef
commit
7f2abe0009
|
@ -42,11 +42,19 @@ public class EcContractFromPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
}
|
||||
}
|
||||
}
|
||||
Object taxrate = this.getModel().getValue("taxrate");
|
||||
Object taxrate = this.getModel().getValue("taxrate");//税率
|
||||
BigDecimal avgtaxrate = (BigDecimal) this.getModel().getValue("avgtaxrate");//综合税率
|
||||
boolean ismultirate = (boolean) this.getModel().getValue("ismultirate");//多税率
|
||||
BigDecimal pRate = new BigDecimal(0);
|
||||
if (ismultirate) {
|
||||
pRate = avgtaxrate;
|
||||
} else {
|
||||
if (taxrate != null) {
|
||||
DynamicObject taxrateInfo = (DynamicObject) taxrate;
|
||||
BigDecimal trate = taxrateInfo.getBigDecimal("taxrate");
|
||||
BigDecimal pRate = trate.divide(new BigDecimal(100)).add(new BigDecimal(1));
|
||||
pRate = trate.divide(new BigDecimal(100)).add(new BigDecimal(1));
|
||||
}
|
||||
}
|
||||
BigDecimal amount = new BigDecimal(0);
|
||||
BigDecimal ofamount = new BigDecimal(0);
|
||||
BigDecimal rate = new BigDecimal(0);
|
||||
|
@ -143,4 +151,3 @@ public class EcContractFromPlugin extends AbstractBillPlugIn implements Plugin {
|
|||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue