Based on Ware House Show the Required Fields Records
write Two Methods In Button Ok i)Clicked ii) WareHouseDetails
WareHouseDetails
private void wareHouseDetails(InventLocationId _wareHouse)
{
InventTrans inventTrans;
InventDim inventDim;
DLSProjectManagment5_1016 dLSWarehoseTable;
delete_from dLSWarehoseTable;
while select InventLocationId from inventDim
join inventTrans
where inventTrans.inventDimId == inventDim.inventDimId
&& ((inventTrans.StatusIssue == StatusIssue::Sold) || (inventTrans.StatusReceipt == StatusReceipt::Purchased))
&& inventDim.InventLocationId == WareHouse.valueStr()
{
dLSWarehoseTable.InventLocationId =inventDim.InventLocationId;
if(inventTrans.StatusIssue == StatusIssue::Sold)
{
dLSWarehoseTable.SoldQty = inventTrans.Qty;
dLSWarehoseTable.PurchQty = 0;
dLSWarehoseTable.SoldPrice = inventTrans.lineAmount();
dLSWarehoseTable.PurchPrice = 0;
}
else
{
dLSWarehoseTable.SoldQty = 0;
dLSWarehoseTable.PurchQty = inventTrans.Qty;
dLSWarehoseTable.PurchPrice = inventTrans.lineAmount();
dLSWarehoseTable.SoldPrice = 0;
}
dLSWarehoseTable.Total = inventTrans.costValue();
dLSWarehoseTable.insert();
}
}
ii) clicked method In Form design button
public void clicked()
{
Args args;
FormRun formRun;
boolean isValid = true;
if(!WareHouse.valueStr())
{
isValid = checkFailed("please select Id");
}
if(isValid)
{
this.wareHouseDetails(WareHouse.valueStr());
args = new args(formStr(DLSProjectManagment6_1016));
formRun = classFactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.wait();
formRun.detach();
super();
}
}
write Two Methods In Button Ok i)Clicked ii) WareHouseDetails
WareHouseDetails
private void wareHouseDetails(InventLocationId _wareHouse)
{
InventTrans inventTrans;
InventDim inventDim;
DLSProjectManagment5_1016 dLSWarehoseTable;
delete_from dLSWarehoseTable;
while select InventLocationId from inventDim
join inventTrans
where inventTrans.inventDimId == inventDim.inventDimId
&& ((inventTrans.StatusIssue == StatusIssue::Sold) || (inventTrans.StatusReceipt == StatusReceipt::Purchased))
&& inventDim.InventLocationId == WareHouse.valueStr()
{
dLSWarehoseTable.InventLocationId =inventDim.InventLocationId;
if(inventTrans.StatusIssue == StatusIssue::Sold)
{
dLSWarehoseTable.SoldQty = inventTrans.Qty;
dLSWarehoseTable.PurchQty = 0;
dLSWarehoseTable.SoldPrice = inventTrans.lineAmount();
dLSWarehoseTable.PurchPrice = 0;
}
else
{
dLSWarehoseTable.SoldQty = 0;
dLSWarehoseTable.PurchQty = inventTrans.Qty;
dLSWarehoseTable.PurchPrice = inventTrans.lineAmount();
dLSWarehoseTable.SoldPrice = 0;
}
dLSWarehoseTable.Total = inventTrans.costValue();
dLSWarehoseTable.insert();
}
}
ii) clicked method In Form design button
public void clicked()
{
Args args;
FormRun formRun;
boolean isValid = true;
if(!WareHouse.valueStr())
{
isValid = checkFailed("please select Id");
}
if(isValid)
{
this.wareHouseDetails(WareHouse.valueStr());
args = new args(formStr(DLSProjectManagment6_1016));
formRun = classFactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.wait();
formRun.detach();
super();
}
}
Comments
Post a Comment