Alt+D+P
choose `multiple consolidation ranges`
choose `I will create the page fields`
range : drag and drop from the table, click add
choose `new worksheet`
data > text to column to split ;
Alt+D+P
choose `multiple consolidation ranges`
choose `I will create the page fields`
range : drag and drop from the table, click add
choose `new worksheet`
data > text to column to split ;
start service failure, Go to event viewer
In this case, the login to database fail, go to services > properties and change the user login.
Installation
1. Download
2. point URL to the extract place
3. follow the instruction
– change /app/config/core.php
Configure::write('Security.salt', 'inputwhatever'); Configure::write('Security.cipherSeed', 'caninputonlynumber');
– change /app/config/database.php
public $default = array( 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'yourloginhere', 'password' => 'yourpasswordhere', 'database' => 'yourdatabasehere', 'prefix' => '', //'encoding' => 'utf8', );
NOTE : datasource is ‘Database/Mysql’, otherwise get error ‘Cake php Datasource class MySQL could not be found'( ref )
Hello world ( example adapt from here )
1) create fle cakephp/app/controllers/HelloworldController.php
<?php class HelloWorldController extends Controller { public $name = 'HelloWorld'; //Controller name, we need it. public $uses=null; //The example doesn't "use" any model. // public $autoRender=false; //Do not render template "automatically" public function index() {//The default action for a CakePHP controller // echo __METHOD__;//This will print HelloWorld suffixed with some more info 😉 $this->set('message','Hello World'); // set template variable } } ?>
create file /cakephp/app/view/HelloWorld/index.ctp
<?php echo $message ?>
2) Point URL to http://localhost/cakephp-cakephp-7253405/helloworld
Model Example
Table convention ( from here )
– การสร้าง table และ field ใน database ต้องเป็นไปตามข้อกำหนดของ CakePHP
– table ใน database ต้องเป็นตัวเล็กและเป็นพหูพจน์ คือมี s เติมข้างหลัง เช่น books,categories,articles เป็นต้น
– ถ้ามี 2 คำขึ้นไปให้ใช้เครื่องหมาย _ ในการแยกคำ เช่น user_photos,author_name เป็นต้น
– ใน table ควรจะมี field ชื่อ id ที่เป็น primary key
Model convention
– การตั้งชื่อ filename จะสัมพันธ์กับการตั้งชื่อ database table แต่เป็นเอกพจน์ เช่น database table ชื่อ user_photos การตั้งชื่อของ filename ของ Model คือ user_photo.php
– การตั้งชื่อ class จะใช้อักษรตัวใหญ่ในการแยกคำ และเป็นเอกพจน์ เช่น UserPhoto
Example : table
CREATE TABLE `data_access`.`books` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `isbn` VARCHAR( 10 ) NOT NULL , `title` VARCHAR( 127 ) NOT NULL , `description` TEXT NOT NULL , `author_name` VARCHAR( 127 ) NOT NULL )
#/app/models/book.php
<?php class Book extends AppModel{ var $name ='Book'; } ?>
#/app/controllers/books_controller.php
<?php class BooksController extends AppController{ var $name ='Books'; var $uses =array('Book'); //ประการชื่อ model function index(){ $books = $this->Book->find('all',array('fields',array('Book.isbn','Book.title','Book.author_name'),'order'=>'Book.title ASC')); //ใช้ object medel ในการดึงข้อมูล $this->set('books',$books); //ส่งข้อมูลออกไปให้ view } } ?>
/app/views/books/index.ctp
<table> <thead> <th>ISBN</th><th>TITLE</th><th>Author</th> </thead> <?php foreach($books as $book): ?> <tr> <td><?php echo $book['Book']['isbn'] ?></td> <td><?php echo $book['Book']['title'] ?></td> <td><?php echo $book['Book']['author_name'] ?></td> </tr> <?php endforeach; ?> </table>
Access Control List(ACL)
AROs(Access Request Objects) ผู้ใช้ แบ่งเป็นระดับย่อยๆได้หลายระดับ
ACOs(Access Control Objects) ทรัพยากรต่างๆของระบบ แบ่งเป็นระดับย่อยได้เช่นกัน
static dir
app/webroot/img, app/webroot/css, app/webroot/js
choose theme
var $view="Theme"; var $theme="ThemeNameNaja";
path will be changed
/app/views/themed/ThemeNameNaja/books /app/webroot/themed/ThemeNameNaja/img /app/webroot/themed/ThemeNameNaja/css /app/webroot/themed/ThemeNameNaja/js
Server unable to read htaccess file, denying access to be safe
Sometimes it is because of the permission to the .htaccess file, change permission to 755 or 775
ref : servervault
In AOT,
— Security
—- Privileges
—— PrivilegeA ( 1. Right-click. New Privilege )
——– Entry Points
———- PongVetCustPetTable ( TOcreate : drag from Menu items > Display > PongVetCustPetTable )
———- Property
———- AccessLevel : Read
Setup in Privilege
ref : http://poojakarki1989.blogspot.com/2014/01/form-security-in-ax-2012.html
Task Manager > Files > New Task(Run)
rdpclip
adding number sequnce reference
Generate > choose only the reference we want
i.e. Purchase requisitions
ref : http://axtechhouse.wordpress.com/2011/07/26/number-sequence-scope-segments-in-ax-2012/
Stack trace: Field 'IsConsolidationCompany' in table 'CompanyInfo' has not been explicitly selected.
go to db edit dbo.dirpartytable.isConsolidateCompany from null to 0
ref : http://axmas.blogspot.in/2013/12/untick-consolidate-legal-entities.html
One or more accounting distributions is missing a ledger account. Use the Accounting distribution form or the Posting profile to update the ledger account.
Solution :
Setup Inventory & warehouse management > Setup > Posting > Posting
– Purchase expenditure for expense
for that item group
ref : http://vsdynamicsfinance.wordpress.com/2013/08/01/one-or-more-accounting-distribution-is-missing-a-ledger-account/