frappe / erpnext

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

Unable to Submit Sales Invoice due to TypeError: EmployeePaymentEntry.set_missing_ref_details() #40976

Closed innomalous closed 5 months ago

innomalous commented 6 months ago

Information about bug

Hello,

I am trying to Submit a Sales Invoice, which was created from a Sales Order. I'm getting the following error while submitting the document:

Server Error TypeError: EmployeePaymentEntry.set_missing_ref_details() got an unexpected keyword argument 'ref_exchange_rate'

Requesting urgent support as this is a Production account and I'm unable to conduct regular business due to this.

Module

selling

Version

"erpnext": "14.66.4", "frappe": "14.71.0", "hrms": "14.25.0", "india_compliance": "14.26.2", "payments": "0.0.1"

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

### App Versions

{
    "erpnext": "14.66.4",
    "frappe": "14.71.0",
    "hrms": "14.25.0",
    "india_compliance": "14.26.2",
    "payments": "0.0.1"
}

Route

Form/Sales Invoice/IN/24-25/0001

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 95, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 48, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1611, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 31, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 307, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 359, in _save
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1098, in run_post_save_methods
    self.run_method("on_submit")
  File "apps/frappe/frappe/model/document.py", line 928, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1280, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1262, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 925, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 292, in on_submit
    self.update_against_document_in_jv()
  File "apps/erpnext/erpnext/controllers/accounts_controller.py", line 1418, in update_against_document_in_jv
    reconcile_against_document(lst, active_dimensions=active_dimensions)
  File "apps/erpnext/erpnext/accounts/utils.py", line 485, in reconcile_against_document
    referenced_row = update_reference_in_payment_entry(
  File "apps/erpnext/erpnext/accounts/utils.py", line 685, in update_reference_in_payment_entry
    payment_entry.set_missing_ref_details(ref_exchange_rate=d.exchange_rate or None)
TypeError: EmployeePaymentEntry.set_missing_ref_details() got an unexpected keyword argument 'ref_exchange_rate'

Request Data

{
    "type": "POST",
    "args": {
        "doc": "{\"name\":\"IN/24-25/0001\",\"owner\":\"abhishek@innomalous.com\",\"creation\":\"2024-04-11 18:16:57.900445\",\"modified\":\"2024-04-12 11:15:18.740611\",\"modified_by\":\"abhishek@innomalous.com\",\"docstatus\":0,\"idx\":0,\"title\":\"EcomHeat\",\"naming_series\":\"IN/24-25/.####\",\"customer\":\"CN-00000084\",\"customer_name\":\"EcomHeat\",\"e_waybill_status\":\"\",\"company\":\"Innomalous Technologies Private Limited\",\"posting_date\":\"2024-04-11\",\"posting_time\":\"18:15:34.500084\",\"set_posting_time\":1,\"due_date\":\"2024-05-09\",\"is_pos\":0,\"is_consolidated\":0,\"is_return\":0,\"update_outstanding_for_self\":1,\"reason_for_issuing_document\":\"\",\"update_billed_amount_in_sales_order\":0,\"update_billed_amount_in_delivery_note\":1,\"is_debit_note\":0,\"is_reverse_charge\":0,\"is_export_with_gst\":0,\"currency\":\"INR\",\"conversion_rate\":1,\"selling_price_list\":\"B2B OEM Sales Price List\",\"price_list_currency\":\"INR\",\"plc_conversion_rate\":1,\"ignore_pricing_rule\":0,\"update_stock\":0,\"total_qty\":540,\"total_net_weight\":104,\"base_total\":131413.5,\"base_net_total\":131413.5,\"total\":131413.5,\"net_total\":131413.5,\"tax_category\":\"\",\"taxes_and_charges\":\"Output GST Out-state - ITPL\",\"incoterm\":\"EXW\",\"named_place\":\"Noida\",\"base_total_taxes_and_charges\":23654.43,\"total_taxes_and_charges\":23654.43,\"base_grand_total\":155067.93,\"base_rounding_adjustment\":0.07,\"base_rounded_total\":155068,\"base_in_words\":\"\",\"grand_total\":155067.93,\"rounding_adjustment\":0.07,\"use_company_roundoff_cost_center\":0,\"rounded_total\":155068,\"in_words\":\"\",\"total_advance\":73424,\"outstanding_amount\":81644,\"disable_rounded_total\":0,\"apply_discount_on\":\"Grand Total\",\"base_discount_amount\":0,\"is_cash_or_non_trade_discount\":0,\"additional_discount_percentage\":0,\"discount_amount\":0,\"other_charges_calculation\":\"<div class=\\\"tax-break-up\\\" style=\\\"overflow-x: auto;\\\">\\n\\t<table class=\\\"table table-bordered table-hover\\\">\\n\\t\\t<thead>\\n\\t\\t\\t<tr>\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t<th class=\\\"text-left\\\">HSN/SAC</th>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t<th class=\\\"text-right\\\">Taxable Amount</th>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t<th class=\\\"text-right\\\">IGST</th>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t</tr>\\n\\t\\t</thead>\\n\\t\\t<tbody>\\n\\t\\t\\t\\n\\t\\t\\t\\t<tr>\\n\\t\\t\\t\\t\\t<td>23091000</td>\\n\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t₹ 1,25,580.00\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t(18.0%)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t₹ 22,604.40\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t</tr>\\n\\t\\t\\t\\n\\t\\t\\t\\t<tr>\\n\\t\\t\\t\\t\\t<td>998540</td>\\n\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t₹ 3,697.50\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t(18.0%)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t₹ 665.55\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t</tr>\\n\\t\\t\\t\\n\\t\\t\\t\\t<tr>\\n\\t\\t\\t\\t\\t<td>9968</td>\\n\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t₹ 2,136.00\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t(18.0%)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t₹ 384.48\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t</tr>\\n\\t\\t\\t\\n\\t\\t</tbody>\\n\\t</table>\\n</div>\",\"gst_breakup_table\":\"<div class=\\\"tax-break-up\\\" style=\\\"overflow-x: auto\\\"><table class=\\\"table table-bordered table-hover\\\"><thead><tr><th class=\\\"text-left\\\">HSN/SAC</th><th class=\\\"text-right\\\">Taxable Amount</th><th class=\\\"text-right\\\">IGST</th></tr></thead><tbody><tr><td class=\\\"text-left\\\">23091000</td><td class=\\\"text-right\\\">₹ 1,25,580.00</td><td class=\\\"text-right\\\">(18.0%)&nbsp;₹ 22,604.40</td></tr><tr><td class=\\\"text-left\\\">998540</td><td class=\\\"text-right\\\">₹ 3,697.50</td><td class=\\\"text-right\\\">(18.0%)&nbsp;₹ 665.55</td></tr><tr><td class=\\\"text-left\\\">9968</td><td class=\\\"text-right\\\">₹ 2,136.00</td><td class=\\\"text-right\\\">(18.0%)&nbsp;₹ 384.48</td></tr></tbody></table></div>\",\"total_billing_hours\":0,\"total_billing_amount\":0,\"base_paid_amount\":0,\"paid_amount\":0,\"base_change_amount\":0,\"change_amount\":0,\"allocate_advances_automatically\":0,\"only_include_allocated_payments\":0,\"write_off_amount\":0,\"base_write_off_amount\":0,\"write_off_outstanding_amount_automatically\":0,\"redeem_loyalty_points\":0,\"loyalty_points\":0,\"loyalty_amount\":0,\"dont_create_loyalty_points\":0,\"customer_address\":\"CN-00000084-Billing-3\",\"address_display\":\"HD-143, WeWork Enam Sambhav, C - 20, Bandra Kurla Complex<br>G Block Rd, G Block BKC, Mumbai<br>Mumbai Suburban<br>\\nMaharashtra, State Code: 27<br>Pincode: 400051<br>India<br>\\nGSTIN: 27EIAPP1496K1ZS<br>\",\"billing_address_gstin\":\"27EIAPP1496K1ZS\",\"gst_category\":\"Registered Regular\",\"place_of_supply\":\"27-Maharashtra\",\"contact_person\":\"Aman Patial\",\"contact_display\":\"Aman Patial\",\"contact_mobile\":\"6395119426\",\"contact_email\":\"hello@k9vitality.in\",\"territory\":\"India\",\"shipping_address_name\":\"CN-00000084-Warehouse\",\"shipping_address\":\"Gala No. 4 &amp; 5, Building E, Prathamesh Complex<br>Saravli Village, Off Mumbai-Nasik Highway, Opp Vatika Restaurant<br>Bhiwandi, Thane<br>\\nMaharashtra, State Code: 27<br>Pincode: 421302<br>India<br>\\n\",\"company_address\":\"Innomalous Technologies Private Limited-Shipping\",\"company_gstin\":\"09AAECI1177P1Z1\",\"company_address_display\":\"E-197, Sector 63<br>Noida<br>Gautam Buddha Nagar<br>\\nUttar Pradesh, State Code: 09<br>Pincode: 201309<br>India<br>\\nGSTIN: 09AAECI1177P1Z1<br>\",\"ignore_default_payment_terms_template\":0,\"payment_terms_template\":\"Standard OEM Order Terms\",\"tc_name\":\"Sales Invoice Terms\",\"terms\":\"<div class=\\\"ql-editor read-mode\\\"><ol><li data-list=\\\"ordered\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"></span>E. &amp; O. E.</li><li data-list=\\\"ordered\\\"><span class=\\\"ql-ui\\\" contenteditable=\\\"false\\\"></span>T&amp;Cs apply as per Custom Work Order Agreement.</li></ol></div>\",\"po_no\":\"\",\"debit_to\":\"Debtors/Receivables - ITPL\",\"party_account_currency\":\"INR\",\"is_opening\":\"No\",\"against_income_account\":\"Sales - ITPL\",\"amount_eligible_for_commission\":131413.5,\"commission_rate\":0,\"total_commission\":0,\"letter_head\":\"ITPL New\",\"group_same_items\":0,\"invoice_copy\":\"Original for Recipient\",\"language\":\"en\",\"transporter\":\"Delhivery Limited\",\"gst_transporter_id\":\"06AAPCS9575E1ZR\",\"distance\":0,\"transporter_name\":\"Delhivery Limited\",\"mode_of_transport\":\"Road\",\"lr_date\":\"2024-04-11\",\"gst_vehicle_type\":\"Regular\",\"status\":\"Draft\",\"einvoice_status\":\"Not Applicable\",\"customer_group\":\"Startup\",\"is_internal_customer\":0,\"is_discounted\":0,\"remarks\":\"No Remarks\",\"repost_required\":0,\"doctype\":\"Sales Invoice\",\"advances\":[{\"name\":\"65128ae721\",\"owner\":\"abhishek@innomalous.com\",\"creation\":\"2024-04-11 18:16:57.900445\",\"modified\":\"2024-04-12 11:15:18.740611\",\"modified_by\":\"abhishek@innomalous.com\",\"docstatus\":0,\"idx\":1,\"reference_type\":\"Payment Entry\",\"reference_name\":\"PYMT/24-00108\",\"remarks\":\"Amount INR 327447 received from CN-00000084\\nTransaction reference no 408905425719 dated 2024-03-29\\nAmount INR 73424 against Sales Order SO/23-24/00027\\nAmount INR 254023 against Sales Invoice IN/23-24/0028\",\"reference_row\":\"d662e0fd06\",\"advance_amount\":73424,\"allocated_amount\":73424,\"exchange_gain_loss\":0,\"ref_exchange_rate\":1,\"parent\":\"IN/24-25/0001\",\"parentfield\":\"advances\",\"parenttype\":\"Sales Invoice\",\"doctype\":\"Sales Invoice Advance\"}],\"payments\":[],\"payment_schedule\":[{\"name\":\"b771fbd9fc\",\"owner\":\"abhishek@innomalous.com\",\"creation\":\"2024-04-12 11:15:19.551101\",\"modified\":\"2024-04-12 11:15:19.551101\",\"modified_by\":\"abhishek@innomalous.com\",\"docstatus\":0,\"idx\":1,\"payment_term\":\"Advance due at Order Confirmation\",\"description\":\"\",\"due_date\":\"2024-04-11\",\"invoice_portion\":50,\"discount_type\":\"Percentage\",\"discount_date\":\"2024-04-11\",\"discount\":0,\"payment_amount\":40822,\"outstanding\":40822,\"paid_amount\":0,\"discounted_amount\":0,\"base_payment_amount\":40822,\"parent\":\"IN/24-25/0001\",\"parentfield\":\"payment_schedule\",\"parenttype\":\"Sales Invoice\",\"doctype\":\"Payment Schedule\"},{\"name\":\"03e1b70a2d\",\"owner\":\"abhishek@innomalous.com\",\"creation\":\"2024-04-12 11:15:19.551667\",\"modified\":\"2024-04-12 11:15:19.551667\",\"modified_by\":\"abhishek@innomalous.com\",\"docstatus\":0,\"idx\":2,\"payment_term\":\"Balance due before Inventory Dispatch\",\"due_date\":\"2024-05-09\",\"invoice_portion\":50,\"discount_type\":\"Percentage\",\"discount_date\":\"2024-04-11\",\"discount\":0,\"payment_amount\":40822,\"outstanding\":40822,\"paid_amount\":0,\"discounted_amount\":0,\"base_payment_amount\":40822,\"parent\":\"IN/24-25/0001\",\"parentfield\":\"payment_schedule\",\"parenttype\":\"Sales Invoice\",\"doctype\":\"Payment Schedule\"}],\"taxes\":[{\"name\":\"9d4542ecec\",\"owner\":\"abhishek@innomalous.com\",\"creation\":\"2024-04-11 18:16:57.900445\",\"modified\":\"2024-04-12 11:15:18.740611\",\"modified_by\":\"abhishek@innomalous.com\",\"docstatus\":0,\"idx\":1,\"charge_type\":\"On Net Total\",\"account_head\":\"Output Tax IGST - ITPL\",\"description\":\"IGST\",\"included_in_print_rate\":0,\"included_in_paid_amount\":0,\"cost_center\":\"Main - ITPL\",\"rate\":18,\"account_currency\":\"INR\",\"tax_amount\":23654.43,\"total\":155067.93,\"tax_amount_after_discount_amount\":23654.43,\"base_tax_amount\":23654.43,\"base_total\":155067.93,\"base_tax_amount_after_discount_amount\":23654.43,\"item_wise_tax_detail\":\"{\\\"IT/P31-001002\\\":[18,9949.68],\\\"IT/P31-001003\\\":[18,12654.72],\\\"IT/SV2-001001\\\":[18,665.55],\\\"IT/SV0-000001\\\":[18,384.48]}\",\"dont_recompute_tax\":0,\"parent\":\"IN/24-25/0001\",\"parentfield\":\"taxes\",\"parenttype\":\"Sales Invoice\",\"doctype\":\"Sales Taxes and Charges\"}],\"pricing_rules\":[],\"sales_team\":[],\"items\":[{\"name\":\"f6e84e50fa\",\"owner\":\"abhishek@innomalous.com\",\"creation\":\"2024-04-11 18:16:57.900445\",\"modified\":\"2024-04-12 11:15:18.740611\",\"modified_by\":\"abhishek@innomalous.com\",\"docstatus\":0,\"idx\":1,\"has_item_scanned\":0,\"item_code\":\"IT/P31-001002\",\"item_name\":\"Digestive & Gut Health Supplement for Dogs\",\"description\":\"Digestive &amp; Gut Health Supplement for Dogs\",\"gst_hsn_code\":\"23091000\",\"item_group\":\"Meal Boosters\",\"image\":\"\",\"qty\":52,\"stock_uom\":\"Kg\",\"uom\":\"Kg\",\"conversion_factor\":1,\"stock_qty\":52,\"price_list_rate\":1236,\"base_price_list_rate\":1236,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":13.997,\"discount_amount\":173,\"base_rate_with_margin\":0,\"rate\":1063,\"amount\":55276,\"item_tax_template\":\"GST 18% - ITPL\",\"gst_treatment\":\"Taxable\",\"base_rate\":1063,\"base_amount\":55276,\"stock_uom_rate\":1063,\"is_free_item\":0,\"grant_commission\":1,\"net_rate\":1063,\"net_amount\":55276,\"base_net_rate\":1063,\"base_net_amount\":55276,\"taxable_value\":55276,\"igst_rate\":18,\"cgst_rate\":0,\"sgst_rate\":0,\"cess_rate\":0,\"cess_non_advol_rate\":0,\"igst_amount\":9949.68,\"cgst_amount\":0,\"sgst_amount\":0,\"cess_amount\":0,\"cess_non_advol_amount\":0,\"delivered_by_supplier\":0,\"income_account\":\"Sales - ITPL\",\"is_fixed_asset\":0,\"expense_account\":\"Cost of Goods Sold - ITPL\",\"enable_deferred_revenue\":0,\"weight_per_unit\":1,\"total_weight\":52,\"weight_uom\":\"Kg\",\"warehouse\":\"Stores - ITPL\",\"incoming_rate\":0,\"allow_zero_valuation_rate\":0,\"item_tax_rate\":\"{\\\"Output Tax SGST - ITPL\\\": 9.0, \\\"Output Tax CGST - ITPL\\\": 9.0, \\\"Output Tax IGST - ITPL\\\": 18.0, \\\"Input Tax SGST - ITPL\\\": 9.0, \\\"Input Tax CGST - ITPL\\\": 9.0, \\\"Input Tax IGST - ITPL\\\": 18.0, \\\"Input Tax SGST RCM - ITPL\\\": 9.0, \\\"Input Tax CGST RCM - ITPL\\\": 9.0, \\\"Input Tax IGST RCM - ITPL\\\": 18.0}\",\"actual_batch_qty\":0,\"actual_qty\":0,\"sales_order\":\"SO/23-24/00027\",\"so_detail\":\"3adcd0d619\",\"delivered_qty\":0,\"cost_center\":\"Main - ITPL\",\"page_break\":0,\"parent\":\"IN/24-25/0001\",\"parentfield\":\"items\",\"parenttype\":\"Sales Invoice\",\"doctype\":\"Sales Invoice Item\"},{\"name\":\"cefc71d239\",\"owner\":\"abhishek@innomalous.com\",\"creation\":\"2024-04-11 18:16:57.900445\",\"modified\":\"2024-04-12 11:15:18.740611\",\"modified_by\":\"abhishek@innomalous.com\",\"docstatus\":0,\"idx\":2,\"has_item_scanned\":0,\"item_code\":\"IT/P31-001003\",\"item_name\":\"Hip, Bone & Joint Health Supplement for Dogs\",\"description\":\"Hip, Bone &amp; Joint Health Supplement for Dogs\",\"gst_hsn_code\":\"23091000\",\"item_group\":\"Meal Boosters\",\"image\":\"\",\"qty\":52,\"stock_uom\":\"Kg\",\"uom\":\"Kg\",\"conversion_factor\":1,\"stock_qty\":52,\"price_list_rate\":1352,\"base_price_list_rate\":1352,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":1352,\"amount\":70304,\"item_tax_template\":\"GST 18% - ITPL\",\"gst_treatment\":\"Taxable\",\"base_rate\":1352,\"base_amount\":70304,\"stock_uom_rate\":1352,\"is_free_item\":0,\"grant_commission\":1,\"net_rate\":1352,\"net_amount\":70304,\"base_net_rate\":1352,\"base_net_amount\":70304,\"taxable_value\":70304,\"igst_rate\":18,\"cgst_rate\":0,\"sgst_rate\":0,\"cess_rate\":0,\"cess_non_advol_rate\":0,\"igst_amount\":12654.72,\"cgst_amount\":0,\"sgst_amount\":0,\"cess_amount\":0,\"cess_non_advol_amount\":0,\"delivered_by_supplier\":0,\"income_account\":\"Sales - ITPL\",\"is_fixed_asset\":0,\"expense_account\":\"Cost of Goods Sold - ITPL\",\"enable_deferred_revenue\":0,\"weight_per_unit\":1,\"total_weight\":52,\"weight_uom\":\"Kg\",\"warehouse\":\"Stores - ITPL\",\"incoming_rate\":0,\"allow_zero_valuation_rate\":0,\"item_tax_rate\":\"{\\\"Output Tax SGST - ITPL\\\": 9.0, \\\"Output Tax CGST - ITPL\\\": 9.0, \\\"Output Tax IGST - ITPL\\\": 18.0, \\\"Input Tax SGST - ITPL\\\": 9.0, \\\"Input Tax CGST - ITPL\\\": 9.0, \\\"Input Tax IGST - ITPL\\\": 18.0, \\\"Input Tax SGST RCM - ITPL\\\": 9.0, \\\"Input Tax CGST RCM - ITPL\\\": 9.0, \\\"Input Tax IGST RCM - ITPL\\\": 18.0}\",\"actual_batch_qty\":0,\"actual_qty\":0,\"sales_order\":\"SO/23-24/00027\",\"so_detail\":\"4a8d0604dc\",\"delivered_qty\":0,\"cost_center\":\"Main - ITPL\",\"page_break\":0,\"parent\":\"IN/24-25/0001\",\"parentfield\":\"items\",\"parenttype\":\"Sales Invoice\",\"doctype\":\"Sales Invoice Item\"},{\"name\":\"ebc172bd8b\",\"owner\":\"abhishek@innomalous.com\",\"creation\":\"2024-04-11 18:16:57.900445\",\"modified\":\"2024-04-12 11:15:18.740611\",\"modified_by\":\"abhishek@innomalous.com\",\"docstatus\":0,\"idx\":3,\"has_item_scanned\":0,\"item_code\":\"IT/SV2-001001\",\"item_name\":\"Retail Pouch Packing Service\",\"description\":\"Retail Pouch Packing Service\",\"gst_hsn_code\":\"998540\",\"item_group\":\"Job Work\",\"image\":\"\",\"qty\":435,\"stock_uom\":\"Nos\",\"uom\":\"Nos\",\"conversion_factor\":1,\"stock_qty\":435,\"price_list_rate\":0,\"base_price_list_rate\":0,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":8.5,\"amount\":3697.5,\"gst_treatment\":\"Taxable\",\"base_rate\":8.5,\"base_amount\":3697.5,\"stock_uom_rate\":8.5,\"is_free_item\":0,\"grant_commission\":1,\"net_rate\":8.5,\"net_amount\":3697.5,\"base_net_rate\":8.5,\"base_net_amount\":3697.5,\"taxable_value\":3697.5,\"igst_rate\":18,\"cgst_rate\":0,\"sgst_rate\":0,\"cess_rate\":0,\"cess_non_advol_rate\":0,\"igst_amount\":665.55,\"cgst_amount\":0,\"sgst_amount\":0,\"cess_amount\":0,\"cess_non_advol_amount\":0,\"delivered_by_supplier\":0,\"income_account\":\"Sales - ITPL\",\"is_fixed_asset\":0,\"expense_account\":\"Cost of Goods Sold - ITPL\",\"enable_deferred_revenue\":0,\"weight_per_unit\":0,\"total_weight\":0,\"warehouse\":\"Stores - ITPL\",\"incoming_rate\":0,\"allow_zero_valuation_rate\":0,\"item_tax_rate\":\"{}\",\"actual_batch_qty\":0,\"actual_qty\":0,\"sales_order\":\"SO/23-24/00027\",\"so_detail\":\"15fdfbc22b\",\"delivered_qty\":0,\"cost_center\":\"Main - ITPL\",\"page_break\":0,\"parent\":\"IN/24-25/0001\",\"parentfield\":\"items\",\"parenttype\":\"Sales Invoice\",\"doctype\":\"Sales Invoice Item\"},{\"name\":\"f1b58c2e8e\",\"owner\":\"abhishek@innomalous.com\",\"creation\":\"2024-04-11 18:16:57.900445\",\"modified\":\"2024-04-12 11:15:18.740611\",\"modified_by\":\"abhishek@innomalous.com\",\"docstatus\":0,\"idx\":4,\"has_item_scanned\":0,\"item_code\":\"IT/SV0-000001\",\"item_name\":\"Loading, Forwarding & Shipping\",\"description\":\"Loading, Forwarding &amp; Shipping\",\"gst_hsn_code\":\"9968\",\"item_group\":\"Services\",\"image\":\"\",\"qty\":1,\"stock_uom\":\"Nos\",\"uom\":\"Nos\",\"conversion_factor\":1,\"stock_qty\":1,\"price_list_rate\":0,\"base_price_list_rate\":0,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":2136,\"amount\":2136,\"gst_treatment\":\"Taxable\",\"base_rate\":2136,\"base_amount\":2136,\"pricing_rules\":\"\",\"stock_uom_rate\":2136,\"is_free_item\":0,\"grant_commission\":1,\"net_rate\":2136,\"net_amount\":2136,\"base_net_rate\":2136,\"base_net_amount\":2136,\"taxable_value\":2136,\"igst_rate\":18,\"cgst_rate\":0,\"sgst_rate\":0,\"cess_rate\":0,\"cess_non_advol_rate\":0,\"igst_amount\":384.48,\"cgst_amount\":0,\"sgst_amount\":0,\"cess_amount\":0,\"cess_non_advol_amount\":0,\"delivered_by_supplier\":0,\"income_account\":\"Sales - ITPL\",\"is_fixed_asset\":0,\"expense_account\":\"Freight and Forwarding Charges - ITPL\",\"enable_deferred_revenue\":0,\"weight_per_unit\":0,\"total_weight\":0,\"warehouse\":\"Stores - ITPL\",\"incoming_rate\":0,\"allow_zero_valuation_rate\":0,\"item_tax_rate\":\"{}\",\"actual_batch_qty\":0,\"actual_qty\":0,\"delivered_qty\":0,\"cost_center\":\"Main - ITPL\",\"page_break\":0,\"parent\":\"IN/24-25/0001\",\"parentfield\":\"items\",\"parenttype\":\"Sales Invoice\",\"doctype\":\"Sales Invoice Item\"}],\"timesheets\":[],\"packed_items\":[],\"__onload\":{\"make_payment_via_journal_entry\":0},\"__last_sync_on\":\"2024-04-12T05:49:45.028Z\",\"_submitted_from_ui\":1}",
        "action": "Submit"
    },
    "btn": {
        "jQuery3600323810040232154431": {
            "events": {
                "click": [
                    {
                        "type": "click",
                        "origType": "click",
                        "guid": 603,
                        "namespace": ""
                    }
                ]
            }
        }
    },
    "freeze": true,
    "headers": {},
    "error_handlers": {},
    "url": "/api/method/frappe.desk.form.save.savedocs"
}

Response Data

{
    "exception": "TypeError: EmployeePaymentEntry.set_missing_ref_details() got an unexpected keyword argument 'ref_exchange_rate'"
}
innomalous commented 6 months ago

So I deleted the Advance Payments added to the Sales Invoice. And I was able to Submit the document. But once I go to Payment Reconciliation Tool to allocate the payment, the same error is thrown.

Poorvi-R-Bhat commented 6 months ago

This has been fixed in the v14.67.0. Reference : 09cda60