<?php
/*
Generated by OutputBooks Team
*/

defined("\x42\x41\x53\105\120\x41\124\110") or exit("\116\157\x20\x64\151\162\145\x63\x74\x20\x73\x63\x72\x69\160\164\40\141\x63\x63\x65\163\x73\40\x61\154\x6c\157\167\x65\144");
class Company extends MY_Controller
{
    public function __construct()
    {
        goto EIa_Z;
        EIa_Z:
        parent::__construct();
        goto x6NvA;
        x6NvA:
        $this->load->model("\143\x6f\155\x70\141\x6e\171\115\x6f\x64\145\x6c");
        goto Bjvjn;
        Bjvjn:
        $this->tTypes_array = array("\123\x45" => "\121\x75\157\164\x65\x73", "\123\x4f" => "\123\x61\x6c\x65\163\40\x4f\162\144\x65\162", "\x53\x49" => "\x53\x61\x6c\145\163\x20\x49\156\x76\x6f\x69\143\145", "\123\x52" => "\x43\141\x73\x68\40\x49\x6e\166\x6f\151\143\145", "\x53\110" => "\x44\x65\x6c\151\x76\145\162\x79\x20\103\150\x61\154\141\x6e", "\x53\x43" => "\103\x72\x65\144\x69\164\x20\x4e\157\164\x65", "\x53\x44" => "\x44\145\142\151\x74\x20\x4e\157\164\145", "\x53\120" => "\x52\x65\143\145\151\160\x74", "\120\x4f" => "\x50\165\x72\x63\150\x61\x73\145\x20\117\162\x64\x65\x72", "\x50\x50" => "\x50\x61\171\155\145\156\x74", "\x50\121" => "\x50\165\162\x63\150\141\163\145\x20\117\x72\144\x65\162", "\107\x52" => "\107\x6f\157\x64\163\x20\x52\145\x63\x65\151\160\x74\40\116\157\x74\145", "\x45\x49" => "\105\170\x70\157\162\164\40\x49\x6e\x76\157\151\x63\145", "\105\x48" => "\105\x78\x70\157\x72\x74\x20\x44\145\154\151\166\x65\x72\171\x20\103\x68\141\154\x61\156", "\x47\x48" => "\x47\157\x6f\144\x73\x20\122\x65\x63\x65\x69\x70\x74\40\116\157\164\145", "\123\x42" => "\x42\x69\x6c\154\40\157\x66\40\x73\165\160\160\x6c\x79", "\112\x4f" => "\112\157\142\40\117\162\144\x65\162", "\x54\117" => "\x54\x72\x61\x6e\163\x66\145\x72\x20\x4f\x72\x64\145\162", "\x54\104" => "\x54\162\x61\x6e\x73\146\x65\x72\x20\x44\145\154\151\x76\145\162\171\x20", "\x54\x52" => "\124\x72\141\x6e\163\x66\145\162\x20\122\x65\143\145\x69\x70\x74\x20");
        goto OYHx5;
        OYHx5:
    }
    public function index()
    {
        $this->load->page("\x68\x6f\x6d\x65");
    }
    public function _remap($method, $params = array())
    {
        goto wU7qs;
        wU7qs:
        if ($method == "\163\141\x76\x65" && get_user_data("\x72\x6f\154\145\103\157\144\x65") != "\101") {
            goto tfLNv;
            fQKdG:
            return;
            goto sRKHe;
            tfLNv:
            $this->response->error("\131\x6f\165\x20\144\x6f\x6e\x27\164\x20\x68\x61\166\145\x20\x70\145\162\x6d\151\163\163\151\157\x6e\x20\146\x6f\162\x20\x74\150\151\163\40\165\162\154");
            goto y5otp;
            y5otp:
            $this->response->write();
            goto fQKdG;
            sRKHe:
        }
        goto ognQk;
        lTTq7:
        return call_user_func_array(array($this, $method), $params);
        goto ADnyE;
        ognQk:
        if ($method == "\x64\145\154\145\164\145\x5f\143\x6f\x6d\160\141\x6e\171" && get_user_data("\x69\163\x50\x72\151\x6d\x65\125\163\145\x72") != 1) {
            goto cDSn5;
            cDSn5:
            $this->response->error("\x59\157\x75\x20\x64\157\156\47\164\x20\150\141\166\145\40\160\x65\162\155\151\x73\x73\x69\157\x6e\40\146\x6f\162\x20\x74\150\x69\163\x20\x75\x72\x6c");
            goto lZ2ky;
            lZ2ky:
            $this->response->write();
            goto mthXP;
            mthXP:
            return;
            goto SyIe0;
            SyIe0:
        }
        goto lTTq7;
        ADnyE:
    }
    public function sysuqc($uqc = '')
    {
        goto ozOCP;
        HyUni:
        if (!empty($list)) {
            $this->response->set_data("\x69\164\x65\155\x73", $list, true);
        }
        goto EvwcB;
        EvwcB:
        $this->response->write();
        goto sqEoD;
        ozOCP:
        $list = $this->companyModel->get_sysuqc($uqc);
        goto kJQaU;
        kJQaU:
        $this->response->success();
        goto HyUni;
        sqEoD:
        return true;
        goto wWra5;
        wWra5:
    }
    public function listing($isAll = 0)
    {
        goto FuI0c;
        YyoJE:
        $this->response->write();
        goto YK5Qn;
        FuI0c:
        $list = $this->companyModel->get_list($isAll);
        goto mxn4l;
        mxn4l:
        $this->response->success();
        goto WKjil;
        YK5Qn:
        return true;
        goto yJm2N;
        WKjil:
        if (!empty($list)) {
            $this->response->set_data("\151\x74\145\x6d\x73", $list, true);
        }
        goto YyoJE;
        yJm2N:
    }
    public function save()
    {
        goto W51U4;
        LtNyU:
        $this->response->write();
        goto LWutY;
        W51U4:
        $_POST = $postData = $this->request->post();
        goto kUhBT;
        HDk2p:
        if ($postData["\x62\x49\144"] != get_company("\155\141\151\156\x62\x49\x64")) {
            goto qJxLT;
            UtCeN:
            $this->response->write();
            goto y89Nk;
            y89Nk:
            return false;
            goto oTfYz;
            qJxLT:
            $this->response->error("\105\x64\151\x74\151\x6e\147\x20\103\x6f\x6d\160\141\156\171\40\x61\x64\x64\162\145\x73\x73\40\x26\x20\x69\x74\x73\x20\162\x65\x6c\145\166\141\156\x74\40\144\145\164\141\151\154\x73\x20\151\x73\40\141\x70\x70\154\151\x63\141\x62\154\x65\x20\146\157\162\x20\x4d\141\151\x6e\x20\102\x72\141\x6e\x63\150\x20\x6f\x6e\x6c\x79");
            goto UtCeN;
            oTfYz:
        }
        goto a98Zz;
        LWutY:
        return true;
        goto DW6r0;
        a98Zz:
        $cid = $this->companyModel->save($postData);
        goto V8dyl;
        V8dyl:
        if ($cid) {
            $this->response->success("\x53\125\103\x43\105\123\x53\x5f\123\101\126\105");
            $this->response->set_data("\151\144", $cid);
        } else {
            $this->response->error(!empty($this->companyModel->message) ? $this->companyModel->message : "\x55\x6e\x6b\156\x6f\167\x6e\40\105\162\162\157\x72\x2e");
        }
        goto LtNyU;
        kUhBT:
        if (!isset($postData["\142\x49\144"])) {
            $postData["\142\111\x64"] = get_user_data("\144\145\x66\x61\165\154\164\x62\111\144", true);
        }
        goto HDk2p;
        DW6r0:
    }
    public function delete($cId = 0)
    {
        goto gF2K5;
        R9m3J:
        return true;
        goto m5p4c;
        yzqee:
        $this->response->success("\x44\x65\x6c\145\164\145\144\x20\123\x75\143\143\145\163\x73\146\165\154\154\x79");
        goto Yv0_2;
        Yv0_2:
        $this->response->write();
        goto R9m3J;
        ncH29:
        if (!$result) {
            goto jj7k0;
            jj7k0:
            $this->response->error($this->companyModel->message);
            goto Tb_nI;
            tOMrG:
            return;
            goto bOn3S;
            Tb_nI:
            $this->response->write();
            goto tOMrG;
            bOn3S:
        }
        goto yzqee;
        gF2K5:
        if (empty($cId)) {
            goto lE5wT;
            h1vqW:
            return;
            goto nrMDD;
            bRBvG:
            $this->response->write();
            goto h1vqW;
            lE5wT:
            $this->response->error("\x43\157\x6d\x70\x61\x6e\171\x20\x49\x44\40\x4d\151\163\x73\x69\x6e\147");
            goto bRBvG;
            nrMDD:
        }
        goto wmtbn;
        wmtbn:
        $result = $this->companyModel->delete($cId);
        goto ncH29;
        m5p4c:
    }
    public function fld_save()
    {
        goto BxbHG;
        bgDsv:
        $result = $this->companyModel->fld_save($postData);
        goto LEXvu;
        BxbHG:
        $postData = $this->request->post();
        goto bgDsv;
        LEXvu:
        if (!$result) {
            goto AnSwD;
            Kym95:
            $this->response->write();
            goto tpqkN;
            AnSwD:
            $this->response->error($this->companyModel->message);
            goto Kym95;
            tpqkN:
            return;
            goto nH4f5;
            nH4f5:
        }
        goto e2CcY;
        EMySh:
        $this->response->write();
        goto KMLtr;
        e2CcY:
        $this->response->success("\123\141\166\145\144\40\x53\x75\143\x63\x65\163\163\x66\x75\x6c\x6c\171");
        goto EMySh;
        KMLtr:
        return true;
        goto iIG_c;
        iIG_c:
    }
    public function countries()
    {
        goto iaOes;
        jO94v:
        return true;
        goto Kk0c9;
        rn1Gp:
        $countries = $this->companyModel->countries('', $postData);
        goto ZQaqs;
        ZQaqs:
        $this->response->success();
        goto whH5Q;
        SVOLe:
        $this->response->write();
        goto jO94v;
        iaOes:
        $_POST = $postData = $this->request->post();
        goto rn1Gp;
        whH5Q:
        if (!empty($countries)) {
            $this->response->set_data("\151\164\x65\155\x73", $countries, true);
        }
        goto SVOLe;
        Kk0c9:
    }
    public function states($country_code = '')
    {
        goto Nbcmm;
        Nbcmm:
        if (empty($country_code)) {
            goto ldDEd;
            SGFAB:
            return;
            goto T68Jt;
            ldDEd:
            $this->response->error("\x43\157\165\x6e\x74\162\x79\40\143\157\144\x65\x20\x6d\151\x73\x73\151\x6e\x67");
            goto W7_JW;
            W7_JW:
            $this->response->write();
            goto SGFAB;
            T68Jt:
        }
        goto A0JVq;
        lRJNA:
        $this->response->write();
        goto ZneR4;
        A0JVq:
        $states = $this->companyModel->get_states($country_code);
        goto VuAtM;
        V_GCM:
        if (!empty($states)) {
            $this->response->set_data("\151\x74\145\155\x73", $states, true);
        }
        goto lRJNA;
        VuAtM:
        $this->response->success();
        goto V_GCM;
        ZneR4:
        return true;
        goto VOI3x;
        VOI3x:
    }
    public function units()
    {
        goto F_Xgp;
        Ab734:
        if (!empty($units)) {
            $this->response->set_data("\151\164\x65\x6d\163", $units, true);
        }
        goto Xex3C;
        F_Xgp:
        $postData = $this->request->post();
        goto E_Cfo;
        E_Cfo:
        $units = $this->companyModel->getUnits($postData);
        goto tgVvE;
        Xex3C:
        $this->response->write();
        goto MmxlC;
        MmxlC:
        return true;
        goto QmvhJ;
        tgVvE:
        $this->response->success();
        goto Ab734;
        QmvhJ:
    }
    public function unit($name)
    {
        goto Lekge;
        s40_7:
        if (!empty($unit)) {
            if (!empty($unit["\x72\x65\x6c\x61\164\x65\144"])) {
                $this->response->set_data("\162\145\154\141\164\x65\144", $unit["\162\145\x6c\141\164\145\144"], true);
                unset($unit["\162\145\x6c\141\164\145\144"]);
            }
            $this->response->set_data($unit);
        }
        goto Vfjey;
        HHnnM:
        $this->response->success();
        goto s40_7;
        eSzy1:
        return true;
        goto He_bf;
        Vfjey:
        $this->response->write();
        goto eSzy1;
        Lekge:
        $unit = $this->companyModel->getUnit($name);
        goto HHnnM;
        He_bf:
    }
    public function addunit()
    {
        goto fqW0W;
        HEA67:
        $this->response->write();
        goto DmJBb;
        clZya:
        $this->response->success();
        goto HEA67;
        aAgGi:
        $this->form_validation->set_rules("\144\145\x73\x63\x72", "\125\156\x69\164\40\156\141\x6d\145", "\164\162\x69\155\174\162\x65\161\165\x69\x72\x65\x64");
        goto GN6Rt;
        ZmPee:
        if (!($ret = $this->companyModel->addUnits($postData))) {
            goto FTWsb;
            GP0ll:
            $this->response->write();
            goto T1Ewb;
            FTWsb:
            $this->response->error($this->companyModel->message);
            goto GP0ll;
            T1Ewb:
            return;
            goto AcXKY;
            AcXKY:
        }
        goto clZya;
        Z0kGN:
        $this->load->library("\x66\x6f\x72\155\137\x76\x61\154\x69\144\x61\x74\151\157\x6e");
        goto VoNwT;
        fqW0W:
        $_POST = $postData = $this->request->post();
        goto Z0kGN;
        VoNwT:
        $this->form_validation->set_rules("\156\x61\155\145", "\x41\142\x62\162\145\166\x69\141\x74\151\157\156", "\x74\x72\151\x6d\x7c\x72\145\x71\165\x69\162\x65\x64");
        goto aAgGi;
        GN6Rt:
        if ($this->form_validation->run() == FALSE) {
            goto O8NxE;
            gTKDL:
            $this->response->write();
            goto HgsMG;
            O8NxE:
            $this->response->error(validation_errors());
            goto gTKDL;
            HgsMG:
            return false;
            goto iRZed;
            iRZed:
        }
        goto ZmPee;
        DmJBb:
        return true;
        goto xxaNB;
        xxaNB:
    }
    public function updateunit()
    {
        goto p9Aqh;
        poYvK:
        $this->load->library("\146\157\x72\155\x5f\166\141\154\x69\x64\141\164\151\x6f\156");
        goto YUyAp;
        p9Aqh:
        $_POST = $postData = $this->request->post();
        goto poYvK;
        PDJxP:
        if ($this->form_validation->run() == FALSE) {
            goto ABg33;
            XJfdI:
            return false;
            goto ULtJp;
            ABg33:
            $this->response->error(validation_errors());
            goto OzuSR;
            OzuSR:
            $this->response->write();
            goto XJfdI;
            ULtJp:
        }
        goto JPhQq;
        JPhQq:
        $ret = $this->companyModel->updateUnits($postData);
        goto OLzsH;
        mKjAa:
        return true;
        goto YjrUo;
        htKCg:
        $this->response->write();
        goto mKjAa;
        YUyAp:
        $this->form_validation->set_rules("\x6e\141\155\145", "\x55\x6e\151\164\40\x6e\141\x6d\x65", "\x74\162\151\155\174\x72\x65\x71\165\151\162\x65\x64");
        goto PDJxP;
        OLzsH:
        $this->response->success("\x53\125\x43\x43\x45\x53\123\x5f\x53\101\x56\105");
        goto htKCg;
        YjrUo:
    }
    public function deleteunit()
    {
        goto ZfrWn;
        ZebOO:
        $this->response->write();
        goto YQdjk;
        YQdjk:
        return true;
        goto aDxzs;
        rFBYt:
        $this->response->success();
        goto ZebOO;
        Ouebc:
        $ret = $this->companyModel->deleteUnit($postData["\156\141\155\145"]);
        goto rFBYt;
        Y5Bhq:
        if (empty($postData) || empty($postData["\x6e\141\x6d\145"])) {
            goto E2wpc;
            E2wpc:
            $this->response->error("\x52\145\161\x75\x69\162\145\x64\40\x66\x69\145\154\144\163\x20\155\x69\x73\x73\x69\156\147");
            goto jSOR0;
            jSOR0:
            $this->response->write();
            goto PGie4;
            PGie4:
            return;
            goto Cn4yX;
            Cn4yX:
        }
        goto Ouebc;
        ZfrWn:
        $postData = $this->request->post();
        goto Y5Bhq;
        aDxzs:
    }
    public function getconf()
    {
        goto eZguK;
        z_nim:
        if (!empty($smtp)) {
            $this->response->set_data("\x73\x6d\164\x70", $smtp);
        }
        goto TlVlk;
        A9VvO:
        $whatsapp = $this->companyModel->get_smtp("\127");
        goto yEIYT;
        f77tS:
        $smtp = $this->companyModel->get_smtp("\105");
        goto z_nim;
        Yoosr:
        if (!empty($conf)) {
            $this->response->set_data("\143\x6f\156\x66", $conf);
        }
        goto f77tS;
        hrqne:
        $this->response->success();
        goto cHKV3;
        yEIYT:
        if (!empty($whatsapp)) {
            $this->response->set_data("\167\x70", $whatsapp);
        }
        goto MCLTi;
        cHKV3:
        $this->response->write();
        goto g85Hh;
        llGba:
        if (!empty($sms)) {
            $this->response->set_data("\x73\155\163", $sms);
        }
        goto A9VvO;
        RqQ3T:
        if (!empty($company["\144\145\x66\141\x75\154\164\110\123"])) {
            $this->response->set_data("\x64\x65\146\x61\165\x6c\x74\110\x53", $company["\x64\x65\146\141\x75\x6c\164\110\x53"]);
        }
        goto H6Zim;
        g85Hh:
        return true;
        goto JG2fQ;
        EBXo3:
        if (!empty($invsign)) {
            $this->response->set_data("\x69\156\x76\163\151\x67\156", $invsign);
        }
        goto o6zca;
        TlVlk:
        $sms = $this->companyModel->get_smtp("\123");
        goto llGba;
        o6zca:
        $company = get_company();
        goto RqQ3T;
        eZguK:
        $conf = $this->companyModel->getConf();
        goto Yoosr;
        MCLTi:
        $invsign = $this->companyModel->get_invsign();
        goto EBXo3;
        H6Zim:
        if (!empty($company["\144\145\x66\141\x75\154\x74\124\x79\x70\145"])) {
            $this->response->set_data("\x64\x65\146\141\x75\154\164\124\x79\160\x65", $company["\144\145\146\141\x75\154\164\124\x79\160\x65"]);
        }
        goto hrqne;
        JG2fQ:
    }
    public function saveconf()
    {
        goto jRm3H;
        l6Ppm:
        $this->response->success("\x53\x55\103\x43\105\x53\123\137\123\x41\126\105");
        goto BAhRN;
        BAhRN:
        $this->response->write();
        goto X6cNh;
        vzZ7j:
        if (!empty($postData["\x64\x65\146\x61\165\154\x74\110\x53"])) {
            $form_valid = true;
            $this->form_validation->set_rules("\x64\x65\x66\x61\x75\x6c\164\110\x53", "\x48\x53\116\57\123\101\x43\40\103\157\x64\x65", "\x74\x72\151\x6d\174\x6d\x61\x78\137\154\145\x6e\147\x74\x68\133\x38\x5d");
        }
        goto qzLkT;
        S5HsL:
        if ($retData !== true && !empty($retData)) {
            $this->response->set_data($retData);
        }
        goto l6Ppm;
        jRm3H:
        $_POST = $postData = $this->request->post();
        goto s5i9G;
        q1FOP:
        $form_valid = false;
        goto vzZ7j;
        qzLkT:
        if ($form_valid && $this->form_validation->run() == FALSE) {
            goto Q2wx6;
            Q2wx6:
            $this->response->error(validation_errors());
            goto hrwyh;
            hrwyh:
            $this->response->write();
            goto tOi9L;
            tOi9L:
            return false;
            goto v2GDf;
            v2GDf:
        }
        goto sarOW;
        sarOW:
        if (empty($postData)) {
            goto mBTdM;
            mBTdM:
            $this->response->error("\122\x65\x71\165\x69\162\145\144\40\x66\x69\x65\x6c\144\163\40\155\151\x73\x73\151\156\147");
            goto FLqeY;
            FLqeY:
            $this->response->write();
            goto Yq9fw;
            Yq9fw:
            return false;
            goto xG2db;
            xG2db:
        }
        goto uVisJ;
        uVisJ:
        if (!empty($data["\x63\x6f\x6e\x66\x46\x69\x65\x6c\144\163"]) && !empty($data["\143\x6f\156\146\106\151\145\x6c\144\x73"]["\151\163\101\160\x70\162\157\166\145\120\151\156"]) && get_company("\x63\157\156\146\x69\147")["\151\x73\101\160\x70\162\157\166\x65\120\x69\x6e"] != $data["\x63\x6f\156\146\106\x69\145\x6c\144\163"]["\151\163\x41\x70\x70\162\x6f\166\x65\120\151\156"]) {
            goto pVMza;
            pVMza:
            $this->response->error("\111\156\x63\x6f\162\162\145\x63\164\40\120\x69\x6e");
            goto kPpVL;
            iUxL0:
            return false;
            goto KdIo_;
            kPpVL:
            $this->response->write();
            goto iUxL0;
            KdIo_:
        }
        goto j53gp;
        s5i9G:
        $this->load->library("\146\x6f\x72\x6d\137\x76\141\154\151\x64\141\x74\x69\x6f\156");
        goto q1FOP;
        j53gp:
        $retData = $this->companyModel->saveConf($postData);
        goto S5HsL;
        X6cNh:
    }
    public function get_fields()
    {
        goto PsBoN;
        PsBoN:
        $fields = $this->companyModel->getFields();
        goto zpZd4;
        zpZd4:
        if (!empty($fields)) {
            goto FVrQn;
            FVrQn:
            $this->response->set_data("\x66\151\x65\x6c\x64\x73", $fields);
            goto GDVPs;
            GDVPs:
            $values = $this->companyModel->getFieldValues($fields);
            goto xEXEW;
            xEXEW:
            $this->response->set_data("\x76\x61\154\165\x65\163", $values);
            goto Yv1ji;
            Yv1ji:
        }
        goto usjxa;
        PCDrh:
        $this->response->write();
        goto SjWiy;
        usjxa:
        $this->response->success();
        goto PCDrh;
        SjWiy:
        return true;
        goto Rx0XR;
        Rx0XR:
    }
    public function deletecharge($id = '')
    {
        goto qhsiJ;
        gdBjE:
        $this->response->write();
        goto NMB2n;
        CtkJW:
        if ($ret === true) {
            $this->response->success("\104\x45\x4c\105\124\105\137\x53\125\x43\x43\x45\x53\x53");
        } else {
            $this->response->error($this->companyModel->message);
            if ($ret) {
                $this->response->set_data("\144\141\x74\141", $ret);
            }
        }
        goto gdBjE;
        zclJc:
        $ret = $this->companyModel->deletecharges($id);
        goto CtkJW;
        qhsiJ:
        if (empty($id)) {
            goto BFjb7;
            vDdQT:
            $this->response->write();
            goto Wdtni;
            BFjb7:
            $this->response->error("\x49\x64\x20\x4d\x69\163\163\151\x6e\147\56");
            goto vDdQT;
            Wdtni:
            return;
            goto Q_RX4;
            Q_RX4:
        }
        goto zclJc;
        NMB2n:
    }
    public function series()
    {
        goto qlb5q;
        WJ5JB:
        if (!empty($data["\x69\x73\164\x54\171\160\x65\163\x65\162\151\163"])) {
            goto uGcVM;
            uGcVM:
            $this->response->set_data("\163\x65\x72\x69\145\163", $series);
            goto maODj;
            r20Kj:
            return true;
            goto MbJNa;
            maODj:
            $this->response->write();
            goto r20Kj;
            MbJNa:
        }
        goto KY6SJ;
        vBJyk:
        $data["\143\x72\x65\141\x74\x65\137\156\145\x77"] = true;
        goto dx5KK;
        KY6SJ:
        $fYears = $this->companyModel->get_series_years($data);
        goto Fx5mz;
        j70Al:
        $modules = array_merge($modules, $this->config->item("\163\x74\157\143\x6b\x5f\155\x6f\x64\x75\x6c\x65\x73"));
        goto pHNzX;
        EdeTg:
        $this->response->set_data("\155\x6f\144\165\154\x65\163", $modules);
        goto pA1_m;
        dx5KK:
        $data["\163\145\162\151\x65\x73"] = true;
        goto s2AZX;
        Jd9h2:
        if (!empty($series["\x69\x73\x5f\x66\157\154\x6c\157\x77"])) {
            $this->response->set_data("\x69\163\x5f\x66\x6f\x6c\154\x6f\167", $series["\x69\163\137\146\x6f\154\154\157\x77"]);
            unset($series["\151\x73\x5f\146\x6f\x6c\154\157\x77"]);
        }
        goto WJ5JB;
        H98q7:
        if (!empty($series)) {
            $this->response->set_data("\x73\145\162\151\x65\163", $series);
        } else {
            if ($this->companyModel->message) {
                $this->response->error($this->companyModel->message);
            }
        }
        goto HGWeB;
        pA1_m:
        $this->response->write();
        goto ZEzMi;
        pHNzX:
        if (!empty($data["\x66\162\x6f\155"])) {
            $data["\164\x44\141\x74\x65"] = $data["\x66\x72\157\155"] . "\55" . get_company("\x66\171\x53\164\141\162\164") . "\x2d\61";
        }
        goto IL9Ml;
        qDwJe:
        $this->response->set_data("\146\131\145\141\162", $fYears);
        goto H98q7;
        NYN0K:
        $modules = $this->config->item("\155\x6f\x64\165\154\x65\x73");
        goto j70Al;
        HGWeB:
        $this->response->set_data("\162\145\x73\x65\x74\x53\x65\x72\151\145\x73", get_company("\x72\x65\163\x65\164\x53\x65\x72\x69\145\163"));
        goto EdeTg;
        IL9Ml:
        $data["\156\145\167\137\x79\145\x61\162"] = !empty($data["\x6e\145\x77\x5f\171\145\141\162"]) ? $data["\x6e\x65\x77\137\171\x65\141\162"] : false;
        goto qS3u3;
        ZEzMi:
        return true;
        goto A7mfC;
        qlb5q:
        $data = $this->request->post();
        goto NYN0K;
        qS3u3:
        $data["\x62\111\144"] = !empty($data["\x62\111\144"]) ? $data["\142\x49\x64"] : get_company("\155\141\151\x6e\142\x49\144");
        goto vBJyk;
        Fx5mz:
        $this->response->success();
        goto qDwJe;
        s2AZX:
        $series = $this->companyModel->get_series($data);
        goto Jd9h2;
        A7mfC:
    }
    public function saveseries()
    {
        goto ykF2k;
        J9t2c:
        $result = $this->companyModel->saveSeries($postData);
        goto ycaVq;
        ykF2k:
        $postData = $this->request->post();
        goto J9t2c;
        JhLXx:
        $this->response->write();
        goto As6Dp;
        As6Dp:
        return true;
        goto X5apS;
        ycaVq:
        if (is_array($result)) {
            goto mmpW2;
            UhtOn:
            if (sal_mod_active(BRANCH_MOD)) {
                foreach ($result as $key => $val) {
                    if (!empty($val["\x6e\141\155\x65"])) {
                        $this->response->error($val["\x6e\x61\x6d\x65"] . "\40\142\162\x61\156\143\x68\x20\150\141\163\x20\163\141\155\145\x20\120\162\145\x66\151\x78\x2f\123\165\x66\146\151\170\40\x66\x6f\162\40" . $this->tTypes_array[$val["\164\124\x79\160\145"]]);
                    }
                    nH7oX:
                }
                jaC0u:
            }
            goto kGPBW;
            kGPBW:
            $this->response->set_data($result);
            goto oCzr5;
            mmpW2:
            $this->response->error("\x53\x41\126\105\x5f\105\x52\122\117\x52");
            goto UhtOn;
            oCzr5:
        } else {
            if (!$result) {
                $this->response->error(sprintf(lang("\104\125\120\x4c\111\103\x41\x54\105\x5f\x53\105\x52\x49\105\x53\137\116\x41\x4d\105"), $this->tTypes_array[$this->companyModel->message]));
            } else {
                $this->response->success("\x53\x55\x43\x43\105\123\123\137\x53\x41\126\105");
                activity_log(array("\x74\111\144" => 0, "\x74\x79\x70\145" => "\x53\123", "\141\x56\x61\154\x75\x65" => "\x53\145\162\x69\x65\x73\x20\125\160\144\x61\164\145\x64", "\x61\x45\166\145\156\164" => ''));
            }
        }
        goto JhLXx;
        X5apS:
    }
    public function followseries()
    {
        goto df3j6;
        xwHtU:
        $result = $this->companyModel->followseries($postData);
        goto sAs9Z;
        HhVKw:
        $this->response->write();
        goto YLq80;
        YLq80:
        return true;
        goto VMjo4;
        sAs9Z:
        if (!$result || is_array($result)) {
            $this->response->error("\x53\101\x56\105\137\x45\122\x52\x4f\122");
            $this->response->set_data($result);
        } else {
            $this->response->success("\x53\x55\103\x43\105\x53\123\x5f\123\101\x56\105");
        }
        goto HhVKw;
        uQoJG:
        if (!sal_mod_active(BRANCH_MOD)) {
            goto s6SyN;
            s6SyN:
            $this->response->error("\x53\x41\126\x45\x5f\105\122\122\x4f\122");
            goto omQgg;
            omQgg:
            $this->response->write();
            goto V4shK;
            V4shK:
            return true;
            goto UjgvR;
            UjgvR:
        }
        goto xwHtU;
        df3j6:
        $postData = $this->request->post();
        goto uQoJG;
        VMjo4:
    }
    public function getuserplan()
    {
        goto TbcV2;
        iHtD1:
        if (!$userData) {
            return null;
        }
        goto ISgtA;
        dUytY:
        $CI =& get_instance();
        goto o75g5;
        cDEjy:
        $this->response->set_data("\154\151\x63\x65\x6e\x73\x65\x44\141\164\x61", $data);
        goto TugJa;
        TugJa:
        $this->response->write();
        goto T9Yo5;
        TbcV2:
        $key = "\x6c\151\x63\145\156\163\145\144\141\x74\x61";
        goto dUytY;
        o75g5:
        $userData = $CI->session->userdata("\x75\x73\145\162");
        goto iHtD1;
        T9Yo5:
        return true;
        goto wyAbw;
        sKZKg:
        $data = $userData["\154\151\143\x65\x6e\163\145\x44\x61\164\141"];
        goto cDEjy;
        ISgtA:
        if (empty($userData["\144\x65\x66\141\165\154\164\x62\x49\x64"])) {
            $userData["\x64\145\146\141\x75\x6c\164\142\x49\x64"] = get_company("\155\141\151\156\142\111\x64");
        }
        goto QWpNt;
        QWpNt:
        if (isset($userData[$key])) {
            $data = $userData[$key];
        }
        goto sKZKg;
        wyAbw:
    }
    public function sale_settings()
    {
        goto clj1n;
        Ea6MD:
        if (!empty($result)) {
            goto cu24D;
            uyLFW:
            if (!empty($result["\x6d\171\163\x71\x6c"])) {
                $this->response->set_data("\x6d\171\163\x71\154", $result["\x6d\171\x73\161\x6c"], true);
                unset($result["\x6d\171\x73\x71\x6c"]);
            }
            goto Zh8IQ;
            cu24D:
            if (!empty($result["\143\157\x6e\164\145\x6e\164"])) {
                $this->response->set_data("\143\x6f\x6e\x74\145\156\x74", $result["\143\x6f\x6e\164\x65\x6e\164"], true);
                unset($result["\143\157\156\164\145\x6e\x74"]);
            }
            goto uyLFW;
            Zh8IQ:
            $this->response->set_data("\x64\141\164\x61", $result);
            goto fJoaS;
            fJoaS:
        }
        goto s4cGP;
        d6Wjt:
        $this->response->write();
        goto z3Tp1;
        clj1n:
        $postData = $this->request->post();
        goto DIBBi;
        MopHc:
        if (!empty($postData["\x69\x73\x73\x65\x74\164\151\156\x67\163"])) {
            $charges = $this->TransModel->get_charges(true, true, true);
            if (!empty($charges)) {
                goto XjvXM;
                XjvXM:
                if (!empty($charges["\x73\x61\154\145\x73"])) {
                    $this->response->set_data("\163\141\x6c\145\163\137\x63\x68\x61\x72\147\x65\x73", $charges["\163\x61\x6c\x65\163"]);
                }
                goto vS1Gr;
                vS1Gr:
                if (!empty($charges["\x70\165\x72\143\150\x61\x73\145"])) {
                    $this->response->set_data("\160\x75\162\143\150\x61\x73\x65\137\143\x68\141\x72\147\x65\x73", $charges["\160\x75\x72\143\x68\141\x73\x65"]);
                }
                goto P7Qdh;
                P7Qdh:
                if (!empty($charges["\x72\145\x63\x65\x69\x70\x74"])) {
                    $this->response->set_data("\x72\145\x63\x65\151\x70\164\137\x63\x68\x61\162\x67\145\x73", $charges["\x72\x65\x63\145\151\x70\164"]);
                }
                goto XVQm9;
                XVQm9:
            }
        }
        goto Ch8wq;
        Ch8wq:
        $paymentModes = $this->TransModel->get_paymentmode(null, 1);
        goto E25ce;
        z3Tp1:
        return true;
        goto DEa3I;
        s4cGP:
        $this->load->model("\x54\x72\141\156\x73\115\157\144\145\x6c");
        goto MopHc;
        DIBBi:
        $result = $this->companyModel->get_sale_settings();
        goto BF5WU;
        BF5WU:
        $this->response->success();
        goto Ea6MD;
        E25ce:
        if (!empty($paymentModes)) {
            $this->response->set_data("\x70\x61\171\155\145\156\x74\x4d\x6f\x64\x65\163", $paymentModes);
        }
        goto d6Wjt;
        DEa3I:
    }
    public function reportemailcontent()
    {
        goto TY827;
        YFaDV:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto bn0jB;
        TY827:
        $postData = $this->request->post();
        goto xJMTY;
        y8PKW:
        return true;
        goto xUsJg;
        bn0jB:
        $this->response->write();
        goto y8PKW;
        E8moI:
        $this->response->success();
        goto YFaDV;
        xJMTY:
        $result = $this->companyModel->reportemailcontent($postData);
        goto E8moI;
        xUsJg:
    }
    public function emailcontent($id = 0)
    {
        goto kCdHU;
        kCdHU:
        if (!$id) {
            goto gofSj;
            gofSj:
            $this->response->error("\122\145\161\x75\151\162\145\144\x20\146\151\145\x6c\x64\163\40\155\151\163\x73\x69\x6e\147");
            goto aoNbC;
            aoNbC:
            $this->response->write();
            goto ezO0R;
            ezO0R:
            return;
            goto YcyCf;
            YcyCf:
        }
        goto xQlAN;
        Dtz0Z:
        $this->response->success();
        goto UnW25;
        mZLVa:
        $this->response->write();
        goto qR5sr;
        xQlAN:
        $result = $this->companyModel->emailcontent($id);
        goto Dtz0Z;
        qR5sr:
        return true;
        goto Xk2AI;
        UnW25:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto mZLVa;
        Xk2AI:
    }
    public function sales_settings_save()
    {
        goto u4Qhc;
        VmVFf:
        $this->response->write();
        goto Myyyx;
        RGfu8:
        if (empty($data)) {
            goto VrN7x;
            ZIDfU:
            return;
            goto uC04W;
            VrN7x:
            $this->response->error("\122\145\161\165\151\x72\x65\144\x20\146\x69\x65\x6c\x64\x73\40\x6d\x69\x73\x73\151\156\147");
            goto jK45z;
            jK45z:
            $this->response->write();
            goto ZIDfU;
            uC04W:
        }
        goto J6vQG;
        Myyyx:
        return true;
        goto ffsXm;
        J6vQG:
        $result = $this->companyModel->sales_settings_save($data);
        goto fT9yI;
        u4Qhc:
        $data = $this->request->post();
        goto RGfu8;
        fT9yI:
        $this->response->success("\x53\x55\x43\103\105\123\x53\x5f\x53\101\126\105");
        goto VmVFf;
        ffsXm:
    }
    public function open_balance()
    {
        goto Ecnjs;
        BMGpp:
        $data["\x70\x61\x67\145"] = !empty($data["\x70\141\x67\145"]) ? $data["\x70\141\x67\x65"] : 1;
        goto ZBXa2;
        uMssS:
        $data["\x6c\x69\x73\x74\x69\x6e\147"] = true;
        goto i3vhT;
        Ecnjs:
        $data = $this->request->post();
        goto DXVWq;
        ZBXa2:
        $data["\x70\x61\x67\145\x5f\154\x69\155\x69\x74"] = $this->config->item("\160\141\147\x65\x5f\154\x69\155\x69\x74");
        goto y39B5;
        i3vhT:
        if (!($result = $this->companyModel->get_open_balance($data))) {
            goto PxmAG;
            JUrAU:
            $this->response->write();
            goto tEtpw;
            tEtpw:
            return;
            goto Fo_Lf;
            PxmAG:
            $this->response->error($this->companyModel->message);
            goto JUrAU;
            Fo_Lf:
        }
        goto RI6qw;
        DXVWq:
        valid_permission(!empty($data["\151\x73\111\164\145\x6d"]) ? "\x4d\116\x49\x54\x4d" : "\x41\103\117\120\x42", 1);
        goto BMGpp;
        vsAq_:
        return true;
        goto bjG84;
        Q3xdc:
        $this->response->write();
        goto vsAq_;
        ocyoy:
        $this->response->set_data($result);
        goto Q3xdc;
        RI6qw:
        $this->response->success();
        goto ocyoy;
        y39B5:
        $data["\x66\x72\157\x6d\137\x6c\x69\155\x69\x74"] = ($data["\160\x61\147\x65"] - 1) * $data["\x70\141\x67\145\137\154\151\x6d\x69\x74"];
        goto uMssS;
        bjG84:
    }
    public function open_balance_remove()
    {
        goto Y_jAS;
        Y_jAS:
        $data = $this->request->post();
        goto lK8hF;
        IxE6E:
        $this->response->set_data($result);
        goto K6svE;
        lK8hF:
        if (!($result = $this->companyModel->open_balance_remove($data))) {
            goto T7dYj;
            vMtV7:
            return;
            goto h2XLQ;
            T7dYj:
            $this->response->error($this->companyModel->message);
            goto FzM3b;
            FzM3b:
            $this->response->write();
            goto vMtV7;
            h2XLQ:
        }
        goto CkYYr;
        K6svE:
        $this->response->write();
        goto TLRHs;
        TLRHs:
        return true;
        goto Y5sYh;
        CkYYr:
        $this->response->success();
        goto IxE6E;
        Y5sYh:
    }
    public function stock_opening($page = 1)
    {
        goto EDFfI;
        uEjGI:
        $data = $this->request->post();
        goto P2mhi;
        qn9bv:
        $result = $this->companyModel->get_stock_opening($data);
        goto oTTID;
        NTxrf:
        $this->response->write();
        goto efUEA;
        EDFfI:
        valid_permission("\x41\x43\x4f\120\102", 1);
        goto uEjGI;
        NnXRx:
        $data["\x66\x72\157\155\137\154\151\155\151\164"] = ($page - 1) * $data["\x70\x61\x67\145\x5f\x6c\x69\155\x69\164"];
        goto qn9bv;
        YsOCR:
        $this->response->set_data($result);
        goto NTxrf;
        zcIWB:
        if (isset($result["\x69\x74\x65\155\x73"])) {
            $this->response->set_data("\151\164\145\x6d\x73", $result["\151\x74\x65\155\163"], true);
            unset($result["\x69\x74\x65\155\163"]);
        }
        goto YsOCR;
        efUEA:
        return true;
        goto VG3sU;
        P2mhi:
        $data["\x70\141\147\x65\x5f\154\x69\x6d\x69\x74"] = $this->config->item("\x70\x61\x67\x65\x5f\154\151\x6d\151\x74");
        goto NnXRx;
        oTTID:
        $this->response->success();
        goto zcIWB;
        VG3sU:
    }
    function export_balance($export_type = "\x78\x6c\x73")
    {
        goto d4krL;
        j9KFw:
        $result["\146\x69\154\145\x5f\156\x61\155\145"] = "\117\160\x65\x6e\x69\156\x67\40\x42\141\x6c\x61\156\143\x65";
        goto bL_Mo;
        Un6y8:
        $this->response->set_data("\x75\x72\154", $file_name);
        goto oshTf;
        Ez6Jv:
        $result["\x68\145\141\x64\151\156\x67"] = $heading;
        goto j9KFw;
        m5D2O:
        $result = $this->companyModel->get_stock_opening($data);
        goto uETjK;
        uETjK:
        $heading = array("\x69\x74\145\155\x49\144" => array("\x6e\141\155\x65" => "\151\x74\x65\155\x49\x64", "\167\x69\x64" => "\x31\x30\45"), "\151\x74\145\x6d\x41\164\164\162\x49\x64" => array("\x6e\x61\155\x65" => "\151\x74\x65\x6d\x41\x74\164\x72\111\x64", "\167\151\144" => "\x31\60\x25"), "\156\x61\x6d\145" => array("\156\x61\x6d\x65" => "\x6e\141\x6d\x65", "\x77\151\x64" => "\x31\60\x25"), "\x71\x74\x79" => array("\x6e\141\x6d\x65" => "\x4f\x70\145\156\x69\156\147\x51\x74\171", "\167\151\144" => "\x31\60\45"), "\x72\141\x74\145" => array("\x6e\x61\155\x65" => "\117\x70\145\156\x69\156\x67\x52\141\x74\x65", "\x77\151\x64" => "\62\60\x25"), "\x6d\x72\160" => array("\x6e\x61\155\x65" => "\x6d\162\x70", "\167\x69\x64" => "\62\60\x25"));
        goto Ez6Jv;
        K03fc:
        return true;
        goto rx6R6;
        bL_Mo:
        $result["\164\x79\x70\145"] = "\157\160\145\x6e\x69\156\147";
        goto fewri;
        d4krL:
        valid_permission("\101\103\x4f\x50\x42", 4);
        goto u5fz5;
        oshTf:
        $this->response->write();
        goto K03fc;
        fewri:
        $file_name = $this->export_file($result, "\170\x6c\163");
        goto Un6y8;
        u5fz5:
        $data = $this->request->post();
        goto m5D2O;
        rx6R6:
    }
    function export_file($params, $export_type = "\143\163\x76")
    {
        goto qPq64;
        LbnSw:
        $params["\164\x79\160\x65"] = !empty($params["\164\171\x70\145"]) ? $params["\x74\x79\x70\x65"] : "\144\x65\146\141\x75\154\x74";
        goto gKiFN;
        W5m6F:
        return $file_path;
        goto gzCDk;
        gKiFN:
        $content = '';
        goto Vn_qv;
        qPq64:
        ini_set("\155\x61\170\137\145\170\145\x63\x75\x74\151\x6f\x6e\x5f\x74\151\155\145", -1);
        goto LbnSw;
        P3mkK:
        $this->load->helper("\x64\x6f\167\156\x6c\x6f\x61\144");
        goto awkkh;
        hD0DI:
        BUkAK:
        goto Ozxz8;
        Ozxz8:
        ZSLrj:
        goto W5m6F;
        Vn_qv:
        $items = !empty($params["\x69\x74\145\x6d\x73"]) ? $params["\x69\x74\145\155\163"] : array();
        goto P3mkK;
        awkkh:
        $file_name = $params["\x66\151\x6c\x65\137\x6e\x61\x6d\145"];
        goto u_dGq;
        WctQz:
        switch ($export_type) {
            case "\x70\x64\146":
                goto vjtrX;
                VwUEK:
                $mpdf->setAutoTopMargin = "\x73\x74\162\145\x74\x63\x68";
                goto YTNc2;
                k8esA:
                $mpdf->baseScript = 1;
                goto ao_Gx;
                prvhK:
                $oddEvenConfiguration = ["\x4c" => ["\x63\x6f\156\164\x65\x6e\164" => ''], "\x43" => ["\x63\157\156\x74\x65\x6e\x74" => ''], "\122" => ["\x63\157\x6e\164\145\x6e\x74" => $headerFooterContent], "\154\151\x6e\145" => 1];
                goto Ds2Om;
                M757U:
                $mpdf->autoScriptToLang = true;
                goto k8esA;
                ykJ4B:
                $mpdf->SetDisplayMode("\x72\145\141\154");
                goto M757U;
                ao_Gx:
                $mpdf->autoVietnamese = true;
                goto t2qqY;
                t2qqY:
                $mpdf->autoArabic = true;
                goto oGDBY;
                e4Fka:
                $mpdf->Output(FCPATH . $file_path, "\x46");
                goto g6VfX;
                YTNc2:
                $mpdf->setAutoBottomMargin = "\x73\x74\x72\x65\164\143\x68";
                goto ykJ4B;
                BP_IU:
                $mpdf->setHeader("\x7b\x50\x41\x47\105\x4e\117\175\x20\x2f\40\173\156\142\x7d");
                goto aWILv;
                Zba01:
                $mpdf = new \Mpdf\Mpdf(["\x6f\162\x69\145\x6e\164\x61\164\151\x6f\156" => "\120", "\x66\157\162\x6d\x61\x74" => "\x41\64", "\x6d\x6f\144\145" => "\145\156", "\x6d\157\144\x65" => "\x55\x54\106\x2d\x38", "\144\145\x66\141\165\154\164\x5f\x66\157\x6e\164\x5f\x73\x69\x7a\145" => 9, array(5, 5, 8, 8)]);
                goto VwUEK;
                g6VfX:
                goto ZSLrj;
                goto Pi_ir;
                Ds2Om:
                $headerFooterConfiguration = ["\157\x64\x64" => $oddEvenConfiguration, "\x65\166\145\x6e" => $oddEvenConfiguration];
                goto mzr7U;
                SMCiD:
                $content = $this->parser->parse("\x65\x78\x70\x6f\162\x74\57\162\145\x70\x6f\x72\x74\137\x74\x72\141\x6e\x73\141\x63\x74\151\157\156\163\x2e\x70\150\x70", $params, true);
                goto Ipvqa;
                mzr7U:
                require_once APPPATH . "\x74\x68\x69\162\x64\x5f\x70\141\x72\x74\171\x2f\155\x70\x64\146\x2f\141\165\164\157\x6c\157\141\144\56\x70\150\160";
                goto sfWyy;
                sfWyy:
                ini_set("\x6d\145\155\157\x72\x79\x5f\154\x69\155\151\164", "\55\61");
                goto Zba01;
                Ipvqa:
                $mpdf->WriteHTML(html_entity_decode($content));
                goto e4Fka;
                vjtrX:
                $this->load->library("\x70\141\162\163\x65\162");
                goto Vvh9d;
                QJvHL:
                $mpdf->SetFooter($headerFooterConfiguration);
                goto BP_IU;
                aWILv:
                $this->load->clear_vars();
                goto SMCiD;
                RHWch:
                $mpdf->AddPage('', '', '', '', '');
                goto QJvHL;
                oGDBY:
                $mpdf->autoLangToFont = true;
                goto RHWch;
                Vvh9d:
                $file_path .= DS . $file_name . "\56\x70\144\146";
                goto fMyt6;
                fMyt6:
                $headerFooterContent = "\x3c\144\x69\166\x20\141\x6c\151\x67\x6e\x3d\42\162\151\147\150\x74\42\x3e\x7b\x50\101\x47\105\116\117\x7d\x20\57\40\x7b\x6e\142\175\74\x2f\x64\x69\x76\76";
                goto prvhK;
                Pi_ir:
            default:
                goto SC501;
                r5bLr:
                $content .= implode($separator, array_values($head)) . $newline;
                goto HmWVT;
                NTnaF:
                file_put_contents(FCPATH . $file_path, $content);
                goto D3U2o;
                HmWVT:
                if ($items) {
                    foreach ($items as $item) {
                        goto R2Le2;
                        XosTa:
                        $content = trim($content, $separator) . $newline;
                        goto DrAeB;
                        YN62k:
                        zUakg:
                        goto XosTa;
                        DrAeB:
                        M7DsO:
                        goto baEOJ;
                        R2Le2:
                        foreach ($heading as $key => $val) {
                            $content .= $item[$key] . $separator;
                            G4XrF:
                        }
                        goto YN62k;
                        baEOJ:
                    }
                    ZhCdI:
                }
                goto NTnaF;
                SC501:
                $file_path .= DS . $file_name . "\56" . $export_type;
                goto iSvu3;
                HkriB:
                $newline = strtolower(PHP_OS) == "\144\141\x72\167\151\156" ? "\xd\12" : "\12";
                goto OWKhu;
                OWKhu:
                $heading = $params["\x68\x65\x61\144\151\156\x67"];
                goto gcXbW;
                iSvu3:
                $separator = $export_type == "\x63\x73\166" ? "\54" : "\11";
                goto HkriB;
                gcXbW:
                $head = array_column($heading, "\x6e\141\x6d\x65");
                goto r5bLr;
                D3U2o:
        }
        goto hD0DI;
        u_dGq:
        $file_path = "\x74\x65\x6d\x70" . DS . "\x65\x78\x70\x6f\162\164" . DS . get_company("\151\144");
        goto JPmgV;
        JPmgV:
        if (!is_dir($file_path)) {
            mkdir($file_path, 0755, TRUE);
        }
        goto WctQz;
        gzCDk:
    }
    public function import_balance()
    {
        goto avjRa;
        nSGbP:
        $this->response->write();
        goto Rjtto;
        M1lRu:
        $stocks = $this->companyModel->import_stocks_balance($data);
        goto eXntm;
        avjRa:
        $data = $this->request->post();
        goto U6tlQ;
        eXntm:
        $this->response->success("\x49\x6d\x70\157\x72\164\40\x63\x6f\x6d\160\x6c\x65\164\x65\x64\x20\x73\165\x63\x63\x65\x73\x73\x66\x75\154\x6c\171\x2e");
        goto nSGbP;
        U6tlQ:
        $accounts = $this->companyModel->import_open_balance($data);
        goto P6ndE;
        P6ndE:
        if (!$accounts) {
            goto fgKtS;
            fgKtS:
            if ($this->companyModel->message == 409 && $this->companyModel->cnt_data) {
                goto lJO91;
                I6q8P:
                $this->response->set_data("\155\x73\x67", sprintf(lang("\x49\115\x50\x4f\x52\x54\137\103\116\124\x5f\x41\114\x45\x52\124"), $this->companyModel->cnt_data[1], $this->companyModel->cnt_data[0]));
                goto M2RfA;
                jtsbh:
                return false;
                goto O9qFD;
                M2RfA:
                $this->response->write();
                goto jtsbh;
                lJO91:
                $this->response->set_data("\x64\165\x70\137\143\157\156\146\x69\162\x6d", 1);
                goto I6q8P;
                O9qFD:
            }
            goto oXBl2;
            D6Q76:
            return false;
            goto T7Kcl;
            D7An_:
            $this->response->write();
            goto D6Q76;
            oXBl2:
            $this->response->error($this->companyModel->message);
            goto D7An_;
            T7Kcl:
        }
        goto M1lRu;
        Rjtto:
        return true;
        goto IhGx2;
        IhGx2:
    }
    function open_balance_save()
    {
        goto V41ak;
        PvBJk:
        if (!is_array($result)) {
            goto NdfzF;
            BMQIe:
            $this->response->write();
            goto b8Xls;
            NdfzF:
            $this->response->error($this->trans_table->error);
            goto BMQIe;
            b8Xls:
            return;
            goto tTkHA;
            tTkHA:
        }
        goto lhh4w;
        mJtNb:
        $this->load->library("\164\x72\x61\x6e\x73\137\x74\x61\x62\154\145");
        goto ERyJu;
        ERyJu:
        $data["\x74\x4e\157"] = 1;
        goto yZgy8;
        KjvVH:
        $this->response->write();
        goto KR7Mo;
        yZgy8:
        $result = $this->trans_table->open_balance_save($data);
        goto PvBJk;
        KR7Mo:
        return true;
        goto dXpEs;
        tAPNU:
        valid_permission("\x41\x43\117\x50\102", !empty($data["\x69\144"]) ? 3 : 2);
        goto j7REM;
        j7REM:
        if (!empty($data["\141\x63\x63\111\x64"])) {
            if (empty($data["\x69\x64"]) && empty($data["\x64\x65\142\x69\164"]) && empty($data["\143\162\x65\x64\x69\164"])) {
                goto V1f3j;
                V1f3j:
                $this->response->error("\101\x4d\117\125\116\124\137\x52\x45\121\125\111\x52\x45\104");
                goto qTE78;
                qTE78:
                $this->response->write();
                goto fwtDO;
                fwtDO:
                return false;
                goto oneti;
                oneti:
            }
            if (empty($data["\143\157\x6e\111\144"]) && is_acc_contact_required($data["\x61\143\x63\x49\x64"])) {
                goto DR8S3;
                qYr8O:
                $this->response->write();
                goto CqZLm;
                CqZLm:
                return false;
                goto mS73Q;
                DR8S3:
                $this->response->error("\x43\x4f\116\x54\x41\x43\x54\x5f\x52\105\x51\125\x49\122\105\104");
                goto qYr8O;
                mS73Q:
            }
        }
        goto mJtNb;
        V41ak:
        $data = $this->request->post();
        goto tAPNU;
        f2TuS:
        $this->response->set_data($result);
        goto KjvVH;
        lhh4w:
        $this->response->success("\x53\125\103\x43\x45\123\123\x5f\x53\x41\126\105");
        goto f2TuS;
        dXpEs:
    }
    function open_balance_delete($id = 0, $transId = 0)
    {
        goto xXPhW;
        za5S3:
        if (!$result) {
            $this->response->error($this->trans_table->error ? $this->trans_table->error : "\104\x45\x4c\105\124\105\x5f\x45\122\122\117\x52");
        }
        goto thJoA;
        thJoA:
        $this->response->write();
        goto AvFEe;
        AvFEe:
        return true;
        goto ag1Ze;
        xXPhW:
        $this->load->library("\x74\x72\141\x6e\163\137\x74\141\142\154\x65");
        goto nU1X0;
        nU1X0:
        $result = $this->trans_table->open_balance_delete($id, $transId);
        goto za5S3;
        ag1Ze:
    }
    function stock_opening_delete($sId = 0, $id = 0)
    {
        goto OMhTG;
        OMhTG:
        $this->load->library("\x73\x74\x6f\x63\153\137\x65\156\164\162\x69\x65\x73\x5f\x74\x61\142\x6c\x65");
        goto BdYtK;
        asWyr:
        if (!$result) {
            $this->response->error($this->stock_entries_table->error ? $this->stock_entries_table->error : "\104\x45\114\105\x54\105\137\105\x52\x52\x4f\x52");
        }
        goto Rfg0j;
        BGQpV:
        return true;
        goto Q09Ri;
        Rfg0j:
        $this->response->write();
        goto BGQpV;
        BdYtK:
        $result = $this->stock_entries_table->stock_opening_delete($sId, $id);
        goto asWyr;
        Q09Ri:
    }
    public function pdf_templates($type = "\x61\154\154")
    {
        goto d791_;
        HMNd9:
        if ($type == "\141\154\x6c") {
            goto Rof10;
            Rof10:
            $tmpls = array("\145\x73\164", "\163\x61\154\x6f\x72\144", "\x73\x61\x6c\151\156\x76", "\x73\141\x6c\160\155\164", "\163\x61\154\162\145\164\x61\151\x6c", "\144\x65\x6c\143\x68\141\154\154\x61\156", "\160\x75\162\157\162\144", "\160\x75\x72\151\156\x76", "\x70\165\x72\160\155\x74", "\x70\x75\162\x72\145\143\x70", "\163\154\x69\160");
            goto c3oXt;
            azzTd:
            foreach ($tmpls as $val) {
                goto JCEJG;
                JCEJG:
                $data["\164\x79\x70\x65"] = $val;
                goto UKiaS;
                uRvQu:
                udVNW:
                goto E31SE;
                UKiaS:
                $result[$val] = $this->companyModel->get_pdf_templates($data);
                goto uRvQu;
                E31SE:
            }
            goto qzZk1;
            qzZk1:
            wkdJq:
            goto pcaiy;
            c3oXt:
            $result = array();
            goto azzTd;
            pcaiy:
        } else {
            $data["\164\171\160\145"] = $type;
            $result = $this->companyModel->get_pdf_templates($data);
        }
        goto BQ7Vu;
        WGXSJ:
        $this->response->success();
        goto u_9Gg;
        u_9Gg:
        $this->response->write();
        goto uDX2e;
        uDX2e:
        return true;
        goto LNS53;
        d791_:
        $data = $this->request->post();
        goto HMNd9;
        BQ7Vu:
        $this->response->set_data("\x64\x61\164\141", $result);
        goto WGXSJ;
        LNS53:
    }
    public function template_save($params)
    {
        goto lgkPp;
        frHe5:
        $result = $this->companyModel->template_save($data);
        goto NhMrT;
        NhMrT:
        $this->response->success("\x53\125\x43\x43\x45\123\x53\x5f\123\101\126\105");
        goto r375M;
        Owkpn:
        return true;
        goto LONAa;
        K1EC9:
        $data["\164\x65\155\160\x6c\x61\x74\145"] = !empty($params) ? $params : '';
        goto frHe5;
        BlguD:
        if (empty($data)) {
            goto w2Vt4;
            LcoLj:
            $this->response->write();
            goto l2uDb;
            w2Vt4:
            $this->response->error("\122\145\x71\165\151\162\x65\144\x20\146\x69\145\x6c\144\x73\x20\155\x69\163\x73\151\156\147");
            goto LcoLj;
            l2uDb:
            return;
            goto FPmkf;
            FPmkf:
        }
        goto K1EC9;
        lgkPp:
        $data = $this->request->post();
        goto BlguD;
        r375M:
        $this->response->write();
        goto Owkpn;
        LONAa:
    }
    public function printsettings($type = '')
    {
        goto peljq;
        DmGl8:
        require_once APPPATH . DS . "\x74\x68\x69\x72\144\x5f\160\141\x72\x74\x79\x2f\x54\162\141\x6e\163\x51\122\57\124\x72\x61\x6e\x73\121\x52\56\x70\x68\x70";
        goto RGWzc;
        uz2rY:
        XI2UK:
        goto joCXF;
        HZvko:
        if (!empty($result)) {
            $this->response->set_data("\144\x61\164\x61", $result);
        }
        goto ziTjJ;
        RGWzc:
        $result["\161\162\x4d\x6f\144\x75\154\x65\163"] = TransQR::GetModuleList();
        goto dQ7t0;
        K5C75:
        $fonts = array();
        goto jCwhS;
        dQ7t0:
        $this->response->success();
        goto HZvko;
        vB5BO:
        $result = $this->companyModel->get_printsettings($typeCode, "\52", true);
        goto sWiEZ;
        jCwhS:
        foreach ($files as $fileName) {
            $fonts[] = str_replace(array("\55\x42\x6f\154\144", "\x2d\x42\157\154\x64\x4f\142\154\151\161\165\x65", "\55\117\x62\x6c\151\x71\x75\145", "\x2d\102\157\154\144\111\164\x61\154\151\143", "\x2d\x49\164\141\154\151\143", "\102\157\154\x64", "\x42\157\154\x64\x4f\142\x6c\x69\161\x75\145", "\x4f\142\x6c\x69\161\165\145", "\102\157\x6c\144\x49\x74\141\154\x69\x63", "\x49\x74\141\154\151\143", "\x42\x64", "\x42\x64\x49\164", "\x49\x74", "\56\x74\164\146", "\x2e", "\56\56"), '', $fileName);
            t3Xhf:
        }
        goto uz2rY;
        Xpvfs:
        $typeCode = null;
        goto cN0a0;
        Z1gAj:
        $files = scandir($dir);
        goto K5C75;
        sWiEZ:
        $dir = APPPATH . "\57\x74\x68\151\162\144\x5f\x70\141\162\x74\171\57\x6d\x70\x64\x66\57\155\x70\x64\x66\x2f\155\x70\144\x66\x2f\164\x74\146\157\x6e\x74\163";
        goto Z1gAj;
        joCXF:
        $result["\146\x6f\x6e\x74\163"] = array_values(array_filter(array_unique($fonts)));
        goto DmGl8;
        peljq:
        if (empty($type)) {
            goto FQp6d;
            ecbUV:
            $this->response->write();
            goto kzgjH;
            FQp6d:
            $this->response->error("\x52\x65\161\165\x69\x72\145\144\40\x66\x69\x65\154\144\163\40\x6d\x69\x73\x73\x69\x6e\x67");
            goto ecbUV;
            kzgjH:
            return;
            goto Hyni9;
            Hyni9:
        }
        goto Xpvfs;
        ziTjJ:
        $this->response->write();
        goto ehsjI;
        cN0a0:
        if (!empty($type)) {
            $typeMap = ["\x73\x6c\x69\160" => "\x50\123", "\x53\114\x49\120" => "\120\123", "\163\x74\x63\x6b\x6a\162\156\154" => "\123\x4b", "\x53\x54\103\x4b\x4a\122\x4e\114" => "\123\x4b", "\x74\162\x6f\x72\x64" => "\124\117", "\x54\x52\117\x52\x44" => "\x54\x4f"];
            $typeCode = !empty($type) && !empty($typeMap[$type]) ? $typeMap[$type] : constant(strtoupper($type));
        }
        goto vB5BO;
        ehsjI:
        return true;
        goto e5FGt;
        e5FGt:
    }
    public function saveprintsettings()
    {
        goto hqu80;
        vMiFM:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto Ctclb;
        mNx_A:
        $this->response->success("\123\x55\103\103\105\x53\123\x5f\123\x41\x56\x45");
        goto vMiFM;
        hqu80:
        $data = $this->request->post();
        goto P5VYb;
        rLA0V:
        $typeMap = ["\x73\x6c\151\160" => "\120\x53", "\123\x4c\111\120" => "\120\x53", "\x73\164\x63\x6b\152\162\x6e\154" => "\x53\x4b", "\123\124\x43\x4b\112\x52\x4e\114" => "\123\113", "\x74\x72\x6f\162\144" => "\124\117", "\124\x52\x4f\x52\x44" => "\x54\x4f"];
        goto OLJ0o;
        P5VYb:
        if (empty($data) || empty($data["\164\x54\171\160\145"])) {
            goto LivVI;
            Je5z4:
            return;
            goto fqDaI;
            LivVI:
            $this->response->error("\x52\145\161\165\x69\162\x65\144\x20\x66\151\x65\x6c\144\x73\x20\x6d\151\163\x73\x69\156\x67");
            goto wZOli;
            wZOli:
            $this->response->write();
            goto Je5z4;
            fqDaI:
        }
        goto rLA0V;
        OLJ0o:
        $data["\x74\124\x79\160\145"] = !empty($data["\x74\x54\x79\160\145"]) && !empty($typeMap[$data["\164\x54\x79\x70\145"]]) ? $typeMap[$data["\x74\x54\171\x70\145"]] : constant(strtoupper($data["\x74\124\171\160\145"]));
        goto Ok_ik;
        Ctclb:
        $this->response->write();
        goto L31pt;
        L31pt:
        return true;
        goto OIGet;
        Ok_ik:
        $result = $this->companyModel->save_print_settings($data);
        goto mNx_A;
        OIGet:
    }
    public function resetprintsettings($type = '')
    {
        goto AJw0S;
        eL0pu:
        $typeCode = null;
        goto kAlqJ;
        D_lF4:
        $this->response->write();
        goto hQF7l;
        hQF7l:
        return $result;
        goto QIfLr;
        kAlqJ:
        if (!empty($type)) {
            $typeCode = constant(strtoupper($type));
        }
        goto gGpt3;
        T1UYI:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto D_lF4;
        gGpt3:
        $result = $this->companyModel->reset_printsettings($typeCode);
        goto T1UYI;
        AJw0S:
        if (empty($type)) {
            goto V3ql7;
            KFvwe:
            $this->response->write();
            goto dsg2h;
            V3ql7:
            $this->response->error("\x52\145\161\x75\151\162\145\144\x20\x66\151\145\x6c\x64\163\40\x6d\151\x73\163\x69\156\x67");
            goto KFvwe;
            dsg2h:
            return;
            goto gxJLa;
            gxJLa:
        }
        goto eL0pu;
        QIfLr:
    }
    public function getsmtp($type = "\105")
    {
        goto T7YR5;
        T7YR5:
        $result = $this->companyModel->get_smtp($type);
        goto SrXTm;
        SrXTm:
        $this->response->success();
        goto nzWy4;
        wJORG:
        return true;
        goto aKfdz;
        nzWy4:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto DX1xY;
        DX1xY:
        $this->response->write();
        goto wJORG;
        aKfdz:
    }
    public function savesmtp()
    {
        goto yCBFe;
        jBxTr:
        $this->response->write();
        goto lh9F3;
        lh9F3:
        return true;
        goto eTswm;
        kG3_I:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto jBxTr;
        Qx6K4:
        $result = $this->companyModel->save_smtp($data);
        goto X1kDd;
        yCBFe:
        $data = $this->request->post();
        goto hdokS;
        X1kDd:
        $this->response->success("\x53\x55\x43\x43\x45\123\x53\137\x53\101\126\x45");
        goto kG3_I;
        hdokS:
        if (empty($data)) {
            goto khMZj;
            hI1Zw:
            $this->response->write();
            goto KcES9;
            khMZj:
            $this->response->error("\122\145\x71\x75\x69\x72\x65\x64\x20\x66\151\x65\154\144\x73\x20\155\x69\163\163\x69\x6e\147");
            goto hI1Zw;
            KcES9:
            return;
            goto Xdgm7;
            Xdgm7:
        }
        goto Qx6K4;
        eTswm:
    }
    public function testsmtp()
    {
        goto ZqXkq;
        CV1JU:
        return true;
        goto CvLlQ;
        oSdLA:
        $this->email->to(get_user_data("\x65\x6d\x61\151\154"));
        goto NY2jA;
        UDBnO:
        $config["\143\150\141\x72\x73\x65\164"] = "\125\124\106\x2d\x38";
        goto fS5w3;
        NY2jA:
        $this->email->subject(lang("\x54\x45\x53\124\x5f\115\101\x49\x4c\x5f\x53\x55\x42\112\105\x43\124"));
        goto tESzw;
        PZCRd:
        if (!$this->email->send()) {
            $this->response->error("\115\101\111\x4c\x5f\105\x52\122\117\122");
        } else {
            $this->response->success(sprintf(lang("\124\x45\123\x54\x5f\x4d\101\111\114\137\123\125\x43\103\105\123\x53"), get_user_data("\x65\155\141\x69\154")));
        }
        goto tPh2K;
        tESzw:
        $this->email->message(nl2br(lang("\124\105\123\x54\x5f\115\101\111\114\137\103\x4f\x4e\x54\105\116\x54")));
        goto PZCRd;
        YjWKv:
        $config["\155\141\x69\x6c\x74\171\x70\145"] = "\150\164\155\154";
        goto UDBnO;
        MzKFF:
        if (empty($config["\163\145\164\164\151\156\x67\163"]["\x73\x6d\x74\x70\137\165\163\x65\x72"]) || empty($config["\x73\x65\164\164\x69\156\147\x73"]["\x73\155\164\160\137\x70\x61\163\163"])) {
            goto SBUPP;
            j4b_C:
            $this->response->write();
            goto FHysK;
            FHysK:
            return;
            goto rCres;
            SBUPP:
            $this->response->error("\x52\145\x71\x75\151\x72\145\x64\x20\x66\151\145\x6c\x64\x73\40\155\151\x73\163\151\x6e\x67");
            goto j4b_C;
            rCres:
        }
        goto YjWKv;
        lRVPv:
        $this->email->initialize($config);
        goto oSdLA;
        tPh2K:
        $this->response->write();
        goto CV1JU;
        Yu05A:
        $config = $this->request->post();
        goto MzKFF;
        fS5w3:
        $config["\156\145\x77\x6c\151\x6e\x65"] = "\15\12";
        goto lRVPv;
        ZqXkq:
        $this->load->library("\145\x6d\141\x69\x6c");
        goto Yu05A;
        CvLlQ:
    }
    public function content()
    {
        goto PbpYK;
        PbpYK:
        $data = $this->request->post();
        goto zgT5P;
        zgT5P:
        $result = $this->companyModel->get_default_content($data);
        goto LxDBL;
        LxDBL:
        $this->response->set_data("\151\x74\145\155\163", $result);
        goto MGb8B;
        MGb8B:
        $this->response->write();
        goto QL32P;
        QL32P:
        return true;
        goto X3vB3;
        X3vB3:
    }
    public function content_save()
    {
        goto R_wK1;
        ZURu6:
        if (empty($data)) {
            goto ZCyjc;
            ZCyjc:
            $this->response->error("\122\145\161\x75\151\x72\x65\144\40\146\151\x65\154\x64\x73\x20\x6d\x69\x73\163\151\156\x67");
            goto JZdIQ;
            KZFbm:
            return;
            goto g7k7j;
            JZdIQ:
            $this->response->write();
            goto KZFbm;
            g7k7j:
        }
        goto dPluE;
        WrQ60:
        $this->response->write();
        goto CqukC;
        dPluE:
        if ($id = $this->companyModel->content_save($data)) {
            $this->response->success("\x53\x55\x43\x43\x45\x53\123\137\123\101\126\x45");
            $this->response->set_data("\x69\144", $id);
        } else {
            $this->response->error("\123\x41\126\x45\137\x45\x52\122\117\x52");
        }
        goto WrQ60;
        CqukC:
        return true;
        goto lZHtK;
        R_wK1:
        $data = $this->request->post();
        goto ZURu6;
        lZHtK:
    }
    public function content_delete($id)
    {
        goto T4IEq;
        xhVnr:
        return true;
        goto EA11y;
        tsFoK:
        $this->response->write();
        goto xhVnr;
        T4IEq:
        if ($this->companyModel->content_delete($id)) {
            $this->response->success("\x44\105\114\x45\x54\105\x5f\123\x55\103\x43\x45\x53\x53");
        } else {
            $this->response->error("\x44\105\114\105\124\x45\137\x45\122\122\117\122");
        }
        goto tsFoK;
        EA11y:
    }
    public function update_stock_value()
    {
        goto TxHd3;
        M3a2H:
        if (empty($data)) {
            goto MQJHa;
            O104x:
            $this->response->write();
            goto T88Yx;
            MQJHa:
            $this->response->error("\x52\x65\161\165\151\162\x65\x64\40\146\151\x65\x6c\144\x73\40\155\151\163\x73\x69\156\147");
            goto O104x;
            T88Yx:
            return;
            goto k2atA;
            k2atA:
        }
        goto wLuhv;
        ObKUT:
        return true;
        goto ee1f8;
        m4v4P:
        $this->response->write();
        goto ObKUT;
        TxHd3:
        $data = $this->request->post();
        goto M3a2H;
        wLuhv:
        if ($this->companyModel->update_stock_value($data)) {
            $this->response->success("\123\125\103\103\x45\123\123\137\x53\101\x56\105");
        } else {
            $this->response->error("\x53\101\x56\105\137\x45\122\x52\117\x52");
        }
        goto m4v4P;
        ee1f8:
    }
    public function api_key_list()
    {
        goto HIpsB;
        QnuCf:
        return true;
        goto pgkSR;
        M_jJd:
        CiFCg:
        goto dK0G9;
        uB5eo:
        foreach ($result as $key => $item) {
            goto OExf4;
            Dq5fl:
            if (!empty($item["\x75\163\145\162\111\x64"])) {
                $item["\x75\x73\x65\162\x4e\141\x6d\145"] = $this->companyModel->getUserName($item["\x75\163\x65\162\x49\144"]);
            }
            goto O280L;
            cvbo2:
            F7cBj:
            goto PtfzY;
            OExf4:
            if (!empty($result) && sal_mod_active(BRANCH_MOD)) {
                if (!empty($item["\142\x49\x64"])) {
                    $item["\x62\x72\x61\156\143\150\116\141\x6d\145"] = $this->companyModel->getbranchName($item["\142\x49\144"]);
                }
            }
            goto Dq5fl;
            O280L:
            $result[$key] = $item;
            goto cvbo2;
            PtfzY:
        }
        goto M_jJd;
        oS1Ft:
        $this->response->write();
        goto QnuCf;
        HIpsB:
        $result = $this->companyModel->get_api_key_list();
        goto uB5eo;
        dK0G9:
        if (!empty($result)) {
            $this->response->set_data("\151\164\145\x6d\x73", $result);
        }
        goto oS1Ft;
        pgkSR:
    }
    public function new_api_key()
    {
        goto Z4RFy;
        N_2Oh:
        return true;
        goto gFZ0J;
        J_k7Q:
        if (!empty($result)) {
            $this->response->set_data("\x69\x74\145\x6d\x73", $result);
        }
        goto Am4aX;
        T4WML:
        $this->form_validation->set_rules("\x64\x65\x73\143\162\x69\160\164\151\157\156", "\113\x65\171\x20\144\145\x73\143\162\151\x70\x74\151\157\156", "\164\162\x69\155\x7c\162\x65\x71\x75\151\162\x65\x64\174\165\x6e\151\x71\165\x65\145\137\164\157\x5f\x63\x6f\x6d\160\141\x6e\x79\x5b\141\x70\x69\137\x6b\145\x79\x73\56\x64\145\x73\x63\162\151\x70\164\x69\x6f\x6e\x5d");
        goto MahZV;
        Z4RFy:
        $_POST = $data = $this->request->post();
        goto AFB1U;
        AFB1U:
        $this->load->library("\x66\x6f\162\155\x5f\166\x61\154\151\x64\141\x74\151\x6f\x6e");
        goto T4WML;
        MahZV:
        if ($this->form_validation->run() == FALSE) {
            goto r4XiE;
            r4XiE:
            $this->response->error(validation_errors());
            goto L0VfH;
            L0VfH:
            $this->response->write();
            goto RdOkA;
            RdOkA:
            return false;
            goto RFfBm;
            RFfBm:
        }
        goto y6hAs;
        Am4aX:
        $this->response->write();
        goto N_2Oh;
        y6hAs:
        $result = $this->companyModel->generate_new_api_key($data);
        goto J_k7Q;
        gFZ0J:
    }
    public function save_api_key()
    {
        goto YGQFV;
        gvHQ0:
        if (empty($data["\x69\144"]) || empty($data["\x64\145\163\143\162\x69\160\x74\x69\x6f\156"])) {
            goto KC9Ou;
            KlWLB:
            $this->response->write();
            goto CpPBt;
            CpPBt:
            return;
            goto i0cmG;
            KC9Ou:
            $this->response->error("\x52\145\x71\165\x69\162\x65\144\40\x66\151\x65\154\144\163\x20\155\151\163\x73\x69\156\x67");
            goto KlWLB;
            i0cmG:
        }
        goto FmFNx;
        YGQFV:
        $_POST = $data = $this->request->post();
        goto gvHQ0;
        ZQe9h:
        return true;
        goto zpK8U;
        FaJD4:
        $result = $this->companyModel->save_api_key($data);
        goto FZv4u;
        TKS62:
        $this->response->write();
        goto ZQe9h;
        iRxyO:
        if ($this->form_validation->run() == FALSE) {
            goto TYKrA;
            JsrfS:
            $this->response->write();
            goto VPw29;
            VPw29:
            return false;
            goto ZtLY3;
            TYKrA:
            $this->response->error(validation_errors());
            goto JsrfS;
            ZtLY3:
        }
        goto FaJD4;
        FmFNx:
        $this->load->library("\146\x6f\x72\x6d\x5f\166\141\x6c\151\144\141\164\x69\157\156");
        goto m_IN3;
        FZv4u:
        if ($result) {
            $this->response->success("\123\125\103\x43\x45\x53\123\137\123\101\126\x45");
        } else {
            $this->response->error("\x53\101\126\x45\x5f\x45\x52\122\117\x52");
        }
        goto TKS62;
        m_IN3:
        $this->form_validation->set_rules("\x64\145\x73\x63\x72\x69\160\x74\151\157\156", "\113\x65\x79\x20\x64\145\x73\x63\x72\151\x70\x74\151\157\x6e", "\164\162\151\155\x7c\162\145\161\165\151\162\145\144\x7c\165\x6e\151\x71\165\145\145\137\164\x6f\x5f\143\157\x6d\160\141\x6e\x79\x5b\x61\x70\x69\x5f\153\145\x79\163\x2e\144\x65\163\143\x72\x69\160\x74\x69\x6f\x6e\135");
        goto iRxyO;
        zpK8U:
    }
    public function delete_api_key($id = 0)
    {
        goto LaZLr;
        Mr3kv:
        $this->response->write();
        goto KyZFq;
        LaZLr:
        if (empty($id)) {
            goto fP33_;
            qdy24:
            $this->response->write();
            goto D0r0T;
            D0r0T:
            return;
            goto d4yZ4;
            fP33_:
            $this->response->error("\x52\x65\x71\165\151\162\x65\144\x20\x66\x69\x65\154\144\163\40\155\x69\x73\163\151\x6e\x67");
            goto qdy24;
            d4yZ4:
        }
        goto cCHkS;
        KyZFq:
        return true;
        goto LyY4o;
        cCHkS:
        $result = $this->companyModel->delete_api_key($id);
        goto EKUPd;
        EKUPd:
        if ($result) {
            $this->response->success("\104\105\114\x45\124\x45\137\123\x55\103\103\x45\x53\123");
        } else {
            $this->response->error("\x44\x45\114\105\124\x45\x5f\105\122\122\x4f\122");
        }
        goto Mr3kv;
        LyY4o:
    }
    public function curexe_rate()
    {
        goto sVbAc;
        g02C5:
        $this->load->model("\115\x75\154\x43\165\x72\x72\145\x6e\x63\171\115\x6f\144\145\x6c");
        goto XQHc0;
        uTirh:
        if (!empty($result)) {
            $this->response->set_data($result);
        }
        goto EzW2p;
        xuMzs:
        return true;
        goto aThhM;
        XQHc0:
        $result = $this->MulCurrencyModel->curexe_rate($data);
        goto uTirh;
        EzW2p:
        $this->response->write();
        goto xuMzs;
        sVbAc:
        $_POST = $data = $this->request->post();
        goto g02C5;
        aThhM:
    }
    public function cities($state_code = '')
    {
        goto hoN9s;
        vGH62:
        $this->response->write();
        goto lFVN1;
        QwUiA:
        $this->response->success();
        goto rrCPT;
        lFVN1:
        return true;
        goto DX9Tb;
        hoN9s:
        if (empty($state_code)) {
            goto tlNcJ;
            tlNcJ:
            $this->response->error("\x53\164\141\164\145\x20\x63\x6f\144\145\40\x6d\x69\x73\163\151\x6e\147");
            goto YSu8e;
            YSu8e:
            $this->response->write();
            goto TqOtj;
            TqOtj:
            return;
            goto b3V16;
            b3V16:
        }
        goto TOU0U;
        rrCPT:
        if (!empty($cities)) {
            $this->response->set_data("\151\x74\145\155\163", $cities, true);
        }
        goto vGH62;
        TOU0U:
        $cities = $this->companyModel->get_cities($state_code);
        goto QwUiA;
        DX9Tb:
    }
    public function printerList()
    {
        goto BvqOp;
        lp4HE:
        $this->response->success();
        goto sEv30;
        cBUkC:
        return true;
        goto r4uMx;
        pClwW:
        $result["\160\x72\151\x6e\164\x65\x72"] = $this->companyModel->printerList();
        goto lp4HE;
        sEv30:
        $this->response->set_data("\x70\162\x69\156\x74\145\162\x73", $result["\160\162\x69\156\x74\145\162"], true);
        goto AmarO;
        AmarO:
        $this->response->write();
        goto cBUkC;
        BvqOp:
        $result = array();
        goto pClwW;
        r4uMx:
    }
    public function save_printer()
    {
        goto NkcGC;
        yry93:
        if (!empty($result)) {
            $this->response->success("\x53\x61\x76\x65\x64\x20\163\x75\143\143\x65\x73\163");
            $this->response->set_data(array("\151\144" => $result));
        } else {
            if ($this->companyModel->message) {
                $this->response->error($this->companyModel->message);
            }
        }
        goto uWwlq;
        Ulgm5:
        $result = $this->companyModel->save_printer($data);
        goto yry93;
        uWwlq:
        $this->response->write();
        goto Um55l;
        Um55l:
        return true;
        goto b8Bp9;
        NkcGC:
        $data = $this->request->post();
        goto ag1a8;
        ag1a8:
        $result = array();
        goto Ulgm5;
        b8Bp9:
    }
    public function set_default_printer($id)
    {
        goto OtmqG;
        RRMTT:
        if (!empty($result)) {
            $this->response->success("\x53\x61\x76\145\x64\40\163\165\143\143\145\163\163");
        } else {
            if ($this->companyModel->message) {
                $this->response->error($this->companyModel->message);
            }
        }
        goto G5emJ;
        Y3w8S:
        return true;
        goto qrM9Q;
        OtmqG:
        $result = $this->companyModel->set_default_printer($id);
        goto RRMTT;
        G5emJ:
        $this->response->write();
        goto Y3w8S;
        qrM9Q:
    }
    public function delete_printer()
    {
        goto Zj5fn;
        EcYIt:
        $result = $this->companyModel->delete_printer($data);
        goto XX_Qf;
        TCV0Q:
        $this->response->write();
        goto oCYMB;
        oCYMB:
        return true;
        goto pYa10;
        Zj5fn:
        $data = $this->request->post();
        goto EcYIt;
        XX_Qf:
        if (!empty($result)) {
            $this->response->success("\x53\165\x63\x63\145\x73\163\146\x75\154\154\x79\40\x64\x65\154\145\164\145\144");
            $this->response->set_data("\x69\x64", $result);
        }
        goto TCV0Q;
        pYa10:
    }
    public function timezonelist()
    {
        goto LJ_hr;
        fPXyi:
        if (!empty($result)) {
            $this->response->set_data("\x74\x69\155\145\172\157\156\x65\x6c\x69\x73\x74", $result);
        }
        goto vcvEO;
        LJ_hr:
        $result = $this->companyModel->timezonelist();
        goto fPXyi;
        vcvEO:
        $this->response->write();
        goto peyFy;
        peyFy:
        return true;
        goto TtsOB;
        TtsOB:
    }
}
