
function on_field_changed(field, lookup_item) { let item = field.owner; if ( (['order_line_id', 'inspection_type']).includes(field.field_name)) { if (item.order_line_id.value && item.inspection_type.value){ let d = item.task.catalogs.cecc_sample_sizes.copy(); d.open({where: { 'min__le': item.actual_batch_size.lookup_value, 'max__ge': item.actual_batch_size.lookup_value }}); item.batch_size.value = d.id.value; } } }
item.batch_size.value = d.id.value;function on_field_changed(field, lookup_item) { let item = field.owner;
if (field.field_name === "order_line_id" || field.field_name === "inspection_type") {if (field.value){
let d = item.task.catalogs.cecc_sample_sizes.copy();
d.open({where: {
'min__le': parseInt(item.actual_batch_size.display_text),'max__ge': parseInt(item.actual_batch_size.display_text)
}}); item.batch_size.value = d.id.value; } } }
--
You received this message because you are subscribed to the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jam-py+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jam-py/CAF0JkBqBEbm3AHyFQRmSa6OgNZFx7%3DrMajvX-Akrku5%2BbT3P9A%40mail.gmail.com.


You received this message because you are subscribed to a topic in the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jam-py/XhfMEG5GXNc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jam-py+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jam-py/5625dd26-f85d-47df-be81-473360f45728n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jam-py/CAF0JkBop0ohgZ0oLN%2Br2j409LOjze6Dw3jENc_tWwvQUxeULTg%40mail.gmail.com.
function on_field_changed(field, lookup_item) { let item = field.owner; if ( (['order_line_id', 'inspection_type']).includes(field.field_name)) { if (item.order_line_id.value && item.inspection_type.value){ let d = item.task.catalogs.cecc_sample_sizes.copy(); d.open({where: {
'inspection_type': item.inspection_type.value,'min__le': item.actual_batch_size.lookup_value, 'max__ge': item.actual_batch_size.lookup_value }}); item.batch_size.value = d.id.value;
item.batch_size.lookup_value = d.batch_size.value; item.sample_qty.lookup_value = d.sample_size.value; } } }