diff options
author | Filipp Lepalaan <filipp@mac.com> | 2011-05-06 15:34:25 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2011-05-06 15:34:25 +0300 |
commit | 89a85260f988be339d1890f925ed276dea576076 (patch) | |
tree | db099bd1dfa282dbcd468d8b28d5eb4c8dd87c36 /gsxlib.php | |
parent | d41193438ed67747c448ca71d3030292138e9f4d (diff) | |
download | gsxlib-89a85260f988be339d1890f925ed276dea576076.tar.gz gsxlib-89a85260f988be339d1890f925ed276dea576076.tar.bz2 gsxlib-89a85260f988be339d1890f925ed276dea576076.zip |
strip S from SN
Diffstat (limited to 'gsxlib.php')
-rw-r--r-- | gsxlib.php | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -238,7 +238,7 @@ class GsxLib $req = array('ReturnLabel' => array( 'returnOrderNumber' => $returnOrder, - 'partNumber' => $partNumber + 'partNumber' => $partNumber )); return $this->request($req)->returnLabelData; @@ -273,6 +273,8 @@ class GsxLib public function warrantyStatus($serialNumber) { $serialNumber = trim($serialNumber); + // SNs should never start with an S, but they're often coded into barcodes + $serialNumber = ltrim($serialNumber, 'sS'); if (!self::looksLike($serialNumber, 'serialNumber')) { exit('Invalid serial number: ' . $serialNumber); @@ -349,5 +351,4 @@ class GsxLib } - ?>
\ No newline at end of file |