aboutsummaryrefslogtreecommitdiffstats
path: root/gsxlib.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2011-05-06 15:34:25 +0300
committerFilipp Lepalaan <filipp@mac.com>2011-05-06 15:34:25 +0300
commit89a85260f988be339d1890f925ed276dea576076 (patch)
treedb099bd1dfa282dbcd468d8b28d5eb4c8dd87c36 /gsxlib.php
parentd41193438ed67747c448ca71d3030292138e9f4d (diff)
downloadgsxlib-89a85260f988be339d1890f925ed276dea576076.tar.gz
gsxlib-89a85260f988be339d1890f925ed276dea576076.tar.bz2
gsxlib-89a85260f988be339d1890f925ed276dea576076.zip
strip S from SN
Diffstat (limited to 'gsxlib.php')
-rw-r--r--gsxlib.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/gsxlib.php b/gsxlib.php
index 4974754..3cc2702 100644
--- a/gsxlib.php
+++ b/gsxlib.php
@@ -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