Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

PackPlay/logistic-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logistic-cost-lib

Library for calculating logistic cost

Cart Structure

All libs take cart as argument

[{
    quantity: 500,
    sku: {
        pretaxPrice: 2.71,
        weighted: true,
        weight: 0.0630,
        kdw_mm: 338,
        kdh_mm: 7.0,
        kdl_mm: 208
    }
}]

Usage

let cart = [{
    quantity: 500,
    sku: {
        sku: 'some item',
        price: 2.9,
        pretaxPrice: 2.71,
        weighted: true,
        weight: 0.0630,
        kdw_mm: 338,
        kdh_mm: 7.0,
        kdl_mm: 208
    }
}]

let KL = new KerryLogistic();
let TPN = new TPLogistic();
let TPN_EMS = new TPLogistic(true);

let cfun1 = KL.getCostFunction();
let cfun2 = TPN.getCostFunction();
let cfun3 = TPN_EMS.getCostFunction();

kerr_solution = cfun1(cart);
tpn_solution = cfun2(cart);
tpne_solution = cfun3(cart);

About

Library for calculating logistic cost with Thai 3PL providers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published