public function getCurrentMonthPeriod($organizationId = null)
  {
    if(empty($organizationId))
    {
      $organizationId = $this->AuthenticationManager->getCurrentUserOrganization('id');
    }

    $fiscalYearId = $this->FiscalYear->lastFiscalYearByOrganization($organizationId);

    $Date = new Carbon('first day of this month');
    $Date2 = new Carbon('last day of this month');

    return $this->Period->periodByStardDateByEndDateByFiscalYearAndByOrganizationId($Date->format('Y-m-d'), $Date2->format('Y-m-d'), $fiscalYearId, $organizationId);
  }
public function getCurrentMonthPeriod($organizationId = null)
  {
    if(empty($organizationId))
    {
      $organizationId = $this->AuthenticationManager->getCurrentUserOrganization('id');
    }

    $fiscalYearId = $this->FiscalYear->lastFiscalYearByOrganization($organizationId);

    $Date = new Carbon('first day of this month');
    $Date2 = new Carbon('last day of this month');

    return $this->Period->periodByStardDateByEndDateByFiscalYearAndByOrganizationId($Date->format('Y-m-d'), $Date2->format('Y-m-d'), $fiscalYearId, $organizationId);
  }
public function getCurrentMonthPeriod ( $ organizationId = null ) { if ( empty ( $ organizationId ) ) { $ organizationId = $ this -> AuthenticationManager -> getCurrentUserOrganization ( 'id' ) ; } $ fiscalYearId = $ this -> FiscalYear -> lastFiscalYearByOrganization ( $ organizationId ) ; $ Date = new Carbon ( 'first day of this month' ) ; $ Date2 = new Carbon ( 'last day of this month' ) ; return $ this -> Period -> periodByStardDateByEndDateByFiscalYearAndByOrganizationId ( $ Date -> format ( 'Y-m-d' ) , $ Date2 -> format ( 'Y-m-d' ) , $ fiscalYearId , $ organizationId ) ; }
Get current month period

@return Mgallegos\DecimaAccounting\Period
Get current month period