本文整理汇总了PHP中Device::get_order_quantity方法的典型用法代码示例。如果您正苦于以下问题:PHP Device::get_order_quantity方法的具体用法?PHP Device::get_order_quantity怎么用?PHP Device::get_order_quantity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Device
的用法示例。
在下文中一共展示了Device::get_order_quantity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialchars
if (!$fatal_error) {
// global stuff
$html->set_variable('disable_footprints', $config['footprints']['disable'], 'boolean');
$html->set_variable('disable_manufacturers', $config['manufacturers']['disable'], 'boolean');
$html->set_variable('disable_auto_datasheets', $config['auto_datasheets']['disable'], 'boolean');
$html->set_variable('use_modal_popup', $config['popup']['modal'], 'boolean');
$html->set_variable('popup_width', $config['popup']['width'], 'integer');
$html->set_variable('popup_height', $config['popup']['height'], 'integer');
// device stuff
$html->set_variable('device_id', $device->get_id(), 'integer');
$html->set_variable('device_name', $device->get_name(), 'string');
$parent_device_list = $root_device->build_html_tree($device->get_parent_id(), true, true);
$html->set_variable('parent_device_list', $parent_device_list, 'string');
// export stuff
$html->set_variable('export_multiplier', $export_multiplier_original, 'integer');
$html->set_variable('order_quantity', $device->get_order_quantity(), 'integer');
$html->set_variable('order_only_missing_parts', $device->get_order_only_missing_parts(), 'boolean');
$html->set_variable('export_only_missing', $export_only_missing, 'boolean');
$html->set_loop('export_formats', build_export_formats_loop('deviceparts', $export_format_id));
if (isset($export_string)) {
$html->set_variable('export_result', str_replace("\n", '<br>', str_replace("\n ", '<br> ', str_replace("\n ", '<br> ', htmlspecialchars($export_string, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8')))), 'string');
}
// import stuff
$html->set_variable('import_rowcount', isset($import_data) ? count($import_data) : 0, 'integer');
$html->set_variable('import_file_content', $import_file_content, 'string');
$html->set_variable('import_format', $import_format, 'string');
$html->set_variable('import_separator', $import_separator, 'string');
//$html->set_variable('import_data_is_valid', (isset($import_data_is_valid) && ($import_data_is_valid)), 'boolean');
}
/********************************************************************************
*
示例2: array
}
}
/********************************************************************************
*
* Generate "Devices to order"-Table
*
*********************************************************************************/
if (!$fatal_error) {
try {
$order_devices = Device::get_order_devices($database, $current_user, $log);
$order_devices_loop = array();
$row_odd = true;
foreach ($order_devices as $device) {
$too_less_parts = 0;
foreach ($device->get_parts() as $devicepart) {
$needed = $devicepart->get_mount_quantity() * $device->get_order_quantity();
$instock = $devicepart->get_part()->get_instock();
$mininstock = $devicepart->get_part()->get_mininstock();
if ($instock - $needed < $mininstock) {
$too_less_parts++;
}
}
$order_devices_loop[] = array('row_odd' => $row_odd, 'id' => $device->get_id(), 'name' => $device->get_name(), 'full_path' => $device->get_full_path(), 'order_quantity' => $device->get_order_quantity(), 'only_missing_parts' => $device->get_order_only_missing_parts(), 'parts_count' => $device->get_parts_count(), 'parts_count_to_order' => $too_less_parts);
$row_odd = !$row_odd;
}
$html->set_loop('order_devices_loop', $order_devices_loop);
} catch (Exception $e) {
$messages[] = array('text' => nl2br($e->getMessage()), 'strong' => true, 'color' => 'red');
$fatal_error = true;
}
}