src/EditProductTab6.cpp

changeset 299
8021e09ab6a3
parent 284
33bb98c33e6a
child 301
fe6346211b5b
equal deleted inserted replaced
298:180c77a81e15 299:8021e09ab6a3
767 /* 767 /*
768 * Search the yeast pointed by the index and instock flag. 768 * Search the yeast pointed by the index and instock flag.
769 */ 769 */
770 QString sql = "SELECT name,laboratory,product_id,type,form,min_temperature,max_temperature,flocculation,attenuation," 770 QString sql = "SELECT name,laboratory,product_id,type,form,min_temperature,max_temperature,flocculation,attenuation,"
771 "cells,tolerance,sta1,bacteria,harvest_top,harvest_time,pitch_temperature,pofpos,zymocide," 771 "cells,tolerance,sta1,bacteria,harvest_top,harvest_time,pitch_temperature,pofpos,zymocide,"
772 "gr_hl_lo,sg_lo,gr_hl_hi,sg_hi,cost,inventory FROM inventoryeasts "; 772 "gr_hl_lo,sg_lo,gr_hl_hi,sg_hi,cost,inventory FROM inventory_yeasts ";
773 if (instock) 773 if (instock)
774 sql.append("WHERE inventory > 0 "); 774 sql.append("WHERE inventory > 0 ");
775 sql.append("ORDER BY laboratory,product_id,name"); 775 sql.append("ORDER BY laboratory,product_id,name");
776 query.prepare(sql); 776 query.prepare(sql);
777 query.exec(); 777 query.exec();
884 884
885 qDebug() << "yeast_instock_changed()" << product->yeasts_row << val; 885 qDebug() << "yeast_instock_changed()" << product->yeasts_row << val;
886 886
887 this->yselectEdit->setCurrentIndex(-1); 887 this->yselectEdit->setCurrentIndex(-1);
888 this->yselectEdit->clear(); 888 this->yselectEdit->clear();
889 QString sql = "SELECT name,laboratory,product_id,inventory FROM inventoryeasts "; 889 QString sql = "SELECT name,laboratory,product_id,inventory FROM inventory_yeasts ";
890 if (val) 890 if (val)
891 sql.append("WHERE inventory > 0 "); 891 sql.append("WHERE inventory > 0 ");
892 sql.append("ORDER BY laboratory,product_id,name"); 892 sql.append("ORDER BY laboratory,product_id,name");
893 query.prepare(sql); 893 query.prepare(sql);
894 query.exec(); 894 query.exec();

mercurial