Expenses stage 3: billable expenses and pass-through costs - mark an expense for a client billable with a markup (default in Admin > Settings > Invoice), expenses to bill sit beside the time in Unbilled Time and go on a new or draft invoice with the tickets as a line each at a price that can be changed, the invoice gets an Expenses card with cost against billed and the margin plus an Add Expenses window, taking one off or deleting its line or invoice makes it to bill again (paid invoices keep it, cancelled ones keep the line), the quick look and list link billed expenses to their invoice with To bill and Billed pills and Bulk Set Billable, recurring expenses can be billed on each time or covered by one of the client's recurring invoices with a Costs card showing the monthly margin, expenses to bill counted in the menu, dashboard and client overview, export Billing and Billed On columns, demo data with recent client expenses to bill, database 3.0.1

This commit is contained in:
johnnyq
2026-10-16 18:36:43 -04:00
parent 94413424e4
commit 8d5e5091ad
34 changed files with 1649 additions and 119 deletions

11
db.sql
View File

@@ -1356,7 +1356,12 @@ CREATE TABLE `expenses` (
`expense_account_id` int(11) DEFAULT NULL,
`expense_refund_of_id` int(11) DEFAULT NULL,
`expense_recurring_expense_id` int(11) DEFAULT NULL,
PRIMARY KEY (`expense_id`)
`expense_billable` tinyint(1) NOT NULL DEFAULT 0,
`expense_markup` decimal(7,2) NOT NULL DEFAULT 0.00,
`expense_invoice_id` int(11) DEFAULT NULL,
`expense_invoice_item_id` int(11) DEFAULT NULL,
PRIMARY KEY (`expense_id`),
KEY `expense_invoice_id` (`expense_invoice_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -2094,6 +2099,9 @@ CREATE TABLE `recurring_expenses` (
`recurring_expense_client_id` int(11) NOT NULL DEFAULT 0,
`recurring_expense_category_id` int(11) NOT NULL,
`recurring_expense_account_id` int(11) NOT NULL,
`recurring_expense_billable` tinyint(1) NOT NULL DEFAULT 0,
`recurring_expense_markup` decimal(7,2) NOT NULL DEFAULT 0.00,
`recurring_expense_recurring_invoice_id` int(11) DEFAULT NULL,
PRIMARY KEY (`recurring_expense_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -2513,6 +2521,7 @@ CREATE TABLE `settings` (
`config_time_rounding` varchar(10) NOT NULL DEFAULT 'nearest',
`config_time_minimum` int(11) NOT NULL DEFAULT 0,
`config_time_item_name` varchar(200) NOT NULL DEFAULT 'Support [Hourly]',
`config_expense_markup` decimal(7,2) NOT NULL DEFAULT 0.00,
`config_project_prefix` varchar(200) NOT NULL DEFAULT 'PRJ-',
`config_project_next_number` int(11) NOT NULL DEFAULT 1,
`config_invoice_prefix` varchar(200) DEFAULT NULL,