Created
May 16, 2016 23:14
-
-
Save jcricaro/8dff8d8ad56cd3041317d1ec682d6b28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($provincial) { | |
//provincial | |
if($weight <= 1) { | |
return 120; | |
} elseif($weight <= 2) { | |
return 160; | |
} else { | |
return 160 + (ceil($weight - 2) * 60); | |
} | |
} else { | |
if($cod) { | |
//metro manila cod | |
if($weight <= 1) { | |
return 100; | |
} elseif($weight <= 3) { | |
return 130; | |
} else { | |
return 130 + (ceil($weight - 3) * 50); | |
} | |
} else { | |
//metro manila non cod | |
if($weight <= 1) { | |
return 65; | |
} elseif($weight <= 3) { | |
return 120; | |
} else { | |
return 120 + (ceil($weight - 3) * 30); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment