class NEC_AllDiscount
{
// /// <summary>
// ///
// /// </summary>
// /// <param name="sender"></param>
// /// <param name="e"></param>
// [FormControlEventHandler(formControlStr(RetailPeriodicDiscount, MixAndMatchDiscountLine_DiscountPercentOrValue), FormControlEventType::Modified)]
// public static void MixAndMatchDiscountLine_DiscountPercentOrValue_OnModified(FormControl sender, FormControlEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// RetailDiscountLineMixAndMatch retailDiscountLineMixAndMatch;
// FormRun element = sender.formRun();
// FormDataSource RetailPeriodicDiscountLine_ds;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailPeriodicDiscountLine_ds = element.dataSource(formDataSourceStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine)) as FormDataSource;
// retailPeriodicDiscountLine = RetailPeriodicDiscountLine_ds.cursor();
// if(retailPeriodicDiscountLine.RecId)
// {
// 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>
// [FormControlEventHandler(formControlStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer_discAmount), FormControlEventType::Modified)]
// public static void RetailPeriodicDiscountLine_RetailDiscountLineOffer_discAmount_OnModified(FormControl sender, FormControlEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// FormRun element = sender.formRun();
// FormDataSource RetailDiscountlineoffer_ds;
// RetailDiscountLineOffer retailDiscountLineOffer;
// RetailDiscountlineoffer_ds = element.dataSource(formDataSourceStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer)) as FormDataSource;
// retailDiscountLineOffer = RetailDiscountlineoffer_ds.cursor();
// if(retailDiscountLineOffer.RecId)
// {
// 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>
// [FormControlEventHandler(formControlStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer_offerPrice), FormControlEventType::Modified)]
// public static void RetailPeriodicDiscountLine_RetailDiscountLineOffer_offerPrice_OnModified(FormControl sender, FormControlEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// FormRun element = sender.formRun();
// FormDataSource RetailDiscountlineoffer_ds;
// RetailDiscountLineOffer retailDiscountLineOffer;
// RetailDiscountlineoffer_ds = element.dataSource(formDataSourceStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer)) as FormDataSource;
// retailDiscountLineOffer = RetailDiscountlineoffer_ds.cursor();
// if(retailDiscountLineOffer.RecId)
// {
// 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");
// }
// }
// }
// }
// }
}
{
// /// <summary>
// ///
// /// </summary>
// /// <param name="sender"></param>
// /// <param name="e"></param>
// [FormControlEventHandler(formControlStr(RetailPeriodicDiscount, MixAndMatchDiscountLine_DiscountPercentOrValue), FormControlEventType::Modified)]
// public static void MixAndMatchDiscountLine_DiscountPercentOrValue_OnModified(FormControl sender, FormControlEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// RetailDiscountLineMixAndMatch retailDiscountLineMixAndMatch;
// FormRun element = sender.formRun();
// FormDataSource RetailPeriodicDiscountLine_ds;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailPeriodicDiscountLine_ds = element.dataSource(formDataSourceStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine)) as FormDataSource;
// retailPeriodicDiscountLine = RetailPeriodicDiscountLine_ds.cursor();
// if(retailPeriodicDiscountLine.RecId)
// {
// 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>
// [FormControlEventHandler(formControlStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer_discAmount), FormControlEventType::Modified)]
// public static void RetailPeriodicDiscountLine_RetailDiscountLineOffer_discAmount_OnModified(FormControl sender, FormControlEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// FormRun element = sender.formRun();
// FormDataSource RetailDiscountlineoffer_ds;
// RetailDiscountLineOffer retailDiscountLineOffer;
// RetailDiscountlineoffer_ds = element.dataSource(formDataSourceStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer)) as FormDataSource;
// retailDiscountLineOffer = RetailDiscountlineoffer_ds.cursor();
// if(retailDiscountLineOffer.RecId)
// {
// 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>
// [FormControlEventHandler(formControlStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer_offerPrice), FormControlEventType::Modified)]
// public static void RetailPeriodicDiscountLine_RetailDiscountLineOffer_offerPrice_OnModified(FormControl sender, FormControlEventArgs e)
// {
// InventTable inventTable;
// InventTableModule inventTableModule;
// RetailPeriodicDiscountLine retailPeriodicDiscountLine;
// RetailGroupMemberLine retailGroupMemberLine;
// EcoResProduct ecoResProduct;
// FormRun element = sender.formRun();
// FormDataSource RetailDiscountlineoffer_ds;
// RetailDiscountLineOffer retailDiscountLineOffer;
// RetailDiscountlineoffer_ds = element.dataSource(formDataSourceStr(RetailPeriodicDiscount, RetailPeriodicDiscountLine_RetailDiscountLineOffer)) as FormDataSource;
// retailDiscountLineOffer = RetailDiscountlineoffer_ds.cursor();
// if(retailDiscountLineOffer.RecId)
// {
// 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");
// }
// }
// }
// }
// }
}
No comments:
Post a Comment