当前位置: 首页>>代码示例>>PHP>>正文


PHP textLength函数代码示例

本文整理汇总了PHP中textLength函数的典型用法代码示例。如果您正苦于以下问题:PHP textLength函数的具体用法?PHP textLength怎么用?PHP textLength使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了textLength函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tep_db_query

     }
     $dlength = tep_db_query($qlength);
     $rlength = tep_db_fetch_array($dlength);
     $return_code_ypos++;
     $n++;
     $pdf->setX($cellstart);
     $pdf->setFont('Arial', '', $fontsize_sml);
     $pdf->Cell($cell1size, $cell_height, $n, 1, 0, 'C');
     $pdf->Cell($cell2size, $cell_height, $item['products_model'], 1);
     $category = $class_o->getCategories($item['orders_products_id']);
     use_class('products_brand');
     $class_pb = new products_brand();
     $product_brand = $class_pb->retrieveDetail($item['products_brand_id']);
     $product_name = $class_pm->displayProductName($item['products_id'], 60);
     $pdf->Cell($cell3size, $cell_height, html_entity_decode($product_name), 1);
     $grosse = $rlength['length'] > 0 ? textLength($rlength['length']) : '';
     $pdf->Cell($cell4size, $cell_height, $grosse, 1, 0, 'C');
     $pdf->Cell($cell5size, $cell_height, '', 1);
     $pdf->Cell($cell6size, $cell_height, '', 1, 1);
     $ypos += $cell_height;
 }
 $ypos += 8;
 /*
                 $pdf->setXY($cellstart, $ypos);
                 $pdf->Cell(10, 10, 'Pos.', 1, 0, 'C');
                 $pdf->MultiCell(30, 5, 'Rücksendegrund'."\n".'(2-stellig)', 1, 'C');
 
                 $n = 0;
                 foreach($items as $item){
    $n++;
    $pdf->setX($cellstart);
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:invoices-pdf.php

示例2: drawArticleLine

function drawArticleLine($pid, $aid, $active, $ean, $length, $item_id = null, $last_update = null, $stock = null, $reported = '0', $booked = '0', $preproduce = '0', $ondemand = '0', $realtotal = null, $realondemand = null, $locked = false)
{
    global $class_pm, $tabindex;
    if (!isset($tabindex)) {
        $tabindex = 1;
    }
    $disabled = $locked ? ' disabled="disabled"' : '';
    $inactive = $active == '1' ? '' : ' notice" title="Inactive Article';
    $result = array();
    $result['ao'] = '<div id="' . $pid . '-' . $aid . '-' . $ean . '" class="article aid' . $inactive . '">' . 'EAN ' . $ean . ($length > 0 ? ' &sdot; ' . textLength($length) : '') . '</div>';
    $stock_current = $class_pm->stockRetrieve(WAREHOUSE_ID_PRODUCTS_HAMBURG, $pid, $aid);
    if (!is_null($item_id)) {
        $result['as'] = '<div class="article"><span id="stsaved-' . $pid . '-' . $aid . '" title="Saved on ' . date('d.m', strtotime($last_update)) . '">' . $stock . '</span> (<span id="st-' . $pid . '-' . $aid . '">' . $stock_current . '</span>)</div>';
        $result['aa'] = '<div class="article"><input id="upd-' . $pid . '-' . $aid . '" type="button" value="update" disabled="disabled" /><input type="hidden" name="item_id" value="' . $item_id . '" /></div>';
    } else {
        $result['as'] = '<div id="st-' . $pid . '-' . $aid . '" class="article">' . $stock_current . '</div>';
    }
    $result['ar'] = '<div class="article"><input id="re-' . $pid . '-' . $aid . '" type="text" tabindex="' . $tabindex . '" class="re number tgcalc" name="qty_reported" value="' . $reported . '" ' . $disabled . '/><div>';
    $tabindex++;
    $result['ab'] = '<div class="article"><input id="bo-' . $pid . '-' . $aid . '" type="text" tabindex="' . $tabindex . '" class="bo number tgcalc" name="qty_booked" value="' . $booked . '" ' . $disabled . '/><div>';
    $tabindex++;
    $result['ap'] = '<div class="article"><input id="pp-' . $pid . '-' . $aid . '" type="text" tabindex="' . $tabindex . '" class="pp number tgcalc" name="qty_preproduce" value="' . $preproduce . '" ' . $disabled . '/><div>';
    $tabindex++;
    $result['ad'] = '<div class="article"><input id="od-' . $pid . '-' . $aid . '" type="text" tabindex="' . $tabindex . '" class="od number tgcalc" name="qty_ondemand" value="' . $ondemand . '" ' . $disabled . '/><div>';
    $tabindex++;
    $result['rt'] = is_null($realtotal) ? '' : '<div class="article rto">' . $realtotal . '</div>';
    $result['rd'] = is_null($realondemand) ? '' : '<div class="article rod">' . $realondemand . '</div>';
    return $result;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:29,代码来源:sp-preorder.php

示例3: getANR

function getANR($pcode, $length)
{
    $a_nr = $pcode;
    if ($length > 0) {
        $a_nr .= '_' . textLength($length, false);
    }
    return $a_nr;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:8,代码来源:tradebyte-catalog-updater.php

示例4: textLength

$pr_style = $catalog['status_price'] == '0' ? 'style="background:#fcc"' : '';
$discstyle = $product_disc < 0 ? 'style="color:#f00;"' : '';
if (!$have_articles) {
    $data_length = $product_length == 0 ? '-' : textLength($product_length);
    $data_price_old = '<input type="text" name="price_old" value="' . $catalog['price_old'] . '" />';
    $data_price = '<input type="text" name="price" value="' . $catalog['price'] . '" ' . $pr_style . ' />';
    $data_disc = '<div ' . $discstyle . '>' . ($product_disc == '' ? '&nbsp;' : $product_disc) . '</div>';
} else {
    $data_length = '<input type="text" class="bold" name="def-len" value="' . textLength($product_length) . '" disabled="disabled" />';
    $data_price_old = '<input type="text" class="bold" name="price_old" value="' . $catalog['price_old'] . '" />';
    $data_price = '<input type="text" class="bold" name="price" value="' . $catalog['price'] . '" ' . $pr_style . ' />';
    $data_disc = '<input type="text" class="bold" name="def-disc" value="' . ($product_disc == '' ? '-' : $product_disc) . '" ' . $discstyle . ' disabled="disabled" />';
    foreach ($articles as $a) {
        $product_disc = $a['price_old'] > 0 ? number_format(($a['price_old'] - $a['price']) / $a['price_old'] * 100, 1) . '%' : '';
        $discstyle = $product_disc < 0 ? 'style="color:#f00;"' : '';
        $data_length .= '<input type="text" value="' . textLength($a['length']) . '" disabled="disabled" />';
        $data_price_old .= '<input type="text" name="pa-price_old-' . $a['products_articles_id'] . '" value="' . $a['price_old'] . '" />';
        $data_price .= '<input type="text" name="pa-price-' . $a['products_articles_id'] . '" value="' . $a['price'] . '" />';
        $data_disc .= '<input type="text" name="pa-disc-' . $a['products_articles_id'] . '" value="' . ($product_disc == '' ? '-' : $product_disc) . '" ' . $discstyle . ' disabled="disabled" />';
    }
}
$t1 = array();
if ($product_length > 0) {
    $t1['len'] = $data_length;
}
$t1['po'] = $data_price_old;
$t1['pr'] = $data_price;
$t1['d'] = $data_disc;
$t1['pn'] = number_format($product_netprice, 2);
$t1['me'] = number_format($product['p']['material_expenses'], 2);
$t1['pf'] = number_format($product_profit, 2);
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:analysis-vc-total-detail.php

示例5: constructXMLArticle

/**
 * Construct xml content
 * @global products_minierp $class_pm
 * @global jng_sp_catalog $class_jc
 * @global int $lid
 * @param object $xmlt
 * @param array $p_data
 * @param int $article_counter
 * @param string $xml_articledata
 * @param array $article_data
 */
function constructXMLArticle(&$xmlt, $p_data, $article_counter, $xml_articledata, $article_data = null)
{
    global $class_pm, $class_jc, $lid, $catalogs, $images_uploaded;
    $pid = $p_data['p']['products_id'];
    $is_article = is_array($article_data) && isset($article_data['products_articles_id']);
    if ($is_article) {
        $aid = $article_data['products_articles_id'];
        $a_ean = $article_data['products_ean'];
        $a_length = $article_data['length'];
    } else {
        $aid = '0';
        $a_ean = $p_data['p']['products_ean'];
        $a_length = $p_data['pnc']['products_length'];
    }
    $article_order_min = 1;
    $article_order_max = 8;
    //ARTICLE
    $xml_article = $xmlt->drawTag($xml_articledata, 'ARTICLE');
    if ($p_data['p']['active_status'] == '0' || $article_data['active_status']) {
        //Set inactive if either product / article is killed
        $a_active = '0';
    } else {
        //Otherwise use catalog active status
        //First set default active status is 0
        $a_active = '0';
        //Then, set as active if activated in at least 1 channel
        foreach ($catalogs[$pid] as $tb_channel => $cat) {
            if ($cat['active_status'] == '1') {
                $a_active = '1';
                break;
            }
        }
    }
    //ARTICLE NUMBERS, 2 OPTIONS:
    //$a_nr = "P$pid"."A$aid";
    $a_nr = $p_data['p']['products_model'];
    if ($a_length > 0) {
        $a_nr .= '_' . intval($a_length < 10 ? $a_length * 10 : $a_length);
    }
    $xmlt->drawTag($xml_article, 'A_NR', $a_nr);
    $xmlt->drawTag($xml_article, 'A_ACTIVE', $a_active);
    $xmlt->drawTag($xml_article, 'A_EAN', $a_ean);
    $xmlt->drawTag($xml_article, 'A_PROD_NR', $a_nr);
    $xmlt->drawTag($xml_article, 'A_SORT', $article_counter);
    $have_variant = $a_length > 0 || $p_data['colors_total'] > 0;
    if ($have_variant) {
        //A_VARIANTDATA
        $xml_avariantdata = $xmlt->drawTag($xml_article, 'A_VARIANTDATA');
        //VARIANT LENGTH
        if ($a_length > 0) {
            //A_VARIANT (LENGTH)
            //$length_key = ($p_data['categories_id'] == 29) ? 'Größe' : 'Länge';
            //test to decide based on length inst
            $length_key = $a_length < 10 ? 'Größe' : 'Länge';
            $xml_avariant = $xmlt->drawTag($xml_avariantdata, 'A_VARIANT', '', array('identifier' => 'name', 'key' => $length_key));
            $xmlt->drawTag($xml_avariant, 'VALUE', textLength($a_length), array('xml:lang' => 'x-default'));
        }
        //VARIANT COLOR
        if (count($p_data['colors']) > 0) {
            $xml_avariant = $xmlt->drawTag($xml_avariantdata, 'A_VARIANT', '', array('identifier' => 'name', 'key' => 'Farbe'));
            $xmlt->drawTag($xml_avariant, 'VALUE', implode(' ', $p_data['colors']), array('xml:lang' => 'x-default'));
        }
    }
    //A_TAGS (Attributes)
    //A_PRICEDATA
    $xml_apricedata = $xmlt->drawTag($xml_article, 'A_PRICEDATA');
    foreach ($catalogs[$pid] as $tb_channel => $cat) {
        //A_PRICE
        ${"xml_aprice_" . $a_nr} = $xmlt->drawTag($xml_apricedata, 'A_PRICE', '', array('channel' => $tb_channel));
        //A_VK
        $xmlt->drawTag(${"xml_aprice_" . $a_nr}, 'A_VK', $cat['price']);
        if ($cat['price_old'] > 0) {
            //A_VK_OLD
            $xmlt->drawTag(${"xml_aprice_" . $a_nr}, 'A_VK_OLD', $cat['price_old']);
        }
    }
    //Only generate images and include in XML if needed
    $upload_image = false;
    foreach ($catalogs[$pid] as $tb_channel => $cat) {
        if ($cat['image_uploaded'] == '0') {
            $upload_image = true;
            if (!in_array($pid, $images_uploaded)) {
                $images_uploaded[] = $pid;
            }
            break;
        }
    }
    if ($upload_image) {
        //A_MEDIADATA
//.........这里部分代码省略.........
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:tradebyte-catalog-uploader.php

示例6: forecasting

$content .= '<div class="notice smallText">' . $forecasting_conf['promotion-orders-desc'] . '</div>';
$content .= '<div style="margin-top:5px;"><table border="0" cellspacing="0" cellpadding="0">';
$content .= '<tr><td>L30D Daily average</td><td>=</td><td>' . $daily_sold . '</td></tr>';
$content .= '<tr><td>L30D Weekly average</td><td>=</td><td>' . $last_week_sold . '</td></tr>';
$content .= '<tr><td>Today</td><td>=</td><td class="w080">KW ' . $kw_now . '</td></tr>';
$content .= '<tr><td colspan="3" class="bold">Graph is using product level forecasting (not article level)</td></tr>';
$content .= '</table></div>';
$content .= '</div>';
$content .= '<div style="clear:both;padding-top:20px;">';
$content .= '<h2>Depot Refill using Forecast';
if ($articles_id != '*' && count($p->articles) > 0) {
    $content .= ' <span id="txt-show-all-articles" class="pointer blue smallText">&laquo;show all articles&raquo;</span>';
}
$content .= '</h2>';
foreach ($p->articles as $aid => $a) {
    $a_title = $a['length'] > 0 ? textLength($a['length']) : '<span class="notice">No Length</span>';
    $daily_sold = $p->log_articles[$aid][Product::FORECAST_DAILY_COLUMN_NAME];
    $stock_target = $p->getDIOHstockTarget($aid);
    $stock_available = $p->retrieveStockQuantity($aid);
    $stock_available_dioh = $p->displayDIOH($aid, $stock_available);
    $refill_ordered = $p->retrieveRefillQuantity($aid);
    $missing_qty = $stock_target - ($stock_available + $refill_ordered);
    if ($missing_qty < 0) {
        $missing_qty = 0;
    }
    $show_box = $articles_id == '*' || $articles_id == $aid ? '' : 'display:none;';
    $content .= '<div class="float-box w300 ui-corner-all" style="padding:5px;margin:0 10px 10px 0;' . $show_box . '"><table border="0" cellspacing="0" cellpadding="0">';
    $content .= '<tr><td colspan="3" class="bold">EAN ' . $a['products_ean'] . ' - ' . $a_title . '</td></tr>';
    $content .= '<tr><td>Daily Average <span class="red" title="' . $forecasting_conf['promotion-orders-desc'] . '">(!)</span></td><td>=</td><td>' . $daily_sold . '</td></tr>';
    $content .= '<tr><td title="Stock Target based on DIOH Target Settings">Stock Target (' . Product::$diohStopLevel[$p->stars] . ' days)</td><td>=</td><td>' . $stock_target . '</td></tr>';
    $content .= '<tr><td>Stock Available</td><td>=</td><td>' . $stock_available . '&nbsp;<span class="notice">(' . $stock_available_dioh . ')</span></td></tr>';
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:product-detail-forecasting.php

示例7: printQualityControl

 function printQualityControl($product)
 {
     $length = $product['final_length'];
     $materials = $product['elements']['materials'];
     $product_qty = $product['qty'];
     $products_id = $product['id'];
     $product_text = '';
     foreach ($product['options'] as $key => $value) {
         if ($value == 'Text') {
             $product_text = $product['options_values'][$key];
         }
     }
     $cpid_bd = 1;
     $tot_beads = 0;
     $cpid_cp = 2;
     $tot_chainpearls = 0;
     $cpid_cl = 3;
     $clasps = array();
     $cpid_pn = array(4, 8);
     $tot_pendants = 0;
     $cpid_sp = 5;
     $tot_spacers = 0;
     $tot_weight = 0;
     $custom = array();
     foreach ($materials as $m) {
         $id = $m['elements_id'];
         $qty = $m['quantity'];
         $cpid = $this->elements[$id]['cpid'];
         $weight = $this->elements[$id]['weight'];
         if ($cpid == $cpid_bd) {
             $tot_beads += $qty;
         } elseif ($cpid == $cpid_cp) {
             $tot_chainpearls += $qty;
         } elseif ($cpid == $cpid_cl) {
             $clasps[] = $id;
         } elseif (in_array($cpid, $cpid_pn)) {
             $tot_pendants += $qty;
         } elseif ($cpid == $cpid_sp) {
             $tot_spacers += $qty;
         }
         $tot_weight += $weight;
         if (isset($m['custom'])) {
             $custom[] = nl2br(implode("\n\n", $m['custom']));
         }
     }
     $result = array();
     $result[] = '<div class="table-head"><h2>Quality Control</h2></div>';
     $result[] = '<div>';
     $result[] = '<table class="qc" border="0" cellpadding="0" cellspacing="0">';
     $result[] = '<tr>';
     $result[] = '<th class="col_no">No</th>';
     $result[] = '<th class="col_len">Total Length</th>';
     $result[] = '<th class="col_gp">Finishing</th>';
     $result[] = '<th class="col_qc">Overall Quality</th>';
     $result[] = '<th class="col_by">QC By</th>';
     $result[] = '</tr>';
     for ($p = 1; $p <= $product_qty; $p++) {
         if (count($custom) > 0) {
             $custom_text = implode('<br /><br />', $custom);
         } elseif ($product_text != '') {
             $custom_text = $product_text;
         } else {
             $custom_text = '-';
         }
         $finishing = array();
         if (in_array($products_id, $this->gold_plated)) {
             $finishing[] = 'Goldplating';
         }
         $result[] = '<tr>';
         $result[] = '<td class="col_no">' . $p . '</td>';
         $result[] = '<td>' . ($length > 0 ? '~ ' . textLength($length) : '&nbsp;') . '</td>';
         $result[] = '<td>' . (count($finishing) > 0 ? implode(', ', $finishing) : '&nbsp;') . '</td>';
         $result[] = '<td>Check</td>';
         $result[] = '<td>&nbsp;</td>';
         $result[] = '</tr>';
     }
     $result[] = '</table>';
     $result[] = '</div>';
     $result[] = '<div>&nbsp;</div>';
     $result_text = implode("\n", $result);
     return $result_text;
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:82,代码来源:production_instruction_old.php

示例8: tep_db_query

$q_min_sold = tep_db_query("SELECT {$bg_settings['log_column']} AS actual_sold FROM products_log WHERE products_id = {$product_id}");
$r_min_sold = tep_db_fetch_array($q_min_sold);
$bg_status = 'bad';
if ($r_min_sold['actual_sold'] >= $bg_settings['min_sold_good']) {
    $bg_status = 'good';
}
if ($r_min_sold['actual_sold'] >= $bg_settings['min_sold_best']) {
    $bg_status = 'best';
}
$qa = "SELECT p.products_id, 0 AS products_articles_id, pnc.products_length AS length FROM products p LEFT JOIN products_non_configurator pnc ON pnc.products_id = p.products_id";
$qa .= " WHERE p.products_id = {$product_id}";
$qa .= " UNION ALL";
$qa .= " SELECT products_id, products_articles_id, length FROM products_articles WHERE products_id = {$product_id}";
$pa = tep_db_query($qa);
if (tep_db_num_rows($pa) > 0) {
    $result .= '<table border="0" cellpadding="0" cellspacing="0">';
    $result .= '<tr><td colspan="2"><span class="' . $bg_status . '">' . strtoupper($bg_status) . ' SELLING PRODUCT';
    $result .= $bg_status == 'bad' ? '<br/>Please Put In Bin' : '<br/>Please QC, if bad please repair it first before send back to HH';
    $result .= '</span></td></tr>';
    $result .= '</table>';
    $result .= '<table border="0" cellpadding="0" cellspacing="0">';
    $result .= '<tr><td colspan="2">&nbsp;</td></tr>';
    $result .= '<tr><td colspan="2"><h3>Length(s) of Product ' . $product_id . ' / ' . $product_model . '</h3></td></tr>';
    while ($r = tep_db_fetch_array($pa)) {
        $result .= '<tr><td>' . textLength($r['length']) . '</td><td><input type="button" id="' . $product_id . '-' . $r['products_articles_id'] . '-' . $bctype . '" class="print-label" value="Print Label" /><span class="msg"></span></td></tr>';
    }
    $result .= '</table>';
} else {
    $result = "Product {$product_id} Not Found!";
}
echo $result;
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:product-label-get-articles.php

示例9: while

 $result .= '<th>Price</th>';
 $result .= '<th>Qty</th>';
 $result .= '<th>Status</th>';
 $result .= '<th>Status Since</th>';
 $result .= '</tr>';
 $result .= '</thead>';
 $prev_oid = '';
 $rowclass = 'e';
 $rowcount = 0;
 $result .= '<tbody>';
 while ($row = tep_db_fetch_array($r)) {
     $rowcount++;
     $status_summary[$row['status']] += $row['quantity'];
     if ($rowcount <= $limitrows) {
         $type = $class_do->translateOrderSource($row['trans_type'], $row['trans_id'], true, null, $row['products_id']);
         $length = textLength($row['article_length'] > 0 ? $row['article_length'] : $row['products_length'], false);
         $row['article_number'] = $row['products_model'] . ($length > 0 ? '_' . $length : '');
         $article = '<div><a href="?open=product-detail&amp;products_id=' . $row['products_id'] . '" target="_blank" title="View Product Detail">' . $row['article_number'] . '</a></div>';
         $pimg = webImageSource($row['products_image'], '500');
         if ($pimg != '') {
             $thumb = '<div class="thumb" style="display:none;"><a href="' . $pimg . '" class="view_image" title="View Image of ' . $row['article_number'] . '">' . webImage($row['products_image'], '80', '80', '', 'img-border img-padding') . '</a></div>';
             $article = $thumb . $article;
         }
         $status_date_ts = strtotime($row['status_date'] == '' ? $row['order_date'] : $row['status_date']);
         $status_date = date('d-M-y', $status_date_ts);
         if ($status_date_ts < $statusdaymrk) {
             $status_date = '<span class="bold red">' . $status_date . '</span>';
         }
         if ($row['depot_orders_id'] != $prev_oid) {
             $rowclass = $rowclass == 'o' ? 'e' : 'o';
         }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:report-weekly-order-summary.php

示例10: checkProductOnBag

function checkProductOnBag($sp_type, $order_id, $ean_code, $list_return_need_refresh = false)
{
    global $class_jo;
    global $class_o;
    use_class('payone');
    use_class('products_minierp');
    use_class('products_ean');
    $class_payone = new payone();
    $class_pm = new products_minierp();
    $class_pean = new products_ean();
    $status = 'RETURNNOTALLOWED';
    $result = array();
    $is_best_product = false;
    $articles = $class_pean->getProductArticle($ean_code);
    $length = textLength($articles['length']);
    //Default value of image additional info (this info will displayed on product image of Mod03ProductBagCheckView.mxml
    $image_additional_info_text = '';
    //Notes: below style is adjusted with flex Property Styles, please match it with it if need to add more styles
    $image_additional_info_style[] = 'color:#000000';
    $image_additional_info_style[] = 'fontSize:25';
    $image_additional_info_style[] = 'textAlign:right';
    //start, end, left, right, center, justify
    //Return could be created at least 1 day after it is sent
    $qty = 0;
    $qtyr = 0;
    $latest_shipping = date('Y-m-d 23:59:59', strtotime('yesterday'));
    if (strtolower($sp_type) == 's') {
        $qc = "SELECT joi.jng_sp_orders_items_id, joi.products_id" . ", joi.order_quantity, MAX(joish.status_date) AS sent_date" . " FROM jng_sp_orders_items joi" . " INNER JOIN jng_sp_orders_items_status_history joish" . " ON joish.jng_sp_orders_items_id = joi.jng_sp_orders_items_id" . " AND joish.status = 9" . " WHERE joi.jng_sp_orders_id = '{$order_id}'" . " AND joi.products_ean = '{$ean_code}' AND joi.status NOT IN (10,12)" . " GROUP BY jng_sp_orders_items_id" . " HAVING sent_date <= '{$latest_shipping}'";
        $c = tep_db_query($qc);
        //We need to handle if 1 article is bought multiple times as diff item
        while ($rc = tep_db_fetch_array($c)) {
            $item_id = $rc['jng_sp_orders_items_id'];
            $qty = intval($rc['order_quantity']);
            $products_id = $rc['products_id'];
            $qc2 = "SELECT SUM(return_quantity) AS return_quantity" . " FROM jng_sp_orders_items_return" . " WHERE jng_sp_orders_items_id = '{$item_id}'";
            $c2 = tep_db_query($qc2);
            $r2 = tep_db_fetch_array($c2);
            $qtyr = intval($r2['return_quantity']);
            if ($qty > $qtyr) {
                break;
            }
        }
    } elseif (strtolower($sp_type) == 'j') {
        $products_id = $articles['products_id'];
        $products_articles_id = $articles['products_articles_id'];
        $qc = "SELECT op.orders_products_id, op.products_id" . ", op.products_quantity, MAX(opsh.status_date) AS sent_date" . " FROM orders_products op" . " INNER JOIN orders_products_status_history opsh" . " ON opsh.orders_products_id = op.orders_products_id" . " AND opsh.status = 9" . " WHERE op.orders_id = '{$order_id}'" . " AND op.products_id = '{$products_id}'" . " AND op.products_articles_id = '{$products_articles_id}'" . " AND op.status NOT IN (10,12)" . " GROUP BY orders_products_id" . " HAVING sent_date <= '{$latest_shipping}'";
        $c = tep_db_query($qc);
        //We need to handle if 1 article is bought multiple times as diff item
        while ($rc = tep_db_fetch_array($c)) {
            $item_id = $rc['orders_products_id'];
            $qty = intval($rc['products_quantity']);
            $products_id = $rc['products_id'];
            $qc2 = "SELECT SUM(return_qty) AS return_quantity" . " FROM orders_products_return" . " WHERE orders_products_id = '{$item_id}'";
            $c2 = tep_db_query($qc2);
            $r2 = tep_db_fetch_array($c2);
            $qtyr = intval($r2['return_quantity']);
            if ($qty > $qtyr) {
                break;
            }
        }
    }
    if ($qty > $qtyr) {
        $status = 'MCCHECKPRODUCTONBAG';
        //Return reasons
        $return_reasons[] = 'Goldplating';
        $return_reasons[] = 'Stone missing';
        $return_reasons[] = 'Silver not polished';
        $return_reasons[] = 'Scratches';
        $return_reasons[] = 'Knot in chain';
        $return_reasons[] = 'Soldering point visible';
        $return_reasons[] = 'Broken';
        $return_reasons[] = 'Out of shape';
        $return_reasons[] = 'Tarnishing';
        $return_reasons[] = 'Too big';
        $return_reasons[] = 'Too large';
        $return_reasons[] = 'Different from image';
        $return_reasons[] = 'Change mind';
        $return_reasons[] = 'Double order';
        $return_reasons[] = 'Quality';
        $return_reasons[] = 'Goldplated peeled off';
        $return_reasons[] = 'Wrong color';
        $return_reasons[] = 'Wrong product';
        $return_reasons[] = 'Bad setting';
        sort($return_reasons);
        //Note: DO NOT change Others, since this value used on some logic on MC codes
        $return_reasons = array_merge(array('Others'), $return_reasons);
        $result['return_reason_list'] = $return_reasons;
        //Show Swarovski Elements text when product contain material swarovski "4"
        if ($class_pm->productContainMaterials($products_id, 4)) {
            $image_additional_info_text = 'Swarovski Elements';
        }
    }
    if ($products_id != '' && $products_id != 0) {
        /*DEACTIVATE CHECKING, SINCE ALL RETURNED PRODUCTS ARE KEPT ON HH DEPOT
          $is_best_product = $class_pm->isBestProduct($products_id);
           */
        $is_best_product = true;
        $result['product_id'] = $products_id;
        $qp = "SELECT p.*, pd.products_name FROM products p INNER JOIN products_description pd ON p.products_id = pd.products_id\n                WHERE p.products_id = {$products_id} AND pd.language_id = 2";
        $dbqp = tep_db_query($qp);
//.........这里部分代码省略.........
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:mod03_product_return.php

示例11: array

    $matexp_tot = $stock_on_total * $matexp;
    if ($row['bin_code'] != '') {
        $total_bins++;
    } else {
        $total_bins_unknown++;
    }
    $total_qty_stock += $stock_available;
    $total_qty_booked_m += $stock_on_and_bookedmanually;
    $total_qty_booked_r += $stock_on_and_bookedbyrealorder;
    $total_qty_total += $stock_on_total;
    $total_matexp_tot += $matexp_tot;
    $st = array();
    $st['bin'] = $class_bins->getCleanBinCode($row['bin_code']);
    $st['cat'] = $row['categories_name'];
    $st['ean'] = $row['products_ean'];
    $st['idl'] = $row['products_id'] . ($row['length'] > 0 ? ' (' . textLength($row['length'], false) . ')' : '');
    $st['mxs'] = displayCurrency('EUR', $matexp);
    $st['mxt'] = displayCurrency('EUR', $matexp_tot);
    $st['qty'] = number_format($stock_available);
    $st['bok 1'] = number_format($stock_on_and_bookedmanually);
    $st['bok 2'] = number_format($stock_on_and_bookedbyrealorder);
    $st['tot'] = number_format($stock_on_total);
    $st['act'] = '&nbsp;';
    $stocks_table[] = $st;
}
$total_products = count($products);
$total_articles = count($articles);
$title = 'Stock List of ' . $segment['name'];
if ($rack_id != '') {
    $title .= ' - Rack ' . $rack_no;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:stock-list.php

示例12: switch

 $value = '';
 switch ($hkey) {
     case 'id':
         //Nr.
         $value = $i['order_item_count'] == '0' ? '&nbsp;' : $i['order_item_count'];
         break;
     case 'image':
         //Product
         $value = '<div>';
         $value .= '<a href="?open=product-detail&amp;products_id=' . $i['products_id'] . '" target="_blank" title="View/Manage Product Detail">' . $product['p']['products_model'] . '</a>';
         $length = '';
         if (!is_null($article)) {
             $length = textLength($article['length']);
         } else {
             if ($product['pnc']['products_length'] > 0) {
                 $length = textLength($product['pnc']['products_length']);
             }
         }
         if ($length != '') {
             $value .= '-' . str_replace(' ', '', $length);
         }
         $value .= '</div>';
         $value .= '<div class="thumb smallText" style="display:none;">EAN ' . $i['products_ean'] . '</div>';
         $img_zoom = webImageSource($product['p']['products_image'], '500');
         if ($img_zoom != '') {
             $thumb = '<div class="thumb" style="display:none;"><a href="' . $img_zoom . '" class="view_image">' . webImage($product['p']['products_image'], '80', '80', '', 'img-border img-padding') . '</a></div>';
             $value = $thumb . $value;
         }
         break;
     case 'source':
         //EAN
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:customer-care-order-detail.php

示例13: foreach

 $op_total_product = 0;
 $op_total_price = 0;
 $ret_count = 0;
 foreach ($returns as $row) {
     $ret_count++;
     $p_qty_pri = $row['return_qty'] * $row['final_price'];
     $op_total_product += $row['return_qty'];
     $op_total_price += $p_qty_pri;
     $product_configurator = $row['visible_status'] != '';
     $ret_link = '<a href="?open=order-return&amp;id=' . $row['orders_products_return_id'] . '&amp;hidemenu=true" class="view_webpage" title="View Return Detail">More Info</a>';
     $op_returned['sort'] = $ret_count;
     $op_returned['date'] = date('d.m.Y', strtotime($row['return_date']));
     $promod = '<a href="?open=product-detail&amp;products_id=' . $row['products_id'] . '" title="Manage Product Detail">';
     $promod .= $row['products_model'];
     if ($row['products_length'] > 0) {
         $promod .= '_' . textLength($row['products_length'], false);
     }
     $promod .= '</a>';
     $pimg = webImageSource($row['products_image'], '500');
     if ($pimg != '') {
         $thumb = '<div class="thumb" style="display:none;"><a href="' . $pimg . '" class="view_image">' . webImage($row['products_image'], '80', '80', '', 'img-border img-padding') . '</a></div>';
         $promod = $thumb . $promod;
     }
     $op_returned['model'] = $promod;
     //$op_returned['name'] = $row['products_name'];
     /*
     //PRODUCT ATTRIBUTES
     $op_id_temp = $row['orders_products_id'];
     $pa_query = tep_db_query("SELECT products_options, products_options_values FROM orders_products_attributes WHERE orders_products_id=$op_id_temp");
     if(tep_db_num_rows($pa_query)>0) {
         $op_returned['name'] .= ' <small>';
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:order.php

示例14: drawOrderDisplay


//.........这里部分代码省略.........
         $result .= '<div id="box-order-items" style="position:fixed;top:30;bottom:0;height:93%;left:0;width:480px;padding:10px;background:#efefef;border-right:1px inset #666;overflow:auto;">';
         $neworder = array();
         $no = array();
         $no['l'] = 'No';
         $no['d'] = 'Image';
         $no['t2'] = 'Info';
         $no['q'] = 'Order<br/>Qty.';
         $no['r'] = 'Stock Status<br /> and Actions';
         $neworder[] = $no;
         foreach ($order_products as $op) {
             if ($op[$colname_articles_id] > 0) {
                 $article = $class_pa->retrieveDetail($op[$colname_articles_id]);
                 $prolength = $article['length'];
             } else {
                 $product_detail = $class_pm->retrieveDetail($op[$colname_products_id], 'pnc');
                 $prolength = $product_detail['pnc']['products_length'];
             }
             $customize_info = '';
             if (!is_null($colname_custom_text1) && !is_null($colname_custom_text2)) {
                 if ($op[$colname_custom_text1] != '' || $op[$colname_custom_text2] != '') {
                     $customize_info .= '<div style="margin-top:10px;">';
                     if ($op[$colname_custom_text1] != '') {
                         $customize_info .= $op[$colname_custom_text1];
                     }
                     if ($op[$colname_custom_text2] != '') {
                         $customize_info .= '<br />' . $op[$colname_custom_text2];
                     }
                     $customize_info .= '</div>';
                 }
             }
             if (!is_null($colname_custom_image) && $op[$colname_custom_image] != '') {
                 $customize_info .= webImage($op[$colname_custom_image], '80', '80', 'Custom Image');
             }
             $length_text = $prolength > 0 ? 'Length: ' . textLength($prolength) : '<span class="notice">No Length</span>';
             //$tooltip_data = getTooltipThumbData($op[$colname_products_id], $op[$colname_articles_id], 0);
             $pdata = $class_pm->retrieveDetail($op[$colname_products_id], 'pl,sp');
             $tooltip_text = '<table class="tiny" border="0" cellpadding="0" cellspacing="0" align="center">';
             $tooltip_text .= '<tr><td width="80" title="Sold Last 30 Days">Sold L30D</td><td>' . intval($pdata['pl']['sold_monthly_1']) . ' products</td></tr>';
             $tooltip_text .= '<tr><td>Total sold</td><td>' . intval($pdata['sp']['0']['total_sold']) . ' products</td></tr>';
             $tooltip_text .= '<tr><td>Return Rate</td><td>' . number_format($pdata['sp']['0']['returned_rate'], 1) . '%</td></tr>';
             $tooltip_text .= '<tr><td>Product Age</td><td>' . $pdata['sp']['0']['active_age'] . ' days</td></tr>';
             $tooltip_text .= '</table>';
             $info = array();
             //var_dump($order_type);
             $info[] = $order_type . '-' . $op[$colname_items_id];
             $info[] = $op['products_ean'];
             $info[] = $op[$colname_products_id] . ' / ' . $op[$colname_products_code];
             $info[] = $length_text;
             $info[] = '&nbsp;';
             $info[] = '<strong>All SP Summary</strong>';
             $info[] = $tooltip_text;
             $action_hidden = '<input type="hidden" id="' . $order_type . '-' . $op[$colname_items_id] . '" name="oiid" value="' . $op[$colname_items_id] . '" />';
             $action_hidden .= '<input type="hidden" name="type" value="' . $order_type . '" />';
             $action = array();
             $action[] = stockStatusDisplay($op['stock_status'], $op['status'], $op[$colname_products_id], $op[$colname_articles_id], $op[$colname_order_qty], null);
             $action[] = '&nbsp;';
             if ($op['stock_status'] == 'S') {
                 $action[] = '<input type="button" name="2" value="&raquo; Sourcing" class="bl green" />';
             } elseif ($op['stock_status'] == 'R' || $op['stock_status'] == 'P' || $op['stock_status'] == 'W') {
                 $action[] = '<input type="button" name="3" value="&raquo; Ready" class="bl green" />';
                 //$action[] = '<input type="button" name="test" value="&raquo; Sourcing" class="bl red" />';
             }
             $action[] = '<input type="button" name="10" value="&times; Cancel" class="bl red" />';
             $no = array();
             $no['l'] = $op['order_item_count'] . '/' . $op['order_item_total'];
             $no['d'] = webImage($op['products_image'], '80', '80', 'Product Image') . $customize_info;
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:67,代码来源:new-orders-process.php

示例15: foreach

 $pdf->Cell($col_subcol_width[2], $lineheight, 'Bild', 1, 0, 'C', true);
 $pdf->Cell($col_subcol_width[3], $lineheight, 'Größe', 1, 0, 'C', true);
 $pdf->Cell($col_subcol_width[4], $lineheight, 'Produktkategorie', 1, 0, 'C', true);
 $pdf->Cell($col_subcol_width[5], $lineheight, 'Article', 1, 0, 'C', true);
 $pdf->Cell($col_subcol_width[6], $lineheight, 'EAN', 1, 0, 'C', true);
 $pdf->Cell($col_subcol_width[7], $lineheight, 'Preis', 1, 0, 'C', true);
 $pdf->Cell($col_subcol_width[8], $lineheight, 'Menge', 1, 0, 'C', true);
 $pdf->ypos += $lineheight;
 $item_counter = 0;
 foreach ($items as $item) {
     $product = $class_pm->retrieveDetail($item['products_id'], 'p,pd,pnc,cat');
     if ($item['products_articles_id'] == 0) {
         $size = $product['pnc']['products_length'] > 0 ? textLength($product['pnc']['products_length']) : '-';
     } else {
         $article = $class_pa->retrieveDetail($item['products_articles_id']);
         $size = textLength($article['length']);
     }
     //            echo '<pre>';
     //            var_dump($product);
     //            echo '</pre>';
     $item_counter++;
     $img_pdf = '';
     $img_path = DIR_WS_IMAGES . 'imagecache/';
     $img_file = basename(webImageSource($product['p']['products_image'], IMAGE_SIZE_THUMBNAIL_2, IMAGE_SIZE_THUMBNAIL_2));
     $img = $img_path . $img_file;
     if ($img != $img_path) {
         $test = getimagesize($img);
         if ($test[2] == 2) {
             $img_pdf = $img;
         }
     }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:delivery-document-retails.php


注:本文中的textLength函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。