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


PHP Invoice::getId方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice, array $wallets)
 {
     $this->invoice = $invoice;
     $this->wallets = $wallets;
     $defaults = array('LMI_SIM_MODE' => sfConfig::get('app_webmoney_sim_mode'), 'LMI_PAYMENT_NO' => $invoice->getId(), 'LMI_PAYMENT_DESC_BASE64' => base64_encode($invoice->getDescription()));
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:WebmoneyRequestForm.class.php

示例2: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url'));
     $defaults = array('WMI_MERCHANT_ID' => sfConfig::get('app_w1_merchant'), 'WMI_PAYMENT_AMOUNT' => sprintf('%01.2f', $invoice->getAmount()), 'WMI_CURRENCY_ID' => 980, 'WMI_PAYMENT_NO' => $invoice->getId(), 'WMI_DESCRIPTION' => $invoice->geDescription(), 'WMI_SUCCESS_URL' => url_for('payment_w1_success', array(), true), 'WMI_FAIL_URL' => url_for('payment_w1_fail', array(), true), 'WMI_PTENABLED' => 'CashTerminalUAH');
     $defaults['WMI_SIGNATURE'] = $this->createSign($defaults);
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:W1RequestForm.class.php

示例3: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'Date'));
     $resultUrl = 'https://' . sfContext::getInstance()->getRequest()->getHost() . url_for('payment_liqpay_result');
     $defaults = array('version' => '1.1', 'merchant_id' => sfConfig::get('app_liqpay_merchant'), 'amount' => $invoice->getAmount(), 'currency' => 'UAH', 'order_id' => $invoice->getId(), 'description' => $invoice->getDescription(), 'result_url' => $resultUrl, 'server_url' => $resultUrl);
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:LiqpayRequestForm.class.php

示例4: deleteByInvoice

 /**
  * Delete all items for a invoice
  *
  * @param Invoice $invoice
  * @return null
  */
 function deleteByInvoice($invoice)
 {
     db_begin_work();
     $execute = db_execute('DELETE FROM ' . TABLE_PREFIX . 'invoice_time_records WHERE invoice_id = ?', $invoice->getId());
     if ($execute && !is_error($execute)) {
         $delete = InvoiceItems::delete(array('invoice_id = ?', $invoice->getId()));
         if ($delete && !is_error($delete)) {
             db_commit();
         } else {
             db_rollback();
         }
         // if
         return $delete;
     } else {
         db_rollback();
         return $execute;
     }
     // if
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:25,代码来源:InvoiceItems.class.php

示例5: encodeInvoice

 public function encodeInvoice(Invoice $invoice)
 {
     $data = ['id' => $invoice->getId(), 'number' => $invoice->getNumber(), 'name' => $invoice->getName(), 'created' => $invoice->getCreated(), 'delivered' => $invoice->getDelivered(), 'due' => $invoice->getDue(), 'status' => $invoice->getStatus(), 'variable_symbol' => $invoice->getVariableSymbol(), 'constant_symbol' => $invoice->getConstantSymbol(), 'description' => $invoice->getDescription(), 'items' => $this->encodeItems($invoice->getItems()), 'price' => $invoice->getPrice(), 'price_total' => $invoice->getPriceTotal(), 'currency' => $invoice->getCurrency()];
     if ($invoice->getClient()) {
         $data['client'] = $this->encodeClient($invoice->getClient());
     }
     if ($invoice->getShippingAddress()) {
         $data['shipping_address'] = $this->encodeAddress($invoice->getShippingAddress());
     }
     if ($invoice->getDiscount() && $invoice->getDiscount()->getType() != 'none') {
         $data['discount'] = ['type' => $invoice->getDiscount()->getType(), 'value' => $invoice->getDiscount()->getValue()];
     }
     return json_encode(['invoice' => $data]);
 }
开发者ID:tomaj,项目名称:invoice-client,代码行数:14,代码来源:Serializer.php

示例6: get_due_amount

 /**
  * function to get the invoice due amount
  * @param integer $idinvoice
  * @param double $grand_total
  * @return double
  */
 public function get_due_amount($idinvoice, $grand_total = 0)
 {
     $total_payment_made = 0;
     if ((int) $grand_total == 0) {
         $do_invoice = new Invoice();
         $do_invoice->getId($idinvoice);
         $grand_total = $do_invoice->grand_total;
     }
     $qry = "\n\t\tselect coalesce(sum(p.amount),0) as amount\n\t\tfrom paymentlog p\n\t\tjoin invoice_payments ip on ip.idpaymentlog = p.idpaymentlog\n\t\twhere ip.idinvoice = ? and p.transaction_type = 'charge'\n\t\t";
     $stmt = $this->getDbConnection()->executeQuery($qry, array($idinvoice));
     if ($stmt->rowCount() > 0) {
         $data = $stmt->fetch();
         $total_payment_made = $data['amount'];
     }
     return $grand_total - $total_payment_made;
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:22,代码来源:InvoicePayments.class.php

示例7: notify

 /**
  * Page is displayed when issued invoice is edited
  * 
  * @param void
  * @return null
  */
 function notify()
 {
     $this->wireframe->print_button = false;
     if ($this->active_invoice->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     if (!$this->active_invoice->canEdit($this->logged_user)) {
         $this->httpError(HTTP_ERR_FORBIDDEN);
     }
     // if
     $company = $this->active_invoice->getCompany();
     if (!instance_of($company, 'Company')) {
         $this->httpError(HTTP_ERR_CONFLICT);
     }
     // if
     if (!$company->hasManagers()) {
         flash_error("Sorry, there's nobody in :company_name to whom we can email the invoice", array('company_name' => $company->getName()));
         $this->redirectToUrl($this->active_invoice->getViewUrl());
     }
     // if
     $notify_url = assemble_url('invoice_notify', array('invoice_id' => $this->active_invoice->getId()));
     $users = $company->getUsers();
     $this->smarty->assign(array('users' => $users, 'company' => $company, 'notify_url' => $notify_url));
     $issue_data = $this->request->post('issue');
     if ($this->request->isSubmitted()) {
         if (isset($issue_data['send_emails']) && $issue_data['send_emails']) {
             $issue_to = Users::findById($issue_data['user_id']);
             if (instance_of($issue_to, 'User')) {
                 $filename_name = 'invoice_' . $this->active_invoice->getId() . '.pdf';
                 $filename = WORK_PATH . '/' . $filename_name;
                 require_once INVOICING_MODULE_PATH . '/models/InvoicePdf.class.php';
                 InvoicePDF::save($this->active_invoice, $filename);
                 ApplicationMailer::send($issue_to, 'invoicing/issue', array('issued_by_name' => $this->logged_user->getDisplayName(), 'issued_by_url' => $this->logged_user->getViewUrl(), 'invoice_number' => $this->active_invoice->getNumber(), 'invoice_url' => $this->active_invoice->getCompanyViewUrl(), 'pdf_url' => $this->active_invoice->getCompanyPdfUrl()), null, array(array('path' => $filename)));
                 @unlink($filename);
                 flash_success('Email sent successfully');
             } else {
                 flash_error('User does not exists');
                 $this->redirectToUrl($notify_url);
             }
             // if
         }
         // if
         $this->redirectToUrl($this->active_invoice->getViewUrl());
     }
     // if
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:53,代码来源:InvoicesController.class.php

示例8: CRMFields

<?php

// Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt
/**
* Invoice edit 
* @author Abhik Chakraborty
*/
$do_crmfields = new CRMFields();
$do_block = new Block();
$do_block->get_block_by_module($module_id);
$do_global_settings = new CRMGlobalSettings();
$inv_terms_cond = $do_global_settings->get_inventory_terms_condition();
$tems_condition = $inv_terms_cond["invoice_terms_condition"];
$module_obj = new Invoice();
$module_obj->getId($sqcrm_record_id);
$do_lineitems = new Lineitems();
$do_lineitems->get_line_items($module_id, $sqcrm_record_id);
$do_products = new Products();
$lineitems = array();
if ($do_lineitems->getNumRows() > 0) {
    while ($do_lineitems->next()) {
        $product_available_tax = '';
        if ($do_lineitems->item_type == 'product') {
            $product_available_tax = $do_products->get_products_tax($do_lineitems->item_value);
        }
        $lineitems[] = array("idlineitems" => $do_lineitems->idlineitems, "item_type" => $do_lineitems->item_type, "item_name" => $do_lineitems->item_name, "item_value" => $do_lineitems->item_value, "item_description" => $do_lineitems->item_description, "item_quantity" => $do_lineitems->item_quantity, "item_price" => $do_lineitems->item_price, "discount_type" => $do_lineitems->discount_type, "discount_value" => $do_lineitems->discount_value, "discounted_amount" => $do_lineitems->discounted_amount, "tax_values" => $do_lineitems->tax_values, "product_available_tax" => $product_available_tax, "taxed_amount" => $do_lineitems->taxed_amount, "total_after_discount" => $do_lineitems->total_after_discount, "total_after_tax" => $do_lineitems->total_after_tax, "net_total" => $do_lineitems->net_total);
    }
}
//print_r($lineitems);
if (isset($_GET["return_page"]) && $_GET["return_page"] != '') {
    $return = $_GET["return_page"];
开发者ID:sQcrm,项目名称:sqcrm,代码行数:31,代码来源:edit.php

示例9: sendInvoiceApproveReject

 /**
  * Method to send Send Invoice Apporove/Reject Email to the Invoice Owner
  * @param $iduser -- INT
  * @param $idinvoice -- INT
  * @param $status -- STRING
  * @param $rejected_reason -- STRING
  */
 function sendInvoiceApproveReject($iduser, $idinvoice, $status, $rejected_reason = "")
 {
     $do_inv = new Invoice();
     $do_inv_user = new User();
     $do_contact = new Contact();
     $do_inv->getId($idinvoice);
     $do_inv_user->getId($iduser);
     $do_contact->getId($do_inv->idcontact);
     $total_due = $do_inv->amt_due;
     $inv_num = $do_inv->num;
     $inv_desc = $do_inv->description;
     $inv_address = nl2br($this->Only1brFirstLineBlack($do_inv->invoice_address));
     $contact_name = $do_contact->firstname . ' ' . $do_contact->lastname;
     if ($do_contact->email_address != '') {
         $contact_email = $do_contact->email_address;
     } else {
         $ContactEmail = $do_contact->getChildContactEmail();
         if ($ContactEmail->getNumRows()) {
             $contact_email = $ContactEmail->email_address;
         }
     }
     if ($contact_email == '') {
         $contact_email = 'info@sqlfusion.com';
     }
     if ($status == "Accept") {
         $email_template = new EmailTemplate("ofuz_inv_accept_confirmation");
     }
     $do_user_rel = new UserRelations();
     $invoice_url = $GLOBALS['cfg_ofuz_site_https_base'] . 'inv/' . $do_user_rel->encrypt($idinvoice) . '/' . $do_user_rel->encrypt($do_inv->idcontact);
     //$email_template->setSubject(_("Invoice #").$inv_num.' '.$inv_desc." "._("has been accepted by")." ".$contact_name);
     $email_template->setSenderName($contact_name);
     $email_template->setSenderEmail($contact_email);
     $signature = $inv_address;
     $email_data = array('name' => $contact_name, 'contact' => $contact_name, 'description' => $inv_desc, 'signature' => $signature, 'amount' => $total_due, 'num' => $inv_num, 'invoice_url' => $invoice_url, 'address' => $inv_address);
     $emailer = new Radria_Emailer();
     $emailer->setEmailTemplate($email_template);
     $emailer->mergeArray($email_data);
     $emailer->addTo($do_inv_user->email);
     $emailer->send();
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:47,代码来源:.Invoice.class.php

示例10: remind

 /**
  * Send reminder
  * 
  * @param Invoice $invoice
  * @param Invoice_Envelope $envelope
  * @return ApiConnector 
  */
 public function remind(Invoice $invoice, Invoice_Envelope $envelope)
 {
     $envelope->setData(array('invoiceId' => $invoice->getId()));
     $response = $this->request($this->buildUrl($invoice, null, '/send_reminder'), 'PUT', $this->mapper->mapToStorage($envelope));
     return $this->mapper->mapFromStorage($response);
 }
开发者ID:ruudk,项目名称:moneybird_php_api,代码行数:13,代码来源:ApiConnector.php

示例11: Invoice

 function get_inv_amt_due()
 {
     $do_api_invoice = new Invoice();
     $do_api_invoice->getId($this->idinvoice);
     if ($do_api_invoice->isInvoiceOwner($this->idinvoice, $this->iduser)) {
         $due_amt = $do_api_invoice->getDueAmount($this->idinvoice);
         $this->setValues(array("due_amount" => $due_amt, "idinvoice" => $this->idinvoice));
         return true;
     } else {
         $this->setMessage("711", "Invoice does not belong to you" . $this->idinvoice . "_" . $this->iduser, 'fail');
         return false;
     }
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:13,代码来源:OfuzApiMethods.class.php

示例12: generate_inventory_pdf

    /**
     * function to generate inventory (quote,invoice,sales order,purchase order) PDF
     * @param integer $idquotes
     * @param boolean $save
     * @see http://www.mpdf1.com/mpdf/index.php
     */
    public function generate_inventory_pdf($idrecord, $idmodule, $save = false)
    {
        include_once BASE_PATH . THIRD_PARTY_LIB_PATH . "/mpdf/mpdf.php";
        //echo BASE_PATH.THIRD_PARTY_LIB_PATH ;exit;
        $pdf = new \mPDF();
        $crm_global_settings = new \CRMGlobalSettings();
        if ($idmodule == 13) {
            $obj = new \Quotes();
            $obj->getId($idrecord);
            $prefix = $crm_global_settings->get_setting_data_by_name('quote_num_prefix');
            $inventory_type = _('QUOTE');
            $inv = 'q';
            $inv_number_fld = 'quote_number';
            $inv_date_fld = 'valid_till';
            $file_name = 'Quote_' . $prefix . $obj->quote_number . '.pdf';
            $inventory_number = _('Quote #');
        } elseif ($idmodule == 14) {
            $obj = new \SalesOrder();
            $obj->getId($idrecord);
            $prefix = $crm_global_settings->get_setting_data_by_name('salesorder_num_prefix');
            $inventory_type = _('SALES ORDER');
            $inv = 'so';
            $inv_number_fld = 'sales_order_number';
            $inv_date_fld = 'due_date';
            $file_name = 'SalesOrder_' . $prefix . $obj->sales_order_number . '.pdf';
            $inventory_number = _('Sales Order #');
        } elseif ($idmodule == 15) {
            $obj = new \Invoice();
            $obj->getId($idrecord);
            $prefix = $crm_global_settings->get_setting_data_by_name('invoice_num_prefix');
            $inventory_type = _('INVOICE');
            $inv = 'inv';
            $inv_number_fld = 'invoice_number';
            $inv_date_fld = 'due_date';
            $file_name = 'Invoice_' . $prefix . $obj->invoice_number . '.pdf';
            $inventory_number = _('Invoice #');
        } elseif ($idmodule == 16) {
            $obj = new \PurchaseOrder();
            $obj->getId($idrecord);
            $prefix = $crm_global_settings->get_setting_data_by_name('purchaseorder_num_prefix');
            $inventory_type = _('PURCHASE ORDER');
            $inv = 'po';
            $inv_number_fld = 'po_number';
            $inv_date_fld = 'due_date';
            $file_name = 'PurchaseOrder_' . $prefix . $obj->po_number . '.pdf';
            $inventory_number = _('Purchase Order #');
        }
        $inventory_logo = $crm_global_settings->get_setting_data_by_name('inventory_logo');
        $company_address = $crm_global_settings->get_setting_data_by_name('company_address');
        $do_lineitems = new \Lineitems();
        $do_lineitems->get_line_items($idmodule, $idrecord);
        $lineitems = array();
        if ($do_lineitems->getNumRows() > 0) {
            while ($do_lineitems->next()) {
                $lineitems[] = array("idlineitems" => $do_lineitems->idlineitems, "item_type" => $do_lineitems->item_type, "item_name" => $do_lineitems->item_name, "item_value" => $do_lineitems->item_value, "item_description" => $do_lineitems->item_description, "item_quantity" => $do_lineitems->item_quantity, "item_price" => $do_lineitems->item_price, "discount_type" => $do_lineitems->discount_type, "discount_value" => $do_lineitems->discount_value, "discounted_amount" => $do_lineitems->discounted_amount, "tax_values" => $do_lineitems->tax_values, "taxed_amount" => $do_lineitems->taxed_amount, "total_after_discount" => $do_lineitems->total_after_discount, "total_after_tax" => $do_lineitems->total_after_tax, "net_total" => $do_lineitems->net_total);
            }
        }
        $html = '';
        if (is_array($lineitems) && count($lineitems) > 0) {
            //--load the stylesheet
            $stylesheet = file_get_contents(BASE_PATH . '/themes/custom-css/inventory_export.css');
            $pdf->WriteHTML($stylesheet, 1);
            $html .= '
			<div>
				<div class="inv_wrapper">
					<h1 class="inv_heading">' . $inventory_type . '</h1>
					<div class="inv_address_wrapper">
						<p class="inv_address_section">
							<span class="inv_address_to_from">FROM:</span><br>
							' . nl2br($company_address) . '
						</p>
					</div>
					<div class="inv_company_address_wrapper">
						<img class="inv_company_address_logo" src="' . $GLOBALS['FILE_UPLOAD_DISPLAY_PATH'] . '/' . $inventory_logo . '">
					</div>
				</div>
				<div style="clear:both;"></div>
				<div class="inv_wrapper">
				<div class="inv_address_wrapper">
					<p class="inv_address_section">
						<span class="inv_address_to_from">To:</span><br>' . $this->generate_to_address($obj, $inv) . '
					</p>
				</div>
				<div class="inv_brief_section">
					<table class="inv_brief_section_table">
						<tr>
							<th class="inv_brief_section_table_heading">
								<span>' . $inventory_number . '</span>
							</th>
							<td class="inv_brief_section_table_content">
								<span>' . $prefix . $obj->{$inv_number_fld} . '</span>
							</td>
						</tr>
						<tr>
//.........这里部分代码省略.........
开发者ID:sQcrm,项目名称:sqcrm,代码行数:101,代码来源:ExportInventoryData.class.php

示例13: Invoice

<?php

/* * * * *
* This is script to update the user after the payment made for trail user. 
* This is curl post for this script
* @param Idinvoice. 
* * * * * */
ob_start();
include_once "config.php";
//amt_paid=$amt_paid&c=$check_sum&pay_type=$pay_type&pay_status=$payment_status
$invoice_id = $_POST['id'];
$payment_status = $_POST['pay_status'];
$invoice_id = '6';
$invoice = new Invoice();
$invoice->getId($invoice_id);
$iduser = $invoice->iduser;
$date = date('Y-m-d');
$do_user = new User();
$do_user->getId($iduser);
$do_user->plan = 'Paid';
$do_user->regdate = $date;
$do_user->update();
if (!is_object($_SESSION['do_User'])) {
    if ($_SESSION['upgrade'] === true) {
        unset($_SESSION['upgrade']);
    }
}
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:27,代码来源:trail_plan_upgrade.php

示例14: deleteByInvoice

 /**
  * Drop payments by invoice
  *
  * @param Invoice $invoice
  * @return boolean
  */
 function deleteByInvoice($invoice)
 {
     return InvoicePayments::delete(array('invoice_id = ?', $invoice->getId()));
 }
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:10,代码来源:InvoicePayments.class.php

示例15: elseif

 } elseif ($_SESSION['in_page_message_inv_mul_pay_del'] == 'Yes') {
     if (isset($_SESSION["in_page_message_inv_idpaymentlog"]) && $_SESSION["in_page_message_inv_idpaymentlog"] != '') {
         $do_paymentlog = new Paymentlog();
         $do_paymentlog->getMulInvoicesForPayment((int) $_SESSION["in_page_message_inv_idpaymentlog"]);
         $do_invoice_del = new Invoice();
         $do_contact = new Contact();
         echo '<div style="width:700px;margin-left:0px;margin-top:5px;height:30px;text-align:left;position: relative; color:#FFA500;font-size:14px;">';
         echo '<div style="width:100px;float:left;"><b>' . _('Number') . '</b></div>';
         echo '<div style="width:250px;float:left;"><b>' . _('Contact') . '</b></div>';
         echo '<div style="width:100px;float:left;"><b>' . _('Due Date') . '</b></div>';
         echo '<div style="width:100px;float:left;"><b>' . _('Total') . '</b></div>';
         echo '<div style="width:100px;float:left;"><b>' . _('Due') . '</b></div>';
         echo '</div>';
         echo '<div style="width:700px;margin-left:0px;margin-top:5px;height:30px;text-align:left;position: relative;font-size:12px;">';
         while ($do_paymentlog->next()) {
             $do_invoice_del->getId($do_paymentlog->idinvoice);
             echo '<div style="width:100px;float:left;">' . $do_invoice_del->num . ' </div> ';
             $contact = $do_contact->getContact_Company_ForInvoice($do_invoice_del->idcontact, $do_invoice_del->idcompany);
             if ($contact == '') {
                 $contact = '--';
             }
             echo ' <div style="width:250px;float:left;">' . $contact . '</div>';
             echo '<div style="width:100px;float:left;">' . $do_invoice_del->getInvFormattedDate($do_invoice_del->due_date) . '</div>';
             echo '<div style="width:100px;float:left;">' . $do_invoice_del->viewAmount($do_invoice_del->net_total) . '</div>';
             echo '<div style="width:100px;float:left;">' . $do_invoice_del->viewAmount($do_invoice_del->amt_due) . '</div>';
         }
         echo '</div>';
         echo '<br /><br />';
         $e_del_payment = new Event("PaymentLog->eventDeletePaymentLog");
         $e_del_payment->addParam("id", (int) $_SESSION["in_page_message_inv_idpaymentlog"]);
         $e_del_payment->addParam("del_mul_confirm", "Yes");
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:invoice_alert.php


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