Overview
  • Namespace
  • Class

Namespaces

  • rpf
    • api
      • module
    • extension
      • module
    • system
      • module

Classes

  • domainExport
  • index
  • mgntRatioExport

Class mgntRatioExport

class mgntRatioExport

Calculates the contribution margin 1 - 5 of all products managed in the rp2. Supports CSV-Export and in future mysql-storage


selling price - external costs = cm1

  • personal costs = cm2

  • overheads direct (server infrastructure, ...)

  • overheads indirect (costs for other free-of-charge products) = cm3

x sales volume - discounts = CM4 (overall)

  • costs for unbilled products of this type
  • indirect overhead-credit for unbilled products of this type = CM5

rpf\extension\module\extensionModule
Extended by rpf\extension\module\mgntRatioExport
Namespace: rpf\extension\module
Package: system\extension
Copyright: 1601.production siegler&thuemmler ohg
License: - http://creativecommons.org/licenses/by-sa/4.0/
Author: Andreas Doebeling ad@1601.com
Version: 0.1.151021_dev_1ad
Link: https://www.xing.com/profile/Andreas_Doebeling/
Link: https://github.com/ADoebeling
Located at extension/module/mgntRatioExport.php

Methods summary

public
# __construct( rpf\extension\module\extension & $system )

Build the $data-array

Build the $data-array

Parameters

$system
public
# setPurchasePrices( array $prices )

Set purchase-prices

Set purchase-prices

Parameters

$prices
$costs [tariff|domain|add-on|ext][pronr][externalCosts|workingTime|systemPoints] = X

Returns


$this
protected
# calcOverall( )

Adds the sum of count, turnover, systemPoints, ... and stores them to $this->sum[$type][$name][turnoverRegular] = X

Adds the sum of count, turnover, systemPoints, ... and stores them to $this->sum[$type][$name][turnoverRegular] = X

Returns


$this
protected
# calcOverallOverhead( )

Shares the overhead-costs to each product by systemPoints and stores them to $this->sum[$type][$name][overheadCosts|overheadCostsBilled|...] = X

Shares the overhead-costs to each product by systemPoints and stores them to $this->sum[$type][$name][overheadCosts|overheadCostsBilled|...] = X

Returns


$this

Throws

Exception
protected
# calcOverallContributionMargin( )

Calculates the contribution-margin for all products and stores them to $this->sum[$type][$name][cmX] = Y

Calculates the contribution-margin for all products and stores them to $this->sum[$type][$name][cmX] = Y

Returns


$this

Throws

Exception
protected
# calcProducts( )

Calculates the benefits and costs for every single product based on $this->sum and stores them to $this->product[$type][$name][externalCosts|...] = X

Calculates the benefits and costs for every single product based on $this->sum and stores them to $this->product[$type][$name][externalCosts|...] = X

Returns


$this

Throws

Exception
protected
# calcTotal( )

Calc all total-sums for each category

Calc all total-sums for each category

Returns


$this
public
# calc( )

Run all calculations in the right order: - calcOverall() - calcTotal() - calcOverallOverhead() - calcTotal() - calcOverallContributionMargin() - calcTotal() - calcProducts() - calcTotal

Run all calculations in the right order: - calcOverall() - calcTotal() - calcOverallOverhead() - calcTotal() - calcOverallContributionMargin() - calcTotal() - calcProducts() - calcTotal

Well, maybe you could optimize that, but I'm afraid u wouldn't get a relevant performance-enhancement

Returns


$this

Throws

Exception
public string
# getCsvGe( )

Returns a german export-csv

Returns a german export-csv

Returns

string
$csv
public static string
# getEuroFormattedCsvColumn( $float )

Returns given $float as "1.234,56 �;"

Returns given $float as "1.234,56 �;"

Parameters

$float

Returns

string
public
# store( )

Stores the calculated values to mysql

Stores the calculated values to mysql

Returns


$this

Throws

Exception
public
# sendDownloadCsv( string $filename = NULL, string $source = 'ge' )

Send application/csv-header and starts downloading the csv

Send application/csv-header and starts downloading the csv

Parameters

$filename
$source

Returns


$this

Throws

Exception

Properties summary

protected array $costs

$purchasePrices all costs

$purchasePrices all costs

# array()
protected array $sum

all sums

all sums

# array()
protected array $product

all products

all products

# array()
protected array $total

all total

all total

# array()
API documentation generated by ApiGen