Project

General

Profile

Additional Discount

Technical documentation
08/19/2024

Requirement Overview

The additional discount feature is primarily developed for B2B businesses, where customers can apply multiple flat discounts.Here, all products in the transaction must be taxable, so it's mandatory to enable compulsory VAT items creation in masters.

Database Changes

  • Introduce a new setting ‘EnableAdditionalDiscount ‘ where
    • enableAdditionalFlatDiscountsInSales = 1
    • VATEXCLUDINGRATE = 1
      • It will display a add icon, enabling users to include additional discounts.
  • enableAdditionalFlatDiscountsInSales = 0
    • It will continue to function in the same way as it currently does, meaning no change. No Plus icon will be shown
  • Add the table tblAdditionalFlatDiscounts.

Limitation

  • This functionality will only work when VATEXCLUDINGRATE = 1.
  • Credit Note is under developing process

Functional Requirement

Requirement 1 : Generate the setting ‘enableAdditionalFlatDiscountsInSales’ and ‘VATEXCLUDINGRATE ‘
*if set to 1
  • Add the icon right side of the flat
  • Flat Discount % or Flat Disc(Rs) will be disabled
    • Hover : In Plus Icon: ‘Add Additional Discount’
    • If the user has an individual discount applied in a transaction, implement a pop up message when the Plus icon is clicked.
    • On the validation pop-up, when the user clicks on an option:
      • Before: The system shall calculate the additional discount before applying the individual discount.If the individual discount % is provided, it will be calculated based on the actual gross amount
      • After: The system shall calculate the additional discount after applying the individual discount.
      • Overwrite: The system shall calculate the additional discount after removing the individual discount.
  • if set to 0 no change. Hide Plus Icon

Requirement 2: Upon clicking on the plus button ,open the pop up box which will triggered by the plus icon that is place at the right side of the flat discount amount field same of the pop up is placed below :

  • Bill Gross Amount
    • Bill amount before discount
  • Discountable Amount
    • Before : Bill amount before discount
    • After : Bill amount after individual discount
    • Overwrite : Bill amount after removing individual discount if given.
  • Discount Name
    • This field will display the discount names created in the tblAdditionalFlatDiscounts. They should be listed in ascending order based on their serial numbers (SN).
    • Note : tblAdditionalFlatDiscounts: This is the master table for configuring additional discount names as per client requirement.
  • Discount Rate
    • Discount Rate is an input field where the user will enter the discount in %.
    • Note : Discount Rate or Discount Amount should not be greater than the total discountable amount
  • Discount Amount
    • Discount Amount is an input field where the user will enter the discount in amount.
  • Amount[After Disc]
    • The discountable amount is computed after applying discounts at various levels. This field serves to calculate the additional discount for subsequent levels of discounting.
    • The amount(after disc) should not be negative.
Note :
  • When the discount rate or amount is changed after initially being entered, the system must recalculate the amount after discount accordingly.Once the first discount is entered, the first grid will be locked when moving to the second discount grid. To change the first discount, the user must delete all discounts entered after the first grid.
  • For instance, in a grid, if the value in the last discount grid is changed, only the amount (after discount )of the last line will be recalculated
  • When % discount is entered in pop up box then discount amount should be auto calculated in box
  • When discount amount is entered in pop up box then discount % should be auto calculated in box
Requirement 3: Design the print layout for multi-level discount invoice printing for
  1. Sales Order
  2. Proforma Invoice
  3. Sales Tax Invoice
  4. Sales Tax Invoice (Wholesale)
  5. Quotation

Requirement 4:
When transitioning from Proforma to Sales Tax Invoice or from Quotation to Sales Order, the complete invoice can include additional discounts, whereas a partial item import cannot include additional discounts. In the case of Sales Order vouchers, full item orders can include additional discounts, while partial orders cannot.Carry forward of the Proforma to Sales tax Invoice is, Quotation to Sales Order full invoice can carry forward additional discount where as partial item import can’t carried forward additional discount, Sales Order voucher full item carry forward additional discount than carry forward the additional discount if partial will not be carried forward additional discount during voucher conversion.

Validation Message :
When converting a partial Quotation/Sales order, any multiple-level flat discounts will be removed during the conversion to Sales Order/Sales Invoice. They should be posted manually after conversion. Do you wish to continue?
Yes: Discard the additional discount on the converted voucher.
No: Stop the voucher conversion process and take the user to the main transaction page

UI Design

https://www.figma.com/file/HMBb0QmjnEndEBaoKdKttR/Additional-Discount?type=design&node-id=0%3A1&mode=design&t=wDrKEDJmz5oKuVvh-1

Application Flow

FLOW 1
  • Navigate to the Sales Tax Invoice, then click on the plus icon located on the right side of the flat discount field.
  • Once the pop-up box is triggered, proceed to apply the multiple-level additional discount and save the transaction.
    Or
  • First, enter the individual discount, then apply the additional flat discount then save the
    transaction.

FLOW 2

  • Navigate to the Sales Order, Proforma, and Quotation sections, then convert the transactions into sales vouchers. Verify whether the discounts are carried forward correctly.
  • Definition of Done *
  • The additional discount feature should be implemented and controlled by settings in all the mentioned forms and workflows outlined above.

Files