设计:
库存明细表中增加是否分公司入库的标记IsBranchIn,初始值为零。只有经过分公司入库才改变其值。
所涉及的表:tbl_stockdetail.通过sql语句:
1.根据仓库日期
select top 12 * from tbl_stockdetail where billtype = 2 and branchno = {0}
and stockdate = {} and stockbillid in
(select stockbillid form tbl_stock where department = {2} and billtype = 2)
stockbillid = {1}
2.
update tbl_stockdetail set IsBranchIn = 1
where pkid = {0} and billtype = 2 and branchno = {2}
库存明细表中增加是否分公司入库的标记IsBranchIn,初始值为零。只有经过分公司入库才改变其值。
所涉及的表:tbl_stockdetail.通过sql语句:
1.根据仓库日期
select top 12 * from tbl_stockdetail where billtype = 2 and branchno = {0}
and stockdate = {} and stockbillid in
(select stockbillid form tbl_stock where department = {2} and billtype = 2)
stockbillid = {1}
2.
update tbl_stockdetail set IsBranchIn = 1
where pkid = {0} and billtype = 2 and branchno = {2}