Hub 2.12.0: one product uninstalled at a time, stale installs removed, customers archived
- Uninstalls name the product (agent 1.5.0); a whole-church uninstall marks every product of the church on that server removed. Older agents are refused while the church has others. - A second product's uninstall joins one already planned (one export and one uninstall) or gets its own time; the last product removes the whole church. Accounts goes last. - Remove an install from the Hub after 24 hours without a heartbeat (POST .../forget). - Archive and restore customers (migration 20261123090000_customer_archive). - Several addresses for a customer's email and billing email, with a + button. - Statements show R0 invoices' amounts. Vendors contracts 1.16.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -412,3 +412,20 @@ describe('monthly recurring revenue (dashboard)', () => {
|
||||
expect(monthlyRecurringCents(customer({ billingCycle: 'none' }), [events()], now)).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('2.12.0: R0 invoices on statements, several email addresses', () => {
|
||||
const { emailList } = require('../src/utils/emails');
|
||||
test('a sent R0 invoice is on the statement, with its amount (R0.00), and isn\'t owing', () => {
|
||||
const zero = { number: 'INV-0', status: 'sent', issueDate: day('2026-12-01'), dueDate: day('2026-12-08'), periodStart: day('2026-12-01'), periodEnd: day('2026-12-31'), totalCents: 0, payments: [] };
|
||||
const st = statement({ invoices: [zero], payments: [], from: '2026-12-01', to: '2026-12-31' });
|
||||
expect(st.entries).toEqual([expect.objectContaining({ kind: 'invoice', reference: 'INV-0', debitCents: 0, balanceCents: 0 })]);
|
||||
expect(st.outstanding).toEqual([]);
|
||||
});
|
||||
|
||||
test('email lists: commas, semicolons or a list; each once; a bad one named', () => {
|
||||
expect(emailList('a@church.org; b@church.org, A@church.org')).toBe('a@church.org, b@church.org');
|
||||
expect(emailList(['a@church.org', ' ', 'c@church.org'])).toBe('a@church.org, c@church.org');
|
||||
expect(emailList('')).toBeNull();
|
||||
expect(() => emailList('a@church.org, not-an-email')).toThrow(/not-an-email/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user