You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Built outside the json! macro to avoid hitting the proc-macro recursion
27
27
// limit as the command surface grows.
28
28
let commands_list:&[(&str,&str)] = &[
29
-
("issuer add <slug> --name X --jurisdiction sg|uk|us|eu --address ... [--logo PATH]","Register an issuer (billing entity). --logo points to a PNG/SVG/JPG rendered in template header"),
30
-
("issuer edit <slug> [--name ... --template ... --jurisdiction ... --logo PATH etc]","Update any subset of an issuer's fields (incl. logo path)"),
29
+
("issuer add <slug> --name X --jurisdiction sg|uk|us|eu --address ... [--logo PATH --number-format F]","Register an issuer (billing entity). New issuers default to {issuer}-{year}-{seq:04} so invoice numbers are globally addressable"),
30
+
("issuer edit <slug> [--name ... --template ... --jurisdiction ... --number-format ... --logo PATH etc]","Update any subset of an issuer's fields (incl. logo path and numbering format)"),
31
31
("issuer set-template <slug> <template>","Shorthand: change an issuer's default template"),
32
32
("issuer list | ls","List issuers"),
33
33
("issuer show <slug> | get","Show issuer details"),
"item_spec":"product-slug[:qty] OR description:qty:price[:rate]"
104
+
"item_spec":"product-slug[:qty] OR description:qty:price[:rate]",
105
+
"config_keys":{
106
+
"default_issuer":"Issuer slug used by invoices new when --as is omitted and the client has no default issuer. `invoice config set default_issuer unset` clears it.",
107
+
"self_update":"Reserved shared setting for updater behavior across the suite."
"issuer":"The company/person billing as. Each issuer owns tax profile, logo, bank details, default notes/output dir, and its own sequence counter.",
136
+
"client":"The customer. A client may pin default_issuer and default_template.",
137
+
"invoice_numbering":"Invoice numbers are globally addressable by the CLI. New issuers default to {issuer}-{year}-{seq:04}; legacy colliding formats are auto-prefixed with the issuer slug on collision.",
138
+
"recommended_default":"Set config.default_issuer for single-company workflows; use client.default_issuer or explicit --as for multi-company workflows."
139
+
},
140
+
"guardrails":[
141
+
"Run doctor before first use and after changing config.",
142
+
"Prefer --json for agents; stdout is data and stderr is diagnostics.",
143
+
"Use globally unique issuer number formats, ideally {issuer}-{year}-{seq:04}.",
144
+
"Do not delete issued invoices; mark void or create a credit note.",
145
+
"Use invoice numbers returned by JSON responses rather than guessing the next sequence.",
146
+
"Pin client default issuers when the same customer is always billed by the same company."
@@ -75,10 +75,12 @@ invoice invoices new --client meridian --item design --discount-rate 10
75
75
### Tips
76
76
77
77
- Run `invoice agent-info` for the full JSON capability manifest.
78
-
- Run `invoice doctor` to verify typst is installed & DB is ready.
78
+
- Run `invoice doctor --json` to verify typst, DB, default issuer, and multi-company numbering.
79
79
- Item spec supports `product-slug[:qty]` OR `description:qty:price[:rate]`.
80
80
- Template resolution at render: `--template` flag > client.default_template > issuer.default_template > `vienna`.
81
81
- `--as` picks the issuer; omit it when the client has `default_issuer` pinned or `config.default_issuer` is set.
82
+
- New issuers default to `{issuer}-{year}-{seq:04}` so invoice numbers are globally addressable; use `issuer edit --number-format` for per-company custom prefixes.
83
+
- Use invoice numbers returned by JSON responses instead of predicting the next sequence.
0 commit comments