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


PHP Supplier::search方法代码示例

本文整理汇总了PHP中Supplier::search方法的典型用法代码示例。如果您正苦于以下问题:PHP Supplier::search方法的具体用法?PHP Supplier::search怎么用?PHP Supplier::search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Supplier的用法示例。


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

示例1: foreach

                                                      <th>Supplier Name</th>
                                                      <th>Supplier Code</th>
                                                      <th>approved_kgs</th>
                                                      <th>supplied_kgs</th>
                                                      <th>units</th>
                                                      <th>Date</th>
                                                   </tr>
                                                </thead>
                                                <tbody>
                                                   <?php 
 if (!$view->count()) {
     echo 'No user';
 } else {
     foreach ($view->results() as $tag) {
         $code = $tag->supplier_code;
         $vri = $supplier->search('supplier_code', $code, 'f_name');
         //search suppliers name
         $vrii = $supplier->search('supplier_code', $code, 'l_name');
         $k = $vrii . " " . $vri;
         echo "<tr>";
         echo "<td>" . $k . "</td>";
         //echo "<td>".$vri."</td>";
         echo "<td>" . $tag->supplier_code . "</td>";
         echo "<td>" . $tag->approved_kgs . "</td>";
         echo "<td>" . $tag->supplied_kgs . "</td>";
         echo "<td>" . $tag->units . "</td>";
         echo "<td>" . $tag->date . "</td>";
         echo "</tr>";
     }
 }
 ?>
开发者ID:TSMS,项目名称:UCSC-groupProject-Tsms,代码行数:31,代码来源:supply_update.php

示例2: array

 $supplier_code = $_POST["search"];
 $name = DB::getInstance()->get('suppliers', array('supplier_code', '=', $_POST["search"]));
 if (!$name->count()) {
     echo "<span class='status-not-available'> No supplier.</span>";
 } else {
     $code = $_POST["search"];
 }
 $arr = $dailysupply->myTotalSupplyOf6Months($supplier_code);
 $todaydate = date('Y-m-d');
 $todaydate = substr($todaydate, 5, 7);
 // 2015-11-11
 $datemonth = date('Y-m-d');
 $datemonth = substr($datemonth, 0, 8);
 $datemonth = $datemonth . "01";
 //2015-11-02
 $sup_name = $supplier->search('supplier_code', $supplier_code, 'f_name') . " " . $supplier->search('supplier_code', $supplier_code, 'l_name');
 $aprate = $update->search('settings', 'date', $datemonth, 'approx_rate');
 $thismonthkgs = DB::getInstance()->Getsum('approved_kgs', 'daily_supply', $supplier_code);
 echo '
 <dl class="dl-horizontal example1">
    <p>Supplier details<p>
    <dt>Code: </dt>
    <dd>' . $supplier_code . '</dd>
    <dt>Name: </dt>
    <dd>' . $sup_name . '</dd>
    <dt>NIC NO: </dt>
    <dd>' . $supplier->search('supplier_code', $supplier_code, 'nic_no') . '</dd>
    <dt>Approximate tea Rate: </dt>
    <dd>Rs ' . $aprate . '</dd>
    <dt>Supply kgs: </dt>
    <dd>' . $thismonthkgs . ' Kg</dd>
开发者ID:TSMS,项目名称:UCSC-groupProject-Tsms,代码行数:31,代码来源:check_availability.php

示例3: array

                  <div class="box box-primary">
                      <div class="box-header with-border">
                        <div class="form-group">
                           <div class="box-tools pull-right">
                           <a href="message.php"><button class="btn btn-default btn-sm"><i class="fa fa-refresh"></i></button></a>
                         </div>
                           <label>Message Area</label>
                           <?php 
    if (isset($_GET['id'])) {
        $code = $_GET['id'];
        $msginfo = DB::getInstance()->get('message_temp', array('message_id', '=', $code));
        if (!$msginfo->count()) {
            echo 'There is no message...!';
        } else {
            foreach ($msginfo->results() as $info) {
                $vri = $supplier->search('supplier_code', $info->supplier_code, 'f_name');
                $vrii = $supplier->search('supplier_code', $info->supplier_code, 'l_name');
                $txt = $vrii . " " . $vri;
                $type = $info->message_code;
                $reqtype = $supplier->msgtype('message_code', $type, 'request');
                ?>
                                    <div class="box-body">
                                    <dl class="dl-horizontal example1">
                                       <p>Request message
                                       <p>
                                       <dt>Supplier Code: </dt>
                                       <dd><?php 
                echo $info->supplier_code;
                ?>
</dd>
                                       <dt>Supplier Name: </dt>
开发者ID:TSMS,项目名称:UCSC-groupProject-Tsms,代码行数:31,代码来源:message.php

示例4: foreach

    echo "<div style=\"font-size:15px;\"><a href=\"{$link}\" target=\"_blank\">{$link}</a></div> ";
}
echo "</div></li>";
echo "<br><li> <div style=\"font-size:20px;\">Item Copies</div></li></ul></div>";
if (count($copies) > 0) {
    echo "<ul>";
    foreach ($copies as $itemCopy) {
        //collecting item copy details
        $itemCopyId = $itemCopy->get_id();
        $itemCopyOwner = $itemCopy->get_owner();
        $itemCopyStatus = $itemCopy->get_status();
        $itemCopyBarcode = $itemCopy->get_barcode();
        $itemCopyPrice = $itemCopy->get_price();
        $itemCopyInstalledDate = $itemCopy->get_installed_date();
        $itemCopyCondition = $itemCopy->get_condition();
        $itemCopyNo = $itemCopy->get_no();
        $itemCopySupplier = $itemCopy->get_supplier();
        //collecting item copy supplier details
        $supplier = Supplier::search(array("supplier_id" => $itemCopySupplier));
        $supplierName = $supplier->getCompany();
        $supplierName = str_replace(" ", "%19", $supplierName);
        $supplierEmail = $supplier->getEmail();
        echo "<div style=\"float:left;\"><li onclick = itemCopyClicked(\"{$itemCopyId}\",\"{$itemCopyOwner}\",\"{$itemCopyStatus}\",\"{$itemCopyBarcode}\",\"{$itemCopyPrice}\",\"{$itemCopyInstalledDate}\",\"{$itemCopySupplier}\",\"{$supplierName}\",\"{$supplierEmail}\",\"{$itemCopyNo}\");><a class=\"changeBlue\">{$itemCopyNo} &nbsp;</a></li></div><div style=\"font-size:16px; cursor:pointer;\"><font color=\"red\"> (<a onclick=itemCopyDelete(\"{$itemCopyId}\"); >Remove</a>) </font></div>";
    }
    echo "</ul>";
} else {
    echo "<div style=\"font-family: Georgia, serif;font-size:15px;\">No item copies for this item.<div>";
}
//echo "<button type=\"button\" onclick=\"location.href = 'item_copy_add.php?item_id=$item_id&item_name=$itemName';\">Add Item Copy</button>";
//$ItemNameReplaced = str_replace(" ","%19",$itemName);
//echo "<button type=\"button\" onclick=AddItemCopyClicked(\"$item_id\",\"$ItemNameReplaced\")>Add Item Copy</button>";
开发者ID:NalindaHemanga,项目名称:ELMS,代码行数:31,代码来源:getItemDetails.php

示例5: actionSearch

 public function actionSearch()
 {
     $model = new Supplier('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Supplier'])) {
         $model->attributes = $_GET['Supplier'];
     }
     $criteria = new CDbCriteria();
     $criteria->select = 'id,name,lattitude,longitude';
     $Suppliers = $model->search(false)->getData();
     //Build supplier array and supplier items in a format suitable for Mustache js
     $supplierArray = SnapUtil::makeArray($Suppliers);
     foreach ($Suppliers as $Supplier) {
         $supplierItems = SnapUtil::makeArray($Supplier->SupplierProducts);
         foreach ($supplierItems as $gi) {
             $supplierArray[$Supplier->id]['SupplierProducts'][] = $gi;
         }
         $supplierArray[$Supplier->id]['has_items'] = !empty($supplierArray[$Supplier->id]['SupplierProducts']) ? true : false;
     }
     echo json_encode($supplierArray);
     exit;
 }
开发者ID:snapfrozen,项目名称:boxomatic,代码行数:23,代码来源:SupplierController.php

示例6: array

<?php

require_once 'core/init.php';
if (array_key_exists('links', $_POST)) {
    $tel = $_POST['links'];
} else {
    $tel = array();
}
$supplier_data = array("company" => $_POST["company"], "email" => $_POST["email"], "street" => $_POST["street"], "line2" => $_POST["line2"], "city" => $_POST["city"], "province" => $_POST["province"], "postal" => $_POST["postal"], "country" => $_POST["country"], "telephone" => $tel);
//print_r($tel);
$supplier = Supplier::search(array("supplier_id" => $_POST["supId"]));
if ($supplier->update($supplier_data)) {
    $message = "You have successfully Updated the Supplier !!";
    //$response=array("message" => $message);
    echo $message;
} else {
    $message = "The Supplier Registration was unsuccessful.";
    //$response=array("message" => $message);
    echo $message;
}
开发者ID:NalindaHemanga,项目名称:ELMS,代码行数:20,代码来源:edit_supplier.php

示例7: import_parts

/**
 * @brief Import Parts (create Parts, and if neccessary, Categories, Footprints and so on)
 *
 * @note    This function uses database transactions. If an error occurs, all changes will be rolled back.
 *
 * @param Database  &$database          reference to the database object
 * @param User      &$current_user      reference to the user which is logged in
 * @param Log       &$log               reference to the Log-object
 * @param array     $data               The import data array from "extract_import_data_from_request()"
 * @param boolean   $only_check_data    If true, this function will only check if all values in "$data" are valid.
 *                                      In this case, no parts will be imported!
 *
 * @retval array    All new Part objects (only if "$only_check_data == false")
 *
 * @throws Exception    if there was an error (maybe the passed data is not valid)
 */
function import_parts(&$database, &$current_user, &$log, $data, $only_check_data = false)
{
    $parts = array();
    try {
        $transaction_id = $database->begin_transaction();
        // start transaction
        // Get the category, footprint, storelocation, ... which are named "Import", or create them.
        // We need this elements as parent for new elements, which will be created while import parts.
        $import_categories = Category::search($database, $current_user, $log, 'Import', true);
        if (count($import_categories) > 0) {
            $import_category = $import_categories[0];
            $import_category_created = false;
        } else {
            $import_category = Category::add($database, $current_user, $log, 'Import', NULL);
            $import_category_created = true;
            // we can delete it later if we didn't need it
        }
        $import_storelocations = Storelocation::search($database, $current_user, $log, 'Import', true);
        if (count($import_storelocations) > 0) {
            $import_storelocation = $import_storelocations[0];
            $import_storelocation_created = false;
        } else {
            $import_storelocation = Storelocation::add($database, $current_user, $log, 'Import', NULL);
            $import_storelocation_created = true;
            // we can delete it later if we didn't need it
        }
        $import_footprints = Footprint::search($database, $current_user, $log, 'Import', true);
        if (count($import_footprints) > 0) {
            $import_footprint = $import_footprints[0];
            $import_footprint_created = false;
        } else {
            $import_footprint = Footprint::add($database, $current_user, $log, 'Import', NULL);
            $import_footprint_created = true;
            // we can delete it later if we didn't need it
        }
        $import_suppliers = Supplier::search($database, $current_user, $log, 'Import', true);
        if (count($import_suppliers) > 0) {
            $import_supplier = $import_suppliers[0];
            $import_supplier_created = false;
        } else {
            $import_supplier = Supplier::add($database, $current_user, $log, 'Import', NULL);
            $import_supplier_created = true;
            // we can delete it later if we didn't need it
        }
        $import_manufacturers = Manufacturer::search($database, $current_user, $log, 'Import', true);
        if (count($import_manufacturers) > 0) {
            $import_manufacturer = $import_manufacturers[0];
            $import_manufacturer_created = false;
        } else {
            $import_manufacturer = Manufacturer::add($database, $current_user, $log, 'Import', NULL);
            $import_manufacturer_created = true;
            // we can delete it later if we didn't need it
        }
        $import_category_used = false;
        $import_storelocation_used = false;
        $import_footprint_used = false;
        $import_supplier_used = false;
        $import_manufacturer_used = false;
        // start import
        $row_index = 0;
        foreach ($data as $row) {
            $name = $row['part_name'];
            $description = $row['part_description'];
            $instock = $row['part_instock'];
            $mininstock = $row['part_mininstock'];
            $comment = $row['part_comment'];
            $category_name = $row['part_category_name'];
            $footprint_name = $row['part_footprint_name'];
            $storelocation_name = $row['part_storelocation_name'];
            $manufacturer_name = $row['part_manufacturer_name'];
            $supplier_name = $row['part_supplier_name'];
            $supplierpartnr = $row['part_supplierpartnr'];
            $price = $row['part_price'];
            // search elements / create them if they don't exist already
            if (strlen($category_name) > 0) {
                $categories = Category::search($database, $current_user, $log, $category_name, true);
                if (count($categories) > 0) {
                    $category = $categories[0];
                } else {
                    $category = Category::add($database, $current_user, $log, $category_name, $import_category->get_id());
                    $import_category_used = true;
                }
            } else {
                throw new Exception('Jedes Bauteil muss eine Kategorie haben!');
//.........这里部分代码省略.........
开发者ID:AlexanderS,项目名称:Part-DB,代码行数:101,代码来源:lib.import.php

示例8: header

<?php

require_once 'core/init.php';
$member_role = $_SESSION['roles'];
if (in_array("Laboratory Administrator", $member_role)) {
} else {
    header('location:restricted_page.php');
}
$searchValue = $_GET["searchVal"];
$new_supplier = Supplier::search(["supplier_email" => $searchValue]);
if ($new_supplier) {
    echo "<div>";
    echo "<fieldset>";
    echo "<legend>Supplier Details</legend>";
    echo "<div style='display:inline-block'>";
    echo "<div style='display:inline-block;vertical-align:top'>";
    echo "<table style='padding:20px;'>";
    echo "<tr><td>Supplier Name    :<th><td>" . $new_supplier->getCompany();
    echo "<tr><td>Email    :<th><td>" . $new_supplier->getEmail() . "<td><tr>";
    echo "<tr><td>Address :<th><td>" . $new_supplier->getStreet() . "," . $new_supplier->getLine2() . "," . $new_supplier->getCity() . "." . "<td><tr>";
    echo "<tr><td>Province    :<th><td>" . $new_supplier->getProvince() . "<td><tr>";
    echo "<tr><td>Postal    :<th><td>" . $new_supplier->getPostal() . "<td><tr>";
    echo "<tr><td>Country    :<th><td>" . $new_supplier->getCountry() . "<td><tr>";
    echo "<tr><td>Contact Number    :<th><td>" . $new_supplier->getTelephone() . "<td><tr>";
    echo "</table>";
} else {
    echo "<h3><font color='red'>No Supplier Found !!</font></h3>";
}
开发者ID:NalindaHemanga,项目名称:ELMS,代码行数:28,代码来源:supplier_search_panel.php

示例9: actionGeneratePdf

 public function actionGeneratePdf()
 {
     $this->layout = 'pdf';
     $model = new Supplier('search');
     if (isset($_GET['Supplier'])) {
         $model->attributes = $_GET['Supplier'];
     }
     // to execute the filters (if is the case)
     $dataProvider = $model->search();
     $dataProvider->pagination = false;
     $mPDF1 = Yii::app()->ePdf->mpdf();
     # You can easily override default constructor's params
     $mPDF1 = Yii::app()->ePdf->mpdf('', 'A5');
     # renderPartial (only 'view' of current controller)
     $mPDF1->WriteHTML($this->renderPartial('admin', array('model' => $model), true));
     # Outputs ready PDF
     $mPDF1->Output();
 }
开发者ID:anjanababu,项目名称:Asset-Management,代码行数:18,代码来源:SupplierController.php


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