═══════════════════════════════════════════════════════════════════════════════ CiC WALKTHROUGH PROMPT — Sales PWA Billing Chain (Stages A–G) URL: https://srv1111289.hstgr.cloud/sales/ SW version: 360sales-v16 Login: harish (PIN) or use Hub session Test dataset: sales/test_billing_data.sql must be loaded Cleanup: sales/test_billing_data_cleanup.sql Custodian: https://srv1111289.hstgr.cloud/finance/custodian/ (custodian-v23 for Stage G) ═══════════════════════════════════════════════════════════════════════════════ Paste this whole block into Claude-in-Chrome. Work through all 8 parts in order. Mark each checkpoint ✅ / ❌ with a one-line note. Take 📸 screenshots where indicated. Report surprises at the end. You are testing as a sales-ops/finance user. The test dataset gives you 4 jobs across the full billing lifecycle. Do NOT delete any seed data. Create/modify only where the checkpoint explicitly says to. ─── PART 1 — Dashboard + Companies ──────────────────────────────────────────── 1.1 Open /sales/. After PIN login, verify dashboard loads. 👉 "Billed ₹" KPI tile shows a rupee amount (NOT "—"). 👉 "Active Jobs" + "Pending Briefs" are numeric. 📸 Dashboard tiles. 1.2 Open All Jobs (bottom nav). Filter to "Billed" status. 👉 "BT-AsianPaints-FlexPrint" job appears (bt-job-d). Filter to "In Execution". 👉 "BT-MktVibes-StoreInauguration" appears (bt-job-c). Clear filter — all bt-job-* should show. 1.3 Verify company dropdown on New Offer form: Offers → + New Offer → find the "Billing from" section. 👉 Dropdown shows "Perfect Marketing Solutions" AND "360 Degree Logical Marketing" (loaded from DB, not hardcoded). ─── PART 2 — Stage A: Offer + HSN/SAC + PO Fields ───────────────────────────── 2.1 Open All Jobs → bt-job-a (BT-AsianPaints-DealerMeet). Offers tab → two offers visible: Draft and Sent. 👉 Both show correct status tags (gray Draft, sky Sent). 2.2 Click ✏️ Edit on the Draft offer (bt-off-1). 👉 Offer form opens with: - "Billing from" dropdown pre-selected to "Perfect Marketing Solutions" - "PO / Work Order" section visible (po_number, po_date, po_amount fields) - Three line items pre-loaded - Each line has an HSN/SAC field and a SVC/MAT toggle button 2.3 Click the SVC/MAT toggle on line 2 (currently MAT for flex print). 👉 Button label flips to "SVC" with blue border. Toggle back → "MAT" again. 2.4 Click into the HSN/SAC input for line 1 (BTL Event Mgmt). 👉 Browser datalist suggestions appear: "998361 — BTL/Event Mgmt (SAC)", "998362 — Exhibition/Activation (SAC)", etc. Select 998361. 2.5 Fill PO Number = "TEST-PO-001", PO Date = today, PO Amount = 200000. Save. ✅ Toast "Offer saved". Re-open edit → PO fields retain the values. 2.6 Navigate to All Offers (📄 bottom nav) → find bt-off-3 (accepted, Verve). 👉 Shows: ✅ Accepted · ₹8,50,000 agreed · "PO/VERVE/2025-26/047" green PO reference visible below the accepted amount. ─── PART 3 — Stage B: PO Document Upload ────────────────────────────────────── 3.1 Open bt-job-b (Confirmed, Punjab BTL). Offers tab → bt-off-3 shows Accepted with PO details. 👉 "📎 Upload Doc" button visible alongside Proforma and Invoice buttons. 3.2 Click "📎 Upload Doc". File picker opens. 👉 Verify the doc type prompt appears (po / loi / email / other). Press Cancel (do NOT upload — just verify it opens correctly). ─── PART 4 — Stage C/D: Proforma Invoice ────────────────────────────────────── 4.1 Open bt-job-b → Offers tab → bt-off-3 (accepted). Click "📋 Proforma". 👉 Advance % modal opens. Pre-set to 50%. Click 40% preset. Value changes to 40. Click Generate. 4.2 Proforma Invoice window opens. 👉 Header: "PROFORMA INVOICE" with PI badge. 👉 Company block: "Perfect Marketing Solutions" with GSTIN, address. 👉 Bill To: Verve Marketing Solutions, GSTIN 27AAACV5678G1Z3. 👉 PO strip (green): "PO/VERVE/2025-26/047 dated 01 June 2026". 👉 Line items table has columns: Item / HSN/SAC / Qty / Rate / Amount. At least one row shows SAC code 998361, another 4911. 👉 Agency Fee @ 10% row. 👉 IGST @ 18% row (Verve is Maharashtra → interstate from PMS Punjab). 👉 Grand Total in large text. 👉 Advance Required (40%) in the green payment schedule box. 👉 Bank details: HDFC + ICICI listed. 👉 WhatsApp share button visible. 📸 Proforma Invoice document. Close window. ─── PART 5 — Stage E: Tax Invoice ───────────────────────────────────────────── 5.1 Open bt-job-c (In Execution, MktVibes Store Inauguration). Click "Invoices" tab. 👉 Tab visible with badge "1" (bt-inv-1 draft invoice). 👉 Draft invoice shows: PMS/26-27/TEST-01 · Draft tag · ₹4,15,360. 👉 "Create Invoice" button at top. 👉 "📤 Issue" and "✏️ Edit" buttons visible on the draft card. (No "Mark Paid" on draft.) 📸 Invoices tab showing draft. 5.2 Click "👁 View" on the draft invoice. Tax Invoice window opens. 👉 "TAX INVOICE" header. "ORIGINAL FOR RECIPIENT" label. 👉 Invoice No: PMS/26-27/TEST-01. 👉 Company block: Perfect Marketing Solutions, GSTIN 03AEBPN2166H2ZT. 👉 Bill To: Marketing vibes, address, state code 07. "Unregistered" marker (no GSTIN for Marketing vibes in seed). 👉 Purpose of Supply box: IGST (since client state 07 ≠ company 03). 👉 PO strip: PO/MV/2026/0012. 👉 Line table: 3 rows with HSN/SAC (998361, 4911, 998399) and Type (Service/Goods). 👉 IGST row @ 18%. 👉 Amount in words: "Four Lakh Fifteen Thousand Three Hundred Sixty Rupees Only" (or similar). 👉 Bank details section. 👉 Print + Email buttons in share bar (no WhatsApp since no phone in seed). 📸 Tax Invoice document. Close window. 5.3 Issue the invoice: click "📤 Issue" → confirm. 👉 Tag changes to purple "Issued". 👉 Job status changes to "Billed" (check via All Jobs filter). 5.4 Payment panel appears below the issued invoice card: 👉 3 tiles: Invoice ₹4,15,360 · Received ₹0 · Balance ₹4,15,360. 👉 Progress bar at 0%. 👉 "+ Record Payment" button visible. 📸 Payment panel. 5.5 Click "+ Record Payment": Modal opens. Fill: Amount = 207680 Mode = Bank Transfer Ref = UTR-TEST-001 Date = today Save. ✅ Toast. 👉 Payment panel updates: Received ₹2,07,680 · Balance ₹2,07,680 · ~50%. 👉 1 receipt listed below with UTR-TEST-001. 👉 Invoice still "Issued" (partial payment, not yet full). 5.6 Record second payment for remaining balance: Amount = 207680 Save. ✅ Toast. 👉 Invoice tag flips to green "Paid" (auto-triggered when sum ≥ total). 👉 Payment panel: Received ≈ ₹4,15,360 · Balance ≈ ₹0 · 100%. 📸 Invoice paid state. ─── PART 6 — Stage E: 360DLM Company Invoice ────────────────────────────────── 6.1 Open bt-job-d (Billed, Asian Paints Flex Print). Invoices tab → bt-inv-2 (360DLM/26-27/TEST-01 — Issued). 👉 Invoice no starts "360DLM/" (correct per 360DLM company). 👉 Payment panel shows: Invoice ₹2,14,170 · Received ₹1,07,085 · Balance ~₹1,07,085 · ~50%. 1 receipt visible. 6.2 View the invoice. 👉 Company header: "360 Degree Logical Marketing" — NOT PMS. 👉 GSTIN: 04AJPPN8866P1Z3 (Chandigarh company). 👉 Client: Park Hospital Pvt Ltd with GSTIN 07AABCP1234F1Z5. 👉 IGST: state 04 vs state 06 → interstate → IGST ✓. 📸 360DLM Tax Invoice. ─── PART 7 — Stage F: Delivery Challan ──────────────────────────────────────── 7.1 Open bt-job-c (In Execution). Click "Challans" tab. 👉 Badge "1". bt-dc-1 shows: DC-PMS/26-27/TEST-01 · open · 🚚 PB10AB1234 · Raju Singh. 👉 "Against: PMS/26-27/TEST-01" shown (linked to invoice). 👉 3 items count. 👉 "✅ Mark Delivered" + "✏️ Edit" buttons. 7.2 Click "👁 View". Challan window opens. 👉 "DELIVERY CHALLAN" header. Challan number shown. 👉 Consignee: Marketing vibes, address. 👉 Dispatch Details: vehicle PB10AB1234 · Driver Raju Singh · From Mohali. 👉 Purpose strip: "Supply of Goods/Services". 👉 Items table: 3 rows with HSN/SAC + qty + unit. 👉 Two signature boxes: "Authorised by" + "Receiver's Signature". 👉 Print button only (no amounts — challan is not a billing doc). 📸 Delivery Challan document. Close. 7.3 Click "📦 Create Challan". Form opens. 👉 Challan number field empty (auto-generated on save). 👉 Date = today. 👉 Consignee pre-filled from job's customer name. 👉 Delivery To pre-filled from job site address. 👉 Invoice link dropdown shows bt-inv-1 (PMS/26-27/TEST-01). 👉 Company select populated. 7.4 Fill a quick test challan: Consignee = "Test Consignee" Item 1 = "Test Banner 30x10" / HSN = 4911 / qty = 3 / unit = nos Save. ✅ Toast "Challan saved". 👉 New challan appears in list with auto-generated DC number in correct DC-PMS/YY-YY/NNN format. Click "✅ Mark Delivered" → confirm. 👉 Status changes to green "delivered". 7.5 Open bt-job-b (Confirmed, Punjab BTL). Challans tab. 👉 bt-dc-2 shows "delivered" (green left border) with delivered tick. 👉 2 items count. Linked to PMS/26-27/TEST-02 invoice. ─── PART 8 — Stage G: Settlement via Custodian ──────────────────────────────── 8.1 Open /finance/custodian/. Login as harish. Go to Transfer screen. Role = Receiver. Category = Party. Search "Park Hospital" in payee search. Select "Park Hospital Pvt Ltd". 8.2 Invoice dropdown appears below the receipt purpose field. 👉 "Link to Sales Invoice" label visible. 👉 Dropdown contains: "360DLM/26-27/TEST-01 · Park Hospital Pvt Ltd · ₹1,07,085 due" (and possibly others from real production data). 📸 Invoice link dropdown. 8.3 Select "360DLM/26-27/TEST-01". 👉 Amount field auto-fills with ₹1,07,085 (balance due). 👉 Balance label appears: "Balance due: ₹1,07,085 of ₹2,14,170 total". 8.4 Complete the receipt: Mode = Bank Transfer Ref = UTR-CUST-TEST-001 Save. ✅ Toast receipt saved. 8.5 Return to /sales/ → bt-job-d (Billed) → Invoices tab. 👉 bt-inv-2 status is now "Paid" (auto-triggered by the link). 👉 Payment panel shows 2 receipts: the seed 107085 + this custodian receipt. 👉 Progress 100%. 📸 Invoice fully paid after custodian receipt. ─── CLEANUP (test-created rows only) ────────────────────────────────────────── After testing, remove rows you created (test challan from 7.4, payments from 5.5/5.6). The bt- seed rows are cleaned via: docker exec -i postgres psql -U lmadmin -d lm360 \ < /var/www/360lm/sales/test_billing_data_cleanup.sql ─── Summary checklist ────────────────────────────────────────────────────────── [ ] Part 1 — Dashboard + company dropdown [ ] Part 2 — Offer form: HSN/SAC + PO fields + SVC/MAT toggle [ ] Part 3 — PO doc upload trigger [ ] Part 4 — Proforma Invoice document [ ] Part 5 — Tax Invoice create, issue, part-pay, full-pay [ ] Part 6 — 360DLM company invoice [ ] Part 7 — Delivery Challan create + view + deliver [ ] Part 8 — Custodian settlement loop ═══════════════════════════════════════════════════════════════════════════════ SURPRISES / DEVIATIONS: ═══════════════════════════════════════════════════════════════════════════════