Wg kodu wygląda na to że wartość jest nadpisywana.
Tymczasem w tabeli dalej widzę starą wartość i nie jest ona poprawiana.
Ktoś coś wie dlaczego?
public static void checkAndFixPriceUnit( container Input )
{
PurchReqLine PRL;
container _input = Input;
str 80 purchReqId;
int i;
real x;
;
for (i = 1; i <= conLen(_input); i++)
{
purchReqId = conPeek(_input, i);
ttsbegin;
while select PRL where (PRL.PurchReqId == purchReqId)
{
if (PRL.Status != 12)
{
global::warning("Purchase requisition for " + purchReqId + " isn't Approved - Ordered!");
}
else if (PRL.PriceUnit != 0)
{
global::warning("Price unit for purchase requisition " + purchReqId + " if different from 0.");
}
else
{
x = PRL.PriceUnit;
global::info(num2str(PRL.PriceUnit,4,2,0,0));
PRL.PriceUnit = 1;
global::info(num2str(PRL.PriceUnit,4,2,0,0));
global::info("Price unit is fixed for purchase requisition " + purchReqId);
}
}
ttscommit;
}
}