🧮 walter75 - Calculation
Advanced product cost calculation and pricing engine with formula support
Manufacturing
Costing
Pricing
Simulation
📋 Overview
A comprehensive cost calculation and pricing solution for manufacturing companies. Calculate precise product costs based on Bill of Materials (BOM), Routing, and custom formulas. Support for lot size simulations, production order tracking, post-calculations, and flexible calculation templates with variables.
📐 Formula Engine
Powerful formula parser with custom variables and functions
🏭 BOM Integration
Automatic material cost calculation from Production BOMs
⚙️ Routing Integration
Labor and machine cost calculation from Routings
📊 Lot Size Simulation
Compare costs across different production quantities
📝 Templates
Reusable calculation templates with line structures
🔄 Post-Calculation
Compare planned vs. actual costs after production
🔢 Technical Details
Object ID Range: 90800-90899
Dependencies: None (standalone app)
Target Platform: Business Central Cloud 27.0+
📦 Installation
1
Download Extension
Download the latest .app file from Releases
2
Install in Business Central
Install via Extension Management in Business Central
3
Configure Number Series
Open Sales & Receivables Setup and assign number series for SEW Calc Nos.
4
Create Variables & Templates
Set up calculation variables (e.g., overhead %) and templates
🏗️ Architecture
Core Components
Tables (Data Model)
90800 SEW Calc Template: Calculation template definitions
90801 SEW Calc Variable: Reusable calculation variables
90802 SEW Calc Template Line: Template line structure
90803 SEW Calc Header: Calculation header (master record)
90804 SEW Calc Line: Calculation detail lines with formulas
90805 SEW Calc Simulation Header: Lot size simulation headers
90806 SEW Calc Simulation Line: Simulation scenario lines
90807 SEW Calc History Entry: Calculation change history
Codeunits (Business Logic)
90850 SEW Calc Engine: Main calculation engine with formula evaluation
90851 SEW Calc Formula Parser: Formula parsing and variable substitution
90852 SEW Calc Price Management: Price source handling (BOM/Routing)
90853 SEW Calc Template Management: Template lifecycle (copy, release, archive)
90854 SEW Calc Simulation Mgt.: Lot size simulation engine
90855 SEW Calc Integration Mgt.: Sales integration event subscribers
90856 SEW Calc Production Integ: Production order cost tracking
90857 SEW Calc Post-Calculation: Post-calculation creation and comparison
Pages (User Interface)
90820-90823: Template management pages
90830-90838: Calculation pages (cards, lists, subforms, history)
Reports
90885 SEW Calculation Report: Print calculation breakdown
🔗 Integrations
Item Card Extensions
New Fields on Item Card:
SEW Last Calc No.: Most recent calculation for this item
SEW Default Template Code: Default template for new calculations
New Actions:
New Calculation: Create calculation directly from item
Calculations: View all calculations for this item
Last Calculation: Open most recent calculation
Sales Quote Integration
New Fields on Sales Quote:
SEW Default Calc Template: Default template for quote lines
SEW Auto Calculate: Auto-create calculations for new lines
New Fields on Sales Line:
SEW Calc No.: Linked calculation
SEW Calculated Cost: Cost from calculation
SEW Calculated Margin %: Margin percentage
SEW Target Price: Suggested selling price
SEW Material/Labor/Overhead Cost: Cost breakdown
FactBox:
Cost Breakdown FactBox: Visual cost/margin analysis
Production Order Integration
New Fields on Production Order:
SEW Calc No.: Linked calculation
SEW Planned Cost: Target cost from calculation
SEW Actual Cost to Date: Running actual cost
SEW Cost Variance/Variance %: Deviation from plan
SEW Alert Threshold %: Alert trigger level (default 10%)
SEW Cost Alert: Indicator when threshold exceeded
🎯 Key Features
System Variables
Reference calculated values from BOM/Routing:
{MATERIAL} - Total material cost from BOM
{LABOR} - Total labor cost from Routing
{OVERHEAD} - Total overhead cost
{TOTALCOST} - Sum of all costs
Custom Variables
Define reusable variables with types:
Percentage: Apply as decimal (20% = 0.20)
Absolute Value: Fixed amount
Factor: Multiplier (1.2 = 20% markup)
Example: 100 * {OVERHEAD-PCT} where OVERHEAD-PCT = 20 (20%)
Formula Syntax
Supports standard math operators with precedence:
+ Addition
- Subtraction
* Multiplication
/ Division
() Parentheses for grouping
Example: ({MATERIAL} + {LABOR}) * (1 + {OVERHEAD-PCT})
Price Source Selection
Flexible Cost Sources:
Choose where to get material and capacity costs:
Item Costs: Unit Cost, Last Direct Cost, Last Purchase Price, Standard Cost
Work Center: Direct Cost, Overhead Rate
Machine Center: Direct Cost, Overhead Rate
Lot Size Simulation
📊 Multiple Scenarios
Compare costs at different production quantities
💰 Unit Cost Analysis
See how unit costs decrease with volume
📈 Break-Even Calculation
Calculate minimum quantity for profitability
🎯 Recommended Scenario
Algorithm suggests optimal lot size
Post-Calculation
Compare Planned vs. Actual:
After production is finished, create a post-calculation to:
Capture actual material consumption from item ledger
Capture actual labor time from capacity ledger
Calculate cost variances (material, labor, overhead)
Generate variance report for analysis
Change History
Every change to a calculation is tracked:
Field-level tracking: What changed, old/new values
User tracking: Who made the change
Timestamp: When it happened
Change type: Created, Modified, Archived, Deleted, Released
🚀 Usage Flow
1
Create Template
Define calculation structure with formulas and variables
2
Create Calculation
Apply template to item, specify lot size and parameters
3
Calculate Costs
Engine retrieves BOM/Routing data and evaluates formulas
4
Simulate (Optional)
Run lot size simulation to optimize production quantity
5
Release & Transfer
Release calculation and transfer costs to Item card
6
Link to Sales/Production
Use calculation in sales quotes or production orders
7
Post-Calculation (Optional)
After production: compare planned vs. actual costs
📊 Business Value
💰 Accurate Costing
Precise product costs based on actual BOM and Routing data
📈 Better Pricing
Calculate target prices based on desired margins
🎯 Optimized Production
Find optimal lot sizes through simulation
📉 Cost Control
Track actual vs. planned costs during production
⚡ Faster Quoting
Quick cost calculations directly from sales quotes
📝 Audit Trail
Complete history of all calculation changes
🔒 Permissions
Permission Sets
SEW Calc Full (90899): Full access (RIMD on all objects)
SEW Calc Read (90898): Read-only access
📚 Documentation