Zgłoszenie
Muszę zrobić korektę PZ , ale niestety na jednym indeksie wystąpiły rozchody MM-, z powrotem zrobiłam przesunięcie na magazyn 001, ale nie mogę zrobić K_PZ bo cały czas mi pokazuje że są rozchody.
Możesz to jakoś poprawić, żeby wszystko było poprawnie
Po sprawdzenieu proba przepiecia partii ktrora jest na mm
1.znelezienie dokumentu
SQL select * from document . documentline where documentid = '8cf87271-36d0-ec11-8451-7ed30a52f64f'
2.znalezienie wsyzstkich rozchodow
SQL select * from document . documentline where initialincomesourcelineid in
(
select documentlineid from document . documentline where documentid = '8cf87271-36d0-ec11-8451-7ed30a52f64f'
)
and documentlineid not in (
select documentlineid from document . documentline where documentid = '8cf87271-36d0-ec11-8451-7ed30a52f64f'
)
and status >- 1
3.kopia na wszelki wypdaek
SQL select * into document . docuemntline_copy_20220531 from document . documentline
znalezeienie partii która ndaje sie do przepiecia
SQL select * from document . documentline where itemid = '7332D93F-138F-E811-841B-7ED30A52F64F' and status >- 1
and itemquantityleft > 0 and sign = 1
zmiana docuemntlineid 937757D3-36D0-EC11-8451-7ED30A52F64F na 4A948E91-F6D4-EC11-8454-7ED30A52F64F
SQL update document . documentline set initialincomesourcelineid = '4A948E91-F6D4-EC11-8454-7ED30A52F64F'
where initialincomesourcelineid in
(
select documentlineid from document . documentline where documentid = '8cf87271-36d0-ec11-8451-7ed30a52f64f'
)
and documentlineid not in (
select documentlineid from document . documentline where documentid = '8cf87271-36d0-ec11-8451-7ed30a52f64f'
)
and status >- 1
przepiecie ilosc i wartosci pozostalyc na document.documentline
przeliczenie stanow
SQL exec [ wms ].[ stockBalanceFix ] @ itemid = '1216cdf2-3cf0-e511-93f6-f01fafe8ab47'
exec [ wms ].[ stockBalanceFix ] @ itemid = '81682ba1-936a-e611-93f6-f01fafe8ab47'
exec [ wms ].[ stockBalanceFix ] @ itemid = '7332d93f-138f-e811-841b-7ed30a52f64f'
8.test
SQL exec [ document ].[ test_balanceCheck ]