Skip to content

drmcoder/garment-dhu-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

garment-dhu-calculator

Powered by Scan ERP License: MIT

DHU (Defects Per Hundred Units) calculator for garment industry quality control.

Daily QC metric used across CMT factories worldwide. Built and used in production by Scan ERP — a 100+ machine garment factory ERP that tracks DHU in real time from bundle-level damage reports.

Two languages, same logic

Language Install Source
Node.js / TypeScript npm install garment-dhu-calculator npm/
Python 3.7+ pip install garment-dhu-calculator python/

Formula

DHU = (Total defects found / Total garments inspected) × 100

Critical: DHU counts defects, not defective pieces. One garment can have multiple defects — all are counted.

Example: 250 garments, 35 defects → DHU = 14.

API surface (identical in both languages)

  • calculateDHU / calculate_dhu — basic DHU
  • calculateDHUByType / calculate_dhu_by_type — breakdown by defect type
  • aggregateDailyDHU / aggregate_daily_dhu — across multiple checkers
  • classifyDHU / classify_dhu — industry benchmark classification

Industry benchmarks

DHU range Classification
≤ 5% EXCELLENT
≤ 10% GOOD
≤ 15% ACCEPTABLE
≤ 25% POOR
> 25% CRITICAL

Try Scan ERP

This calculator is free. The full ERP that auto-computes DHU from every damage report on the factory floor — with photo evidence and severity classification — is at scanerp.pro.

License

MIT © Santosh Rijal / Scan ERP

Related

Related Packages — Scan ERP Garment Toolkit

Part of the Scan ERP open-source garment toolkit — production-tested utilities for CMT factory operations, all MIT licensed:

See the curated awesome-garment-erp list for the full Scan ERP ecosystem, or visit scanerp.pro for the production garment manufacturing ERP this toolkit powers.

Releases

No releases published

Packages

 
 
 

Contributors