<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork($_POST, true); $res = $tWork->updateTaxInfomation(); $tWork->destoryWork(); if ($res > 0) { echo "{ CODE: '00'}"; } else { echo "{ CODE: '99'}"; } } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); //echo "{ CODE: '99' }"; echo "{ CODE: '99'}"; exit; }
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/FileUtil.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $pdfFile = null; if (!empty($_FILES['pdf']['name'])) { $pdfFile = FileUtil::fileSaveForPdf($_FILES['pdf'], $_POST['pdf_password']); if (empty($pdfFile)) { throw new Exception('pdf 파일 업로드 오류'); } } $tWork->createWork($_POST, true); $res = $tWork->insertSalesUpload($pdfFile); $res = $tWork->selectSalesDataAffterInsert(); $tWork->destoryWork(); $response1 = array('success' => true, 'msg' => 'OK', 'CODE' => '00', 'DATA' => $res); echo json_encode($response1); } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); echo "{ CODE: '99' , msg : '{$err}'}"; exit; }
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; require_once "../../../class/SessionManager.php"; $tWork = new DBTaxWork(true); //세션저장 if ($is_sessionStart) { session_start(); } $sessionManager = new SessionManager(); $excelDownFlag = $sessionManager->getExcelDownFlag(); if ($excelDownFlag == 'y') { $sessionManager->setExcelDownFlag('n'); echo "{CODE:'00',MSG:'파일이 다운로드 완료되었습니다.'}"; } else { echo "{CODE:'99',MSG:'파일이 다운로드 완료되었습니다.'}"; } $tWork->destoryWork();
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork($_POST, true); $res = $tWork->selectExcelDownloadData(); $comp = $tWork->selectExcelDownloadDataAsComp(); } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); exit; } $_downloadFilename = $_POST['downFileName']; $tot_supply = 0; $tot_tax = 0; $tot_total = 0; for ($i = 0; $i < count($res); $i++) { $obj = $res[$i]; $tot_supply = $tot_supply + $obj['atax_supply_price']; $tot_tax = $tot_tax + $obj['atax_tax']; } $tot_total = $tot_tax + $tot_supply; header("Content-type: application/vnd.ms-excel"); header("Content-type: application/vnd.ms-excel; charset=utf-8"); header("Content-Disposition: attachment; filename = {$_downloadFilename}"); header("Content-Description: PHP4 Generated Data"); /*
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork(-1, true); $ret = array(); $res = $tWork->selectTaxCompany(); $ret['COMP'] = $res; $res = $tWork->selectTaxDataByCompanyAsSales(); $res1 = $tWork->selectTaxDataByCompanyAsCust(); // var_dump($ret['COMP']); // // var_dump(" >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> "); // var_dump($res1); $result = array(); for ($i = 0; $i < count($res); $i++) { $obj = $res[$i]; $isFirstAdd = false; // var_dump($obj); for ($j = 0; $j < count($res1); $j++) { $obj1 = $res1[$j]; // var_dump($obj1); // var_dump($obj['co_id']); if ($obj['co_id'] == $obj1['co_id'] && $obj['yyyy'] == $obj1['yyyy'] && $obj['period_flag'] == $obj1['period_flag']) { // $r = array(); // array_push($r, $obj); // array_push($r, $obj['yyyy']); // array_push($r, $obj['period_flag']); // array_push($r, $obj['co_nm']);
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork(-1, true); $ret = array(); $res = $tWork->selectSalesCompany(); $ret['COMP'] = $res; $res = $tWork->selectSalesData(); $tWork->destoryWork(); $ret['DATA'] = $res; $ret['CODE'] = '00'; echo json_encode($ret); } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); echo "{ CODE: '99' }"; exit; }
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/FileUtil.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork($_POST, true); $res = $tWork->updateTaxDataFlag(); $tWork->destoryWork(); echo "{CODE:00}"; } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); echo "{ CODE: '99' , msg : '{$err}'}"; exit; }
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork($_POST, true); $res = $tWork->requestTaxList(); $tWork->destoryWork(); $ret = array(); if ($res == null) { $ret['CODE'] = '00'; } else { $ret['CODE'] = '00'; } $ret['DATA'] = $res; echo json_encode($ret); } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); echo "{ CODE: '99' }"; exit; }
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork($_POST, true); $res = $tWork->deleteTaxForDid(); $tWork->destoryWork(); $ret = array(); if ($res > 0) { echo "{ CODE: '00'}"; } else { echo "{ CODE: '99'}"; } } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); echo "{ CODE: '99' }"; exit; }
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork($_POST, true); $ret = array(); $res = $tWork->insertSalesUploadForBigo(); $tWork->destoryWork(); $ret['DATA'] = $res; $ret['CODE'] = '00'; echo json_encode($ret); } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); echo "{ CODE: '99' }"; exit; }
<?php require_once "../../../class/Utils.php"; require_once "../../../class/DBWork.php"; require_once "../../../class_tax/DBTaxWork.php"; $tWork = new DBTaxWork(true); try { $tWork->createWork($_POST, true); $res = $tWork->requestTaxCustomer(); $tWork->destoryWork(); $ret = array(); if ($res == null) { $ret['CODE'] = '99'; } else { $ret['CODE'] = '00'; } $ret['DATA'] = $res; echo json_encode($ret); } catch (Exception $e) { $tWork->destoryWork(); $err = $e->getMessage(); Util::serverLog($e); echo "{ CODE: '99' }"; exit; }