-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Description
App Versions
{
"erpnext": "15.88.1",
"frappe": "15.88.2",
"hrms": "15.52.2",
"ury": "0.2.1"
}
Route
point-of-sale
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 115, in application
response = frappe.api.handle(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/__init__.py", line 50, in handle
data = endpoint(**arguments)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/v1.py", line 40, in handle_rpc_call
return frappe.handler.handle()
^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 52, 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 1754, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 32, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/desk/form/save.py", line 37, in savedocs
doc.submit()
File "apps/frappe/frappe/utils/typing_validations.py", line 32, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1097, in submit
return self._submit()
^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1080, in _submit
return self.save()
^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 378, in save
return self._save(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 414, in _save
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1144, in run_before_save_methods
self.run_method("before_submit")
File "apps/frappe/frappe/model/document.py", line 1011, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1371, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1355, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/ury/ury/ury/hooks/ury_pos_invoice.py", line 19, in before_submit
calculate_and_set_times(doc, method)
File "apps/ury/ury/ury/hooks/ury_pos_invoice.py", line 93, in calculate_and_set_times
time_difference = current_time - doc.creation
~~~~~~~~~~~~~^~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str'
Request Data
{
"type": "POST",
"args": {
"doc": "{\"name\":\"PZC00001\",\"owner\":\"sharlr@live.com\",\"creation\":\"2025-11-13 11:33:17.682157\",\"modified\":\"2025-11-13 11:33:17.682157\",\"modified_by\":\"sharlr@live.com\",\"docstatus\":0,\"idx\":0,\"title\":\"CLIENT1\",\"naming_series\":\"PZC\",\"customer\":\"ABCD\",\"customer_name\":\"CLIENT1\",\"mobile_number\":\"9866556312\",\"tax_id\":null,\"pos_profile\":\"POS SM\",\"consolidated_invoice\":null,\"is_pos\":1,\"is_return\":0,\"update_billed_amount_in_sales_order\":0,\"update_billed_amount_in_delivery_note\":1,\"company\":\"Pizzaiolo\",\"posting_date\":\"2025-11-13\",\"posting_time\":\"11:33:17.804492\",\"set_posting_time\":0,\"due_date\":\"2025-11-13\",\"amended_from\":null,\"return_against\":null,\"order_type\":\"\",\"waiter\":\"sharlr@live.com\",\"invoice_printed\":0,\"no_of_pax\":null,\"cashier\":null,\"invoice_created\":0,\"custom_aggregator_id\":null,\"restaurant\":\"Aviation\",\"branch\":\"Aviation\",\"restaurant_table\":null,\"custom_restaurant_room\":null,\"arrived_time\":null,\"total_spend_time\":null,\"cancel_reason\":null,\"project\":null,\"cost_center\":\"Main - PZ\",\"po_no\":null,\"po_date\":null,\"customer_address\":null,\"address_display\":null,\"contact_person\":null,\"contact_display\":null,\"contact_mobile\":null,\"contact_email\":null,\"territory\":null,\"shipping_address_name\":null,\"shipping_address\":null,\"company_address\":null,\"company_address_display\":null,\"company_contact_person\":null,\"currency\":\"DJF\",\"conversion_rate\":1,\"selling_price_list\":\"Standard Selling\",\"price_list_currency\":\"DJF\",\"plc_conversion_rate\":1,\"ignore_pricing_rule\":0,\"set_warehouse\":\"Stores - PZ\",\"update_stock\":1,\"scan_barcode\":null,\"last_scanned_warehouse\":null,\"total_billing_amount\":0,\"total_qty\":6,\"base_total\":900,\"base_net_total\":900,\"total\":900,\"net_total\":900,\"total_net_weight\":0,\"taxes_and_charges\":\"\",\"shipping_rule\":null,\"tax_category\":\"\",\"other_charges_calculation\":null,\"base_total_taxes_and_charges\":0,\"total_taxes_and_charges\":0,\"loyalty_points\":0,\"loyalty_amount\":0,\"redeem_loyalty_points\":0,\"loyalty_program\":null,\"loyalty_redemption_account\":null,\"loyalty_redemption_cost_center\":null,\"coupon_code\":null,\"apply_discount_on\":\"Grand Total\",\"base_discount_amount\":0,\"additional_discount_percentage\":0,\"discount_amount\":0,\"base_grand_total\":900,\"base_rounding_adjustment\":0,\"base_rounded_total\":900,\"base_in_words\":\"\",\"grand_total\":900,\"rounding_adjustment\":0,\"rounded_total\":900,\"in_words\":\"\",\"total_advance\":0,\"outstanding_amount\":0,\"allocate_advances_automatically\":0,\"payment_terms_template\":null,\"cash_bank_account\":null,\"base_paid_amount\":900,\"paid_amount\":900,\"base_change_amount\":0,\"change_amount\":0,\"account_for_change_amount\":\"1110 - Cash - PZ\",\"write_off_amount\":0,\"base_write_off_amount\":0,\"write_off_outstanding_amount_automatically\":0,\"write_off_account\":\"5119 - Stock Adjustment - PZ\",\"write_off_cost_center\":\"Main - PZ\",\"tc_name\":null,\"terms\":null,\"letter_head\":null,\"group_same_items\":0,\"language\":\"en\",\"select_print_heading\":null,\"inter_company_invoice_reference\":null,\"customer_group\":null,\"campaign\":null,\"is_discounted\":0,\"status\":\"Draft\",\"custom_ury_order_number\":null,\"source\":null,\"debit_to\":\"1310 - Debtors - PZ\",\"party_account_currency\":\"DJF\",\"is_opening\":\"No\",\"remarks\":null,\"sales_partner\":null,\"amount_eligible_for_commission\":900,\"commission_rate\":0,\"total_commission\":0,\"from_date\":null,\"to_date\":null,\"auto_repeat\":null,\"against_income_account\":null,\"custom_comments\":null,\"doctype\":\"POS Invoice\",\"pricing_rules\":[],\"packed_items\":[],\"taxes\":[],\"items\":[{\"name\":\"8rg92l060g\",\"owner\":\"sharlr@live.com\",\"creation\":\"2025-11-13 11:33:17.682157\",\"modified\":\"2025-11-13 11:33:17.682157\",\"modified_by\":\"sharlr@live.com\",\"docstatus\":0,\"idx\":1,\"barcode\":null,\"has_item_scanned\":0,\"item_code\":\"1800001\",\"item_name\":\"COCA COLA\",\"customer_item_code\":null,\"description\":\"COCA COLA\",\"item_group\":\"BOISSONS\",\"brand\":null,\"image\":\"\",\"qty\":1,\"comment\":null,\"custom_course\":null,\"stock_uom\":\"Unit\",\"uom\":\"Carton\",\"conversion_factor\":10,\"stock_qty\":10,\"price_list_rate\":600,\"base_price_list_rate\":600,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"distributed_discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":600,\"amount\":600,\"item_tax_template\":null,\"base_rate\":600,\"base_amount\":600,\"pricing_rules\":\"\",\"is_free_item\":0,\"grant_commission\":1,\"net_rate\":600,\"net_amount\":600,\"base_net_rate\":600,\"base_net_amount\":600,\"delivered_by_supplier\":0,\"income_account\":\"4110 - Sales - PZ\",\"is_fixed_asset\":0,\"asset\":null,\"finance_book\":null,\"expense_account\":\"5111 - Cost of Goods Sold - PZ\",\"deferred_revenue_account\":null,\"service_stop_date\":null,\"enable_deferred_revenue\":0,\"service_start_date\":null,\"service_end_date\":null,\"weight_per_unit\":0,\"total_weight\":0,\"weight_uom\":null,\"warehouse\":\"Stores - PZ\",\"target_warehouse\":null,\"quality_inspection\":null,\"serial_and_batch_bundle\":null,\"use_serial_batch_fields\":1,\"allow_zero_valuation_rate\":0,\"item_tax_rate\":\"{}\",\"actual_batch_qty\":0,\"actual_qty\":500,\"serial_no\":null,\"batch_no\":\"\",\"sales_order\":null,\"so_detail\":null,\"pos_invoice_item\":null,\"delivery_note\":null,\"dn_detail\":null,\"delivered_qty\":0,\"cost_center\":\"Main - PZ\",\"project\":null,\"page_break\":0,\"parent\":\"PZC00001\",\"parentfield\":\"items\",\"parenttype\":\"POS Invoice\",\"doctype\":\"POS Invoice Item\",\"__unsaved\":1},{\"name\":\"8rg9pdoavr\",\"owner\":\"sharlr@live.com\",\"creation\":\"2025-11-13 11:33:17.682157\",\"modified\":\"2025-11-13 11:33:17.682157\",\"modified_by\":\"sharlr@live.com\",\"docstatus\":0,\"idx\":2,\"barcode\":null,\"has_item_scanned\":0,\"item_code\":\"1800001\",\"item_name\":\"COCA COLA\",\"customer_item_code\":null,\"description\":\"COCA COLA\",\"item_group\":\"BOISSONS\",\"brand\":null,\"image\":\"\",\"qty\":5,\"comment\":null,\"custom_course\":null,\"stock_uom\":\"Unit\",\"uom\":\"Nos\",\"conversion_factor\":1,\"stock_qty\":5,\"price_list_rate\":60,\"base_price_list_rate\":60,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"distributed_discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":60,\"amount\":300,\"item_tax_template\":null,\"base_rate\":60,\"base_amount\":300,\"pricing_rules\":\"\",\"is_free_item\":0,\"grant_commission\":1,\"net_rate\":60,\"net_amount\":300,\"base_net_rate\":60,\"base_net_amount\":300,\"delivered_by_supplier\":0,\"income_account\":\"4110 - Sales - PZ\",\"is_fixed_asset\":0,\"asset\":null,\"finance_book\":null,\"expense_account\":\"5111 - Cost of Goods Sold - PZ\",\"deferred_revenue_account\":null,\"service_stop_date\":null,\"enable_deferred_revenue\":0,\"service_start_date\":null,\"service_end_date\":null,\"weight_per_unit\":0,\"total_weight\":0,\"weight_uom\":null,\"warehouse\":\"Stores - PZ\",\"target_warehouse\":null,\"quality_inspection\":null,\"serial_and_batch_bundle\":null,\"use_serial_batch_fields\":1,\"allow_zero_valuation_rate\":0,\"item_tax_rate\":\"{}\",\"actual_batch_qty\":0,\"actual_qty\":500,\"serial_no\":null,\"batch_no\":\"\",\"sales_order\":null,\"so_detail\":null,\"pos_invoice_item\":null,\"delivery_note\":null,\"dn_detail\":null,\"delivered_qty\":0,\"cost_center\":\"Main - PZ\",\"project\":null,\"page_break\":0,\"parent\":\"PZC00001\",\"parentfield\":\"items\",\"parenttype\":\"POS Invoice\",\"doctype\":\"POS Invoice Item\",\"__unsaved\":1}],\"payments\":[{\"name\":\"8rg9fenrn5\",\"owner\":\"sharlr@live.com\",\"creation\":\"2025-11-13 11:33:17.682157\",\"modified\":\"2025-11-13 11:33:17.682157\",\"modified_by\":\"sharlr@live.com\",\"docstatus\":0,\"idx\":1,\"default\":1,\"mode_of_payment\":\"Cash\",\"amount\":900,\"reference_no\":null,\"account\":\"1110 - Cash - PZ\",\"type\":\"Cash\",\"base_amount\":900,\"clearance_date\":null,\"parent\":\"PZC00001\",\"parentfield\":\"payments\",\"parenttype\":\"POS Invoice\",\"doctype\":\"Sales Invoice Payment\",\"__unsaved\":1}],\"timesheets\":[],\"sales_team\":[],\"advances\":[],\"payment_schedule\":[],\"__onload\":{\"make_payment_via_journal_entry\":0},\"__last_sync_on\":\"2025-11-13T08:33:18.971Z\"}",
"action": "Submit"
},
"freeze": true,
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.form.save.savedocs",
"request_id": "e97992e5-172e-4263-9b61-a422d1988d3a"
}
Response Data
{
"exception": "TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str'",
"exc_type": "TypeError",
"_exc_source": "ury (app)"
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels