Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| TblIncentiveInstalacionMargins | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | |
| 7 | /** |
| 8 | * FIRE-956 Phase 3: per-quotation Margen Comercial (M.C. %) for accepted |
| 9 | * installations. Finanzas writes one row per quotation; IncentivesController |
| 10 | * reads it to pick the tramo (A / B / C / D) when paying Comisión Inst. |
| 11 | * |
| 12 | * Value is stored as a fraction (0.4250 = 42.5 %) to match the unit used |
| 13 | * by the existing tramo parameters in tbl_incentive_plan_parameters. |
| 14 | */ |
| 15 | class TblIncentiveInstalacionMargins extends Model |
| 16 | { |
| 17 | protected $table = 'tbl_incentive_instalacion_margins'; |
| 18 | |
| 19 | protected $fillable = [ |
| 20 | 'quotation_id', |
| 21 | 'margin_pct', |
| 22 | 'entered_by', |
| 23 | 'entered_at', |
| 24 | ]; |
| 25 | |
| 26 | protected $casts = [ |
| 27 | 'quotation_id' => 'integer', |
| 28 | 'margin_pct' => 'decimal:4', |
| 29 | 'entered_at' => 'datetime', |
| 30 | ]; |
| 31 | } |