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.0.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.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: garment_piece_rate-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 fa26bbdde50b552f76c6930a4d53f1ec6202f4193d849b3acb1711e8882a738f
MD5 724b7a141e33ce6c1e41713316f81c87
BLAKE2b-256 e7af926b435d28fdd2092c8829f945b487367de66160e3f86b96307ab5aebcbb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for garment_piece_rate-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0120942b83d47cefaf9b033c11997d1033b39847d94e453d6039d71e76afd559
MD5 438a84bb59467efaa93f1e774965091f
BLAKE2b-256 6007c64c2f50caf1d7b82e29d2adfcefc8d084d701f181afd2ec521408991297

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