ProdyPanda Factures Knowledge & Architecture Wiki

🌐 Language: English | Français | العربية

Agency workflows — Print Studio, stock, production and monthly close#

These workflows extend the existing billing workspace without changing the official invoice layout. Open Aide / Wiki in the sidebar for this handbook. The application has 12 workspace views; the wiki is separate.

  1. Open Impression & Enseignes and select the client, dimensions (cm or m), quantity and sides.
  2. Enable printing and choose media. Roll layouts account for roll width, bleed and splicing. Fixed-price media charges quantity × sides.
  3. Enable rigid support and choose a board. Its charging mode and waste defaults apply on selection: whole sheets, proportional surface, or smart nesting. These are estimate modes, not guarantees of optimal packing.
  4. Select finishings, then edit their cost and sell prices inline. Zero-cost overrides are preserved. Compare suppliers, optionally across different supports and thicknesses.
  5. Review cost, sale and margin. Save the dossier before exporting or converting it. Fiche Atelier PDF hides internal costs by default; Inclure coûts internes is ADMIN-only.

Multi-format bundles (N1)#

Enable the multi-format checkbox, add each label, width, height and quantity, then review the combined cutting map and per-format plans. A bundle accepts at most 50 formats and 2,000 pieces in total; dimensions must be positive and no greater than 10,000 cm. Pieces share raw sheets when they fit. Oversized pieces receive assembly plans and separate raw-sheet requirements: the workshop must validate seams and fabrication before production.

Créer devis / facture creates one client-facing line per format. Each line has quantity 1 and an allocated group price; the physical quantity is in its description. Largest-remainder allocation preserves the exact rounded bundle price, including when adding lines to a foreign-currency document. The shared description includes finishing, additional services and assembly instructions, never supplier costs.

Supplier conversions and duplication#

Créer dépenses fournisseurs excludes internal workshop labor by default. Créer BC fournisseurs purchases whole raw sheets using the physical plan even if the estimate uses proportional charging. Existing conversion links trigger a warning; confirm explicitly before creating another set. No eligible external component returns an error and creates nothing. Conversions create records, not emails or bank transfers.

Dupliquer dossier creates an unlinked estimate with a new number, reset production/deadline state, retained finishings, and no reserved offcut. Dupliquer on an expense creates a new unpaid expense without receipts, payments, reference, or conversion links.

Reusable offcut stock (N2)#

In the dossiers tab, use Stock de chutes to add/edit dimensions, material, thickness, color, location and notes. Alternatively, stock a reusable rectangle from a saved cutting plan. A source sheet cannot be stocked twice.

The calculator suggests compatible available stock only when the complete lot physically fits one offcut, including rotation and cutting kerf. ADMIN can choose Utiliser cette chute — Coût matière 0 DT. Allocation happens atomically on save, not during preview. A concurrent attempt to use the same stock is rejected.

Consumed stock cannot be restored to AVAILABLE or deleted through stock CRUD. Editing notes must not reprice the dossier. Deleting a dossier leaves the consumed status, its historical job number and the consumption audit. Release in the calculator removes the selection; it does not magically return cut material to stock. Supplier conversions do not repurchase consumed material.

Production tracking (N4)#

Open Suivi de Production. Move a saved dossier through Devis Validé, Maquette PAO, En Impression, Finition / Contrecollage, Prêt / Pose, and Livré & Facturé using drag/drop or its keyboard-friendly stage selector. Set deadline and priority on the card. Cancelled dossiers are excluded.

Stage changes are independent of invoice status, payments and stock. The final stage does not create or mark an invoice paid. Stale concurrent stage changes are rejected; refresh before retrying. The board tracks print dossiers and links to their client documents, not a separate manufacturing-order system.

WhatsApp preview and email hub (N3, U6)#

Use WhatsApp from the invoice/quote editor, overdue reminders, supplier POs or workshop dossiers. Choose FR, AR or EN, enter the recipient number (Tunisian local numbers receive +216), and edit the preview. Reminder text includes the configured RIB; enabled portals include their public link.

Preview sends nothing. Ouvrir WhatsApp opens wa.me; you review and send there yourself. Attach the downloaded PDF manually. No WhatsApp API, automatic attachment or delivery confirmation is provided.

The native email dialogs handle invoices, POs, client statements, supplier RS certificates and workshop sheets. Check recipient, subject, message and attachments, then click send explicitly. Success/failure and entity are logged in the shared email history. SMTP must be configured; tests use a mocked transport, not real recipients.

Comparative client quotes (N6)#

  1. Save a DEVIS, open Options du devis, and create two or three named options with valid prices and tax/discount assumptions.
  2. Save the options and enable the client portal. The server calculates totals; the public page displays the selectable options.
  3. The client chooses an option, checks the approval amount, enters their name and draws a PNG signature.
  4. Acceptance atomically applies the selected lines and recalculates the quote. A stale/missing version, invalid option or repeated acceptance is rejected.

Only active, unlocked, non-cancelled DEVIS/PROFORMA documents can be accepted. Comparative options belong to DEVIS and are cleared on invoice conversion. Acceptance records an agreement, not a payment. Protect portal URLs as bearer links; revoke a portal to stop access. Signature capture is not a certified qualified-signature service.

Monthly Tunisian tax worksheet (N5)#

Inside Fiscalité & TVA, select the month. Review collected/deductible TVA, prior-month credit, net TVA, stamp duties and paid supplier RS grouped by rate (1%, 1.5%, 3%, 10%, 15%). Foreign amounts convert to DT; credit notes subtract. Supplier RS uses payment month.

ADMIN can save prior credit and optional TCL assumptions (default rate 0.2%). A blank TCL turnover base stays automatic; an explicit value is an override. Unsaved assumptions disable PDF mensuel so the file cannot disagree with the form. Save successfully, then download the A4 preparation sheet. Failed saves retain input for retry.

This is a preparatory worksheet, not an official filed return or legal/tax advice. Your accountant must verify exemptions, deductions, TCL applicability, rates, periods and statutory deadlines before filing. It does not submit to Jibaya or pay the tax office.

Bank CSV reconciliation (N7)#

  1. In Trésorerie, ADMIN opens Importer relevé bancaire and selects an active DT/TND account.
  2. Upload CSV (not XLSX); comma/semicolon delimiters are detected automatically. Map date, label and signed amount or debit/credit columns.
  3. Preview the rows. Suggestions use amount and label matching; they are not decisions. Nothing is selected or recorded automatically.
  4. Select an invoice, expense, manual treasury entry or skip for each row. Check direction, date and amount.
  5. Click Rapprocher & Enregistrer, review the summary and confirm. Cancel records nothing. A failed request retains the preview/selections.

The entire reconciliation is atomic. Invalid/stale selections roll back payments and treasury entries together. Imported fingerprints prevent replay in the same account and survive backup restore. Matching is not a connection to Banque Zitouna and does not initiate transfers. Verify the original bank statement and any withholding/non-cash settlement manually.

Opt-in automation (N8)#

In Abonnements & Automatisations or settings, ADMIN can enable overdue reminders and a utility digest. Both are off by default. Preview/queue sends nothing; manual execution asks for confirmation. Once explicitly enabled, the server scheduler can send automatically via configured SMTP while running.

Reminder thresholds are configurable (default J+7/J+15/J+30). Each reached threshold is deduplicated, a six-day cooldown prevents repeated reminders, simultaneous runs conflict, and the utility digest sends at most once per day. SMTP failures remain retryable and are audited. Recurring invoices support weekly, monthly, bimonthly, quarterly, semiannual and yearly cycles with safe month-end dates and catch-up; successfully auto-emailed documents become SENT.

Recurring invoice catch-up processes at most 24 cycles per profile per run; a larger backlog needs further runs. If a recurring invoice email fails, its generated document stays DRAFT, the failure is logged and the schedule advances. Review and resend that existing document manually rather than generating the same cycle again.

Security, backups and operational checks#

  • PIN unlock sets a signed 12-hour HttpOnly cookie (pp_pin_session). Browser downloads and all seven /print* routes use it; never put a PIN in a URL. Login/unlock guesses are rate-limited. Lock/logout revoke the browser session.
  • ADMIN manages stock, treasury writes, tax assumptions, automation, catalogs, full backups and users. COMMERCIAL handles sales/documents and dossiers but not these administrative writes. COMPTABLE reads/downloads and uses stateless previews; it cannot mutate records or send messages. Secrets are masked for non-admin settings responses.
  • Receipts live under <DATA_DIR>/receipts/, are deduplicated and served through authenticated attachment URLs. Lists omit Base64 bodies. Backups include their bytes once.
  • Schema 4 (version: 4.0.0) backs up 21 row tables plus settings: 22 persistent tables including users/password hashes, print catalogs/dossiers/offcuts, bank fingerprints and email/audit history. SQLite has 23 application tables including sessions. Sessions are never exported and are revoked on restore; old formats remain supported. Backups contain sensitive information: store them securely.
  • QR codes are real byte-mode ISO symbols (versions 1–10). Oversized payloads show an unavailable notice instead of a shortened link. This is not integration with an official tax verification service.
  • The Windows launcher checks Node/installed dependencies, custom PORT, /health, already-running instances and occupied ports. Node must support native SQLite (22.13+ or a newer supported release). Chrome/Edge is needed for PDFs.
  • For isolated QA: npm run check, npm test, npm run docs:build. Tests create temporary databases, use real headless PDFs and mocked SMTP, and do not restart your live server.

New API and schema reference#

All API routes below require authentication; write permissions follow the roles above.

MethodRoutePurpose
GET / POST / PUT / DELETE/api/print/materials, /api/print/boards, /api/print/finishings, plus /:idPrint catalogs
POST/api/print/calculateStateless calculation, optional supplier comparison
GET / POST / PUT / DELETE/api/print/jobs, plus /:idDossiers
POST/api/print/jobs/:id/duplicate, /stock-offcut, /to-document, /to-expenses, /to-posExplicit workflow actions
GET/api/print/jobs/:id/sheet-pdfWorkshop PDF (showCosts=1, ADMIN only)
GET / POST / PUT / DELETE/api/print/offcuts, plus /:idStock and history
GET / PATCH/api/production, /api/print/jobs/:id/productionBoard/stage changes
GET/api/share/preview?entityType=DOCUMENT&entityId=1&language=frRead-only WhatsApp preview
PUT/api/documents/:id/quote-optionsComparative options
GET / PUT/api/reports/monthly-tax, /api/reports/monthly-tax/:periodWorksheet and assumptions
GET/api/reports/monthly-tax-pdf?period=YYYY-MMSaved worksheet PDF
POST/api/treasury/bank/headers, /preview, /reconcileCSV mapping and atomic reconciliation
GET / PUT / POST/api/automation/preview, /settings, /runQueue, opt-ins and dispatch
GET/api/expenses/:id/attachments/:attIdAuthenticated receipt bytes

Additional tables: print_materials, print_boards, print_finishings, print_jobs, print_offcuts, bank_import_rows. Dossiers store configJson, resultJson, conversion links, stage, priority and deadline. Offcuts store source sheet, consumption job ID/number and AVAILABLE/USED history. Documents store comparative options/selection; email/audit logs support entityType/entityId. Payment and expense treasury rows are system-owned: edit/reverse the source rather than delete the synchronized row.

English hub · Expert reference · Global wiki

ProdyPanda Factures — Complete English Documentation Curriculum