以物料自定义业务员字段,物料盘点方案按自定义业务员进行分单为例进行说明。
步骤如下:
1、物料增加自定义字段:
2、物料信息:
3、执行以下SQL:
delete T_STK_COUNTSEPBILLITEM where FKEY = 'FMaterialId.FBase1';
insert into T_STK_COUNTSEPBILLITEM(FID,FNUMBER,FKEY,FFIELDTYPE,FSRCFIELDNAME,FINVFIELDNAME,FTABLENAME,FTABLERELATION,FSEQ,FDOCUMENTSTATUS,FCREATORID,FCREATEDATE,FMODIFIERID,FMODIFYDATE,
FAPPROVERID,FAPPROVEDATE,FFORBIDSTATUS,FFORBIDDERID,FFORBIDDATE,FFORTABLECOUNT,FFORCYCLECOUNT)
values(100020,'materialbase1','FMaterialId.FBase1',2,'TM.FBase1','FMaterialId',' T_BD_MATERIAL',' LEFT JOIN T_BD_MATERIAL TM ON T2.FMATERIALID = TM.FMASTERID AND ( TM.FUSEORGID = T2.FSTOCKORGID OR EXISTS ( SELECT 1 FROM T_META_BASEDATATYPE WHERE FBASEDATATYPEID = ''BD_MATERIAL'' AND FSTRATEGYTYPE = 1))',20,'C',16394,'2030-09-08',16394,'2030-09-08',16394,'2030-09-08','A',0,NULL,'1','1');
delete T_STK_COUNTSEPBILLITEM_L where FID = 100020;
insert T_STK_COUNTSEPBILLITEM_L(FPKID,FID,FLOCALEID,FNAME,FDESCRIPTION)
select MAX(fpkid)+1, 100020,2052,N'自定义业务员',N'' from T_STK_COUNTSEPBILLITEM_L;
4、执行SQL后的效果,新增盘点方案:
5、盘点方案审核后,联查物料盘点作业,生成2张物料盘点作业:
盘点方案分单依据说明:
1、盘点方案的分单依据的字段,来源于“盘点分单规则项目”基础资料,如果需要了解基础资料相关字段,可以在BOSIDE中将该基础资料发布出来,如图所示:
2、该基础资料没有权限对象,需要取消权限控制,在BOSIDE中打开“盘点分单规则项目”,修改“权限控制设置”,如图所示:
3、在主控台打开发布的功能,如果没有,则需要清除缓存:
4、查看单据,可以看到通过SQL新增的记录:
推荐阅读