Esempio n. 1
0
 function it_can_be_registered()
 {
     $rate = VatRate::register('High', 21);
     \PHPUnit_Framework_Assert::assertEquals('High', $rate->description);
     \PHPUnit_Framework_Assert::assertEquals(21, $rate->rate);
 }
 /**
  * Execute the command.
  *
  * @param VatRateRepository $vat_rates
  * @return VatRate
  */
 public function handle(VatRateRepository $vat_rates)
 {
     $vat_rate = VatRate::register($this->description, $this->rate);
     $vat_rates->save($vat_rate);
     return $vat_rate;
 }
Esempio n. 3
0
 /**
  * Returns a collection with all VAT rates.
  *
  * @return Collection
  */
 public function all()
 {
     return VatRate::orderBy('description')->get();
 }