Issue with Purchases Taxes applied to valuation for Asset Items

I am unsure if this is a bug or if I am just misunderstanding something and would appreciate feedback from the community.

My production env is currently:
erpnext 13.3.1
frappe 13.3.0

But I’ve also encountered the same issue on a dev server with the same database using erpnext 13.10.2 and frappe 13.10.0

I am trying to create a purchase invoice for an asset item. The invoice I received from the supplier includes a tax that is paid to them but not included in the list price of the item. So, when I’m creating the purchase invoice I add a purchase tax for the amount indicated and configure it like this:

When I attempt to submit I get an error “Debit and Credit not equal for Purchase Invoice #ACC-PINV-2021-XXXXX. Difference is 43.0.” (In this case, 43 is the amount of tax applied).

Looking into the code, I’ve discovered that the program is creating GL entries like this:

  • CR 543 to Accounts Payable
  • DR 543 to FF&E (asset account)
  • DR 43 to Expenses Included in Asset Valuation (tax amount)

You’ll notice that there is no matching CR entry for the tax.
I’ve figured out that if I turn on Capital Works in Progress Accounting for the Asset Category in question, then everything works how I expect it to. I don’t get the error and the program creates balanced GL Entries like this:

  • CR 543 to Accounts Payable
  • DR 543 to FF&E (asset account)
  • CR 43 to Accounts Payable
  • DR 43 to Expenses Included in Asset Valuation (tax amount)

In the code that handles GL entry creation for assets I discovered that it’s only creating them if at least one item on the invoice has CWIP enabled.

I don’t understand why this is like that. Is it a bug or is there something I’m missing about how it’s supposed to work?

Have you tried creating a landed cost voucher?

https://docs.erpnext.com/docs/v13/user/manual/en/stock/landed-cost-voucher

Thanks! I’ve just tried your suggestion and wasn’t able to make it work. The Purchase Invoice in question is still in Draft status because the “Debit and Credit not equal” error is preventing submission, so it doesn’t show as an option when creating a Landed Cost Voucher.

Unfortunately, in this instance we’re required to pay for the items in full prior to receiving them. So, I don’t have a Purchase Receipt to use to create the LCV, either. We create Receipts after Invoices for these purchases. So far, this has worked great with the exception of this one issue.

I believe I’m trying to use the Taxes and Charges table the way it’s suggested in section 3.1 of the link you gave, except with the Invoice instead of the Receipt. From looking at the code, it seems like it should work basically the same for both doctypes. Maybe I’m misinterpreting something or making unsupportable assumptions?

Is there something I’m missing about how LCVs should be used?

I tried recreating your scenario & there were no errors.
This is how the GL entries look:

There must be some issue with your accounting setup. If possible could you share following details:

  1. Asset Category - Accounts Detail
  2. Item - If fixed assets is checked & Auto create assets on Purchase is Checked ?
  3. Supplier - If Allow Invoice creation without Receipt & Receipt Creation without Order is checked or not ?
  4. Company - Default accounts & settings for Stock Settings & Fixed Asset Defaults

Thank you for sharing that. When I have CWIP on for the Asset Category, I get similar GL entries but the balances are different. (I haven’t been able to get to this point without CWIP on because I can’t submit the invoice.)

Here are the details you asked for:

Asset Category Accounts:
Screenshot%20from%202021-09-10%2013-25-04
Item Settings:


Supplier Settings:

Company Stock and Asset Settings:

Have you tried checking the update stock option above the item table while creating Purchase Invoice? Because the item is not a stock item, stock ledger shouldn’t get affected. Could you share General Ledger Report after trying with above mentioned option?

I was able to find multiple instances in previous versions with similar bugs in Purchase Invoice, Sales Invoice & Payment Entries. However, It has been fixed already.

I’m still not sure if it is a bug or not. It could be an issue with your specific use case (bug) or it could be also be result of misconfigured accounting too.

Selecting update stock worked. Here’s the general ledger report for the invoice:

I would love to find a way to solve this issue without having to select update stock, as that will probably be confusing for my users. I’d also like to be able to have the asset created from the Purchase Receipt after the Purchase Invoice. Hopefully it’s just a misconfiguration and I can sort it out over here. But if it is actually a bug, I’d be happy to submit a PR once we figure out what it is.