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


PHP Invoice::getChildInvoiceLine方法代码示例

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


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

示例1: XMLExport


//.........这里部分代码省略.........
             }
             $do_task->free();
         }
         if (!$this->appendToFile($xml)) {
             return false;
         }
         $xml = ' ';
         $do_invoice = new Invoice();
         $do_invoice->getContactInvoiceDetailsWithUser($do_contact->getData("idcontact"), $do_user->iduser);
         while ($do_invoice->next()) {
             $xml .= "  <invoice>\n";
             $xml .= "   <idinvoice><![CDATA[" . $do_invoice->getData("idinvoice") . "]]></idinvoice>\n";
             $xml .= "   <num><![CDATA[" . $do_invoice->getData("num") . "]]></num>\n";
             $xml .= "   <iduser><![CDATA[" . $do_invoice->getData("iduser") . "]]></iduser>\n";
             $xml .= "   <description><![CDATA[" . $do_invoice->getData("description") . "]]></description>\n";
             $xml .= "   <amount><![CDATA[" . $do_invoice->getData("amount") . "]]></amount>\n";
             $xml .= "   <datepaid><![CDATA[" . $do_invoice->getData("datepaid") . "]]></datepaid>\n";
             $xml .= "   <datecreated><![CDATA[" . $do_invoice->getData("datecreated") . "]]></datecreated>\n";
             $xml .= "   <status><![CDATA[" . $do_invoice->getData("status") . "]]></status>\n";
             $xml .= "   <discount><![CDATA[" . $do_invoice->getData("discount") . "]]></discount>\n";
             $xml .= "   <idcontact><![CDATA[" . $do_invoice->getData("idcontact") . "]]></idcontact>\n";
             $xml .= "   <due_date><![CDATA[" . $do_invoice->getData("due_date") . "]]></due_date>\n";
             $xml .= "   <invoice_address><![CDATA[" . $do_invoice->getData("invoice_address") . "]]></invoice_address>\n";
             $xml .= "   <invoice_term><![CDATA[" . $do_invoice->getData("invoice_term") . "]]></invoice_term>\n";
             $xml .= "   <invoice_note><![CDATA[" . $do_invoice->getData("invoice_note") . "]]></invoice_note>\n";
             $xml .= "   <sub_total><![CDATA[" . $do_invoice->getData("sub_total") . "]]></sub_total>\n";
             $xml .= "   <net_total><![CDATA[" . $do_invoice->getData("net_total") . "]]></net_total>\n";
             $xml .= "   <amt_due><![CDATA[" . $do_invoice->getData("amt_due") . "]]></amt_due>\n";
             $xml .= "   <idcompany><![CDATA[" . $do_invoice->getData("idcompany") . "]]></idcompany>\n";
             $xml .= "   <tax><![CDATA[" . $do_invoice->getData("tax") . "]]></tax>\n";
             $xml .= "   <set_delete><![CDATA[" . $do_invoice->getData("set_delete") . "]]></set_delete>\n";
             $xml .= "   <total_discounted_amt><![CDATA[" . $do_invoice->getData("total_discounted_amt") . "]]></total_discounted_amt>\n";
             $xml .= "   <total_taxed_amount><![CDATA[" . $do_invoice->getData("total_taxed_amount") . "]]></total_taxed_amount>\n";
             $invoice_line = $do_invoice->getChildInvoiceLine();
             while ($invoice_line->next()) {
                 $xml .= "   <invoiceline>\n";
                 $xml .= "    <idinvoiceline><![CDATA[" . $invoice_line->idinvoiceline . "]]></idinvoiceline>\n";
                 $xml .= "    <idinvoice><![CDATA[" . $invoice_line->idinvoice . "]]></idinvoice>\n";
                 $xml .= "    <description><![CDATA[" . $invoice_line->description . "]]></description>\n";
                 $xml .= "    <price><![CDATA[" . $invoice_line->price . "]]></price>\n";
                 $xml .= "    <qty><![CDATA[" . $invoice_line->qty . "]]></qty>\n";
                 $xml .= "    <total><![CDATA[" . $invoice_line->total . "]]></total>\n";
                 $xml .= "    <item><![CDATA[" . $invoice_line->item . "]]></item>\n";
                 $xml .= "    <line_tax><![CDATA[" . $invoice_line->line_tax . "]]></line_tax>\n";
                 $xml .= "    <discounted_amount><![CDATA[" . $invoice_line->discounted_amount . "]]></discounted_amount>\n";
                 $xml .= "    <taxed_amount><![CDATA[" . $invoice_line->taxed_amount . "]]></taxed_amount>\n";
                 $xml .= "   </invoiceline>\n";
             }
             $invoice_line->free();
             if (!$this->appendToFile($xml)) {
                 return false;
             }
             $xml = ' ';
             $do_recurrent_invoice = new RecurrentInvoice();
             $do_recurrent_invoice->getRecurrentInvoiceDetail($do_invoice->getData("idinvoice"));
             while ($do_recurrent_invoice->next()) {
                 $xml .= "   <recurrentinvoice>\n";
                 $xml .= "    <idrecurrentinvoice><![CDATA[" . $do_recurrent_invoice->getData("idrecurrentinvoice") . "]]></idrecurrentinvoice>\n";
                 $xml .= "    <iduser><![CDATA[" . $do_recurrent_invoice->getData("iduser") . "]]></iduser>\n";
                 $xml .= "    <idinvoice><![CDATA[" . $do_recurrent_invoice->getData("idinvoice") . "]]></idinvoice>\n";
                 $xml .= "    <nextdate><![CDATA[" . $do_recurrent_invoice->getData("nextdate") . "]]></nextdate>\n";
                 $xml .= "    <recurrence><![CDATA[" . $do_recurrent_invoice->getData("recurrence") . "]]></recurrence>\n";
                 $xml .= "    <recurrencetype><![CDATA[" . $do_recurrent_invoice->getData("recurrencetype") . "]]></recurrencetype>\n";
                 $xml .= "   </recurrentinvoice>\n";
             }
             $do_recurrent_invoice->free();
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:67,代码来源:OfuzExportAccount.class.php

示例2: deleteInvoiceRelated

 function deleteInvoiceRelated($iduser = "")
 {
     if ($iduser == "") {
         $iduser = $_SESSION['do_User']->iduser;
     }
     $q = new sqlQuery($this->getDbCon());
     $q->query("select idinvoice from invoice where iduser = " . $iduser);
     if ($q->getNumRows()) {
         $do_del_inv = new Invoice();
         while ($q->fetch()) {
             $do_del_inv->getId($q->getData("idinvoice"));
             //Del Invoice Lines
             $inv_lines = $do_del_inv->getChildInvoiceLine();
             while ($inv_lines->next()) {
                 $inv_lines->delete();
             }
             //Del Recurrence Invoice
             $rec_inv = $do_del_inv->getChildRecurrentInvoice();
             $del_rec_inv_cc = new sqlQuery($this->getDbCon());
             while ($rec_inv->next()) {
                 // Del Recurrent Invoice CC
                 $del_rec_inv_cc->query("delete from recurrent_invoice_cc \n                                           where idrecurrentinvoice = " . $rec_inv->idrecurrentinvoice);
                 $rec_inv->delete();
             }
             //Delete Payment Log
             $pay_log = $do_del_inv->getChildPaymentLog();
             while ($pay_log->next()) {
                 $pay_log->delete();
             }
             // Delete Invoice
             $do_del_inv->delete();
         }
     }
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:34,代码来源:OfuzCancelAccount.class.php

示例3: exportUserAccountandDelete


//.........这里部分代码省略.........
                     $do_prj_discuss->free();
                     $xml .= "   </project_task>\n";
                     $xml .= "  </contact_task_with_project>\n";
                     $do_project->free();
                 }
                 $do_task->free();
             }
             $do_invoice = new Invoice();
             $do_invoice->getContactInvoiceDetailsWithUser($do_contact->getData("idcontact"), $do_user->iduser);
             while ($do_invoice->next()) {
                 $xml .= "  <invoice>\n";
                 $xml .= "   <idinvoice><![CDATA[" . $do_invoice->getData("idinvoice") . "]]></idinvoice>\n";
                 $xml .= "   <num><![CDATA[" . $do_invoice->getData("num") . "]]></num>\n";
                 $xml .= "   <iduser><![CDATA[" . $do_invoice->getData("iduser") . "]]></iduser>\n";
                 $xml .= "   <description><![CDATA[" . $do_invoice->getData("description") . "]]></description>\n";
                 $xml .= "   <amount><![CDATA[" . $do_invoice->getData("amount") . "]]></amount>\n";
                 $xml .= "   <datepaid><![CDATA[" . $do_invoice->getData("datepaid") . "]]></datepaid>\n";
                 $xml .= "   <datecreated><![CDATA[" . $do_invoice->getData("datecreated") . "]]></datecreated>\n";
                 $xml .= "   <status><![CDATA[" . $do_invoice->getData("status") . "]]></status>\n";
                 $xml .= "   <discount><![CDATA[" . $do_invoice->getData("discount") . "]]></discount>\n";
                 $xml .= "   <idcontact><![CDATA[" . $do_invoice->getData("idcontact") . "]]></idcontact>\n";
                 $xml .= "   <due_date><![CDATA[" . $do_invoice->getData("due_date") . "]]></due_date>\n";
                 $xml .= "   <invoice_address><![CDATA[" . $do_invoice->getData("invoice_address") . "]]></invoice_address>\n";
                 $xml .= "   <invoice_term><![CDATA[" . $do_invoice->getData("invoice_term") . "]]></invoice_term>\n";
                 $xml .= "   <invoice_note><![CDATA[" . $do_invoice->getData("invoice_note") . "]]></invoice_note>\n";
                 $xml .= "   <sub_total><![CDATA[" . $do_invoice->getData("sub_total") . "]]></sub_total>\n";
                 $xml .= "   <net_total><![CDATA[" . $do_invoice->getData("net_total") . "]]></net_total>\n";
                 $xml .= "   <amt_due><![CDATA[" . $do_invoice->getData("amt_due") . "]]></amt_due>\n";
                 $xml .= "   <idcompany><![CDATA[" . $do_invoice->getData("idcompany") . "]]></idcompany>\n";
                 $xml .= "   <tax><![CDATA[" . $do_invoice->getData("tax") . "]]></tax>\n";
                 $xml .= "   <set_delete><![CDATA[" . $do_invoice->getData("set_delete") . "]]></set_delete>\n";
                 $xml .= "   <total_discounted_amt><![CDATA[" . $do_invoice->getData("total_discounted_amt") . "]]></total_discounted_amt>\n";
                 $xml .= "   <total_taxed_amount><![CDATA[" . $do_invoice->getData("total_taxed_amount") . "]]></total_taxed_amount>\n";
                 $invoice_line = $do_invoice->getChildInvoiceLine();
                 while ($invoice_line->next()) {
                     $xml .= "   <invoiceline>\n";
                     $xml .= "    <idinvoiceline><![CDATA[" . $invoice_line->idinvoiceline . "]]></idinvoiceline>\n";
                     $xml .= "    <idinvoice><![CDATA[" . $invoice_line->idinvoice . "]]></idinvoice>\n";
                     $xml .= "    <description><![CDATA[" . $invoice_line->description . "]]></description>\n";
                     $xml .= "    <price><![CDATA[" . $invoice_line->price . "]]></price>\n";
                     $xml .= "    <qty><![CDATA[" . $invoice_line->qty . "]]></qty>\n";
                     $xml .= "    <total><![CDATA[" . $invoice_line->total . "]]></total>\n";
                     $xml .= "    <item><![CDATA[" . $invoice_line->item . "]]></item>\n";
                     $xml .= "    <line_tax><![CDATA[" . $invoice_line->line_tax . "]]></line_tax>\n";
                     $xml .= "    <discounted_amount><![CDATA[" . $invoice_line->discounted_amount . "]]></discounted_amount>\n";
                     $xml .= "    <taxed_amount><![CDATA[" . $invoice_line->taxed_amount . "]]></taxed_amount>\n";
                     $xml .= "   </invoiceline>\n";
                 }
                 $invoice_line->free();
                 $do_recurrent_invoice = new RecurrentInvoice();
                 $do_recurrent_invoice->getRecurrentInvoiceDetail($do_invoice->getData("idinvoice"));
                 while ($do_recurrent_invoice->next()) {
                     $xml .= "   <recurrentinvoice>\n";
                     $xml .= "    <idrecurrentinvoice><![CDATA[" . $do_recurrent_invoice->getData("idrecurrentinvoice") . "]]></idrecurrentinvoice>\n";
                     $xml .= "    <iduser><![CDATA[" . $do_recurrent_invoice->getData("iduser") . "]]></iduser>\n";
                     $xml .= "    <idinvoice><![CDATA[" . $do_recurrent_invoice->getData("idinvoice") . "]]></idinvoice>\n";
                     $xml .= "    <nextdate><![CDATA[" . $do_recurrent_invoice->getData("nextdate") . "]]></nextdate>\n";
                     $xml .= "    <recurrence><![CDATA[" . $do_recurrent_invoice->getData("recurrence") . "]]></recurrence>\n";
                     $xml .= "    <recurrencetype><![CDATA[" . $do_recurrent_invoice->getData("recurrencetype") . "]]></recurrencetype>\n";
                     $xml .= "   </recurrentinvoice>\n";
                 }
                 $do_recurrent_invoice->free();
                 $do_paymentlog = new PaymentLog();
                 $do_paymentlog->getPaymentLogDetails($do_invoice->getData("idinvoice"));
                 while ($do_paymentlog->next()) {
                     $xml .= "   <paymentlog>\n";
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:67,代码来源:OfuzExportXML.class.php

示例4: Invoice

 function get_contact_subscription()
 {
     $do_invoice = new Invoice();
     if ($this->idcontact) {
         $do_invoice->query("SELECT * FROM " . $do_invoice->getTable() . " WHERE iduser=" . $this->iduser . " AND idcontact=" . $this->idcontact . " ORDER BY datecreated DESC LIMIT 1");
     } elseif ($this->idcompany) {
         $do_invoice->query("SELECT * FROM " . $do_invoice->getTable() . " WHERE iduser=" . $this->iduser . " AND idcompany=" . $this->idcompany . " ORDER BY datecreated DESC LIMIT 1");
     } else {
         $this->setMessage("404", "A contact or a Company id is required", 'fail');
         return false;
     }
     //$do_invoice->fetch();
     if ($do_invoice->getNumRows() == 1) {
         $do_rec_invoice = $do_invoice->getChildRecurrentInvoice();
         if ($do_rec_invoice->hasData()) {
             $do_invoice_line = $do_invoice->getChildInvoiceLine();
             $i = 0;
             while ($do_invoice_line->next()) {
                 $invoice_line[$i] = array('item' => $do_invoice_line->item, 'description' => $do_invoice_line->description, 'price' => $do_invoice_line->price, 'qty' => $do_invoice_line->qty);
                 $i++;
             }
             $this->setValues(array('next_charge_date' => $do_rec_invoice->nextdate, 'recurrence' => $do_rec_invoice->recurrence, 'recurrence_frequency' => $do_rec_invoice->recurrencetype, 'idinvoice' => $do_rec_invoice->idinvoice, 'number' => $do_invoice->num, 'description' => $do_invoice->description, 'amount' => $do_invoice->amount, 'date_created' => $do_invoice->datecreated, 'date_due' => $do_invoice->due_date, 'amount_due' => $do_invoice->amt_due, 'line_item' => $invoice_line));
             return true;
         } else {
             $this->setMessage("734", "Invoice does not have a recurrence or is not a subscription", 'fail');
             return false;
         }
     } else {
         $this->setMessage("800", "No Invoice found", 'fail');
         return false;
     }
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:32,代码来源:OfuzApiMethods.class.php


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