Skip to content

The Inventory Application

This page maps the application project itself — smartsoft_inventory/INVENTORY/ — the part that lives in this repository. It is deliberately thin: screens, per-transaction glue, and the global module state. The heavy logic sits in the FrameWork.

Top-level layout

smartsoft_inventory/
├── INVENTORY.sln                 # solution: app + setup project
├── SetupInventory/               # VS setup/installer project (IDE-only build)
└── INVENTORY/
    ├── MenuUtama.vb              # main menu + login (shown after Sub Main)
    ├── Module/                   # globals, Sub Main, helpers
    ├── Class/                    # per-transaction posting logic
    ├── Form/                     # all WinForms screens, grouped by area
    ├── DataSet1.xsd             # typed dataset shared by forms/reports
    └── My Project/ · Resources/  # VB project metadata + assets

Module/ — globals & bootstrap

File Contents
VariablePublic.vb The heart of the app. Sub Main (entry point), all global singletons/session vars, and ButtonAccess. Read this first. See Session State.
Common.vb Process / progress enums shared across batch operations.
Option.vb, Resolution.vb App options; screen scaling/DPI handling.
ZipLib.vb, FreeMemory.vb, IProcessEvent.vb Compression; memory release; process-event interface.
MessageBox/ Custom dialog forms.

Class/ — transaction logic

Each class encapsulates loading and posting one transaction type. They are thin: a few write-only properties (ConnStr, Cabang, NoDoc, Tanggal, LokasiGudang), a Proses…() poster, an UpdateStock(), and Pembatalan…() reversal methods.

Class Transaction
PenerimaanBarang.vb Goods receipt (BPB) — the canonical example.
ReturBarang.vb Return to supplier.
RePackingBarang.vb Repackaging.
MemoPenyesuaianPersediaan.vb Inventory adjustment memo (MPP).
BarangHilang.vb Lost goods / shrinkage (also serves own-use reversal).
PrintNota.vb Reprints Crystal Reports documents by type.
ProsesLaporanPenjualan.vb Sales-report processing.
MyFunction.vb App-local helpers (LocFunc), incl. a generic UpdateStock.

See Transactions & Posting for the posting pattern in detail.

Form/ — the screens

Forms (frmXxx.vb) are grouped by functional area. This grouping is the app's feature map:

flowchart LR
    subgraph Form["INVENTORY/Form/"]
        M["Master/<br/>item, supplier, customer,<br/>store, POS, promo"]
        T["Transaksi/<br/>receipt, return, transfer,<br/>opname, disposal, cashier"]
        P["Proses/<br/>daily/monthly close,<br/>recompute, backup/restore"]
        L["Laporan/<br/>Crystal Reports viewers"]
        A["Approval/<br/>price/order/target sign-off"]
        H["Help/<br/>pickers, kartu stock,<br/>transaction browsers"]
        TD["TransferData/<br/>inter-branch sync"]
        U["Utility/<br/>users, login, access,<br/>settings, audit, licensing"]
    end
    style M fill:#e3f2fd,stroke:#1976d2
    style T fill:#e8f5e9,stroke:#388e3c
    style P fill:#fff3e0,stroke:#f57c00
Folder Purpose
Master/ Master-data maintenance — Barang (items), Customer, Supplier, Toko, POS, Promosi.
Transaksi/ Transactions, in numbered subfolders (see below), plus Kasir, SalesOrder, Piutang, Service.
Proses/ Batch processes — daily/monthly closing, avg-cost & stock recompute, backup/restore, report generation.
Laporan/ Crystal Reports viewers, grouped by report family.
Approval/ Approval workflows — price proposals, suggested orders, sales targets, min/max stock.
Help/ Lookup/picker dialogs, frmKartuStock (stock card), transaction browsers.
TransferData/ Inter-branch data synchronisation.
Utility/ User/login/access admin, system settings, audit trail, licensing.

Transaksi/ subfolders

The numbered folders line up with the BOH_TIPEDOC document codes:

Folder Transaction Type
1 - Penerimaan Goods receipt 1
2 - Retur Return to supplier 2
4 - BarangHilang Lost goods 4
5_6 - Mutasi Stock transfer out/in (& consignment) 3, 5, 6
7 - StockOpname Physical stock count 7 (own OPH_/OPD_ tables)
8 - Pemusnahan Disposal / write-off 8
9 - RePacking Repackaging 9
A - MPP Inventory adjustment memo M
S - PemakaianSendiri Own/internal use S
Harga, Kasir, Piutang, SalesOrder, Service, Sortir, TitipBarang, Permintaan Barang Pricing, cashier, receivables, orders, service, sorting, goods-holding, requisitions

How a screen becomes a transaction

flowchart TD
    A["frmInput… form<br/>(Master or Transaksi)"] --> B["User enters header + detail lines<br/>into a draft (tbTr_BoTrans_H/D)"]
    B --> C["Save → transaction Class<br/>(e.g. PenerimaanBarang)"]
    C --> D["Proses…(): copy draft → posted<br/>tbTr_BackOffice_H/D"]
    D --> E["UpdateStock(): move inventory<br/>via cSTOK (BLL STOCK)"]
    E --> F["Print (Struk / Crystal) + refresh grid"]
    style B fill:#fff3e0,stroke:#fb8c00
    style D fill:#e8f5e9,stroke:#388e3c

DataSet1.xsd and typed datasets

DataSet1.xsd (app root) and the Class/DataSet/ datasets (DataSetTransaksi, DataSetTemporary) are typed datasets shared between forms and Crystal Reports — they define the in-memory shapes reports bind to.

Finding a feature fast

Start from the folder name. A bug in "goods receipt" is under Form/Transaksi/1 - Penerimaan/ (UI) and Class/PenerimaanBarang.vb (posting). A bug in "stock card" is Form/Help/frmKartuStock. The Indonesian folder names are your index — keep the Glossary open.