'pnl-settings-profit-cost-basis', 'description' => __('The gross margin, monthly operating costs and free-shipping threshold that the profit and loss reports calculate with.', 'ai-eshop-optimizer'), 'icon' => 'scale', 'title' => __('Profit and cost basis', 'ai-eshop-optimizer'), 'footer' => class_exists('\Rooster\Admin\States') ? \Rooster\Admin\States::save_button($form_id) : '', )); echo $open; $rows = \Rooster\Admin\Ui::field_row(array( 'id' => 'aieo-pnl-gross-margin', 'label' => __('Gross profit margin (%)', 'ai-eshop-optimizer'), 'control' => \Rooster\Admin\Ui::input('gross_margin', (string) round($margin), array('id' => 'aieo-pnl-gross-margin', 'type' => 'number', 'xs' => true, 'unit' => '%', 'min' => 1, 'max' => 99, 'step' => 1)), 'help' => __('Rough average gross margin on product sales (default 60). Used to estimate profit per order and the break-even free-shipping threshold in Results → Delivery Statistics.', 'ai-eshop-optimizer'), )); $rows .= \Rooster\Admin\Ui::field_row(array( 'id' => 'aieo-pnl-ops-cost', 'label' => __('Operations costs', 'ai-eshop-optimizer'), 'control' => \Rooster\Admin\Ui::input('ops_cost_monthly', (string) (float) $ops, array('id' => 'aieo-pnl-ops-cost', 'type' => 'number', 'short' => true, 'unit' => $sym . ' ' . __('/ month', 'ai-eshop-optimizer'), 'min' => 0, 'step' => 'any')), 'help' => __('Your fixed MONTHLY overhead — hosting, wages, tooling, everything EXCEPT ad spend (e.g. 8000). The ROI Wizard charges a prorated share against the report period (per-day rate × days in the range), so ROI reflects true business profit, not just revenue minus ad spend.', 'ai-eshop-optimizer'), )); $rows .= \Rooster\Admin\Ui::field_row(array( 'id' => 'aieo-pnl-free-ship', 'label' => __('Free-shipping threshold', 'ai-eshop-optimizer'), 'control' => \Rooster\Admin\Ui::input('free_ship_threshold', (string) (float) $fs, array('id' => 'aieo-pnl-free-ship', 'type' => 'number', 'short' => true, 'unit' => $sym, 'min' => 0, 'step' => 'any')), 'help' => __('Your CURRENT order-subtotal bar for free shipping (default 35). The Delivery Statistics “Free-ship ≥” column recommends raising it to this + (courier cost ÷ margin), so the extra turnover covers the courier cost you absorb.', 'ai-eshop-optimizer') . $fs_note, )); echo AIEO_DMM_UI::card_form('aieo_dmm_pnl_settings_save', $this->get_id(), $form_id, '