|
|
|
@ -558,21 +558,21 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx |
|
|
|
|
|
|
|
|
|
//发票状态不能认证
|
|
|
|
|
String invoiceStatus="07"; |
|
|
|
|
if ( pageList.get(i).getInvoiceStatus() != null && !invoiceStatus.contains(pageList.get(i).getInvoiceStatus()) |
|
|
|
|
|| pageList.get(i).getInvoiceAmount() != null && pageList.get(i).getInvoiceAmount().compareTo(new BigDecimal(0)) < 0 |
|
|
|
|
|| pageList.get(i).getTaxAmount() != null && pageList.get(i).getTaxAmount().compareTo(new BigDecimal(0)) < 0) { |
|
|
|
|
if ( collect.get(j).getInvoiceStatus() != null && !invoiceStatus.contains(collect.get(j).getInvoiceStatus()) |
|
|
|
|
|| collect.get(j).getInvoiceAmount() != null && collect.get(j).getInvoiceAmount().compareTo(new BigDecimal(0)) < 0 |
|
|
|
|
|| collect.get(j).getTaxAmount() != null && collect.get(j).getTaxAmount().compareTo(new BigDecimal(0)) < 0) { |
|
|
|
|
|
|
|
|
|
currentTax = currentTax.subtract(pageList.get(j).getTaxAmount()); |
|
|
|
|
hjje = hjje.subtract(pageList.get(j).getInvoiceAmount()); |
|
|
|
|
currentTax = currentTax.subtract(collect.get(j).getTaxAmount()); |
|
|
|
|
hjje = hjje.subtract(collect.get(j).getInvoiceAmount()); |
|
|
|
|
count--; |
|
|
|
|
log.info("最小排序count--{}"+count+",currentTax==》"+currentTax+",hjje===>"+hjje); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
//发票税号一申请抵扣统计
|
|
|
|
|
if (!gfshList1.contains(pageList.get(i).getGfTaxNo())) { |
|
|
|
|
if (!gfshList1.contains(collect.get(j).getGfTaxNo())) { |
|
|
|
|
//该发票税号已申请抵扣统计
|
|
|
|
|
currentTax = currentTax.subtract(pageList.get(j).getTaxAmount()); |
|
|
|
|
hjje = hjje.subtract(pageList.get(j).getInvoiceAmount()); |
|
|
|
|
currentTax = currentTax.subtract(collect.get(j).getTaxAmount()); |
|
|
|
|
hjje = hjje.subtract(collect.get(j).getInvoiceAmount()); |
|
|
|
|
count--; |
|
|
|
|
log.info("最小排序已申请抵扣统计 count-- ==={}"+count+",currentTax==》"+currentTax+",hjje===>"+hjje); |
|
|
|
|
|
|
|
|
@ -584,8 +584,8 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx |
|
|
|
|
returnList.add(vo); |
|
|
|
|
}else { |
|
|
|
|
log.info("最小排序统计税额超出税额上限减去最后一个,并结束循环遍历"); |
|
|
|
|
currentTax = currentTax.subtract(pageList.get(j).getTaxAmount()); |
|
|
|
|
hjje = hjje.subtract(pageList.get(j).getInvoiceAmount()); |
|
|
|
|
currentTax = currentTax.subtract(collect.get(j).getTaxAmount()); |
|
|
|
|
hjje = hjje.subtract(collect.get(j).getInvoiceAmount()); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|