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


PHP customer::getCustomer方法代码示例

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


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

示例1: addSales

 function addSales($sale = null)
 {
     if ($sale == null) {
         $sale = $this;
     }
     $sale_id = $this->db_handler->add_model($sale);
     if (is_array($this->sales_items) and count($this->sales_items) != 0) {
         foreach ($this->sales_items as $sales_item) {
             $sales_item->sale_id = $sale_id;
             $sales_item->company_id = $sale->company_id;
             $sales_item->addSaleItem();
             $inv = new inventry();
             $inv->company_id = $sale->company_id;
             $inv->item_id = $sales_item->item_id;
             $invs = $inv->getInventryForSpecificCompanyAndItem();
             $inv = $invs[0];
             $inv->in_stock_count = $inv->in_stock_count - $sales_item->quantity;
             $inv->updateInventry();
         }
     }
     $description = "Added new Sale (" . $sale->to_string() . ")";
     $customer = new customer();
     $customer->id = $sale->customer_id;
     $customer->getCustomer();
     $customer->total_purchace_amount = $customer->total_purchace_amount + $sale->amount;
     $customer->updateCustomer();
     Log::i($this->tag, $description);
     return $sale_id;
 }
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:29,代码来源:sales.php

示例2: 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 == 6) {
         ///edit customer
         if (isset($_POST['customer_id']) and !empty($_POST['customer_id']) and isset($_POST['customer_name']) and !empty($_POST['customer_name']) and isset($_POST['contact_number']) and !empty($_POST['contact_number'])) {
             $customer = new customer();
             $customer->id = $_POST['customer_id'];
             $customer->getCustomer();
             $customer->customer_name = $_POST['customer_name'];
             $customer->contact_number = $_POST['contact_number'];
             if ($customer->updateCustomer()) {
                 $message = "Customer Updated Successfuly";
                 $responce = array('status' => 'success', 'error' => '', 'data' => array("message" => $message, "id" => $customer->id));
             } else {
                 $description = "Customer update failed, Customer : " . $customer->to_string();
                 Log::e($tag, $description);
                 $mysql_error = mysql_error();
                 if (empty($mysql_error)) {
                     $error_message = 'Some server error occured';
                 } else {
                     $error_message = $mysql_error;
                 }
                 $responce = array('status' => 'failed', 'error' => $error_message, 'data' => array());
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:31,代码来源:update_form_data.php

示例3: customer

$id = $_SESSION['adminid'];
$customer = new customer();
if (isset($_GET['action']) && $_GET['action'] == 'custinvmarkpaid') {
    $id = $_GET['id'];
    $invoice = $customer->getCustomersInvoice($id);
    $smarty->assign('invoice', $customer->getCustomersInvoice($id));
    $smarty->assign('content', $smarty->fetch('custinvmarkpaid.tpl'));
} elseif (isset($_POST['action']) && $_POST['action'] == 'markpaid') {
    $data = $_POST;
    if ($customer->markInvoicedPaid($data)) {
        header('Location: ' . FRONTEND . 'custrevenue.php');
        exit;
    }
} elseif (isset($_GET['action']) && $_GET['action'] == 'invoicelist') {
    $id = $_GET['id'];
    $smarty->assign('customer', $customer->getCustomer($id));
    $smarty->assign('invoices', $customer->getCustomersInvoices($id));
    $smarty->assign('content', $smarty->fetch('custinvoicelist.tpl'));
} else {
    $page = 0;
    if (isset($_GET['page'])) {
        $page = $_GET['page'];
    }
    $customers = $customer->getCustomers($page, $offset = 10);
    $smarty->assign('customercount', $customer->getCustomersCount());
    $smarty->assign('page', $page);
    $smarty->assign('customer', $customers);
    $smarty->assign('content', $smarty->fetch('custrevenue.tpl'));
}
$smarty->assign('action', 'customer');
$smarty->assign('toolbar', $smarty->fetch('toolbar.tpl'));
开发者ID:roshanbhgt,项目名称:erp,代码行数:31,代码来源:custrevenue.php

示例4: get_form_html


//.........这里部分代码省略.........
            ?>
                        <tr id="<?php 
            echo $sale->id;
            ?>
" onclick="select_row(this)" status="not_selected" >
                            <td style="text-align: center;">
                                <?php 
            echo ++$i;
            ?>
                            </td>
                            <td>
                                <?php 
            echo $sale->id;
            ?>
                            </td>
                            <?php 
            $date = date('d/m/Y', strtotime($sale->sale_at) + 5.5 * 60 * 60);
            $time = date('h:m A', strtotime($sale->sale_at) + 5.5 * 60 * 60);
            ?>
                            <td id="date" date="<?php 
            echo $date;
            ?>
" time="<?php 
            echo $time;
            ?>
">
                                <?php 
            echo $date . ' - ' . $time;
            ?>
                            </td>
                            <?php 
            $customer = new customer();
            $customer->id = $sale->customer_id;
            $customer->getCustomer();
            ?>
                            <td id="customer" c_name="<?php 
            echo $customer->customer_name;
            ?>
" c_id="<?php 
            echo $customer->id;
            ?>
" >
                                <?php 
            echo $customer->customer_name . ' ( ID : ' . $customer->id . ' )';
            ?>
                            </td>
                            <td id="discount">
                                <?php 
            echo number_format($sale->discount, 2, '.', '');
            ?>
                            </td>
                            <td id="tax">
                                <?php 
            echo number_format($sale->tax_amount, 2, '.', '');
            ?>
                            </td>
                            <td id="net_amount">
                                <?php 
            echo number_format($sale->net_amount, 2, '.', '');
            ?>
                            </td>
                            <td id="total">
                                <?php 
            echo number_format($sale->amount, 2, '.', '');
            ?>
                            </td>
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:67,代码来源:3.php

示例5: get_form_html


//.........这里部分代码省略.........
            ?>
                        <tr id="<?php 
            echo $sale->id;
            ?>
" onclick="select_row(this)" status="not_selected"  >
                            <td style="text-align: center;">
                                <?php 
            echo ++$i;
            ?>
                            </td>
                            <td>
                                <?php 
            echo $sale->id;
            ?>
                            </td>
                            <?php 
            $date = date('d/m/Y', strtotime($sale->sale_at) + 5.5 * 60 * 60);
            $time = date('h:m A', strtotime($sale->sale_at) + 5.5 * 60 * 60);
            ?>
                            <td id="date" date="<?php 
            echo $date;
            ?>
" time="<?php 
            echo $time;
            ?>
">
                                <?php 
            echo $date . ' - ' . $time;
            ?>
                            </td>
                            <?php 
            $customer = new customer();
            $customer->id = $sale->customer_id;
            $customer->getCustomer();
            ?>
                            <td id="customer" c_name="<?php 
            echo $customer->customer_name;
            ?>
" c_id="<?php 
            echo $customer->id;
            ?>
" >
                                <?php 
            echo $customer->customer_name . ' ( ID : ' . $customer->id . ' )';
            ?>
                            </td>
                            <td id="tax">
                                <?php 
            echo $sale->tax_amount;
            ?>
                            </td>
                            <td id="net_amount">
                                <?php 
            echo $sale->net_amount;
            ?>
                            </td>
                            <td id="total">
                                <?php 
            echo $sale->amount;
            ?>
                            </td>
                            <td id="down_button" style="width: 20px;text-align: center; padding: 10px;">
                                <img id="toggle_button" style="width: 20px; height: 20px; cursor: pointer;"
                                     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"/>
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:67,代码来源:15.php


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