<?php
namespace TourOperatorProAdmin\app\controllers;
use TourOperatorPro\Factory;
use TourOperatorPro\Mvc\Controller\Controller;
use TourOperatorPro\Mvc\Controller\ControllerForm ;
use TourOperatorPro\Mvc\Model\Model;

defined('_TOUROPERATOR_EXEC') or die;
class OrderController extends ControllerForm
{
    public $view="orders";
    public function delete($id = 0)
    {
        return parent::delete($id); // TODO: Change the autogenerated stub
    }
    public function ajax_change_country_code_order()
    {
        $input = Factory::getInput();
        $customer_id = $input->getInt('customer_id', 0);
        $country_code = $input->getString('country_code', "");
        $modelOrderdetail = Model::getInstance('customer');
        $order = $modelOrderdetail->change_country_code_order($customer_id, $country_code);
        return $order;
    }
    public function save($data = array())
    {
        $input = Factory::getInput();
        $data = $input->getData();
        $modelOrder = Model::getInstance('order');
        $order = $modelOrder->save_order_edit($data);
        return $order;
    }
}