/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $grdetail = new Grdetail('search'); $grdetail->unsetAttributes(); // clear any default values if (isset($_GET['Grdetail'])) { $grdetail->attributes = $_GET['Grdetail']; } $poheader = new Poheader('search'); $poheader->unsetAttributes(); // clear any default values if (isset($_GET['Poheader'])) { $poheader->attributes = $_GET['Poheader']; } $model = new Grheader('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Grheader'])) { $model->attributes = $_GET['Grheader']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'poheader' => $poheader, 'grdetail' => $grdetail)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); if (isset($_POST['startperiod'])) { $this->pdf->title = 'General Ledger'; $this->pdf->AddPage('P', 'A4'); $connection = Yii::app()->db; $sql = "select accountid,accountcode,accountname from account "; if ($_POST['accountid'] !== '') { $sql = $sql . " where accountid = " . $_POST['accountid']; } $command = $connection->createCommand($sql); $dataReader = $command->queryAll(); $this->pdf->Text(10, $this->pdf->GetY(), date(Yii::app()->params['dateviewfromdb'], strtotime($_POST['startperiod'])) . ' - ' . date(Yii::app()->params['dateviewfromdb'], strtotime($_POST['endperiod']))); foreach ($dataReader as $row) { $this->pdf->setFont('Arial', 'B', 6); $starty = 10; $this->pdf->Text(10, $starty + $this->pdf->GetY(), 'Account Code : ' . $row['accountcode']); $this->pdf->Text(60, $starty + $this->pdf->GetY(), 'Account Name : ' . $row['accountname']); $sql1 = "select b.accountcode,b.accountname, a.debit,a.credit,a.postdate,c.currencyname,a.ratevalue\r\nfrom genledger a\r\nleft join account b on b.accountid = a.accountid\r\nleft join currency c on c.currencyid = a.currencyid\r\nwhere postdate between '" . $_POST['startperiod'] . "' and '" . $_POST['endperiod'] . "' and a.accountid = " . $row['accountid'] . " order by postdate"; $command1 = $connection->createCommand($sql1); $dataReader1 = $command1->queryAll(); $starty = $this->pdf->GetY() + 15; $this->pdf->setY($starty); $this->pdf->setFont('Arial', 'B', 6); $this->pdf->setwidths(array(30, 40, 40, 20, 30)); $this->pdf->setaligns(array('C', 'C', 'C', 'C', 'C')); $this->pdf->setbordercell(array('LTRB', 'LTRB', 'LTRB', 'LTRB', 'LTRB')); $this->pdf->row(array('Post Date', 'Debit', 'Credit', 'Currency Name', 'Rate')); $this->pdf->setbordercell(array('LTRB', 'LTRB', 'LTRB', 'LTRB', 'LTRB')); $this->pdf->SetTableData(); $totaldebit = 0; $totalcredit = 0; $selisih = 0; $this->pdf->setaligns(array('L', 'R', 'R', 'L', 'R')); foreach ($dataReader1 as $row1) { $this->pdf->row(array(date(Yii::app()->params['dateviewfromdb'], strtotime($row1['postdate'])), Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $row1['debit']), Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $row1['credit']), $row1['currencyname'], Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $row1['ratevalue']))); $totaldebit = $row1['debit'] * $row1['ratevalue'] + $totaldebit; $totalcredit = $row1['credit'] * $row1['ratevalue'] + $totalcredit; } $this->pdf->row(array('Sub Total', Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $totaldebit), Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $totalcredit), '', '')); $this->pdf->row(array('Total', Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $totaldebit >= $totalcredit ? $totaldebit - $totalcredit : 0), Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $totaldebit < $totalcredit ? $totalcredit - $totaldebit : 0), '')); } $this->pdf->Output(); } else { $this->render('index'); } }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $model = new Fakturpajak('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Fakturpajak'])) { $model->attributes = $_GET['Fakturpajak']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $deliveryadvicedetail = new Deliveryadvicedetail('search'); $deliveryadvicedetail->unsetAttributes(); // clear any default values if (isset($_GET['Deliveryadvicedetail'])) { $deliveryadvicedetail->attributes = $_GET['Deliveryadvicedetail']; } $product = new Product('search'); $product->unsetAttributes(); // clear any default values if (isset($_GET['Product'])) { $product->attributes = $_GET['Product']; } $unitofmeasure = new Unitofmeasure('search'); $unitofmeasure->unsetAttributes(); // clear any default values if (isset($_GET['Unitofmeasure'])) { $unitofmeasure->attributes = $_GET['Unitofmeasure']; } $sloc = new Sloc('search'); $sloc->unsetAttributes(); // clear any default values if (isset($_GET['Sloc'])) { $sloc->attributes = $_GET['Sloc']; } $requestedby = new Requestedby('search'); $requestedby->unsetAttributes(); // clear any default values if (isset($_GET['Requestedby'])) { $requestedby->attributes = $_GET['Requestedby']; } $model = new Deliveryadvice('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Deliveryadvice'])) { $model->attributes = $_GET['Deliveryadvice']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'deliveryadvicedetail' => $deliveryadvicedetail, 'product' => $product, 'unitofmeasure' => $unitofmeasure, 'sloc' => $sloc, 'requestedby' => $requestedby)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $purchasingorg = new Purchasingorg('searchwstatus'); $purchasingorg->unsetAttributes(); // clear any default values if (isset($_GET['Purchasingorg'])) { $purchasingorg->attributes = $_GET['Purchasingorg']; } $model = new Purchasinggroup('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Purchasinggroup'])) { $model->attributes = $_GET['Purchasinggroup']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'purchasingorg' => $purchasingorg)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Menuauth('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Menuauth'])) { $model->attributes = $_GET['Menuauth']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'menuaccess' => $this->menuaccess)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Employeeschedule('searchwstatus'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Employeeschedule'])) { $model->attributes = $_GET['Employeeschedule']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'employee' => $this->employee)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Employeetype('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Employeetype'])) { $model->attributes = $_GET['Employeetype']; } $this->render('index', array('model' => $model, 'snro' => $this->snro, 'sicksnro' => $this->sicksnro, 'sickstatus' => $this->sickstatus)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $supplier = new Supplier('searchwstatus'); $supplier->unsetAttributes(); // clear any default values if (isset($_GET['Supplier'])) { $supplier->attributes = $_GET['Supplier']; } $product = new Product('searchwstatus'); $product->unsetAttributes(); // clear any default values if (isset($_GET['Product'])) { $product->attributes = $_GET['Product']; } $purchasinggroup = new Purchasinggroup('searchwstatus'); $purchasinggroup->unsetAttributes(); // clear any default values if (isset($_GET['Purchasinggroup'])) { $purchasinggroup->attributes = $_GET['Purchasinggroup']; } $currency = new Currency('searchwstatus'); $currency->unsetAttributes(); // clear any default values if (isset($_GET['Currency'])) { $currency->attributes = $_GET['Currency']; } $model = new Purchinforec('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Purchinforec'])) { $model->attributes = $_GET['Purchinforec']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'supplier' => $supplier, 'product' => $product, 'purchasinggroup' => $purchasinggroup, 'currency' => $currency)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $subdistrict = new Subdistrict('searchwstatus'); $subdistrict->unsetAttributes(); // clear any default values if (isset($_GET['Subdistrict'])) { $subdistrict->attributes = $_GET['Subdistrict']; } $model = new Kelurahan('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Kelurahan'])) { $model->attributes = $_GET['Kelurahan']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'subdistrict' => $subdistrict)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $parentmatgroup = new Materialgroup('searchwstatus'); $parentmatgroup->unsetAttributes(); // clear any default values if (isset($_GET['Parentmatgroup'])) { $parentmatgroup->attributes = $_GET['Parentmatgroup']; } $materialtype = new Materialtype('searchwstatus'); $materialtype->unsetAttributes(); // clear any default values if (isset($_GET['Materialtype'])) { $materialtype->attributes = $_GET['Materialtype']; } $model = new Materialgroup('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Materialgroup'])) { $model->attributes = $_GET['Materialgroup']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'parentmatgroup' => $parentmatgroup, 'materialtype' => $materialtype)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Account('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Account'])) { $model->attributes = $_GET['Account']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'parentaccount' => $this->parentaccount, 'currency' => $this->currency, 'accounttype' => $this->accounttype)); }
<?php /** * Initialization of controller, calling methods of controller depending on user's actions; * Including all needed files; */ include $_SERVER['DOCUMENT_ROOT'] . '/Model/Model.php'; include $_SERVER['DOCUMENT_ROOT'] . '/Model/QueryModel.php'; include $_SERVER['DOCUMENT_ROOT'] . '/Controller/Controller.php'; $controller = new Controller(); if ($file == 'index.php') { if (is_null($_REQUEST['name'])) { $controller->actionIndex(); } } if (isset($_REQUEST['name'])) { $controller->actionCreateOrder($_REQUEST); } if ($file == 'Order_list.php') { $controller->actionListOrders(); } if ($file == 'User_orders.php') { $controller->actionListUser($_REQUEST['user']); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Jobs('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Jobs'])) { $model->attributes = $_GET['Jobs']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'orgstructure' => $this->orgstructure, 'position' => $this->position)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Product('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Product'])) { $model->attributes = $_GET['Product']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'productacc' => $this->productacc, 'productbasic' => $this->productbasic, 'productconversion' => $this->productconversion, 'productplant' => $this->productplant, 'productpurchase' => $this->productpurchase)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Insurance('searchwstatus'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Insurance'])) { $model->attributes = $_GET['Insurance']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'insuranceaddress' => $this->insuranceaddress, 'insurancecontact' => $this->insurancecontact, 'accpiutang' => $this->accpiutang)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Giheader('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Giheader'])) { $model->attributes = $_GET['Giheader']; } if (isset($_GET['Gidetail'])) { $this->gidetail = new Gidetail('searchbygiheaderid'); $this->gidetail->unsetAttributes(); // clear any default values if (isset($_GET['Gidetail'])) { $this->gidetail->attributes = $_GET['Gidetail']; } } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'gidetail' => $this->gidetail)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $this->lookupdata(); $model = new Productdetail('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Productdetail'])) { $model->attributes = $_GET['Productdetail']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'product' => $this->product, 'currency' => $this->currency, 'unitofmeasure' => $this->unitofmeasure, 'sloc' => $this->sloc, 'materialstatus' => $this->materialstatus)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $purchasingorg = new Purchasingorg('search'); $purchasingorg->unsetAttributes(); // clear any default values if (isset($_GET['Purchasingorg'])) { $purchasingorg->attributes = $_GET['Purchasingorg']; } $paymentmethod = new Paymentmethod('search'); $paymentmethod->unsetAttributes(); // clear any default values if (isset($_GET['Paymentmethod'])) { $paymentmethod->attributes = $_GET['Paymentmethod']; } $purchasinggroup = new Purchasinggroup('search'); $purchasinggroup->unsetAttributes(); // clear any default values if (isset($_GET['Purchasinggroup'])) { $purchasinggroup->attributes = $_GET['Purchasinggroup']; } $supplier = new Supplier('search'); $supplier->unsetAttributes(); // clear any default values if (isset($_GET['Supplier'])) { $supplier->attributes = $_GET['Supplier']; } $podetail = new Podetail('search'); $podetail->unsetAttributes(); // clear any default values if (isset($_GET['Podetail'])) { $podetail->attributes = $_GET['Podetail']; } $product = new Prmaterial('search'); $product->unsetAttributes(); // clear any default values if (isset($_GET['Prmaterial'])) { $product->attributes = $_GET['Prmaterial']; } $unitofmeasure = new Unitofmeasure('search'); $unitofmeasure->unsetAttributes(); // clear any default values if (isset($_GET['Unitofmeasure'])) { $unitofmeasure->attributes = $_GET['Unitofmeasure']; } $currency = new Currency('search'); $currency->unsetAttributes(); // clear any default values if (isset($_GET['Currency'])) { $currency->attributes = $_GET['Currency']; } $sloc = new Sloc('search'); $sloc->unsetAttributes(); // clear any default values if (isset($_GET['Sloc'])) { $sloc->attributes = $_GET['Sloc']; } $tax = new Tax('search'); $tax->unsetAttributes(); // clear any default values if (isset($_GET['Tax'])) { $tax->attributes = $_GET['Tax']; } $model = new Poheader('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Poheader'])) { $model->attributes = $_GET['Poheader']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'purchasingorg' => $purchasingorg, 'purchasinggroup' => $purchasinggroup, 'paymentmethod' => $paymentmethod, 'supplier' => $supplier, 'podetail' => $podetail, 'product' => $product, 'unitofmeasure' => $unitofmeasure, 'currency' => $currency, 'sloc' => $sloc, 'tax' => $tax, 'podetail' => $podetail)); }
/** * Lists all models. */ public function actionIndex() { parent::actionIndex(); $snro = new Snro('searchwstatus'); $snro->unsetAttributes(); // clear any default values if (isset($_GET['Snro'])) { $snro->attributes = $_GET['Snro']; } $model = new Permitexit('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Permitexit'])) { $model->attributes = $_GET['Permitexit']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('index', array('model' => $model, 'snro' => $snro)); }