Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto calculate discountd,discounted percentage,freeissued #30

Open
TheTharz opened this issue Apr 15, 2024 · 0 comments
Open

Auto calculate discountd,discounted percentage,freeissued #30

TheTharz opened this issue Apr 15, 2024 · 0 comments
Assignees
Labels
functinality Added a new functionality

Comments

@TheTharz
Copy link
Member

Issue Description

Objective

Create service logic to autofill certain fields when creating a new item, specifically handling the autofill functionality for discounted price, discounted, and free issued fields.

Details

  1. Discounted Price Autofill: When creating a new item, if the discounted percentage is provided, calculate and autofill the discounted price based on the selling price and discounted percentage.
  2. Discounted Autofill: If a discounted percentage is provided, automatically set the discounted field to true; otherwise, set it to false.
  3. Free Issued Autofill: If the discounted percentage is 100 (indicating a free item), set the free issued field to true; otherwise, set it to false.

Logic Steps

  1. Listen for changes in the discounted percentage field.
  2. If a discounted percentage is provided:
    • Calculate the discounted price based on the selling price and discounted percentage.
    • Set the discounted field to true.
    • If the discounted percentage is 100, set the free issued field to true; otherwise, set it to false.

Example

If the user enters a discounted percentage of 20%, the discounted price should be calculated and filled automatically. The discounted field should be set to true. If the discounted percentage is 100%, indicating a free item, the free issued field should also be set to true.

Acceptance Criteria

  • The discounted price field should be automatically filled when a discounted percentage is provided.
  • The discounted field should be set to true if a discounted percentage is provided.
  • The free issued field should be set to true if the discounted percentage is 100; otherwise, set it to false.

Notes

  • Ensure that the autofill logic is implemented securely to handle edge cases and validations appropriately.
  • Test the autofill functionality thoroughly to validate its accuracy and reliability.
@TheTharz TheTharz self-assigned this Apr 15, 2024
@TheTharz TheTharz added the functinality Added a new functionality label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functinality Added a new functionality
Projects
Status: No status
Development

No branches or pull requests

1 participant