![]() |
Lookup field on Product Selection (SelectProduct.php) - Printable Version +- webERP Forum (http://www.weberp.org/forum) +-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1) +--- Forum: Development Discussion & Specification (http://www.weberp.org/forum/forumdisplay.php?fid=10) +--- Thread: Lookup field on Product Selection (SelectProduct.php) (/showthread.php?tid=939) |
Lookup field on Product Selection (SelectProduct.php) - tomglare - 06-18-2013 Should not the lookup field (from stockitemproperties) be plain text rather than an input field or dropdown button, as it is not within a form and therefore not updateable? RE: Lookup field on Product Selection (SelectProduct.php) - phil - 06-18-2013 Yes you are absolutely right - it should be RE: Lookup field on Product Selection (SelectProduct.php) - tomglare - 06-18-2013 So now that complete "switch" block can be reduced to this : $PropValResult = DB_query($sql,$db); $PropValRow = DB_fetch_row($PropValResult); $PropertyValue = $PropValRow[0]; if ($PropertyRow['controltype'] == 2) { if ($PropertyValue == true) $PropertyValue = _('Yes'); else $PropertyValue = _('No'); } echo <<<EOT <tr> <th align="left" width="20%"> {$PropertyRow['label']} </th> <td class="select" align="left" colspan=2> $PropertyValue </td> </tr> EOT; RE: Lookup field on Product Selection (SelectProduct.php) - phil - 06-18-2013 Well I reworked it a bit Code: $sql = "SELECT stkcatpropid, |