Added Additional Information

City
District
State
Zip
This commit is contained in:
Focuslinkstech
2024-05-20 13:09:38 +01:00
parent 51c4909308
commit f29e692e81
6 changed files with 128 additions and 3 deletions

View File

@ -391,6 +391,11 @@ switch ($action) {
//post Customers Attributes
$custom_field_names = (array) $_POST['custom_field_name'];
$custom_field_values = (array) $_POST['custom_field_value'];
//additional information
$city = _post('city');
$district = _post('district');
$state = _post('state');
$zip = _post('zip');
run_hook('add_customer'); #HOOK
$msg = '';
@ -422,6 +427,10 @@ switch ($action) {
$d->phonenumber = Lang::phoneFormat($phonenumber);
$d->service_type = $service_type;
$d->coordinates = $coordinates;
$d->city = $city;
$d->district = $district;
$d->state = $state;
$d->zip = $zip;
$d->save();
// Retrieve the customer ID of the newly created customer
@ -460,6 +469,11 @@ switch ($action) {
$service_type = _post('service_type');
$coordinates = _post('coordinates');
$status = _post('status');
//additional information
$city = _post('city');
$district = _post('district');
$state = _post('state');
$zip = _post('zip');
run_hook('edit_customer'); #HOOK
$msg = '';
if (Validator::Length($username, 35, 2) == false) {
@ -522,6 +536,10 @@ switch ($action) {
$d->phonenumber = $phonenumber;
$d->service_type = $service_type;
$d->coordinates = $coordinates;
$d->city = $city;
$d->district = $district;
$d->state = $state;
$d->zip = $zip;
$d->save();

View File

@ -96,5 +96,8 @@
],
"2024.5.17" : [
"ALTER TABLE `tbl_customers` ADD `status` ENUM('Active','Banned','Disabled') NOT NULL DEFAULT 'Active' AFTER `auto_renewal`;"
],
"2024.5.20" : [
"ALTER TABLE `tbl_customers` ADD `city` VARCHAR(255) NULL AFTER `address`, ADD `district` VARCHAR(255) NULL AFTER `city`, ADD `state` VARCHAR(255) NULL AFTER `district`, ADD `zip` VARCHAR(10) NULL AFTER `state`;"
]
}