コード例 #1
0
ファイル: testPriceRef.php プロジェクト: songwork/songwork
 function testMoneyForCodeCurrency()
 {
     $m = PriceRef::money_for_code_currency('a', 'EUR');
     $this->assertEquals('€0.70 EUR', $m->show_with_code());
     $m = PriceRef::money_for_code_currency('a', 'GBP');
     $this->assertEquals('£0.50 GBP', $m->show_with_code());
 }
コード例 #2
0
ファイル: Document.php プロジェクト: songwork/songwork
 function price_in($currency)
 {
     if (strval($this->me['pricecode']) == '') {
         return new Money(0, $currency);
     }
     return PriceRef::money_for_code_currency($this->me['pricecode'], $currency);
 }