462 lines
22 KiB
Plaintext
462 lines
22 KiB
Plaintext
@using NP.Base.Popbill
|
|
@using Popbill.Taxinvoice;
|
|
@model NP.Model.VMCRoom
|
|
@{
|
|
var t = Model.PayTaxes.First();
|
|
var taxinvoice = (Taxinvoice)ViewBag.Taxinvoice;
|
|
var taxinvoiceInfo = (TaxinvoiceInfo)ViewBag.TaxinvoiceInfo;
|
|
}
|
|
<div>
|
|
<ul class="pagination pagination-md" style="margin: 0;">
|
|
<li class="active"><a href="#" data-toggle="tab">요청현황</a></li>
|
|
@*<li><a href="#" onclick="gotab();" data-toggle="tab">스마트빌</a></li>*@
|
|
</ul>
|
|
</div>
|
|
<section class="panel panel-default">
|
|
<div class="table-responsive" id="excel1">
|
|
<table class="table table-striped b-t b-light no-odd">
|
|
<thead>
|
|
<tr>
|
|
<th>결제번호</th>
|
|
<th>회사명</th>
|
|
<th>신청자(ID)</th>
|
|
<th>상품명</th>
|
|
<th>수량<br />(인원)</th>
|
|
<th>발행요청금액</th>
|
|
<th>결제상태</th>
|
|
<th>신청일</th>
|
|
<th>계산서날짜</th>
|
|
<th>실제날짜</th>
|
|
<th>발행한날</th>
|
|
<th>영수구분</th>
|
|
<th>상태</th>
|
|
<th>확인상태</th>
|
|
<th>확인날짜</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="data" id="tbody1">
|
|
@foreach (var d in Model.PayTaxes)
|
|
{
|
|
<tr>
|
|
<td>@d.payno</td>
|
|
<td class="left">@Html.Raw(string.Format("<span class=\"isjoin{0}\">{1}</span> {2}", d.isjoin, d.isjoin == 1 ? "정" : "비", d.asname))</td>
|
|
<td>@string.Format("{0}({1})", d.username, d.userid)</td>
|
|
<td class="left">@d.itemname @(d.ccount > 1 ? string.Format("외 {0}건", d.ccount - 1) : "")</td>
|
|
<td>@d.pcnt</td>
|
|
<td class="right">@d.taxamt.ToString("#,0")</td>
|
|
<td>@d.pstatusname2</td>
|
|
<td>@d.cdtymd</td>
|
|
<td>@(d.taxdatereq == null ? "" : d.taxdatereq.Value.ToString("yyyy-MM-dd"))</td>
|
|
<td>@(d.taxdate == null ? "" : d.taxdate.Value.ToString("yyyy-MM-dd"))</td>
|
|
<td>@(d.realtaxdate == null ? "" : d.realtaxdate.Value.ToString("yyyy-MM-dd"))</td>
|
|
<td>@(d.isreceipt == 0 ? "청구" : "영수")</td>
|
|
<td class="taxdate@(d.status =="미발행" || d.status == "임시저장" ? "x" : "")">@(d.status)</td>
|
|
<td class="taxdate@(d.ischeck == 1 ? "" : "x")">@(d.ischeckname)</td>
|
|
<td>@d.checktimeymd</td>
|
|
</tr>
|
|
}
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
<section class="panel panel-default">
|
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 상품선택<span class=""></span></strong></header>
|
|
<table class="regtable" style="margin-top: 0;">
|
|
<colgroup><col width="200"><col /></colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>총결제액/입금액</th>
|
|
<td>@Model.PayTaxItem.First().ppayamt.ToString("#,0") (@(Model.PayTaxItem.First().payoktime == null ? "-" : Model.PayTaxItem.First().payoktime.Value.ToString("yy-MM-dd HH:mm:ss")))</td>
|
|
</tr>
|
|
<tr>
|
|
<th>기존요청금액</th>
|
|
<td>@(Model.PayTaxes2.Where(w => w.taxno != t.taxno).Count() < 1 ? "0" : Model.PayTaxes2.Where(w => w.taxno != t.taxno).Sum(s => s.taxamt).ToString("#,0"))원</td>
|
|
</tr>
|
|
<tr>
|
|
<th>기존발행금액</th>
|
|
<td>@(Model.PayTaxes2.Where(w => w.taxno != t.taxno && w.taxdate != null).Count() < 1 ? "0" : Model.PayTaxes2.Where(w => w.taxno != t.taxno && w.taxdate != null).Sum(s => s.taxamt).ToString("#,0"))원</td>
|
|
</tr>
|
|
<tr>
|
|
<th>결제방법</th>
|
|
<td>@Model.PayTaxItem.First().pptypename</td>
|
|
</tr>
|
|
<tr>
|
|
<th>선택상품</th>
|
|
<td>
|
|
<ul>
|
|
@if (Model.PayTaxItem.First().isgroup == 1)
|
|
{
|
|
foreach (var d in Model.PayTaxItem.Where(w => w.ptype == 0))
|
|
{
|
|
<li>@d.itemname (@(Model.PayTaxItem.Where(w => w.ptype == 0).Count() + "명"), @(Model.PayTaxItem.Where(w => w.ptype == 0).Sum(s => s.payamt).ToString("#,0"))원)</li>
|
|
break;
|
|
}
|
|
foreach (var d in Model.PayTaxItem.Where(w => w.ptype != 0))
|
|
{
|
|
<li>@d.itemname (@(d.pcnt)개, @(d.payamt.ToString("#,0"))원)</li>
|
|
break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
foreach (var d in Model.PayTaxItem)
|
|
{
|
|
<li>@d.itemname (@(d.pcnt)개, @(d.payamt.ToString("#,0"))원)</li>
|
|
break;
|
|
}
|
|
}
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>발행요청금액</th>
|
|
<td>@(t.taxamt.ToString("#,0"))원</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<form id="sform" method="post">
|
|
<section class="panel panel-default">
|
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 공급업체정보<span class=""></span></strong></header>
|
|
<table class="regtable" style="margin-top: 0;">
|
|
<colgroup><col width="200"><col width="400" /><col width="200" /><col /></colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>회사명</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerCorpName" readonly value="@taxinvoice.invoicerCorpName" /></td>
|
|
<th>대표자</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerCEOName" readonly value="@taxinvoice.invoicerCEOName" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>사업자등록번호</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerCorpNum" readonly value="@taxinvoice.invoicerCorpNum" /></td>
|
|
<th>업태</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerBizType" readonly value="@taxinvoice.invoicerBizType" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>종목</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerBizClass" readonly value="@taxinvoice.invoicerBizClass" /></td>
|
|
<th>사업장주소</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerAddr" readonly value="@taxinvoice.invoicerAddr" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>담당자</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerContactName" readonly value="@taxinvoice.invoicerContactName" /></td>
|
|
<th>연락처</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerTEL" readonly value="@taxinvoice.invoicerTEL" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>이메일주소</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerEmail" readonly value="@taxinvoice.invoicerEmail" /></td>
|
|
<th>문서번호</th>
|
|
<td><input type="text" class="form-control dev" name="taxinvoice.invoicerMgtKey" readonly value="@taxinvoice.invoicerMgtKey" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th style="height:43px;">세금계산서 상태</th>
|
|
<td colspan="3"><spna style="color:red;">@(taxinvoiceInfo != null ? PopbillService.GetTaxinvoiceState(taxinvoiceInfo.stateCode) : "")</spna></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section class="panel panel-default">
|
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 발행업체정보<span class=""></span></strong></header>
|
|
<table class="regtable" style="margin-top: 0;">
|
|
<colgroup><col width="200"><col width="400" /><col width="200" /><col /></colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<th>회사명</th>
|
|
<td><input type="text" class="form-control dev" name="asname" value="@t.asname" /></td>
|
|
<th>대표자</th>
|
|
<td><input type="text" class="form-control dev" name="ceoname" value="@t.ceoname" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>사업자등록번호</th>
|
|
<td><input type="text" class="form-control dev" name="brno" value="@t.brno" /></td>
|
|
<th>법인등록번호</th>
|
|
<td><input type="text" class="form-control dev" name="grno" value="@t.grno" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>업태</th>
|
|
<td><input type="text" class="form-control dev" name="btype" value="@t.btype" /></td>
|
|
<th>종목</th>
|
|
<td><input type="text" class="form-control dev" name="bkind" value="@t.bkind" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>담당자</th>
|
|
<td><input type="text" class="form-control dev" name="manname" value="@t.manname" /></td>
|
|
<th>연락처</th>
|
|
<td><input type="text" class="form-control dev" name="telno" value="@t.telno" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>이메일주소</th>
|
|
<td><input type="text" class="form-control dev" name="email" value="@t.email" /></td>
|
|
<th style="background-color: #ffef98">발행일</th>
|
|
<td>
|
|
@if (t.status == "미발행") {
|
|
<input type="text" data-date-format="yyyy-mm-dd" class="form-control dev refundtime input-sm input-s datepicker-input" name="taxdate" id="taxdate" value="@(t.taxdate == null ? "" : t.taxdate.Value.ToString("yyyy-MM-dd"))" />
|
|
}
|
|
else
|
|
{
|
|
<input type="text" class="form-control dev" style="width:130px;display:initial;text-align:center;" name="taxdate" id="taxdate" value="@(t.taxdate == null ? "" : t.taxdate.Value.ToString("yyyy-MM-dd"))" readonly />
|
|
}
|
|
@(t.taxdatereq==null?"": string.Format("[계산서날짜 : {0}]", t.taxdatereq.Value.ToString("yyyy-MM-dd")))
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>사업장주소</th>
|
|
<td colspan="3"><input type="text" class="form-control dev" name="asaddr" value="@t.asaddr" /></td>
|
|
</tr>
|
|
@*<tr>
|
|
<th>첨부파일</th>
|
|
<td colspan="3">
|
|
<ul>
|
|
@foreach (var f in Model.FileList)
|
|
{
|
|
<li><a href="/aCommon/DownFile?fno=@f.fileno">@f.orgname</a></li>
|
|
}
|
|
</ul>
|
|
</td>
|
|
</tr>*@
|
|
<tr>
|
|
<th>영수구분</th>
|
|
<td colspan="3">
|
|
<label><input type="radio" name="isreceipt" value="0" @(t.isreceipt == 0 ? "checked" : "") style="vertical-align: bottom" /> 청구</label>
|
|
<label><input type="radio" name="isreceipt" value="1" @(t.isreceipt == 0 ? "" : "checked") style="vertical-align: bottom" /> 영수</label>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>기재사항</th>
|
|
<td colspan="3"><input type="text" class="form-control dev" name="taxinfo" value="@t.taxinfo" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<input type="hidden" id="taxno" name="taxno" value="@t.taxno" />
|
|
<input type="hidden" name="payno" value="@t.payno" />
|
|
<input type="hidden" name="cno" value="@t.cno" />
|
|
<input type="hidden" name="mgtkey" value="@t.mgtkey" />
|
|
<input type="hidden" name="iscancel" value="@t.iscancel" />
|
|
<input type="hidden" name="taxamt" value="@t.taxamt" />
|
|
<input type="hidden" name="fgno" value="@t.fgno" />
|
|
<input type="hidden" name="taxdatereq" value="@t.taxdatereq" />
|
|
<div class="text-center">
|
|
@if(t.ischeck == 1)
|
|
{
|
|
<a href="#" class="btn btn-success" onclick="taxcheck(0);">관리자확인취소</a>
|
|
}
|
|
else
|
|
{
|
|
<a href="#" class="btn btn-success" onclick="taxcheck(1);">관리자확인</a>
|
|
}
|
|
@if (t.iscancel == null || t.iscancel.Value != 1)
|
|
{
|
|
if (t.statecode == 0)
|
|
{
|
|
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
|
<a href="#" class="btn btn-success" onclick="tempsave();">임시저장</a>
|
|
<a href="#" class="btn btn-success" onclick="registIssue();">계산서 즉시발행</a>
|
|
}
|
|
else
|
|
{
|
|
if (t.statecode == 100)
|
|
{
|
|
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
|
<a href="#" class="btn btn-success" onclick="tempsave();">임시저장</a>
|
|
<a href="#" class="btn btn-success" onclick="view();">미리보기</a>
|
|
<a href="#" class="btn btn-success" onclick="Issue();">계산서 즉시발행</a>
|
|
|
|
}
|
|
else
|
|
{
|
|
<a href="#" class="btn btn-success" onclick="view();">계산서조회</a>
|
|
}
|
|
}
|
|
<a href="#" class="btn btn-danger" onclick="cancelIssue();">발행취소</a>
|
|
}
|
|
<a href="#" class="btn btn-default" onclick="golist();">목록</a>
|
|
</div>
|
|
@Html.Partial("./Partial/dform", Model)
|
|
</form>
|
|
<form id="dform" method="post" action="/croom/tax">
|
|
@Html.Partial("./Partial/dform", Model, new ViewDataDictionary { { "preform", 1 } })
|
|
</form>
|
|
@section styles{
|
|
<style type="text/css">
|
|
td span.isjoin0 {
|
|
background-color: #ddd;
|
|
color: #fff;
|
|
}
|
|
|
|
td span.isjoin1 {
|
|
background-color: #0094ff;
|
|
color: #fff;
|
|
}
|
|
|
|
td.taxdatex {
|
|
background-color: #d89f77;
|
|
color: #d00000
|
|
}
|
|
|
|
td.left {
|
|
text-align: left !important
|
|
}
|
|
|
|
td.right {
|
|
text-align: right !important
|
|
}
|
|
|
|
.panel .table-striped.no-odd > tbody > tr:nth-child(odd) > td.taxdatex,
|
|
.taxdatex {
|
|
background-color: #ffc399 !important
|
|
}
|
|
</style>
|
|
}
|
|
@section scriptsHeader{
|
|
@Html.Partial("./Partial/ScriptDate")
|
|
}
|
|
@section scripts{
|
|
<script>
|
|
$(document).ready(function () {
|
|
|
|
});
|
|
function gotab() {
|
|
$("#dform").attr("action", "/croom/taxsmart").submit();
|
|
}
|
|
function save() {
|
|
cap("/acommon/paytaxsave", "sform", "cbsave");
|
|
}
|
|
function cbsave() {
|
|
if (capResult.code == 1000) {
|
|
msg("저장되었습니다.", null, null, null, null, "rfs(0,'sform');");
|
|
} else if (capResult.code == -1) {
|
|
msg("이미 발행요청건이 존재합니다.", null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
msgadmin();
|
|
}
|
|
}
|
|
function tempsave() {
|
|
if (val("taxdate") == "") {
|
|
msg("발행일을 등록해주세요.");
|
|
} else {
|
|
cap("/acommon/paytaxtempsave", "sform", "cbtempsave");
|
|
}
|
|
}
|
|
function cbtempsave() {
|
|
if (capResult.code == 1000) {
|
|
msg("임시저장되었습니다.", null, null, null, null, "rfs(0,'sform');");
|
|
} else if (capResult.code == -1) {
|
|
msg("이미 발행요청건이 존재합니다.", null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
if (capResult.msg != "") {
|
|
msg(capResult.msg, null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
msgadmin();
|
|
}
|
|
}
|
|
}
|
|
function cancelIssue() {
|
|
if (confirm("발행을 취소하시겠습니까?")) {
|
|
$("input[name='iscancel']").val(1);
|
|
cap("/acommon/paytaxcancelissue", "sform", "cbcancelIssue");
|
|
}
|
|
}
|
|
function cbcancelIssue() {
|
|
if (capResult.code == 1000) {
|
|
msg("발행취소되었습니다.", null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
if (capResult.msg != "") {
|
|
msg(capResult.msg, null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
msgadmin();
|
|
}
|
|
}
|
|
}
|
|
function Issue() {
|
|
if (val("taxdate") == "") {
|
|
msg("발행일을 등록해주세요.");
|
|
} else {
|
|
if (confirm("입력된 내용으로 계산서 발행을 진행하시겠습니까?")) {
|
|
cap("/acommon/paytaxissue", "sform", "cbIssue");
|
|
}
|
|
}
|
|
}
|
|
function cbIssue() {
|
|
if (capResult.code == 1000) {
|
|
msg("발행되었습니다.", null, null, null, null, "rfs(0,'sform');");
|
|
} else if (capResult.code == -1) {
|
|
msg("이미 발행요청건이 존재합니다.", null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
if (capResult.msg != "") {
|
|
msg(capResult.msg, null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
msgadmin();
|
|
}
|
|
}
|
|
}
|
|
function registIssue() {
|
|
if (val("taxdate") == "") {
|
|
msg("발행일을 등록해주세요.");
|
|
} else {
|
|
if (confirm("입력된 내용으로 계산서 발행을 진행하시겠습니까?")) {
|
|
cap("/acommon/paytaxregistissue", "sform", "cbregistIssue");
|
|
}
|
|
}
|
|
}
|
|
function cbregistIssue() {
|
|
if (capResult.code == 1000) {
|
|
msg("즉시발행되었습니다.", null, null, null, null, "rfs(0,'sform');");
|
|
} else if (capResult.code == -1) {
|
|
msg("이미 발행요청건이 존재합니다.", null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
if (capResult.msg != "") {
|
|
msg(capResult.msg, null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
msgadmin();
|
|
}
|
|
}
|
|
}
|
|
function view() {
|
|
cap("/acommon/paytaxview", "sform", "cbview");
|
|
}
|
|
function cbview() {
|
|
if (capResult.code == 1000) {
|
|
var pop = window.open(capResult.obj, "taxprint", "width=900, height=720, scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0");
|
|
if (pop == null) {
|
|
msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
|
|
}
|
|
} else {
|
|
if (capResult.msg != "") {
|
|
msg(capResult.msg);
|
|
} else {
|
|
msgadmin();
|
|
}
|
|
}
|
|
}
|
|
var txt = "";
|
|
var txt2 = "";
|
|
function taxcheck(ischeck) {
|
|
txt = (ischeck == 0 ? "확인취소" : "확인");
|
|
txt2 = (ischeck == 0 ? "미확인" : "확인완료");
|
|
if (confirm(txt + " 처리 하시겠습니까?")) {
|
|
capp("/acommon/taxcheck", { taxno: $("#taxno").val(), ischeck: ischeck }, "cbtaxcheck");
|
|
}
|
|
}
|
|
function cbtaxcheck() {
|
|
if (capResult.code == 1000) {
|
|
if (capResult.obj == -1) {
|
|
msg(txt + "할 요청서가 없습니다.");
|
|
txt = "";
|
|
txt2 = "";
|
|
} else if (capResult.obj == -2) {
|
|
//우연의 확률..
|
|
msg(txt2 + " 건이 포함되어 있습니다. 다시 확인해주세요.", null, null, null, null, "rfs(0,'sform');");
|
|
} else {
|
|
msg(txt + " 처리 되었습니다.", null, null, null, null, "rfs(0,'sform');");
|
|
}
|
|
} else {
|
|
msgdev();
|
|
}
|
|
}
|
|
</script>
|
|
} |