frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.07k stars 7.22k forks source link

Error in posting advance payment in foreign currency #40418

Open albertfns opened 7 months ago

albertfns commented 7 months ago

Information about bug

The amount paid in the local currency in the Debit is multiplied by the exchange rate image image image image

Module

accounts

Version

ERPNext: v15.16.2 Frappe Framework: v15.17.1

Installation method

docker

Relevant log output / Stack trace / Full Error Message.

No response

albertfns commented 7 months ago

Has anyone got this same error?

albertfns commented 7 months ago

@dj12djdjs Any idea on this. It could be related to the hrms version issue?

How in the case of: https://github.com/frappe/erpnext/issues/40345#issue-2177062426

dj12djdjs commented 7 months ago

@albertfns could you please provide a list of Payment Entry references (allocated amount, and exchange rate)

Also, anything recorded in Dedications and Losses or Taxes and charges to help replicate the issue.

Thank you

albertfns commented 7 months ago

This is an advance payment to the supplier, it also occurs with advance payment from clients, it seems that it is only with advance payments. The rest of the operations are fine

Sorry for the example, it's in Spanish

{ "name": "PAY24-00020", "owner": "mcastillo@protelca.com", "creation": "2024-03-12 09:08:14.108646", "modified": "2024-03-12 09:08:50.786137", "modified_by": "mcastillo@protelca.com", "docstatus": 1, "idx": 0, "naming_series": "PAY.YY.-", "payment_type": "Pay", "payment_order_status": "Initiated", "posting_date": "2024-02-09", "company": "PROTELCA", "mode_of_payment": "Transferencia bancaria", "party_type": "Supplier", "party": "PRO-00007", "party_name": "IVC", "book_advance_payments_in_separate_party_account": 1, "bank_account": "FICOHSA DOLARES - FICOHSA", "party_balance": -21335.01, "paid_from": "1102-02-01-03 - FICOHSA US$ CTA CTE. 172301010008508 - PTK", "paid_from_account_type": "Bank", "paid_from_account_currency": "USD", "paid_from_account_balance": 38022.7, "paid_to": "1103-03-02-06 - ANTICIPO A PROVEEDORES EXTRANJEROS - PTK", "paid_to_account_type": "Payable", "paid_to_account_currency": "USD", "paid_to_account_balance": -21335.01, "paid_amount": 42000, "paid_amount_after_tax": 42000, "source_exchange_rate": 36.6243, "base_paid_amount": 1538220.6, "base_paid_amount_after_tax": 1538220.6, "received_amount": 42000, "received_amount_after_tax": 42000, "target_exchange_rate": 36.6243, "base_received_amount": 1538220.6, "base_received_amount_after_tax": 1538220.6, "total_allocated_amount": 0, "base_total_allocated_amount": 0, "unallocated_amount": 42000, "difference_amount": 0, "apply_tax_withholding_amount": 0, "base_total_taxes_and_charges": 0, "total_taxes_and_charges": 0, "reference_no": "TRE24025834", "reference_date": "2024-02-09", "cost_center": "Principal - PTK", "status": "Submitted", "custom_remarks": 1, "remarks": "Registro de anticipo por compra de equipos para proyecto con cliente Celeste", "base_in_words": "NIO Un Millón Quinientos Treinta Y Ocho Mil Doscientos Veinte y Sesenta Centavo solo.", "letter_head": "General", "bank": "FICOHSA", "bank_account_no": "172301010008508", "in_words": "USD Cuarenta Y Dos Mil solo.", "title": "PRO-00007", "doctype": "Payment Entry", "taxes": [], "deductions": [], "references": [], "onload": { "make_payment_via_journal_entry": 0 }, "last_sync_on": "2024-03-18T16:25:17.659Z" }

It is an advance payment, I have no reference to documents. image Thank you so much

albertfns commented 6 months ago

Hello. Were you successful in trying to recreate the problem?

monolithonadmin commented 6 months ago

Same issue:

Installed Apps Ecommerce Integrations: v1.20.1 (HEAD)

ERPNext: v15.20.0 (HEAD)

Frappe Framework: v15.21.0 (HEAD)

Frappe HR: v15.15.0 (HEAD)

Payments: v0.0.1 (HEAD)

albertfns commented 6 months ago

I believe that the problem will not be addressed in the short term. I have reviewed forums and source code and I cannot find the error.