1 | <?php |
||
21 | class TaxExtension extends AbstractExtension |
||
22 | { |
||
23 | /** |
||
24 | * @var TaxRuleRepository |
||
25 | */ |
||
26 | private $taxRuleRepository; |
||
27 | |||
28 | /** |
||
29 | * TaxExtension constructor. |
||
30 | * @param TaxRuleRepository $taxRuleRepository |
||
31 | */ |
||
32 | public function __construct(TaxRuleRepository $taxRuleRepository) |
||
36 | |||
37 | /** |
||
38 | * Returns a list of functions to add to the existing list. |
||
39 | * |
||
40 | * @return TwigFunction[] An array of functions |
||
41 | */ |
||
42 | public function getFunctions() |
||
48 | |||
49 | /** |
||
50 | * 明細が軽減税率対象かどうかを返す. |
||
51 | * |
||
52 | * 受注作成時点での標準税率と比較し, 異なれば軽減税率として判定する. |
||
53 | * |
||
54 | * @param OrderItem $OrderItem |
||
55 | * @return bool |
||
56 | */ |
||
57 | public function isReducedTaxRate(OrderItem $OrderItem) |
||
76 | } |
||
77 |