Initial commit
This commit is contained in:
51
api-wiaas/server/components/v1/customers/CustomersModel.php
Normal file
51
api-wiaas/server/components/v1/customers/CustomersModel.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Data manipulation for the docuemnts
|
||||
*/
|
||||
class CustomersModel{
|
||||
/**
|
||||
* returns all the invoice processes existing in the application
|
||||
* @return Array all the invoice processes from the application
|
||||
*/
|
||||
public function getOrderTypes() {
|
||||
$orderType = new OrderType();
|
||||
|
||||
return $orderType->getOrderTypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* get customers list linked to the commercial lead
|
||||
* @return Array list of customers linked to a commercial lead
|
||||
*/
|
||||
public function getComercialLeadCustomers(){
|
||||
$data = [];
|
||||
$clCustomers = new ClCustomers();
|
||||
$orderType = new OrderType();
|
||||
|
||||
$data['customers'] = $clCustomers->getComercialLeadCustomers();
|
||||
$data['defaultIdOrderType'] = $orderType->getCLDefaultOrderType();
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* save Default Order Type
|
||||
* @param INT $defaultIdOrderType id for default order type
|
||||
* @return Array update message
|
||||
*/
|
||||
public function saveDefaultOrderType($defaultIdOrderType){
|
||||
$orderType = new OrderType();
|
||||
|
||||
return $orderType->saveDefaultOrderType($defaultIdOrderType);
|
||||
}
|
||||
|
||||
/**
|
||||
* save Customers Order Types
|
||||
* @param Object $customers list of customers containg alos the id for order type
|
||||
* @return Array update message
|
||||
*/
|
||||
public function saveCustomersOrderTypes($customers){
|
||||
$orderType = new OrderType();
|
||||
|
||||
return $orderType->saveCustomersOrderTypes($customers);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user