Service - Unit Standard: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 32: | Line 32: | ||
[[Standard LogicalResults Per Service]] | [[Standard LogicalResults Per Service]] | ||
= Units that contain quantities = | |||
* Izara Supply is not used for stock management, but used to follow units we want to track, which in some cases might themselves have a quantity inside them (example bag of 1000 buttons or 200 yard roll of fabric) | |||
* instead of tracking each button or each yard (or inch) we track the bag or roll only | |||
* user can use a unitTrackedProperty to record the quantity inside the tracked Unit | |||
* the unitTrackedProperty can then be used in [[Service - Transform Units]] to break down into individual units or multiple used to create other tracked Units | |||
* eg if use 1 tracked back of 1000 buttons to make 10 shirts (100 buttons each shirt), the bag is one tracked Unit, and gets transformed into 10 tracked Unit shirts | |||
= Units that track costing = | |||
* The cost of Units passing through the supply chain can also be managed using unitTrackedProperty | |||
* each material has a unitTrackedProperty that is it's cost | |||
* example 1 tracked Unit of a bag of 1000 buttons would have a cost unitTrackedProperty for it's full cost | |||
* calculatedProperties in transformUnits can spread that cost (and all other materials used) across the new tracked Units created, saving the total into a new property in the outputUnits | |||
= Graph database = | = Graph database = | ||
Line 52: | Line 67: | ||
=== Relationships === | === Relationships === | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> |
Latest revision as of 12:29, 6 August 2023
Overview
Handler service for the standard unit that tracks a single item.
Repository
https://bitbucket.org/izara-supply-units/izara-supply-units-unit-standard
DynamoDB tables
Standard Config Table Per Service
Configuration tags
{
configTag: "SupplyGraphServiceName"
configKey: "SupplyGraphServiceName"
configValue: xxx // eg: "SupplyGraph"
}
{
configTag: "UnitManagerServiceName"
configKey: "UnitManagerServiceName"
configValue: xxx // eg: "UnitManager"
}
LogicalResults
Standard LogicalResults Per Service
Units that contain quantities
- Izara Supply is not used for stock management, but used to follow units we want to track, which in some cases might themselves have a quantity inside them (example bag of 1000 buttons or 200 yard roll of fabric)
- instead of tracking each button or each yard (or inch) we track the bag or roll only
- user can use a unitTrackedProperty to record the quantity inside the tracked Unit
- the unitTrackedProperty can then be used in Service - Transform Units to break down into individual units or multiple used to create other tracked Units
- eg if use 1 tracked back of 1000 buttons to make 10 shirts (100 buttons each shirt), the bag is one tracked Unit, and gets transformed into 10 tracked Unit shirts
Units that track costing
- The cost of Units passing through the supply chain can also be managed using unitTrackedProperty
- each material has a unitTrackedProperty that is it's cost
- example 1 tracked Unit of a bag of 1000 buttons would have a cost unitTrackedProperty for it's full cost
- calculatedProperties in transformUnits can spread that cost (and all other materials used) across the new tracked Units created, saving the total into a new property in the outputUnits
Graph database
Service - Supply Graph
Nodes
Versioned data
unitSettings
{
properties: {
// some are controlled by unitType, others can be added as needed case by case, not controlled
},
}
Relationships
{
relationshipType: "{unitStandardLib.UNIT_IS_CURRENCY_GRAPH_REL_TYPE}", // "unitIs_currency"
schema: {
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
- If UnitType has set isCurrency=true, all Units of that UnitType will have a link to a currency node