Merge branch 'add-biling-details-to-order' into 'development'

Add biling details to order

See merge request saburly/wiaas/wiaas-legacy!4
This commit was merged in pull request #4.
This commit is contained in:
Nedim Uka
2018-06-25 10:04:15 +00:00
3 changed files with 11 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ JavasScript (React + Redux)
## DOCKER ## DOCKER
- install docker-ce and docker-compose - install docker-ce and docker-compose
- Check env variables in php.dockerfile in root directory of project (for local testing, REACT_APP_DEV_URL should be set to http://localhost:8000/api-wiaas)
- from root of the project, execute `docker-compose build` and then `docker-compose up` - from root of the project, execute `docker-compose build` and then `docker-compose up`
Application is now available on http://localhost:8000 Application is now available on http://localhost:8000

View File

@@ -1207,6 +1207,9 @@
$concatenatedDeliveryAddress = $deliveryInfo['detailedAddress'].", ".$deliveryInfo['city'].", $countryName, ".$deliveryInfo['zipCode']; $concatenatedDeliveryAddress = $deliveryInfo['detailedAddress'].", ".$deliveryInfo['city'].", $countryName, ".$deliveryInfo['zipCode'];
$billingCountryDetails = $this->getCountryDetailsById($billingInfo['idCountrySelected'])[0]; $billingCountryDetails = $this->getCountryDetailsById($billingInfo['idCountrySelected'])[0];
$concatenatedBillingAddress = $billingInfo['detailedAddress'].", ".$billingInfo['city'].", ".$billingCountryDetails['countryName'].", ".$billingInfo['zipCode']; $concatenatedBillingAddress = $billingInfo['detailedAddress'].", ".$billingInfo['city'].", ".$billingCountryDetails['countryName'].", ".$billingInfo['zipCode'];
$billingFirstName = $billingInfo['firstName'];
$billingLastName = $billingInfo['lastName'];
$billingMail = $billingInfo['invoiceMail'];
$projectNumber = $countryCode . $orderNumber; $projectNumber = $countryCode . $orderNumber;
$orderDate = $today->format('Y-m-d H:m:s'); $orderDate = $today->format('Y-m-d H:m:s');
@@ -1219,7 +1222,7 @@
$sql = " $sql = "
INSERT INTO ".TABLES['orders']." 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 ( VALUES (
$idCustomerInstance, $idCustomerInstance,
'".$orderNumber."', '".$orderNumber."',
@@ -1229,6 +1232,9 @@
'".$projectNumber."', '".$projectNumber."',
'".$concatenatedDeliveryAddress."', '".$concatenatedDeliveryAddress."',
'".$concatenatedBillingAddress."', '".$concatenatedBillingAddress."',
'".$billingFirstName."',
'".$billingLastName."',
'".$billingMail."',
'".$terms['idTemrs']."', '".$terms['idTemrs']."',
'".$orderType."', '".$orderType."',
".$idProject." ".$idProject."

View File

@@ -796,6 +796,9 @@ CREATE TABLE `orders` (
`projectNumber` varchar(12) DEFAULT NULL, `projectNumber` varchar(12) DEFAULT NULL,
`deliveryAddress` varchar(600) DEFAULT NULL, `deliveryAddress` varchar(600) DEFAULT NULL,
`billingAddress` 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', `idTerms` int(11) DEFAULT '1',
`customerAccepted` tinyint(1) DEFAULT '0', `customerAccepted` tinyint(1) DEFAULT '0',
`acceptanceDueDate` date DEFAULT NULL, `acceptanceDueDate` date DEFAULT NULL,