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(sales order): incorrect no. of items fetched while creating dn #29454

Merged
merged 3 commits into from
Jan 31, 2022

Conversation

nextchamp-saqib
Copy link
Member

@nextchamp-saqib nextchamp-saqib commented Jan 25, 2022

Issue:

If a Sales Order has more than 50 items (has multiple pages in item table), and there are some undelivered items. Some undelivered items have a different delivery date.
If some of the "undelivered items" belong to the next page of the items table for eg. an "undelivered item" has an index of 55 (like 51+)

Then while creating Delivery Note using Create button, those "next page" items are not fetched.

Why?

The frm.fields_dict['items'].grid.grid_rows contains only first 50 rows hence filtering only works on first 50 item rows

$.each(dates, function(i, d) {
$.each(item_grid.grid_rows || [], function(j, row) {
if(row.doc.delivery_date == d) {
row.doc.__checked = 1;
}
});
})

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jan 25, 2022
@codecov
Copy link

codecov bot commented Jan 29, 2022

Codecov Report

Merging #29454 (4c8408a) into develop (28994c0) will decrease coverage by 0.16%.
The diff coverage is 60.00%.

@@             Coverage Diff             @@
##           develop   #29454      +/-   ##
===========================================
- Coverage    58.36%   58.19%   -0.17%     
===========================================
  Files         1091     1091              
  Lines        67899    67904       +5     
===========================================
- Hits         39629    39517     -112     
- Misses       28270    28387     +117     
Impacted Files Coverage Δ
erpnext/selling/doctype/sales_order/sales_order.py 77.50% <60.00%> (+0.21%) ⬆️
...unts/report/purchase_register/purchase_register.py 34.24% <0.00%> (-39.05%) ⬇️
erpnext/utilities/product.py 14.70% <0.00%> (-35.30%) ⬇️
...ext/accounts/report/balance_sheet/balance_sheet.py 36.36% <0.00%> (-21.82%) ⬇️
erpnext/shopping_cart/product_info.py 30.30% <0.00%> (-21.22%) ⬇️
...e_purchase_register/item_wise_purchase_register.py 58.00% <0.00%> (-17.00%) ⬇️
...it_and_loss_statement/profit_and_loss_statement.py 71.42% <0.00%> (-3.90%) ⬇️
.../report/bom_operations_time/bom_operations_time.py 89.13% <0.00%> (-2.18%) ⬇️
...e/shopping_cart_settings/shopping_cart_settings.py 66.03% <0.00%> (-1.89%) ⬇️
...eorder_level/itemwise_recommended_reorder_level.py 92.45% <0.00%> (-1.89%) ⬇️
... and 18 more

@nextchamp-saqib nextchamp-saqib added backport version-13-hotfix and removed needs-tests This PR needs automated unit-tests. labels Jan 31, 2022
@nextchamp-saqib nextchamp-saqib merged commit 6b37770 into frappe:develop Jan 31, 2022
nextchamp-saqib added a commit that referenced this pull request Jan 31, 2022
…-29454

fix(sales order): incorrect no. of items fetched while creating dn (backport #29454)
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