Jump to content
Chance

Profit and Loss Report

Recommended Posts

Just noticed the report doesn't account for when someone uses a coupon/discount code in the income reports. So if Joe purchased someone for $100 but used a $50 off coupon, this report shows $100 in revenue when it's actually only $50.

 

Jess

Share this post


Link to post
Share on other sites

Hello,

 

I would say to make sure that you have uploaded the reportfunctions_2.php file into your WHMCS includes directory, and make sure you upload the profit_and_loss_2.php and sales_by_product_2.php files into your WHMCS modules/reports directory.

 

These two reports require no changes to any WHMCS settings or database. By default, they should pull and accurately report your sales data.

Share this post


Link to post
Share on other sites

Chance, thank you very much for this great report! Very cute and useful, just I was looking for. You are really coll man $-)

Share this post


Link to post
Share on other sites

Have you read the thread and tried what worked for others?

 

Do you get any errors in your log files?

Share this post


Link to post
Share on other sites

I only glanced through it real quick and missed it >.<

 

thanks for making me READ, lol

 

I would say to make sure that you have uploaded the reportfunctions_2.php file into your WHMCS includes directory, and make sure you upload the profit_and_loss_2.php and sales_by_product_2.php files into your WHMCS modules/reports directory.

Share this post


Link to post
Share on other sites

I checked my installation and it still will not pick up the product/services that are created as "Other".

Is it possible to fix this?

 

//jonas

Share this post


Link to post
Share on other sites

It looks like the module didn't less out any transaction fees imposed by the payment gateways?

Share this post


Link to post
Share on other sites

Great report, wish it would convert all currency to base currency value based on the exchange rate in invoice table.

Share this post


Link to post
Share on other sites

JLHC:

In the very first post of this thread I indicated the report highlighted here actually is an excerpt from our own Profit & Loss report that we use to track all income and expenses within our WHMCS install. Our P&L report does report transaction fees and the report lists that as an expense titled 'Merchant Account Fees' under 'Cost of Goods Sold'. Gross Profit is calculated based on all products'/services' income minus all expenses to get those products/services sold.

 

pjs32:

A P&L report typically does not show any tax-related data as that is not considered an expense. We, too, wanted to see how much tax we collected and paid to the appropriate agencies and so we wrote our own Sales Tax Liability report. That report lists each invoice's non-taxable items, taxable items, subtotal, credit, discount, total tax, and invoice total on a line-by-line basis for whatever calendar month/year desired. Then the footer of this report includes gross sales, taxable sales, exempt sales, tax collected, etc. for that period. Using this Sales Tax Liability report we can quickly determine how much tax we collected. We then add this Tax Collected amount from the Sales Tax Liability report to our Total Expenses amount from the Profit & Loss report, and subtract that total from our Gross Profit on the Profit & Loss report to determine our bottom line Net Income. Seems like a lot of steps but it is only two reports and basic math.

 

AndyW:

Converting to base currency rate is not as simple as it may sound. First, there is no exchange rate in the invoice table as you mentioned. Nor is there any reference in the invoice table to the currency used. An invoice record links to a client record and that client record dictates the default currency used by that client but not necessarily the currency used for each invoice. Now, there is an exchange rate in the transactions table that does link to each invoice and that could be used. However, we chose not to include currency conversion data in our reports because we do not have any clients that use anything other than USD. For those WHMCS members that do accept multiple currencies, this will definitely be a limitation. If you would like, you can PM me and we can discuss the cost for us to create a custom version for you.

Share this post


Link to post
Share on other sites

Is it possible to sort the income according to the client's country? For tax reporting purposes.

Share this post


Link to post
Share on other sites

Love this report. Thanks for your time and for sharing it! It doesn't look like it includes the add-ons (in our case dedicated IP's and SSL certs) for the hosting products it is reporting, nor is is including any of the setup fees for hosting plans. So the numbers are off for us. Is it possible to include those?

Share this post


Link to post
Share on other sites
JLHC:

AndyW:

Converting to base currency rate is not as simple as it may sound. First, there is no exchange rate in the invoice table as you mentioned. Nor is there any reference in the invoice table to the currency used. An invoice record links to a client record and that client record dictates the default currency used by that client but not necessarily the currency used for each invoice. Now, there is an exchange rate in the transactions table that does link to each invoice and that could be used. However, we chose not to include currency conversion data in our reports because we do not have any clients that use anything other than USD. For those WHMCS members that do accept multiple currencies, this will definitely be a limitation. If you would like, you can PM me and we can discuss the cost for us to create a custom version for you.

 

Have a look at tblaccounts > rate. Just divide invoice amount by the 'rate' given to get amount in base currency.

Share this post


Link to post
Share on other sites

pjs32:

A P&L report typically does not show any tax-related data as that is not considered an expense. We, too, wanted to see how much tax we collected and paid to the appropriate agencies and so we wrote our own Sales Tax Liability report. That report lists each invoice's non-taxable items, taxable items, subtotal, credit, discount, total tax, and invoice total on a line-by-line basis for whatever calendar month/year desired. Then the footer of this report includes gross sales, taxable sales, exempt sales, tax collected, etc. for that period. Using this Sales Tax Liability report we can quickly determine how much tax we collected. We then add this Tax Collected amount from the Sales Tax Liability report to our Total Expenses amount from the Profit & Loss report, and subtract that total from our Gross Profit on the Profit & Loss report to determine our bottom line Net Income. Seems like a lot of steps but it is only two reports and basic math.

 

Thanks - would you be willing to share your Sales Tax Liability report script?

Share this post


Link to post
Share on other sites
On 7/1/2011 at 11:27 PM, Chance said:

Hello,

 

This post is in response to both the repliers of this post here and those that have PMed us regarding uploading our custom reports so that members could preview them.

 

I have edited these reports extensively to remove all of our additional customizations that do not pertain to the original topic, which was custom reports on income from products. If you are interested, we will also share our customized Sales Tax Liability report, which includes much more detailed information for tax-reporting purposes in the US.

 

There are three files for Product Sales:

1) reportfunctions_2.php, containing a mixture of functions and code used by all reports.

2) profit_and_loss_2.php, containing summary info of income from all products, domains, etc.

3) sales_by_product_2.php, containing the detail lines used to build the profit_and_loss report.

 

I will not explain how the reports work as it should be pretty straightforward once you upload the scripts to your WHMCS install.

 

Again, if you have trouble getting them to work, I would be willing to share a desktop session so that you can see our reports in live action.

 

Anyway, thank you to every one that has shown interest and happy customizing!!!

custom_reports.zip

Does this work until today? Please enlighten me. Thanks

Share this post


Link to post
Share on other sites
6 hours ago, Mauwiks said:

Does this work until today?

install it & see! 🙂

it loads in v7.7.1 without issue (once you remember to put reportfunctions_2.php in the correct folder!) - so assume it would work in any version from the last 8 years... though I personally wouldn't class it as a P&L report, more of an expanded income report.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated