Hi All,
I have a requirement where I ll be multiplying a table column value with an RealEdit (Value) and assigning the product to an another field of the same table.
Example.
I have a table named tmp_InventTableModule and it has three columns (Price,PriceUnit,tmpPrice) respctively.
I want to assign a Product value to the field (tmpPrice) as below :
tmpModule.tmpPrice = InventTableModule.Price * RealEdit(Value)
PLEASE FIND MY CODE BELOW. ALL THE FIELDS IN THE TABLE ARE GETTING INSERTED PROPERLY EXCEPT THE FIELD (tmpPrice). Please let me know where and what am I missing or doing wrong :
while select sLines
where sLines.createdDate >= createDate && sLines.createdDate <= EndDate
{
if(sLines)
{
select Price,PriceUnit from iModule
where iModule.ItemId == sLines.ItemId && iModule.Price != 0;
if(iModule)
{
tModule.Price = iModule.Price;
tModule.PriceUnit = iModule.PriceUnit;
tModule.FilterDates = sLines.createdDate;
tModule.tmpPrice = (iModule.Price) * (Percent_1.realValue());
tModule.insert();
tmp_InventTableModule_ds.refresh();
}
}
else
{
Box::info("No Sales Lines Exists Between the Ranges Selecteed !!");
}
*This post is locked for comments
I have the same question (0)