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