Beispiel #1
0
 /**
  * @param       $name
  * @param null  $value
  * @param array $options
  *
  * @return string
  */
 public function balance($name, $value = null, array $options = [])
 {
     $label = $this->label($name, $options);
     $options = $this->expandOptionArray($name, $label, $options);
     $classes = $this->getHolderClasses($name);
     $value = $this->fillFieldValue($name, $value);
     $options['step'] = 'any';
     $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency();
     $currencies = Amt::getAllCurrencies();
     unset($options['currency']);
     unset($options['placeholder']);
     $html = view('form.balance', compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
     return $html;
 }
Beispiel #2
0
 /**
  * @covers FireflyIII\Support\Amount::getAllCurrencies
  */
 public function testGetAllCurrencies()
 {
     $size = TransactionCurrency::count();
     $list = $this->object->getAllCurrencies();
     $this->assertCount($size, $list);
 }