First,find the cost price control in SalesTable Form SalesLine_ReturnCostPrice, set AutoDeclaration Yes.
Second, find SalesTable Form->Data Sources->SalesLine->Fieds->CostPrice->methods then right click,
choose override modified method, and insert the follwing codes :
public void modified()
{
;
if(any2real(SalesLine_ReturnCostPrice.valueStr()) < SalesLine::find(salesLine.SalesId,salesLine.LineNum,false).CostPrice)
{
info('Under the cost price,please check!');
}
else
{
super();
}
}
Second, find SalesTable Form->Data Sources->SalesLine->Fieds->CostPrice->methods then right click,
choose override modified method, and insert the follwing codes :
public void modified()
{
;
if(any2real(SalesLine_ReturnCostPrice.valueStr()) < SalesLine::find(salesLine.SalesId,salesLine.LineNum,false).CostPrice)
{
info('Under the cost price,please check!');
}
else
{
super();
}
}