Rename field total. #660
This commit is contained in:
parent
4afa21f51e
commit
938d6ff848
1 changed files with 3 additions and 3 deletions
|
|
@ -37,7 +37,7 @@ class WarrantyBulkUploader
|
||||||
const F_BATT_ID = 18; // sap code in system
|
const F_BATT_ID = 18; // sap code in system
|
||||||
const F_OWNER_TYPE = 19;
|
const F_OWNER_TYPE = 19;
|
||||||
|
|
||||||
const F_TOTAL = 20;
|
const FIELD_COUNT = 20;
|
||||||
|
|
||||||
protected $em;
|
protected $em;
|
||||||
protected $batt_hash;
|
protected $batt_hash;
|
||||||
|
|
@ -205,7 +205,7 @@ class WarrantyBulkUploader
|
||||||
|
|
||||||
// check number of fields.
|
// check number of fields.
|
||||||
// (1) should match what is in F_TOTAL
|
// (1) should match what is in F_TOTAL
|
||||||
if (count($fields) != self::F_TOTAL)
|
if (count($fields) != self::FIELD_COUNT)
|
||||||
{
|
{
|
||||||
$message = 'Invalid row.';
|
$message = 'Invalid row.';
|
||||||
$errors = $this->setOutputInfo($fields, 'NOT UPLOADED', $message, $row_num);
|
$errors = $this->setOutputInfo($fields, 'NOT UPLOADED', $message, $row_num);
|
||||||
|
|
@ -319,7 +319,7 @@ class WarrantyBulkUploader
|
||||||
|
|
||||||
protected function setOutputInfo($fields, $status, $message, $row_num)
|
protected function setOutputInfo($fields, $status, $message, $row_num)
|
||||||
{
|
{
|
||||||
if (count($fields) != self::F_TOTAL)
|
if (count($fields) != self::FIELD_COUNT)
|
||||||
{
|
{
|
||||||
// since we don't know field might be missing, we just output status and reason
|
// since we don't know field might be missing, we just output status and reason
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue