Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 4 |
| AccountLine | |
0.00% |
0 / 1 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 4 |
| chartAccount | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| operation | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| company | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| serializeDate | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace Qmp\Laravel\Compta\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | |
| 7 | class AccountLine extends Model |
| 8 | { |
| 9 | protected $connection = 'comptability'; |
| 10 | |
| 11 | protected $table = 'account_lines'; |
| 12 | |
| 13 | /** |
| 14 | * Get the post that owns the comment. |
| 15 | */ |
| 16 | public function chartAccount() |
| 17 | { |
| 18 | return $this->belongsTo('Qmp\Laravel\Compta\Models\ChartAccount'); |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * Get the post that owns the comment. |
| 23 | */ |
| 24 | public function operation() |
| 25 | { |
| 26 | return $this->belongsTo('Qmp\Laravel\Compta\Models\Operation'); |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Get the post that owns the comment. |
| 31 | */ |
| 32 | public function company() |
| 33 | { |
| 34 | return $this->belongsTo('Qmp\Laravel\Compta\Models\Company'); |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Prepare a date for array / JSON serialization. |
| 39 | * |
| 40 | * @param \DateTimeInterface $date |
| 41 | * @return string |
| 42 | */ |
| 43 | protected function serializeDate(\DateTimeInterface $date) |
| 44 | { |
| 45 | return $date->format('Y-m-d H:i:s'); |
| 46 | } |
| 47 | |
| 48 | } |