# acc-tax-reighteen/automasi-ar-orderan architecture

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

- Interactive diagram: https://gitdiagram.com/acc-tax-reighteen/automasi-ar-orderan
- Repository: https://github.com/acc-tax-reighteen/automasi-ar-orderan

## Overview

Automasi AR Orderan is a Python pipeline that prepares Accurate accounts-receivable and optional giro exports, enriches customer data with Google Sheets references, then fills empty order-tracker cells with an AR total and structured customer-credit notes. The main user flow starts at the launcher and ends in a recurring Google Sheets sync. The README describes the broader enrichment capabilities; some processing links below are documented there because the excerpts do not show every read/write handoff.

Main entry points: [`Dapur/6_InjectDataToSS.py`](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/6_InjectDataToSS.py) (AR sync and notes), [`Dapur/0_DownloaderData.py`](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/0_DownloaderData.py) (Reference downloader), [`Jalankan Automasi.py`](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Jalankan%20Automasi.py) (Automation launcher), [`Dapur/0_HDownloaderData.py`](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/0_HDownloaderData.py) (Backup downloader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Run control"]
  node_launcher["Automation launcher"]
  node_pipeline_scripts["Preparation scripts"]
end

subgraph group_preparation["Data preparation"]
  node_primary_download["Reference downloader"]
  node_demo_download["Backup downloader"]
  node_ar_cleaner["AR cleaner<br/>[1_CleanerAccAR.py]"]
  node_depo_cleaner["DEPO AR cleaner<br/>[1_CleanerAccARD.py]"]
  node_giro_cleaner["Giro cleaner"]
  node_giro_filter["Expired giro filter"]
  node_date_format["Date formatting<br/>[5_AdjDateFormat.py]"]
end

subgraph group_enrichment["Reference enrichment"]
  node_giro_join["Giro due-date enrichment"]
  node_cash_fallback["Cash-customer fallback"]
  node_prepared_ar["Prepared AR workbook"]
end

subgraph group_sync["Order tracker sync"]
  node_injector["AR sync and notes"]
  node_credentials["Service account<br/>[credentials.json]"]
end

node_operator(("Operator"))
node_accurate_ar["Accurate AR export"]
node_accurate_giro["Accurate giro export"]
node_owing_source[("OWING reference")]
node_avg_source[("AVG reference")]
node_fallback_source[("FallbackCash reference")]
node_target_sheet[("Order tracker")]

node_operator -->|"starts"| node_launcher
node_launcher -->|"requires"| node_accurate_ar
node_launcher -->|"runs scripts"| node_pipeline_scripts
node_accurate_ar -->|"reads export"| node_ar_cleaner
node_accurate_ar -->|"reads export"| node_depo_cleaner
node_accurate_giro -->|"reads export"| node_giro_cleaner
node_primary_download -->|"downloads"| node_owing_source
node_primary_download -->|"downloads"| node_avg_source
node_primary_download -->|"downloads"| node_fallback_source
node_demo_download -.->|"downloads backup"| node_owing_source
node_demo_download -.->|"downloads backup"| node_avg_source
node_ar_cleaner -->|"writes workbook"| node_prepared_ar
node_depo_cleaner -->|"writes workbook"| node_prepared_ar
node_giro_cleaner -.->|"provides giro data"| node_giro_filter
node_giro_filter -.->|"filters dates"| node_giro_join
node_giro_join -->|"adds due dates"| node_prepared_ar
node_fallback_source -->|"provides customers"| node_cash_fallback
node_cash_fallback -->|"adds missing customers"| node_prepared_ar
node_prepared_ar -->|"formats dates"| node_date_format
node_date_format -.->|"supplies prepared data"| node_injector
node_owing_source -->|"informs notes"| node_injector
node_avg_source -->|"informs notes"| node_injector
node_injector -->|"fills cells and notes"| node_target_sheet
node_credentials -->|"authenticates"| node_injector

click node_launcher "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Jalankan%20Automasi.py"
click node_pipeline_scripts "https://github.com/acc-tax-reighteen/automasi-ar-orderan/tree/main/Dapur"
click node_primary_download "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/0_DownloaderData.py"
click node_demo_download "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/0_HDownloaderData.py"
click node_ar_cleaner "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/1_CleanerAccAR.py"
click node_depo_cleaner "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/1_CleanerAccARD.py"
click node_giro_cleaner "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/2_CleanerAccGiro.py"
click node_giro_filter "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/2_HCleanerAccGiroDue.py"
click node_giro_join "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/3_AddGiroToSheet.py"
click node_cash_fallback "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/4_PatchFallbackCash.py"
click node_date_format "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/5_AdjDateFormat.py"
click node_injector "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/6_InjectDataToSS.py"
click node_credentials "https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/credentials.json"

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_launcher,node_pipeline_scripts toneBlue
class node_primary_download,node_demo_download,node_ar_cleaner,node_depo_cleaner,node_giro_cleaner,node_giro_filter,node_date_format,node_owing_source,node_avg_source,node_fallback_source,node_target_sheet toneAmber
class node_giro_join,node_cash_fallback,node_prepared_ar toneMint
class node_injector,node_credentials toneRose
class node_operator,node_accurate_ar,node_accurate_giro toneIndigo
```

## Components

### Run control

- [Automation launcher](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Jalankan%20Automasi.py): `Jalankan Automasi.py`
- [Preparation scripts](https://github.com/acc-tax-reighteen/automasi-ar-orderan/tree/main/Dapur): `Dapur`

### Data preparation

- [Reference downloader](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/0_DownloaderData.py): `Dapur/0_DownloaderData.py`
- [Backup downloader](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/0_HDownloaderData.py): `Dapur/0_HDownloaderData.py`
- [AR cleaner](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/1_CleanerAccAR.py): `Dapur/1_CleanerAccAR.py`
- [DEPO AR cleaner](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/1_CleanerAccARD.py): `Dapur/1_CleanerAccARD.py`
- [Giro cleaner](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/2_CleanerAccGiro.py): `Dapur/2_CleanerAccGiro.py`
- [Expired giro filter](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/2_HCleanerAccGiroDue.py): `Dapur/2_HCleanerAccGiroDue.py`
- [Date formatting](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/5_AdjDateFormat.py): `Dapur/5_AdjDateFormat.py`

### Reference enrichment

- [Giro due-date enrichment](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/3_AddGiroToSheet.py): `Dapur/3_AddGiroToSheet.py`
- [Cash-customer fallback](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/4_PatchFallbackCash.py): `Dapur/4_PatchFallbackCash.py`
- **Prepared AR workbook**

### Order tracker sync

- [AR sync and notes](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/6_InjectDataToSS.py): `Dapur/6_InjectDataToSS.py`
- [Service account](https://github.com/acc-tax-reighteen/automasi-ar-orderan/blob/main/Dapur/credentials.json): `Dapur/credentials.json`

### Other components

- **Operator**
- **Accurate AR export**
- **Accurate giro export**
- **OWING reference**
- **AVG reference**
- **FallbackCash reference**
- **Order tracker**

## Connections

- Operator → Automation launcher: starts (evidence: `README.md`)
- Automation launcher → Accurate AR export: requires (evidence: `Jalankan Automasi.py`)
- Automation launcher → Preparation scripts: runs scripts (evidence: `Jalankan Automasi.py`)
- Accurate AR export → AR cleaner: reads export (evidence: `Dapur/1_CleanerAccAR.py`)
- Accurate AR export → DEPO AR cleaner: reads export (evidence: `Dapur/1_CleanerAccARD.py`)
- Accurate giro export → Giro cleaner: reads export (evidence: `README.md`)
- Reference downloader → OWING reference: downloads (evidence: `Dapur/0_DownloaderData.py`)
- Reference downloader → AVG reference: downloads (evidence: `Dapur/0_DownloaderData.py`)
- Reference downloader → FallbackCash reference: downloads (evidence: `Dapur/0_DownloaderData.py`)
- Backup downloader → OWING reference: downloads backup (evidence: `Dapur/0_HDownloaderData.py`)
- Backup downloader → AVG reference: downloads backup (evidence: `Dapur/0_HDownloaderData.py`)
- AR cleaner → Prepared AR workbook: writes workbook (evidence: `Dapur/1_CleanerAccAR.py`)
- DEPO AR cleaner → Prepared AR workbook: writes workbook (evidence: `Dapur/1_CleanerAccARD.py`)
- Giro cleaner → Expired giro filter: provides giro data (evidence: `README.md`)
- Expired giro filter → Giro due-date enrichment: filters dates (evidence: `README.md`)
- Giro due-date enrichment → Prepared AR workbook: adds due dates (evidence: `Dapur/3_AddGiroToSheet.py`)
- FallbackCash reference → Cash-customer fallback: provides customers (evidence: `Dapur/4_PatchFallbackCash.py`)
- Cash-customer fallback → Prepared AR workbook: adds missing customers (evidence: `Dapur/4_PatchFallbackCash.py`)
- Prepared AR workbook → Date formatting: formats dates (evidence: `Dapur/5_AdjDateFormat.py`)
- Date formatting → AR sync and notes: supplies prepared data (evidence: `README.md`)
- OWING reference → AR sync and notes: informs notes (evidence: `README.md`)
- AVG reference → AR sync and notes: informs notes (evidence: `README.md`)
- AR sync and notes → Order tracker: fills cells and notes (evidence: `README.md`)
- Service account → AR sync and notes: authenticates (evidence: `README.md`)
