예제 #1
0
파일: Usage.php 프로젝트: Monori/imgservice
 public function __construct()
 {
     parent::__construct();
     $this->startDate = $this->input('start_date', date('01-m-Y', strtotime('-1 month')));
     $this->endDate = $this->input('end_date', date('t-m-Y', strtotime('-1 month')));
     $this->currency = ModelSettings::getInstance()->getCurrency();
     $this->organisations = ModelOrganisation::get();
 }
예제 #2
0
 public function __construct()
 {
     parent::__construct();
     $this->settings = ModelSettings::getInstance();
     $this->startDate = $this->input('start_date', date('01-m-Y', strtotime('-1 month')));
     $this->endDate = $this->input('end_date', date('t-m-Y', strtotime('-1 month')));
     $this->payments = ModelPayment::getByPeriod($this->startDate, $this->endDate);
 }
예제 #3
0
 public function __construct($organisationId)
 {
     parent::__construct();
     $this->organisation = ModelOrganisation::getById($organisationId);
     if (!$this->organisation->hasRow()) {
         $this->setError(lang('Organisation not found'));
         redirect(url('admin.payment'));
     }
     $this->startDate = $this->input('start_date', date('Y-m-01', strtotime('-1 month')));
     $this->endDate = $this->input('end_date', date('Y-m-t', strtotime('-1 month')));
     $this->settings = ModelSettings::getInstance();
     $this->payments = ModelPayment::getByOrganisationPeriod($this->organisation->id, $this->startDate, $this->endDate);
     $this->chargeCustomer();
     $this->markPayed();
 }