Inventory on hand cost calculation problem

@sharpdrivetek check the latest version (20.5.92). I think I have created quite decent drilling-down screen to make it more obvious how Manager is calculating the total cost.

It also handles negative inventory. If you sell, write-off and make production order out of inventory which you don’t own, new column Insufficent qty will be shown when drilling-down so you can see which transactions are still pending due to inventory cost not being known yet.

For example:

Inventory item has 3 transactions (purchase 10, sell 10 and write-off 10). Inventory write-off shows 0 amount because after buying 10, then selling 10 qty. There is nothing left. So -10 indicates insuffient qty for inventory write-off to be costed.

If I buy the following day qty of 5, then inventory write-off can be partially costed and you will see insufficent qty decreases from -10 to -5.

Also the bug with when producing new item out of yet to be purchased raw materials have been fixed too.

A business can be paid for goods but not delivered as it is on back order or in production

I’m not sure having a pending inventory write-off makes sense though. Goods in stock can be damaged or lost so need to be written off but planning to loose or damage the the next delivery is not common practice.

Perhaps I’m missing something here but it makes more sense to me if insufficient quantity applies to items to be delivered rather than write off’s

This was just an example. Write-off could have been sale or production order and the mechanics would be the same. The basic idea was to show how Manager justifies amounts deducted from total cost in case there is negative inventory situation.

There is one scenario where this could happen in real-world. Supplier delivers goods but doesn’t invoice you until end of the month. You use some of the goods for promotional activities so you’d write them off into some promotional expense account. But the cost of this write-off wouldn’t be known until supplier sends you an invoice.

@lubos the update is very informative and better for inventory tracking. :+1:

20.5.96
the issue related to purchase date later than the production order date is now fixed.
but the other issue i had mentioned related to the credit note still remains.


with the recent update, the earlier two page transaction list has reduced to one page. i can see the list is not traversing line by line in the transaction but as a whole.

the issue is even though the credit note displays a positive quantity, Manager is not considering the credit note value like it does for a purchase invoice. i think this is where the issue starts. since the credit note amount is listed as zero, the succeeding sales invoice amounts are auto-calculated based on the previous average costs. for example, the actual amount of sales invoice 18009 is Rs.60342 but Manager calculates it as Rs.49143.34

also, i think the credit note quantity should be listed under the column Qty instead of Insufficient Qty because the total 7 shown at the end of the list is the actual qty we have in hand and its not an insufficient qty. the same in reverse would be applicable if debit notes are involved.

Yep. I was experimenting with multiple approaches and I think this view will give the most clarity.

I know why. I was thinking about this edge case this morning and thought - sure nobody will have this issue because how often your first sale of inventory item is actually customer return. Anyway, check the latest version (20.5.98) and see what impact it has on your total cost screen.

20.5.99
@lubos i can see you have ditched the Insufficient Qty column. it would have been great to have it though.

anyway the quantity of 7 is still remains correct. but the amount displayed for the credit note is incorrect again.


you can see the amount of credit note is incorrect if you compare the actual credit note shown in post #18 above.

according to my calculations the only actual quantity i have in hand is from the purchase invoice transactions dated 3-Jul-19 and 12-Feb-20. so the total cost should be 5800 + 7120 = 12920 whereas Manager shows 13445.

for testing purpose i edited and swapped the dates for the credit note and its succeeding sales invoice. please see the screenshot below.

i think the issue would be solved if you can make the credit note calculate the average cost like purchase invoices.

Insufficent qty is visible only for inventory items where current qty is negative. You are looking at inventory item where current qty is not negative so there is no insufficent qty. The cost for every transaction was calculated successfully.

Whatever amounts you have on credit notes or sales invoices is irrelevant for inventory cost purposes. Only qty matters.

E.g. selling $10 item to customer for $100, $200, or $1,000,000 will have no impact on average cost. The same goes for customer return. You could have sold $10 item for $20, then issue credit note for $5 per item. The cost returned to inventory would be always $10.

The difference between Manager and your calculation is that you are using LIFO calculation method, Manager is using perpetual moving average method.

Let’s run this down…

On 17th July, you had 9 items at the cost of 18,975

On 14th December, you sold 6 items which means we reduce the total cost by 18,975 / 9 * 6 = 12,650

We end up with total cost balance of 18,975 - 12,650 = 6,325<U+202C>

Then on 12th February you make purchase for 7,120 bringing us to total cost at 6,325 + 7,120 = 13,445.

@lubos thanks for the detailed explanation and your time. i now understand how the average cost works.

actually this was because of a confusion from my side where one of our customers had issued a debit note to us when they should have issued a sales invoice. in that case i would have entered it as a purchase invoice and the total cost would have been as expected. i think this issue will sort out on its own when my inventory quantity becomes zero. i apologize for wasting your time on this.

anyway the average cost column shows zero.

You are not wasting my time. Anyway, the version (20.6.0) is fixing average cost issue too.

i can confirm this is fixed.

i would like to have your opinion on this.
while this situation may not occur frequently, sometimes we need to fix this issue on our end if the opposite party is not cooperating. my customer is using Manager software and they issued the debit note since they found it inconvenient to create a separate customer to make a sales invoice and manage the account balances separately both as a customer and supplier.

now this transaction in question is obviously adding to my asset when it should not be. i cannot wait for the inventory item to become zero before finding trouble with the authorities (as you can see the issue is already past two financial years) and neither can i make a journal to an expense account because i have not incurred any expense. can there be some solution like ability to have an account which do not affect the balance sheet or P&L?

I’d delete that credit note and enter journal entry instead where you debit inventory item with amount/qty and credit their accounts receivable account.

Cleaner way would be to create them as a supplier and enter purchase invoice just for this transaction but if this is once-off, journal entry is fine too.

if only our tax authorities allowed that.
in our monthly tax filings both the receiver and supplier need to furnish the relevant documents. in this case our customer would file their debit note and we would file the credit note against the same.

i could enter it as a purchase invoice and edit the title to debit note with a custom theme but that would just mess up the transactions which are otherwise perfectly organized in Manager under their relevant tabs. also, the reporting would show it as a purchase invoice rather than a debit note.

Then on credit note, don’t select item. Select some custom asset account and make journal entry to move balance from asset account to inventory item. This will avoid credit note touching your P&L.

Perhaps in future, I will make it so you can select inventory item account on credit note too. This would cover situation where you are purchasing inventory items from your customer.

this felt like a better option until i tried with a test business.
like you have mentioned it does affect my P&L which is similar to reporting an asset i do not own.

now the only solution i could come up with is selecting an income account in the credit note (would have been better if choosing Inventory - sales was possible) and then creating an unbalanced journal entry to add the inventory quantity and its total cost. this still puts the journal entry under Suspense account. maybe it would help if there was an optional checkbox where the user could make unbalanced journal entry on purpose that would remove the transaction showing up as suspense but still shown with an Unbalanced status in the journal entries tab.

If you select custom asset account, credit note will not affect your P&L. Then you clear the balance in your custom asset account by moving the balance (and quantity) into specific inventory item using journal entry.

Unbalanced journal entries will never be supported in Manager. The system needs to force you to do the right thing. Not make it easy to fall into various traps.

yes true. but the credit note should affect the P&L else the user will be overstating their profit for the financial year. there is no debit transaction in their income. and since the user is moving the balance to another asset account (inventory) instead of an expense account, the profit will still remain unaffected. all the user would be doing is move balances between two asset accounts.

maybe i should consider adding another two lines to the journal debiting the Inventory - sales income and crediting the expense. its a lot of transactions but this might solve things.

I’m kind of getting lost what you are trying to do. I thought you are buying inventory items from your customer. This transaction would not affect your P&L as the purchase would be capitalized into inventory items. (just like when buying inventory items from supplier)

this is all complicated because it is a purchase from customer but is being reported as a credit note to the tax authorities. when it is reported as a credit note, it should have an effect on the P&L.
if it was just reported as a purchase, or the customer had issued a sales invoice, none of this would have been necessary.
if it was reported as a purchase i could have blindly followed your suggestion with using the asset account in credit note and then transferring the value by journal to inventory.

This has generated a lengthy discussion over a mistake by your customer they were too lazy to correct. I cannot believe it is true that your government requires you to replicate a mistake. Suppose someone sent you a fraudulent sales invoice. You would not be required to enter a fraudulent purchase invoice to match, would you? Now suppose they sent you the required sales invoice in place of the incorrect debit note, but put another company’s similar name on it as the customer because they were too lazy to create your company as a new customer. Would you be expected to start a business with that similar name and enter a purchase invoice, register for taxes, etc? Of course not. How is this different?

no one said this is a mistake. its perfectly legal to make a purchase return bought from someone either by a sales invoice or a debit note. both documents have the same tax implications. if Manager had the capability to make a sales invoice to a supplier, they would not have had to use a workaround to use debit notes. if workarounds were mistakes, there would have been a lot of unacceptable methods in Manager. for example, making a delivery note for credit notes to put the inventory items back in stock.

this is the reason both the supplier and recipient are required to file their monthly returns for the same transaction. this identifies fraudulent transactions.