function actionAjaxLoadFormViewPayment() { //LBApplication::renderPartial($this, '_form_view_payment', array()); $model = new LbPayment(); $lbInvoiceModel = new LbInvoice(); LBApplication::renderPartial($this, '_form_view_payment', array('model' => $model, 'lbInvoiceModel' => $lbInvoiceModel)); }
/** * Manages all models. */ public function actionAdmin() { $model = new UserSubscription('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['UserSubscription'])) { $model->attributes = $_GET['UserSubscription']; } LBApplication::renderPartial($this, 'admin', array('model' => $model)); }
public function action_search_quotation() { $name = $_GET['name']; LBApplication::renderPartial($this, '_search_quotation', array('name' => $name)); }
echo ' <input type="text" placeholder="Search" value="" style="border-radius: 15px;" onKeyup="search_name_invoice(this.value);">'; // if($canAdd) // echo '<button id="btn_invoice" class = "btn" onclick="view_oustanding_invoice()">Outstanding Invoice<span class="notification-badge">'.$count_invoice.'</span></button>'; // if($canAddQuotation) // echo '<button id="btn_quotation" class = "btn" onclick="view_oustanding_quotation()">Outstanding Quotation<span class="notification-badge">'.$count_quotation.'</span></button>'; // if($canAddPayment) // echo '<button id="btn_graph" class = "btn" onclick="view_chart()">Chart</button>'; echo '</div>'; echo '<div id="lb_quotation" class="btn-toolbar" style="margin-top:2px;">'; echo '<input type="text" placeholder="Search" value="" style="border-radius: 15px;" onKeyup="search_name_quotation(this.value);">'; echo '</div>'; echo '</div>'; echo '</div>'; echo '<div id="lb_dashboard_summary">'; //echo '<div style="width:15%;"></div>'; LBApplication::renderPartial($this, 'dashboard_summary', array('model' => $model)); echo '</div>'; echo '</br>'; echo '<div id="lb_dashboard_submenu">'; echo '<div class="lb_submenu_left">'; echo '<img id="img_invoice" class="lb_img_submenu_left" src=' . Yii::app()->baseUrl . '/images/icons/invoice-green.png onclick="view_oustanding_invoice()"><br/>'; echo '<label style="margin-left:10px;" class="submenu_label" id="btn_invoice" onclick="view_oustanding_invoice()">Invoice</label>  '; echo '</div>'; echo '<div class="lb_submenu_left">'; echo '<img id="img_quotation" class="lb_img_submenu_left_opacity" onclick="view_oustanding_quotation()" src=' . Yii::app()->baseUrl . '/images/icons/icon_quote3.png ><br/>'; echo '<label class="submenu_label" id="btn_quotation" style="color:black !important;" onclick="view_oustanding_quotation()">Quotations</label>  '; echo '</div>'; echo '<div class="lb_submenu_left">'; echo '<img id="img_chart" class="lb_img_submenu_left_opacity" src=' . Yii::app()->baseUrl . '/images/icons/chart.png onclick="view_chart()"><br/>'; echo '<label class="submenu_label" id="btn_graph" style="margin-left:16px;" onclick="view_chart()">Charts</label>'; echo '</div>';
public function actionajaxUpdateCustomerVI() { if ($this->actionAjaxUpdateFieldInvoice()) { $vendor_id = $_POST['pk']; $vendor = LbVendorInvoice::model()->findByPk($vendor_id); if ($vendor) { // reset address just in case some address of previous customer is already there $vendor->lb_vd_invoice_supplier_id = $_POST['value']; $vendor->lb_vd_invoice_supplier_attention_id = 0; $vendor->save(); // auto assign one of the addresses of this customer to this invoice $addresses = LbCustomerAddress::model()->getAddresses($vendor->lb_vd_invoice_supplier_id, LbCustomerAddress::LB_QUERY_RETURN_TYPE_MODELS_ARRAY); $firstAddress = null; // only proceed if found any address if (count($addresses)) { // get first billing address // echo // or just first address to auto assign to this invoice $firstAddress = $addresses[0]; // be default, just use first address foreach ($addresses as $addr) { // if billing address, use this instead if ($addr->lb_customer_address_is_billing) { $firstAddress = $addr; break; // no need to carry on } } // assign address to invoice $vendor->lb_vd_invoice_supplier_address_id = $firstAddress->lb_record_primary_key; if ($vendor->save()) { // return that address in json // we need to format it nicely. $address_array = $firstAddress->formatAddressLines(); // print json LBApplication::renderPartial($this, '//layouts/plain_ajax_content', array('content' => CJSON::encode($address_array))); return true; } // end formatting address to return in json } // end if found addresses } return true; } return false; }
<?php /* @var $this LbInvoiceController */ /* @var $model LbInvoice */ LBApplication::renderPartial($this, '_page_header', array('model' => $model)); $this->renderPartial('_form', array('model' => $model));
<?php /* @var $this DefaultController */ // echo $model->lb_record_primary_key; $m = $this->module->id; $canView = BasicPermission::model()->checkModules($m, 'view'); if (!$canView) { echo "Have no permission to see this record"; return; } echo '<div id="lb-container-header">'; echo '<div class="lb-header-right" ><h3>Report</h3></div>'; echo '<div class="lb-header-left">'; echo ' '; echo '</div>'; echo '</div><br>'; $tab = "all"; if (isset($_GET['tab'])) { $tab = $_GET['tab']; } $this->widget('bootstrap.widgets.TbTabs', array('type' => 'tabs', 'encodeLabel' => false, 'tabs' => array(array('id' => 'tab1', 'label' => '<strong>' . Yii::t('lang', 'Aging Report') . '</strong>', 'content' => LBApplication::renderPartial($this, '_form_aging_report', array(), true), 'active' => $tab == "aging_report" || $tab == "all" ? true : false), array('id' => 'tab2', 'label' => '<strong>' . Yii::t('lang', 'Cash Receipt') . '</strong>', 'content' => $this->renderPartial('_form_cash_receipt', array(), true), 'active' => $tab == "cash_receipt" ? true : false), array('id' => 'tab3', 'label' => '<strong>' . Yii::t('lang', 'Invoice Journal') . '</strong>', 'content' => $this->renderPartial('_form_invoice_journal', array(), true), 'active' => $tab == "invoice_journal" ? true : false), array('id' => 'tab4', 'label' => '<strong>' . Yii::t('lang', 'GST Report') . '</strong>', 'content' => $this->renderPartial('_form_gst_report', array(), true), 'active' => $tab == "gst_report" ? true : false), array('id' => 'tab5', 'label' => '<strong>' . Yii::t('lang', 'Sales Report') . '</strong>', 'content' => $this->renderPartial('_form_sale_report', array(), true), 'active' => $tab == "sales_report" ? true : false), array('id' => 'tab6', 'label' => '<strong>' . Yii::t('lang', 'Customer Statements') . '</strong>', 'content' => $this->renderPartial('_form_customer_statements', array(), true), 'active' => $tab == "customer_statement" ? true : false))));
} ?> <div class="accordion-group"> <div class="accordion-heading" id="view_payment"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#form_view_payment"> <i></i> <span style="color: #fff;font-size: 20px; font-weight: bold"><?php echo Yii::t('lang', 'View Payment'); ?> </span> </a> </div> <div id="form_view_payment" class="accordion-body collapse"> <div class="accordion-inner"> <?php LBApplication::renderPartial($this, '_view_payment', array('lbInvoiceModel' => $lbInvoiceModel, 'model' => $model)); ?> </div> </div> </div> </div> </div> <script type="text/javascript"> // Style accodtion icon //$('a:active i').addClass("icon-minus-sign"); //$('.accordion-body.in.collapse i').addClass("icon-plus-sign"); $('#new_payment i').addClass('icon-minus-sign'); $('#view_payment i').addClass('icon-plus-sign'); $('#form_new_payment').on('show', function () { $('#new_payment i').removeClass();
echo CHtml::label(Yii::t('lang', 'To'), "search_data_to", array('style' => 'display:inline')); ?> <?php $this->widget('ext.rezvan.RDatePicker', array('name' => 'search_data_to', 'value' => $lastMonth_data, 'options' => array('format' => 'dd-mm-yyyy', 'viewformat' => 'dd-mm-yyyy', 'placement' => 'right', 'todayBtn' => true), 'htmlOptions' => array('class' => 'span2', 'placeholder' => 'Date from', 'style' => 'margin-top: 8px;margin-right: 15px;'))); ?> <?php echo CHtml::button(Yii::t('lang', 'Search'), array('onclick' => 'load_search_view_payment();return false;', 'class' => 'btn', 'style' => 'margin-top:-3px;')); ?> </div> <div id="form_view_detail_payment"> <?php LBApplication::renderPartial($this, '_form_view_payment', array()); ?> </div> <script> function load_search_view_payment(){ var customer_id = $('#select_customer').val(); var search_date_from = $('#search_data_from').val(); var search_date_to = $('#search_data_to').val(); $('#form_view_detail_payment').html('<img src="<?php echo YII::app()->baseUrl; ?> /images/loading.gif" /> Loading...'); $('#form_view_detail_payment').load('AjaxLoadFormViewPayment',{customer_id:customer_id,search_date_from:search_date_from,search_date_to:search_date_to}); }
public function actionAjaxLoadViewEmployeeReport() { $model = new LbEmployeePayment(); LBApplication::renderPartial($this, '_form_view_employee_report', array('model' => $model)); }
public function actionAjaxFormPayment() { $paymentModel = new LbPayment(); LBApplication::renderPartial($this, '_form_payment', array('paymentModel' => $paymentModel)); }
public function actionAjaxLoadDefaultNote() { LBApplication::renderPartial($this, '_form_default_detail_note', array(), false); }
<?php /* @var $this DefaultController */ $m = $this->module->id; $canView = BasicPermission::model()->checkModules($m, 'view'); if (!$canView) { echo "Have no permission to see this record"; return; } echo '<div id="lb-container-header">'; echo '<div class="lb-header-right" ><h3>Expenses</h3></div>'; echo '<div class="lb-header-left">'; LBApplicationUI::backButton(LbExpenses::model()->getAdminURLNormalized()); echo ' '; $this->widget('bootstrap.widgets.TbButtonGroup', array('type' => '', 'buttons' => array(array('label' => '<i class="icon-plus"></i> ' . Yii::t('lang', 'New'), 'items' => array(array('label' => Yii::t('lang', 'New Expenses'), 'url' => LbExpenses::model()->getActionURLNormalized('create')), array('label' => Yii::t('lang', 'New Payment Voucher'), 'url' => LbExpenses::model()->getActionURLNormalized('createPaymentVoucher'))))), 'encodeLabel' => false)); echo '</div>'; echo '</div><br>'; ?> <?php $this->widget('bootstrap.widgets.TbTabs', array('type' => 'tabs', 'encodeLabel' => false, 'tabs' => array(array('id' => 'tab1', 'label' => '<strong>' . Yii::t('lang', 'Expenses') . '</strong>', 'content' => LBApplication::renderPartial($this, 'view_expenses', array('model' => $model, 'modelPv' => $modelPv), true), 'active' => true), array('id' => 'tab2', 'label' => '<strong>' . Yii::t('lang', 'Payment voucher') . '</strong>', 'content' => $this->renderPartial('view_payment_voucher', array('model' => $model, 'modelPv' => $modelPv), true), 'active' => false))));
public function actionAjaxLoadFormViewStatement() { LBApplication::renderPartial($this, '_form_view_customer_statement', array()); }
/* @var $invoiceItemModel LbInvoiceItem */ /* @var $invoiceDiscountModel LbInvoiceItem */ /* @var $invoiceTaxModel LbInvoiceItem */ /* @var $invoiceTotal LbInvoiceTotal */ $m = $this->module->id; $credit_by = LbCoreEntity::model()->getCoreEntity($m, $model->lb_record_primary_key)->lb_created_by; $canAdd = BasicPermission::model()->checkModules($m, 'add'); $canView = BasicPermission::model()->checkModules($m, 'view', $credit_by); $canList = BasicPermission::model()->checkModules($m, 'list', $credit_by); $canAddPayment = BasicPermission::model()->checkModules('lbPayment', 'add'); $canReport = DefinePermission::model()->checkFunction($m, 'view_report'); if (!$canView) { echo "Have no permission to see this record"; return; } LBApplication::renderPartial($this, '_page_header', array('model' => $model, 'expenses_id' => $expenses_id)); $this->renderPartial('_form', array('model' => $model, 'expenses_id' => $expenses_id)); $this->renderPartial('_form_line_items', array('model' => $model, 'invoiceItemModel' => $invoiceItemModel, 'invoiceDiscountModel' => $invoiceDiscountModel, 'invoiceTaxModel' => $invoiceTaxModel, 'invoiceTotal' => $invoiceTotal, 'expenses_id' => $expenses_id)); //echo '<div style="float: right; z-index: 9999; top: 150px; position: absolute; width: 60px; height: 300px; margin-left: 1020px; // border-bottom-right-radius: 5px; border-top-right-radius: 5px; // padding: 10px;">'; // //if($canAdd) // echo LBApplication::workspaceLink( // CHtml::image(Yii::app()->baseUrl . '/images/icons/icon_new.png', 'Share', array('class'=>'lb-side-icon')), // $model->getCreateURLNormalized(array('group'=>strtolower(LbInvoice::LB_INVOICE_GROUP_INVOICE))), // array('data-toggle'=>"tooltip", 'title'=>"Create new invoice", 'class'=>'lb-side-link-invoice')); //if($canAdd) // echo CHtml::link(CHtml::image(Yii::app()->baseUrl . '/images/icons/icon_copy.png', 'Copy invoice', array('class'=>'lb-side-icon')),'#', array('data-toggle'=>"tooltip",'onclick'=>'onclickCopyInvoice();', 'title'=>"Copy invoice", 'class'=>'lb-side-link-invoice')); //if($canAddPayment) // echo LBApplication::workspaceLink(
function actionFormSharePDFQuotation($id) { $model = LbQuotation::model()->findByPk($id); $p = $model->lb_quotation_encode; LBApplication::renderPartial($this, '_form_public_pdf', array('model' => $model, 'p' => $p)); }
/** * Displays the login page */ public function actionLogin() { $model = new LoginForm(); // if it is ajax validation request if (isset($_POST['ajax']) && $_POST['ajax'] === 'login-form') { echo CActiveForm::validate($model); Yii::app()->end(); } // collect user input data if (isset($_POST['LoginForm'])) { $model->username = $_POST['LoginForm']['username']; $model->password = $_POST['LoginForm']['password']; $model->rememberMe = 1; // print_r($_POST['LoginForm']); // validate user input and redirect to the previous page if valid if ($model->validate() && $model->login()) { $this->redirect(array('/' . LBApplication::getCurrentlySelectedSubscription() . "/lbInvoice/dashboard")); } //$this->redirect(array("project/index")); // display the login form //LBApplication::renderPartial($this, 'login', array('model'=>$model)); } // if already login, show projects index if (isset(Yii::app()->user->id) && Yii::app()->user->id > 0) { $this->redirect(array('/' . LBApplication::getCurrentlySelectedSubscription() . "/lbInvoice/dashboard")); //$this->redirect(array("project/index")); } // display the login form LBApplication::renderPartial($this, 'login', array('model' => $model)); //$this->render('login',array('model'=>$model)); }
public function actionAjaxLoadViewPV() { $date_from = false; $date_to = false; if (isset($_POST['date_from'])) { $date_from = $_POST['date_from']; } if (isset($_POST['date_to'])) { $date_to = $_POST['date_to']; } $model = new LbPaymentVoucher(); LBApplication::renderPartial($this, '_form_view_payment_voucher', array('model' => $model, 'date_from' => $date_from, 'date_to' => $date_to)); }
public function action_search_Payment() { $type = false; $name = $_GET['name']; $date = $_GET['date']; $model = LbEmployee::model()->searchEmployeeByName($name); if (isset($_GET['type'])) { LBApplication::renderPartial($this, '_search_enter_Payment', array('name' => $name, 'date' => $date, 'model' => $model)); } else { LBApplication::renderPartial($this, '_search_Payment', array('name' => $name, 'date' => $date)); } }
} ?> <div class="accordion-group"> <div class="accordion-heading" id="view_payment"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#form_view_payment"> <i></i> <span style="color: #6E8900;font-size: 20px; font-weight: bold"><?php echo Yii::t('lang', 'View Payment'); ?> </span> </a> </div> <div id="form_view_payment" class="accordion-body collapse"> <div class="accordion-inner"> <?php LBApplication::renderPartial($this, '_view_payment', array('customer_id' => $customer_id)); ?> </div> </div> </div> </div> </div> <script type="text/javascript"> // Style accodtion icon //$('a:active i').addClass("icon-minus-sign"); //$('.accordion-body.in.collapse i').addClass("icon-plus-sign"); $('#new_payment i').addClass('icon-minus-sign'); $('#view_payment i').addClass('icon-plus-sign'); $('#form_new_payment').on('show', function () { $('#new_payment i').removeClass();
<?php $this->widget('bootstrap.widgets.TbTabs', array('type' => 'pills', 'encodeLabel' => false, 'tabs' => array(array('id' => 'tab1', 'label' => '<strong>' . Yii::t('lang', 'package') . '</strong>', 'content' => LBApplication::renderPartial($this, 'paypal.views.creditCard.index', array('value' => $subscription), true), 'active' => true), array('id' => 'tab2', 'label' => '<strong>' . Yii::t('lang', 'Subcriptions') . '</strong>', 'content' => 'Loading....', 'active' => false), array('id' => 'tab3', 'label' => '<strong>' . Yii::t('lang', 'User Subcription') . '</strong>', 'content' => 'Loading.....', 'active' => false)), 'events' => array('shown' => 'js:loadContent'))); ?> <script type="text/javascript"> function loadContent(e){ var tabId = e.target.getAttribute("href"); var ctUrl = ''; if(tabId == '#tab2') { ctUrl = '<?php echo $this->createUrl('/paypal/subscription/admin'); ?> '; } else if(tabId == '#tab3') { ctUrl = '<?php echo $this->createUrl('/paypal/userSubscription/admin'); ?> '; } if(ctUrl != '') { $.ajax({ url : ctUrl, type : 'POST', dataType : 'html', cache : false, success : function(html) {
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)); }
echo '</div>'; echo '</div>'; ?> <div style="width:30%;margin-top:19px;margin-bottom:11px;"><span style="font-size: 16px;"><b><?php echo $model->lb_customer_name; ?> </b></span></div> <?php echo '<div class="btn-toolbar">'; // go back /** LBApplicationUI::newButton('New Address'); echo ' '; LBApplicationUI::newButton('New Contact'); echo ' '; LBApplicationUI::newButton('New Invoice');**/ echo '</div>'; $this->widget('editable.EditableDetailView', array('data' => $model, 'url' => $model->getActionURL('ajaxUpdateField'), 'params' => array('YII_CSRF_TOKEN' => Yii::app()->request->csrfToken), 'attributes' => array(array('name' => 'lb_customer_name', 'editable' => array('type' => 'text', 'inputclass' => 'input-large', 'emptytext' => 'Click to Update', 'validate' => 'function(value) { if(!value) return "Customer Name is required." }')), 'lb_customer_registration', 'lb_customer_tax_id', 'lb_customer_website_url', array('name' => 'lb_customer_is_own_company', 'editable' => array('type' => 'select', 'source' => array(LbCustomer::LB_CUSTOMER_IS_NOT_OWN_COMPANY, LbCustomer::LB_CUSTOMER_IS_OWN_COMPANY), 'placement' => 'right', 'validate' => 'function(value) { if(!value) return "Customer Name is required." }'))))); /** * Show tabs of other details: address, contact, invoice */ $tab_addresses = LBApplication::renderPartial($this, '_customer_addresses', array('customer_addresses' => $customer_addresses, 'customer_id' => $model->lb_record_primary_key), true); $tab_contacts = LBApplication::renderPartial($this, '_customer_contacts', array('customer_contacts' => $customer_contacts, 'customer_id' => $model->lb_record_primary_key), true); $this->widget('bootstrap.widgets.TbTabs', array('type' => 'tabs', 'encodeLabel' => false, 'tabs' => array(array('id' => 'tab1', 'label' => '<i class="icon-envelope"></i> <strong>' . Yii::t('lang', 'Addresses') . '</strong>', 'content' => $tab_addresses, 'active' => true), array('id' => 'tab2', 'label' => '<i class="icon-user"></i> <strong>' . Yii::t('lang', 'Contacts') . '</strong>', 'content' => $tab_contacts, 'active' => false), array('id' => 'tab3', 'label' => '<i class="icon-file"></i> <strong>' . Yii::t('lang', 'Invoices') . '</strong>', 'content' => LBApplication::renderPartial($this, '_view_invoice_customer', array('model' => $model), true), 'active' => false))));
/** * return the address lines in json format * * @param unknown $id */ public function actionAddressLinesJSON($id) { $model = $this->loadModel($id); $address_lines = $model->formatAddressLines(); LBApplication::renderPartial($this, '//layouts/plain_ajax_content', array('content' => CJSON::encode($address_lines))); }
function ActionLoadAjaxTabContract($id) { $customer_contacts = LbCustomerContact::model()->getContacts($id, LbCustomerContact::LB_QUERY_RETURN_TYPE_MODELS_ARRAY); LBApplication::renderPartial($this, '_customer_contacts', array('customer_contacts' => $customer_contacts, 'customer_id' => $id)); }
public function actionLoadPaymentInvoice($invoice_id, $invoice_status) { LBApplication::renderPartial($this, '_form_payment_invoice', array('invoice_id' => $invoice_id, 'invoice_status' => $invoice_status)); }