Credit Note

pav's Avatar


04 Feb, 2013 05:18 PM


Does any one know or can suggest how to create a Credit Note against the customer account.

Example: I have generated an Invoice for customer, now he calls in and says that there are some problems with invoice and I need to credit some amount back.

Thanks in advance

  1. Support Staff 1 Posted by jBilling on 06 Feb, 2013 03:32 PM

    jBilling's Avatar

    You can provide a credit to the customer by creating a one-time purchase order for the negative amount.

    This one-time order can be picked up by the next billing process, and the credit will be deducted from the total of the invoice.

  2. 2 Posted by pav on 13 Feb, 2013 02:27 PM

    pav's Avatar

    Thanks for your responce.

    If the amount to be credited equals to total amount of the Invoice(crediting the whole invoice amount) does the Invoice status needs to be changed to Paid?

    At the moment invoice it redused amount to 0.00 however did not updated the actual invoice status.


  3. Support Staff 3 Posted by jBilling on 13 Feb, 2013 02:33 PM

    jBilling's Avatar

    If the credit amount equals the invoice total, and the balance on the invoice reads: $0.00, then the invoice should be marked as paid.

    Are you using the community edition?

  4. 4 Posted by pav on 13 Feb, 2013 02:44 PM

    pav's Avatar

    Hi, yes Comminity edition 2.2.0

    The Invoice balance on the screen shows 0.00 however the actual amount in the DB is -0.0015000000. Also does it make difference if Billing process applied Credit Note to Invoice or I have done it manually? I assume behavior should be the same for both cases.

  5. Support Staff 5 Posted by jBilling on 15 Feb, 2013 06:02 PM

    jBilling's Avatar

    The functionality shouldn't matter if the credit is applied to the invoice during a billing process, or if you are generating the invoice manually.

    I would find it very helpful if you could tell me step by step what you did to create and apply the credit to an invoice.

  6. 6 Posted by pav on 18 Feb, 2013 12:17 PM

    pav's Avatar

    I need to credit full invoice for a total of $114.94.

    These are the steps I have done:

    1. Create new Order(One time, post paid) for the total of $-114.94
    2. After order created select "Apply to Invoice"
    3. Select invoice to credit from the list of customer invoices
    4. Confirm
    5. Invoice total changed to 0.00, Balance 0.00, Status "Not paid"

    Have checked DB this time I have Balance and Total of the invoice as 0.0025000000.

  7. 7 Posted by esscort girl on 18 Feb, 2013 05:18 PM

    esscort girl's Avatar

    I’d have to examine with you here. Which is not something I usually do! I get pleasure from studying a post that can make individuals think. Also, thanks for permitting me to remark!

  8. Support Staff 8 Posted by jBilling on 02 Apr, 2013 07:08 PM

    jBilling's Avatar

    This is very strange indeed. It looks like there may be a bug here somewhere... have your results changed since you last made a comment?

  9. 9 Posted by pav on 03 Apr, 2013 10:46 AM

    pav's Avatar

    I think the Issue is with the actual amount for Invoice and Credit Note. JBilling uses BigDecimals for calculations with 10 decimal points precision( not sure why we need so many for accurate calculation), and when tax % is used to calculate total it stores the value in DB for example as 75.8425000000. Credit Note created for a total of 75.84 and when aplied to Invoice the total in DB for Invoice left is 0.0025000000.

    A bit of code debuging shows that the place where Invoice status changed to paid does following comparison:
    // ?if (invoice.getBalance().floatValue() <= 0.001F) {

    if (invoice.getBalance().compareTo(BigDecimal.ZERO) == 0) {
    invoice.setToProcess(new Integer(0)); }

    which implies that invoice balance must be 0 in order to be changed to Paid, in our case it's not(0.0025000000).
    Please note that line is commented out that was handling this before, I assume it's got commented out to support negative invoices concept.

  10. Support Staff 10 Posted by Technical Suppo... on 15 Apr, 2013 04:31 PM

    Technical Support's Avatar

    Hello pav,

    This issue is alredy logged as a bug and it appears when a tax or a late fee has been applied on an invoice.
    Let us know if you've encountered the same bug in other scenarios.

    Thanks for your feedback.
    jBilling Technical Support Team

  11. 11 Posted by nguyencdoan on 07 Jan, 2014 10:56 AM

    nguyencdoan's Avatar

    Hi Everyone!
    I get a problem when I try creating a credit node in Jbilling. I created a credit node but its status is wrong. I performed follow steps:

    1/ I created an order with negative amount
    2/ I click button "Generate Invoice" to create Invoice => Success
    3/ I get an invoice with negative amount (or a credit note) => right, but its status is PAID (expected: UNPAID).

    Is it a bug of Jbilling? How to fix it?
    (I am using a Licensed Jbilling with grails 2.0.3)

    Thanks in advance

  12. Support Staff 12 Posted by Technical Suppo... on 21 Jan, 2015 10:29 AM

    Technical Support's Avatar

    Please let us know If you are still facing same issue .

    Technical Support Team.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac