# Producing a customer Statement

**URL:** <https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418>\
**Category:** Using my Dolibarr\
**Created:** [November 16, 2011, 12:35pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418 "2011-11-16T12:35:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Lister](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/m/f17d59/32.png) [@Mark\_Lister](https://www.dolibarr.org/forum/u/Mark_Lister)\
**Post date:** [November 16, 2011, 12:35pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/1 "2011-11-16T12:35:06Z")

</div>

Hi, can’t seem to find any way of making and sending our customers an end of month statement to assist them in paying invoices on time.

In our case it’s one of the basic requirements as we regularly get requests from our customer for a monthly statement.

Please let me know if this is possible as I just can’t find the option.

Thanking you in advance,

Mark

 ![RALScontact.jpg](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/1X/f6e554616d53e38198aefa12cf88d1c3134c6020.jpeg)

---

<div class="post-metadata">

**Author:** ![markmasc](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/markmasc/32/257_2.png) [@markmasc](https://www.dolibarr.org/forum/u/markmasc)\
**Post date:** [November 16, 2011, 4:26pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/2 "2011-11-16T16:26:16Z")

</div>

I haven’t managed to find it either and I would find it very useful too.

The only similar thing I managed to find (which is only screen display is:  
Click Third Party  
Click Customer Tab  
Click All Invoices  
The address should looks something like this:  
/dolibarr/compta/facture.php?socid=6  
… not much useful

---

<div class="post-metadata">

**Author:** ![markmasc](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/markmasc/32/257_2.png) [@markmasc](https://www.dolibarr.org/forum/u/markmasc)\
**Post date:** [November 25, 2011, 11:20am UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/3 "2011-11-25T11:20:42Z")

</div>

Is there a way to produce and print a Customer Statement?

---

<div class="post-metadata">

**Author:** ![markmasc](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/markmasc/32/257_2.png) [@markmasc](https://www.dolibarr.org/forum/u/markmasc)\
**Post date:** [January 16, 2012, 2:00pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/4 "2012-01-16T14:00:04Z")

</div>

Any feedback?

---

<div class="post-metadata">

**Author:** ![vmamet](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/vmamet/32/27_2.png) [@vmamet](https://www.dolibarr.org/forum/u/vmamet)\
**Post date:** [November 27, 2012, 9:56am UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/5 "2012-11-27T09:56:31Z")

</div>

I also think that a customer statement is a must !

Please answer to the topics at least !

regards

---

<div class="post-metadata">

**Author:** ![altatof](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/altatof/32/2426_2.png) [@altatof](https://www.dolibarr.org/forum/u/altatof)\
**Post date:** [November 27, 2012, 8:36pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/6 "2012-11-27T20:36:07Z")

</div>

The best thing you can do is to write a detailed analysis of your needs, then maybe ask one of the numerous companies working around dolibarr to develop the functionality.

That’s the best way to see your needs fulfilled and integrated into the software strategy.

Otherwise, wait for a nice developer to take care freely of your needs, or another customer to finance its development.

Someone said “free software is free once it have been paid” or something like that.

When you use a software like dolibarr, you have it for free but other companies have already financed its evolutions, so if you do need some improvements, feel free to finance them :wink:

---

<div class="post-metadata">

**Author:** ![abhimanyu](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/abhimanyu/32/335_2.png) [@abhimanyu](https://www.dolibarr.org/forum/u/abhimanyu)\
**Post date:** [June 16, 2014, 12:23pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/7 "2014-06-16T12:23:22Z")

</div>

I have finally created a Customer statements by generating the values of all the data from the selected invoices and generating it in to one pdf instead of just merging all the pdfs  
It took a long and lenghty process but finally achieved it. Will soon post the code

---

<div class="post-metadata">

**Author:** ![alvin](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/alvin/32/423_2.png) [@alvin](https://www.dolibarr.org/forum/u/alvin)\
**Post date:** [December 22, 2017, 1:51pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/8 "2017-12-22T13:51:14Z")

</div>

Anyone have a customer statement yet?

---

<div class="post-metadata">

**Author:** ![ariffidaali](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ariffidaali/32/462_2.png) [@ariffidaali](https://www.dolibarr.org/forum/u/ariffidaali)\
**Post date:** [December 22, 2017, 6:03pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/9 "2017-12-22T18:03:41Z")

</div>

Yes I have:

 ![CustStat.jpg](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/c/cafd5d9ceec4414aa96243ceec0795d658892a04.jpeg)

---

<div class="post-metadata">

**Author:** ![alvin](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/alvin/32/423_2.png) [@alvin](https://www.dolibarr.org/forum/u/alvin)\
**Post date:** [December 23, 2017, 1:42pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/10 "2017-12-23T13:42:25Z")

</div>

So where did you get that little button at the top that say (Reports)?

---

<div class="post-metadata">

**Author:** ![alvin](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/alvin/32/423_2.png) [@alvin](https://www.dolibarr.org/forum/u/alvin)\
**Post date:** [December 23, 2017, 2:18pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/11 "2017-12-23T14:18:38Z")

</div>

Has anyone tried this?

> **[pailletm/dolibarr\_reportico](https://github.com/pailletm/dolibarr_reportico)**
>
> Contribute to pailletm/dolibarr\_reportico development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![ariffidaali](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ariffidaali/32/462_2.png) [@ariffidaali](https://www.dolibarr.org/forum/u/ariffidaali)\
**Post date:** [December 24, 2017, 3:41pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/12 "2017-12-24T15:41:04Z")

</div>

I installed an addon called mylist from dollistore but it’s Menu text was patastools so I changed it to reports from here:  
Home-\>Setup–\>Menu–\>Menu Editor

---

<div class="post-metadata">

**Author:** ![ariffidaali](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ariffidaali/32/462_2.png) [@ariffidaali](https://www.dolibarr.org/forum/u/ariffidaali)\
**Post date:** [December 28, 2017, 1:38pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/13 "2017-12-28T13:38:34Z")

</div>

Hi Alvin,  
I tried the Reportico addon without success. I can get the module running:

But then when I run the project and clicking on Go throws the following error:

 ![reportico_error.jpg](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/5/5ce1da3c8a208363e8e486943ff1fbfc27873542.jpeg)

---

<div class="post-metadata">

**Author:** ![jamshaidalipak](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@jamshaidalipak](https://www.dolibarr.org/forum/u/jamshaidalipak)\
**Post date:** [April 16, 2018, 5:26am UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/14 "2018-04-16T05:26:30Z")

</div>

Where did you get that Reports’ module from?

---

<div class="post-metadata">

**Author:** ![ariffidaali](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ariffidaali/32/462_2.png) [@ariffidaali](https://www.dolibarr.org/forum/u/ariffidaali)\
**Post date:** [April 16, 2018, 7:22am UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/15 "2018-04-16T07:22:22Z")

</div>

Hi jamshaidalipak,  
I used a module myList from Dolistore and then I changed menu to Reports after installing it. Home-\>Setup–\>Menu–\>Menu Editor

---

<div class="post-metadata">

**Author:** ![kalsedia](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/k/bbe5ce/32.png) [@kalsedia](https://www.dolibarr.org/forum/u/kalsedia)\
**Post date:** [March 30, 2019, 6:24am UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/16 "2019-03-30T06:24:01Z")

</div>

Hi ariffidaali,  
Can you share the code you used with myList to get the statement ?

---

<div class="post-metadata">

**Author:** ![ariffidaali](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ariffidaali/32/462_2.png) [@ariffidaali](https://www.dolibarr.org/forum/u/ariffidaali)\
**Post date:** [March 31, 2019, 9:33pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/17 "2019-03-31T21:33:02Z")

</div>

Hi Kalsedia,

This is the xml code I used for the customer statement list in myList:  
Omit warehouse as that is a custom field in the table that I created

[code]

\<?xml version='1.0' encoding='ISO-8859-1'?\>

Invoice Status  
Invoice Status  
accountancy  
  
  
  
false  
  
0  
\<model\_pdf\>-1\</model\_pdf\>  
  
  
from custstat c  
ORDER BY datec desc

 Date Created datec Date\_Created Date 1 left 1 0 0 1 1 100 0 Invoice Date Inv\_Date Date 2 left 1 0 0 1 1 100 0 Invoice No. Inv\_No Text 3 Facture:/compta/facture/class/facture.class.php:facture:facnumber left 1 1 1 100 Customer Customer\_Name Text 4 left 1 0 0 1 1 100 0 Customer Ref Customer\_Ref Text 5 left 1 0 0 1 1 100 0 Invoice Amount Inv\_Amount Number 6 left 1 0 0 1 1 100 0 Paid Amount Paid\_Amount Number 7 left 1 0 0 1 1 100 0 Balance Balance Number 8 left 1 0 0 1 1 100 0 Payment Status Payment\_Status Text 9 left 1 0 0 1 1 100 0 By user Text 10 left 1 0 0 1 1 100 0 Warehouse warehouse Warehouse Text 11 left 1 1 1 15 [/code]

 ![editsettingmylist.png](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/0/046c11707df11f630152a3eb5c83e9bb2fa01b54.png)

---

<div class="post-metadata">

**Author:** ![ariffidaali](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ariffidaali/32/462_2.png) [@ariffidaali](https://www.dolibarr.org/forum/u/ariffidaali)\
**Post date:** [March 31, 2019, 9:46pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/18 "2019-03-31T21:46:10Z")

</div>

I first created this View called custat in the mysql database:

`
SELECT DISTINCT
    f.facnumber AS Inv_No,
    f.datef AS Inv_Date,
	f.datec,
    UCASE(s.nom) AS Customer_Name,
	f.ref_client as Customer_Ref,
    f.total_ttc AS Inv_Amount,
    p.datep AS Payment_date,
    p.ref AS Payment_Ref,
    sum(coalesce(pf.amount, " ")) AS Paid_Amount,
   f.total_ttc - sum(coalesce(pf.amount, " ")) AS Balance, 
CASE
/* WHEN f.paye = 1 AND p.datep IS NOT NULL and cp.id = 4 then 'Paid by Cash'
WHEN f.paye = 1 AND p.datep IS NOT NULL and cp.id = 2 then 'Paid by Bank Transfer'
WHEN f.paye = 1 AND p.datep IS NOT NULL and cp.id = 3 then 'Paid by Credit Card'
WHEN f.paye = 1 AND p.datep IS NOT NULL and cp.id = 7 then 'Paid by Check'
WHEN f.paye = 0 AND p.datep IS NOT NULL and cp.id = 4 then 'Partial Payment by Cash'
WHEN f.paye = 0 AND p.datep IS NOT NULL and cp.id = 2 then 'Partial Payment by Bank Transfer'
WHEN f.paye = 0 AND p.datep IS NOT NULL and cp.id = 3 then 'Partial Payment by Credit Card'
WHEN f.paye = 0 AND p.datep IS NOT NULL and cp.id = 7 then 'Partial Payment by Check' */
WHEN f.paye = 1 AND p.datep IS NOT NULL and p.ref is not null then 'Paid'
WHEN f.paye = 1 AND p.datep IS NULL and f.total_ttc = 0 then 'Free of Cost' 
WHEN f.paye = 0 AND p.datep IS NULL THEN 'Not paid'
WHEN f.paye = 0 AND p.datep IS NOT NULL THEN 'Partial Payment'
END AS 'Payment_Status',
CASE
WHEN cp.id = 4 THEN COALESCE(CONCAT(cp.libelle,' ', p.num_paiement), "-")  
WHEN p.num_paiement = '' AND cp.id <> 4 THEN COALESCE(CONCAT(cp.libelle,' ', p.num_paiement), "-")
ELSE 
COALESCE(CONCAT(cp.libelle,' ', 'No.', p.num_paiement), "-")
END AS 'Payment_No',
uc.login as user,
extra.warehouse as warehouse
FROM
    llx_societe AS s
LEFT JOIN llx_c_country AS c ON s.fk_pays = c.rowid,
    llx_facture AS f
LEFT JOIN llx_projet AS pj ON f.fk_projet = pj.rowid
LEFT JOIN llx_user AS uc ON f.fk_user_author = uc.rowid
LEFT JOIN llx_user AS uv ON f.fk_user_valid = uv.rowid
LEFT JOIN llx_facture_extrafields AS extra ON f.rowid = extra.fk_object
LEFT JOIN llx_paiement_facture AS pf ON pf.fk_facture = f.rowid
LEFT JOIN llx_paiement AS p ON pf.fk_paiement = p.rowid
LEFT JOIN llx_c_paiement AS pt ON pt.id = p.fk_paiement
LEFT JOIN llx_c_paiement AS cp ON cp.id = p.fk_paiement
LEFT JOIN llx_bank AS b ON b.rowid = p.fk_bank
LEFT JOIN llx_bank_account AS ba ON ba.rowid = b.fk_account
WHERE
    f.fk_soc = s.rowid AND f.entity IN(1) AND f.facnumber NOT LIKE '%PROV%' and f.facnumber not like '%CN%'
GROUP BY f.facnumber	
ORDER BY
    s.nom,
    f.datef DESC `

 ![CustomerstatementorInvoicestatusmyList.png](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/5/54759b5c1e8f0d9fbdac027632b08cda0bcf1927.png)

---

<div class="post-metadata">

**Author:** ![kalsedia](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/k/bbe5ce/32.png) [@kalsedia](https://www.dolibarr.org/forum/u/kalsedia)\
**Post date:** [April 15, 2019, 2:15pm UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/19 "2019-04-15T14:15:38Z")

</div>

Thank you ariffidaali,

I’ll test it and get back to you.

---

<div class="post-metadata">

**Author:** ![nazeer](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/nazeer/32/37_2.png) [@nazeer](https://www.dolibarr.org/forum/u/nazeer)\
**Post date:** [May 20, 2019, 5:16am UTC](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418/20 "2019-05-20T05:16:05Z")

</div>

Hi, arif  
Thanks for example.

Q. where did you created or inserted this table view?  
Q. Can this list be exported to PDF or ODT template? as export csv is scrambled  
Q. Any idea how to get totals at the end of page?

Thank.

[Next page](https://www.dolibarr.org/forum/t/producing-a-customer-statement/7418.md?page=2)
