完善客户静态单价的功能,给销售出库单据关联上次配置

This commit is contained in:
jishenghua
2025-05-20 21:33:42 +08:00
parent 99610971b7
commit 7b2d078382
3 changed files with 28 additions and 9 deletions

View File

@@ -1676,6 +1676,6 @@ alter table jsh_system_config add zero_change_amount_flag varchar(1) DEFAULT '0'
-- --------------------------------------------------------
-- 时间 2025年5月20日
-- by jishenghua
-- 给系统参数表增加客户静态单价启用标记,启用后,客户的销售出库单据单价不会从历史单据的单价获取,而是只从商品信息获取
-- 给系统参数表增加客户静态单价启用标记,启用后,客户的销售出库单价不会从该客户历史单据的单价获取,而是只从商品信息获取
-- --------------------------------------------------------
alter table jsh_system_config add customer_static_price_flag varchar(1) DEFAULT '0' COMMENT '客户静态单价启用标记0未启用1启用' after zero_change_amount_flag;

View File

@@ -618,9 +618,14 @@ public class MaterialController extends BaseController {
if(organId == null) {
mvo.setBillPrice(mvo.getWholesaleDecimal());
} else {
//查询最后一单的销售价,实现不同的客户不同的销售价
BigDecimal lastUnitPrice = depotItemService.getLastUnitPriceByParam(organId, mvo.getMeId(), prefixNo);
mvo.setBillPrice(lastUnitPrice!=null? lastUnitPrice : mvo.getWholesaleDecimal());
if(systemConfigService.getCustomerStaticPriceFlag()) {
//已经开启了客户静态单价的开关
mvo.setBillPrice(mvo.getWholesaleDecimal());
} else {
//查询最后一单的销售价,实现不同的客户不同的销售价
BigDecimal lastUnitPrice = depotItemService.getLastUnitPriceByParam(organId, mvo.getMeId(), prefixNo);
mvo.setBillPrice(lastUnitPrice!=null? lastUnitPrice : mvo.getWholesaleDecimal());
}
}
//销售价-给录入界面按权限屏蔽价格
if("QTCK".equals(prefixNo)) {