| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 10 | class AppliedDiscount extends DataObject |
||
| 11 | { |
||
| 12 | private static $table_name = 'AppliedDiscount'; |
||
|
|
|||
| 13 | |||
| 14 | private static $db = [ |
||
| 15 | 'Title' => 'Varchar', |
||
| 16 | 'Code' => 'Varchar', |
||
| 17 | 'Value' => 'Currency' |
||
| 18 | ]; |
||
| 19 | |||
| 20 | private static $has_one = [ |
||
| 21 | 'Estimate' => Estimate::class |
||
| 22 | ]; |
||
| 23 | |||
| 24 | private static $many_many = [ |
||
| 25 | 'Items' => LineItem::class |
||
| 26 | ]; |
||
| 27 | |||
| 28 | private static $summary_fields = [ |
||
| 29 | 'Title', |
||
| 30 | 'Code', |
||
| 31 | 'Value' |
||
| 32 | ]; |
||
| 33 | |||
| 34 | public function appliedAmount(AppliedDiscount $item) |
||
| 37 | } |
||
| 38 | |||
| 39 | public function updateDiscount() |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getDiscount() |
||
| 55 |