Rename field total. #660

This commit is contained in:
Korina Cordero 2022-05-12 08:10:44 +00:00
parent 4afa21f51e
commit 938d6ff848

View file

@ -37,7 +37,7 @@ class WarrantyBulkUploader
const F_BATT_ID = 18; // sap code in system
const F_OWNER_TYPE = 19;
const F_TOTAL = 20;
const FIELD_COUNT = 20;
protected $em;
protected $batt_hash;
@ -205,7 +205,7 @@ class WarrantyBulkUploader
// check number of fields.
// (1) should match what is in F_TOTAL
if (count($fields) != self::F_TOTAL)
if (count($fields) != self::FIELD_COUNT)
{
$message = 'Invalid row.';
$errors = $this->setOutputInfo($fields, 'NOT UPLOADED', $message, $row_num);
@ -319,7 +319,7 @@ class WarrantyBulkUploader
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
return [