@@ -12,9 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | use hipanel\actions\IndexAction; |
| 14 | 14 | use hipanel\actions\RedirectAction; |
| 15 | -use hipanel\actions\SmartCreateAction; |
|
| 16 | 15 | use hipanel\actions\SmartDeleteAction; |
| 17 | -use hipanel\actions\SmartPerformAction; |
|
| 18 | 16 | use hipanel\actions\SmartUpdateAction; |
| 19 | 17 | use hipanel\actions\ValidateFormAction; |
| 20 | 18 | use hipanel\actions\ViewAction; |
@@ -23,16 +21,11 @@ discard block |
||
| 23 | 21 | use hipanel\modules\finance\forms\BillImportForm; |
| 24 | 22 | use hipanel\modules\finance\forms\CurrencyExchangeForm; |
| 25 | 23 | use hipanel\modules\finance\models\Bill; |
| 26 | -use hipanel\modules\finance\models\BillSearch; |
|
| 27 | -use hipanel\modules\finance\models\Charge; |
|
| 28 | -use hipanel\modules\finance\models\ChargeSearch; |
|
| 29 | 24 | use hipanel\modules\finance\models\ExchangeRate; |
| 30 | 25 | use hipanel\modules\finance\providers\BillTypesProvider; |
| 31 | -use hiqdev\hiart\ActiveDataProvider; |
|
| 32 | 26 | use Yii; |
| 33 | 27 | use yii\base\Event; |
| 34 | 28 | use yii\base\Module; |
| 35 | -use yii\data\ArrayDataProvider; |
|
| 36 | 29 | use yii\filters\AccessControl; |
| 37 | 30 | |
| 38 | 31 | class BillController extends \hipanel\base\CrudController |
@@ -68,6 +68,9 @@ |
||
| 68 | 68 | return $this->generateDocument('generate-document', compact('id', 'type')); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @param string $action |
|
| 73 | + */ |
|
| 71 | 74 | public function generateDocument($action, $params) |
| 72 | 75 | { |
| 73 | 76 | try { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use hipanel\modules\finance\behaviors\BillQuantity; |
| 6 | 6 | use hipanel\modules\finance\logic\bill\BillQuantityFactory; |
| 7 | -use hipanel\modules\finance\logic\bill\BillQuantityInterface; |
|
| 8 | 7 | use hipanel\modules\finance\models\Bill; |
| 9 | 8 | use hipanel\modules\finance\models\Charge; |
| 10 | 9 | use hipanel\modules\finance\validation\BillChargesSumValidator; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * @param $type |
| 25 | - * @param $model |
|
| 25 | + * @param \yii\base\Component $model |
|
| 26 | 26 | * @return Object|null |
| 27 | 27 | */ |
| 28 | 28 | public function createByType(string $type, $model) |
@@ -41,7 +41,6 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | - * @param string $type Tariff type |
|
| 45 | 44 | * @return string |
| 46 | 45 | */ |
| 47 | 46 | protected function buildClassName() |
@@ -49,6 +48,9 @@ discard block |
||
| 49 | 48 | return 'hipanel\modules\finance\logic\bill\\' . $this->types[$this->type]; |
| 50 | 49 | } |
| 51 | 50 | |
| 51 | + /** |
|
| 52 | + * @param string $type |
|
| 53 | + */ |
|
| 52 | 54 | protected function fixType($type) |
| 53 | 55 | { |
| 54 | 56 | if (strpos($type, ',') !== false) { |