// src/pages/DashboardPage/BillingPage/BillingSettingsTab.tsx // The "Settings" sub-tab of the Pricing options page (BillingCatalog.tsx): the org-wide billing policy - // sales tax rate, default payment terms for new invoices, and the allow-partial-payments house default // (Task 5b). All were MOVED here from the PM workspace / Overview page in the billing-workspace-v2 pass // (they're pricing concerns, so they belong with the catalog). billing:manage staff edit inline; everyone // else who can see the Pricing options page gets a read-only summary - the same visibility model as the // other catalog sub-tabs (see BillingCatalog.tsx). import { useStaffPermissionServiceContext } from '../../../services/StaffPermissionService.tsx'; import { useAuthServiceContext } from '../../../services/AuthService.tsx'; import { getOrganizationTaxRate } from '../../../utils/organizationTaxRate'; import { getDefaultNetDays, getOrgAllowPartialPayments } from '../../../utils/organizationInvoiceTerms'; import TaxSettingsSection from '../FormSubmissionNotificationsPage/TaxSettingsSection.tsx'; import InvoiceTermsSettingsSection, { netDaysLabel } from './InvoiceTermsSettingsSection'; import AllowPartialPaymentsSettingsSection from './AllowPartialPaymentsSettingsSection'; const BillingSettingsTab = () => { const { canManage } = useStaffPermissionServiceContext(); const { currentOrganization } = useAuthServiceContext(); if (canManage('billing')) { return (
); } return (
Sales tax rate
{getOrganizationTaxRate(currentOrganization ?? undefined)}%
Default payment terms
{netDaysLabel(getDefaultNetDays(currentOrganization ?? undefined))}
Partial payments
{getOrgAllowPartialPayments(currentOrganization ?? undefined) ? 'Allowed' : 'Not allowed'}
); }; export default BillingSettingsTab;