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_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 [