PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.3.4
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.3.4
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
easy-invoice / includes / Helpers / QuoteFormatter.php

QuoteFormatter.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.3.4, at includes/Helpers/QuoteFormatter.php

46 lines 817 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Quote Formatter Helper Class
4 *
5 * @package Easy_Invoice
6 * @subpackage Helpers
7 */
8
9 namespace EasyInvoice\Helpers;
10
11 use EasyInvoice\Traits\CurrencyTrait;
12
13 /**
14 * Quote Formatter Class
15 *
16 * Handles formatting of quote values
17 */
18 class QuoteFormatter {
19 use CurrencyTrait;
20
21 /**
22 * The quote object
23 *
24 * @var mixed
25 */
26 private $quote;
27
28 /**
29 * Constructor
30 *
31 * @param mixed $quote The quote object
32 */
33 public function __construct($quote = null) {
34 $this->quote = $quote;
35 }
36
37 /**
38 * Format a currency amount
39 *
40 * @param float $amount The amount to format
41 * @return string The formatted amount
42 */
43 public function format($amount) {
44 return $this->formatCurrency($amount, $this->quote);
45 }
46 }