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

fix: (enhance) BOM Operations Report #29375

Merged
merged 3 commits into from
Jan 20, 2022

Conversation

marination
Copy link
Collaborator

Issue:

  • Report BOM Operations Time had no filters and a dump of all the BOM data. This made it hard to filter data BOM wise
  • Also the Time in Mins field was inaccurate showing Integer data (like 10.56 showed as 10)
  • Due to adding rows as they came and not maintaining data BOM-wise while computing the report, random operations belonging to BOM A, where shown under BOM B. (Row 11 [BOM-BDSH-001-002] shows 4 operations, while it only has 2 in the BOM)

Screenshot 2022-01-20 at 1 43 26 PM

Fix:

  • Added filters in the Report for BOM ID, Item Code and Workstation
  • BOM ID is a Multiselect filter, so that users can view certain BOMs of an Item
  • Converted Raw SQL to frappe.qb and added method to get filtered data
  • Changed fieldtype of 'Time in mins' from Int to Float
  • Get BOM wise grouped data to keep order and accurate grouping in report

Screenshot 2022-01-20 at 1 42 52 PM

To Test:

  • All Filters
  • Include a simple BOM with operations
  • A BOM with operations having a sub-assembly with operations. Check if both sub-assembly and BOM show up on report. Subassembly BOM Count should be 1 in sub-assemble BOM row
  • Make multiple BOMs with operations (different or same items doesn't matter). Make sure operations are shown under correct BOM.

- Added filters in the Report for BOM ID, Item Code and Workstation
- Converted Raw SQL to frappe.qb and added method to get filtered data
- Changed fieldtype of 'Time in mins' from Int to Float
- Get BOM wise grouped data to  keep order and accurate grouping in report
@marination marination added the needs-tests This PR needs automated unit-tests. label Jan 20, 2022
@marination marination added backport version-13-hotfix and removed needs-tests This PR needs automated unit-tests. labels Jan 20, 2022
@marination
Copy link
Collaborator Author

Report does not do any extra computation, just formats data that's it. The basic test in manufacturing/reporyt/test_reports.py should be enough

@codecov
Copy link

codecov bot commented Jan 20, 2022

Codecov Report

Merging #29375 (af73429) into develop (c8489d6) will increase coverage by 0.00%.
The diff coverage is 86.95%.

@@           Coverage Diff            @@
##           develop   #29375   +/-   ##
========================================
  Coverage    57.88%   57.89%           
========================================
  Files         1091     1091           
  Lines        67850    67866   +16     
========================================
+ Hits         39278    39288   +10     
- Misses       28572    28578    +6     
Impacted Files Coverage Δ
.../report/bom_operations_time/bom_operations_time.py 91.30% <86.95%> (-5.37%) ⬇️
...t/accounts/report/sales_register/sales_register.py 73.33% <0.00%> (-5.46%) ⬇️
...e/asset_value_adjustment/asset_value_adjustment.py 86.04% <0.00%> (-3.49%) ⬇️
...pnext/accounts/report/gross_profit/gross_profit.py 82.49% <0.00%> (-2.34%) ⬇️
...em_wise_sales_register/item_wise_sales_register.py 61.36% <0.00%> (-2.28%) ⬇️
...ctype/accounting_dimension/accounting_dimension.py 64.34% <0.00%> (-1.56%) ⬇️
.../hr/doctype/upload_attendance/upload_attendance.py 45.52% <0.00%> (-1.50%) ⬇️
...e/period_closing_voucher/period_closing_voucher.py 88.23% <0.00%> (-1.48%) ⬇️
...ice_creation_tool/opening_invoice_creation_tool.py 61.22% <0.00%> (-0.69%) ⬇️
...next/accounts/doctype/subscription/subscription.py 82.14% <0.00%> (-0.55%) ⬇️
... and 19 more

@marination marination merged commit 180f06d into frappe:develop Jan 20, 2022
@marination
Copy link
Collaborator Author

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Jan 20, 2022

backport version-13-hotfix

✅ Backports have been created

marination added a commit that referenced this pull request Jan 20, 2022
…-29375

fix: (enhance) BOM Operations Report (backport #29375)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant