From: Edward Date: Mon, 18 Mar 2013 04:57:32 +0000 (+0800) Subject: ExcelToJson.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=1008d6c0f726e3738ce60f7fa134848f3386db32 ExcelToJson.php --- diff --git a/ExcelToJson.php b/ExcelToJson.php index 5ac70a50..20a847ce 100644 --- a/ExcelToJson.php +++ b/ExcelToJson.php @@ -94,6 +94,20 @@ class Pman_Core_ExcelToJson extends Pman_Roo fclose($fh); + $lc = DB_DataObject::facotry('location'); + if($lc->get('location_name', $ret['From'])){ + $this->jerr('error occur on getting location with reference ' . $ret['From']); + } + $ret['invhist_transfer_from'] = $lc->pid(); + $ret['invhist_transfer_from_location_name'] = $lc->location_name; + + $lt = DB_DataObject::facotry('location'); + if($lt->get('location_name', $ret['To'])){ + $this->jerr('error occur on getting location with reference ' . $ret['From']); + } + $ret['invhist_transfer_to'] = $lc->pid(); + $ret['invhist_transfer_to_location_name'] = $lc->location_name; + foreach ($rows as $r){ $itemsite = DB_DataObject::factory('itemsite'); $itemsite->autoJoin();