當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。