-
add
product
-
merge
product
andproduct
intorelated_product
-
merge
product
andproduct
intoshared_product
-
add
units_of_measure
-
add
conversion_ratio
-
merge
product
andunits_of_measure
intoproduct_units_of_measure
-
add
metering_device_model
-
merge
metering_device_model
andproduct
intometering_device_model_product
-
add
device_option
-
merge
metering_device_model
anddevice_option
intonumber_device_option_metering_device_model
-
add
measuring_scale
-
add
readings_purpose
-
merge
metering_device_model
andmeasuring_scale
andunits_of_measure
andreadings_purpose
intodevice_model_scale
-
add
readings_sender
-
add
readings_way
-
merge
readings_sender
andreadings_way
intoreadings_sender_readings_way
-
add
testing_set
-
add
testing_rule
-
merge
testing_set
andtesting_rule
intotesting_rule_set
-
add
billing_option
-
add
location_option
-
merge
location_option
andbilling_option
intolocation_billing_option
-
add
personal_account_option
-
merge
personal_account_option
andbilling_option
intopersonal_account_billing_option
-
add
legal_entity_option
-
merge
legal_entity_option
andbilling_option
intolegal_entity_billing_option
-
add
natural_person_option
-
merge
natural_person_option
andbilling_option
intonatural_person_billing_option
-
add
currency
-
add
distributor
-
merge
product
anddistributor
intoproduct_distributor
-
add
customer
-
connect
natural_person
tocustomer
-
connect
legal_entity
tocustomer
-
connect
contract
tocustomer
-
add
contract
intopersonal_account
-
merge
product
andpersonal_account
intoproduct_personal_account
-
add
address
-
add
distribution_point
-
merge
address
anddistribution_point
intoaddress_distribution_point
-
merge
address
andlocation_billing_option
intoaddress_location_option
-
merge
personal_account
andpersonal_account_billing_option
intocontract_personal_account_option
-
merge
legal_entity
andlegal_entity_billing_option
intocustomer_legal_entity_option
-
merge
natural_person
andnatural_person_billing_option
intocustomer_natural_person_option
-
merge
product_distributor
andaddress_distribution_point
intometering_point
-
merge
metering_point
andmetering_point
intotransit_metering_point
-
merge
product_personal_account
andmetering_point
intopersonal_account_share
-
merge
metering_point
andmetering_device_model_product
intometering_device
-
add
control_panel
-
merge
contract
andcontrol_panel
intocontract_control_panel
-
merge
control_panel
andmetering_device
intocontrol_panel_metering_device
- merge
metering_device
anddevice_model_scale
andreadings_sender_readings_way
intoraw_readings
- add
billing_period
- merge
testing_set
andbilling_period
intotesting_run
- merge
testing_rule_set
andtesting_run
intoreason_of_weeded_out
- merge
raw_readings
andreason_of_weeded_out
intoweed_out_meter_readings
- connect
approved_meter_readings
toraw_readings
- connect
meter_readings
toapproved_meter_readings
- merge
meter_readings
andmeter_readings
andproduct_units_of_measure
intometer_usage
- merge
personal_account_share
andmeter_usage
intopersonal_product_usage
- merge
billing_period
andcurrency
intoinvoice
- connect
invoice_product_usage
toinvoice
- merge
personal_product_usage
andinvoice_product_usage
intoinvoice_product_usage_detail
- merge
personal_account
andcurrency
intopayment
- connect
cashbox_receipt
topayment
product
- product1
- related_product1
- related_product2
- shared_product1
- shared_product2
related_product (related_product1; related_product2;)
shared_product (shared_product1; shared_product2;)
units_of_measure
- units_of_measure1;
- units_of_measure2;
- currency1;
- currency2;
conversion_ratio
- units_of_measure1; units_of_measure2;
- currency1; currency2;
product_units_of_measure (all product * [units_of_measure1; units_of_measure2;])
metering_device_model x3
metering_device_model_product (all metering_device_model * all product_units_of_measure)
device_option x2
number_device_option_metering_device_model (all device_option * all metering_device_model)
readings_purpose (all metering_device_model_product * 2)
measuring_scale (all readings_purpose)
device_model_scale (all metering_device_model * all measuring_scale)
readings_sender x4
readings_way x4
readings_sender_readings_way (all readings_sender * all readings_way)
testing_set x4
testing_rule x10
testing_rule_set (all testing_set * all testing_rule)
billing_option
- location_option1
- location_option2
- location_option3
- location_option4
- personal_account_option1
- personal_account_option2
- personal_account_option3
- personal_account_option4
- legal_entity_option1
- legal_entity_option2
- legal_entity_option3
- legal_entity_option4
- natural_person_option1
- natural_person_option2
- natural_person_option3
- natural_person_option4 )
location_option
- location_option1
- location_option2
- location_option3
- location_option4
location_billing_option (
- location_option1; location_option1;
- location_option2; location_option2;
- location_option3; location_option3; )
personal_account_option
- personal_account_option1
- personal_account_option2
- personal_account_option3
- personal_account_option4
personal_account_billing_option (
- personal_account_option1; personal_account_option1;
- personal_account_option2; personal_account_option2;
- personal_account_option3; personal_account_option3; )
legal_entity_option
- legal_entity_option1
- legal_entity_option2
- legal_entity_option3
- legal_entity_option4
legal_entity_billing_option (
- legal_entity_option1; legal_entity_option1;
- legal_entity_option2; legal_entity_option2;
- legal_entity_option3; legal_entity_option3; )
natural_person_option
- natural_person_option1
- natural_person_option2
- natural_person_option3
- natural_person_option4
natural_person_billing_option (
- natural_person_option1; natural_person_option1;
- natural_person_option2; natural_person_option2;
- natural_person_option3; natural_person_option3; )
currency
- currency1
- currency2
distributor x3
product_distributor (all product * all distributor)
customer
- natural_person1
- natural_person2
- natural_person3
- legal_entity1
- legal_entity2
- legal_entity3
natural_person
- natural_person1
- natural_person2
- natural_person3
customer_natural_person_option (all natural_person * all natural_person_billing_option)
legal_entity
- legal_entity1
- legal_entity2
- legal_entity3
customer_legal_entity_option (all legal_entity * all legal_entity_billing_option)
contract
- natural_person1
- natural_person2
- natural_person3
- legal_entity1
- legal_entity2
- legal_entity3
- natural_person1
- natural_person2
- natural_person3
- legal_entity1
- legal_entity2
- legal_entity3
personal_account (all contract * 3)
product_personal_account (all product * all personal_account)
contract_personal_account_option (all personal_account * all personal_account_billing_option)
address x20
address_location_option (all address * all location_billing_option)
distribution_point (all address *2)
address_distribution_point (all address * all distribution_point)
metering_point (all address_distribution_point * all product_distributor)
personal_account_share (all metering_point)
metering_device (all metering_point * all metering_device_model_product)
raw_readings (all metering_device * all device_model_scale * all readings_sender_readings_way * 100 )
billing_period x30
perform TESTING_RUN (move raw_readings into weed_out_meter_readings or into approved_meter_readings)
perform MOVE_TO_METER_READINGS (from approved_meter_readings with same testing_run_id)
perform BUILD_METER_USAGE func(meter_readings)
perform CALC_PERSONAL_PRODUCT_USAGE func(personal_account_share, meter_usage)
invoice (all billing_period * all currency)
invoice_product_usage (all invoice * all personal_product_usage)
invoice_product_usage_detail (all personal_product_usage * all billing_option)
perform CALC_TOTAL_OF_DETAIL (sum of invoice_product_usage_detail with same [personal_account, year, month, product, distributor, point, units_of_measure] )
perform CALC_TOTAL_OF_USAGE (sum of invoice_product_usage with same [personal_account, year, month, units_of_measure] )