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

Uploaded Python 3

File details

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

File metadata

  • Download URL: garment_piece_rate-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0ff931d24308c1915738da78f8447f2932031cd27a89c4e7c2dc35744089b081
MD5 39db99d3effe69bc55be201ca3921fe4
BLAKE2b-256 a7379e07e472bbb6d29775c1ff8ee488b57e4ff67c2789cef4ceead4f97ef918

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for garment_piece_rate-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95f437c63d8ca29c7df1ea44fd52cf3b7277afdcd3261d0ecebc7f672956b439
MD5 632779735831558906f840c6d6d4ee79
BLAKE2b-256 c69a806577798d05c46602787803745862129c2eed67d47792922510a394a8fd

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