0.5.6 • Published 5 years ago

@capealoesa/camsapi v0.5.6

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

CAMS models

Publish procedure

  • Updated version in package.json
  • Delete dist folder before building (sometimes building does not overwrite properly!)
  • Build: npm run build
  • Publish: npm publish --access public
  • Deprecate: npm deprecate @capealoesa/camsapi@v0.5.5 "Newer version released."
  • Git commit: git commit
  • Git push: git push
  • Git merge to Master: git checkout master then git 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() and bom.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() and maxMapToJson() on bom.calc function
  • BomItem.qtyPerUnit may not be 0 or less
  • Replace all console.logs with expect statements 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 CamsItemCollection class.
  • o Built and published models v0.3.29
  • Cleanup
    • x Swap all instances of pTree with cTree and 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 calculateTotalRequirement to return JSON as well
    • o Design and document new BOM/MRP calc structures and discuss with dad
  • o Implemented calculateQtyPossible() and maxMapToJson() on bom.calc
  • o Built and published models v0.3.30

Wednesday, 25 July 2018

  • o BUGFIX: MPS.periodLength always set to W.
  • o Added id to mps.json test data
  • o Built and published models v0.3.26
  • o Added child item to test.mps.sjon and confirmed correct MRP visually

Tuesday, 24 July 2018

  • o Split mergeGrossRequirements into pullItemGrossRequirements and mergePeriodQtyMaps
  • o Improved unit tests for above
  • o Update mrp.calc._mrpCalc to use pullItemGrossRequirements and mergePeriodQtyMaps
  • o BUG: For loop in MRP calculation implicitly assumes that end-items may not also be sub-items
  • x FIX: remove function buildDependencyNetwork and add a dummyRoot node. No. Does not model the logic correctly
  • o FIX: Refactor mrp.calc._calMrp() conditions to get grossReq from BOTH mps and mrpTableMap
  • o Remove getMrpTableBoundaries
  • o Add id field to IMps and MPS for persistence.
  • o Built and published models v0.3.25

Monday, 23 July 2018

  • o Implemented asVirtualCamsItem() on MPS with test
  • o Built and published models v0.3.24
  • o Removed asVirtualCamsItem() on MPS with test
  • o Refactor stockPointsToPeriodQtyMap to be independent of tMin and tMax
  • o Remove useless function mrp.calc.getShedReceiptsMap()
  • x Refactor MrpTable to get grossReq as Map and deduce t0 from there. NO!
  • o Refactor MRP calc with fixed boundaries. All negative items get accumulated into a PastDue column.
  • o Refactor MPS to use tMin and tMax in stead of duration
  • o Refactor MrpCalc to tMin and tMax of Mps

Friday, 13 July 2018

  • o Implemented mpsToRootNode

Monday, 25 June 2018

  • o BUG: Replaced all NumericField with NumericUserField
  • o Built and published models v0.3.23

Friday, 22 June 2018

  • o Updated all throw "string" to throw new Error("string")
  • o Built and published models v0.3.22

Thursday, 21 June 2018

  • o Added unit test for sageItem.fromJson
  • o Updated generateAbstractSageItemsJson to 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 leadtime safetyStock and lotsize as 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 default Qd to "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 mrpTableToJson in mrp.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.calc and mrp.calc. Change to classes with static methods
  • o bom.calc and mrp.calc added to index exports
  • o Integrate REF_DATE properly
  • o Built and published models v0.3.9
  • o Implemented getMrpTableBoundaries and mrpTableToCsv in mrp.calc
  • o Built and published models v0.3.10
  • o Build model for Mps and IMps, and refactor ad hoc version
  • o Updated mrp.calc to use MPS
  • o Added mps.json to TEST data

Friday, 08 June 2018

  • o Created files bom.calc and mrp.calc and moved functions from mrp.proto there.
  • o Moved calculateTotalRequirement and explodeDependencies from camsserver-ts and deleted original proto implementations from mrp.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 that id already exists.
  • o Update CAMSItem.removeBom() to reset mrpBomId to 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 setSchedReceipts to MrpTable. Scheduled receipts are no longer set in the init function.
  • o Implement getShedReceiptsMap that converts the scheduled receipts of an item to an abstract Map for the MrpTable.
  • 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 mergeGrossRequirements as subroutine of calculateMrp

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 CAMSItemCollection dont try to link it with camsItem.repo. They are very different things. CAMSItemCollection is just a Map<number, CamsItem>
  • o Refactor mrp.proto to look like the production version.
  • o Implemented buildDependencyNetwork performes buildDependencyTree on a list of sageIds to build one dependency tree;
  • o Implemented treeToString function 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 (mrpBomId and id: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 MrpTable API

Friday, 18 May 2018

  • o Change MRP parameters to Map objects 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 populate to repo.proto.ts to insert using CamsItemJson objects
  • o Modified mrp.test to use TEST data instead of abstract
  • x Draw dependency tree of TEST items (explodeDependencies works great!)
  • o Created mrpTable model
  • 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 PlanningBOM id number that is initialied to timestamp
  • o Changed Camsitem.mrpBomNumber to mrpBomId
  • o mrpBom in PlanningBOM must be indicated using mrpBomId not array index

Wednesday, 18 April 2018

  • o Updated stats.calc.mapSchedReceipts() and added stats.calc.mapToArray()
  • o Moved mapFromSagePurchaseOrder from server to ScheduledReceipt
  • o Added unit to ScheduledReceipt
  • o Published version 0.3.6

Tuesday, 17 April 2018

  • o Changed PlanningBom.name to PlanningBom.code
  • o Changed PlanningBom.BOMID to PlanningBom.id
  • o Added PlanningBom.fomulationCode
  • o Updated abstract.boms test data accordingly
  • o Updated unit tests accordingly
  • o Published v0.2.5
  • o Changed PlanningBom.desc to PlanningBom.description
  • o Add orderId and status to ScheduledReceipts
  • o Published v0.3.0
  • o Added ID and Date to SagePurchaseOrder
  • o Add id to ScheduledReceipts
  • o Published v0.3.2
  • o Added stats.calc.mapSchedReceipts()
  • o Published v0.3.4

Friday, 13 April 2018

  • o Added calc/stats.calc for performing item calculations
  • o Published v0.2.4

Thursday, 12 April 2018

  • o Added method IRF.addScheduledReceipt
  • o Installed moment to validate date strings
  • o Published version 0.2.2
  • o In models/CAMSItem: populate IRF using free text fields from Sage item
  • o Added NumerciField 1 and 2 to models/SageItem
  • o Published version 0.2.3

Tuesday, 10 April 2018

  • o Modify serialise.util to run functions to get default values
  • o Implement assignDfltPrimatives and checkAndAssignPrimatives pattern in all models
  • o Added some basic unit tests for PlanningBOM
  • o Added expected results to testData for MRP calculations and incorporated in unit tests
  • o Added idOffset parm to gen.helpers and updated tests
  • o Published version 0.2.1

Monday, 9 April 2018

  • o Installed uuid for generating valid UUIDs
  • o Refactor to BOM array:
    • o bomId is now UUID string
    • o Updated ProtoRepo and tests accordingly. All pass.
  • o Extracted embedded model SageItemCategory from SageItem to maintain convention
  • o Added util which implements dynamic type-checking of json documents using the defaults primitives 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/helpers folder for helper test script. Added to Jest ignore
  • o Added functions in gen.helpers to 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 prototype folder
    • abstract and mock data
    • o Export test data a JSON structure that defines well structured sets
  • o Refactored prototypes to be more orthogonal with test data
  • o Created class CamsItemCollection for bulk operations on camsItems

Saturday, 30 March 2018

  • o Added IRF to CamsItem
  • o Started adding BomTree and InventoryPolicy and mrp.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."

Good definitions

v0.1.10

  • Added default OR values to fromJSON factory methods. This will prevent trying to store undefined values 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 BOMItem model

v0.1.3

  • Added jest unit testing
    • npm install jest --save-dev
    • npm install typescript --save-dev
    • npm install ts-jest --save-dev
  • Added types for node: (to use require in tests)
    • npm install @types/node --save-dev
  • Disbled "strict": true in tsconfig.json

NPM typescript module

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.7

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago