$retrun_rate = price($count / $total_count * 100) . '%'; $all_return += $count; $all_total += $total_count; $data[] = array($sku, $count, $total_count, $retrun_rate); } if ($all_total == 0) { $all_rate = 0; } else { $all_rate = price($all_return / $all_total * 100) . "%"; } $data[] = array(lang('statistics'), $all_return, $all_total, $all_rate); $sortable[] = 'integer'; $sortable[] = 'integer'; $title = lang('received_partial_refunded_statistics') . "-" . lang('by_sku'); echo block_header($title); echo "<br>"; echo form_open(current_url()); echo lang('from') . ' ' . block_time_picker('begin_time', $begin_time) . ' '; echo lang('to') . ' ' . block_time_picker('end_time', $end_time) . ' '; $users = array(); foreach ($input_users as $input_user) { $users[$input_user->input_user] = $input_user->input_user; } $users = array_merge(array(lang('all_input_user')), $users); echo form_dropdown('input_user', $users, $current_user); $config = array('name' => 'submit', 'value' => lang('submit'), 'type' => 'submit'); echo block_button($config); echo form_close(); echo js_sortabl(); echo block_js_sortable_table($head, $data, $sortable, "width: 100%;border-collapse: collapse;");
$min_stock_number_html .= $purchase['au_min_stock_number'] == '' ? '' : '<font color=blue>' . $purchase['au_min_stock_number'] . '</font>' . ' (AU) <br/>'; $purchase_suggestion_html .= $purchase['au_purchase_suggestion'] <= 0 ? '' : '<font color=blue>' . $purchase['au_purchase_suggestion'] . '</font>' . ' (AU) <br/>'; } if ($code->stock_code == 'YB') { $dueout_count_html .= $purchase['yb_dueout_count'] == '' ? '' : '<font color=blue>' . $purchase['yb_dueout_count'] . '</font>' . ' (YB) <br/>'; $stock_count_html .= $purchase['yb_stock_count'] == '' ? '' : '<font color=blue>' . $purchase['yb_stock_count'] . '</font>' . ' (YB) <br/>'; $on_way_count_html .= $purchase['yb_on_way_count'] == '' ? '' : '<font color=blue>' . $purchase['yb_on_way_count'] . '</font>' . ' (YB) <br/>'; $min_stock_number_html .= $purchase['yb_min_stock_number'] == '' ? '' : '<font color=blue>' . $purchase['yb_min_stock_number'] . '</font>' . ' (YB) <br/>'; $purchase_suggestion_html .= $purchase['yb_purchase_suggestion'] <= 0 ? '' : '<font color=blue>' . $purchase['yb_purchase_suggestion'] . '</font>' . ' (AU) <br/>'; } } } else { $dueout_count_html .= $purchase['dueout_count'] == '' ? '' : '<font color=blue>' . $purchase['dueout_count'] . '</font>' . '<br/>'; $stock_count_html .= $purchase['stock_count'] == '' ? '' : '<font color=blue>' . $purchase['stock_count'] . '</font>' . '<br/>'; $on_way_count_html .= $purchase['on_way_count'] == '' ? '' : '<font color=blue>' . $purchase['on_way_count'] . '</font>' . '<br/>'; $min_stock_number_html .= $purchase['min_stock_number'] == '' ? '' : '<font color=blue>' . $purchase['min_stock_number'] . '</font>' . '<br/>'; $purchase_suggestion_html .= $purchase['purchase_suggestion'] <= 0 ? '' : '<font color=blue>' . $purchase['purchase_suggestion'] . '</font>' . '<br/>'; // $purchase_suggestion = $purchase['purchase_suggestion'] <= 0 ? 0 : $purchase['purchase_suggestion']; } $data[] = array(form_checkbox($select_data), block_center(block_image($purchase['image_url'], array(40, 40))), get_status_image($purchase['sku']) . anchor(site_url('pi/product/add_edit', array($purchase['id'])), block_center($purchase['sku']), array('target' => '_blank')), block_center($purchase['market_model']), block_center($purchase['name_cn']), block_center($purchase['7_days_sale_amount'] ? $purchase['7_days_sale_amount'] : 0), block_center($purchase['30_days_sale_amount'] ? $purchase['30_days_sale_amount'] : 0), block_center($purchase['60_days_sale_amount'] ? $purchase['60_days_sale_amount'] : 0), block_center('<strong>' . "{$dueout_count_html}" . '</strong>'), block_center('<strong>' . $stock_count_html . '</strong>'), block_center($min_stock_number_html), block_center($on_way_count_html), block_center($purchase_suggestion_html), '', block_center($purchase['purchaser']), $purchase['providers']); $index++; } $batch_purchase = site_url('purchase/order/batch_purchase_sku'); echo form_open($batch_purchase); echo block_js_sortable_table($head, $data, array(NULL, 'default', NULL, 'default', 'default', 'integer', 'integer', 'integer', 'integer', 'integer', 'integer', 'integer', 'integer', NULL, 'default'), "width: 100%;border-collapse: collapse;"); echo form_hidden('item_count', $index); $print_label = '<span style="float:right;">'; $print_label .= form_submit('batch_purchase', lang('batch_purchase')); $print_label .= '</span>'; echo block_check_all() . $print_label; echo form_close();
$data = array(); $saler_name = array(); foreach ($statistics as $statistic) { $saler_name = $CI->purchase_statistics_model->fetch_saler_name_by_id($statistic->saler_id); $data[] = array($statistic->second_glance_amount, $statistic->totable_amount, $statistic->second_glance_rate, $saler_name); } echo block_header(lang('second_glance_rate_statistic')); $start_year = 2004; $end_year = date('Y'); $years = array(); for ($i = $start_year; $i <= $end_year; $i++) { $years[$i] = $i; } $months = array(); for ($i = 1; $i <= 12; $i++) { $months[$i] = $i; } echo $this->block->generate_pagination('statistics'); echo form_open(current_url()); echo br(); echo form_label(lang('year')) . ': ' . form_dropdown('year', $years, $year); echo repeater(' ', 3); echo form_label(lang('month')) . ': ' . form_dropdown('month', $months, $month); echo repeater(' ', 3); $config = array('name' => 'submit', 'value' => lang('submit'), 'type' => 'submit'); echo block_button($config); echo form_close(); $sortable = array('default', 'integer', 'default', 'float'); echo block_js_sortable_table($head, $data, $sortable); echo br(); echo block_notice_div(lang('note') . ': ' . br() . lang('second_glance_rate_monthly_notice'));
$submit_url = site_url('seo/release/save_verifying'); $url = anchor($resource->url, 'Resource URL', array('target' => '_blank', 'title' => $resource->url)); $config_drop = array('name' => 'drop', 'value' => lang('close'), 'type' => 'button', 'style' => 'margin:10px;padding:5px;', 'onclick' => "this.blur();submit_release('{$submit_url}', {$resource->id}, {$content->id},'drop', this);return true;"); $drop_button = form_input($config_drop); $config_save = array('name' => 'save', 'value' => lang('release'), 'type' => 'button', 'style' => 'margin:10px;padding:5px;', 'onclick' => "this.blur();submit_release('{$submit_url}', {$resource->id}, {$content->id},'save', this);return true;"); $save_button = block_button($config_save); $config_input = array('name' => 'validate_url_' . $resource->id, 'id' => 'validate_url_' . $resource->id, 'value' => $resource ? $resource->validate_url : '', 'maxlength' => '200', 'size' => '20'); $data[] = array($resource->username, $resource->password, $url, $resource->cat_name, $resource->language, form_input($config_input) . $save_button, $drop_button); } $attributes = array('id' => 'release_form'); $save_url = site_url('seo/release/save_verifying'); echo form_open($save_url, $attributes); $options = array(); $companys = $this->seo_service_company_model->fetch_all_service_companys(); $options[-1] = lang('all'); foreach ($companys as $company) { $options[$company->id] = $company->name; } $url = site_url_no_key('seo/content_edit/content_detail'); $url_key = site_key('seo/content_edit/content_detail'); $js = "onChange='filter_company_resource(\"{$url}\", \"{$url_key}\", {$content->id}, this.value);'"; echo '<div style= "float:right">' . ($select_purchaser = form_dropdown('select_purchaser', $options, $company_id, $js) . '</div>'); $sortable = array('default', 'default', 'default', 'default', 'default', 'default'); echo block_js_sortable_table($head, $data, $sortable, "width: 60%; float:left;border-collapse: collapse;"); echo '<div style="clear: both;"></div>'; echo '<h2>' . $back_button . '</h2>'; echo form_close(); ?>