LA MEMORIA / P&L + DO
Key Account · Setup Form

One-click P&L and DO:
20 things to confirm

Quotation, supplier bills and client invoices all in the App. Job closes, P&L generates itself. Same data prints the DO. Pick an answer for each question below, then send it back. Nothing to install.

1

The flow

One line runs through everything: the quotation row
Have

Job

Client, PIC, GP target.

jobs
Have

Quotation rows

Selling price. The spine.

quotation_items
Add FK

Cost + PO

Today links to job only. Must link to the row.

supplier_comparisons
New

Supplier bill rows

One bill splits across rows and jobs.

supplier_invoice_items
Upgrade

P&L, one click

Per row, per category, per job.

project_profit_loss
New

Delivery Order

Tick rows, print PDF. Runs parallel.

delivery_orders
New

Client Invoice

Revenue side. Today just a typed number.

client_invoices

Not inventing this

Your Excel already works this way. We turn row alignment into a real link.

2

Your Excel, decoded

One sheet doing three jobs
Left · B to Iclient sees this
DescriptionC
QTYG
Unit PriceH
AmountI = H × G
Right · J to Qinternal only
Actual / Est. costL
Mark upM = N ÷ L
GP AmountN = I − L
Inv No / LinkO · P

The whole sheet is one idea: GP = sell − cost, on the same row.

3

What's missing

Not a rebuild. 4 links to add
MissingTodayResult
Row ↔ cost linkCost hangs on job_id only. No link to the quotation row.Job-level GP only. Per-row GP impossible.P1
Bill line itemsOne bill = one amount, one category.Bills covering many rows or jobs can't be split.P1
Client invoiceNo table. Amount typed by hand.Revenue side stays manual.P2
Delivery OrderDoes not exist.Still made outside the App.P3
4

20 questions

Pick one per question. Yellow = our suggestion

Send it back

Answer what you can. Blanks are fine, we will follow up on those.

0 of 20 answered
5

Build order

Order is fixed. No foundation, no P&L
Phase 1 · Foundation

Connect the cost line

  • New supplier_invoice_items, split per row and job
  • quotation_item_id on comparisons and POs
  • Allow Unquoted costs
  • Lock ex-SST maths
Needs: A1 A2 A3 B1 B2 E1 E2
Phase 2 · Payoff

One-click P&L

  • project_profit_loss rebuilt row-level
  • Quotation page grows your Excel's right half. Zero retraining
  • Row → category → job, three levels
  • Estimated / Actual + Close P&L
Mostly SQL once P1 lands
Phase 3 · Parallel

DO + Client Invoice

  • delivery_orders + items
  • Tick rows, edit qty, add reprints
  • Reuse the Quotation PDF engine
  • Delivered vs quoted tracking
Needs: C1 C2 D1