@capealoesa/camsapi
v0.5.6
Published
Cape Aloe Management System API
Readme
CAMS models
Publish procedure
- Updated version in
package.json - Delete
distfolder before building (sometimes building does not overwrite properly!) - Build:
npm run build - Publish:
npm publish --access public - Deprecate:
npm deprecate @capealoesa/[email protected] "Newer version released." - Git commit:
git commit - Git push:
git push - Git merge to Master:
git checkout masterthengit merge v0.5 - Git push Master:
git push - Git Tag:
git tag v0.5.6 - Push with option:
git push --tags
Log
Friday, 10 May 2019
- Change SageSalesOrder
- Publish v0.5.6
Thursday, 9 May 2019
- Add SalesOrder
- Add ItemActivity
- Publish v0.5.4
- Fix SalesOrder typos
- Publish v0.5.5
Thursday, 2 May 2019
- Add Category Description to Item
- Publish v0.5.3
Sunday, 28 April 2019
- Fork v0.5
- Update Purchase Order Enity
- Add Item Category Entity
- Publish v0.5.0
- Export Item Category
- (Unpublished v0.5.1)
- Publish v0.5.2
Sunday, 28 April 2019
- Add more properties to sage entities
- Publish v0.4.6
- Add created to camsItemEntity
- Publish v0.4.7
Saturday, 29 December 2018
- Add NumericUserField3 to SageItem
- Add itemId to camsScheduledReceipt
- Rename the schemas
- Publish v0.4.5
Saturday, 29 December 2018
- Add NumericUserField3 to SageItem
Monday, 17 December 2018
- Remove 'Cams' prefix
- Fix ItemBatchSchema
- Publish v0.4.2
- Fix ItemBatchSchema...some more
- Publish v0.4.3
- Add selectionId to PurchaseOrderItem
- Publish v0.4.4
- Refactor Item
Sunday, 16 December 2018
- Add CamsPurchaseOrder
- Move SagePurchaseOrderItems into SagePurchaseOrder
- Move BomItem into Bom
- Add/Fix semicolons...
- Publish v0.4.1
Saturday, 15 December 2018
- Migrate to new NPM package "camsapi"
- Publish v0.4.0
Tuesday, 11 December 2018
- Remove everything except the schema interface definitions for the Sage API and the CAMS API
- Publish V0.4.0
Sunday, 9 December 2018
- Add Item Adjustment Schemas
- Add Item Movement Schemas
- Publish v0.3.33
- Create git branch v0.4
Friday, 27 July 2018
- o Calculate closed form requirements solution. Implemented
bom.calc.linearQty()andbom.calc.linearQtyAvail() - o Built and published models v0.3.31
- o Fixed bug in
maxMapToJson() - o Built and published models v0.3.31
- Rename
calculateQtyPossible()andmaxMapToJson()onbom.calcfunction BomItem.qtyPerUnitmay not be 0 or less- Replace all
console.logswithexpectstatements in tests - Draw out graph for TEST items (use as ground truth)
- Write test that gives warning when default values during sageItem deserialization occurs
- Write JSON for updated maps and trees
Thursday, 26 July 2018
- o Added intermediate item to
test.mps.json - o Remove initial stock negative check
- o Built and published models v0.3.27
- o Implement
removeZeros()for MrpTable - o Built and published models v0.3.28
- o Modify
MrpCalc.pullItemGrossRequirements()to return parentIds with qtyPerUnit value as well - o Remove
CamsItemCollectionclass. - o Built and published models v0.3.29
- Cleanup
- x Swap all instances of
pTreewithcTreeand vice versa (from an MRP viewpoint, this naming convention is correct) - x MRP: Assign depth level to each item so that they may be arranged as such.
- o MRP: Flag between
end-item,intermediat item,raw material - o MRP: Add item Code and sageId
- o MRP: Period number and starting date
- o MRP: Track origins of gross requirement
- x
calculateTotalRequirementto return JSON as well - o Design and document new BOM/MRP calc structures and discuss with dad
- x Swap all instances of
- o Implemented
calculateQtyPossible()andmaxMapToJson()onbom.calc - o Built and published models v0.3.30
Wednesday, 25 July 2018
- o BUGFIX:
MPS.periodLengthalways set toW. - o Added
idtomps.jsontest data - o Built and published models v0.3.26
- o Added child item to
test.mps.sjonand confirmed correct MRP visually
Tuesday, 24 July 2018
- o Split
mergeGrossRequirementsintopullItemGrossRequirementsandmergePeriodQtyMaps - o Improved unit tests for above
- o Update
mrp.calc._mrpCalcto usepullItemGrossRequirementsandmergePeriodQtyMaps - o BUG: For loop in MRP calculation implicitly assumes that end-items may not also be sub-items
- x FIX: remove function
buildDependencyNetworkand add a dummyRoot node. No. Does not model the logic correctly - o FIX: Refactor
mrp.calc._calMrp()conditions to get grossReq from BOTHmpsandmrpTableMap - o Remove
getMrpTableBoundaries - o Add
idfield toIMpsandMPSfor persistence. - o Built and published models v0.3.25
Monday, 23 July 2018
- o Implemented
asVirtualCamsItem()onMPSwith test - o Built and published models v0.3.24
- o Removed
asVirtualCamsItem()onMPSwith test - o Refactor
stockPointsToPeriodQtyMapto be independent oftMinandtMax - o Remove useless function
mrp.calc.getShedReceiptsMap() - x Refactor
MrpTableto getgrossReqasMapand deducet0from there. NO! - o Refactor MRP calc with fixed boundaries. All negative items get accumulated into a
PastDuecolumn. - o Refactor MPS to use
tMinandtMaxin stead ofduration - o Refactor
MrpCalctotMinandtMaxofMps
Friday, 13 July 2018
- o Implemented
mpsToRootNode
Monday, 25 June 2018
- o BUG: Replaced all
NumericFieldwithNumericUserField - o Built and published models v0.3.23
Friday, 22 June 2018
- o Updated all
throw "string"tothrow new Error("string") - o Built and published models v0.3.22
Thursday, 21 June 2018
- o Added unit test for
sageItem.fromJson - o Updated
generateAbstractSageItemsJsonto fill in UserFields with variable values - o Built and published models v0.3.17
- o Found and fixed BUG1 and BUG2!
- o Built and published models v0.3.19
- o Set IRF
leadtimesafetyStockandlotsizeas variables in MRP calculation - o Implemented lotsize in
MRPTable - o Built and published models v0.3.20
- o Fix reading of Qd, Leadtime and Safetystock
- o MRP: Implement variable lead-time, safety-stock and lot-size
- o
MrpTable: set defaultQdto"LFL"; - o Built and published models v0.3.21
BUG1: Compiler does not always replace dist
BUG! tsc does not always update content of dist/ so always delete it! Found that dist/IRF.js did not match src/IRF.ts. So there is a compiler bug.
BUG2: IRF is added AFTER sage item is updated
In the CAMSModel.fromJson method the IRF value is added AFTER the sage item is updated. This means that the IRF will aways have old info. This is from a poor design not clearly separating Cams and Sage models. Temprary fix by re-updating the sageItem just before returning the deseriealised cams item.
Wednesday, 20 June 2018
- o Added purcahse order test items
- o Built and published models v0.3.13
- o Updated
test/resources/mock/purchaseOrders.json - o Built and published models v0.3.16
Tuesday, 19 June 2018
- o Design a dependency graphic explorer
- o MRP: Implemented
mrpTableToJsoninmrp.calc.ts. - o Set lead time to constant 1 period for testing
- o Built and published models v0.3.12
Tuesday, 12 June 2018
- o Implement standalone function to convert period selection to milliseconds
- o Built and published models v0.3.11
Monday, 11 June 2018
- o Updated
mrp.calc.mrpTableToCsv()to use real date as header
Saturday, 09 June 2018
- o Refine API for
bom.calcandmrp.calc. Change to classes with static methods - o
bom.calcandmrp.calcadded to index exports - o Integrate REF_DATE properly
- o Built and published models v0.3.9
- o Implemented
getMrpTableBoundariesandmrpTableToCsvinmrp.calc - o Built and published models v0.3.10
- o Build model for Mps and IMps, and refactor ad hoc version
- o Updated
mrp.calcto use MPS - o Added
mps.jsontoTESTdata
Friday, 08 June 2018
- o Created files
bom.calcandmrp.calcand moved functions frommrp.protothere. - o Moved
calculateTotalRequirementandexplodeDependenciesfromcamsserver-tsand deleted original proto implementations frommrp.proto - o Updated unit tests for above changes
Saturday, 02 June 2018
- o Update
CAMSItem.addBom()to overwrite BOM if a BOM in the list with thatidalready exists. - o Update
CAMSItem.removeBom()to resetmrpBomIdto 0 if removed BOM is the MRP bom. - o Implement BOM tests in
camsItem.test.ts - o Built and published models 0.3.8
- In
mrp.test.ts, replace console.logs with expect statements.
Thursday, 31 May 2018
- Built and published models v0.3.7
Wednesday, 30 May 2018
- o Added function
setSchedReceiptstoMrpTable. Scheduled receipts are no longer set in theinitfunction. - o Implement
getShedReceiptsMapthat converts the scheduled receipts of an item to an abstract Map for theMrpTable. - o shedReceipts must be set after init since we need tMin and tMax to convert
Tuesday, 29 May 2018
- o Added some inititial stock to TEST raw materials. MRP calculation correct.
- Deploy new bom schemas
Friday, 25 May 2018
- o Implement
calculateMrp - o Implement
mergeGrossRequirementsas subroutine ofcalculateMrp
Parent-child naming convention
- Realised that my naming convention of parent and child components are wrong. Parents should be raw materials and children, end-items.
Wednesday, 23 May 2018
- x Implement
CAMSItemCollectiondont try to link it withcamsItem.repo. They are very different things.CAMSItemCollectionis just aMap<number, CamsItem> - o Refactor
mrp.prototo look like the production version. - o Implemented
buildDependencyNetworkperformesbuildDependencyTreeon a list of sageIds to build one dependency tree; - o Implemented
treeToStringfunction to visualise tree using item descriptions
Inter item dependencies
The MRP calculation cannot be just performed per end-item since multiple end-items may use the same common ingredients. The whole is not the sum of the parts. The master planning schedule must contain all the items that are to be planned.
Tuesday, 22 May 2018
- o Finalised single table MRP calculation
- o Implemented dependencyTree inversion
- Implement full MRP calculation
- Deploy new models with new MRP bom parameters (
mrpBomIdandid:number) - Ask dad to re-upload TEST boms
- Replace mock/camsItems with new data (changed BOMID and Code is not correct)
Monday, 21 May 2018
- o Implemented
MrpTable.toCsv()method - o Improved
MrpTableAPI
Friday, 18 May 2018
- o Change MRP parameters to
Mapobjects so that they can natively handle negative time - o Decide on MRP table structure. Specifically how should the case of PORs before today be handled. Map
Wednesday, 16 May 2018
- o Started implementation of mrp calculation in
MrpTable
Tuesday, 15 May 2018
- o Add Dads TEST camsItems to test/resources
- o Export TEST data in
index.ts - o Added function
populatetorepo.proto.tsto insert usingCamsItemJsonobjects - o Modified
mrp.testto use TEST data instead ofabstract - x Draw dependency tree of TEST items (
explodeDependenciesworks great!) - o Created
mrpTablemodel - o Found spreadsheet template to calculate MRP. On Google Drive.
TEST Items
/items?$company=CapeAloeSA&$codelist=TEST001,TEST002,TEST101,TEST102,TEST011,TEST012,TEST013,TEST014,TEST021,TEST022,TEST031,TEST032,TEST033,TEST201,TEST202
Thursday, 10 May 2018
- o Uninstall UUID package
- o
PlanningBOMid number that is initialied to timestamp - o Changed
Camsitem.mrpBomNumberto mrpBomId - o mrpBom in
PlanningBOMmust be indicated usingmrpBomIdnot array index
Wednesday, 18 April 2018
- o Updated
stats.calc.mapSchedReceipts()and addedstats.calc.mapToArray() - o Moved
mapFromSagePurchaseOrderfrom server toScheduledReceipt - o Added
unittoScheduledReceipt - o Published version 0.3.6
Tuesday, 17 April 2018
- o Changed
PlanningBom.nametoPlanningBom.code - o Changed
PlanningBom.BOMIDtoPlanningBom.id - o Added
PlanningBom.fomulationCode - o Updated
abstract.bomstest data accordingly - o Updated
unit tests accordingly - o Published v0.2.5
- o Changed
PlanningBom.desctoPlanningBom.description - o Add
orderIdandstatustoScheduledReceipts - o Published v0.3.0
- o Added
IDandDatetoSagePurchaseOrder - o Add
idtoScheduledReceipts - o Published v0.3.2
- o Added
stats.calc.mapSchedReceipts() - o Published v0.3.4
Friday, 13 April 2018
- o Added
calc/stats.calcfor performing item calculations - o Published v0.2.4
Thursday, 12 April 2018
- o Added method
IRF.addScheduledReceipt - o Installed
momentto validate date strings - o Published version 0.2.2
- o In
models/CAMSItem: populate IRF using free text fields from Sage item - o Added
NumerciField1 and 2 tomodels/SageItem - o Published version 0.2.3
Tuesday, 10 April 2018
- o Modify
serialise.utilto run functions to get default values - o Implement
assignDfltPrimativesandcheckAndAssignPrimativespattern in all models - o Added some basic unit tests for
PlanningBOM - o Added expected results to
testDatafor MRP calculations and incorporated in unit tests - o Added
idOffsetparm togen.helpersand updated tests - o Published version 0.2.1
Monday, 9 April 2018
- o Installed
uuidfor generating valid UUIDs - o Refactor to BOM array:
- o
bomIdis now UUID string - o Updated
ProtoRepoand tests accordingly. All pass.
- o
- o Extracted embedded model
SageItemCategoryfromSageItemto maintain convention - o Added
utilwhich implements dynamic type-checking of json documents using thedefaultsprimitives of each model. - o Added corrupted test data for CAMSItem and SageItem
- o Wrote unit tests for CAMSItem and SageItem to test both positive and negative cases
- (Still need to implement the pattern for the rest of the models)
Friday, 6 April 2018
- o Added
/test/helpersfolder for helper test script. Added to Jest ignore - o Added functions in
gen.helpersto generate mock Sage and Cams items - o Exported helpers
- o Published version 0.1.20
- o Moved helpers to src dir so they can be compiled properly
- o Published version 0.1.21
Wednesday, 4 April 2018
- o Added all models to index export (forgot some previously)
- o Added basic Sage interfaces for Purchase orders
Tuesday, 3 April 2018
- o Fixed spelling typo in IRF.ts
- o Restructured:
- Created
prototypefolder - abstract and mock data
- o Export test data a JSON structure that defines well structured sets
- Created
- o Refactored prototypes to be more orthogonal with test data
- o Created class
CamsItemCollectionfor bulk operations on camsItems
Saturday, 30 March 2018
- o Added IRF to CamsItem
- o Started adding
BomTreeandInventoryPolicyandmrp.calc
Monday, 26 March 2018
v0.1.15
- Bug fixes
v0.1.12
- Refactored some default values to have single declaration
v0.1.11
- Implemented prototype recursive functions that explodes a BOM and calculates total requirements
Friday, 16 March 2018
MRP
Material Requirements Planning-MRP-Part-1 | Dr. Harper's Classroom
MRP input:
- MPS
- BOM
- IRF (Inventory records file)
- SR: Scheduled receipts
- BI: Beginning Inventory
- LT: Lead Time
- SS: Safety stock
- Qd: Lot size discipline
- LFL: Lot-for-lot (exactly)
- Fixed: (Discrete amounts)
- Minimum: Anything under Discrete amount is LFL
MRP output:
- Inventory policy: What you need, how many and by when.
MRP MPS RCCP DRP
- MPS: Master production schedule (plans items that have “direct” demand, called independent demand.)
- MRP: Material requirements planning (plans items that have “dependent” demand)
- RCCP: Rough Cut Capacity Planning
- CRP: Capacity Requirements Planning
- DRP: Distribution Resources Planning (Managing the flow of materials between firms, warehouses distribution centers.)
How are these related to Kaizen and Kanban?
The Difference Between MRP and MPS "So, if I make a pen, it has a cap, a barrel, a spring. and a refill. Based on the definition above, the pen is an MPS item. The cap, barrel, spring and refill are MRP items."
v0.1.10
- Added default OR values to
fromJSONfactory methods. This will prevent trying to storeundefinedvalues which the datastore does not allow. Refactoring of this must be done in future since this is not internally DRY
v0.1.8
- Moved source to folder
src - Added
BOMItemmodel
v0.1.3
- Added jest unit testing
npm install jest --save-devnpm install typescript --save-devnpm install ts-jest --save-dev
- Added types for node: (to use
requirein tests)npm install @types/node --save-dev
- Disbled
"strict": trueintsconfig.json
