Skip to content

Bridging the gap between legacy and leading-edge tech to power operational excellence.

Notifications You must be signed in to change notification settings

pwislowski/transfer_pricing_cycle_tool

Repository files navigation

Transfer Pricing Cycle Tool

A CLI tool to convert SAP price list files into SAP upload templates and communication (comms) files. It supports default currency configuration, structured logging, and testable processing workflows.

This tool is part of an operational excellence effort to streamline and automate time-sensitive pricing cycle tasks.

Requirements

  • Python 3.12+
  • uv (recommended for dependency management)

Install

uv sync

CLI

uv tool install .

Run

The CLI uses subcommands:

  • sap — generate SAP upload only
  • comms — generate comms files only
  • full — generate both

Examples:

If installed as a CLI tool:

pricing_cycle_tool -h

Otherwise:

uv run -m transfer_pricing_cycle_tool.cli sap input/price_list.xlsb
uv run -m transfer_pricing_cycle_tool.cli comms input/price_list.xlsb --ref input/ref1.xlsx --ref input/ref2.xlsx
uv run -m transfer_pricing_cycle_tool.cli full input/price_list.xlsb --ref input/ref1.xlsx --ref input/ref2.xlsx

You can also pass multiple ref files via a comma-separated list:

uv run -m transfer_pricing_cycle_tool.cli full input/price_list.xlsb --ref input/ref1.xlsx,input/ref2.xlsx

Output

Files are written under ./output:

  • output/sap_upload/sap_upload.xlsx
  • output/comms/*.xlsx

Configuration

Configuration is read from config.yaml (section forex_config, price_list_config, zvaz_config).

To avoid prompts for missing currencies, define defaults:

forex_config:
  default_currencies:
    - company_code: PL01
      ticker: PLN

If a sending company is not configured, the tool will prompt for a currency.

Logging

Structured logs are emitted in JSON.
Each run writes a log file under ./logs in addition to stdout.

Tests

uv run pytest

About

Bridging the gap between legacy and leading-edge tech to power operational excellence.

Resources

Stars

Watchers

Forks

Packages

No packages published