Zmiana ceny *pzk
Wartość usługi jest przechowywana w document.docuemntline
i polach additionalprice
,sysadditionalprice
![[dokument-backup]]
Zmiana ceny w przypadku sytaucji ze nieprawidłowa cena , cena jest oblcizan z wartości
SQL |
---|
| update document.documentline set
sysitemprice= cast (round(sysitemvalue/itemquantity,2) as decimal(13,4)) ,
itemprice= cast (round(itemvalue/itemquantity,2) as decimal(13,4)) ,
syscorrecteditemprice= cast (round(syscorrecteditemprice/itemquantity,2) as decimal(13,4)) ,
correcteditemprice= cast (round(correcteditemprice/itemquantity,2) as decimal(13,4))
from document.documentline
where
documentfullnr ='*pzk/175/101/2022'
and status >-1
and sysitemprice!= cast (round(sysitemvalue/itemquantity,2) as decimal(13,4))
|
Listowanie różnic między ceną obliczną z wartości podzielonej na ilość
SQL |
---|
| select
sysitemprice,
cast (round(sysitemvalue/itemquantity,2) as decimal(13,4)) x1,
itemprice,
cast (round(itemvalue/itemquantity,2) as decimal(13,4)) x2,
syscorrecteditemprice,
cast (round(syscorrecteditemprice/itemquantity,2) as decimal(13,4)) x3,
correcteditemprice,
cast (round(correcteditemprice/itemquantity,2) as decimal(13,4)) x4,
sysitemvalue,
itemvalue
from document.documentline
where
documentfullnr ='*pzk/175/101/2022'
and status >-1
and sysitemprice!= cast (round(sysitemvalue/itemquantity,2) as decimal(13,4))
|