采購訂單列表中不能夠顯示4月分的訂單
發(fā)布于:2018-01-29 17:38:56
問題現(xiàn)象:在采購訂單列表中不能夠顯示4月分的訂單,只能顯示以前月份的訂單,但是在執(zhí)行統(tǒng)計表和預(yù)警表里面可以查看到.
解決方案:請在sql的查詢分析器中針對錯誤帳套執(zhí)行下面的腳本,來更改采購訂單、到貨單等的扣稅類別idiscounttaxtype字段,使其為默認(rèn)值0,則采購訂單列表可以顯示4月份的單據(jù)。建議您新增一張訂單測試一下,看新增后,采購訂單表中該訂單號記錄的idiscounttaxtype字段是否為0,如果為空,請檢查一下您的環(huán)境,請確認(rèn)補(bǔ)丁無誤后,是否能重現(xiàn)問題。 執(zhí)行腳本前請先備份數(shù)據(jù): update po_pomain set idiscounttaxtype=0 where idiscounttaxtype is null update PU_ArrivalVouch set idiscounttaxtype=0 where idiscounttaxtype is null update purbillvouch set iDiscountTaxType=(case when purbillvouch.cpbvbilltype =N'01' THEN 0 ELSE 1 END) where iDiscountTaxType is null go UPDATE PurBillVouchs SET ioritaxcost=(case when purbillvouchs.icost is null THEN NULL ELSE CASE WHEN ipbvquantity<>0 then iOriSum/ipbvquantity else 0 end END) where ioritaxcost is null GO UPDATE PurBillVouchs SET ioricost=(case when purbillvouchs.iOriTaxCost is null THEN NULL ELSE iOriTaxCost*(1-purbillvouchs.itaxrate/100) end) from purbillvouchs inner join purbillvouch on purbillvouch.pbvid=purbillvouchs.pbvid where purbillvouch.cpbvbilltype<>N'01' and ioricost is null GO