class NEC_AllDiscountValidation
{
// /// <summary>
// ///
// /// </summary>
// /// <param name="sender"></param>
// /// <param name="e"></param>
// [FormDataFieldEventHandler(formDataFieldStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine, DiscountPercentOrValue), FormDataFieldEventType::Modified)]
// public static void DiscountPercentOrValue_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// RetailDiscountLineMixAndMatch retailDiscountLineMixAndMatch;
// FormDataSource RetailPeriodicDiscountLine_ds = sender.datasource();
// RetailPeriodicDiscountLine retailPeriodicDiscountLine = RetailPeriodicDiscountLine_ds.cursor();
// FieldId amount = retailPeriodicDiscountLine.DiscountPercentOrValue;
// select retailDiscountLineMixAndMatch
// where retailDiscountLineMixAndMatch.RecId == retailPeriodicDiscountLine.RecId;
// if(retailDiscountLineMixAndMatch.discountType == RetailDealPriceDiscountPctBase::DealPrice)
// {
// select retailGroupMemberLine
// where retailGroupMemberLine.RecId == retailPeriodicDiscountLine.RetailGroupMemberLine
// join ecoResProduct
// where ecoResProduct.RecId == retailGroupMemberLine.Product
// join inventTable
// where inventTable.Product == ecoResProduct.RecId
// join inventTableModule
// where inventTableModule.ItemId == inventTable.ItemId
// && inventTableModule.ModuleType == ModuleInventPurchSales::Sales;
// if (inventTableModule.ItemId )
// {
// if(inventTableModule.Price < retailPeriodicDiscountLine.DiscountPercentOrValue )
// {
// throw warning("Deal price cannot exceeds the base sale price");
// }
// }
// }
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="sender"></param>
// /// <param name="e"></param>
// [FormDataFieldEventHandler(formDataFieldStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer, discAmount), FormDataFieldEventType::Modified)]
// public static void discAmount_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// FormDataSource RetailDiscountlineoffer_ds = sender.datasource();
// RetailDiscountLineOffer retailDiscountLineOffer = RetailDiscountlineoffer_ds.cursor();
// FieldId amount = retailDiscountLineOffer.discAmount;
// if(retailDiscountLineOffer.discountMethod == RetailDiscountOfferLineDiscMethodBase::AmountOff)
// {
// select retailPeriodicDiscountLine
// where retailPeriodicDiscountLine.RecId == retailDiscountLineOffer.RecId
// join retailGroupMemberLine
// where retailGroupMemberLine.RecId == retailPeriodicDiscountLine.RetailGroupMemberLine
// join ecoResProduct
// where ecoResProduct.RecId == retailGroupMemberLine.Product
// join inventTable
// where inventTable.Product == ecoResProduct.RecId
// join inventTableModule
// where inventTableModule.ItemId == inventTable.ItemId
// && inventTableModule.ModuleType == ModuleInventPurchSales::Sales;
// if (inventTableModule.ItemId )
// {
// if(inventTableModule.Price < retailDiscountLineOffer.discAmount )
// {
// throw warning("Cash discount Amount cannot exceeds the base sale price");
// }
// }
// }
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="sender"></param>
// /// <param name="e"></param>
// [FormDataFieldEventHandler(formDataFieldStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer, offerPrice), FormDataFieldEventType::Modified)]
// public static void offerPrice_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// FormDataSource RetailDiscountlineoffer_ds = sender.datasource();
// RetailDiscountLineOffer retailDiscountLineOffer = RetailDiscountlineoffer_ds.cursor();
// FieldId amount = retailDiscountLineOffer.offerPrice;
// if(retailDiscountLineOffer.discountMethod == RetailDiscountOfferLineDiscMethodBase::Price)
// {
// select retailPeriodicDiscountLine
// where retailPeriodicDiscountLine.RecId == retailDiscountLineOffer.RecId
// join retailGroupMemberLine
// where retailGroupMemberLine.RecId == retailPeriodicDiscountLine.RetailGroupMemberLine
// join ecoResProduct
// where ecoResProduct.RecId == retailGroupMemberLine.Product
// join inventTable
// where inventTable.Product == ecoResProduct.RecId
// join inventTableModule
// where inventTableModule.ItemId == inventTable.ItemId
// && inventTableModule.ModuleType == ModuleInventPurchSales::Sales;
// if (inventTableModule.ItemId)
// {
// if(inventTableModule.Price < retailDiscountLineOffer.offerPrice )
// {
// throw warning("Discount Price cannot exceeds the base sale price");
// }
// }
// }
// }
}Ax7
{
// /// <summary>
// ///
// /// </summary>
// /// <param name="sender"></param>
// /// <param name="e"></param>
// [FormDataFieldEventHandler(formDataFieldStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine, DiscountPercentOrValue), FormDataFieldEventType::Modified)]
// public static void DiscountPercentOrValue_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// RetailDiscountLineMixAndMatch retailDiscountLineMixAndMatch;
// FormDataSource RetailPeriodicDiscountLine_ds = sender.datasource();
// RetailPeriodicDiscountLine retailPeriodicDiscountLine = RetailPeriodicDiscountLine_ds.cursor();
// FieldId amount = retailPeriodicDiscountLine.DiscountPercentOrValue;
// select retailDiscountLineMixAndMatch
// where retailDiscountLineMixAndMatch.RecId == retailPeriodicDiscountLine.RecId;
// if(retailDiscountLineMixAndMatch.discountType == RetailDealPriceDiscountPctBase::DealPrice)
// {
// select retailGroupMemberLine
// where retailGroupMemberLine.RecId == retailPeriodicDiscountLine.RetailGroupMemberLine
// join ecoResProduct
// where ecoResProduct.RecId == retailGroupMemberLine.Product
// join inventTable
// where inventTable.Product == ecoResProduct.RecId
// join inventTableModule
// where inventTableModule.ItemId == inventTable.ItemId
// && inventTableModule.ModuleType == ModuleInventPurchSales::Sales;
// if (inventTableModule.ItemId )
// {
// if(inventTableModule.Price < retailPeriodicDiscountLine.DiscountPercentOrValue )
// {
// throw warning("Deal price cannot exceeds the base sale price");
// }
// }
// }
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="sender"></param>
// /// <param name="e"></param>
// [FormDataFieldEventHandler(formDataFieldStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer, discAmount), FormDataFieldEventType::Modified)]
// public static void discAmount_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// FormDataSource RetailDiscountlineoffer_ds = sender.datasource();
// RetailDiscountLineOffer retailDiscountLineOffer = RetailDiscountlineoffer_ds.cursor();
// FieldId amount = retailDiscountLineOffer.discAmount;
// if(retailDiscountLineOffer.discountMethod == RetailDiscountOfferLineDiscMethodBase::AmountOff)
// {
// select retailPeriodicDiscountLine
// where retailPeriodicDiscountLine.RecId == retailDiscountLineOffer.RecId
// join retailGroupMemberLine
// where retailGroupMemberLine.RecId == retailPeriodicDiscountLine.RetailGroupMemberLine
// join ecoResProduct
// where ecoResProduct.RecId == retailGroupMemberLine.Product
// join inventTable
// where inventTable.Product == ecoResProduct.RecId
// join inventTableModule
// where inventTableModule.ItemId == inventTable.ItemId
// && inventTableModule.ModuleType == ModuleInventPurchSales::Sales;
// if (inventTableModule.ItemId )
// {
// if(inventTableModule.Price < retailDiscountLineOffer.discAmount )
// {
// throw warning("Cash discount Amount cannot exceeds the base sale price");
// }
// }
// }
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="sender"></param>
// /// <param name="e"></param>
// [FormDataFieldEventHandler(formDataFieldStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer, offerPrice), FormDataFieldEventType::Modified)]
// public static void offerPrice_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// FormDataSource RetailDiscountlineoffer_ds = sender.datasource();
// RetailDiscountLineOffer retailDiscountLineOffer = RetailDiscountlineoffer_ds.cursor();
// FieldId amount = retailDiscountLineOffer.offerPrice;
// if(retailDiscountLineOffer.discountMethod == RetailDiscountOfferLineDiscMethodBase::Price)
// {
// select retailPeriodicDiscountLine
// where retailPeriodicDiscountLine.RecId == retailDiscountLineOffer.RecId
// join retailGroupMemberLine
// where retailGroupMemberLine.RecId == retailPeriodicDiscountLine.RetailGroupMemberLine
// join ecoResProduct
// where ecoResProduct.RecId == retailGroupMemberLine.Product
// join inventTable
// where inventTable.Product == ecoResProduct.RecId
// join inventTableModule
// where inventTableModule.ItemId == inventTable.ItemId
// && inventTableModule.ModuleType == ModuleInventPurchSales::Sales;
// if (inventTableModule.ItemId)
// {
// if(inventTableModule.Price < retailDiscountLineOffer.offerPrice )
// {
// throw warning("Discount Price cannot exceeds the base sale price");
// }
// }
// }
// }
}Ax7
No comments:
Post a Comment