目的地单团财务表的计算, 相同产品编号, 允许拼团产品编号
parent
3906f1636b
commit
ae36fe72e9
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Order_finance extends CI_Controller {
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* 单团财务表计算
|
||||
* @date 2018-07-18
|
||||
* @param integer $coli_sn 订单主表key
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function single_order_report($coli_sn=0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* 最基本的订单
|
||||
* * 仅含有一个产品
|
||||
* @example 180712534
|
||||
* @date 2018-07-18
|
||||
* @param integer $coli_sn 订单主表key
|
||||
* @return [type] [description]
|
||||
*/
|
||||
public function basic($coli_sn=0)
|
||||
{
|
||||
# code...
|
||||
}
|
||||
|
||||
/*!
|
||||
* 获取相同的产品编号
|
||||
* @date 2018-07-18
|
||||
* @param string $tour_code 产品编号
|
||||
* @return array 含相同产品的数组
|
||||
*/
|
||||
public function get_equaltour($tour_code="")
|
||||
{
|
||||
$equal_tour = null;
|
||||
$all_equals = $this->equal_tours();
|
||||
foreach ($all_equals as $key => $equal) {
|
||||
if (in_array($tour_code, $equal)) {
|
||||
$equal_tour = $equal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $equal_tour;
|
||||
}
|
||||
/** 产品编号不同实际是同一产品 */
|
||||
public function equal_tours()
|
||||
{
|
||||
return array(
|
||||
array("SHSIC-31", "SHSIC-41"),
|
||||
array("SHSIC-32", "SHSIC-42"),
|
||||
array("SHSIC-33", "SHSIC-43"),
|
||||
array("SHSIC-34", "SHSIC-44")
|
||||
);
|
||||
}
|
||||
|
||||
public function get_allowed_combine($tour_code="")
|
||||
{
|
||||
$allowed = null;
|
||||
$all_allowed = $this->allowed_combine();
|
||||
foreach ($all_allowed as $key => $va) {
|
||||
if (in_array($tour_code, $va)) {
|
||||
$allowed = $va;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $allowed;
|
||||
}
|
||||
/** 不同产品但部分行程相同所以允许拼团 */
|
||||
public function allowed_combine()
|
||||
{
|
||||
return array(
|
||||
array("XASIC-15", "XASIC-41"),
|
||||
array("BJSIC-47", "BJSIC-41")
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* End of file order_finance.php */
|
||||
/* Location: ./webht/third_party/trippestOrderSync/controllers/order_finance.php */
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class OrderFinance_model extends CI_Model {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* End of file orderFinance_model.php */
|
||||
/* Location: ./webht/third_party/trippestOrderSync/models/orderFinance_model.php */
|
Loading…
Reference in New Issue