收款单携带客户优化2

This commit is contained in:
李贵强 2025-07-02 11:59:06 +08:00
parent b3c9d91f83
commit 912c9e9c89
1 changed files with 3 additions and 1 deletions

View File

@ -619,7 +619,9 @@ public class RecBillSaveOperation extends AbstractOperationServicePlugIn impleme
bill.set("payername", ePayerid.getString("name")); //付款人名称
} else {
//3.规则生单未配置客户>取收款入账中心客户
DynamicObject bd_customer = BusinessDataServiceHelper.loadSingle("bd_customer", new QFilter[]{new QFilter("name", QCP.equals, oppunit)});
QFilter customerFilter = new QFilter("name", QCP.equals, oppunit);
customerFilter.and(new QFilter("useorg.id",QCP.equals,companyId));
DynamicObject bd_customer = BusinessDataServiceHelper.loadSingle("bd_customer", customerFilter.toArray());
if (null != bd_customer) {
bill.set("payer", bd_customer.getPkValue()); //付款人id
bill.set("payername", bd_customer.getString("name")); //付款人名称