Sales Schedule
Sales Force for schedule sales, (*1)
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)
Once the extension is installed, simply use it in your code by :, (*6)
<?= \ptrnov\yii2-salesforce\Jadwal::listWeekOfYear() ?>
Use \ptrnov\yii2-salesforce\Jadwal;, (*7)
$ary1=Jadwal::listWeekOfYear(); //current year print_r($ary1);, (*8)
$ary2=Jadwal::listWeekOfYear('2016'); //set manual print_r($ary2);, (*9)
$tgl=getDateOfWeekAndDayname($year,$week,$day)
echo $tgl;, (*10)
//$tgl= Jadwal::getDateOfWeekAndDayname('2016','34','1'); //$tgl= Jadwal::getDateOfWeekAndDayname('2016',null,'1'); $tgl= Jadwal::getDateOfWeekAndDayname('2016','34',null);, (*11)
$arry=listWeekOfYearLayer($year,$layer,$even,$weekActive,$dayInt), (*12)
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 ?>
$ary= Jadwal::getArrayDateCust('2016','C','1','1','scdlGrp','cust.001','66');, (*13)