Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sales Invoice Bug On Selection of Item in Items Child Table #301

Closed
manoj8848 opened this issue Oct 16, 2024 · 1 comment
Closed

Sales Invoice Bug On Selection of Item in Items Child Table #301

manoj8848 opened this issue Oct 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@manoj8848
Copy link

Information about bug

Screenshot from 2024-10-16 17-12-35

Module

other

Version

Frappe - v15
Erpnext- v15

Installation method

None

Relevant log output / Stack trace / Full Error Message.

### App Versions

{
	"erpnext": "15.34.0",
	"frappe": "15.41.0",
	"payments": "0.0.1"
}

Route

Form/Sales Invoice/new-sales-invoice-lausilrsgt

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1775, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/erpnext/erpnext/stock/get_item_details.py", line 100, in get_item_details
    out.update(get_price_list_rate(args, item))
  File "apps/erpnext/erpnext/stock/get_item_details.py", line 801, in get_price_list_rate
    price_list_rate = get_price_list_rate_for(args, item_doc.name)
  File "apps/erpnext/erpnext/stock/get_item_details.py", line 951, in get_price_list_rate_for
    price_list_rate = get_item_price(item_price_args, item_code)
  File "apps/erpnext/erpnext/stock/get_item_details.py", line 922, in get_item_price
    transaction_date = datetime.datetime.strptime(args["transaction_date"].replace("-", ""), "%m%d%Y")
  File "/usr/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.10/_strptime.py", line 352, in _strptime
    raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: 6

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"docstatus\":0,\"doctype\":\"Sales Invoice\",\"name\":\"new-sales-invoice-odgpmnsltr\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"naming_series\":\"ACC-SINV-.YYYY.-\",\"company\":\"8848 Digital\",\"posting_date\":\"2024-10-16\",\"set_posting_time\":0,\"is_pos\":0,\"is_consolidated\":0,\"is_return\":0,\"update_outstanding_for_self\":1,\"update_billed_amount_in_sales_order\":0,\"update_billed_amount_in_delivery_note\":1,\"is_debit_note\":0,\"currency\":\"INR\",\"selling_price_list\":\"Standard Selling\",\"price_list_currency\":\"INR\",\"ignore_pricing_rule\":0,\"update_stock\":0,\"items\":[{\"docstatus\":0,\"doctype\":\"Sales Invoice Item\",\"name\":\"new-sales-invoice-item-mytyjzprvz\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"has_item_scanned\":0,\"stock_uom\":\"Nos\",\"margin_type\":\"\",\"is_free_item\":0,\"grant_commission\":1,\"delivered_by_supplier\":0,\"is_fixed_asset\":0,\"enable_deferred_revenue\":0,\"use_serial_batch_fields\":1,\"allow_zero_valuation_rate\":0,\"cost_center\":\"Main - 8D\",\"page_break\":0,\"parent\":\"new-sales-invoice-odgpmnsltr\",\"parentfield\":\"items\",\"parenttype\":\"Sales Invoice\",\"idx\":1,\"qty\":0,\"conversion_factor\":0,\"stock_qty\":0,\"price_list_rate\":0,\"base_price_list_rate\":0,\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":0,\"amount\":0,\"base_rate\":0,\"base_amount\":0,\"stock_uom_rate\":0,\"net_rate\":0,\"net_amount\":0,\"base_net_rate\":0,\"base_net_amount\":0,\"weight_per_unit\":0,\"total_weight\":0,\"incoming_rate\":0,\"actual_batch_qty\":0,\"actual_qty\":0,\"delivered_qty\":0,\"item_code\":\"Test1\",\"weight_uom\":\"\",\"barcode\":null,\"pricing_rules\":\"\"}],\"taxes\":[],\"use_company_roundoff_cost_center\":0,\"disable_rounded_total\":0,\"apply_discount_on\":\"Grand Total\",\"is_cash_or_non_trade_discount\":0,\"pricing_rules\":[],\"packed_items\":[],\"timesheets\":[],\"total_billing_amount\":0,\"payments\":[],\"allocate_advances_automatically\":0,\"only_include_allocated_payments\":0,\"advances\":[],\"write_off_outstanding_amount_automatically\":0,\"redeem_loyalty_points\":0,\"territory\":\"_Test Territory\",\"ignore_default_payment_terms_template\":0,\"payment_schedule\":[],\"party_account_currency\":\"INR\",\"is_opening\":\"No\",\"sales_team\":[],\"group_same_items\":0,\"status\":\"Draft\",\"customer_group\":\"_Test Customer Group\",\"is_internal_customer\":0,\"is_discounted\":0,\"posting_time\":\"17:10:05\",\"conversion_rate\":1,\"plc_conversion_rate\":1,\"total_billing_hours\":0,\"company_tax_id\":null,\"company_address\":\"8848 Digital-Billing\",\"company_address_display\":\"address line1<br>\\naddress line1<br>mumbai<br>\\nMaharashtra<br>400078<br>India<br>\\n<br>\\n\",\"base_net_total\":0,\"net_total\":0,\"base_total\":0,\"total\":0,\"total_qty\":0,\"rounding_adjustment\":0,\"grand_total\":0,\"base_grand_total\":0,\"total_taxes_and_charges\":0,\"base_total_taxes_and_charges\":0,\"base_rounding_adjustment\":0,\"rounded_total\":0,\"base_rounded_total\":0,\"in_words\":\"\",\"base_in_words\":\"\",\"base_discount_amount\":0,\"total_advance\":0,\"write_off_amount\":0,\"paid_amount\":0,\"base_paid_amount\":0,\"change_amount\":0,\"base_change_amount\":0,\"outstanding_amount\":0,\"amount_eligible_for_commission\":0,\"total_commission\":null,\"tax_id\":null,\"customer_name\":\"_Test Customer\",\"loyalty_program\":null,\"represents_company\":null,\"customer\":\"_Test Customer - 1\",\"debit_to\":\"Debtors - 8D\",\"due_date\":\"2024-10-16\",\"customer_address\":null,\"address_display\":null,\"shipping_address_name\":null,\"shipping_address\":null,\"tax_category\":\"\",\"contact_person\":null,\"contact_display\":null,\"contact_email\":null,\"contact_mobile\":null,\"language\":\"en\",\"payment_terms_template\":null}",
		"args": "{\"item_code\":\"Test1\",\"barcode\":null,\"customer\":\"_Test Customer - 1\",\"currency\":\"INR\",\"is_internal_customer\":0,\"update_stock\":0,\"conversion_rate\":1,\"price_list\":\"Standard Selling\",\"price_list_currency\":\"INR\",\"plc_conversion_rate\":1,\"company\":\"8848 Digital\",\"is_pos\":0,\"is_return\":0,\"ignore_pricing_rule\":0,\"doctype\":\"Sales Invoice\",\"name\":\"new-sales-invoice-odgpmnsltr\",\"qty\":1,\"net_rate\":0,\"base_net_rate\":0,\"stock_qty\":0,\"conversion_factor\":0,\"weight_per_unit\":0,\"weight_uom\":\"\",\"stock_uom\":\"Nos\",\"pos_profile\":\"\",\"cost_center\":\"Main - 8D\",\"tax_category\":\"\",\"child_doctype\":\"Sales Invoice Item\",\"child_docname\":\"new-sales-invoice-item-mytyjzprvz\"}"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/erpnext.stock.get_item_details.get_item_details",
	"request_id": null
}

Response Data

{
	"exception": "ValueError: unconverted data remains: 6",
	"exc_type": "ValueError",
	"_exc_source": "erpnext (app)"
}
@manoj8848 manoj8848 added the bug Something isn't working label Oct 16, 2024
@tinadn
Copy link

tinadn commented Oct 17, 2024

This issue is reolved by pr #293

@tinadn tinadn closed this as completed Oct 17, 2024
@manoj8848 manoj8848 reopened this Oct 17, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants