# acc-tax-reighteen/analisa-orderan-pending architecture

> Architecture diagram of the GitHub repository acc-tax-reighteen/analisa-orderan-pending, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/acc-tax-reighteen/analisa-orderan-pending
- Repository: https://github.com/acc-tax-reighteen/analisa-orderan-pending

## Overview

This is an automated pending-order reconciliation tool for IRC and ZN. Its main workflow downloads order trackers, filters them, extracts invoice details from cell notes, matches those details against local historical AR workbooks, checks outstanding balances in ARVIEWER, produces formatted Excel reports, and optionally marks paid note lines in Google Sheets. The orchestrator’s script dispatch is visible in source; the documented stage-to-stage data flow and some capabilities are described in the README, so those links cite it rather than implying direct calls between scripts.

Main entry points: [`Jalankan Cek Orderan Gandul.py`](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Jalankan%20Cek%20Orderan%20Gandul.py) (Pipeline runner), [`Dapur/4_LookupDatas.py`](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/4_LookupDatas.py) (Invoice lookup), [`Dapur/5_Cek Pelunasan.py`](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/5_Cek%20Pelunasan.py) (Payment check), [`Dapur/1_Unduh File.py`](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/1_Unduh%20File.py) (Tracker download)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Pipeline orchestration"]
  node_orchestrator["Pipeline runner"]
end

subgraph group_orders["Order processing"]
  node_download["Tracker download<br/>[1_Unduh File.py]"]
  node_filter["Pending filter"]
  node_extract["Note extraction<br/>[3_Ekstrak Komen.py]"]
end

subgraph group_reconcile["AR reconciliation"]
  node_lookup["Invoice lookup<br/>[4_LookupDatas.py]"]
  node_payment["Payment check<br/>[5_Cek Pelunasan.py]"]
end

subgraph group_results["Reports and writeback"]
  node_finalize["Report finalization"]
  node_report["IRC / ZN reports"]
  node_writeback["Paid-note writeback<br/>[7_AddPayToSS.py]"]
end

node_admin(("Operator"))
node_sheets[("Google Sheets")]
node_historical[("Historical AR files")]
node_arviewer[("ARVIEWER workbook")]

node_admin -->|"starts"| node_orchestrator
node_orchestrator -->|"runs"| node_download
node_orchestrator -->|"runs"| node_filter
node_orchestrator -->|"runs"| node_extract
node_orchestrator -->|"runs"| node_lookup
node_orchestrator -->|"runs"| node_payment
node_orchestrator -->|"runs"| node_finalize
node_orchestrator -->|"runs"| node_writeback
node_sheets -->|"exports trackers"| node_download
node_download -->|"tracker files"| node_filter
node_filter -->|"filtered workbooks"| node_extract
node_extract -->|"invoice rows"| node_lookup
node_historical -->|"reads invoices"| node_lookup
node_lookup -->|"matched invoices"| node_payment
node_arviewer -->|"reads balances"| node_payment
node_payment -->|"payment statuses"| node_finalize
node_finalize -->|"writes reports"| node_report
node_report -->|"supplies analysis"| node_writeback
node_writeback -->|"updates notes"| node_sheets

click node_orchestrator "https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Jalankan%20Cek%20Orderan%20Gandul.py"
click node_download "https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/1_Unduh%20File.py"
click node_filter "https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/2_Hapus%20dan%20Filter%20Data.py"
click node_extract "https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/3_Ekstrak%20Komen.py"
click node_lookup "https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/4_LookupDatas.py"
click node_payment "https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/5_Cek%20Pelunasan.py"
click node_finalize "https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/6_FinalisasiData.py"
click node_writeback "https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/7_AddPayToSS.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_orchestrator toneBlue
class node_download,node_filter,node_extract,node_sheets,node_historical,node_arviewer toneAmber
class node_lookup,node_payment toneMint
class node_finalize,node_report,node_writeback toneRose
class node_admin toneIndigo
```

## Components

### Pipeline orchestration

- [Pipeline runner](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Jalankan%20Cek%20Orderan%20Gandul.py): `Jalankan Cek Orderan Gandul.py`

### Order processing

- [Tracker download](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/1_Unduh%20File.py): `Dapur/1_Unduh File.py`
- [Pending filter](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/2_Hapus%20dan%20Filter%20Data.py): `Dapur/2_Hapus dan Filter Data.py`
- [Note extraction](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/3_Ekstrak%20Komen.py): `Dapur/3_Ekstrak Komen.py`

### AR reconciliation

- [Invoice lookup](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/4_LookupDatas.py): `Dapur/4_LookupDatas.py`
- [Payment check](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/5_Cek%20Pelunasan.py): `Dapur/5_Cek Pelunasan.py`

### Reports and writeback

- [Report finalization](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/6_FinalisasiData.py): `Dapur/6_FinalisasiData.py`
- **IRC / ZN reports**
- [Paid-note writeback](https://github.com/acc-tax-reighteen/analisa-orderan-pending/blob/main/Dapur/7_AddPayToSS.py): `Dapur/7_AddPayToSS.py`

### Other components

- **Operator**
- **Google Sheets**
- **Historical AR files**
- **ARVIEWER workbook**

## Connections

- Operator → Pipeline runner: starts (evidence: `README.md`)
- Pipeline runner → Tracker download: runs (evidence: `Jalankan Cek Orderan Gandul.py`)
- Pipeline runner → Pending filter: runs (evidence: `Jalankan Cek Orderan Gandul.py`)
- Pipeline runner → Note extraction: runs (evidence: `Jalankan Cek Orderan Gandul.py`)
- Pipeline runner → Invoice lookup: runs (evidence: `Jalankan Cek Orderan Gandul.py`)
- Pipeline runner → Payment check: runs (evidence: `Jalankan Cek Orderan Gandul.py`)
- Pipeline runner → Report finalization: runs (evidence: `Jalankan Cek Orderan Gandul.py`)
- Pipeline runner → Paid-note writeback: runs (evidence: `Jalankan Cek Orderan Gandul.py`)
- Google Sheets → Tracker download: exports trackers (evidence: `Dapur/1_Unduh File.py`)
- Tracker download → Pending filter: tracker files (evidence: `README.md`)
- Pending filter → Note extraction: filtered workbooks (evidence: `README.md`)
- Note extraction → Invoice lookup: invoice rows (evidence: `README.md`)
- Historical AR files → Invoice lookup: reads invoices (evidence: `README.md`)
- Invoice lookup → Payment check: matched invoices (evidence: `README.md`)
- ARVIEWER workbook → Payment check: reads balances (evidence: `Dapur/5_Cek Pelunasan.py`)
- Payment check → Report finalization: payment statuses (evidence: `README.md`)
- Report finalization → IRC / ZN reports: writes reports (evidence: `README.md`)
- IRC / ZN reports → Paid-note writeback: supplies analysis (evidence: `Dapur/7_AddPayToSS.py`)
- Paid-note writeback → Google Sheets: updates notes (evidence: `Dapur/7_AddPayToSS.py`)
