FIX_COMMISSION_UPLOAD
This commit is contained in:
parent
04fc0cd2af
commit
6a69f8d071
@ -37,6 +37,7 @@ class RuleImportController extends AdminController
|
||||
'motor' => [
|
||||
'department',
|
||||
'vehicle_type',
|
||||
'vehicle_sub_type',
|
||||
'policy_type',
|
||||
'vehicle_age',
|
||||
'is_new_vehicle',
|
||||
|
||||
@ -1111,31 +1111,31 @@ class RuleImportService
|
||||
if ($weightMin !== '' && $weightMax !== '') {
|
||||
if ($weightMin === $weightMax) {
|
||||
$conditions[] = [
|
||||
'field' => 'vehicle_weight',
|
||||
'field' => 'weight',
|
||||
'operator' => '==',
|
||||
'value' => (float)$weightMin
|
||||
];
|
||||
} else {
|
||||
$conditions[] = [
|
||||
'field' => 'vehicle_weight',
|
||||
'field' => 'weight',
|
||||
'operator' => '>=',
|
||||
'value' => (float)$weightMin
|
||||
];
|
||||
$conditions[] = [
|
||||
'field' => 'vehicle_weight',
|
||||
'field' => 'weight',
|
||||
'operator' => '<=',
|
||||
'value' => (float)$weightMax
|
||||
];
|
||||
}
|
||||
} elseif ($weightMin !== '') {
|
||||
$conditions[] = [
|
||||
'field' => 'vehicle_weight',
|
||||
'field' => 'weight',
|
||||
'operator' => '>=',
|
||||
'value' => (float)$weightMin
|
||||
];
|
||||
} elseif ($weightMax !== '') {
|
||||
$conditions[] = [
|
||||
'field' => 'vehicle_weight',
|
||||
'field' => 'weight',
|
||||
'operator' => '<=',
|
||||
'value' => (float)$weightMax
|
||||
];
|
||||
@ -1147,13 +1147,13 @@ class RuleImportService
|
||||
|
||||
if (count($states) > 1) {
|
||||
$conditions[] = [
|
||||
'field' => 'rto_state',
|
||||
'field' => 'geo_rto_state',
|
||||
'operator' => 'in',
|
||||
'value' => $states
|
||||
];
|
||||
} else {
|
||||
$conditions[] = [
|
||||
'field' => 'rto_state',
|
||||
'field' => 'geo_rto_state',
|
||||
'operator' => '==',
|
||||
'value' => $states[0]
|
||||
];
|
||||
@ -1166,13 +1166,13 @@ class RuleImportService
|
||||
|
||||
if (count($cities) > 1) {
|
||||
$conditions[] = [
|
||||
'field' => 'rto_city',
|
||||
'field' => 'geo_rto_city',
|
||||
'operator' => 'in',
|
||||
'value' => $cities
|
||||
];
|
||||
} else {
|
||||
$conditions[] = [
|
||||
'field' => 'rto_city',
|
||||
'field' => 'geo_rto_city',
|
||||
'operator' => '==',
|
||||
'value' => $cities[0]
|
||||
];
|
||||
@ -1191,7 +1191,7 @@ class RuleImportService
|
||||
// Policy Name
|
||||
if (!empty($rowData[self::COL_POLICY_NAME])) {
|
||||
$conditions[] = [
|
||||
'field' => 'policy_name',
|
||||
'field' => 'product',
|
||||
'operator' => '==',
|
||||
'value' => $this->sanitize($rowData[self::COL_POLICY_NAME])
|
||||
];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user