本文解答了关于《印花税会计分录怎么做》相关内容,同时关于1、印花税会计分录怎么做最新,2、缴纳印花税会计分录怎么做,3、退回印花税会计分录怎么做,4、企业印花税会计分录怎么做,5、补缴印花税会计分录怎么做,的相关问答本篇文章福途教育网小编也整理了进来,希望对您有帮助。
不通过应交税费科目核算
if("1".equals(fiscalPeriodVoucher.getIsRegulationVoucher())){
return "存在数据不通过应交税费科目核算,请查看";
}
List voucherEntities = voucherService.getVoucherByParentId(fiscalPeriodVoucher.getId());
//将分录按照一级行排列
List voucherEntitiesFirstLevel = voucherEntities.stream().filter(v -> "1".equals(v.getLevel())).collect(Collectors.toList());
voucherEntitiesFirstLevel.sort(Comparator.comparing(VoucherEntity::getLineNumber));
//如果存在多个一级行,则报错
if(voucherEntitiesFirstLevel.size() >1){
return "存在多个一级行,请查看";
}
VoucherEntity voucherEntity = voucherEntitiesFirstLevel.get(0);
//将分录按照二级行排列
List voucherEntitiesSecondLevel = voucherEntities.stream().filter(v -> "2".equals(v.getLevel())).collect(Collectors.toList());
voucherEntitiesSecondLevel.sort(Comparator.comparing(VoucherEntity::getLineNumber));
if(voucherEntitiesSecondLevel.size() > 2){
return "存在多个二级行,请查看";
}
BigDecimal creditAmount = BigDecimal.ZERO;
BigDecimal debitAmount = BigDecimal.ZERO;
if(voucherEntitiesSecondLevel.size() == 2){
VoucherEntity voucherEntity1 = voucherEntitiesSecondLevel.get(0);
VoucherEntity voucherEntity2 = voucherEntitiesSecondLevel.get(1);
//借贷记规则,
//一一级行为借,二级行都为贷,则错误
if("借".equals(voucherEntity.getDirection()) && "贷".equals(voucherEntity1.getDirection()) && "贷".equals(voucherEntity2.getDirection())){
return "存在一级行借,二级行贷科目错误,请检查";
}
//一一级行为借,二级行第一个为借,第二个为贷,则错误
//一一级行为贷,二级行第一个为贷,第二个为借,则错误
if(("借".equals(voucherEntity.getDirection()) && "借".equals(voucherEntity1.getDirection()) && "贷".equals(voucherEntity2.getDirection()))
("贷".equals(voucherEntity.getDirection()) && "贷".equals(voucherEntity1.getDirection()) && "借".equals(voucherEntity2.getDirection()))){
return "存在二级行一个为借一个为贷科目错误,请检查";
}
//二级行类型要匹配
if(!voucherEntity1.getDirection().equals(voucherEntity2.getDirection())){
return "存在二级行类型不匹配,请检查";
}
if("借".equals(voucherEntity.getDirection())){
debitAmount = debitAmount.add(voucherEntity.getDebitAmount());
}else{
creditAmount = creditAmount.add(vouc
总结:以上是编辑:【衣尚】整理及AI智能原创关于《印花税会计分录怎么做
》优质内容解答希望能帮助到您。