$display_name = $row['last_name'] . ', ' . $row['first_name']; echo "<option value={$id}>{$display_name}</option></center>"; } echo "</select></td><br><br>"; echo "<tr><td align='left'><center><small><font color='white'>({$lang->scanInCustomer})</font></small></center>"; echo "<font color='white'>{$lang->customerID} / {$lang->accountNumber}: </font><input type='text' name='customer' size='6'>\n\t<input type='submit'></td></tr>\n\t</form>"; } if (isset($_SESSION['current_sale_customer_id'])) { if (isset($_POST['item'])) { $item = $_POST['item']; $discount = '0%'; if ($cfg_numberForBarcode == "Account/Item Number") { $item = $dbf->fieldToid($items_table, 'item_number', $_POST['item']); } if ($dbf->isValidItem($item)) { if ($dbf->isItemOnDiscount($item)) { $discount = $dbf->getPercentDiscount($item) . '%'; $itemPrice = $dbf->getDiscountedPrice($item); } else { $itemPrice = $dbf->idToField($items_table, 'unit_price', $item); } $itemTax = $dbf->idToField($items_table, 'tax_percent', $item); $_SESSION['items_in_sale'][] = $item . ' ' . $itemPrice . ' ' . $itemTax . ' ' . '1' . ' ' . $discount; } else { echo "{$lang->itemWithID}/{$lang->itemNumber} " . $_POST['item'] . ', ' . "{$lang->isNotValid}"; } } if (isset($_SESSION['items_in_sale'])) { $num_items = count($_SESSION['items_in_sale']); } else { $num_items = 0;