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


PHP invoice::set_id方法代码示例

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


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

示例1: invoice

 function get_all_parties($invoiceID)
 {
     if ($invoiceID) {
         $invoice = new invoice();
         $invoice->set_id($invoiceID);
         $invoice->select();
         $interestedPartyOptions = $invoice->get_all_partieS($invoice->get_value("projectID"), $invoice->get_value("clientID"));
     }
     if (is_object($this) && $this->get_id()) {
         $interestedPartyOptions = interestedParty::get_interested_parties("invoiceRepeat", $this->get_id(), $interestedPartyOptions);
     }
     return $interestedPartyOptions;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:13,代码来源:invoiceRepeat.inc.php

示例2: invoice

 function attach_invoice($commentID, $entityID, $verbose)
 {
     $invoice = new invoice();
     $invoice->set_id($entityID);
     $invoice->select();
     $str = $invoice->generate_invoice_file($verbose, true);
     $rtn["name"] = "invoice_" . $entityID . ".pdf";
     $rtn["blob"] = $str;
     $rtn["size"] = strlen($str);
     return $rtn;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:11,代码来源:comment.inc.php

示例3: rtrim

     }
 }
 $timeSheet->set_value("billingNote", rtrim($timeSheet->get_value("billingNote")));
 if ($TPL['message'] || $save_error) {
     // don't save or sql will complain
     $url = $TPL["url_alloc_timeSheet"];
 } else {
     if (!$timeSheet->get_value("personID") && $timeSheetID) {
         //if TS ID is set but person ID is not, it's an existing timesheet this
         // user doesn't have access to (and will overwrite). Don't proceed.
         $url = $TPL["url_alloc_timeSheet"];
     } else {
         if (!$TPL['message'] && $timeSheet->save()) {
             if ($add_timeSheet_to_invoiceID) {
                 $invoice = new invoice();
                 $invoice->set_id($add_timeSheet_to_invoiceID);
                 $invoice->add_timeSheet($timeSheet->get_id());
             }
             if ($_POST["save_and_new"]) {
                 $url = $TPL["url_alloc_timeSheet"];
             } else {
                 if ($_POST["save_and_returnToList"]) {
                     $url = $TPL["url_alloc_timeSheetList"];
                 } else {
                     if ($_POST["save_and_returnToProject"]) {
                         $url = $TPL["url_alloc_project"] . "projectID=" . $timeSheet->get_value("projectID");
                     } else {
                         $msg = page::htmlentities(urlencode($msg));
                         $url = $TPL["url_alloc_timeSheet"] . "timeSheetID=" . $timeSheet->get_id() . "&msg=" . $msg . "&dont_send_email=" . $_POST["dont_send_email"];
                         # Pass the taskID forward if we came from a task
                         $url .= "&taskID=" . $_POST["taskID"];
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:timeSheet.php

示例4: prepare

 function get_amount_allocated($fmt = "%s%mo")
 {
     // Return total amount used and total amount allocated
     if (is_object($this) && $this->get_id()) {
         $db = new db_alloc();
         // Get most recent invoiceItem that this time sheet belongs to.
         $q = prepare("SELECT invoiceID\n                      FROM invoiceItem\n                     WHERE invoiceItem.timeSheetID = %d\n                  ORDER BY invoiceItem.iiDate DESC\n                     LIMIT 1\n                  ", $this->get_id());
         $db->query($q);
         $row = $db->row();
         $invoiceID = $row["invoiceID"];
         if ($invoiceID) {
             $invoice = new invoice();
             $invoice->set_id($invoiceID);
             $invoice->select();
             $maxAmount = page::money($invoice->get_value("currencyTypeID"), $invoice->get_value("maxAmount"), $fmt);
             // Loop through all the other invoice items on that invoice
             $q = prepare("SELECT sum(iiAmount) AS totalUsed FROM invoiceItem WHERE invoiceID = %d", $invoiceID);
             $db->query($q);
             $row2 = $db->row();
             return array(page::money($invoice->get_value("currencyTypeID"), $row2["totalUsed"], $fmt), $maxAmount);
         }
     }
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:23,代码来源:timeSheet.inc.php

示例5: invoice

<?php

/*
 * Copyright (C) 2006-2011 Alex Lance, Clancy Malcolm, Cyber IT Solutions
 * Pty. Ltd.
 * 
 * This file is part of the allocPSA application <info@cyber.com.au>.
 * 
 * allocPSA is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or (at
 * your option) any later version.
 * 
 * allocPSA is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
 * License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with allocPSA. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "../alloc.php";
if (!$current_user->is_employee()) {
    alloc_error("You do not have permission to access invoices", true);
}
$invoiceID = $_POST["invoiceID"] or $invoiceID = $_GET["invoiceID"];
$verbose = $_GET["verbose"];
$invoice = new invoice();
$invoice->set_id($invoiceID);
$invoice->select();
$invoice->generate_invoice_file($verbose);
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:invoicePrint.php

示例6: prepare

if (is_object($invoice) && $invoice->get_id()) {
    $q = prepare("SELECT * FROM invoiceRepeat WHERE invoiceID = %d LIMIT 1", $invoice->get_id());
    $qid1 = $db->query($q);
    if ($db->row($qid1)) {
        $invoiceRepeat->read_db_record($db);
        $invoiceRepeat->set_values("invoiceRepeat_");
        foreach (explode(" ", $TPL["invoiceRepeat_frequency"]) as $id) {
            if ($id) {
                $qid2 = $db->query("SELECT * FROM invoice WHERE invoiceRepeatID = %d AND invoiceRepeatDate = '%s'", $invoiceRepeat->get_id(), $id);
                if ($idrow = $db->row($qid2)) {
                    $links[] = "<a href='" . $TPL["url_alloc_invoice"] . "invoiceID=" . $idrow["invoiceID"] . "'>" . $id . "</a>";
                } else {
                    $links[] = $id;
                }
            }
        }
        $TPL["message_help_no_esc"][] = "This invoice is also a template for the scheduled creation of new invoices on the following dates:\n                              <br>" . implode("&nbsp;&nbsp;", (array) $links) . "\n                              <br>Click the Repeating Invoice link for more information.";
    }
    if ($invoice->get_value("invoiceRepeatID")) {
        $ir = new invoiceRepeat();
        $ir->set_id($invoice->get_value("invoiceRepeatID"));
        $ir->select();
        $i = new invoice();
        $i->set_id($ir->get_value("invoiceID"));
        $i->select();
        $TPL["message_help_no_esc"][] = "This invoice was automatically generated by the\n                                   <a href='" . $TPL["url_alloc_invoice"] . "invoiceID=" . $ir->get_value("invoiceID") . "'>\n                                   repeating invoice " . $i->get_value("invoiceNum") . "</a>";
    }
}
$TPL["invoice"] = $invoice;
$TPL["invoiceRepeat"] = $invoiceRepeat;
include_template("templates/invoiceM.tpl");
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:invoice.php

示例7: max

 function update_invoice_dates($invoiceID)
 {
     $db = new db_alloc();
     $db->query(prepare("SELECT max(iiDate) AS maxDate, min(iiDate) AS minDate\n                          FROM invoiceItem\n                         WHERE invoiceID=%d", $invoiceID));
     $db->next_record();
     $invoice = new invoice();
     $invoice->set_id($invoiceID);
     $invoice->select();
     $invoice->set_value("invoiceDateFrom", $db->f("minDate"));
     $invoice->set_value("invoiceDateTo", $db->f("maxDate"));
     return $invoice->save();
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:12,代码来源:invoice.inc.php

示例8: date

singleton("errors_thrown", true);
singleton("errors_haltdb", false);
#$today = $_REQUEST["today"] or $today = date("Y-m-d");
$q = prepare("SELECT invoiceRepeatDate.invoiceRepeatID\n                   , invoiceRepeatDate.invoiceDate\n                   , invoiceRepeat.invoiceID AS templateInvoiceID\n                   , invoiceRepeat.personID AS currentUser\n                   , invoiceRepeat.message\n                   , invoice.invoiceID\n                FROM invoiceRepeatDate\n           LEFT JOIN invoiceRepeat ON invoiceRepeatDate.invoiceRepeatID = invoiceRepeat.invoiceRepeatID\n           LEFT JOIN invoice ON invoice.invoiceRepeatID = invoiceRepeatDate.invoiceRepeatID\n                 AND invoice.invoiceRepeatDate = invoiceRepeatDate.invoiceDate\n               WHERE invoice.invoiceID IS NULL\n                 AND invoiceRepeatDate.invoiceDate <= '%s'", $today);
$orig_current_user =& singleton("current_user");
$db = new db_alloc();
$id = $db->query($q);
while ($row = $db->row($id)) {
    if ($row["currentUser"]) {
        $current_user = new person();
        $current_user->load_current_user($row["currentUser"]);
        singleton("current_user", $current_user);
    }
    #echo "<br>Checking row: ".print_r($row,1);
    $invoice = new invoice();
    $invoice->set_id($row["templateInvoiceID"]);
    $invoice->select();
    $i = new invoice();
    $i->set_value("invoiceRepeatID", $row["invoiceRepeatID"]);
    $i->set_value("invoiceRepeatDate", $row["invoiceDate"]);
    $i->set_value("invoiceNum", invoice::get_next_invoiceNum());
    $i->set_value("clientID", $invoice->get_value("clientID"));
    $i->set_value("projectID", $invoice->get_value("projectID"));
    $i->set_value("invoiceName", $invoice->get_value("invoiceName"));
    $i->set_value("invoiceStatus", "edit");
    $i->set_value("invoiceDateTo", $row["invoiceDate"]);
    $i->set_value("currencyTypeID", $invoice->get_value("currencyTypeID"));
    $i->set_value("maxAmount", $invoice->get_value("maxAmount"));
    $i->save();
    #echo "<br>Created invoice: ".$i->get_id();
    $q = prepare("SELECT * FROM invoiceItem WHERE invoiceID = %d", $invoice->get_id());
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:checkRepeat.php


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