How to create a Discount?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2220
    marcnyc
    Participant

    I was wondering how I can create a discount in the lines of an invoice.
    I used to be able to add a minus sign to create a discount, but now when entering a discount, I get an error that says “Invalid Number Entered”.

    Thank you

    #2221
    RRowley
    Participant

    The only way currently is to create a product record for the credit/discount. I know this is a hassle but in the meantime, I’ll look at what it takes to allow a negative amount on the invoice amount field.

    #2222
    RRowley
    Participant

    My mistake on the previous message. I apparently had the negative product prior to change to globalization that introduced new validation logic. The logic builds a pattern for the allowed form of numbers and it does not include allowance for an amount sign. I’m trying to see what it will take to correct this.

    #2223
    RRowley
    Participant

    Until I am able to make this change official, you can make the following modification to line 37 of the include/js/globalizedNumberValidator.js file. Make the line read as follows:
    let pattern = '^-?';
    This allows an optional leading minus sign on numeric fields.

    #2224
    marcnyc
    Participant

    Wonderful RRowley! Thank you for doing that!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.