/** * Add to credit amount for this account * Will update parent account if required * * @param Currency $amount * @return $this */ public function credit(Currency $amount) { $this->acCr->set($this->acCr->get() + $amount()); Match::on($this->optGetParentId())->Monad_Option_Some(function ($parentId) use($amount) { $this->chart->getAccount($parentId->value())->credit($amount); }); return $this; }
public function testYouCanGetTheCurrencyValueAsAnIntegerValueRaisedToThePowerOfThePrecision() { $this->assertEquals(120026, $this->sut->get()); }