Skip to main content

Piece-rate wage calculator for CMT garment factories. Formula: pieces x rate x skill multiplier + machine bonus + efficiency bonus - quality penalty. Built and used in production by Scan ERP.

Project description

garment-piece-rate

Piece-rate wage calculator for CMT garment factories. Built and used in production by Scan ERP.

PyPI version License: MIT

Install

pip install garment-piece-rate

Usage

from garment_piece_rate import calculate_piece_rate

result = calculate_piece_rate(
    pieces=250,
    rate_per_piece=2.50,
    skill_level="expert",
    quality_score=95,
    efficiency_percent=110,
    machine_type="OVERLOCK_5THREAD",
)
print(result)
# {
#   'gross': 906.95,
#   'breakdown': { 'base': 781.25, 'machine_bonus': 39.06, 'efficiency_bonus': 78.13, ... }
# }

Formula

adjusted_rate    = rate_per_piece × skill_multiplier
base             = pieces × adjusted_rate
machine_bonus    = base × machine_complexity_bonus[machine_type]
efficiency_bonus = base × 0.05 (if 100-109%) OR base × 0.10 (if 110%+)
quality_penalty  = base × (quality_threshold − quality_score) / 100  [if score below threshold]

gross = base + machine_bonus + efficiency_bonus − quality_penalty

Background

Piece-rate calculation is the core wage formula in CMT garment factories. Without automation, supervisor judgment causes 5-15% of wages to be disputed each month. This package implements the formula used by Scan ERP which has automated piece-rate for 115,370+ pieces in production.

Related Reading

License

MIT — Built by Santosh Rijal of Scan ERP

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

garment_piece_rate-1.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

garment_piece_rate-1.0.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file garment_piece_rate-1.0.2.tar.gz.

File metadata

  • Download URL: garment_piece_rate-1.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.1

File hashes

Hashes for garment_piece_rate-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b068e9800d804d171b8789b8208019a2bd5ff14c9805ca0f9ce20d805f659410
MD5 15218bc6a55fe78dae8a9f529773c6b8
BLAKE2b-256 e056807354edb66ff88fa14e588f4a2413608cfc4eda325586ccde8e96b61bd5

See more details on using hashes here.

File details

Details for the file garment_piece_rate-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for garment_piece_rate-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8c1af1c77b4bb7b48bd7fc0dfadd10acdd5f9ed85f6c33644f9a504f03cfeb2e
MD5 e09e56657ee524efad8e44fb15b70c33
BLAKE2b-256 d41d1b831f4f42221c24dfb6e2ef5d21bee7c10650aba509031c9119558488fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page