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


PHP LBApplication::renderPlain方法代码示例

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


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

示例1: actiondropdownJSONCategory

 public function actiondropdownJSONCategory($vendor_id = false, $vendor_invoice_id = false)
 {
     $vendor_id = isset($_GET['vendor_id']) ? $_GET['vendor_id'] : 0;
     $quotation_id = isset($_GET['vendor_invoice_id']) ? $_GET['vendor_invoice_id'] : 0;
     $category_arr = SystemList::model()->getItemsForListCode('expenses_category', LbVendor::LB_QUERY_RETURN_TYPE_DROPDOWN_ARRAY);
     $category_arr = SystemList::model()->findAll('system_list_code = "expenses_category"');
     $ordered_results = array();
     $ordered_results[0] = array('value' => '0', 'text' => 'Choose category') + $ordered_results;
     foreach ($category_arr as $value) {
         $ordered_results[] = array('value' => $value['system_list_item_id'], 'text' => $value['system_list_item_name']);
     }
     LBApplication::renderPlain($this, array('content' => CJSON::encode($ordered_results)));
 }
开发者ID:keyeMyria,项目名称:linxbooks,代码行数:13,代码来源:DefaultController.php

示例2: actionajaxDeletePayment

 function actionajaxDeletePayment()
 {
     if (isset($_GET['id'])) {
         $payment_item_id = $_GET['id'];
     }
     //delete payment item
     $payment = LbPaymentItem::model()->deleteByPk($payment_item_id);
     $invoice_id = $_GET['invoice_id'];
     $invoiceTotal = LbInvoiceTotal::model()->getInvoiceTotal($invoice_id);
     $taxRecord['paid'] = $invoiceTotal->calculateInvoicetotalPaid($invoice_id);
     $taxRecord['outstanding'] = $invoiceTotal->calculateInvoiceTotalOutstanding();
     if ($invoiceTotal->calculateInvoiceTotalOutstanding() <= 0) {
         $taxRecord['status'] = 'I_PAID';
     } else {
         $taxRecord['status'] = 'Open';
     }
     //update invoice total
     //                if($payment->delete())
     //                    echo 'success';
     LBApplication::renderPlain($this, array('content' => CJSON::encode($taxRecord)));
 }
开发者ID:keyeMyria,项目名称:linxbooks,代码行数:21,代码来源:DefaultController.php

示例3: actionupdateComment

 public function actionupdateComment()
 {
     $description = false;
     if (isset($_POST['id_comment'])) {
         $id_commment = $_POST['id_comment'];
     }
     if (isset($_POST['description'])) {
         $description = $_POST['description'];
     }
     $model = LbComment::model()->findByPk($id_commment);
     $model->lb_comment_description = $description;
     $date = date('Y-m-d');
     $model->lb_comment_date = $date;
     if ($model->update()) {
         $response = array();
         $response['success'] = YES;
         $response['lb_comment_description'] = nl2br($model->lb_comment_description);
         $response['lb_comment_date'] = $model->lb_comment_date;
         LBApplication::renderPlain($this, array('content' => CJSON::encode($response)));
     }
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:21,代码来源:DefaultController.php

示例4: actionCreateBlankTax

 public function actionCreateBlankTax($id)
 {
     $invoiceItem = new LbInvoiceItem();
     $result = $invoiceItem->addBlankTax($id);
     if ($result) {
         $response = array();
         $response['success'] = YES;
         $response['invoice_item_id'] = $invoiceItem->lb_record_primary_key;
         LBApplication::renderPlain($this, array('content' => CJSON::encode($response)));
     }
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:11,代码来源:DefaultController.php

示例5: actionajaxQuickCreateCurrency

 public function actionajaxQuickCreateCurrency()
 {
     $invoice_id = isset($_REQUEST['invoice_id']) ? $_REQUEST['invoice_id'] : '';
     // $model = LbInvoice::model()->findByPk($invoice_id);
     $model = $this->loadModel($invoice_id);
     $GeneraModel = new LbGenera();
     if (isset($_POST['LbGenera'])) {
         $GeneraModel->attributes = $_POST['LbGenera'];
         if ($GeneraModel->save()) {
             $model->lb_invoice_currency = $GeneraModel->lb_record_primary_key;
             $model->save();
         }
         LBApplication::renderPlain($this, array('content' => CJSON::encode($GeneraModel)));
         return true;
     }
     LBApplication::renderPartial($this, '_form_currency', array('model' => $model, 'GeneraModel' => $GeneraModel));
 }
开发者ID:nhuhtlb,项目名称:linxbooks,代码行数:17,代码来源:DefaultController.php

示例6: actionAjaxQuickCreateTax

 public function actionAjaxQuickCreateTax($id)
 {
     $model = new LbTax();
     $submission_type = isset($_GET['form_type']) ? $_GET['form_type'] : 'default';
     $quotationModel = LbQuotation::model()->findByPk($id);
     if (isset($_POST['LbTax'])) {
         $model->attributes = $_POST['LbTax'];
         $lbtax_arr = $_POST['LbTax'];
         if (!LbTax::model()->IsNameTax($lbtax_arr['lb_tax_name'])) {
             $error['error'] = "Tax Name Exist.";
             LBApplication::renderPlain($this, array('content' => CJSON::encode($error)));
             return false;
         }
         if ($model->save()) {
             $result['yes'] = true;
             if ($submission_type == 'ajax') {
                 // auto add this tax item into this invoice
                 $quotaitonTax = new LbQuotationTax();
                 if ($quotaitonTax->addTaxToQuotation($id, $model)) {
                     $this->actionAjaxUpdateTaxs($id);
                 }
                 // print json result of this quotation item
                 //LBApplication::renderPlain($this, array('content'=>CJSON::encode($result)));
                 return true;
             }
         }
     }
     $submission_details = array();
     $submission_details["type"] = $submission_type;
     LBApplication::render($this, '_form_tax', array('model' => $model, 'quotationModel' => $quotationModel, 'submission_details' => $submission_details));
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:31,代码来源:DefaultController.php

示例7: actionsavePaymentVoucher

 public function actionsavePaymentVoucher()
 {
     $model = new LbPaymentVoucher();
     $pv_no = false;
     $pv_title = false;
     $pv_date = false;
     $pv_description = false;
     if ($_POST['pv_no']) {
         $pv_no = $_POST['pv_no'];
     }
     $issetPv = LbPaymentVoucher::model()->find('lb_payment_voucher_no = "' . $pv_no . '"');
     //            if(count($issetPv) > 0)
     //            {
     //                $response = array();
     //                $response['success'] = NO;
     //
     //
     //                LBApplication::renderPlain($this, array('content'=>  CJSON::encode($response)));
     //                return;
     //            }
     if ($_POST['pv_title']) {
         $pv_title = $_POST['pv_title'];
     }
     if ($_POST['pv_date']) {
         $pv_date = $_POST['pv_date'];
     }
     if ($_POST['pv_description']) {
         $pv_description = $_POST['pv_description'];
     }
     $idPv = false;
     if (isset($_REQUEST['idPv'])) {
         $idPv = $_REQUEST['idPv'];
     }
     //company
     $id = $model->savePaymentVoucher($pv_no, $pv_title, $pv_date, $pv_description, $idPv);
     $count = count($_POST['iem_ex_arr']);
     $expenses_item = $_POST['iem_ex_arr'];
     for ($i = 0; $i < $count; $i++) {
         if ($expenses_item[$i] > 0) {
             $PvExpenses = new LbPvExpenses();
             $PvExpenses->lb_expenses_id = $expenses_item[$i];
             $PvExpenses->lb_payment_voucher_id = $id;
             if (LbPvExpenses::model()->getExpensesPV($expenses_item[$i], $id) == false) {
                 $PvExpenses->insert();
             }
         }
     }
     if ($id) {
         $response = array();
         $response['success'] = YES;
         $response['id'] = $id;
         LBApplication::renderPlain($this, array('content' => CJSON::encode($response)));
     }
 }
开发者ID:keyeMyria,项目名称:linxbooks,代码行数:54,代码来源:DefaultController.php

示例8: actionCreateDefaultNote

 public function actionCreateDefaultNote()
 {
     $model = new LbDefaultNote();
     $lastDefaultNote = LbDefaultNote::model()->getFullRecords();
     if (count($lastDefaultNote) > 0) {
         return false;
     } else {
         if ($model->save()) {
             return LBApplication::renderPlain($this, array('content' => CJSON::encode($model)));
         }
     }
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:12,代码来源:ConfigurationController.php

示例9: actionDropdownJSON

 /**
  * json data source for x-editable dropdown to get contacts
  */
 public function actionDropdownJSON()
 {
     $allow_add = isset($_GET['allow_add']) ? $_GET['allow_add'] : NO;
     $invoice_id = isset($_GET['invoice_id']) ? $_GET['invoice_id'] : 0;
     $quotation_id = isset($_GET['quotation_id']) ? $_GET['quotation_id'] : 0;
     $vendor_id = isset($_GET['vendor_id']) ? $_GET['vendor_id'] : 0;
     $vendor_invoice_id = isset($_GET['lb_vendor_invoice_id']) ? $_GET['lb_vendor_invoice_id'] : 0;
     // override customer id if invoice id is provided
     if ($vendor_id) {
         $vendor = LbVendor::model()->findByPk($vendor_id);
         $customer_id = $vendor->lb_vendor_supplier_id;
     }
     if ($vendor_invoice_id) {
         $vendor_invoice = LbVendorInvoice::model()->findByPk($vendor_invoice_id);
         $customer_id = $vendor_invoice->lb_vd_invoice_supplier_id;
     }
     if ($invoice_id) {
         $invoice = LbInvoice::model()->findByPk($invoice_id);
         $customer_id = $invoice->lb_invoice_customer_id;
     }
     // override customer id if quotation id is provided
     if ($quotation_id) {
         $quotation = LbQuotation::model()->findByPk($quotation_id);
         $customer_id = $quotation->lb_quotation_customer_id;
     }
     // get contacts;
     $results = LbCustomerContact::model()->getContacts($customer_id, LbCustomerAddress::LB_QUERY_RETURN_TYPE_DROPDOWN_ARRAY);
     // prepend new address link if allow add new
     if ($allow_add && $allow_add != 2) {
         $results = array('0' => 'Choose contact', '-1' => '-- Add new contact --') + $results;
     }
     if ($vendor_id || $vendor_invoice_id) {
         $results = array('0' => 'Choose contact') + $results;
     }
     // we want to preserve order
     $ordered_results = array();
     foreach ($results as $key => $text) {
         $ordered_results[] = array('value' => $key, 'text' => $text);
     }
     LBApplication::renderPlain($this, array('content' => CJSON::encode($ordered_results)));
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:44,代码来源:DefaultController.php

示例10: actionExpensesNewCustomer

 public function actionExpensesNewCustomer()
 {
     //   $model = $this->loadModel($id);
     $expenses_id = isset($_REQUEST['expenses_id']) ? $_REQUEST['expenses_id'] : 0;
     //    $submission_type = isset($_GET['form_type']) ? $_GET['form_type'] : 'default';
     $expensesModel = LbExpenses::model()->findByPk($expenses_id);
     $customerModel = new LbCustomer();
     $addressModel = new LbCustomerAddress();
     $contactModel = new LbCustomerContact();
     $own = false;
     if (isset($_POST['LbCustomer'])) {
         $customerModel->attributes = $_POST['LbCustomer'];
         //    $customerModel->lb_customer_is_own_company = 0;
         if ($customerModel->save()) {
             //   if($submission_type == 'ajax'){
             if (isset($expenses_id) && $expenses_id > 0) {
                 $expenses_customer = new LbExpensesCustomer();
                 $expenses_customer->lb_expenses_id = $expenses_id;
                 $expenses_customer->lb_customer_id = $customerModel->lb_record_primary_key;
                 $expenses_customer->save();
                 LBApplication::renderPlain($this, array('content' => CJSON::encode($expenses_customer)));
             }
             if (isset($_POST['LbCustomerAddress'])) {
                 $addressModel->attributes = $_POST['LbCustomerAddress'];
                 $addressModel->lb_customer_id = $customerModel->lb_record_primary_key;
                 $addressModel->save();
             }
             // save contact if any
             if (isset($_POST['LbCustomerContact'])) {
                 $contactModel->attributes = $_POST['LbCustomerContact'];
                 $contactModel->lb_customer_id = $customerModel->lb_record_primary_key;
                 if ($contactModel->save()) {
                     // automatically assign this contact to submitted address
                     $contactAddressModel = new LbCustomerAddressContact();
                     $contactAddressModel->lb_customer_address_id = $addressModel->lb_record_primary_key;
                     $contactAddressModel->lb_customer_contact_id = $contactModel->lb_record_primary_key;
                     $contactAddressModel->save();
                 }
             }
         }
     }
     LBApplication::render($this, 'addCustomer', array('expensesModel' => $expensesModel, 'own' => $own, 'customerModel' => $customerModel, 'addressModel' => $addressModel, 'contactModel' => $contactModel));
 }
开发者ID:nhuhtlb,项目名称:linxbooks,代码行数:43,代码来源:DefaultController.php


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