temp table data
----------------------------------------
tmpProjAdjustmentLocalAdjustFinal = projAdjustmentValidation.insertIntoTmpProjAdjustment(tmpProjAdjustment_ds,tmpProjAdjustment,tmpProjAdjustmentCost);
if (projAdjustmentValidation.validate() )
{
delete_from tmpProjAdjustment;
tmpProjAdjustment.setTmpData(tmpProjAdjustmentLocalAdjustFinal);
tmpProjAdjustment_ds.research();
throw error('@OGI3856');
}
----------------------------
// a_OGI_61X_TFS3436_PWPOnProjectMatching : Customization by sreekanth on 29 Mar 2017 - New Method
public TmpProjAdjustment insertIntoTmpProjAdjustment(FormDataSource tmpProjAdjustment_ds,
TmpProjAdjustment tmpProjAdjustment,
TmpProjAdjustmentCost tmpProjAdjustmentCost)
{
Set setAdjust;
TmpProjAdjustment tmpProjAdjustmentLocalAdjust, tmpProjAdjustmentCurrentAdjust , tmpProjAdjustmentLocalAdjust1,tmpProjAdjustmentLocalAdjust2,tmpProjAdjustmentLocalAdjust3;
TmpProjAdjustmentCost tmpProjAdjustmentCostFinal;
Array markedRecordsAdjust,markedRecordsAdjustCost;
ProjId projIdAdjust;
boolean ret;
int i = 0;
//a_OGI_61X_TFS3436_PWPOnProjectMatching:Customization by Tanmoy Nath on 2017.04.26 -- Begin
boolean retPWP = false;
int j = 0;
//a_OGI_61X_TFS3436_PWPOnProjectMatching:Customization by Tanmoy Nath on 2017.04.26 -- End
setAdjust = new Set(Types::String);
markedRecordsAdjust = new Array(Types::Int64);
markedRecordsAdjust = tmpProjAdjustment_ds.recordsMarked();
tmpProjAdjustmentCurrentAdjust.setTmpData(tmpProjAdjustment);
tmpProjAdjustmentCostFinal.setTmpData(tmpProjAdjustmentCost);
for (tmpProjAdjustmentLocalAdjust = getFirstSelection(tmpProjAdjustment_DS);
tmpProjAdjustmentLocalAdjust;
tmpProjAdjustmentLocalAdjust=tmpProjAdjustment_DS.getNext())
{
select * from tmpProjAdjustmentCostFinal
where tmpProjAdjustmentCostFinal.TransId == tmpProjAdjustmentLocalAdjust.TransId
&& tmpProjAdjustmentCostFinal.LedgerStatusCost == ProjLedgerStatus::BalanceSheet;
if (tmpProjAdjustmentCostFinal)
{
ret = OGIProjAdjustmentValidation::adjustmentValidation(tmpProjAdjustmentLocalAdjust.ProjId,tmpProjAdjustmentLocalAdjust.VoucherJournal,tmpProjAdjustmentLocalAdjust.AdjustmentType,tmpProjAdjustmentLocalAdjust.TransId,tmpProjAdjustmentLocalAdjust.InventTransId,tmpProjAdjustmentLocalAdjust.ProjAdjustRefid);
tmpProjAdjustmentLocalAdjust1.OGIAdjusmentFlag = ret;
//a_OGI_61X_TFS3436_PWPOnProjectMatching:Customization by Tanmoy Nath on 2017.04.26 -- Begin
if (ret == true)
{
retPWP = OGIProjAdjustmentValidation::adjustmentValidation_PaidOrNot(tmpProjAdjustmentLocalAdjust.ProjId,
tmpProjAdjustmentLocalAdjust.VoucherJournal,
tmpProjAdjustmentLocalAdjust.InventTransId,
tmpProjAdjustmentLocalAdjust.TransId);
tmpProjAdjustmentLocalAdjust1.OGIAdjusmentFlag_PWP = retPWP;
}
//a_OGI_61X_TFS3436_PWPOnProjectMatching:Customization by Tanmoy Nath on 2017.04.26 -- End
tmpProjAdjustmentLocalAdjust1.ActivityNumber = tmpProjAdjustmentLocalAdjust.ActivityNumber;
tmpProjAdjustmentLocalAdjust1.Adjusted = tmpProjAdjustmentLocalAdjust.Adjusted;
tmpProjAdjustmentLocalAdjust1.AdjustmentType = tmpProjAdjustmentLocalAdjust.AdjustmentType;
tmpProjAdjustmentLocalAdjust1.CategoryId = tmpProjAdjustmentLocalAdjust.CategoryId;
tmpProjAdjustmentLocalAdjust1.CurrencyId = tmpProjAdjustmentLocalAdjust.CurrencyId;
tmpProjAdjustmentLocalAdjust1.CurrencyIdCost = tmpProjAdjustmentLocalAdjust.CurrencyIdCost;
tmpProjAdjustmentLocalAdjust1.DefaultDimension = tmpProjAdjustmentLocalAdjust.DefaultDimension;
tmpProjAdjustmentLocalAdjust1.FromTime = tmpProjAdjustmentLocalAdjust.FromTime;
tmpProjAdjustmentLocalAdjust1.InventDimid = tmpProjAdjustmentLocalAdjust.InventDimid;
tmpProjAdjustmentLocalAdjust1.InventTransId = tmpProjAdjustmentLocalAdjust.InventTransId;
tmpProjAdjustmentLocalAdjust1.IsIntercompany = tmpProjAdjustmentLocalAdjust.IsIntercompany;
tmpProjAdjustmentLocalAdjust1.ItemAdjustVersion = tmpProjAdjustmentLocalAdjust.ItemAdjustVersion;
tmpProjAdjustmentLocalAdjust1.ItemId = tmpProjAdjustmentLocalAdjust.ItemId;
tmpProjAdjustmentLocalAdjust1.ItemType = tmpProjAdjustmentLocalAdjust.ItemType;
tmpProjAdjustmentLocalAdjust1.LedgerDimension = tmpProjAdjustmentLocalAdjust.LedgerDimension;
tmpProjAdjustmentLocalAdjust1.LinePropertyId = tmpProjAdjustmentLocalAdjust.LinePropertyId;
tmpProjAdjustmentLocalAdjust1.Module = tmpProjAdjustmentLocalAdjust.Module;
tmpProjAdjustmentLocalAdjust1.OGIConsolidated = tmpProjAdjustmentLocalAdjust.OGIConsolidated;
tmpProjAdjustmentLocalAdjust1.Origin = tmpProjAdjustmentLocalAdjust.Origin;
tmpProjAdjustmentLocalAdjust1.OriginCost = tmpProjAdjustmentLocalAdjust.OriginCost;
tmpProjAdjustmentLocalAdjust1.PackingSlipId = tmpProjAdjustmentLocalAdjust.PackingSlipId;
tmpProjAdjustmentLocalAdjust1.ProjAdjustRefid = tmpProjAdjustmentLocalAdjust.ProjAdjustRefid;
tmpProjAdjustmentLocalAdjust1.ProjId = tmpProjAdjustmentLocalAdjust.ProjId;
tmpProjAdjustmentLocalAdjust1.ProjIdentId = tmpProjAdjustmentLocalAdjust.ProjIdentId;
tmpProjAdjustmentLocalAdjust1.ProjIdentWorker = tmpProjAdjustmentLocalAdjust.ProjIdentWorker;
tmpProjAdjustmentLocalAdjust1.PSAIndirectComponentGroup = tmpProjAdjustmentLocalAdjust.PSAIndirectComponentGroup;
tmpProjAdjustmentLocalAdjust1.PSATransRecId = tmpProjAdjustmentLocalAdjust.PSATransRecId;
tmpProjAdjustmentLocalAdjust1.TransId= tmpProjAdjustmentLocalAdjust.TransId;
tmpProjAdjustmentLocalAdjust1.VoucherJournal = tmpProjAdjustmentLocalAdjust.VoucherJournal;
tmpProjAdjustmentLocalAdjust1.TransDate = tmpProjAdjustmentLocalAdjust.TransDate;
tmpProjAdjustmentLocalAdjust1.TransDateAdjustment = tmpProjAdjustmentLocalAdjust.TransDateAdjustment;
tmpProjAdjustmentLocalAdjust1.Qty = tmpProjAdjustmentLocalAdjust.Qty;
tmpProjAdjustmentLocalAdjust1.txt = tmpProjAdjustmentLocalAdjust.txt;
tmpProjAdjustmentLocalAdjust1.insert();
if (ret == true)
{
i++;
}
//a_OGI_61X_TFS3436_PWPOnProjectMatching:Customization by Tanmoy Nath on 2017.04.26 -- Begin
if (retPWP == true)
{
j++;
}
//a_OGI_61X_TFS3436_PWPOnProjectMatching:Customization by Tanmoy Nath on 2017.04.26 -- End
}
}
while select tmpProjAdjustmentCurrentAdjust
{
select * from tmpProjAdjustmentLocalAdjust1
where tmpProjAdjustmentLocalAdjust1.TransId == tmpProjAdjustmentCurrentAdjust.TransId;
if (!tmpProjAdjustmentLocalAdjust1)
{
tmpProjAdjustmentLocalAdjust1.OGIAdjusmentFlag = NoYes::No;
tmpProjAdjustmentLocalAdjust1.ActivityNumber = tmpProjAdjustmentCurrentAdjust.ActivityNumber;
tmpProjAdjustmentLocalAdjust1.Adjusted = tmpProjAdjustmentCurrentAdjust.Adjusted;
tmpProjAdjustmentLocalAdjust1.AdjustmentType = tmpProjAdjustmentCurrentAdjust.AdjustmentType;
tmpProjAdjustmentLocalAdjust1.CategoryId = tmpProjAdjustmentCurrentAdjust.CategoryId;
tmpProjAdjustmentLocalAdjust1.CurrencyId = tmpProjAdjustmentCurrentAdjust.CurrencyId;
tmpProjAdjustmentLocalAdjust1.CurrencyIdCost = tmpProjAdjustmentCurrentAdjust.CurrencyIdCost;
tmpProjAdjustmentLocalAdjust1.DefaultDimension = tmpProjAdjustmentCurrentAdjust.DefaultDimension;
tmpProjAdjustmentLocalAdjust1.FromTime = tmpProjAdjustmentCurrentAdjust.FromTime;
tmpProjAdjustmentLocalAdjust1.InventDimid = tmpProjAdjustmentCurrentAdjust.InventDimid;
tmpProjAdjustmentLocalAdjust1.InventTransId = tmpProjAdjustmentCurrentAdjust.InventTransId;
tmpProjAdjustmentLocalAdjust1.IsIntercompany = tmpProjAdjustmentCurrentAdjust.IsIntercompany;
tmpProjAdjustmentLocalAdjust1.ItemAdjustVersion = tmpProjAdjustmentCurrentAdjust.ItemAdjustVersion;
tmpProjAdjustmentLocalAdjust1.ItemId = tmpProjAdjustmentCurrentAdjust.ItemId;
tmpProjAdjustmentLocalAdjust1.ItemType = tmpProjAdjustmentCurrentAdjust.ItemType;
tmpProjAdjustmentLocalAdjust1.LedgerDimension = tmpProjAdjustmentCurrentAdjust.LedgerDimension;
tmpProjAdjustmentLocalAdjust1.LinePropertyId = tmpProjAdjustmentCurrentAdjust.LinePropertyId;
tmpProjAdjustmentLocalAdjust1.Module = tmpProjAdjustmentCurrentAdjust.Module;
tmpProjAdjustmentLocalAdjust1.OGIConsolidated = tmpProjAdjustmentCurrentAdjust.OGIConsolidated;
tmpProjAdjustmentLocalAdjust1.Origin = tmpProjAdjustmentCurrentAdjust.Origin;
tmpProjAdjustmentLocalAdjust1.OriginCost = tmpProjAdjustmentCurrentAdjust.OriginCost;
tmpProjAdjustmentLocalAdjust1.PackingSlipId = tmpProjAdjustmentCurrentAdjust.PackingSlipId;
tmpProjAdjustmentLocalAdjust1.ProjAdjustRefid = tmpProjAdjustmentCurrentAdjust.ProjAdjustRefid;
tmpProjAdjustmentLocalAdjust1.ProjId = tmpProjAdjustmentCurrentAdjust.ProjId;
tmpProjAdjustmentLocalAdjust1.ProjIdentId = tmpProjAdjustmentCurrentAdjust.ProjIdentId;
tmpProjAdjustmentLocalAdjust1.ProjIdentWorker = tmpProjAdjustmentCurrentAdjust.ProjIdentWorker;
tmpProjAdjustmentLocalAdjust1.PSAIndirectComponentGroup = tmpProjAdjustmentCurrentAdjust.PSAIndirectComponentGroup;
tmpProjAdjustmentLocalAdjust1.PSATransRecId = tmpProjAdjustmentCurrentAdjust.PSATransRecId;
tmpProjAdjustmentLocalAdjust1.TransId= tmpProjAdjustmentCurrentAdjust.TransId;
tmpProjAdjustmentLocalAdjust1.TransDate = tmpProjAdjustmentCurrentAdjust.TransDate;
tmpProjAdjustmentLocalAdjust1.TransDateAdjustment = tmpProjAdjustmentCurrentAdjust.TransDateAdjustment;
tmpProjAdjustmentLocalAdjust1.Qty = tmpProjAdjustmentCurrentAdjust.Qty;
tmpProjAdjustmentLocalAdjust1.VoucherJournal = tmpProjAdjustmentCurrentAdjust.VoucherJournal;
tmpProjAdjustmentLocalAdjust1.txt = tmpProjAdjustmentCurrentAdjust.txt;
tmpProjAdjustmentLocalAdjust1.insert();
}
}
if (i > 0 )
{
adjustmentValidation = true;
}
//a_OGI_61X_TFS3436_PWPOnProjectMatching:Customization by Tanmoy Nath on 2017.04.26 -- Begin
if (j > 0 )
{
adjustmentValidation_PaidOrNot = true;
}
//a_OGI_61X_TFS3436_PWPOnProjectMatching:Customization by Tanmoy Nath on 2017.04.26 -- End
return tmpProjAdjustmentLocalAdjust1;
}
Comments
Post a Comment