From 31dc7639afc84d128f0cc81ff391aa218ba1fef5 Mon Sep 17 00:00:00 2001 From: GotPPay Date: Mon, 9 Jul 2018 20:14:00 +0200 Subject: [PATCH] fetch billing details --- .../components/v1/orders/OrdersModel.php | 24 ++++++++++++++++ .../components/v2/orders/OrdersModel.php | 28 +++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/api-wiaas/server/components/v1/orders/OrdersModel.php b/api-wiaas/server/components/v1/orders/OrdersModel.php index 1f5e373..2b61030 100644 --- a/api-wiaas/server/components/v1/orders/OrdersModel.php +++ b/api-wiaas/server/components/v1/orders/OrdersModel.php @@ -31,6 +31,10 @@ class OrdersModel{ 'o.idCustomerInstance' => 'idCustomerInstance', 'rclc.IdCustomer' => 'idCustomer', 'cust.name' => 'customer', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'rclc.idCommercialLead' => 'idCommercialLead', 'cl.name' => 'commercialLead', 'IFNULL(b.name, \'\')' => 'assignedTo', @@ -55,6 +59,10 @@ class OrdersModel{ 'rclc.idCommercialLead' => 'idCommercialLead', 'cl.name' => 'commercialLead', 'o.orderDate' => 'orderDate', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'o.estimatedDeliveryDate' => 'estimatedDeliveryDate', '\'\'' => 'orderItems', 'SUM(rop.packageFixedPrice)' => 'orderTotalPrice', @@ -75,6 +83,10 @@ class OrdersModel{ 'o.idCustomerInstance' => 'idCustomerInstance', 'rclc.IdCustomer' => 'idCustomer', 'cust.name' => 'customer', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'o.orderDate' => 'orderDate', 'o.estimatedDeliveryDate' => 'estimatedDeliveryDate', '\'\'' => 'orderItems', @@ -225,6 +237,10 @@ class OrdersModel{ 'o.idCustomerInstance' => 'idCustomerInstance', 'rclc.IdCustomer' => 'idCustomer', 'cust.name' => 'customer', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'rclc.idCommercialLead' => 'idCommercialLead', 'cl.name' => 'commercialLead', 'o.orderDate' => 'orderDate', @@ -250,6 +266,10 @@ class OrdersModel{ 'rclc.idCommercialLead' => 'idCommercialLead', 'cl.name' => 'commercialLead', 'o.orderDate' => 'orderDate', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'o.estimatedDeliveryDate' => 'estimatedDeliveryDate', 'o.deliveryDate' => 'deliveryDate', 'MAX(rop.endOfLife)' => 'endOfLife', @@ -272,6 +292,10 @@ class OrdersModel{ 'o.idCustomerInstance' => 'idCustomerInstance', 'rclc.IdCustomer' => 'idCustomer', 'cust.name' => 'customer', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'o.orderDate' => 'orderDate', 'o.estimatedDeliveryDate' => 'estimatedDeliveryDate', 'o.deliveryDate' => 'deliveryDate', diff --git a/api-wiaas/server/components/v2/orders/OrdersModel.php b/api-wiaas/server/components/v2/orders/OrdersModel.php index 2075fc3..f5eb59e 100644 --- a/api-wiaas/server/components/v2/orders/OrdersModel.php +++ b/api-wiaas/server/components/v2/orders/OrdersModel.php @@ -115,6 +115,10 @@ class OrdersModel{ 'o.idCustomerInstance' => 'idCustomerInstance', 'rclc.IdCustomer' => 'idCustomer', 'cust.name' => 'customer', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'rclc.idCommercialLead' => 'idCommercialLead', 'cl.name' => 'commercialLead', 'IFNULL(b.name, \'\')' => 'assignedTo', @@ -139,6 +143,10 @@ class OrdersModel{ 'rclc.idCommercialLead' => 'idCommercialLead', 'uc.id' => 'idCustomerUser', 'cust.name' => 'customerName', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'cust.phone' => 'phone', 'uc.mail' => 'mail', 'cl.contactName' => 'clContactName', @@ -164,6 +172,10 @@ class OrdersModel{ 'o.idCustomerInstance' => 'idCustomerInstance', 'rclc.IdCustomer' => 'idCustomer', 'cust.name' => 'customer', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'o.orderDate' => 'orderDate', 'o.estimatedDeliveryDate' => 'estimatedDeliveryDate', '\'\'' => 'orderItems', @@ -318,6 +330,10 @@ class OrdersModel{ 'o.idCustomerInstance' => 'idCustomerInstance', 'rclc.IdCustomer' => 'idCustomer', 'cust.name' => 'customer', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'rclc.idCommercialLead' => 'idCommercialLead', 'cl.name' => 'commercialLead', 'o.orderDate' => 'orderDate', @@ -344,6 +360,10 @@ class OrdersModel{ 'rclc.idCommercialLead' => 'idCommercialLead', 'uc.id' => 'idCustomerUser', 'cust.name' => 'customerName', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'cust.phone' => 'phone', 'uc.mail' => 'mail', 'cl.name' => 'clName', @@ -371,6 +391,10 @@ class OrdersModel{ 'o.idCustomerInstance' => 'idCustomerInstance', 'rclc.IdCustomer' => 'idCustomer', 'cust.name' => 'customer', + 'o.billingFirstName' => 'billingFirstName', + 'o.billingLastName' => 'billingLastName', + 'o.billingMail' => 'billingMail', + 'o.billingAddress' => 'billingAddress', 'o.orderDate' => 'orderDate', 'o.estimatedDeliveryDate' => 'estimatedDeliveryDate', 'o.deliveryDate' => 'deliveryDate', @@ -761,6 +785,10 @@ class OrdersModel{ o.orderNumber, DATE_FORMAT(o.orderDate, '%D %b, %y') as orderDate, o.estimatedDeliveryDate, + o.billingFirstName, + o.billingLastName, + o.billingMail, + o.billingAddress, o.status, o.reference, o.tender,