2017 © Pedro Peláez
 

yii2-extension yii2-salesforce

Sales Schedule

image

ptrnov/yii2-salesforce

Sales Schedule

  • Thursday, August 4, 2016
  • by ptrnov
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Sales Schedule for Yii 2

Sales Force for schedule sales, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist ptrnov/yii2-salesforce "*"

or add, (*4)

"ptrnov/yii2-salesforce": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

<?= \ptrnov\yii2-salesforce\Jadwal::listWeekOfYear() ?>

Use \ptrnov\yii2-salesforce\Jadwal;, (*7)

INFORMATION WEEK OF YEAR

$ary1=Jadwal::listWeekOfYear(); //current year print_r($ary1);, (*8)

$ary2=Jadwal::listWeekOfYear('2016'); //set manual print_r($ary2);, (*9)

GET DATE FROM YEAR,WEEK AND DAY

$tgl=getDateOfWeekAndDayname($year,$week,$day)
echo $tgl;, (*10)

Example

//$tgl= Jadwal::getDateOfWeekAndDayname('2016','34','1'); //$tgl= Jadwal::getDateOfWeekAndDayname('2016',null,'1'); $tgl= Jadwal::getDateOfWeekAndDayname('2016','34',null);, (*11)

listWeekOfYear AND Layer (A,B,C,D)

A=every week (not interlude)

B=2week of month (interlude=1week) -> default set

C=2week of month (interlude=2week)

D=1week of month (interlude=3week)

$arry=listWeekOfYearLayer($year,$layer,$even,$weekActive,$dayInt), (*12)

Example

B (default) -odd/ganjil 
    //$ary= Jadwal::listWeekOfYearLayer('2016','B','1');    
    //$ary= Jadwal::listWeekOfYearLayer('2016','B','1',null,'1');       
    $ary= Jadwal::listWeekOfYearLayer('2016','B','1','1','1');      
    print_r(ary);

B (default) -even/genap
    //$ary= Jadwal::listWeekOfYearLayer('2016','B','2');        
    //$ary= Jadwal::listWeekOfYearLayer('2016','B','2',null,'1');       
    $ary= Jadwal::listWeekOfYearLayer('2016','B','2','1','1');      
    print_r(ary);

A   odd/ganjil  
        //$ary= Jadwal::listWeekOfYearLayer('2016','A','1');        
        //$ary= Jadwal::listWeekOfYearLayer('2016','A','1',null,'1');       
        $ary= Jadwal::listWeekOfYearLayer('2016','A','1','1','1');  
        print_r(ary);

A   even/genap
        //$ary= Jadwal::listWeekOfYearLayer('2016','A','2');
        //$ary= Jadwal::listWeekOfYearLayer('2016','A','2',null,'1');       
        $ary= Jadwal::listWeekOfYearLayer('2016','A','2','1','1');  
        print_r(ary);

C   odd/ganjil  
        //$ary= Jadwal::listWeekOfYearLayer('2016','C','1');        
        //$ary= Jadwal::listWeekOfYearLayer('2016','C','1',null,'1');       
        $ary= Jadwal::listWeekOfYearLayer('2016','C','1','1','1');  
        print_r(ary);

C   even/genap
        //$ary= Jadwal::listWeekOfYearLayer('2016','C','2');
        //$ary= Jadwal::listWeekOfYearLayer('2016','C','2',null,'1');       
        $ary= Jadwal::listWeekOfYearLayer('2016','C','2','1','1');  
        print_r(ary);

D   odd/ganjil  
        //$ary= Jadwal::listWeekOfYearLayer('2016','D','1');        
        //$ary= Jadwal::listWeekOfYearLayer('2016','D','1',null,'1');       
        $ary= Jadwal::listWeekOfYearLayer('2016','D','1','1','1');  
        print_r(ary);

D   even/genap
        //$ary= Jadwal::listWeekOfYearLayer('2016','D','2');
        //$ary= Jadwal::listWeekOfYearLayer('2016','D','2',null,'1');       
        $ary= Jadwal::listWeekOfYearLayer('2016','D','2','1','1');  
        print_r(ary);           

Copy to Controller

Use \ptrnov\yii2-salesforce\Jadwal;
public function actionTest()
{
        $ary= Jadwal::listWeekOfYearLayer('2016','A','1');
        //print_r(Jadwal::listWeekOfYearLayer('2016','A','1'));
        return $this->render('_test',[
            'dataArray'=>$ary
        ]);
 }      

create file _test.php then write
    <?php 
        print_r(dataArray);
        //ready to foreach
    ?>

NEW Function

getArrayDateCust($year,$layer,$oddeven,$dayInt,$scdlGrp,$custId,$useId)

$ary= Jadwal::getArrayDateCust('2016','C','1','1','scdlGrp','cust.001','66');, (*13)

The Versions

04/08 2016

dev-master

9999999-dev

Sales Schedule

  Sources   Download

BSD-3-Clause

by Piter Novian

extension yii2 schedule salesforce sales ptr nov

04/08 2016

1.2.0

1.2.0.0

Sales Schedule

  Sources   Download

BSD-3-Clause

by Piter Novian

extension yii2 schedule salesforce sales ptr nov

03/08 2016

1.1.3

1.1.3.0

Sales Schedule

  Sources   Download

BSD-3-Clause

by Piter Novian

extension yii2 schedule salesforce sales ptr nov

03/08 2016

1.1.2

1.1.2.0

Sales Schedule

  Sources   Download

BSD-3-Clause

by Piter Novian

extension yii2 schedule salesforce sales ptr nov

03/08 2016

1.0.1

1.0.1.0

Sales Schedule

  Sources   Download

BSD-3-Clause

by Piter Novian

extension yii2 schedule salesforce sales ptr nov

03/08 2016

1.0.0

1.0.0.0

Sales Schedule

  Sources   Download

BSD-3-Clause

by Piter Novian

extension yii2 schedule salesforce sales ptr nov