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


PHP Invoice::free方法代码示例

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


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

示例1: Invoice

        </div>

        <div id="inv_msgs">
		    <?php 
if ($_SESSION['inv_past_due_hide'] == 'Yes') {
    $do_invoice_check = new Invoice();
    $msg = new Message();
    if ($do_invoice_check->hasInvoices()) {
        if ($msg->getMessageFromContext("invoice list")) {
            echo $msg->displayMessage();
        }
    } else {
        $msg->getMessage("invoice first time");
        echo $msg->displayMessage();
    }
    $do_invoice_check->free();
}
?>
        </div>
        <div id="show_past_due"></div>
              <?php 
if ($_SESSION['inv_past_due_hide'] != 'Yes' && $_SESSION['do_invoice_list']->from_invoice_page === true) {
    //echo '<br /><br />';
    echo $_SESSION['do_invoice_list']->getInvoicesPastDue();
}
if ($do_payment_inv->getExtraAmoutNotPaid() !== false && $_SESSION['extra_amt'] == '') {
    echo '<br />';
    echo '<div style="margin-left:0px;">';
    echo '<div class="messages_unauthorized marginright">';
    echo _('You have payments which are not yet applied to invoices.') . ' <a href="#" onclick="showExtraAmt();return false;">' . _('Click here.') . '</a>';
    echo '<div id="extra_amt" style="display:none;">';
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:invoices.php

示例2: XMLExport


//.........这里部分代码省略.........
             $xml .= "   <priority><![CDATA[" . $contact_note->priority . "]]></priority>\n";
             $xml .= "   <send_email><![CDATA[" . $contact_note->send_email . "]]></send_email>\n";
             $xml .= "   <hours_work><![CDATA[" . $contact_note->hours_work . "]]></hours_work>\n";
             $xml .= "   <note_visibility><![CDATA[" . $contact_note->note_visibility . "]]></note_visibility>\n";
             $xml .= "  </contact_note>\n";
         }
         if (!$this->appendToFile($xml)) {
             return false;
         }
         $xml = ' ';
         if ($i == '1') {
             $do_task = new Task();
             $do_task->getTaskWithoutProject();
             while ($do_task->next()) {
                 $xml .= "  <contact_task>\n";
                 $xml .= "   <idtask><![CDATA[" . $do_task->getData("idtask") . "]]></idtask>\n";
                 $xml .= "   <task_description><![CDATA[" . $do_task->getData("task_description") . "]]></task_description>\n";
                 $xml .= "   <due_date><![CDATA[" . $do_task->getData("due_date") . "]]></due_date>\n";
                 $xml .= "   <category><![CDATA[" . $do_task->getData("category") . "]]></category>\n";
                 $xml .= "   <iduser><![CDATA[" . $do_task->getData("iduser") . "]]></iduser>\n";
                 $xml .= "   <due_date_dateformat><![CDATA[" . $do_task->getData("due_date_dateformat") . "]]></due_date_dateformat>\n";
                 $xml .= "   <status><![CDATA[" . $do_task->getData("status") . "]]></status>\n";
                 $xml .= "   <date_completed><![CDATA[" . $do_task->getData("date_completed") . "]]></date_completed>\n";
                 $xml .= "   <idcontact><![CDATA[" . $do_task->getData("idcontact") . "]]></idcontact>\n";
                 $xml .= "   <from_note><![CDATA[" . $do_task->getData("from_note") . "]]></from_note>\n";
                 $xml .= "   <is_sp_date_set><![CDATA[" . $do_task->getData("is_sp_date_set") . "]]></is_sp_date_set>\n";
                 $xml .= "   <task_category><![CDATA[" . $do_task->getData("task_category") . "]]></task_category>\n";
                 $xml .= "  </contact_task>\n";
                 if (!$this->appendToFile($xml)) {
                     return false;
                 }
                 $xml = ' ';
             }
             $do_task->free();
         }
         $do_task = new Task();
         $do_task->getContactTaskWithoutProject($do_contact->getData("idcontact"));
         while ($do_task->next()) {
             $xml .= "  <contact_task>\n";
             $xml .= "   <idtask><![CDATA[" . $do_task->getData("idtask") . "]]></idtask>\n";
             $xml .= "   <task_description><![CDATA[" . $do_task->getData("task_description") . "]]></task_description>\n";
             $xml .= "   <due_date><![CDATA[" . $do_task->getData("due_date") . "]]></due_date>\n";
             $xml .= "   <category><![CDATA[" . $do_task->getData("category") . "]]></category>\n";
             $xml .= "   <iduser><![CDATA[" . $do_task->getData("iduser") . "]]></iduser>\n";
             $xml .= "   <due_date_dateformat><![CDATA[" . $do_task->getData("due_date_dateformat") . "]]></due_date_dateformat>\n";
             $xml .= "   <status><![CDATA[" . $do_task->getData("status") . "]]></status>\n";
             $xml .= "   <date_completed><![CDATA[" . $do_task->getData("date_completed") . "]]></date_completed>\n";
             $xml .= "   <idcontact><![CDATA[" . $do_task->getData("idcontact") . "]]></idcontact>\n";
             $xml .= "   <from_note><![CDATA[" . $do_task->getData("from_note") . "]]></from_note>\n";
             $xml .= "   <is_sp_date_set><![CDATA[" . $do_task->getData("is_sp_date_set") . "]]></is_sp_date_set>\n";
             $xml .= "   <task_category><![CDATA[" . $do_task->getData("task_category") . "]]></task_category>\n";
             $xml .= "  </contact_task>\n";
         }
         $do_task->free();
         if (!$this->appendToFile($xml)) {
             return false;
         }
         $xml = ' ';
         /**
          * For all the contact tasks which are associated with Project.
          */
         $do_task = new Task();
         //$do_task->getContactTasksAssociatedWithProject($do_contact->getData("idcontact"));
         $do_task->getContactTasksAssociatedWithProject($do_contact->getData("idcontact"));
         while ($do_task->next()) {
             $do_project = new Project();
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:67,代码来源:OfuzExportAccount.class.php

示例3: exportUserAccountandDelete


//.........这里部分代码省略.........
                 $xml .= "  <contact_note>\n";
                 $xml .= "   <idcontact_note><![CDATA[" . $contact_note->idcontact_note . "]]></idcontact_note>\n";
                 $xml .= "   <idcontact><![CDATA[" . $contact_note->idcontact . "]]></idcontact>\n";
                 $xml .= "   <note><![CDATA[" . $contact_note->note . "]]></note>\n";
                 $xml .= "   <date_added><![CDATA[" . $contact_note->date_added . "]]></date_added>\n";
                 $xml .= "   <document><![CDATA[" . $contact_note->document . "]]></document>\n";
                 $xml .= "   <idcompany><![CDATA[" . $contact_note->idcompany . "]]></idcompany>\n";
                 $xml .= "   <iduser><![CDATA[" . $contact_note->iduser . "]]></iduser>\n";
                 $xml .= "   <priority><![CDATA[" . $contact_note->priority . "]]></priority>\n";
                 $xml .= "   <send_email><![CDATA[" . $contact_note->send_email . "]]></send_email>\n";
                 $xml .= "   <hours_work><![CDATA[" . $contact_note->hours_work . "]]></hours_work>\n";
                 $xml .= "   <note_visibility><![CDATA[" . $contact_note->note_visibility . "]]></note_visibility>\n";
                 $xml .= "  </contact_note>\n";
             }
             if ($i == '1') {
                 $do_task = new Task();
                 $do_task->getContactTaskWithoutProjectAndWithUser($iduser);
                 while ($do_task->next()) {
                     $xml .= "  <contact_task>\n";
                     $xml .= "   <idtask><![CDATA[" . $do_task->getData("idtask") . "]]></idtask>\n";
                     $xml .= "   <task_description><![CDATA[" . $do_task->getData("task_description") . "]]></task_description>\n";
                     $xml .= "   <due_date><![CDATA[" . $do_task->getData("due_date") . "]]></due_date>\n";
                     $xml .= "   <category><![CDATA[" . $do_task->getData("category") . "]]></category>\n";
                     $xml .= "   <iduser><![CDATA[" . $do_task->getData("iduser") . "]]></iduser>\n";
                     $xml .= "   <due_date_dateformat><![CDATA[" . $do_task->getData("due_date_dateformat") . "]]></due_date_dateformat>\n";
                     $xml .= "   <status><![CDATA[" . $do_task->getData("status") . "]]></status>\n";
                     $xml .= "   <date_completed><![CDATA[" . $do_task->getData("date_completed") . "]]></date_completed>\n";
                     $xml .= "   <idcontact><![CDATA[" . $do_task->getData("idcontact") . "]]></idcontact>\n";
                     $xml .= "   <from_note><![CDATA[" . $do_task->getData("from_note") . "]]></from_note>\n";
                     $xml .= "   <is_sp_date_set><![CDATA[" . $do_task->getData("is_sp_date_set") . "]]></is_sp_date_set>\n";
                     $xml .= "   <task_category><![CDATA[" . $do_task->getData("task_category") . "]]></task_category>\n";
                     $xml .= "  </contact_task>\n";
                 }
                 $do_task->free();
             }
             $do_task = new Task();
             $do_task->getContactTaskWithoutProjectAndWithContact($do_contact->getData("idcontact"));
             while ($do_task->next()) {
                 $xml .= "  <contact_task>\n";
                 $xml .= "   <idtask><![CDATA[" . $do_task->getData("idtask") . "]]></idtask>\n";
                 $xml .= "   <task_description><![CDATA[" . $do_task->getData("task_description") . "]]></task_description>\n";
                 $xml .= "   <due_date><![CDATA[" . $do_task->getData("due_date") . "]]></due_date>\n";
                 $xml .= "   <category><![CDATA[" . $do_task->getData("category") . "]]></category>\n";
                 $xml .= "   <iduser><![CDATA[" . $do_task->getData("iduser") . "]]></iduser>\n";
                 $xml .= "   <due_date_dateformat><![CDATA[" . $do_task->getData("due_date_dateformat") . "]]></due_date_dateformat>\n";
                 $xml .= "   <status><![CDATA[" . $do_task->getData("status") . "]]></status>\n";
                 $xml .= "   <date_completed><![CDATA[" . $do_task->getData("date_completed") . "]]></date_completed>\n";
                 $xml .= "   <idcontact><![CDATA[" . $do_task->getData("idcontact") . "]]></idcontact>\n";
                 $xml .= "   <from_note><![CDATA[" . $do_task->getData("from_note") . "]]></from_note>\n";
                 $xml .= "   <is_sp_date_set><![CDATA[" . $do_task->getData("is_sp_date_set") . "]]></is_sp_date_set>\n";
                 $xml .= "   <task_category><![CDATA[" . $do_task->getData("task_category") . "]]></task_category>\n";
                 $xml .= "  </contact_task>\n";
             }
             $do_task->free();
             /**
              * For all the contact tasks which are associated with Project.
              */
             $do_task = new Task();
             //$do_task->getContactTasksAssociatedWithProject($do_contact->getData("idcontact"));
             $do_task->getContactTasksAssociatedWithProjectWithContact($do_contact->getData("idcontact"));
             while ($do_task->next()) {
                 $do_project = new Project();
                 $do_project->getId($do_task->idproject);
                 $xml .= "  <contact_task_with_project>\n";
                 $xml .= "   <idproject><![CDATA[" . $do_project->idproject . "]]></idproject>\n";
                 $xml .= "   <iduser><![CDATA[" . $do_project->iduser . "]]></iduser>\n";
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:67,代码来源:OfuzExportXML.class.php

示例4: array

                    $docustomer_invoice->getId($_SESSION['do_invoice']->idinvoice);
                    $email_data = array('name' => $customer_name, 'company' => $do_user_data->company, 'description' => $docustomer_invoice->desc, 'signature' => $signature, 'amount' => $paid_memebership_amount, 'num' => $docustomer_invoice->num, 'refnum' => $result['response']['id'], 'paytype' => 'Stripe', 'username' => $do_user_data->firstname, 'invoice_num' => $docustomer_invoice->num);
                    //Notify User by email about his payment
                    if (!empty($customer_email)) {
                        $emailer = new Radria_Emailer();
                        $email_template = new EmailTemplate("ofuz_inv_payment_confirmation");
                        $email_template->setSenderName($customer_name);
                        $email_template->setSenderEmail($customer_email);
                        $email_template->free();
                        $emailer->setEmailTemplate($email_template);
                        $emailer->mergeArray($email_data);
                        $emailer->addTo($customer_email);
                        print_r($emailer);
                        //$emailer->send();
                    }
                    //Email for admin
                    $doemail_template_adm = new EmailTemplate("ofuz_inv_payment_confirmation_adm");
                    $doemail_template_adm->setSenderName('Admin');
                    $doemail_template_adm->setSenderEmail($admin_email);
                    $emailer2 = new Radria_Emailer();
                    $emailer2->setEmailTemplate($doemail_template_adm);
                    $emailer2->mergeArray($email_data);
                    $emailer2->addTo($admin_email);
                    print_r($emailer);
                    //$emailer->send();
                }
            }
        }
    }
    $do_invoice->free();
}
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:cron_processstripe_recurrent_invoice.php

示例5: InvoiceCallback

            $do_inv_line->description = $inv_line->description;
            $do_inv_line->price = $inv_line->price;
            $do_inv_line->qty = $inv_line->qty;
            $do_inv_line->total = $inv_line->total;
            $do_inv_line->item = $inv_line->item;
            $do_inv_line->add();
        }
        $do_invoice->setInvoiceCalculations($idinvoice);
        // Call this method for other calculations
        //update callback
        $do_inv_callbak = new InvoiceCallback();
        $do_inv_callbak->updateCallBack($do_recurrent->idcontact, $idinvoice);
        // Process RegistrationInvoiceLog will update only if the invoice is from registration Part of Ofuz.com
        $do_RegistrationInvoiceLog = new RegistrationInvoiceLog();
        // @params old invoiceid,new invoice id and the iduser
        $do_RegistrationInvoiceLog->process_reg_invoice_log($do_recurrent->idinvoice, $idinvoice, $do_recurrent->iduser);
        // Update Recurrent
        $do_recurrent_update = new RecurrentInvoice();
        $next_date = $do_recurrent_update->getNextDate($do_recurrent->recurrence, $do_recurrent->recurrencetype, $do_recurrent->nextdate);
        $do_recurrent_update->getId($do_recurrent->idrecurrentinvoice);
        $do_recurrent_update->nextdate = $next_date;
        $do_recurrent_update->idinvoice = $idinvoice;
        $do_recurrent_update->update();
        $do_recurrent_update->free();
        //Sending Email to the customer
        //echo 'Calling method sendInvoiceByEmail()..........<br />';
        $do_inv_add->sendInvoiceByEmail($idinvoice, $do_inv_add->idcontact, $do_inv_add->iduser, true);
        $do_inv_add->free();
        //}
    }
}
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:cron_create_recurrent_invoice.php

示例6: eventImportAccount

 function eventImportAccount(EventControler $evtcl)
 {
     $msg = "";
     $uploaded_file = $_FILES['fields']['name']['import_account'];
     $target_path = 'files/' . $uploaded_file;
     if (!move_uploaded_file($_FILES['fields']['tmp_name']['import_account'], $target_path)) {
         $msg = "There was an error uploading the file, please try again!";
     } else {
         chmod($target_path, 0755);
         if (file_exists($target_path)) {
             //$xml = simplexml_load_file($_SERVER['DOCUMENT_ROOT']."/".$target_path);
             $str_xml = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $target_path);
             $str_xml = preg_replace('/[^(\\x20-\\x7F)]*/', '', $str_xml);
             $xml = simplexml_load_string($str_xml);
             echo '<pre>';
             print_r($xml);
             echo '</pre>';
             die;
             if ($xml !== FALSE) {
                 $c_cnt = count($xml->contact);
                 if ($c_cnt) {
                     for ($i = 0; $i < $c_cnt; $i++) {
                         $do_contact = new Contact();
                         $contact = $xml->contact[$i];
                         $do_contact->firstname = $contact->firstname;
                         $do_contact->lastname = $contact->lastname;
                         $do_contact->position = $contact->position;
                         $do_contact->company = $contact->company;
                         $do_contact->idcompany = $contact->idcompany;
                         $do_contact->iduser = $_SESSION['do_User']->iduser;
                         $do_contact->picture = $contact->picture;
                         $do_contact->summary = $contact->summary;
                         $do_contact->birthday = $contact->birthday;
                         $do_contact->portal_code = $contact->portal_code;
                         $do_contact->fb_userid = $contact->fb_userid;
                         $do_contact->tw_user_id = $contact->tw_user_id;
                         $do_contact->email_optout = $contact->email_optout;
                         $do_contact->add();
                         $lastInsertedContId = $do_contact->getPrimaryKeyValue();
                         /**
                          *Contact Address	
                          */
                         $ca_cnt = count($contact->contact_address);
                         if ($ca_cnt) {
                             for ($ca_cnt_i = 0; $ca_cnt_i < $ca_cnt; $ca_cnt_i++) {
                                 $do_contact_address = new ContactAddress();
                                 $contact_address = $contact->contact_address[$ca_cnt_i];
                                 $do_contact_address->city = $contact_address->city;
                                 $do_contact_address->country = $contact_address->country;
                                 $do_contact_address->state = $contact_address->state;
                                 $do_contact_address->street = $contact_address->street;
                                 $do_contact_address->zipcode = $contact_address->zipcode;
                                 $do_contact_address->idcontact = $lastInsertedContId;
                                 $do_contact_address->address = $contact_address->address;
                                 $do_contact_address->address_type = $contact_address->address_type;
                                 $do_contact_address->add();
                                 $do_contact_address->free();
                             }
                         }
                         /**
                          *Contact Email	
                          */
                         $ce_cnt = count($contact->contact_email);
                         if ($ce_cnt) {
                             for ($ce_cnt_i = 0; $ce_cnt_i < $ce_cnt; $ce_cnt_i++) {
                                 $do_contact_email = new ContactEmail();
                                 $contact_email = $contact->contact_email[$ce_cnt_i];
                                 $do_contact_email->idcontact = $lastInsertedContId;
                                 $do_contact_email->email_address = $contact_email->email_address;
                                 $do_contact_email->email_type = $contact_email->email_type;
                                 $do_contact_email->email_isdefault = $contact_email->email_isdefault;
                                 $do_contact_email->add();
                                 $do_contact_email->free();
                             }
                         }
                         /**
                          *Contact Phone 
                          */
                         $cp_cnt = count($contact->contact_phone);
                         if ($cp_cnt) {
                             for ($cp_cnt_i = 0; $cp_cnt_i < $cp_cnt; $cp_cnt_i++) {
                                 $do_contact_phone = new ContactPhone();
                                 $contact_phone = $contact->contact_phone[$cp_cnt_i];
                                 $do_contact_phone->phone_number = $contact_phone->phone_number;
                                 $do_contact_phone->phone_type = $contact_phone->phone_type;
                                 $do_contact_phone->idcontact = $lastInsertedContId;
                                 $do_contact_phone->add();
                                 $do_contact_phone->free();
                             }
                         }
                         /**
                          *Contact Note	
                          */
                         $cn_cnt = count($contact->contact_note);
                         if ($cn_cnt) {
                             for ($cn_cnt_i = 0; $cn_cnt_i < $cn_cnt; $cn_cnt_i++) {
                                 $do_contact_note = new ContactNotes();
                                 $contact_note = $contact->contact_note[$cn_cnt_i];
                                 $do_contact_note->idcontact = $lastInsertedContId;
                                 $do_contact_note->note = $contact_note->note;
//.........这里部分代码省略.........
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:101,代码来源:RestoreAccount.class.php


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