Пример #1
0
         echo "<td></td>";
     }
     echo "</tr>";
     if (($toim == "VALMISTUS" and $yhtiorow["valmistus_kerayslistan_jarjestys"] == "S" or $yhtiorow["kerayslistan_jarjestys"] == "S") and strpos($row["rivitunnukset"], ",") !== FALSE) {
         foreach (explode(",", $row["rivitunnukset"]) as $tunn) {
             $tunn = trim($tunn);
             echo "<input type='hidden' name='kerivi[]' value='{$tunn}'>";
         }
     } else {
         echo "<input type='hidden' name='kerivi[]' value='{$row['tunnus']}'><input type='hidden' name='maara[{$row['tunnus']}]' value=''>";
     }
 } else {
     echo "<tr class='aktiivi'>";
     echo "<td>";
     if ($toim == 'VASTAANOTA_REKLAMAATIO') {
         $vares = varaston_lapsivarastot($otsik_row['varasto'], $row['puhdas_tuoteno']);
         $s1_options = array();
         $s2_options = array();
         $s3_options = array();
         while ($varow = mysql_fetch_assoc($vares)) {
             $status = $varow['status'];
             ${$status . "_options"}[] = $varow;
         }
         $counts = array('s1' => count($s1_options), 's2' => count($s2_options), 's3' => count($s3_options));
         if (!isset($reklahyllyalue[$row["tunnus"]])) {
             $reklahyllyalue[$row["tunnus"]] = "";
         }
         if (!isset($reklahyllynro[$row["tunnus"]])) {
             $reklahyllynro[$row["tunnus"]] = "";
         }
         if (!isset($reklahyllyvali[$row["tunnus"]])) {
Пример #2
0
     echo "<input type='hidden' name='t1[{$rivirow['tunnus']}]' value='{$hyllyalue}' maxlength='5' size='5'>";
     echo "<input type='hidden' name='t2[{$rivirow['tunnus']}]' value='{$hyllynro}' maxlength='5' size='5'>";
     echo "<input type='hidden' name='t3[{$rivirow['tunnus']}]' value='{$hyllyvali}' maxlength='5' size='5'>";
     echo "<input type='hidden' name='t4[{$rivirow['tunnus']}]' value='{$hyllytaso}' maxlength='5' size='5'>";
     echo "{$row["asiakkaan_nimi"]}";
     echo "</td>";
 } else {
     if ($rivirow["ei_saldoa"] != "") {
         echo "<td colspan='6'></td>";
         echo "<input type='hidden' name='t1[{$rivirow['tunnus']}]' value='{$privirow['t1']}' maxlength='5' size='5'>";
     } else {
         echo "<td><input type='text' id='t1[{$rivirow['tunnus']}]' name='t1[{$rivirow['tunnus']}]' value='{$privirow['t1']}' maxlength='5' size='5'></td>";
         echo "<td><input type='text' id='t2[{$rivirow['tunnus']}]' name='t2[{$rivirow['tunnus']}]' value='{$privirow['t2']}' maxlength='5' size='5'></td>";
         echo "<td><input type='text' id='t3[{$rivirow['tunnus']}]' name='t3[{$rivirow['tunnus']}]' value='{$privirow['t3']}' maxlength='5' size='5'></td>";
         echo "<td><input type='text' id='t4[{$rivirow['tunnus']}]' name='t4[{$rivirow['tunnus']}]' value='{$privirow['t4']}' maxlength='5' size='5'></td>";
         $vares = varaston_lapsivarastot($varow2['tunnus'], $rivirow['tuoteno']);
         $s1_options = array();
         $s2_options = array();
         $s3_options = array();
         while ($varow = mysql_fetch_assoc($vares)) {
             $status = $varow['status'];
             ${$status . "_options"}[] = $varow;
         }
         $counts = array('s1' => count($s1_options), 's2' => count($s2_options), 's3' => count($s3_options));
         if (array_sum($counts) > 1) {
             echo "<td><select name='rivivarasto[{$rivirow['tunnus']}]'><option value='x'>Ei muutosta";
             if ($counts['s1'] > 0) {
                 echo "<optgroup label=", t("Kohdevaraston-paikat"), ">";
                 foreach ($s1_options as $tp) {
                     echo "<option value='", $tp['tunnus'], "'>";
                     echo $tp['hyllyalue'], ' ', $tp['hyllynro'], ' ', $tp['hyllyvali'], ' ', $tp['hyllytaso'];