Rabu, 23 Agustus 2017

PHP : Penambahan Tanggal dengan php

<?php $tgl1 = "2013-01-23";// pendefinisian tanggal awal $tgl2 = date('Y-m-d', strtotime('+6 days', strtotime($tgl1))); //operasi penjumlahan tanggal sebanyak 6 hari echo $tgl2; //print tanggal ?>


atau

date('Y-m-d', strtotime('+6 month', strtotime( variabel_tgl_awal )))
date('Y-m-d', strtotime('+6 year', strtotime( variabel_tgl_awal )))

Kamis, 17 Agustus 2017

PHP : Clear cache input text dan Form

<input type="text" autocomplete="off"/>
Should work. Alternatively, use:
<form autocomplete="off">

Selasa, 08 Agustus 2017

Excel : Picture Lookup Excel ( https://trumpexcel.com/ )

There are many Excel functions (such as VLOOKUP, LOOKUP, INDEX/MATCH) that can go and fetch a value from a list. Imagine doing the same, but instead of fetching a value, you can fetch a picture.
In this tutorial, I will show you how to do a picture lookup in Excel.
It’s simple yet make you look like an Excel Magician (all you need is this blog and sleight of hands on your keyboard).

Picture Lookup in Excel

I have a list of the 20 teams in English Premier league (ranking based on scores as of Nov 20, 2013) along with the club logo in the adjacent cell.
The intent is to select a club and the picture should change to display its logo.
Something as shown below:

Jumat, 04 Agustus 2017

AX : Insert CSV Write IO dengan Container AX 2012

{ 
    container c; 
    CommaIo myfile; 
    FileIoPermission perm; 
  
    #define.ExampleFile(@"c:\myfile.txt") 
    #define.ExampleOpenMode("w") 
  
    // Set code access permission to help protect the use 
    // of CommaIO.new 
    perm = new FileIoPermission(#ExampleFile, #ExampleOpenMode); 
    perm.assert(); 
  
    myfile = new CommaIo(#ExampleFile, #ExampleOpenMode); 
  
    // Assign the entries in the container according to record layout. 
    c = [1,"MyText",1.324,"Last field"]; 
    // Write this record according to file format  
    // (record/field delimiters). 
    myfile.writeExp(c); 
     
    // Close the code access permission. 
    CodeAccessPermission::revertAssert(); 
}

Senin, 31 Juli 2017

AX : Windows Save Dialog AX 2012

static void windowsSaveFileDialog(Args _args)
{
str         filePath;
container     conFilter = ["TXT","*.txt"];

filePath = Winapi::getSaveFileName(
0,
conFilter,
"",
"Save As",
".resx",
"Untitled");

Box::info(filePath);
}

Senin, 17 Juli 2017

AX : Membuat journal names baru di AX

cara membuat journal names =

system administration - user group = buat group baru misal balung
daftarkan user user yang masuk ke grup itu

setelah itu masuk ke general ledger - journals - journal names

nanti supaya terhubung ma group yang dibuat dimasukan ke blocking - private for user group