Aller directement à la fin des métadonnées
Aller au début des métadonnées

Sales Taxes and Invoicing - Phase 1 added functionality to display credit notes, and allow users and administrators to print and deliver to users an official credit note for cases when an amount was paid against an invoice but the obligation to pay was cancelled, eg membership cancelled, event registration cancelled, etc.

This page specifies an enhancement to allow back office administrators to apply credit notes to pay for new and existing obligations. In most cases this will involve applying a credit note against an amount owing on a new or existing contribution of the same contact. Also, sometimes credits with one contact need to be applied to another contact's obligations, eg chapters of an organization or employees of an organization may need to have their credits shared.

Here is the UX mockup:

The accounting entries for this are:

  1. Reduce the amount overpaid on the contribution with the credit note being applied (with contribution status of pending refund): data flow tbd.
  2. Apply a partial or complete payment to the new or editted contribution: data flow tbd.

The data flow needs to find the right financial account for the credit note amount. I believe this will be derived from the credit note contribution's financial_trxn.

The same UI will be used for New Payments to allow for use of this Payment Method.

With the new possibility of multiple credit notes being created from one contribution, the current core implementation of storing the credit note ID on the contribution is no longer sufficient. The extension will create a new table, credit_note, as follows:

credit_note_reference varchar(255) COMMENT 'Human readable unique identifier concatenating cn_prefix setting, "_", id'
contribution_id COMMENT 'The contribution providing the funds'
financial_trxn_id COMMENT 'The payment financial transaction paid for'

Once the extension has been used for a while, a core change may be submitted to remove contribution.creditnote_id field as part of a LExIM Leap.

On the User Dashboard, change text on button (when enabled and present based on contribution being overpaid) from 'Print Invoice and Credit Note' to 'Print Invoice and Credit Note(s)'. Change the download so that multiple credit notes are included if they have been created from an Invoice's overpayment.


  • Aucun
  1. Jun 19, 2017

    JoeMurray dit :

    1. Jun 19, 2017

      so this UI handles how to apply the credit note. but how do you "create" the credit note? does that happen automatically when a contrib is in canceled status or the amount paid exceeds the amount owed for a contrib? in either case, how does the user decide the overpayment should be used as a credit vs. issuing a refund? or does that money simply sit in a pot and can be tapped for either purpose at any time?

      along those same lines – how do we handle a situation where a contrib has been cancelled or overpaid but is NOT eligible for a refund or credit? for example, an org might have a policy where event registration cancellations more than 30 days before the event are eligible for refund or credit, but < 30 days are not. I don't think they want that pot of money always available via the UI or staff might accidentally select it.

      re: the selection of the credit not amount – if I read your description correctly, you can't apply a credit note if the credit amount exceeds the amount owed for the contrib you're trying to apply it to. so that means you can't use a credit note to make payments on two contribs, correct? ideally it would be more flexible than that. but I understand if that starts to wander into confusing grounds...

      other than that, the UI looks good.

      1. Jun 26, 2017

        JoeMurray dit :

        Great questions.

        1. A credit note currently exists when more money has been paid on an invoice than the contributor is obligated to pay. So, an overpayment, either initial or after the fact. Or cancelling a line item or changing the total amount due when this will make the amount paid into less than the amount owed. This happens automatically at present. It can be tapped either to provide a refund or be applied as a credit note at any time at present.
        2. We would need to develop a spec for this. There could be a workflow/workaround where they don't bother to cancel things they aren't going to refund or use as credit notes. They could also edit a contribution that is currently overpaid and add 'obligations' to it so it no longer is overpaid.
        3. You can apply a credit note against any existing obligation, but you can't overpay an obligation with a credit note. So a credit note for $50 can be used to completely pay a $10 obligation, leaving $40 available, and this $40 could be applied against a $100 obligation/unpaid contribution, using it all up and leaving the partially paid contribution with $60 still owing. A second credit note could then be used against the $60, ie more than one credit note can be applied to a single contribution. However, the UI is set up to only allow one credit note to be applied to one contribution at a time.
        1. Aug 11, 2017

          JoeMurray dit :

          How are credit notes created?

          Googling how overpayments and credit notes are handled in accounting packages indicates that there is not a real standard here, and some take the simple route of just allowing overpayments to be applied as a payment to other invoices. So there is no need for something like a button 'Create Credit Note' to be displayed in addition to 'Record Refund' when there has been an overpayment on an invoice. So we'll leave the current approach to Credit Notes implemented in CiviCRM alone. Refunding all of an overpayment eliminates the credit note otherwise available to pay other invoices.


  2. Jun 20, 2017

    Jamie Novick dit :

    Hi Joe,

    Let me digest over the next few days and come back to you. There will be a few things to unpick here and we can use this as an opporutnity to clean up a few things.


    1. Jul 18, 2017

      JoeMurray dit :

      Ping. I missed you on Skype today (triste)

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.