add first name, last name and mail to the orders table
This commit is contained in:
@@ -1207,6 +1207,9 @@
|
||||
$concatenatedDeliveryAddress = $deliveryInfo['detailedAddress'].", ".$deliveryInfo['city'].", $countryName, ".$deliveryInfo['zipCode'];
|
||||
$billingCountryDetails = $this->getCountryDetailsById($billingInfo['idCountrySelected'])[0];
|
||||
$concatenatedBillingAddress = $billingInfo['detailedAddress'].", ".$billingInfo['city'].", ".$billingCountryDetails['countryName'].", ".$billingInfo['zipCode'];
|
||||
$billingFirstName = $billingInfo['firstName'];
|
||||
$billingLastName = $billingInfo['lastName'];
|
||||
$billingMail = $billingInfo['invoiceMail'];
|
||||
$projectNumber = $countryCode . $orderNumber;
|
||||
$orderDate = $today->format('Y-m-d H:m:s');
|
||||
|
||||
@@ -1219,7 +1222,7 @@
|
||||
|
||||
$sql = "
|
||||
INSERT INTO ".TABLES['orders']."
|
||||
(idCustomerInstance, orderNumber, orderDate, reference, tender, projectNumber, deliveryAddress, billingAddress, idTerms, idOrderType, idProject)
|
||||
(idCustomerInstance, orderNumber, orderDate, reference, tender, projectNumber, deliveryAddress, billingAddress, billingFirstName, billingLastName, billingMail, idTerms, idOrderType, idProject)
|
||||
VALUES (
|
||||
$idCustomerInstance,
|
||||
'".$orderNumber."',
|
||||
@@ -1229,6 +1232,9 @@
|
||||
'".$projectNumber."',
|
||||
'".$concatenatedDeliveryAddress."',
|
||||
'".$concatenatedBillingAddress."',
|
||||
'".$billingFirstName."',
|
||||
'".$billingLastName."',
|
||||
'".$billingMail."',
|
||||
'".$terms['idTemrs']."',
|
||||
'".$orderType."',
|
||||
".$idProject."
|
||||
|
||||
@@ -796,6 +796,9 @@ CREATE TABLE `orders` (
|
||||
`projectNumber` varchar(12) DEFAULT NULL,
|
||||
`deliveryAddress` varchar(600) DEFAULT NULL,
|
||||
`billingAddress` varchar(600) DEFAULT NULL,
|
||||
`billingFirstName` varchar(100) DEFAULT NULL,
|
||||
`billingLastName` varchar(100) DEFAULT NULL,
|
||||
`billingMail` varchar(300) DEFAULT NULL,
|
||||
`idTerms` int(11) DEFAULT '1',
|
||||
`customerAccepted` tinyint(1) DEFAULT '0',
|
||||
`acceptanceDueDate` date DEFAULT NULL,
|
||||
|
||||
Reference in New Issue
Block a user