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

Error after updating Pre-Debrief Plugin #20

Open
sam-man1 opened this issue Jan 23, 2024 · 2 comments
Open

Error after updating Pre-Debrief Plugin #20

sam-man1 opened this issue Jan 23, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@sam-man1
Copy link

Describe the bug
Getting Error : A clear and concise description of what the bug is.](main.js:461 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toJSON'))

Error : (Check last line ).

addExpense({activityId: t, itemId: e, amount: i, currencyKey: n, recordId: r}) {
let s = {
id: this.getIdFromArray(this.expenseItems()),
activityId: t,
itemId: e,
amount: i,
currencyKey: n
};
r && (s.recordId = r),
Object.entries(this.expenseItemEnumCollection.get(e).toJSON()).forEach(([t,e])=>{

For details : we have added the attachment of the issue.

ERROR1.txt

@mailtodanish
Copy link

@sam-man1 Check/print 'this.expenseItemEnumCollection' and see if itemId: e is present. Have you added any expense item directly in the plugin?

@miquelgall
Copy link
Contributor

Hi Team. In this case, the problem is happening on the Debriefing Plugin itself.

"48": {
"inventory_model": "",
"invsn": "",
"invpool": "install",
"invtype": "labor",
"invid": "48",
"inv_aid": 7198091,
"inv_pid": 9348,
"quantity": 1,
"labor_service_activity": "Labor",
"labor_item_number": "reg",
"labor_item_desc": "",
"labor_start_time": "T10:19:00",
"labor_end_time": "T10:23:00",
"expense_service_activity": "",
"expense_item_number": "",
"expense_item_desc": "",
"part_service_activity_used": "",
"part_service_activity_returned": "",
"part_item_number_rev": "",
"part_item_number": "",
"part_item_revision": "",
"part_item_desc": "",
"part_uom_code": "",
"part_disposition_code": "",
"expense_currency_code": "",
"expense_amount": "",
"I_DEFAULT_VALUE": "1"
}

Are you sure that these fields

  "labor_service_activity": "Labor",
  "labor_item_number": "reg",

Are valid in your enviornment ? Could you please create a labor entry using the Debriefing plugin and compare the values of these properties and adjust the open parameters to valid values ?

@miquelgall miquelgall assigned sam-man1 and unassigned miquelgall Apr 2, 2024
@miquelgall miquelgall added the question Further information is requested label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants