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


PHP item::getItem方法代码示例

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


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

示例1: get_form_html


//.........这里部分代码省略.........
                                            QUANTITY
                                        </td>
                                        <td style="width: 10%;">
                                            RATE
                                        </td>
                                        <td style="width: 10%;">
                                            DISCOUNT(%)
                                        </td>
                                        <td style="width: 10%;">
                                            DISCOUNT
                                        </td>
                                        <td style="width: 10%;">
                                            TOTAL
                                        </td>
                                        <td style="width: 8%;">
                                            DELETE
                                        </td>
                                    </tr>
                                </thead>
                                <tbody style="padding-left: 3px;">
                                <datalist id="items">
                                    <?php 
    $user = new user();
    $user->id = $_SESSION['user_id'];
    $user->getUser();
    $inv = new inventry();
    $invs = array();
    $invs = $inv->getInventryForSpecificCompany($user->company_id);
    if ($invs != NULL and sizeof($invs) != 0) {
        foreach ($invs as $inv) {
            if ($inv->in_stock_count > 0) {
                $item = new item();
                $item->id = $inv->item_id;
                $item->getItem();
                $tax_category = new tax_category();
                $tax_category->id = $inv->tax_category_id;
                $tax_category->getTaxCategory();
                echo $tax_category->to_string();
                echo '<option id="' . $item->id . '"' . ' stock_count="' . $inv->in_stock_count . '"' . ' selling_pize="' . $inv->selling_prize . '"' . ' tax="' . $tax_category->tax_percentage . '"' . ' discount_percent="' . $item->discount_percent . '"' . ' item_name="' . $item->item_name . '"' . ' value="' . $item->item_name . ' - ' . $item->item_code . '" >' . $item->item_name . ' - ' . $item->item_code . '</option>';
            }
        }
    }
    ?>
  
                                </datalist>
                                <tr  status="active" slno="1">
                                    <td style="text-align: center;">1</td><td>
                                        <input type="text" onchange="update_item_details(this)"  oninput="update_item_details(this)" onfocus="$(this).css('border', '0px')" autocomplete="off" list="items" id="item" required />
                                    </td>
                                    <td>
                                        <input type="number" min="0" step="any" required onchange="calculate_total(this)" oninput="calculate_total(this)"  id="quantity"/>
                                    </td>
                                    <td>
                                        <input type="text" value="0" min="0" required disabled onchange="calculate_total(this)" oninput="calculate_total(this)"  id="rate"/>
                                    </td>
                                    <td>
                                        <input type="number" step="0.01" value="0" min="0" max="100" onchange="calculate_total(this)" oninput="calculate_total(this)" id="discount_percent"/>
                                    </td>
                                    <td>
                                        <input type="text" value="0" min="0" required disabled id="discount"/>
                                    </td>
                                    <td>
                                        <input type="text" min="0" required  id="total" disabled/>
                                    </td>
                                    <td style="width: 20px; text-align: center; padding-right: 5px;">
                                        <img id="delete_button" onclick="delete_this_row(this)" style="color: #f00; cursor: pointer; height: 20px; width: 20px; margin-right: auto;  margin-left: auto;" src="../ui/images/cross_button.png"/>
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:67,代码来源:2.php

示例2: get_form_html

function get_form_html($form_id, $id)
{
    ob_start();
    ?>
    <div id="head_div" style="padding: 5px 0; background-color: #ECECEC;  color: #21ACD7;
         border-radius: 5px;margin-left: auto; text-align: center; ">
        <?php 
    $user = new user();
    $user->id = $_SESSION['user_id'];
    $user->getUser();
    $company = new company();
    $company->id = $user->company_id;
    $company->getCompany();
    echo "STOCK REPORT OF {$company->company_name} - {$company->company_code}";
    ?>
    </div>
    <div style="margin-top: 10px; background-color:transparent;padding-bottom: 30px;">
        <style>
            div#purchace_items td,div#purchace_items th{
                border: 1px solid #21ACD7;
            }
            div#purchace_items tbody td{
                padding: 5px 0 5px 5px;
            }
            div#purchace_items tbody td input,div#purchace_items tbody td select{
                padding: 0;
                border: 0;
                margin: 0;
                height: 100%;
                width: 100%;
                background-color: transparent;
            }
        </style>
        <input type="text" id="search" placeholder="Enter Search Key here..." style="width: 100%; margin-left: 0px;" onkeyup="search()" />
        <style>
            img#search{
                position: relative;
                height: 20px;
                width: 20px;
                float: right;
                top: -29px;
                right: 10px;
            }
        </style>
        <img id="search" src="../ui/images/search.png" onclick="search()" />
        <div id="purchace_items" style="width: 100%; padding: 10px 0; color: #21ACD7;">           
            <table id="items_table" style="border-collapse: collapse; width: 100%; 
                   background-color: #fff; border-radius: 10px;  color: #21ACD7;">
                <thead style="text-align: center;">
                    <tr  status="not_selected">
                        <th>
                            #
                        </th>
                        <th>
                            ITEM
                        </th>
                        <th>
                            STOCK COUNT
                        </th>
                        <th style="">
                            SELLING PRIZE
                        </th>
                        <th style="">
                            TAX
                        </th>
                    </tr>
                </thead>
                <tbody style="padding-left: 3px; text-align: center; ">
                    <?php 
    $inventry = new inventry();
    $inventries = $inventry->getInventryForSpecificCompany($user->company_id);
    $i = 0;
    if ($inventries == NULL || sizeof($inventries) == 0) {
        echo '<tr><td colspan="8"> No Stock Found </td></tr>';
    } else {
        foreach ($inventries as $inventry) {
            ?>
                        <tr id="<?php 
            echo $inventry->id;
            ?>
"  onclick="select_row(this)" status="not_selected">
                            <td style="text-align: center;">
                                <?php 
            echo ++$i;
            ?>
                            </td>
                            <td id="item_name"><?php 
            $item = new item();
            $item->id = $inventry->item_id;
            $item->getItem();
            echo $item->item_name . ' (' . $item->item_code . ')';
            ?>
</td>
                            <td id="in_stock_count"><?php 
            echo number_format($inventry->in_stock_count, 3, '.', '');
            ?>
</td>
                            <td id="mrp"><?php 
            echo number_format($inventry->selling_prize, 2, '.', '');
            ?>
//.........这里部分代码省略.........
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:101,代码来源:20.php

示例3: get_form_html

function get_form_html($form_id, $date)
{
    ob_start();
    ?>
    <div id="head_div" style="padding: 5px 0; background-color: #ECECEC;  color: #21ACD7;
         border-radius: 5px;margin-left: auto; text-align: center; ">
        DAY END REPORT OF 
        <input id="date_field" value="<?php 
    if ($date == 0) {
        $date = date('d/m/Y', time());
    }
    echo $date;
    ?>
" />
    </div>
    <div id="sales_items_table" style="margin-top: 10px; background-color:transparent;padding-bottom: 30px;">
        <style>
            div#purchace_items td{
                border: 1px solid #21ACD7;
            }
            div#purchace_items tbody td{
                padding: 5px 0 5px 5px;
            }
            div#purchace_items tbody td input,div#purchace_items tbody td select{
                padding: 0;
                border: 0;
                margin: 0;
                height: 100%;
                width: 100%;
                background-color: transparent;
            }
        </style>
        <div id="purchace_items" style="width: 100%; padding: 10px 0; color: #21ACD7;"> 
            <font>SALES ITEMS</font>
            <table id="sales_items_table" style="border-collapse: collapse; width: 100%; 
                   background-color: #fff; border-radius: 10px;  color: #21ACD7;  margin-top: 5px; margin-bottom: 20px;">
                <thead style="text-align: center;">
                    <tr>
                        <td style="width: 5%;">
                            #
                        </td>
                        <td>
                            ITEM
                        </td>
                        <td style="width: 15%;">
                            COUNT
                        </td>
                        <td style="width: 15%;">
                            TOTAL
                        </td>
                    </tr>
                </thead>
                <tbody style="padding-left: 3px; text-align: center; ">
                    <?php 
    $grand_total = 0;
    $total_count = 0;
    $user = new user();
    $user->id = $_SESSION['user_id'];
    $user->getUser();
    $shop = new company();
    $shop->id = $user->company_id;
    $shop->getCompany();
    $sale_item = new sales_items();
    $date = str_replace('/', '-', $date);
    $date = date('Y-m-d', strtotime($date));
    $sales_items = $sale_item->getOneDaysSaleItems($user->company_id, $date);
    $i = 0;
    if ($sales_items == NULL || sizeof($sales_items) == 0) {
        echo '<tr><td colspan="8"> No Sales Items Found </td></tr>';
    } else {
        foreach ($sales_items as $sales_item) {
            $grand_total = $grand_total + $sales_item->total;
            $total_count = $total_count + $sales_item->quantity;
            ?>
                        <tr>
                            <td style="text-align: center;">
                                <?php 
            echo ++$i;
            ?>
                            </td>
                            <?php 
            $item = new item();
            $item->id = $sales_item->item_id;
            $item->getItem();
            ?>
                            <td style="text-align: left;">
                                <?php 
            echo $item->item_name . ' ( ' . $item->item_code . ' )';
            ?>
                            </td>
                            <td>
                                <?php 
            echo number_format($sales_item->quantity, 3, '.', '');
            ?>
                            </td>
                            
                            <td id="tax">
                                <?php 
            echo number_format($sales_item->total, 2, '.', '');
            ?>
//.........这里部分代码省略.........
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:101,代码来源:24.php

示例4: array

                 $error_message = 'Some server error occured';
             } else {
                 $error_message = $mysql_error;
             }
             $responce = array('status' => 'failed', 'error' => $error_message, 'data' => array());
         }
     } else {
         $responce = array('status' => 'failed', 'error' => 'Data missing', 'data' => array());
     }
 } else {
     if ($form_id == 11) {
         ///edit item
         if (isset($_POST['item_id']) and !empty($_POST['item_id']) and isset($_POST['item_name']) and !empty($_POST['item_name']) and isset($_POST['item_code']) and !empty($_POST['item_code']) and isset($_POST['mrp']) and isset($_POST['tax_category_id']) and !empty($_POST['tax_category_id']) and isset($_POST['purchace_rate']) and isset($_POST['discount_percent']) and isset($_POST['unit']) and !empty($_POST['unit'])) {
             $item = new item();
             $item->id = $_POST['item_id'];
             $item->getItem();
             $item->item_code = $_POST['item_code'];
             $item->item_name = $_POST['item_name'];
             $item->mrp = $_POST['mrp'];
             $item->purchace_rate = $_POST['purchace_rate'];
             $item->tax_category_id = $_POST['tax_category_id'];
             $item->discount_percent = $_POST['discount_percent'];
             $item->unit = $_POST['unit'];
             if ($item->updateItem()) {
                 $message = "Item Updated Successfuly";
                 $responce = array('status' => 'success', 'error' => '', 'data' => array("message" => $message, "id" => $item->id));
             } else {
                 $description = "Item update failed, item : " . $item->to_string();
                 Log::e($tag, $description);
                 $mysql_error = mysql_error();
                 if (empty($mysql_error)) {
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:31,代码来源:update_form_data.php

示例5: get_form_html


//.........这里部分代码省略.........
                                     onclick="toggle_items_visibility(this)" src="../ui/images/down_arrow.png"/>
                                <img id="toggle_button" style="width: 20px; height: 20px; cursor: pointer; display: none;"
                                     onclick="toggle_items_visibility(this)" src="../ui/images/up_arrow.png"/>
                            </td>
                        </tr>
                        <tr id="purchace_item" style="display: none;">
                            <td colspan="8" style="padding:0 0 20px 0;">
                                <table style="border-collapse: collapse; background-color: #c0effd; width: 80%; color: #21ACD7; float: right;">
                                    <tr>
                                        <td>
                                            ITEM
                                        </td>
                                        <td>
                                            QUANTITY
                                        </td>
                                        <td>
                                            PURCHACE RATE
                                        </td>
                                        <td>
                                            MRP
                                        </td>
                                        <td>
                                            TOTAL
                                        </td>
                                    </tr>
                                    <?php 
            foreach ($purchace->getPurchaceItems() as $p_item) {
                ?>
                                        <tr>
                                            <td>
                                                <?php 
                $item = new item();
                $item->id = $p_item->item_id;
                $item->getItem();
                echo $item->item_name . ' - ' . $item->item_code . ' (ID : ' . $item->id . ')';
                ?>
                                            </td>
                                            <td>
                                                <?php 
                echo $p_item->quantity;
                ?>
                                            </td>
                                            <td>
                                                <?php 
                echo $p_item->rate;
                ?>
                                            </td>
                                            <td>
                                                <?php 
                echo $item->mrp;
                ?>
                                            </td>
                                            <td>
                                        <?php 
                echo $p_item->quantity * $p_item->rate;
                ?>
                                            </td>
                                        </tr>
                                        <?php 
            }
            ?>
                                </table>
                            </td>
                        </tr>
                        <?php 
        }
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:67,代码来源:16.php

示例6: get_form_html


//.........这里部分代码省略.........
                                </td>
                            </tr>
                            <tr id="purchace_item" style="display: none;">
                                <td colspan="8" style="padding:0 0 20px 0;">
                                    <table id="purchace_items" style="border-collapse: collapse; background-color: #c0effd; width: 80%; color: #21ACD7; float: right;">
                                        <thead>
                                            <tr>
                                                <th>
                                                    ITEM
                                                </th>
                                                <th>
                                                    QUANTITY
                                                </th>
                                                <th>
                                                    PURCHACE RATE
                                                </th>
                                                <th>
                                                    MRP
                                                </th>
                                                <th>
                                                    TOTAL
                                                </th>
                                            </tr>
                                        </thead> 
                                        <tbody> 
                                            <?php 
            if (is_array($purchace->getPurchaceItems()) and count($purchace->getPurchaceItems()) > 0) {
                foreach ($purchace->getPurchaceItems() as $p_item) {
                    ?>
                                                <tr>
                                                    <td id="item_name"><?php 
                    $item = new item();
                    $item->id = $p_item->item_id;
                    $item->getItem();
                    echo $item->item_name . ' ( ' . $item->item_code . ' )';
                    ?>
</td>
                                                    <td id="quantity"><?php 
                    echo $p_item->quantity;
                    ?>
</td>
                                                    <?php 
                    $tax = new tax_category();
                    $tax->id = $item->tax_category_id;
                    $tax->getTaxCategory();
                    ?>
                                                    <td id="rate" tax_rate="<?php 
                    echo $tax->tax_percentage;
                    ?>
"><?php 
                    echo $p_item->rate;
                    ?>
</td>
                                                    <td><?php 
                    echo $item->mrp;
                    ?>
</td>
                                                    <td>
                                                        <?php 
                    echo $p_item->quantity * $p_item->rate;
                    ?>
                                                    </td>
                                                </tr>
                                                <?php 
                }
            } else {
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:67,代码来源:19.php

示例7: get_form_html


//.........这里部分代码省略.........
                                        </th>
                                        <th>
                                            QUANTITY
                                        </th>
                                        <th>
                                            RATE
                                        </th>
                                        <th>
                                            NET. AMOUNT
                                        </th>
                                        <th>
                                            DISCOUNT
                                        </th>
                                        <th>
                                            TAX
                                        </th>
                                        <th>
                                            TOTAL
                                        </th>
                                    </tr>
                                </thead>
                                    <tbody>
                                    <?php 
            if (is_array($sale->getSalesItems()) and count($sale->getSalesItems())) {
                foreach ($sale->getSalesItems() as $s_item) {
                    ?>
                                    <tr id="<?php 
                    echo $s_item->id;
                    ?>
">
                                        <?php 
                    $item = new item();
                    $item->id = $s_item->item_id;
                    $item->getItem();
                    ?>
                                            <td id="item" 
                                                item_name="<?php 
                    echo $item->item_name . ' - ' . $item->item_code;
                    ?>
"
                                                item_id="<?php 
                    echo $item->id;
                    ?>
">
                                                    <?php 
                    echo $item->item_name . ' - ' . $item->item_code;
                    ?>
                                            </td>
                                            <td id="quantity" val="<?php 
                    echo $s_item->quantity;
                    ?>
">
                                                <?php 
                    echo number_format($s_item->quantity, 3, '.', '');
                    ?>
                                            </td>
                                            <td id="rate" val="<?php 
                    echo $s_item->rate;
                    ?>
">
                                                <?php 
                    echo number_format($s_item->rate, 2, '.', '');
                    ?>
                                            </td>      
                                            <?php 
                    $tax_category = new tax_category();
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:67,代码来源:3.php

示例8: get_form_html


//.........这里部分代码省略.........
                                    <tr>
                                        <td>
                                            ITEM
                                        </td>
                                        <td>
                                            QUANTITY
                                        </td>
                                        <td>
                                            RATE
                                        </td>
                                        <td>
                                            NET. AMOUNT
                                        </td>
                                        <td>
                                            TAX
                                        </td>
                                        <td>
                                            TOTAL
                                        </td>
                                    </tr>
                                </thead>
                                    <tbody>
                                    <?php 
            if (is_array($sale->getSalesItems()) and count($sale->getSalesItems())) {
                foreach ($sale->getSalesItems() as $s_item) {
                    ?>
                                    <tr id="<?php 
                    echo $s_item->id;
                    ?>
">
                                        <?php 
                    $item = new item();
                    $item->id = $s_item->item_id;
                    $item->getItem();
                    ?>
                                            <td id="item" item_name="<?php 
                    echo $item->item_name;
                    ?>
"><?php 
                    echo $item->item_name . ' - ' . $item->item_code;
                    ?>
</td>
                                            <td id="quantity" val="<?php 
                    echo $s_item->quantity;
                    ?>
">
                                                <?php 
                    echo number_format($s_item->quantity, 3, '.', '');
                    ?>
                                            </td>
                                            <td id="rate" val="<?php 
                    echo $s_item->rate;
                    ?>
">
                                                <?php 
                    echo number_format($s_item->rate, 2, '.', '');
                    ?>
                                            </td>                                            
                                            <td>
                                                <?php 
                    echo number_format($s_item->quantity * $s_item->rate - $s_item->tax, 2, '.', '');
                    ?>
                                            </td>    
                                            <?php 
                    $tax_category = new tax_category();
                    $tax_category->id = $item->tax_category_id;
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:67,代码来源:15.php

示例9: get_form_html

function get_form_html($form_id, $id)
{
    ob_start();
    ?>
    <div id="head_div" style="padding: 5px 0; background-color: #ECECEC;  color: #21ACD7;
         border-radius: 5px;margin-left: auto; text-align: center; ">
        <?php 
    $user = new user();
    $user->id = $_SESSION['user_id'];
    $user->getUser();
    $company = new company();
    $company->id = $user->company_id;
    $company->getCompany();
    echo "STOCK REPORT OF {$company->company_name} - {$company->company_code}";
    ?>
    </div>
    <div style="margin-top: 10px; background-color:transparent;padding-bottom: 30px;">
        <style>
            div#purchace_items td{
                border: 1px solid #21ACD7;
            }
            div#purchace_items tbody td{
                padding: 5px 0 5px 5px;
            }
            div#purchace_items th{
                border: 1px solid #21ACD7;
            }
            div#purchace_items tbody th{
                padding: 5px 0 5px 5px;
            }
            div#purchace_items tbody td input,div#purchace_items tbody td select{
                padding: 0;
                border: 0;
                margin: 0;
                height: 100%;
                width: 100%;
                background-color: transparent;
            }
        </style>
        <input type="text" id="search" placeholder="Enter Search Key here..." style="width: 100%; margin-left: 0px;" onkeyup="search()" />
        <style>
            img#search{
                position: relative;
                height: 20px;
                width: 20px;
                float: right;
                top: -29px;
                right: 10px;
            }
        </style>
        <img id="search" src="../ui/images/search.png" onclick="search()" />
        <div id="purchace_items" style="width: 100%; padding: 10px 0; color: #21ACD7;">           
            <table id="items_table" style="border-collapse: collapse; width: 100%; 
                   background-color: #fff; border-radius: 10px;  color: #21ACD7;">
                <thead style="text-align: center;">
                    <tr>
                        <th>
                            #
                        </th>
                        <th>
                            ITEM
                        </th>
                        <th>
                            STOCK COUNT
                        </th>
                        <th style="">
                            SELLING PRIZE
                        </th>
                        <th style="">
                            TAX
                        </th>
                    </tr>
                </thead>
                <tbody style="padding-left: 3px; text-align: center; ">
                    <?php 
    $inventry = new inventry();
    $inventries = $inventry->getInventryForSpecificCompany($user->company_id);
    $i = 0;
    if ($inventries == NULL || sizeof($inventries) == 0) {
        echo '<tr><td colspan="8"> No Stock Found </td></tr>';
    } else {
        foreach ($inventries as $inventry) {
            ?>
                        <tr id="<?php 
            echo $inventry->id;
            ?>
" >
                            <td style="text-align: center;">
                                <?php 
            echo ++$i;
            ?>
                            </td>
                            <td>
                                <?php 
            $item = new item();
            $item->id = $inventry->item_id;
            $item->getItem();
            echo $item->item_name . ' - ' . $item->item_code;
            ?>
                            </td>
//.........这里部分代码省略.........
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:101,代码来源:9.php


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