fix: A303-1 开票申请推送放开来源单据字段
This commit is contained in:
+11
-11
@@ -580,9 +580,9 @@ public class InvoiceApplicationServiceImpl extends BaseServiceImpl<InvoiceApplic
|
||||
+ "]财务应收单未在金蝶生成,请先在正式付款单页面同步金蝶");
|
||||
}
|
||||
}
|
||||
// 上游来源单据号(awrp_src_con_no):首张关联结算单的金蝶应收单单据编号(金蝶确认传单据编号口径),
|
||||
// 以 A302-4 查询结果为准(存量本地单号缺失也能取到),多张结算单取第一张
|
||||
String firstArBillNo = existArNos.get(arSrcCodes.get(0));
|
||||
// 上游来源单据号(awrp_src_con_no):首张关联结算单的金蝶应收单防重键 awrp_src_code
|
||||
// (联调确认金蝶源单校验按防重键匹配,传单据编号会报「源单编号不存在」),多张结算单取第一张
|
||||
String firstArSrcCode = arSrcCodes.get(0);
|
||||
// 加载发票张次与商品行:每张发票张次对应一张金蝶开票申请单(按张次拆分开票)
|
||||
List<InvoiceApplicationSheet> sheets = sheetMapper.selectList(Wrappers.<InvoiceApplicationSheet>lambdaQuery()
|
||||
.eq(InvoiceApplicationSheet::getInvoiceApplicationId, id).orderByAsc(InvoiceApplicationSheet::getSheetNo));
|
||||
@@ -680,7 +680,7 @@ public class InvoiceApplicationServiceImpl extends BaseServiceImpl<InvoiceApplic
|
||||
+ "]无商品行,无法组装分录");
|
||||
}
|
||||
BfiInvoiceApplySaveDTO param = this.buildInvoiceApplyParam(entity, sheetBillNo, seller, salerAddr, salerBank,
|
||||
dept, customer, firstArBillNo, money(sheet.getInvoiceAmount()), items);
|
||||
dept, customer, firstArSrcCode, money(sheet.getInvoiceAmount()), items);
|
||||
log.info("金蝶开票申请推送:开票申请[{}]发票张[{}],billno=[{}],价税合计=[{}],分录{}条",
|
||||
entity.getApplicationNo(), sheet.getSheetNo(), sheetBillNo, sheet.getInvoiceAmount(), items.size());
|
||||
BfiBillSaveResultVO saveResult = bfiService.saveInvoiceApply(param);
|
||||
@@ -729,11 +729,11 @@ public class InvoiceApplicationServiceImpl extends BaseServiceImpl<InvoiceApplic
|
||||
* 组装 A303-1 单张开票申请单入参(字段映射见设计文档 6.3/6.4),
|
||||
* 购销方等主表公共字段随开票申请取数,价税合计与单据体分录取本张发票
|
||||
*
|
||||
* @param firstArBillNo 上游来源单据号:首张关联结算单的金蝶应收单单据编号(多张结算单取第一张)
|
||||
* @param firstArSrcCode 上游来源单据号:首张关联结算单的金蝶应收单防重键 awrp_src_code(多张结算单取第一张)
|
||||
*/
|
||||
private BfiInvoiceApplySaveDTO buildInvoiceApplyParam(InvoiceApplication entity, String billNo,
|
||||
CustomerArchive seller, String salerAddr, String salerBank, Dept dept, CustomerArchive customer,
|
||||
String firstArBillNo, BigDecimal sheetAmount, List<BfiInvoiceApplySaveEntryDTO> items) {
|
||||
String firstArSrcCode, BigDecimal sheetAmount, List<BfiInvoiceApplySaveEntryDTO> items) {
|
||||
BfiInvoiceApplySaveDTO param = new BfiInvoiceApplySaveDTO();
|
||||
// ==================== 以下为【必填】字段(BfiInvoiceApplySaveDTO 标注),非必填字段先注释保留 ====================
|
||||
// 【必填】组织.编码:申请部门 deptId → 金蝶组织编码
|
||||
@@ -780,8 +780,8 @@ public class InvoiceApplicationServiceImpl extends BaseServiceImpl<InvoiceApplic
|
||||
param.setTotalamount(sheetAmount);
|
||||
// 是否含税:金蝶要求统一按不含税口径送(联调反馈),固定 0 不含税
|
||||
param.setHsbz("0");
|
||||
// 特殊票种:金蝶要求映射(联调反馈)——本张发票商品行全部为货物运输(运费/货物运输)送 E04,其余(其他、非货物运输的运输类等)送 00 非特殊票种
|
||||
param.setSpecialtype(this.specialTypeOf(items));
|
||||
// todo 特殊票种:金蝶要求映射(联调反馈)——本张发票商品行全部为货物运输(运费/货物运输)送 E04,其余(其他、非货物运输的运输类等)送 00 非特殊票种
|
||||
// param.setSpecialtype(this.specialTypeOf(items));
|
||||
// 【必填】客户.编码:受票方客商档案客商编码
|
||||
param.setCustomnameidNumber(customer.getCustomerCode());
|
||||
// 【必填】项目.项目编码(联调期临时传金蝶测试档案值 999)
|
||||
@@ -794,9 +794,9 @@ public class InvoiceApplicationServiceImpl extends BaseServiceImpl<InvoiceApplic
|
||||
// 数据来源:固定 3
|
||||
// param.setBillsource("3");
|
||||
// 来源单据:ar_finarbill 财务应收单(金蝶联调确认开票申请须挂上游应收单)
|
||||
param.setAwrpSrcBt(KingdeeBfiConstant.BFI_AR_BILL_SRC_BT);
|
||||
// 上游单据号:首张关联结算单的金蝶应收单单据编号(金蝶确认传单据编号口径,A302-4 预检已确认存在)
|
||||
param.setAwrpSrcConNo(firstArBillNo);
|
||||
// param.setAwrpSrcBt(KingdeeBfiConstant.BFI_AR_BILL_SRC_BT);
|
||||
// 上游单据号:首张关联结算单的金蝶应收单防重键 awrp_src_code(联调确认金蝶按防重键匹配源单,A302-4 预检已确认存在)
|
||||
// param.setAwrpSrcConNo(firstArSrcCode);
|
||||
// 数据来源系统
|
||||
param.setSystemsource(bfiProperties.getSrcSys());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user