当前位置: 首页>>代码示例>>PHP>>正文


PHP Currency::Get方法代码示例

本文整理汇总了PHP中Currency::Get方法的典型用法代码示例。如果您正苦于以下问题:PHP Currency::Get方法的具体用法?PHP Currency::Get怎么用?PHP Currency::Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Currency的用法示例。


在下文中一共展示了Currency::Get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testBuyingProcess

 public function testBuyingProcess()
 {
     /*var sale = new Accountability.ConnectedAccountabilityType('SaleAgreement');
     		var seller = new Accountability.PartyType('Vendor');
     		var buyer = new Accountability.PartyType('Customer');
     		sale.addConnectionRule(buyer, seller);
     		var alex = new Accountability.Party("Alex Mbaka", buyer);
     	        var pablo = new Accountability.Party("Pablo Gift Shop", seller);
     		accountabilityInstances.push(Accountability.Accountability.create(alex, pablo, sale));*/
     /*$sale = new ConnectedAccountabilityType('SaleAgreement');*/
     //oR this which is a more specialized version that defines party and party type in one process
     $ii = StockInventory::GetItem(15);
     $ii2 = StockInventory::GetItem(25);
     //from view model
     $this->assertInstanceOf('StockAccount', $ii);
     $orderItem = OrderLine::Create(ShoppingSession::GetOrderId(), $ii->item->itemId, $ii->item->name, 2, $ii->taxcode, $ii->retail_price, $ii->cost_price, 0);
     $orderItem2 = OrderLine::Create(ShoppingSession::GetOrderId(), $ii2->item->itemId, $ii2->item->name, 1, $ii2->taxcode, $ii2->retail_price, $ii2->cost_price, 0);
     //$catalogObj = Catalog::GetCatalogItem('ID345625'); gets item category too
     //static variables initialized on init
     ShoppingSession::AddToTestCart($orderItem);
     //date and time
     ShoppingSession::AddToTestCart($orderItem2);
     //adds order item to the sale agreement particulars
     //reduce goods for sale temporarily
     #### WHEN THE USER POSTS SHOPPING DETAILS - i.e. customer, shopping order, and recepient of goods
     $sale = new SimpleSaleAccountability();
     $customer = new Customer(2, 'Alex Mbaka', '0727596626', 'alex@qet.co.ke', 'Suite 602, Marafique Arcade. Kenyatta Avenue', 'Thika, KIAMBU', 'Kenya');
     $vendor = Vendor::GetVendor();
     //Pablo Gift Shop
     //Opens New (Obligations account and) Income/Expenditure Account
     //Links to party account
     $sale->setBuyer($customer);
     // -- vendor is automatically set
     $sale->setSeller($vendor);
     $cart = ShoppingSession::CompleteSession();
     //for simple sales
     $sale->initialize($cart->order);
     //$sale->addOrder($cart->order); -- for more complex sales
     #DEFERRED ORDERING - ADD TO WISH LIST
     //$customer->addToWishList($sale->order);
     $customer->authorizeOrder($sale->order);
     //generates invoice by communicating with the transaction core
     //client object receives new Invoice
     $amount = new Money('35040.00', Currency::Get('KES'));
     //new Quantity('number', 'unit')
     //$signature = new Signature('Name/email','Password/Identification/SessionID');
     $payment = new PaypalPayment('Email', 'REFERENCES', $amount);
     //$payment = new Payment('Customer', 'STATIC Vendor', $amount, $paymentmethod);
     //$destination = new Location('Name of Building', 'Town', 'County', 'Country', 'Physical Address/Closest road and or stage', 'Area Code', 'Latitude', 'Longitude');
     //$paymentmethod->authorizePayment($payee, $amount);
     //verify name and identification/password is the same as that in client record/session
     //when singleton object is in use there is a status property thats either busy or ready
     //generate invoive then get it
     //$invoice = $sale->getInvoice();
     if ($sale->getInvoice()) {
         $receipt = $customer->makePayment($sale->invoice, $payment);
         $this->assertInstanceOf('Receipt', $receipt);
     }
     //move money to sales revenue account with timestamp to map values on graph
     //client receives receipt via observer mechanism i.e call on receivereceipt method on the client object that is configured to send emails on demand
     //assert balance history that the client has been billed and revenues have been received
     $this->assertInstanceOf('Accountability', $sale);
     //throw new Exception("That's not a server name!");
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:64,代码来源:LSOfficeDomainTest.php

示例2: __construct

 function __construct($id, $supplierId, $grns, $amount, $ledgerId, $mode, $voucherNo, $descr, $status)
 {
     $this->id = $id;
     $this->supplierId = $supplierId;
     $this->grns = $grns;
     $this->ledgerId = $ledgerId;
     $this->mode = $mode;
     $this->voucherNo = $voucherNo;
     //$this->payments = $payments;
     $this->status = $status;
     $txtype = new PurchasesPayment($ledgerId, $supplierId);
     parent::__construct(new Money(floatval($amount), Currency::Get('KES')), $descr, $txtype);
     $this->update();
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:14,代码来源:DomainSCM.php

示例3: __construct

 function __construct($entries, $amount, $description, $classifier)
 {
     //$this->status = $status;
     $this->txentries = $entries;
     $txtype = new DirectPosting($entries, $amount, $classifier);
     parent::__construct(new Money(floatval($amount), Currency::Get('KES')), $description, $txtype);
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:7,代码来源:DomainAccounting.php

示例4: __construct

 function __construct($id, $clientId, $projectId, $voucherNo, $amount, $ledgerId, $descr, $status)
 {
     $this->id = $id;
     $this->clientId = $clientId;
     $this->projectId = intval($projectId);
     $this->voucherNo = $voucherNo;
     $this->ledgerId = $ledgerId;
     $this->status = $status;
     $txtype = new SalesReceipt($ledgerId, $clientId);
     parent::__construct(new Money(floatval($amount), Currency::Get('KES')), $descr, $txtype);
     $this->update();
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:12,代码来源:DomainCRM.php

示例5: __construct

 function __construct($id, $partyId, $month, $amount, $type, $effect, $ledgerId, $descr, $txtype, $table)
 {
     $this->id = $id;
     $this->partyId = $partyId;
     $this->month = $month;
     $this->ledgerId = $ledgerId;
     $this->type = $type;
     $this->effect = $effect;
     parent::__construct(new Money(floatval($amount), Currency::Get('KES')), $descr, $txtype);
     $this->table = $table;
     $this->update();
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:12,代码来源:DomainHRM.php

示例6: testReceivePayment

 public function testReceivePayment()
 {
     $client = Client::GetClient(2);
     $projects = Project::GetAll($client->id);
     $project = $projects[0];
     $amount = new Money('10000.00', Currency::Get('KES'));
     //new Quantity('number', 'unit')
     //$signature = new Signature('Name/email','Password/Identification/SessionID');
     $payment = new Payment('X Collection Account', 'Voucher No', $amount);
     $category = $project->id;
     //or general invoiceing [code: 0]
     $descr = 'Lojack Charges';
     $balbf = $client->balance;
     $balbd = $balbf + floatval($amount->amount);
     $receipt = $client->makePayment($payment, $category, $descr);
     $this->assertTrue(floatval($client->balance) == floatval($balbd));
     $this->assertInstanceOf('Receipt', $receipt);
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:18,代码来源:OperationsTest.php


注:本文中的Currency::Get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。