# Access to "Date Paid" field in custom reporting

**URL:** <https://community.breww.com/t/access-to-date-paid-field-in-custom-reporting/1040>\
**Category:** Help & advice\
**Tags:** reporting\
**Created:** [12 April 2022 15:34 UTC](https://community.breww.com/t/access-to-date-paid-field-in-custom-reporting/1040 "2022-04-12T15:34:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris-macdonald](https://community.breww.com/user_avatar/community.breww.com/chris-macdonald/32/433_2.png) [@chris-macdonald](https://community.breww.com/u/chris-macdonald)\
**Post date:** [12 April 2022 15:34 UTC](https://community.breww.com/t/access-to-date-paid-field-in-custom-reporting/1040/1 "2022-04-12T15:34:18Z")

</div>

Goal:  
We are trying to create a report that shows the percentage of Sales Orders that have been paid on time vs Sales orders that were paid after the payment term due date.

Challenge:  
We are unable to find the “Date Paid” on custom reporting pages. We checked both the **Sales Order** & the **Payments & refunds on orders** report page.

In both cases, we did not see a “Date Paid” field:

 ![Screen Shot 2022-04-12 at 11.26.52 AM](https://breww-community.fra1.digitaloceanspaces.com/original/1X/bd6ea42062548680d030d5771722dbc3bf216f76.png)

@luke was able to help us figure out the syntax for creating reports that identify Sales Orders that are PAST DUE, but the challenge now is to try and identify orders that are currently paid, but were late.

Please let me know if you need any additional info, thanks!

---

<div class="post-metadata">

**Author:** ![luke](https://community.breww.com/user_avatar/community.breww.com/luke/32/3636_2.png) [@luke](https://community.breww.com/u/luke)\
**Post date:** [20 April 2022 18:46 UTC](https://community.breww.com/t/access-to-date-paid-field-in-custom-reporting/1040/2 "2022-04-20T18:46:19Z")

</div>

Sorry for the delay in getting back to you, and great to hear that you got the syntax for the other report sorted.

From the **Payments & refunds on orders report** , you can use the **`Date`** field for the date of the payment (or refund). You can also use the **`Is payment`** field to check you’re looking at a payment and not a refund as a single order can have multiple transactions against it.

Because an order can have multiple payments and refunds against it, this is why there is no “date paid” field on an order/invoice (what date would we use if it was partly paid last week and the remainder today?). I guess we could have a “date fully paid” field which would be helpful for you here and unambiguous. If this is something you’d like to see, could you add a [feature request](https://community.breww.com/c/ideas-feature-requests/11) for this and we’ll look to get this added.

If you know that you only have one payment per order, then you can use the **Payments & refunds on orders** report as your starting point and “join” through to the invoice information from there. I hope this makes sense, but please let us know if you need anything else.

---

<div class="post-metadata">

**Author:** ![chris-macdonald](https://community.breww.com/user_avatar/community.breww.com/chris-macdonald/32/433_2.png) [@chris-macdonald](https://community.breww.com/u/chris-macdonald)\
**Post date:** [21 April 2022 15:29 UTC](https://community.breww.com/t/access-to-date-paid-field-in-custom-reporting/1040/3 "2022-04-21T15:29:47Z")

</div>

> [@luke](#):
>
> Payments & refunds on orders

Thanks @luke! I opened a new feature request ticket as requested.

I was not aware you are able to “JOIN” reports to pull in additional details.

Is this feature similar to joining tables in a relational database like SQL?

---

<div class="post-metadata">

**Author:** ![luke](https://community.breww.com/user_avatar/community.breww.com/luke/32/3636_2.png) [@luke](https://community.breww.com/u/luke)\
**Post date:** [25 April 2022 15:09 UTC](https://community.breww.com/t/access-to-date-paid-field-in-custom-reporting/1040/4 "2022-04-25T15:09:39Z")

</div>

Yes, this is just like joining in SQL and in fact that’s how it works under the hood. If you choose a field with a dot in it with BrewwQL, or an arrow on the field selections in the Raw Data Explorer, these are joins to another table.

For example, in this screenshot (which is based on the Payments & refunds report), you can see the “Invoice” fields and these are from joining through from the payments/refunds data (table) through to the invoice data (table).

 ![Screenshot 2022-04-25 at 16.06.53](https://breww-community.fra1.digitaloceanspaces.com/original/1X/228fd7e8f9f769eef57678966637cca1b63e2e2e.png)

I hope this makes sense.
