=== alerts === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL user_id | bigint unsigned | NULL type | enum('missed_revenue','late_report','low_margin','kpi_threshold','contract_expiry','task_overdue','other') | NOT NULL message | text | NOT NULL is_read | tinyint(1) | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === bp_collection_terms === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL service_item_id | bigint unsigned | NOT NULL term_type | varchar(30) | NOT NULL DEFAULT 'cash' advance_pct | decimal(5,2) | NOT NULL DEFAULT '0.00' custom_splits | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === bp_expense_results === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL month_index | smallint unsigned | NOT NULL total_fixed | decimal(12,2) | NOT NULL DEFAULT '0.00' total_percentage | decimal(12,2) | NOT NULL DEFAULT '0.00' total_one_time | decimal(12,2) | NOT NULL DEFAULT '0.00' total_per_emp | decimal(12,2) | NOT NULL DEFAULT '0.00' total_bonus | decimal(12,2) | NOT NULL DEFAULT '0.00' grand_total | decimal(12,2) | NOT NULL DEFAULT '0.00' row_breakdown | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === bp_expense_rows === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL expense_category_id | bigint unsigned | NOT NULL expense_item_id | bigint unsigned | NULL tab_type | varchar(30) | NOT NULL amount | decimal(15,2) | NOT NULL DEFAULT '0.00' start_month | varchar(7) | NULL end_month | varchar(7) | NULL pct_basis | varchar(30) | NULL percentage | decimal(5,2) | NOT NULL DEFAULT '0.00' service_category_id | bigint unsigned | NULL service_item_id | bigint unsigned | NULL applied_department_ids | json | NULL applied_title_ids | json | NULL annual_increase_pct | decimal(5,2) | NOT NULL DEFAULT '0.00' payment_policy | json | NULL bonus_payment_config | json | NULL row_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === bp_fixed_asset_calculations === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL asset_row_id | bigint unsigned | NOT NULL dep_m1 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m1 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m1 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m1 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m2 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m2 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m2 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m2 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m3 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m3 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m3 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m3 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m4 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m4 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m4 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m4 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m5 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m5 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m5 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m5 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m6 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m6 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m6 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m6 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m7 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m7 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m7 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m7 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m8 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m8 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m8 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m8 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m9 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m9 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m9 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m9 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m10 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m10 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m10 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m10 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m11 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m11 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m11 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m11 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m12 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m12 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m12 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m12 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m13 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m13 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m13 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m13 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m14 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m14 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m14 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m14 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m15 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m15 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m15 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m15 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m16 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m16 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m16 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m16 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m17 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m17 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m17 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m17 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m18 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m18 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m18 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m18 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m19 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m19 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m19 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m19 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m20 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m20 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m20 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m20 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m21 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m21 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m21 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m21 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m22 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m22 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m22 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m22 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m23 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m23 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m23 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m23 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m24 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m24 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m24 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m24 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m25 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m25 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m25 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m25 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m26 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m26 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m26 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m26 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m27 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m27 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m27 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m27 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m28 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m28 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m28 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m28 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m29 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m29 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m29 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m29 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m30 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m30 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m30 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m30 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m31 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m31 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m31 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m31 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m32 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m32 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m32 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m32 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m33 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m33 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m33 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m33 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m34 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m34 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m34 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m34 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m35 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m35 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m35 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m35 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m36 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m36 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m36 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m36 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m37 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m37 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m37 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m37 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m38 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m38 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m38 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m38 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m39 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m39 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m39 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m39 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m40 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m40 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m40 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m40 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m41 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m41 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m41 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m41 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m42 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m42 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m42 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m42 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m43 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m43 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m43 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m43 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m44 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m44 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m44 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m44 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m45 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m45 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m45 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m45 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m46 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m46 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m46 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m46 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m47 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m47 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m47 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m47 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m48 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m48 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m48 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m48 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m49 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m49 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m49 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m49 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m50 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m50 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m50 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m50 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m51 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m51 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m51 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m51 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m52 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m52 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m52 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m52 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m53 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m53 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m53 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m53 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m54 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m54 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m54 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m54 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m55 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m55 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m55 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m55 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m56 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m56 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m56 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m56 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m57 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m57 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m57 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m57 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m58 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m58 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m58 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m58 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m59 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m59 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m59 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m59 | decimal(12,4) | NOT NULL DEFAULT '0.0000' dep_m60 | decimal(12,4) | NOT NULL DEFAULT '0.0000' pay_m60 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_principal_m60 | decimal(12,4) | NOT NULL DEFAULT '0.0000' loan_interest_m60 | decimal(12,4) | NOT NULL DEFAULT '0.0000' total_depreciation | decimal(15,2) | NOT NULL DEFAULT '0.00' total_loan_interest | decimal(15,2) | NOT NULL DEFAULT '0.00' created_at | timestamp | NULL updated_at | timestamp | NULL === bp_fixed_asset_rows === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL asset_type | varchar(20) | NOT NULL DEFAULT 'general' asset_name | varchar(255) | NOT NULL fixed_asset_setting_id | bigint unsigned | NULL total_cost | decimal(15,2) | NOT NULL DEFAULT '0.00' depreciation_years | smallint unsigned | NOT NULL DEFAULT '5' start_date | varchar(7) | NULL equity_pct | decimal(5,2) | NOT NULL DEFAULT '100.00' debt_pct | decimal(5,2) | NOT NULL DEFAULT '0.00' loan_interest_rate | decimal(5,2) | NOT NULL DEFAULT '0.00' loan_tenor_months | smallint unsigned | NOT NULL DEFAULT '0' grace_period_months | smallint unsigned | NOT NULL DEFAULT '0' payment_schedule | json | NULL manpower_department_id | bigint unsigned | NULL manpower_title_id | bigint unsigned | NULL units_per_employee | smallint unsigned | NOT NULL DEFAULT '1' row_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === bp_manpower_results === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL month_index | smallint unsigned | NOT NULL gross_salary_cost | decimal(12,2) | NOT NULL DEFAULT '0.00' net_salary_cost | decimal(12,2) | NOT NULL DEFAULT '0.00' salary_taxes_expense | decimal(12,2) | NOT NULL DEFAULT '0.00' social_ins_expense | decimal(12,2) | NOT NULL DEFAULT '0.00' department_breakdown | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === bp_manpower_rows === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL manpower_department_id | bigint unsigned | NOT NULL manpower_title_id | bigint unsigned | NOT NULL monthly_count | json | NOT NULL basic_salary | decimal(12,2) | NOT NULL DEFAULT '0.00' allowances_pct | decimal(5,2) | NOT NULL DEFAULT '0.00' annual_increase_pct | decimal(5,2) | NOT NULL DEFAULT '0.00' social_ins_pct | decimal(5,2) | NOT NULL DEFAULT '0.00' salary_tax_pct | decimal(5,2) | NOT NULL DEFAULT '0.00' created_at | timestamp | NULL updated_at | timestamp | NULL === bp_opening_balances === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL cash_bank | decimal(15,2) | NOT NULL DEFAULT '0.00' oda_amount | decimal(15,2) | NOT NULL DEFAULT '0.00' fixed_assets | json | NULL total_net_fa | decimal(15,2) | NOT NULL DEFAULT '0.00' lt_investments | json | NULL rou_assets | json | NULL other_lt_assets | json | NULL accounts_receivable | json | NULL notes_receivable | json | NULL other_debtors | json | NULL lt_bank_loans | json | NULL lease_rent_liabilities | json | NULL other_lt_liabilities | json | NULL accounts_payable | json | NULL notes_payable | json | NULL other_creditors | json | NULL equity_data | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === bp_other_revenue_costs === id | bigint unsigned | NOT NULL bp_other_revenue_id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL pct_values | json | NOT NULL payment_terms | json | NOT NULL sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === bp_other_revenues === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL service_item_ids | json | NOT NULL pct_values | json | NOT NULL collection_terms | json | NOT NULL sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === bp_selected_service_items === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL service_item_id | bigint unsigned | NOT NULL sort_order | tinyint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === bp_service_forecasts === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL service_item_id | bigint unsigned | NOT NULL vat_pct | decimal(5,2) | NOT NULL DEFAULT '0.00' withholding_pct | decimal(5,2) | NOT NULL DEFAULT '0.00' contract_type | varchar(30) | NULL quantity_values | json | NULL unit_price_values | json | NULL month1 | decimal(15,2) | NOT NULL DEFAULT '0.00' month2 | decimal(15,2) | NOT NULL DEFAULT '0.00' month3 | decimal(15,2) | NOT NULL DEFAULT '0.00' month4 | decimal(15,2) | NOT NULL DEFAULT '0.00' month5 | decimal(15,2) | NOT NULL DEFAULT '0.00' month6 | decimal(15,2) | NOT NULL DEFAULT '0.00' month7 | decimal(15,2) | NOT NULL DEFAULT '0.00' month8 | decimal(15,2) | NOT NULL DEFAULT '0.00' month9 | decimal(15,2) | NOT NULL DEFAULT '0.00' month10 | decimal(15,2) | NOT NULL DEFAULT '0.00' month11 | decimal(15,2) | NOT NULL DEFAULT '0.00' month12 | decimal(15,2) | NOT NULL DEFAULT '0.00' month13 | decimal(15,2) | NOT NULL DEFAULT '0.00' month14 | decimal(15,2) | NOT NULL DEFAULT '0.00' month15 | decimal(15,2) | NOT NULL DEFAULT '0.00' month16 | decimal(15,2) | NOT NULL DEFAULT '0.00' month17 | decimal(15,2) | NOT NULL DEFAULT '0.00' month18 | decimal(15,2) | NOT NULL DEFAULT '0.00' month19 | decimal(15,2) | NOT NULL DEFAULT '0.00' month20 | decimal(15,2) | NOT NULL DEFAULT '0.00' month21 | decimal(15,2) | NOT NULL DEFAULT '0.00' month22 | decimal(15,2) | NOT NULL DEFAULT '0.00' month23 | decimal(15,2) | NOT NULL DEFAULT '0.00' month24 | decimal(15,2) | NOT NULL DEFAULT '0.00' month25 | decimal(15,2) | NOT NULL DEFAULT '0.00' month26 | decimal(15,2) | NOT NULL DEFAULT '0.00' month27 | decimal(15,2) | NOT NULL DEFAULT '0.00' month28 | decimal(15,2) | NOT NULL DEFAULT '0.00' month29 | decimal(15,2) | NOT NULL DEFAULT '0.00' month30 | decimal(15,2) | NOT NULL DEFAULT '0.00' month31 | decimal(15,2) | NOT NULL DEFAULT '0.00' month32 | decimal(15,2) | NOT NULL DEFAULT '0.00' month33 | decimal(15,2) | NOT NULL DEFAULT '0.00' month34 | decimal(15,2) | NOT NULL DEFAULT '0.00' month35 | decimal(15,2) | NOT NULL DEFAULT '0.00' month36 | decimal(15,2) | NOT NULL DEFAULT '0.00' month37 | decimal(15,2) | NOT NULL DEFAULT '0.00' month38 | decimal(15,2) | NOT NULL DEFAULT '0.00' month39 | decimal(15,2) | NOT NULL DEFAULT '0.00' month40 | decimal(15,2) | NOT NULL DEFAULT '0.00' month41 | decimal(15,2) | NOT NULL DEFAULT '0.00' month42 | decimal(15,2) | NOT NULL DEFAULT '0.00' month43 | decimal(15,2) | NOT NULL DEFAULT '0.00' month44 | decimal(15,2) | NOT NULL DEFAULT '0.00' month45 | decimal(15,2) | NOT NULL DEFAULT '0.00' month46 | decimal(15,2) | NOT NULL DEFAULT '0.00' month47 | decimal(15,2) | NOT NULL DEFAULT '0.00' month48 | decimal(15,2) | NOT NULL DEFAULT '0.00' month49 | decimal(15,2) | NOT NULL DEFAULT '0.00' month50 | decimal(15,2) | NOT NULL DEFAULT '0.00' month51 | decimal(15,2) | NOT NULL DEFAULT '0.00' month52 | decimal(15,2) | NOT NULL DEFAULT '0.00' month53 | decimal(15,2) | NOT NULL DEFAULT '0.00' month54 | decimal(15,2) | NOT NULL DEFAULT '0.00' month55 | decimal(15,2) | NOT NULL DEFAULT '0.00' month56 | decimal(15,2) | NOT NULL DEFAULT '0.00' month57 | decimal(15,2) | NOT NULL DEFAULT '0.00' month58 | decimal(15,2) | NOT NULL DEFAULT '0.00' month59 | decimal(15,2) | NOT NULL DEFAULT '0.00' month60 | decimal(15,2) | NOT NULL DEFAULT '0.00' created_at | timestamp | NULL updated_at | timestamp | NULL === business_plans === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL created_by | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL study_currency | varchar(10) | NOT NULL DEFAULT 'EGP' start_date | date | NOT NULL end_date | date | NOT NULL plan_year | smallint unsigned | NOT NULL corporate_tax_rate | decimal(5,2) | NOT NULL DEFAULT '0.00' oda_interest_rate | decimal(5,2) | NOT NULL DEFAULT '0.00' oda_credit_limit | decimal(15,2) | NOT NULL DEFAULT '0.00' min_cash_balance | json | NULL extra_equity_injection | json | NULL has_revenue_projection | tinyint(1) | NOT NULL DEFAULT '0' has_manpower | tinyint(1) | NOT NULL DEFAULT '0' has_expenses | tinyint(1) | NOT NULL DEFAULT '0' has_fixed_assets | tinyint(1) | NOT NULL DEFAULT '0' has_other_revenues | tinyint(1) | NOT NULL DEFAULT '0' has_opening_balance | tinyint(1) | NOT NULL DEFAULT '0' is_active | tinyint(1) | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL deleted_at | timestamp | NULL === cache === key | varchar(255) | NOT NULL value | mediumtext | NOT NULL expiration | int | NOT NULL === cache_locks === key | varchar(255) | NOT NULL owner | varchar(255) | NOT NULL expiration | int | NOT NULL === companies === id | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL trade_name | varchar(255) | NULL logo | varchar(255) | NULL description | text | NULL notes | text | NULL parent_id | bigint unsigned | NULL legal_structure | varchar(255) | NULL established_date | date | NULL established_year | int | NULL registration_number | varchar(255) | NULL tax_id | varchar(255) | NULL address | varchar(255) | NULL city | varchar(255) | NULL country | varchar(255) | NOT NULL DEFAULT 'Egypt' phone | varchar(255) | NULL email | varchar(255) | NULL website | varchar(255) | NULL currency | varchar(255) | NOT NULL DEFAULT 'EGP' fiscal_year_start | enum('01','02','03','04','05','06','07','08','09','10','11','12') | NOT NULL DEFAULT '01' tax_type | enum('corporate_income_tax','zakat') | NOT NULL DEFAULT 'corporate_income_tax' enabled_modules | json | NULL is_active | tinyint(1) | NOT NULL DEFAULT '1' created_at | timestamp | NULL updated_at | timestamp | NULL deleted_at | timestamp | NULL === contract_dashboard_notes === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL created_by | bigint unsigned | NOT NULL date_from | date | NOT NULL date_to | date | NOT NULL note | longtext | NOT NULL created_at | timestamp | NULL updated_at | timestamp | NULL === contract_data === id | bigint unsigned | NOT NULL upload_id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL customer_name | varchar(255) | NOT NULL customer_business_sector | varchar(255) | NULL contract_name | varchar(255) | NULL contract_code | varchar(255) | NULL contract_start_date | date | NULL contract_end_date | date | NULL contract_duration_months | smallint unsigned | NULL sales_order_number | varchar(255) | NULL sales_rep | varchar(255) | NULL contract_nature | enum('retainer','job_order') | NULL service_category | varchar(255) | NULL service_subcategory | varchar(255) | NULL service_name | varchar(255) | NULL value | decimal(18,4) | NULL currency | varchar(10) | NULL fx_rate | decimal(14,6) | NULL value_main_currency | decimal(18,4) | NULL invoicing_cycle | enum('monthly','on_completion') | NULL expected_gross_margin_rate | decimal(8,4) | NULL renewal_flag | tinyint | NULL renewal_count | tinyint unsigned | NULL contract_status | enum('active','completed','on_hold') | NOT NULL DEFAULT 'active' status_overridden | tinyint(1) | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === contract_field_mappings === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL field_key | varchar(60) | NOT NULL is_active | tinyint(1) | NOT NULL DEFAULT '1' sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === contract_reports === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL created_by | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL report_type | varchar(40) | NOT NULL config | json | NOT NULL is_system | tinyint(1) | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === contract_uploads === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL uploaded_by | bigint unsigned | NOT NULL original_filename | varchar(255) | NOT NULL stored_filename | varchar(255) | NOT NULL period_from | date | NOT NULL period_to | date | NOT NULL date_format | varchar(20) | NOT NULL DEFAULT 'DD/MM/YYYY' row_count | int unsigned | NOT NULL DEFAULT '0' status | enum('processing','done','failed') | NOT NULL DEFAULT 'processing' error_message | text | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === customer_credit_criteria_settings === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL criterion_key | varchar(80) | NOT NULL criterion_label | varchar(255) | NOT NULL criterion_type | enum('qualitative','quantitative') | NOT NULL DEFAULT 'qualitative' options | json | NULL threshold_operator | enum('gte','lte') | NULL threshold_value | decimal(8,2) | NULL unit | varchar(50) | NULL weight | decimal(6,2) | NOT NULL DEFAULT '0.00' is_active | tinyint(1) | NOT NULL DEFAULT '1' sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === customer_credit_criterion_scores === id | bigint unsigned | NOT NULL session_id | bigint unsigned | NOT NULL criterion_key | varchar(255) | NOT NULL selected_option_label | varchar(255) | NULL score | decimal(6,2) | NOT NULL DEFAULT '0.00' earned | decimal(6,4) | NOT NULL DEFAULT '0.0000' created_at | timestamp | NULL updated_at | timestamp | NULL === customer_credit_sessions === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL user_id | bigint unsigned | NOT NULL customer_id | bigint unsigned | NULL session_name | varchar(255) | NOT NULL overall_score | decimal(6,2) | NOT NULL DEFAULT '0.00' overall_rating | varchar(255) | NOT NULL DEFAULT 'High Risk' created_at | timestamp | NULL updated_at | timestamp | NULL === customers === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL customer_name | varchar(255) | NOT NULL business_sector | varchar(150) | NULL source | enum('manual','imported') | NOT NULL DEFAULT 'manual' is_active | tinyint(1) | NOT NULL DEFAULT '1' sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === expense_categories === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL category_name | varchar(255) | NOT NULL cost_center | enum('cost_of_service','opex','sales_marketing','admin_general') | NOT NULL sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === expense_dashboard_notes === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL date_from | date | NOT NULL date_to | date | NOT NULL note | longtext | NOT NULL created_by | bigint unsigned | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === expense_data === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL upload_id | bigint unsigned | NOT NULL date | date | NULL expense_category | varchar(255) | NULL expense_sub_category | varchar(255) | NULL expense_name | varchar(255) | NULL expense_amount | decimal(18,2) | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === expense_items === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL expense_category_id | bigint unsigned | NOT NULL item_name | varchar(255) | NOT NULL coa_code | varchar(100) | NULL is_employee_expense | tinyint(1) | NOT NULL DEFAULT '0' is_active | tinyint(1) | NOT NULL DEFAULT '1' sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === expense_uploads === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL uploaded_by | bigint unsigned | NOT NULL file_path | varchar(512) | NOT NULL period_from | date | NOT NULL period_to | date | NOT NULL date_format | varchar(20) | NOT NULL DEFAULT 'DD/MM/YYYY' row_count | int | NOT NULL DEFAULT '0' status | enum('processing','completed','failed') | NOT NULL DEFAULT 'processing' error_message | text | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === failed_jobs === id | bigint unsigned | NOT NULL uuid | varchar(255) | NOT NULL connection | text | NOT NULL queue | text | NOT NULL payload | longtext | NOT NULL exception | longtext | NOT NULL failed_at | timestamp | NOT NULL DEFAULT 'CURRENT_TIMESTAMP' === financial_annual_plans === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL parent_plan_id | bigint unsigned | NULL modified_stage | enum('q1','q2','q3') | NULL created_by | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL study_currency | varchar(10) | NOT NULL DEFAULT 'EGP' start_date | date | NOT NULL end_date | date | NOT NULL plan_basis | enum('by_customer','by_service') | NOT NULL DEFAULT 'by_service' new_customer_count | smallint unsigned | NOT NULL DEFAULT '0' corporate_tax_rate | decimal(6,2) | NOT NULL DEFAULT '22.50' salary_tax_rate | decimal(6,2) | NOT NULL DEFAULT '10.00' social_insurance_rate | decimal(6,2) | NOT NULL DEFAULT '26.00' has_sales_projection | tinyint(1) | NOT NULL DEFAULT '0' has_manpower | tinyint(1) | NOT NULL DEFAULT '0' has_expenses | tinyint(1) | NOT NULL DEFAULT '0' has_fixed_assets | tinyint(1) | NOT NULL DEFAULT '0' has_opening_balance | tinyint(1) | NOT NULL DEFAULT '0' has_actuals | tinyint(1) | NOT NULL DEFAULT '0' bonus_payment_config | json | NULL has_oda_facility | tinyint(1) | NOT NULL DEFAULT '0' oda_interest_rate | decimal(6,2) | NOT NULL DEFAULT '0.00' oda_credit_limit | decimal(18,2) | NOT NULL DEFAULT '0.00' min_cash_balance | json | NULL extra_equity_injection | json | NULL bu_depreciation_allocation | json | NULL is_active | tinyint(1) | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL deleted_at | timestamp | NULL === fixed_asset_settings === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL asset_name | varchar(255) | NOT NULL asset_type | enum('general','employee') | NOT NULL DEFAULT 'general' is_employee_asset | tinyint(1) | NOT NULL DEFAULT '0' is_active | tinyint(1) | NOT NULL DEFAULT '1' sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === job_batches === id | varchar(255) | NOT NULL name | varchar(255) | NOT NULL total_jobs | int | NOT NULL pending_jobs | int | NOT NULL failed_jobs | int | NOT NULL failed_job_ids | longtext | NOT NULL options | mediumtext | NULL cancelled_at | int | NULL created_at | int | NOT NULL finished_at | int | NULL === jobs === id | bigint unsigned | NOT NULL queue | varchar(255) | NOT NULL payload | longtext | NOT NULL attempts | tinyint unsigned | NOT NULL reserved_at | int unsigned | NULL available_at | int unsigned | NOT NULL created_at | int unsigned | NOT NULL === manpower_departments === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL department_name | varchar(255) | NOT NULL cost_center | enum('cost_of_service','opex','sales_marketing','admin_general') | NOT NULL business_unit_name | varchar(255) | NULL sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === manpower_titles === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL manpower_department_id | bigint unsigned | NULL title_name | varchar(255) | NOT NULL cost_center | enum('cost_of_service','opex','sales_marketing','admin_general') | NOT NULL is_branch_title | tinyint(1) | NOT NULL DEFAULT '0' sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === migrations === id | int unsigned | NOT NULL migration | varchar(255) | NOT NULL batch | int | NOT NULL === model_has_permissions === permission_id | bigint unsigned | NOT NULL model_type | varchar(255) | NOT NULL model_id | bigint unsigned | NOT NULL === model_has_roles === role_id | bigint unsigned | NOT NULL model_type | varchar(255) | NOT NULL model_id | bigint unsigned | NOT NULL === password_reset_tokens === email | varchar(255) | NOT NULL token | varchar(255) | NOT NULL created_at | timestamp | NULL === permissions === id | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL guard_name | varchar(255) | NOT NULL created_at | timestamp | NULL updated_at | timestamp | NULL === plan_actuals === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL customer_id | bigint unsigned | NULL service_item_id | bigint unsigned | NULL is_new_customer | tinyint(1) | NOT NULL DEFAULT '0' new_customer_slot | tinyint unsigned | NOT NULL DEFAULT '0' new_customer_name | varchar(255) | NULL month | tinyint unsigned | NOT NULL quantity | decimal(15,4) | NOT NULL DEFAULT '0.0000' value | decimal(15,2) | NOT NULL DEFAULT '0.00' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_collection_terms === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL service_item_id | bigint unsigned | NOT NULL customer_id | bigint unsigned | NULL is_new_customer | tinyint(1) | NOT NULL DEFAULT '0' new_customer_slot | tinyint unsigned | NOT NULL DEFAULT '0' term_type | enum('cash','monthly','quarterly','semi_annually','annually','custom') | NOT NULL DEFAULT 'cash' custom_splits | json | NULL advance_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_customer_direct_expenses === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL customer_id | bigint unsigned | NULL new_customer_slot | tinyint unsigned | NOT NULL DEFAULT '0' sort_order | smallint | NOT NULL DEFAULT '0' expense_type | enum('percentage','fixed') | NOT NULL expense_name | varchar(255) | NOT NULL DEFAULT '' applied_service_ids | json | NULL rate_pct | decimal(8,4) | NOT NULL DEFAULT '0.0000' monthly_amount | decimal(15,2) | NOT NULL DEFAULT '0.00' start_month | varchar(7) | NULL end_month | varchar(7) | NULL monthly_values | json | NULL payment_terms | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === plan_expense_results === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL month_index | tinyint unsigned | NOT NULL month_label | varchar(10) | NOT NULL total_percentage | decimal(15,2) | NOT NULL DEFAULT '0.00' total_fixed_recurring | decimal(15,2) | NOT NULL DEFAULT '0.00' total_one_time | decimal(15,2) | NOT NULL DEFAULT '0.00' total_per_employee | decimal(15,2) | NOT NULL DEFAULT '0.00' total_employee_bonus | decimal(15,2) | NOT NULL DEFAULT '0.00' total_opex | decimal(15,2) | NOT NULL DEFAULT '0.00' bu_breakdown | json | NULL row_breakdown | json | NULL payment_schedule | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === plan_expense_rows === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL tab_type | enum('percentage','fixed_recurring','one_time','per_employee','employee_bonus') | NOT NULL expense_category_id | bigint unsigned | NULL expense_item_id | bigint unsigned | NULL service_item_id | bigint unsigned | NULL service_category_id | bigint unsigned | NULL start_month | varchar(7) | NULL end_month | varchar(7) | NULL pct_basis | enum('pct_revenue','pct_direct_cost','pct_gross_profit','cost_per_contract') | NULL rate | decimal(10,4) | NOT NULL DEFAULT '0.0000' frequency | enum('monthly','quarterly','semi_annual','annual') | NULL amount | decimal(15,2) | NOT NULL DEFAULT '0.00' amortization_months | smallint unsigned | NOT NULL DEFAULT '1' annual_increase_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' payment_policy | json | NULL applied_department_ids | json | NULL applied_title_ids | json | NULL manpower_department_id | bigint unsigned | NULL department_name | varchar(255) | NULL manpower_title_id | bigint unsigned | NULL title_name | varchar(255) | NULL fixed_bonus_months | decimal(6,2) | NOT NULL DEFAULT '0.00' variable_bonus_config | json | NULL allocation_config | json | NULL row_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_fixed_asset_calculations === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL asset_row_id | bigint unsigned | NOT NULL dep_m1 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m2 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m3 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m4 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m5 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m6 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m7 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m8 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m9 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m10 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m11 | decimal(18,4) | NOT NULL DEFAULT '0.0000' dep_m12 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m1 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m2 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m3 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m4 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m5 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m6 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m7 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m8 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m9 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m10 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m11 | decimal(18,4) | NOT NULL DEFAULT '0.0000' pay_m12 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m1 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m2 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m3 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m4 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m5 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m6 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m7 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m8 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m9 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m10 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m11 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_principal_m12 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m1 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m2 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m3 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m4 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m5 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m6 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m7 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m8 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m9 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m10 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m11 | decimal(18,4) | NOT NULL DEFAULT '0.0000' loan_interest_m12 | decimal(18,4) | NOT NULL DEFAULT '0.0000' total_capex | decimal(18,4) | NOT NULL DEFAULT '0.0000' total_depreciation | decimal(18,4) | NOT NULL DEFAULT '0.0000' total_equity_payment | decimal(18,4) | NOT NULL DEFAULT '0.0000' total_loan_principal | decimal(18,4) | NOT NULL DEFAULT '0.0000' total_loan_interest | decimal(18,4) | NOT NULL DEFAULT '0.0000' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_fixed_asset_rows === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL asset_type | enum('general','per_employee') | NOT NULL DEFAULT 'general' fixed_asset_setting_id | bigint unsigned | NULL asset_name | varchar(255) | NOT NULL manpower_department_id | bigint unsigned | NULL manpower_title_id | bigint unsigned | NULL headcount | int unsigned | NOT NULL DEFAULT '1' unit_cost | decimal(18,4) | NOT NULL DEFAULT '0.0000' total_cost | decimal(18,4) | NOT NULL DEFAULT '0.0000' depreciation_years | int unsigned | NOT NULL DEFAULT '0' start_date | varchar(7) | NOT NULL equity_pct | decimal(8,4) | NOT NULL DEFAULT '100.0000' debt_pct | decimal(8,4) | NOT NULL DEFAULT '0.0000' interest_pct | decimal(8,4) | NOT NULL DEFAULT '0.0000' tenor_months | int unsigned | NOT NULL DEFAULT '0' grace_months | int unsigned | NOT NULL DEFAULT '0' payment_term | enum('cash','installment','customize') | NOT NULL DEFAULT 'cash' installment_config | json | NULL custom_payment | json | NULL sort_order | int unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_manpower_results === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL month_index | tinyint | NOT NULL month_label | varchar(10) | NOT NULL gross_salary_cost | decimal(15,2) | NOT NULL DEFAULT '0.00' net_salary_cost | decimal(15,2) | NOT NULL DEFAULT '0.00' salary_taxes_expense | decimal(15,2) | NOT NULL DEFAULT '0.00' social_ins_expense | decimal(15,2) | NOT NULL DEFAULT '0.00' salary_taxes_payable | decimal(15,2) | NOT NULL DEFAULT '0.00' social_ins_payable | decimal(15,2) | NOT NULL DEFAULT '0.00' department_breakdown | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === plan_manpower_rows === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL manpower_title_id | bigint unsigned | NULL manpower_department_id | bigint unsigned | NULL title_name | varchar(255) | NOT NULL department_name | varchar(255) | NOT NULL net_salary | decimal(15,2) | NOT NULL DEFAULT '0.00' salary_taxes_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' social_insurance_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' annual_increase_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' monthly_count | json | NOT NULL row_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_master_forecasts === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL customer_id | bigint unsigned | NULL service_item_id | bigint unsigned | NULL is_new_customer | tinyint(1) | NOT NULL DEFAULT '0' new_customer_slot | tinyint unsigned | NOT NULL DEFAULT '0' month12 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month11 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month10 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month9 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month8 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month7 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month6 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month5 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month4 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month3 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month2 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month1 | decimal(15,4) | NOT NULL DEFAULT '0.0000' contract_type | enum('retainer','upon_completion') | NOT NULL DEFAULT 'retainer' retainer_start_date | date | NULL retainer_end_date | date | NULL withholding_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' vat_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' to_be_renewed | tinyint(1) | NOT NULL DEFAULT '0' renewal_duration_months | smallint | NULL renewal_increase_pct | decimal(6,2) | NULL uc_start_date | date | NULL uc_contract_amount | decimal(15,2) | NULL quantity_values | json | NULL unit_price_values | json | NULL projection_mode | varchar(20) | NULL DEFAULT 'delivery' contract_counts | json | NULL contract_values | json | NULL contract_execution_duration | smallint unsigned | NULL contract_execution_rates | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === plan_opening_balances === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL as_of_date | date | NULL notes | varchar(500) | NULL fixed_assets | json | NULL lt_investments | json | NULL other_lt_assets | json | NULL rou_assets | json | NULL cash_bank | decimal(18,4) | NOT NULL DEFAULT '0.0000' accounts_receivable | json | NULL notes_receivable | json | NULL other_debtors | json | NULL oda_amount | decimal(18,4) | NOT NULL DEFAULT '0.0000' accounts_payable | json | NULL notes_payable | json | NULL other_creditors | json | NULL lease_rent_liabilities | json | NULL lt_bank_loans | json | NULL other_lt_liabilities | json | NULL equity_data | json | NULL total_assets | decimal(18,4) | NOT NULL DEFAULT '0.0000' total_liabilities | decimal(18,4) | NOT NULL DEFAULT '0.0000' total_equity | decimal(18,4) | NOT NULL DEFAULT '0.0000' total_net_fa | decimal(18,4) | NOT NULL DEFAULT '0.0000' is_balanced | tinyint(1) | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_other_revenue_costs === id | bigint unsigned | NOT NULL plan_other_revenue_id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL DEFAULT '' pct_values | json | NOT NULL payment_terms | json | NULL sort_order | smallint | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_other_revenues === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL service_item_ids | json | NOT NULL pct_values | json | NOT NULL collection_terms | json | NULL sort_order | smallint | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_q1_forecasts === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL customer_id | bigint unsigned | NULL service_item_id | bigint unsigned | NULL is_new_customer | tinyint(1) | NOT NULL DEFAULT '0' new_customer_slot | tinyint unsigned | NOT NULL DEFAULT '0' month12 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month11 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month10 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month9 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month8 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month7 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month6 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month5 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month4 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month3 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month2 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month1 | decimal(15,4) | NOT NULL DEFAULT '0.0000' contract_type | enum('retainer','upon_completion') | NOT NULL DEFAULT 'retainer' retainer_start_date | date | NULL retainer_end_date | date | NULL withholding_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' vat_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' to_be_renewed | tinyint(1) | NOT NULL DEFAULT '0' renewal_duration_months | smallint | NULL renewal_increase_pct | decimal(6,2) | NULL uc_start_date | date | NULL uc_contract_amount | decimal(15,2) | NULL quantity_values | json | NULL unit_price_values | json | NULL projection_mode | varchar(20) | NULL DEFAULT 'delivery' contract_counts | json | NULL contract_values | json | NULL contract_execution_duration | smallint unsigned | NULL contract_execution_rates | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === plan_q2_forecasts === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL customer_id | bigint unsigned | NULL service_item_id | bigint unsigned | NULL is_new_customer | tinyint(1) | NOT NULL DEFAULT '0' new_customer_slot | tinyint unsigned | NOT NULL DEFAULT '0' month12 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month11 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month10 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month9 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month8 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month7 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month6 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month5 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month4 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month3 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month2 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month1 | decimal(15,4) | NOT NULL DEFAULT '0.0000' contract_type | enum('retainer','upon_completion') | NOT NULL DEFAULT 'retainer' retainer_start_date | date | NULL retainer_end_date | date | NULL withholding_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' vat_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' to_be_renewed | tinyint(1) | NOT NULL DEFAULT '0' renewal_duration_months | smallint | NULL renewal_increase_pct | decimal(6,2) | NULL uc_start_date | date | NULL uc_contract_amount | decimal(15,2) | NULL quantity_values | json | NULL unit_price_values | json | NULL projection_mode | varchar(20) | NULL DEFAULT 'delivery' contract_counts | json | NULL contract_values | json | NULL contract_execution_duration | smallint unsigned | NULL contract_execution_rates | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === plan_q3_forecasts === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL customer_id | bigint unsigned | NULL service_item_id | bigint unsigned | NULL is_new_customer | tinyint(1) | NOT NULL DEFAULT '0' new_customer_slot | tinyint unsigned | NOT NULL DEFAULT '0' month12 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month11 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month10 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month9 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month8 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month7 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month6 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month5 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month4 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month3 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month2 | decimal(15,4) | NOT NULL DEFAULT '0.0000' month1 | decimal(15,4) | NOT NULL DEFAULT '0.0000' contract_type | enum('retainer','upon_completion') | NOT NULL DEFAULT 'retainer' retainer_start_date | date | NULL retainer_end_date | date | NULL withholding_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' vat_pct | decimal(6,2) | NOT NULL DEFAULT '0.00' to_be_renewed | tinyint(1) | NOT NULL DEFAULT '0' renewal_duration_months | smallint | NULL renewal_increase_pct | decimal(6,2) | NULL uc_start_date | date | NULL uc_contract_amount | decimal(15,2) | NULL quantity_values | json | NULL unit_price_values | json | NULL projection_mode | varchar(20) | NULL DEFAULT 'delivery' contract_counts | json | NULL contract_values | json | NULL contract_execution_duration | smallint unsigned | NULL contract_execution_rates | json | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === plan_selected_customers === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL customer_id | bigint unsigned | NULL service_item_id | bigint unsigned | NULL sort_order | smallint unsigned | NOT NULL DEFAULT '0' is_new_customer | tinyint(1) | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_selected_service_items === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL service_item_id | bigint unsigned | NOT NULL sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === plan_variance_notes === id | bigint unsigned | NOT NULL plan_id | bigint unsigned | NOT NULL row_key | varchar(100) | NOT NULL month | tinyint | NULL note | text | NULL action | text | NULL updated_by | bigint unsigned | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === profitability_dashboard_notes === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL date_from | date | NOT NULL date_to | date | NOT NULL note | longtext | NOT NULL created_by | bigint unsigned | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === profitability_manual_inputs === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL period_type | enum('month','quarter','semi','year') | NOT NULL DEFAULT 'month' period_label | varchar(20) | NOT NULL da_amount | decimal(18,2) | NOT NULL DEFAULT '0.00' interest_amount | decimal(18,2) | NOT NULL DEFAULT '0.00' tax_amount | decimal(18,2) | NOT NULL DEFAULT '0.00' notes | text | NULL created_by | bigint unsigned | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === profitability_pl_mappings === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL expense_category | varchar(255) | NOT NULL pl_line | enum('cogs','opex','da','interest','tax','other') | NOT NULL DEFAULT 'opex' created_at | timestamp | NULL updated_at | timestamp | NULL === project_expenses === id | bigint unsigned | NOT NULL project_id | bigint unsigned | NOT NULL created_by | bigint unsigned | NOT NULL category | enum('consultant','freelancer','legal','accounting','software','saas_subscription','hardware','purchase','raw_materials','travel','accommodation','marketing','training','government_fees','bank_charges','insurance','maintenance','logistics','other') | NOT NULL DEFAULT 'other' custom_category | varchar(255) | NULL description | varchar(255) | NOT NULL amount | decimal(15,2) | NOT NULL expense_date | date | NOT NULL receipt_path | varchar(255) | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === project_task_assignees === id | bigint unsigned | NOT NULL project_task_id | bigint unsigned | NOT NULL user_id | bigint unsigned | NOT NULL created_at | timestamp | NULL updated_at | timestamp | NULL === project_task_logs === id | bigint unsigned | NOT NULL project_task_id | bigint unsigned | NOT NULL user_id | bigint unsigned | NOT NULL log_date | date | NOT NULL hours | decimal(6,2) | NOT NULL DEFAULT '0.00' notes | text | NULL progress_pct | int | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === project_tasks === id | bigint unsigned | NOT NULL project_id | bigint unsigned | NOT NULL created_by | bigint unsigned | NOT NULL depends_on_task_id | bigint unsigned | NULL name | varchar(255) | NOT NULL description | text | NULL status | enum('not_started','in_progress','completed','blocked') | NOT NULL DEFAULT 'not_started' priority | enum('low','medium','high') | NOT NULL DEFAULT 'medium' order | int | NOT NULL DEFAULT '0' estimated_days | int | NULL start_date | date | NULL due_date | date | NULL progress_pct | int | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === projects === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL created_by | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL description | text | NULL phase | varchar(255) | NULL status | enum('not_started','in_progress','on_hold','completed','cancelled') | NOT NULL DEFAULT 'not_started' start_date | date | NULL end_date | date | NULL currency | varchar(10) | NOT NULL DEFAULT 'USD' created_at | timestamp | NULL updated_at | timestamp | NULL === role_has_permissions === permission_id | bigint unsigned | NOT NULL role_id | bigint unsigned | NOT NULL === roles === id | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL guard_name | varchar(255) | NOT NULL created_at | timestamp | NULL updated_at | timestamp | NULL === sales_dashboard_notes === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL date_from | date | NOT NULL date_to | date | NOT NULL created_by | bigint unsigned | NOT NULL note | longtext | NOT NULL created_at | timestamp | NULL updated_at | timestamp | NULL === sales_data === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL upload_id | bigint unsigned | NOT NULL date | date | NULL document_type | varchar(50) | NULL document_number | varchar(100) | NULL country | varchar(100) | NULL branch | varchar(150) | NULL business_unit | varchar(150) | NULL customer_name | varchar(200) | NULL business_sector | varchar(150) | NULL zone | varchar(100) | NULL sales_channel | varchar(150) | NULL sales_person | varchar(150) | NULL brand | varchar(150) | NULL service_category | varchar(150) | NULL service_sub_category | varchar(150) | NULL service_item | varchar(150) | NULL quantity | decimal(15,4) | NULL measurement_unit | varchar(50) | NULL price_per_unit | decimal(15,4) | NULL sales_value | decimal(15,2) | NULL cash_discount | decimal(15,2) | NULL quantity_discount | decimal(15,2) | NULL special_discount | decimal(15,2) | NULL other_discounts | decimal(15,2) | NULL net_sales_value | decimal(15,2) | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === sales_field_mappings === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL field_key | varchar(100) | NOT NULL is_active | tinyint(1) | NOT NULL DEFAULT '1' sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === sales_reports === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL name | varchar(200) | NOT NULL report_type | enum('single_dimension','matrix','ranking','customer_nature','period_comparison','trend') | NOT NULL config | json | NULL is_system | tinyint(1) | NOT NULL DEFAULT '0' created_by | bigint unsigned | NOT NULL created_at | timestamp | NULL updated_at | timestamp | NULL === sales_uploads === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL file_path | varchar(255) | NOT NULL original_filename | varchar(255) | NOT NULL stored_filename | varchar(255) | NULL period_from | date | NOT NULL period_to | date | NOT NULL date_format | varchar(20) | NOT NULL DEFAULT 'DD/MM/YYYY' status | enum('processing','done','completed','failed') | NOT NULL DEFAULT 'processing' error_message | text | NULL row_count | int unsigned | NOT NULL DEFAULT '0' uploaded_by | bigint unsigned | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === service_categories === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL category_name | varchar(255) | NOT NULL sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === service_items === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL service_category_id | bigint unsigned | NOT NULL item_name | varchar(255) | NOT NULL business_unit_name | varchar(255) | NULL is_active | tinyint(1) | NOT NULL DEFAULT '1' sort_order | smallint unsigned | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === sessions === id | varchar(255) | NOT NULL user_id | bigint unsigned | NULL ip_address | varchar(45) | NULL user_agent | text | NULL payload | longtext | NOT NULL last_activity | int | NOT NULL === statistica_entries === id | bigint unsigned | NOT NULL series_id | bigint unsigned | NOT NULL entry_date | date | NOT NULL value | decimal(20,6) | NOT NULL notes | varchar(255) | NULL created_by | bigint unsigned | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === statistica_series === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL name | varchar(255) | NOT NULL slug | varchar(255) | NULL category | varchar(255) | NOT NULL unit | varchar(255) | NOT NULL DEFAULT '' frequency | enum('daily','weekly','monthly','quarterly') | NOT NULL DEFAULT 'daily' color | varchar(255) | NOT NULL DEFAULT '#3b82f6' description | text | NULL source | varchar(255) | NULL is_active | tinyint(1) | NOT NULL DEFAULT '1' sort_order | int | NOT NULL DEFAULT '0' created_at | timestamp | NULL updated_at | timestamp | NULL === user_cost_rates === id | bigint unsigned | NOT NULL user_id | bigint unsigned | NOT NULL company_id | bigint unsigned | NOT NULL daily_rate | decimal(10,2) | NULL hourly_rate | decimal(10,2) | NULL currency | varchar(10) | NOT NULL DEFAULT 'USD' created_at | timestamp | NULL updated_at | timestamp | NULL === user_tasks === id | bigint unsigned | NOT NULL user_id | bigint unsigned | NOT NULL company_id | bigint unsigned | NULL title | varchar(255) | NOT NULL description | text | NULL priority | enum('low','medium','high') | NOT NULL DEFAULT 'medium' status | enum('not_started','in_progress','completed','cancelled') | NOT NULL DEFAULT 'not_started' expected_start_date | date | NULL expected_duration_days | smallint unsigned | NULL expected_end_date | date | NULL actual_start_date | date | NULL actual_duration_days | smallint unsigned | NULL actual_end_date | date | NULL reminder_enabled | tinyint(1) | NOT NULL DEFAULT '1' completion_notes | text | NULL created_at | timestamp | NULL updated_at | timestamp | NULL === users === id | bigint unsigned | NOT NULL company_id | bigint unsigned | NULL is_super_admin | tinyint(1) | NOT NULL DEFAULT '0' role | enum('company_admin','manager','sales_manager','analyst','viewer') | NULL is_active | tinyint(1) | NOT NULL DEFAULT '1' name | varchar(255) | NOT NULL email | varchar(255) | NOT NULL phone | varchar(255) | NULL job_title | varchar(255) | NULL avatar | varchar(255) | NULL theme | varchar(255) | NOT NULL DEFAULT 'dark' email_verified_at | timestamp | NULL password | varchar(255) | NOT NULL remember_token | varchar(100) | NULL created_at | timestamp | NULL updated_at | timestamp | NULL