Discount service
The discount service handles both the Periodic discounts and the Customer discounts for the LS One POS. The way these discounts are handled by the service is not the same so please read the sections below for each type of discount.
Periodic discounts
The discount service selects a specific periodic discount by using the items on the sale, the rules that apply to each type of periodic discounts and last but not least by the priority that is set on the periodic discounts.
Once the periodic discount functionality is done each item line will only have one periodic discount line attached to it.
For more detailed information about the configurations and rules surrounding the periodic discounts please see the LS One online help.
Customer discounts
When working with the customer discounts (or trade agreement discounts as they are sometimes called) the discount service finds any and all discounts that applies to the item. The only limitation of which discounts are found and attached to the item is configured in the Administrative options of the Site Manager.
Once the customer discount functionality is done each item line can have 0 to n number of customer discount lines attached to it.
The calculation service then takes over and compares the discounts and finds the best discount for the customer and uses that. There are very specific rules that apply to this comparison process and more information on that can be found in the LS One online help.
For more detailed information about the configurations for the customer discounts please see the LS One online help.
Main functionality
Name | Description |
---|---|
CalculateDiscount | This is the main entry point into the discount functionality. Finds all discounts that should be added to the items on the sale |
When doing customizations and the functionality requires a price, discount and tax to be retrieved for the items being added or already on the sale we recommend using function CalculatePriceTaxDiscount in the TransactionService rather then calling directly each calculation within each service.
POS Operations
Many operations in the POS directly call the Discount service. Here below is a list of all the operations and which functions they call
Name | Description |
---|---|
Clear periodic discounts | Calls functions ClearManuallyTriggeredDiscount, CalculateDiscount |
Manually triggered periodic discounts | Calls function ManuallyTriggerPeriodicDiscount |
Display total | Calls function CalculateDiscount |
Any payment operation | Calls function CalculateDiscount |
Loyalty point discount | Calls function CalculateDiscount |
Total discount amount or % | Calls functions AddTotalDiscountAmount, AuthorizeTotalDiscountAmount, AddTotalDiscountPercent, AuthorizeTotalDiscountPercent |
Line discount amount or % | Calls functions AddLineDiscountAmount, AuthorizeLineDiscountAmount, AddLineDiscountPercent, AuthorizeLineDiscountPercent |
Development pack
To find this service in the development pack go to DevPack\Source\Core\Common_services