docs: company logo, stamp & brand bar on exported POs
Document the new Company.logoKey/stampKey branding fields, the company-assets storage namespace, and how logo/stamp/brand-bar render on PO exports. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
parent
d6b4073d28
commit
67cd529f84
3 changed files with 22 additions and 5 deletions
|
|
@ -128,10 +128,12 @@ Only **leaf** accounts (no children) are PO-selectable. Seed data:
|
|||
|
||||
### Company — multi-company invoicing
|
||||
`name, code? (unique, e.g. PMS), gstNumber?, address?, telephone?, mobile?,
|
||||
email?, invoiceEmail?, invoiceAddress?, isActive`. The sister company a PO is
|
||||
billed under (`PurchaseOrder.companyId`, optional); its details populate the
|
||||
**exported PO header / invoice block** (falling back to Pelagia defaults).
|
||||
Managed at `/admin/companies`.
|
||||
email?, invoiceEmail?, invoiceAddress?, logoKey?, stampKey?, isActive`. The
|
||||
sister company a PO is billed under (`PurchaseOrder.companyId`, optional); its
|
||||
details populate the **exported PO header / invoice block** (falling back to
|
||||
Pelagia defaults). `logoKey`/`stampKey` are storage keys for the branding
|
||||
images shown on exported POs (see [File Storage](File-Storage)). Managed at
|
||||
`/admin/companies`.
|
||||
|
||||
### Vendor + VendorContact
|
||||
`Vendor`: `name, vendorId? (unique formal code), address?, pincode?, gstin?,
|
||||
|
|
|
|||
|
|
@ -47,9 +47,17 @@ production**.
|
|||
(`@unique poId`), upserted on repeat confirmations (notes preserved).
|
||||
- **Approval signature** (`User.signatureKey`) — uploaded by approvers from the
|
||||
profile page; appears on exported PO documents.
|
||||
- **Company branding** (`Company.logoKey`, `Company.stampKey`) — a logo and a
|
||||
stamp/seal uploaded per company from **Admin → Companies → Edit → Branding**
|
||||
(permission `manage_vessels_accounts`). Keys are deterministic
|
||||
(`company-assets/<companyId>/{logo,stamp}.<ext>`) so a re-upload overwrites in
|
||||
place. Both appear on exported POs — logo top-left, stamp in the approver's
|
||||
signatory block. Upload via the `uploadCompanyAsset` server action (≤ 4 MB,
|
||||
PNG/JPG/WebP), not the presigned-URL flow.
|
||||
|
||||
Client-side upload is helped by `lib/upload-files.ts`. The export endpoint embeds
|
||||
the approver's signature in the generated PDF/XLSX.
|
||||
the approver's signature, the company logo and stamp, and a fixed-colour brand
|
||||
bar at the bottom of the generated PDF/XLSX.
|
||||
|
||||
## Required env (production)
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,13 @@ approved, not creation).
|
|||
approver's name (and uploaded signature) appears as signatory; company details
|
||||
populate the header; optional line-item descriptions are included.
|
||||
|
||||
**Company branding** (set per company in Admin → Companies → Edit → Branding)
|
||||
also renders on the export: the uploaded **logo** floats top-left of the header,
|
||||
the uploaded **stamp/seal** overlays the approver's signatory block, and a fixed
|
||||
brand-colour bar (`#92D050`) runs full-width along the bottom. Each piece is
|
||||
optional except the bar, which is always drawn. See
|
||||
[File Storage](File-Storage#where-files-attach).
|
||||
|
||||
## Import PO → CLOSED
|
||||
|
||||
`/po/import` parses a Pelagia-format Excel PO (`lib/po-import-parser.ts`,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue