Topic: My COGS is doubled. Please help

Hi all,

I hope I am posting this in the correct thread.

Basically, I am having an issue where my COGS is double than the original amount.

If you refer to the picture at http://img441.imageshack.us/img441/8537/47951673.jpg, you will notice that I had made a purchase for a service-based item from Supplier BEA for the sum of 1113.42 which subsequently debits the COGS and credits the AP. These transactions are referred to under Supplier Invoice #2.

Now here comes the issue, when I actually sell back the same service-based item to Customer FLE for the same sum, 1113.42, the system subsequently debits the COGS account again which therefore doubles the overall COGS amount. These transactions are referred to under Delivery Note #1.

This has resulted in incorrect figures being recorded in the P&L statement where the expected COGS should only be 1113.42 instead of 2226.84. I hope you understand what I mean with this and would appreciate any sort of advise given to help to resolve this issue.

Thanking you in advance for any help rendered.

Re: My COGS is doubled. Please help

There seems to be some wrong setup. When you call it a service item, are you sure you didn't set it up as Item Category 'Service' and not the Item Type as 'Service'?

If this is setup correctly as a Service Item Type there will be no GL transactions on delivery.

/Joe

Re: My COGS is doubled. Please help

Hi Joe,

Thank you for your reply.

Yes, I can confirm that I have configured the service item under the "Services" category and also set the item type as "Service".

I simulated the issue under a newly installed system and this is what I did to re-produce the same issue:

1. Add a service-based item called "Test" with item code "01" and categorize it in the "Services" category and set the the item type as "Service"
2. Purchase the service-based item "01 - Test" from a supplier under the Purchases module
3. Sell the service-based item "01 - Test" to a customer under the Sales Module
4. Check the GL and the result is, there is a double COGS entry

I am using FA 2.2.11 under Windows, PHP 5.2.6 and MySQL

Thanks.

Re: My COGS is doubled. Please help

Hi Joe,

Just for your further information, I simulated the issue under "Testing Co" and there was no problem. It debits and credits COGS accordingly but when I create a new company with new service-based items, it debits COGS and credits Inventory.

Question: Is there a way to configure service-based items to debit and credit COGS?

Re: My COGS is doubled. Please help

There must be some setup problems somewhere in the chart of accounts you use. Which chart of account did you use when creating a new company?
Check that all related Inventory and COGS accounts are setup correctly in System and GL Setup, Supplier, Item Categories, Items, Branch accounts.

According to your information you have created a correct Service Item. But somewhere there is a mismatch in COGS account setting.

/Joe

Re: My COGS is doubled. Please help

Hello again,
It seems that you have encountered a bug in 2.2.11 and 2.3 RC1.
We are not maintaining 2.2.11 anymore, but you can fix this bug in file /sales/includes/db/sales_delivery_db.inc line 93:

if ($delivery_line->standard_cost != 0) {

to

if (is_inventory_item($delivery_line->stock_id) && $delivery_line->standard_cost != 0) {

This will prevent future problems.

The operations already done, you can counter-book the bookings from the delivery note in Journal Entry. Remember to use the same date.

Thanks for finding this bug, and good luck.

/Joe

Re: My COGS is doubled. Please help

Hi Joe,

Thanks for your reply.

After days of searching, we finally found a solution to this. It was simple, we reinstalled the system and configured the services-based category to credit COGS instead of Inventory. And everything worked fine after that.

I would suggest you take a look at the SQL script (en_US-new.sql) for creating the database for the Items category. The services category is currently set to credit Inventory by default at line 1337 in the script.

Thanks.