void RateCard.getValidations(int ids)
{
RateCardID = RATE_CARD[ID == input.ids];
if(RateCardID.CP_Validation == "" || RateCardID.CP_Validation == "Failure")
{
// info "inside if ";
verification_inv = RATE_CARD[ID in RateCardID];
idsString = "";
Internal_User = zoho.loginuserid;
getID = RATE_CARD[ID != null] sort by Rate_Card_ID desc;
var2 = 0;
if(getID == null)
{
var2 = 1;
}
else
{
lastRateCardID = getID.Rate_Card_ID;
suffix = lastRateCardID.getsuffix("RA-");
if(!suffix.isEmpty())
{
var2 = suffix.toLong() + 1;
}
else
{
var2 = 1;
}
}
for each test in verification_inv
{
// Append IDs to idsString
if(idsString != "")
{
idsString = idsString + ",";
}
idsString = idsString + test.ID.toString();
autoList = var2.toString().length();
RateList = {1:"RA-00",2:"RA-0",3:"RA-"};
Rate_Card_ID = RateList.get(autoList) + var2;
test.Rate_Card_ID=Rate_Card_ID;
var2 = var2 + 1;
// cp_mas = Rate_Card_Master[Partner_Entity_Name == test.Partner_Entity_Name.Partner_Entity_Name && Contracting_organisation == test.Contracting_organisation];
// if(cp_mas.count() > 0)
// {
// test.CP_Validation="Success";
// }
// else
// {
// test.CP_Validation="Failure";
// }
cp_mas = Partner_Onboarding_and_KYC[Partner_Entity_Name == test.Partner_Entity_Name.Partner_Entity_Name && Contracting_organisation1 == test.Contracting_organisation];
// cp_mas = Partner_Details[Partner_Entity_Name == test.Partner_Entity_Name.Partner_Entity_Name && Contracting_organisation == test.Contracting_organisation];
// masterdata = Partner_Onboarding_and_KYC[Partner_Entity_Name == test.pa]
// info "partner name " + test.Partner_Entity_Name.Partner_Entity_Name;
// info "org " + test.Contracting_organisation;
if(cp_mas.count() > 0)
{
test.CP_Validation="Success";
}
else
{
test.CP_Validation="Failure";
test.Validation_Comments="Contracting organisation does not match as per Partner Master Data. Rectify the data and re-initiate rate card import.";
}
// if(test.CP_Validation = "Success")
// {
getPartnerInfo = Partner_Onboarding_and_KYC[Partner_Entity_Name == test.Partner_Entity_Name.Partner_Entity_Name];
if(getPartnerInfo.count() > 0)
{
// info "PARTNERID"+ getPartnerInfo.Partner_ID;
test.Partner_Unique_ID=getPartnerInfo.Partner_ID;
}
// }
}
// openUrl("https://creatorapp.zoho.in/centralisedprocurement_usdcglobal/usdc1/#Report:Approved_Rate_Card_By_Internal_User","same window");
}
else
{
info "This RateCard was already validate";
}
thisapp.RateCard.getRateCardMaster(input.ids);
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter