|
|
|
@ -35,7 +35,7 @@ class Order_finance extends CI_Controller {
|
|
|
|
|
// 重新生成账单
|
|
|
|
|
// HT批量按钮调用
|
|
|
|
|
// 仅读取成本信息计算
|
|
|
|
|
public function single_order_report($coli_sn=0)
|
|
|
|
|
public function single_order_report($coli_sn=0, $debug=false)
|
|
|
|
|
{
|
|
|
|
|
$order_info = $this->OrderFinance_model->get_order_info($coli_sn);
|
|
|
|
|
if (empty($order_info)) {
|
|
|
|
@ -45,19 +45,19 @@ class Order_finance extends CI_Controller {
|
|
|
|
|
if ( ! empty($report_order_exists)) {
|
|
|
|
|
return $this->output->set_content_type('application/json')->set_output(json_encode($report_order_exists));
|
|
|
|
|
}
|
|
|
|
|
return $this->generate_report($order_info);
|
|
|
|
|
return $this->generate_report($order_info, $debug);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 重新生成账单
|
|
|
|
|
// HT单团财务表页面调用, 先刷新一次成本
|
|
|
|
|
public function single_order_report_refresh($coli_sn=0)
|
|
|
|
|
public function single_order_report_refresh($coli_sn=0, $debug=false)
|
|
|
|
|
{
|
|
|
|
|
// 刷新成本
|
|
|
|
|
$controller_name = "TulanduoApi";
|
|
|
|
|
require_once($controller_name . '.php');
|
|
|
|
|
$vendor_class = new $controller_name();
|
|
|
|
|
$ret = $vendor_class->insert_HT_order_operation($coli_sn);
|
|
|
|
|
$this->single_order_report($coli_sn);
|
|
|
|
|
$this->single_order_report($coli_sn, $debug);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
@ -75,7 +75,7 @@ class Order_finance extends CI_Controller {
|
|
|
|
|
* * * 写入单团财务表report_order
|
|
|
|
|
* END
|
|
|
|
|
*/
|
|
|
|
|
public function generate_report($order_info=array())
|
|
|
|
|
public function generate_report($order_info=array(), $debug=false)
|
|
|
|
|
{
|
|
|
|
|
$coli_sn = $order_info->COLI_SN;
|
|
|
|
|
/** 单团财务表 */
|
|
|
|
@ -224,6 +224,9 @@ class Order_finance extends CI_Controller {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$ret->processed_cold_sn = array_unique($processed_cold_sn);
|
|
|
|
|
if ($debug !== false) {
|
|
|
|
|
return $this->output->set_content_type('application/json')->set_output(json_encode($ret));
|
|
|
|
|
}
|
|
|
|
|
/** 开始写入数据库 */
|
|
|
|
|
/** 图兰朵供应商 */
|
|
|
|
|
if ( ! empty($ret->report_tour)) {
|
|
|
|
|