| @@ -32,7 +32,21 @@ | ||
| 32 | 32 | /** |
| 33 | 33 | * Recurring invoice post type (Pro) |
| 34 | 34 | */ |
| 35 | 35 | public const EASY_INVOICE_RECURRING_POST_TYPE = 'easy_invoice_recurring'; |
| 36 | + | |
| 37 | + /** | |
| 38 | + * Credit note post type | |
| 39 | + * | |
| 40 | + * Its own type rather than an invoice with a flag: a credit note has its | |
| 41 | + * own numbering sequence, must never appear in an invoice listing or total, | |
| 42 | + * and is a different document to a tax authority. | |
| 43 | + * | |
| 44 | + * Named `easy_invoice_credit` rather than `..._credit_note` because | |
| 45 | + * WordPress rejects post type names longer than 20 characters, and the | |
| 46 | + * fuller name is 24. register_post_type() returns a WP_Error nobody checks, | |
| 47 | + * so the type simply never exists. | |
| 48 | + */ | |
| 49 | + public const EASY_INVOICE_CREDIT_NOTE_POST_TYPE = 'easy_invoice_credit'; | |
| 36 | 50 | |
| 37 | 51 | |
| 38 | 52 | } |