销售出库单审核后自动生成普通发票,行号不对应
金蝶云社区-南瀚卢生
南瀚卢生
0人赞赏了该文章 1,200次浏览 未经作者许可,禁止转载编辑于2016年06月23日 21:44:54

旗舰版V4.0,销售出库单审核后自动生成普通发票,行号自动按物料代码排序,和销售出库单不一致。
举例如下:销售出库单第一行物料代码是4.08.07.02,第二行物料代码是4.08.07.04,第三行物料代码是4.08.07.01,
自动生成销售发票,该发票第一行物料代码是4.08.07.01,第二行是4.08.07.02,第三行是4.08.07.04。
是否能改回来,出库单和销售发票行号一一对应?
跟踪语句如下:
INSERT INTO ICSaleEntry (FInterID,FEntryID,FBrNo,FMapNumber,FMapName,FItemID,FDiscountRate,FAmtDiscount,FUnitID,Fauxqty,Fauxprice,Famount,FAuxPropID,FQty,FComplexQty,FSecCoefficient,FSecQty,FUniDiscount,FStdAmtDiscount,FAuxPriceDiscount,FKFDate,FKFperiod,FPeriodDate,FBatchNo,FNote,FStdAmount,FTaxRate,FTaxAmount,FStdTaxAmount,FOrgBillEntryID,FBuyerFreight,FOrderPrice,FAuxOrderPrice,FClassID_SRC,FEntryID_SRC,FSourceBillNo,FSourceTranType,FSourceInterId,FSourceEntryID,FContractBillNo,FContractInterID,FContractEntryID,FOrderBillNo,FOrderInterID,FOrderEntryID,FOnLineOrderNo,FAllHookQTY,FStdAllHookAmount,FCurrentHookQTY,FStdCurrentHookAmount,FPlanMode,FMTONo,FEntrySelfI0563)
VALUES (1913,1,'0','','',10373,0,0,243,30,10,300,0,30,'30公斤',0,0,0,0,10,Null,0,Null,'','',300,0,0,0,0,0,0,0,0,0,'000897',21,5085,3,'',0,0,'',0,0,'',0,0,0,0,14036,'',300)
INSERT INTO ICSaleEntry (FInterID,FEntryID,FBrNo,FMapNumber,FMapName,FItemID,FDiscountRate,FAmtDiscount,FUnitID,Fauxqty,Fauxprice,Famount,FAuxPropID,FQty,FComplexQty,FSecCoefficient,FSecQty,FUniDiscount,FStdAmtDiscount,FAuxPriceDiscount,FKFDate,FKFperiod,FPeriodDate,FBatchNo,FNote,FStdAmount,FTaxRate,FTaxAmount,FStdTaxAmount,FOrgBillEntryID,FBuyerFreight,FOrderPrice,FAuxOrderPrice,FClassID_SRC,FEntryID_SRC,FSourceBillNo,FSourceTranType,FSourceInterId,FSourceEntryID,FContractBillNo,FContractInterID,FContractEntryID,FOrderBillNo,FOrderInterID,FOrderEntryID,FOnLineOrderNo,FAllHookQTY,FStdAllHookAmount,FCurrentHookQTY,FStdCurrentHookAmount,FPlanMode,FMTONo,FEntrySelfI0563)
VALUES (1913,2,'0','','',10374,0,0,259,2,10,20,0,2,'2瓶',0,0,0,0,10,Null,0,Null,'','',20,0,0,0,0,0,0,0,0,0,'000897',21,5085,1,'',0,0,'',0,0,'',0,0,0,0,14036,'',20)
INSERT INTO ICSaleEntry (FInterID,FEntryID,FBrNo,FMapNumber,FMapName,FItemID,FDiscountRate,FAmtDiscount,FUnitID,Fauxqty,Fauxprice,Famount,FAuxPropID,FQty,FComplexQty,FSecCoefficient,FSecQty,FUniDiscount,FStdAmtDiscount,FAuxPriceDiscount,FKFDate,FKFperiod,FPeriodDate,FBatchNo,FNote,FStdAmount,FTaxRate,FTaxAmount,FStdTaxAmount,FOrgBillEntryID,FBuyerFreight,FOrderPrice,FAuxOrderPrice,FClassID_SRC,FEntryID_SRC,FSourceBillNo,FSourceTranType,FSourceInterId,FSourceEntryID,FContractBillNo,FContractInterID,FContractEntryID,FOrderBillNo,FOrderInterID,FOrderEntryID,FOnLineOrderNo,FAllHookQTY,FStdAllHookAmount,FCurrentHookQTY,FStdCurrentHookAmount,FPlanMode,FMTONo,FEntrySelfI0563)
VALUES (1913,3,'0','','',10376,0,0,259,8,10,80,0,8,'8瓶',0,0,0,0,10,Null,0,Null,'','',80,0,0,0,0,0,0,0,0,0,'000897',21,5085,2,'',0,0,'',0,0,'',0,0,0,0,14036,'',80)
EXEC p_UpdateBillRelateData 86,1913,'ICSale','ICSaleEntry'