K3销售订单携带批号至销售出库单
/*從發貨通知單復制批號字段到銷售訂單(注意:字段名保持FBatchNo不變)
Insert Into ICTemplateEntry
(FID,FCtlOrder,FCtlIndex,FCtlType,FLookUpCls,FNeedSave,FValueType,FSaveValue,FFieldName,FEnable,FPrint,FHeadCaption,FWidth,FNeedCount,FRelationID,FAction,FMustInput,FFilter,FSaveRule,FDefaultCtl,FVisForBillType,FRelateOutTbl,FSysMustInputItem,FHeadCaption_CHT,FHeadCaption_EN,FStatCount,FIsVisibleForList,FCanEditedAllTime,FAllowCopy,FDefaultValue,FMaxValue,FMinValue,FFormat,FPrintStatus,flookuptype,foptionext,fitemclassid,fuserdefineclassid)
select 'S01',68,68,FCtlType,FLookUpCls,FNeedSave,FValueType,FSaveValue,FFieldName,FEnable,FPrint,FHeadCaption,FWidth,FNeedCount,FRelationID,FAction,FMustInput,FFilter,FSaveRule,FDefaultCtl,FVisForBillType,FRelateOutTbl,FSysMustInputItem,FHeadCaption_CHT,FHeadCaption_EN,FStatCount,FIsVisibleForList,FCanEditedAllTime,FAllowCopy,FDefaultValue,FMaxValue,FMinValue,FFormat,FPrintStatus,flookuptype,foptionext,fitemclassid,fuserdefineclassid
from ICTemplateEntry ?Where FID='S02' and ffieldname='FBatchNo'
/*銷售訂單增加批號字段
Declare @FInterID ?INT?
Select @FInterID=ISNULL(MAX(FInterID),0)+1 From ICChatBillTitle where FTypeID=61
Insert Into ICChatBillTitle
(FInterID,FTypeID,FColCaption,FHeadSecond,FColName,FTableName,FColType,FColWidth,FVisible,FItemClassID,FVisForQuest,FReturnDataType,FCountPriceType,FCtlIndex,FName,FTableAlias,FAction,FNeedCount,FIsPrimary,FLogicAction,FStatistical,FMergeable,FVisForOrder,FColCaption_CHT,FColCaption_EN,FControl,FMode,FControlType,FPrecisionField,FAlign,FEditable,FFormat,FFormatType,fmustselected)?
select ?@FInterID,61,FColCaption,FHeadSecond,FColName,'SEOrderEntry',FColType,FColWidth,FVisible,FItemClassID,FVisForQuest,FReturnDataType,FCountPriceType,FCtlIndex,FName,FTableAlias,FAction,FNeedCount,FIsPrimary,FLogicAction,FStatistical,FMergeable,FVisForOrder,FColCaption_CHT,FColCaption_EN,FControl,FMode,FControlType,FPrecisionField,FAlign,FEditable,FFormat,FFormatType,fmustselected
from ICChatBillTitle ?where ftypeid=64 and finterid=48
go
Declare @FInterID1 ?INT?
Select @FInterID1 =ISNULL(MAX(FInterID),0)+1 From ICTableRelation where FTypeID=61
Insert Into ICTableRelation(FTypeID,FInterID,FTableName,FTableNameAlias,FFieldName,FTableName11,FTableNameAlias11,FFieldName11,FLogic,FBillID,FFieldID,FMode,FIndex,FCondition,FLeftParentheses,FRightParentheses,FLogicOperator,FISConst,FConstType,FSubFilter)
Values
(61,@FInterID1,'SEorderEntry','u1','fbatchno','icinventory','t444','fbatchno','*=','','',0,0,'','','','=',0,0,'')
/*修改ICSelBills取數,批號取值只能在系統自帶的數據上修改,自定義插入新數據無效
update ICSelbills set faction=''?
from ICSelbills?
where FID = 'B01' AND FFieldName='FOrderInterID'and FSelType <> 1 AND FDK NOT IN (1,2) AND FDstCtlField <> '' and fname='fbatchno'
如果需要打印,還需要處理套打取數表
GLNoteCitation :套打模板字段取數明細表
GLNoteType :套打單據類型表
附表:ICSelBills字段說明
?
總結
以上是生活随笔為你收集整理的K3销售订单携带批号至销售出库单的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Windows系统下oracle数据库每
- 下一篇: linux vma,内存管理 – Lin