+ 사용자
- 현금영수증/계산서 발행여부에서 계산서 발행 선택 시 추가입력 필드 추가
1. 영수/청구 구분 선택
2. 발행요청일 추가
+ 관리자
1. 발행일 옆에 '발행요청일' 필드 추가
- 사용자가 입력한 발행요청일 출력
2. 문구변경 요청일->신청일 (검색부분/목록 표 부분)
3. 검색에 요청일(신청일) 위에 '발행요청일' 추가
- 기본값 '조회달'
4. 기존 요청일(신청일) 기본값 제거"
5. 입금전에도 계산서 발행이 가능하도록 변경"
This commit is contained in:
parent
99211a256b
commit
358234f00d
|
|
@ -758,9 +758,11 @@ namespace NP.BO.Controllers
|
||||||
var ht = SetHash(vm, false);
|
var ht = SetHash(vm, false);
|
||||||
if (!IsPost())
|
if (!IsPost())
|
||||||
{
|
{
|
||||||
vm.stringval = DateTime.Now.ToString("yyyy-MM-01");
|
vm.stringval6 = DateTime.Now.ToString("yyyy-MM-01");
|
||||||
vm.stringval2 = Convert.ToDateTime(vm.stringval).AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd");
|
vm.stringval7 = Convert.ToDateTime(vm.stringval6).AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd");
|
||||||
}
|
}
|
||||||
|
ht.Add("staxdatereq", vm.stringval6);
|
||||||
|
ht.Add("etaxdatereq", string.IsNullOrEmpty(vm.stringval7) ? null : (vm.stringval7 + " 23:59:59"));
|
||||||
ht.Add("cdts", vm.stringval);
|
ht.Add("cdts", vm.stringval);
|
||||||
ht.Add("cdte", string.IsNullOrEmpty(vm.stringval2) ? null : (vm.stringval2 + " 23:59:59"));
|
ht.Add("cdte", string.IsNullOrEmpty(vm.stringval2) ? null : (vm.stringval2 + " 23:59:59"));
|
||||||
if (!string.IsNullOrEmpty(vm.stringval3))
|
if (!string.IsNullOrEmpty(vm.stringval3))
|
||||||
|
|
@ -812,15 +814,24 @@ namespace NP.BO.Controllers
|
||||||
else
|
else
|
||||||
vm.PayTaxItem = Dao.Get<PayItem>("cr.paytaxitem2", new System.Collections.Hashtable() { { "taxno", vm.longval } });
|
vm.PayTaxItem = Dao.Get<PayItem>("cr.paytaxitem2", new System.Collections.Hashtable() { { "taxno", vm.longval } });
|
||||||
|
|
||||||
#region 세금계산서 Popbill 연동
|
#region 세금계산서 Popbill 연동
|
||||||
var payTax = vm.PayTaxes.First();
|
var payTax = vm.PayTaxes.First();
|
||||||
if (payTax != null)
|
if (payTax != null)
|
||||||
{
|
{
|
||||||
var result = PopbillService.GetTaxinvoice(payTax);
|
var result = PopbillService.GetTaxinvoice(payTax);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
{
|
{
|
||||||
ViewBag.Taxinvoice = result.Data;
|
ViewBag.Taxinvoice = result.Data;
|
||||||
ViewBag.TaxinvoiceInfo = PopbillService.GetTaxinvoiceInfo(payTax).Data;
|
ViewBag.TaxinvoiceInfo = PopbillService.GetTaxinvoiceInfo(payTax).Data;
|
||||||
|
if(ViewBag.TaxinvoiceInfo != null && payTax.statecode == 0)
|
||||||
|
{
|
||||||
|
#region 세금계산서 상태코드 업데이트
|
||||||
|
payTax.uno = SUserInfo.UserNo;
|
||||||
|
payTax.uip = GetUserIP();
|
||||||
|
payTax.statecode = ViewBag.TaxinvoiceInfo.stateCode;
|
||||||
|
Dao.Save("cr.paytax.save", payTax);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,13 @@
|
||||||
<col />
|
<col />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<th>요청일</th>
|
<th>발행요청일</th>
|
||||||
|
<td class="text-left">
|
||||||
|
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval6) ? (DateTime?)null : Convert.ToDateTime(Model.stringval6), new ViewDataDictionary { { "name", "stringval6" } }) ~ @Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval7) ? (DateTime?)null : Convert.ToDateTime(Model.stringval7), new ViewDataDictionary { { "name", "stringval7" } })
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>신청일</th>
|
||||||
<td class="text-left">
|
<td class="text-left">
|
||||||
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval) ? (DateTime?)null : Convert.ToDateTime(Model.stringval), new ViewDataDictionary { { "name", "stringval" } }) ~ @Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval2) ? (DateTime?)null : Convert.ToDateTime(Model.stringval2), new ViewDataDictionary { { "name", "stringval2" } })
|
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval) ? (DateTime?)null : Convert.ToDateTime(Model.stringval), new ViewDataDictionary { { "name", "stringval" } }) ~ @Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval2) ? (DateTime?)null : Convert.ToDateTime(Model.stringval2), new ViewDataDictionary { { "name", "stringval2" } })
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -51,8 +57,9 @@
|
||||||
<th>상품명</th>
|
<th>상품명</th>
|
||||||
<th>수량<br />(인원)</th>
|
<th>수량<br />(인원)</th>
|
||||||
<th>발행요청금액</th>
|
<th>발행요청금액</th>
|
||||||
<th>요청일</th>
|
<th>신청일</th>
|
||||||
<th>발행일</th>
|
<th>발행요청일</th>
|
||||||
|
<th>발행일</th>
|
||||||
<th>영수구분</th>
|
<th>영수구분</th>
|
||||||
<th>상태</th>
|
<th>상태</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -69,9 +76,10 @@
|
||||||
<td>@d.pcnt</td>
|
<td>@d.pcnt</td>
|
||||||
<td class="right">@d.taxamt.ToString("#,0")</td>
|
<td class="right">@d.taxamt.ToString("#,0")</td>
|
||||||
<td>@d.cdtymd</td>
|
<td>@d.cdtymd</td>
|
||||||
<td>@(d.taxdate == null ? "" : d.taxdate.Value.ToString("yyyy-MM-dd"))</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.isreceipt == 0 ? "청구" : "영수")</td>
|
<td>@(d.isreceipt == 0 ? "청구" : "영수")</td>
|
||||||
<td class="taxdate@(d.iscancel ==1 ? "" : d.taxdate==null?"x":"")">@(d.iscancel ==1 ? "발행취소": d.taxdate == null ? "미발행" : "발행완료")</td>
|
<td class="taxdate@(d.status =="미발행" ? "x" :"")" @(!string.IsNullOrEmpty(d.mgtkey) && d.statecode == 0 ? "style=color:blue;" : "" ) >@(d.status)</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@
|
||||||
<th>상품명</th>
|
<th>상품명</th>
|
||||||
<th>수량<br />(인원)</th>
|
<th>수량<br />(인원)</th>
|
||||||
<th>발행요청금액</th>
|
<th>발행요청금액</th>
|
||||||
<th>요청일</th>
|
<th>신청일</th>
|
||||||
|
<th>발행요청일</th>
|
||||||
<th>발행일</th>
|
<th>발행일</th>
|
||||||
<th>상태</th>
|
<th>상태</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -39,8 +40,9 @@
|
||||||
<td>@d.pcnt</td>
|
<td>@d.pcnt</td>
|
||||||
<td class="right">@d.taxamt.ToString("#,0")</td>
|
<td class="right">@d.taxamt.ToString("#,0")</td>
|
||||||
<td>@d.cdtymd</td>
|
<td>@d.cdtymd</td>
|
||||||
<td>@(d.taxdate == null ? "" : d.taxdate.Value.ToString("yyyy-MM-dd"))</td>
|
<td>@(d.taxdatereq == null ? "" : d.taxdatereq.Value.ToString("yyyy-MM-dd"))</td>
|
||||||
<td class="taxdate@(d.iscancel ==1 ? "" : d.taxdate==null?"x":"")">@(d.iscancel ==1 ? "발행취소" :d.taxdate == null ? "미발행" : "발행완료")</td>
|
<td>@(d.taxdate == null ? "" : d.taxdate.Value.ToString("yyyy-MM-dd"))</td>
|
||||||
|
<td class="taxdate@(d.status =="미발행" ? "x" : "")">@(d.status)</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -181,7 +183,14 @@
|
||||||
<td><input type="text" class="form-control dev" name="email" value="@t.email" /></td>
|
<td><input type="text" class="form-control dev" name="email" value="@t.email" /></td>
|
||||||
<th style="background-color: #ffef98">발행일</th>
|
<th style="background-color: #ffef98">발행일</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" data-date-format="yyyy-mm-dd" class="form-control dev refundtime input-sm input-s datepicker-input form-control dev " name="taxdate" value="@(t.taxdate==null?"":t.taxdate.Value.ToString("yyyy-MM-dd"))" />
|
@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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -220,30 +229,25 @@
|
||||||
<input type="hidden" name="iscancel" value="@t.iscancel" />
|
<input type="hidden" name="iscancel" value="@t.iscancel" />
|
||||||
<input type="hidden" name="taxamt" value="@t.taxamt" />
|
<input type="hidden" name="taxamt" value="@t.taxamt" />
|
||||||
<input type="hidden" name="fgno" value="@t.fgno" />
|
<input type="hidden" name="fgno" value="@t.fgno" />
|
||||||
|
<input type="hidden" name="taxdatereq" value="@t.taxdatereq" />
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@if (t.iscancel == null || t.iscancel.Value != 1)
|
@if (t.iscancel == null || t.iscancel.Value != 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(t.mgtkey))
|
if (t.statecode == 0)
|
||||||
{
|
{
|
||||||
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
||||||
if (Model.PayTaxItem.First().payoktime != null)
|
<a href="#" class="btn btn-success" onclick="tempsave();">임시저장</a>
|
||||||
{
|
<a href="#" class="btn btn-success" onclick="registIssue();">계산서 즉시발행</a>
|
||||||
<a href="#" class="btn btn-success" onclick="tempsave();">임시저장</a>
|
|
||||||
<a href="#" class="btn btn-success" onclick="registIssue();">계산서 즉시발행</a>
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(taxinvoice.ntsconfirmNum))
|
if (t.statecode == 100)
|
||||||
{
|
{
|
||||||
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
|
||||||
if (Model.PayTaxItem.First().payoktime != null)
|
<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="tempsave();">임시저장</a>
|
<a href="#" class="btn btn-success" onclick="Issue();">계산서 즉시발행</a>
|
||||||
<a href="#" class="btn btn-success" onclick="view();">미리보기</a>
|
|
||||||
<a href="#" class="btn btn-success" onclick="Issue();">계산서 즉시발행</a>
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -252,7 +256,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<a href="#" class="btn btn-danger" onclick="cancelIssue();">발행취소</a>
|
<a href="#" class="btn btn-danger" onclick="cancelIssue();">발행취소</a>
|
||||||
}
|
}
|
||||||
<a href="#" class="btn btn-default" onclick="golist();">목록</a>
|
<a href="#" class="btn btn-default" onclick="golist();">목록</a>
|
||||||
</div>
|
</div>
|
||||||
@Html.Partial("./Partial/dform", Model)
|
@Html.Partial("./Partial/dform", Model)
|
||||||
|
|
@ -315,7 +319,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function tempsave() {
|
function tempsave() {
|
||||||
cap("/acommon/paytaxtempsave", "sform", "cbtempsave");
|
if (val("taxdate") == "") {
|
||||||
|
msg("발행일을 등록해주세요.");
|
||||||
|
} else {
|
||||||
|
cap("/acommon/paytaxtempsave", "sform", "cbtempsave");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function cbtempsave() {
|
function cbtempsave() {
|
||||||
if (capResult.code == 1000) {
|
if (capResult.code == 1000) {
|
||||||
|
|
@ -348,8 +356,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function Issue() {
|
function Issue() {
|
||||||
if (confirm("입력된 내용으로 계산서 발행을 진행하시겠습니까?")) {
|
if (val("taxdate") == "") {
|
||||||
cap("/acommon/paytaxissue", "sform", "cbIssue");
|
msg("발행일을 등록해주세요.");
|
||||||
|
} else {
|
||||||
|
if (confirm("입력된 내용으로 계산서 발행을 진행하시겠습니까?")) {
|
||||||
|
cap("/acommon/paytaxissue", "sform", "cbIssue");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function cbIssue() {
|
function cbIssue() {
|
||||||
|
|
@ -366,8 +378,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function registIssue() {
|
function registIssue() {
|
||||||
if (confirm("입력된 내용으로 계산서 발행을 진행하시겠습니까?")) {
|
if (val("taxdate") == "") {
|
||||||
cap("/acommon/paytaxregistissue", "sform", "cbregistIssue");
|
msg("발행일을 등록해주세요.");
|
||||||
|
} else {
|
||||||
|
if (confirm("입력된 내용으로 계산서 발행을 진행하시겠습니까?")) {
|
||||||
|
cap("/acommon/paytaxregistissue", "sform", "cbregistIssue");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function cbregistIssue() {
|
function cbregistIssue() {
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,8 @@
|
||||||
<!--<add key="talk" value="https://alimtalk-api.bizmsg.kr/v2/sender/send,?,?,?,?,?,023103312" />-->
|
<!--<add key="talk" value="https://alimtalk-api.bizmsg.kr/v2/sender/send,?,?,?,?,?,023103312" />-->
|
||||||
|
|
||||||
<!--<add key="configpath" value="Product" />-->
|
<!--<add key="configpath" value="Product" />-->
|
||||||
<add key="configpath" value="ProductDev" />
|
<!--<add key="configpath" value="ProductDev" />-->
|
||||||
<!--<add key="configpath" value="Staging" />-->
|
<add key="configpath" value="Staging" />
|
||||||
|
|
||||||
|
|
||||||
<add key="lgdacomConfigPath" value="D:\3rdparti\lgdacomyicte" />
|
<add key="lgdacomConfigPath" value="D:\3rdparti\lgdacomyicte" />
|
||||||
|
|
|
||||||
|
|
@ -834,15 +834,14 @@ namespace NP.Base.Controllers
|
||||||
public JsonResult PayTaxTempSave(PayTax payTax)
|
public JsonResult PayTaxTempSave(PayTax payTax)
|
||||||
{
|
{
|
||||||
payTax.uno = SUserInfo.UserNo; payTax.uip = GetUserIP();
|
payTax.uno = SUserInfo.UserNo; payTax.uip = GetUserIP();
|
||||||
if (payTax.iscancel != 1 && Dao.Get<PayTax>("cr.paytaxes", new Hashtable() { { "payno", payTax.payno }, { "cno", payTax.cno }, { "iscancel", 0 }, { "nottaxno", payTax.taxno } }).Count() > 0)
|
if (payTax.iscancel != 1 && payTax.taxdate != null && Dao.Get<PayTax>("cr.paytaxes", new Hashtable() { { "payno", payTax.payno }, { "cno", payTax.cno }, { "iscancel", 0 }, { "nottaxno", payTax.taxno } }).Count() > 0)
|
||||||
{
|
{
|
||||||
return JsonBack(new JsonRtn() { code = -1 });
|
return JsonBack(new JsonRtn() { code = -1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
payTax.udt = DateTime.Now;
|
|
||||||
if (string.IsNullOrEmpty(payTax.mgtkey))
|
if (string.IsNullOrEmpty(payTax.mgtkey))
|
||||||
{
|
{
|
||||||
payTax.mgtkey = Popbill.PopbillService.MakeMgtKey(Dao, payTax.taxno, payTax.udt);
|
payTax.mgtkey = Popbill.PopbillService.MakeMgtKey(Dao, payTax.taxno, payTax.taxdate.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dao.Save("cr.paytax.save", payTax) > 0)
|
if (Dao.Save("cr.paytax.save", payTax) > 0)
|
||||||
|
|
@ -852,10 +851,26 @@ namespace NP.Base.Controllers
|
||||||
var result = Popbill.PopbillService.TempSave(Dao, payTax, payItems);
|
var result = Popbill.PopbillService.TempSave(Dao, payTax, payItems);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
{
|
{
|
||||||
|
#region 세금계산서 상태코드 업데이트
|
||||||
|
var taxinvoiceInfo = PopbillService.GetTaxinvoiceInfo(payTax).Data;
|
||||||
|
payTax.statecode = taxinvoiceInfo.stateCode;
|
||||||
|
Dao.Save("cr.paytax.save", payTax);
|
||||||
|
#endregion
|
||||||
return JsonOK(result.Code);
|
return JsonOK(result.Code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#region 임시저장 실패시 mgtkey 미사용이면 저장값 초기화
|
||||||
|
var checkResult = Popbill.PopbillService.CheckMgtKeyInUse(payTax.mgtkey);
|
||||||
|
if (checkResult.IsSuccess)
|
||||||
|
{
|
||||||
|
if (!checkResult.IsUse)
|
||||||
|
{
|
||||||
|
payTax.mgtkey = string.Empty;
|
||||||
|
Dao.Save("cr.paytax.save", payTax);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
return JsonError(JSONCode.Error, result.Message, result);
|
return JsonError(JSONCode.Error, result.Message, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -863,9 +878,9 @@ namespace NP.Base.Controllers
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 세금계산서 발행(팝빌 발행 및 paytax.taxdate 업데이트)
|
#region 세금계산서 발행(팝빌 발행)
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 세금계산서 발행(팝빌 발행 및 paytax.taxdate 업데이트)
|
/// 세금계산서 발행(팝빌 발행)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="payTax"></param>
|
/// <param name="payTax"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
@ -873,25 +888,25 @@ namespace NP.Base.Controllers
|
||||||
public JsonResult PayTaxIssue(PayTax payTax)
|
public JsonResult PayTaxIssue(PayTax payTax)
|
||||||
{
|
{
|
||||||
payTax.uno = SUserInfo.UserNo; payTax.uip = GetUserIP();
|
payTax.uno = SUserInfo.UserNo; payTax.uip = GetUserIP();
|
||||||
if (payTax.iscancel != 1 && Dao.Get<PayTax>("cr.paytaxes", new Hashtable() { { "payno", payTax.payno }, { "cno", payTax.cno }, { "iscancel", 0 }, { "nottaxno", payTax.taxno } }).Count() > 0)
|
if (payTax.iscancel != 1 && payTax.taxdate != null && Dao.Get<PayTax>("cr.paytaxes", new Hashtable() { { "payno", payTax.payno }, { "cno", payTax.cno }, { "iscancel", 0 }, { "nottaxno", payTax.taxno } }).Count() > 0)
|
||||||
{
|
{
|
||||||
return JsonBack(new JsonRtn() { code = -1 });
|
return JsonBack(new JsonRtn() { code = -1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (payTax.taxdate == null)
|
|
||||||
{
|
|
||||||
payTax.taxdate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Dao.Save("cr.paytax.save", payTax) > 0)
|
if (Dao.Save("cr.paytax.save", payTax) > 0)
|
||||||
{
|
{
|
||||||
var result = Popbill.PopbillService.Issue(payTax.mgtkey);
|
var result = Popbill.PopbillService.Issue(payTax.mgtkey);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
{
|
{
|
||||||
|
#region 세금계산서 상태코드 업데이트
|
||||||
|
var taxinvoiceInfo = PopbillService.GetTaxinvoiceInfo(payTax).Data;
|
||||||
|
payTax.statecode = taxinvoiceInfo.stateCode;
|
||||||
|
Dao.Save("cr.paytax.save", payTax);
|
||||||
|
#endregion
|
||||||
return JsonOK(result.Code);
|
return JsonOK(result.Code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return JsonError(JSONCode.Error, result.Message, result);
|
return JsonError(JSONCode.Error, result.Message, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -899,9 +914,9 @@ namespace NP.Base.Controllers
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 세금계산서 즉시발행(팝빌 발행 및 paytax.taxdate ,paytax.mgtkey 업데이트)
|
#region 세금계산서 즉시발행(팝빌 발행 및 paytax.mgtkey 업데이트)
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 세금계산서 즉시발행(팝빌 발행 및 paytax.taxdate ,paytax.mgtkey 업데이트)
|
/// 세금계산서 즉시발행(팝빌 발행 및 paytax.mgtkey 업데이트)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="payTax">payTax</param>
|
/// <param name="payTax">payTax</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
@ -909,20 +924,14 @@ namespace NP.Base.Controllers
|
||||||
public JsonResult PayTaxRegistIssue(PayTax payTax)
|
public JsonResult PayTaxRegistIssue(PayTax payTax)
|
||||||
{
|
{
|
||||||
payTax.uno = SUserInfo.UserNo; payTax.uip = GetUserIP();
|
payTax.uno = SUserInfo.UserNo; payTax.uip = GetUserIP();
|
||||||
if (payTax.iscancel != 1 && Dao.Get<PayTax>("cr.paytaxes", new Hashtable() { { "payno", payTax.payno }, { "cno", payTax.cno }, { "iscancel", 0 }, { "nottaxno", payTax.taxno } }).Count() > 0)
|
if (payTax.iscancel != 1 && payTax.taxdate != null && Dao.Get<PayTax>("cr.paytaxes", new Hashtable() { { "payno", payTax.payno }, { "cno", payTax.cno }, { "iscancel", 0 }, { "nottaxno", payTax.taxno } }).Count() > 0)
|
||||||
{
|
{
|
||||||
return JsonBack(new JsonRtn() { code = -1 });
|
return JsonBack(new JsonRtn() { code = -1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (payTax.taxdate == null)
|
|
||||||
{
|
|
||||||
payTax.taxdate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
|
|
||||||
}
|
|
||||||
|
|
||||||
payTax.udt = DateTime.Now;
|
|
||||||
if (string.IsNullOrEmpty(payTax.mgtkey))
|
if (string.IsNullOrEmpty(payTax.mgtkey))
|
||||||
{
|
{
|
||||||
payTax.mgtkey = Popbill.PopbillService.MakeMgtKey(Dao,payTax.taxno, payTax.udt);
|
payTax.mgtkey = Popbill.PopbillService.MakeMgtKey(Dao,payTax.taxno, payTax.taxdate.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dao.Save("cr.paytax.save", payTax) > 0)
|
if (Dao.Save("cr.paytax.save", payTax) > 0)
|
||||||
|
|
@ -931,10 +940,26 @@ namespace NP.Base.Controllers
|
||||||
var result = Popbill.PopbillService.RegistIssue(Dao, payTax, payItems);
|
var result = Popbill.PopbillService.RegistIssue(Dao, payTax, payItems);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
{
|
{
|
||||||
|
#region 세금계산서 상태코드 업데이트
|
||||||
|
var taxinvoiceInfo = PopbillService.GetTaxinvoiceInfo(payTax).Data;
|
||||||
|
payTax.statecode = taxinvoiceInfo.stateCode;
|
||||||
|
Dao.Save("cr.paytax.save", payTax);
|
||||||
|
#endregion
|
||||||
return JsonOK(result.Code);
|
return JsonOK(result.Code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#region 즉시발행 실패시 mgtkey 미사용이면 저장값 초기화
|
||||||
|
var checkResult = Popbill.PopbillService.CheckMgtKeyInUse(payTax.mgtkey);
|
||||||
|
if (checkResult.IsSuccess)
|
||||||
|
{
|
||||||
|
if (!checkResult.IsUse)
|
||||||
|
{
|
||||||
|
payTax.mgtkey = string.Empty;
|
||||||
|
Dao.Save("cr.paytax.save", payTax);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
return JsonError(JSONCode.Error, result.Message, result);
|
return JsonError(JSONCode.Error, result.Message, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -969,6 +994,10 @@ namespace NP.Base.Controllers
|
||||||
var result = Popbill.PopbillService.CancelIssue(payTax.mgtkey);
|
var result = Popbill.PopbillService.CancelIssue(payTax.mgtkey);
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
{
|
{
|
||||||
|
#region 세금계산서 상태코드 업데이트
|
||||||
|
var taxinvoiceInfo = PopbillService.GetTaxinvoiceInfo(payTax).Data;
|
||||||
|
payTax.statecode = taxinvoiceInfo.stateCode;
|
||||||
|
#endregion
|
||||||
return JsonOK(Dao.Save("cr.paytax.save", payTax));
|
return JsonOK(Dao.Save("cr.paytax.save", payTax));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -389,6 +389,11 @@ namespace NP.Base.Controllers
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (vm.isbill == 1)
|
||||||
|
{
|
||||||
|
Dao.Save("pay.pplog.up", new Hashtable() { { "pplno", vm.pplno}, { "userno", SUserInfo.UserNo }, { "isreceipt", vm.isreceipt }, { "taxdatereq", vm.taxdatereq }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } });
|
||||||
|
}
|
||||||
|
|
||||||
vm.Pay = new Pay()
|
vm.Pay = new Pay()
|
||||||
{
|
{
|
||||||
ptype = vm.ptype,
|
ptype = vm.ptype,
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,31 @@ namespace NP.Base.Popbill
|
||||||
{
|
{
|
||||||
public class PopbillService
|
public class PopbillService
|
||||||
{
|
{
|
||||||
|
#region 세금계산서 mgtKey(문서번호) 사용여부
|
||||||
|
/// <summary>
|
||||||
|
/// 세금계산서 mgtKey(문서번호) 사용여부
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="mgtkey">mgtkey</param>
|
||||||
|
/// <param name="keyType">세금계산서 유형 : SELL = 매출, BUY = 매입, TRUSTEE = 위수탁</param>
|
||||||
|
/// <returns>bool</returns>
|
||||||
|
public static Result<bool> CheckMgtKeyInUse(string mgtkey, MgtKeyType keyType = MgtKeyType.SELL)
|
||||||
|
{
|
||||||
|
Result<bool> result = new Result<bool>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result.IsUse = PopbillConfig.taxinvoiceService.CheckMgtKeyInUse(PopbillConfig.CorpNum, keyType, mgtkey);
|
||||||
|
}
|
||||||
|
catch (PopbillException ex)
|
||||||
|
{
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.Code = ex.code;
|
||||||
|
result.Message = ex.Message;
|
||||||
|
Logger.TryError(ex.Message, ex);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 세금계산서 mgtKey(문서번호) 생성
|
#region 세금계산서 mgtKey(문서번호) 생성
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 세금계산서 mgtKey(문서번호) 생성
|
/// 세금계산서 mgtKey(문서번호) 생성
|
||||||
|
|
@ -82,7 +107,7 @@ namespace NP.Base.Popbill
|
||||||
taxinvoice.issueType = "정발행"; //"정발행" / "역발행" / "위수탁" 중 택 1
|
taxinvoice.issueType = "정발행"; //"정발행" / "역발행" / "위수탁" 중 택 1
|
||||||
taxinvoice.taxType = "면세"; //"과세" / "영세" / "면세" 중 택 1
|
taxinvoice.taxType = "면세"; //"과세" / "영세" / "면세" 중 택 1
|
||||||
taxinvoice.chargeDirection = "정과금"; //"정과금" / "역과금" 중 택 1
|
taxinvoice.chargeDirection = "정과금"; //"정과금" / "역과금" 중 택 1
|
||||||
taxinvoice.writeDate = payTax.udt.ToString("yyyyMMdd");
|
taxinvoice.writeDate = payTax.taxdate?.ToString("yyyyMMdd");
|
||||||
taxinvoice.purposeType = payTax.isreceipt == 0 ? "청구" : "영수"; //0:청구, 1:영수 {"영수" / "청구" / "없음" 중 택 1}
|
taxinvoice.purposeType = payTax.isreceipt == 0 ? "청구" : "영수"; //0:청구, 1:영수 {"영수" / "청구" / "없음" 중 택 1}
|
||||||
taxinvoice.supplyCostTotal = payTax.taxamt.ToString();
|
taxinvoice.supplyCostTotal = payTax.taxamt.ToString();
|
||||||
taxinvoice.taxTotal = "0";
|
taxinvoice.taxTotal = "0";
|
||||||
|
|
@ -115,7 +140,7 @@ namespace NP.Base.Popbill
|
||||||
{
|
{
|
||||||
TaxinvoiceDetail detail = new TaxinvoiceDetail();
|
TaxinvoiceDetail detail = new TaxinvoiceDetail();
|
||||||
detail.serialNum = serialNum; // 일련번호, 1부터 순차기재
|
detail.serialNum = serialNum; // 일련번호, 1부터 순차기재
|
||||||
detail.purchaseDT = payItem.payoktime.Value.ToString("yyyyMMdd"); // 거래일자
|
detail.purchaseDT = payTax.taxdate?.ToString("yyyyMMdd"); // 거래일자
|
||||||
detail.itemName = payItem.itemname; // 품목명
|
detail.itemName = payItem.itemname; // 품목명
|
||||||
detail.spec = ""; // 규격
|
detail.spec = ""; // 규격
|
||||||
detail.qty = payItem.pcnt.ToString(); // 수량
|
detail.qty = payItem.pcnt.ToString(); // 수량
|
||||||
|
|
@ -151,19 +176,19 @@ namespace NP.Base.Popbill
|
||||||
state = "발행완료";
|
state = "발행완료";
|
||||||
break;
|
break;
|
||||||
case 301:
|
case 301:
|
||||||
state = "전송전";
|
state = "국세청-전송전";
|
||||||
break;
|
break;
|
||||||
case 302:
|
case 302:
|
||||||
state = "전송대기";
|
state = "국세청-전송대기";
|
||||||
break;
|
break;
|
||||||
case 303:
|
case 303:
|
||||||
state = "전송중";
|
state = "국세청-전송중";
|
||||||
break;
|
break;
|
||||||
case 304:
|
case 304:
|
||||||
state = "전송성공";
|
state = "국세청-전송성공";
|
||||||
break;
|
break;
|
||||||
case 305:
|
case 305:
|
||||||
state = "전송실패";
|
state = "국세청-전송실패";
|
||||||
break;
|
break;
|
||||||
case 600:
|
case 600:
|
||||||
state = "발행취소";
|
state = "발행취소";
|
||||||
|
|
@ -501,5 +526,6 @@ namespace NP.Base.Popbill
|
||||||
public long Code = 1;
|
public long Code = 1;
|
||||||
public String Message = string.Empty;
|
public String Message = string.Empty;
|
||||||
public T Data;
|
public T Data;
|
||||||
}
|
public bool IsUse = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1243,16 +1243,15 @@
|
||||||
select a.*
|
select a.*
|
||||||
from (
|
from (
|
||||||
select a.taxno,ifnull(a.cname, ifnull(a.exname, a.bkname)) itemname,a.asaddr,a.pcnt,a.ccount,b.iscancel
|
select a.taxno,ifnull(a.cname, ifnull(a.exname, a.bkname)) itemname,a.asaddr,a.pcnt,a.ccount,b.iscancel
|
||||||
,b.payno,b.asname,b.taxamt,b.cdt,b.taxdate,b.ceoname,b.brno,b.grno,b.btype,b.bkind,b.manname,b.fgno,b.taxinfo,b.isreceipt
|
,b.payno,b.asname,b.taxamt,b.cdt,b.taxdate,b.ceoname,b.brno,b.grno,b.btype,b.bkind,b.manname,b.fgno,b.taxinfo,b.isreceipt,b.mgtkey,b.taxdatereq,b.statecode
|
||||||
,CAST(AES_DECRYPT(UNHEX(b.telno), <include refid="sql.digest"></include>) AS char) telno
|
,CAST(AES_DECRYPT(UNHEX(b.telno), <include refid="sql.digest"></include>) AS char) telno
|
||||||
,CAST(AES_DECRYPT(UNHEX(b.email), <include refid="sql.digest"></include>) AS char) email
|
,CAST(AES_DECRYPT(UNHEX(b.email), <include refid="sql.digest"></include>) AS char) email
|
||||||
,u.userno cno,u.username,u.userid
|
,u.userno cno,u.username,u.userid
|
||||||
,ua.isjoin
|
,ua.isjoin
|
||||||
,row_number() over(order by b.cdt desc) rno
|
,row_number() over(order by b.cdt desc) rno
|
||||||
,count(a.taxno) over() pagetotalcount
|
,count(a.taxno) over() pagetotalcount
|
||||||
,a.mgtkey
|
|
||||||
from (
|
from (
|
||||||
select a.taxno,max(cm.cname) cname,a.asaddr,max(bk.bkname) bkname,max(ex.exname) exname,sum(pi.pcnt) pcnt,count(pi.pino) ccount, a.mgtkey
|
select a.taxno,max(cm.cname) cname,a.asaddr,max(bk.bkname) bkname,max(ex.exname) exname,sum(pi.pcnt) pcnt,count(pi.pino) ccount
|
||||||
from paytax a
|
from paytax a
|
||||||
inner join paytaxitem b on b.taxno=a.taxno
|
inner join paytaxitem b on b.taxno=a.taxno
|
||||||
inner join payitem pi on pi.pino=b.pino
|
inner join payitem pi on pi.pino=b.pino
|
||||||
|
|
@ -1269,9 +1268,8 @@
|
||||||
<isNotNull property="iscancel" prepend="and">ifnull(a.iscancel,0)=#iscancel#</isNotNull>
|
<isNotNull property="iscancel" prepend="and">ifnull(a.iscancel,0)=#iscancel#</isNotNull>
|
||||||
<isNotNull property="cdts" prepend="and">a.cdt >= #cdts#</isNotNull>
|
<isNotNull property="cdts" prepend="and">a.cdt >= #cdts#</isNotNull>
|
||||||
<isNotNull property="cdte" prepend="and">a.cdt <= #cdte#</isNotNull>
|
<isNotNull property="cdte" prepend="and">a.cdt <= #cdte#</isNotNull>
|
||||||
<isNotNull property="tstatus0" prepend="and">a.taxdate is null</isNotNull>
|
<isNotNull property="tstatus0" prepend="and">ifnull(a.statecode,0) < 300</isNotNull>
|
||||||
<isNotNull property="tstatus1" prepend="and">a.taxdate is not null</isNotNull>
|
<isNotNull property="tstatus1" prepend="and">a.statecode >= 300</isNotNull>
|
||||||
<isNotNull property="tstatus1" prepend="and">a.taxdate is not null</isNotNull>
|
|
||||||
<isNotNull property="username" prepend="and">u.username like concat('%',#username#,'%')</isNotNull>
|
<isNotNull property="username" prepend="and">u.username like concat('%',#username#,'%')</isNotNull>
|
||||||
<isNotNull property="userid" prepend="and">u.userid like concat('%',#userid#,'%')</isNotNull>
|
<isNotNull property="userid" prepend="and">u.userid like concat('%',#userid#,'%')</isNotNull>
|
||||||
<isNotNull property="manname" prepend="and">a.manname like concat('%',#manname#,'%')</isNotNull>
|
<isNotNull property="manname" prepend="and">a.manname like concat('%',#manname#,'%')</isNotNull>
|
||||||
|
|
@ -1281,6 +1279,8 @@
|
||||||
<isNotNull property="nimp" prepend="and">
|
<isNotNull property="nimp" prepend="and">
|
||||||
(u.username=#nimp# or u.userid=#nimp# or a.manname=#nimp# or cm.cname like concat('%', #nimp#, '%') or bk.bkname like concat('%', #nimp#, '%') or ex.exname like concat('%', #nimp#, '%') or cm2.cname like concat('%', #nimp#, '%'))
|
(u.username=#nimp# or u.userid=#nimp# or a.manname=#nimp# or cm.cname like concat('%', #nimp#, '%') or bk.bkname like concat('%', #nimp#, '%') or ex.exname like concat('%', #nimp#, '%') or cm2.cname like concat('%', #nimp#, '%'))
|
||||||
</isNotNull>
|
</isNotNull>
|
||||||
|
<isNotNull property="staxdatereq" prepend="and">a.taxdatereq >= #staxdatereq#</isNotNull>
|
||||||
|
<isNotNull property="etaxdatereq" prepend="and">a.taxdatereq <= #etaxdatereq#</isNotNull>
|
||||||
</dynamic>
|
</dynamic>
|
||||||
group by a.taxno
|
group by a.taxno
|
||||||
) a
|
) a
|
||||||
|
|
@ -1348,6 +1348,8 @@
|
||||||
,iscancel=#iscancel#
|
,iscancel=#iscancel#
|
||||||
,asaddr=#asaddr#
|
,asaddr=#asaddr#
|
||||||
,mgtkey=#mgtkey#
|
,mgtkey=#mgtkey#
|
||||||
|
,taxdatereq=#taxdatereq#
|
||||||
|
,statecode=#statecode#
|
||||||
where taxno=#taxno#
|
where taxno=#taxno#
|
||||||
</update>
|
</update>
|
||||||
<select id="cr.documnetspasts" parameterClass="hashtable" resultClass="document">
|
<select id="cr.documnetspasts" parameterClass="hashtable" resultClass="document">
|
||||||
|
|
|
||||||
|
|
@ -1520,7 +1520,7 @@
|
||||||
,f.estart,f.eend
|
,f.estart,f.eend
|
||||||
,cc.cname studyplacename
|
,cc.cname studyplacename
|
||||||
,cc.ccode studyplace
|
,cc.ccode studyplace
|
||||||
,pt.taxno,pt.taxdate taxdate2,pt.mgtkey,pt.iscancel
|
,pt.taxno,pt.taxdate taxdate2,pt.mgtkey,pt.iscancel,pt.statecode
|
||||||
,a.cdt
|
,a.cdt
|
||||||
,pv.cshrpgkey
|
,pv.cshrpgkey
|
||||||
,ifnull(pi.isrebate,0) isrebate
|
,ifnull(pi.isrebate,0) isrebate
|
||||||
|
|
|
||||||
|
|
@ -775,7 +775,7 @@
|
||||||
order by ifnull(c.taxno,0),b.pino
|
order by ifnull(c.taxno,0),b.pino
|
||||||
</select>
|
</select>
|
||||||
<insert id="pay.paytax.in" parameterClass="paytax">
|
<insert id="pay.paytax.in" parameterClass="paytax">
|
||||||
insert into paytax(payno,taxamt,pcnt,asname,ceoname,brno,grno,btype,bkind,manname,telno,email,fgno,taxinfo,asaddr,isreceipt,<include refid="sql.inc"></include>)
|
insert into paytax(payno,taxamt,pcnt,asname,ceoname,brno,grno,btype,bkind,manname,telno,email,fgno,taxinfo,asaddr,isreceipt,taxdatereq,<include refid="sql.inc"></include>)
|
||||||
select a.payno
|
select a.payno
|
||||||
,sum(b.payamt)
|
,sum(b.payamt)
|
||||||
,sum(b.pcnt)
|
,sum(b.pcnt)
|
||||||
|
|
@ -785,7 +785,7 @@
|
||||||
,#btype#,#bkind#,#manname#
|
,#btype#,#bkind#,#manname#
|
||||||
,HEX(AES_ENCRYPT(#telno#, <include refid="sql.digest"></include>))
|
,HEX(AES_ENCRYPT(#telno#, <include refid="sql.digest"></include>))
|
||||||
,HEX(AES_ENCRYPT(#email#, <include refid="sql.digest"></include>))
|
,HEX(AES_ENCRYPT(#email#, <include refid="sql.digest"></include>))
|
||||||
,#fgno#,#taxinfo#,#asaddr#,#isreceipt#,<include refid="sql.inv"></include>
|
,#fgno#,#taxinfo#,#asaddr#,#isreceipt#,#taxdatereq#,<include refid="sql.inv"></include>
|
||||||
from pay a
|
from pay a
|
||||||
inner join payitem b on b.payno=a.payno and b.pino in ($pinos$) and (a.pstatus=1 or a.pstatus=22) and a.rstatus=0
|
inner join payitem b on b.payno=a.payno and b.pino in ($pinos$) and (a.pstatus=1 or a.pstatus=22) and a.rstatus=0
|
||||||
where a.payno=#payno# and a.userno=#uno# and (a.pstatus=1 or a.pstatus=22) and a.rstatus < 2
|
where a.payno=#payno# and a.userno=#uno# and (a.pstatus=1 or a.pstatus=22) and a.rstatus < 2
|
||||||
|
|
@ -927,7 +927,7 @@
|
||||||
where payno=#payno# and isunpay=1;
|
where payno=#payno# and isunpay=1;
|
||||||
</update>
|
</update>
|
||||||
<select id="pay.pplogs" parameterClass="hashtable" resultClass="pplog">
|
<select id="pay.pplogs" parameterClass="hashtable" resultClass="pplog">
|
||||||
select a.pplno,a.isready,a.cmno,a.cmisno,a.isrebate,a.rbankname,CAST(AES_DECRYPT(UNHEX(a.rbankacc), <include refid="sql.digest"></include>) AS char) rbankacc,a.rbankowner,a.isaccommodation,a.cshape
|
select a.pplno,a.isready,a.cmno,a.cmisno,a.isrebate,a.rbankname,CAST(AES_DECRYPT(UNHEX(a.rbankacc), <include refid="sql.digest"></include>) AS char) rbankacc,a.rbankowner,a.isaccommodation,a.cshape,a.isreceipt,a.taxdatereq
|
||||||
,b.payno,b.pstatus
|
,b.payno,b.pstatus
|
||||||
,a2.infee,a2.accommofee
|
,a2.infee,a2.accommofee
|
||||||
,b.isbill
|
,b.isbill
|
||||||
|
|
@ -972,6 +972,14 @@
|
||||||
,typegrade = #typegrade#
|
,typegrade = #typegrade#
|
||||||
where pplno = #pplno#
|
where pplno = #pplno#
|
||||||
</update>
|
</update>
|
||||||
|
<update id="pay.pplog.up" parameterClass="hashtable">
|
||||||
|
update pplog
|
||||||
|
set <include refid="sql.up"></include>
|
||||||
|
<isNotNull property="mgtkey">,mgtkey=#mgtkey#</isNotNull>
|
||||||
|
<isNotNull property="isreceipt">,isreceipt=#isreceipt#</isNotNull>
|
||||||
|
<isNotNull property="taxdatereq">,taxdatereq=#taxdatereq#</isNotNull>
|
||||||
|
where pplno = #pplno# and userno=#userno#
|
||||||
|
</update>
|
||||||
</statements>
|
</statements>
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -691,8 +691,9 @@ namespace NP.FO.Controllers
|
||||||
payTax.bkind = vm.PPLog.bkind;
|
payTax.bkind = vm.PPLog.bkind;
|
||||||
payTax.manname = vm.PPLog.mname;
|
payTax.manname = vm.PPLog.mname;
|
||||||
payTax.telno = vm.PPLog.mphone;
|
payTax.telno = vm.PPLog.mphone;
|
||||||
payTax.email = vm.PPLog.taxemail;
|
payTax.email = vm.PPLog.taxemail;
|
||||||
payTax.isreceipt = 0; //0:청구, 1:영수
|
payTax.isreceipt = vm.PPLog.isreceipt; //0:청구, 1:영수
|
||||||
|
payTax.taxdatereq = vm.PPLog.taxdatereq;
|
||||||
payTax.brno = (payTax.brno ?? "").Replace("-", "");
|
payTax.brno = (payTax.brno ?? "").Replace("-", "");
|
||||||
payTax.grno = (payTax.grno ?? "").Replace("-", "");
|
payTax.grno = (payTax.grno ?? "").Replace("-", "");
|
||||||
Dao.Insert<PayTax>("pay.paytax.in", payTax);
|
Dao.Insert<PayTax>("pay.paytax.in", payTax);
|
||||||
|
|
|
||||||
|
|
@ -101,10 +101,18 @@
|
||||||
}
|
}
|
||||||
@if ((Model.PPLog.cshape == 1 && Model.PPLog.isrebate == 1) || (Model.PPLog.cshape == 1 && Model.PPLog.isrebate == 0 && !String.IsNullOrEmpty(Model.PPLog.asname))|| (Model.PPLog.cshape != 1 && !String.IsNullOrEmpty(Model.PPLog.asname)))
|
@if ((Model.PPLog.cshape == 1 && Model.PPLog.isrebate == 1) || (Model.PPLog.cshape == 1 && Model.PPLog.isrebate == 0 && !String.IsNullOrEmpty(Model.PPLog.asname))|| (Model.PPLog.cshape != 1 && !String.IsNullOrEmpty(Model.PPLog.asname)))
|
||||||
{
|
{
|
||||||
<li><input type="radio" name="iscashrct" id="pay0203" value="2"><label for="pay0203">계산서 발행</label></li>
|
<li>
|
||||||
|
<input type="radio" name="iscashrct" id="pay0203" value="2"><label for="pay0203">계산서 발행</label>
|
||||||
|
</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul class="apyRdo" id="taxinvoice_option" style="display:none;margin-top:-1px">
|
||||||
|
<li><input type="radio" name="isreceipt" id="isreceipt0" value="0" @(Model.PPLog.isreceipt == 0 ? "checked" : "") /><label for="isreceipt0"> 청구</label></li>
|
||||||
|
<li><input type="radio" name="isreceipt" id="isreceipt1" value="1" @(Model.PPLog.isreceipt != 0 ? "checked" : "")/><label for="isreceipt1"> 영수</label></li>
|
||||||
|
<li style="vertical-align:sub;">발행요청일 : <input type="text" name="taxdatereq" id="taxdatereq" data-date-format="yyyy-mm-dd" class="datepicker-input" value="@(Model.PPLog.taxdatereq == null ? "" : Model.PPLog.taxdatereq.Value.ToString("yyyy-MM-dd"))" autocomplete="off" /></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="clsBtn society">
|
<ul class="clsBtn society">
|
||||||
<li><a href="#" onclick="save()">수강신청</a></li>
|
<li><a href="#" onclick="save()">수강신청</a></li>
|
||||||
<li><a href="/">취소</a></li>
|
<li><a href="/">취소</a></li>
|
||||||
|
|
@ -144,6 +152,7 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@Html.Partial("./Partial/ScriptDate")
|
||||||
}
|
}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var model = {};
|
var model = {};
|
||||||
|
|
@ -160,10 +169,10 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("input[name='iscashrct']").on("change", function () {
|
$("input[name='iscashrct']").on("change", function () {
|
||||||
if ($(this).val() == 1) {
|
if ($(this).val() == 2) {
|
||||||
$(".cashnot").removeClass("hide");
|
$("#taxinvoice_option").show();
|
||||||
} else {
|
} else {
|
||||||
$(".cashnot").addClass("hide");
|
$("#taxinvoice_option").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#btnback").on("click", function () {
|
$("#btnback").on("click", function () {
|
||||||
|
|
@ -192,7 +201,9 @@
|
||||||
msg("현금영수증 / 계산서 발행여부를 선택해주세요.");
|
msg("현금영수증 / 계산서 발행여부를 선택해주세요.");
|
||||||
} else if ($("#isbill").val() == 1 && !isCompanyInfo) {
|
} else if ($("#isbill").val() == 1 && !isCompanyInfo) {
|
||||||
msg("계산서 발급 시 회사정보가 필요합니다. 뒤로가기를 클릭하여 회사정보를 입력해주세요.");
|
msg("계산서 발급 시 회사정보가 필요합니다. 뒤로가기를 클릭하여 회사정보를 입력해주세요.");
|
||||||
} else {
|
} else if ($("#isbill").val() == 1 && $("#taxdatereq").val() == "") {
|
||||||
|
msg("발행요청일을 입력해주세요.");
|
||||||
|
}else {
|
||||||
cap("/fcommon/paystart", "mform", "cbsave");
|
cap("/fcommon/paystart", "mform", "cbsave");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
{
|
{
|
||||||
if (item.taxno > 0) /*세금계산서신청*/
|
if (item.taxno > 0) /*세금계산서신청*/
|
||||||
{
|
{
|
||||||
if (item.iscancel != 1 && item.taxdate2 != null && !string.IsNullOrEmpty(item.mgtkey)) /*취소 and 발행일 and 세금계산서문서번호 */
|
if (item.iscancel != 1 && item.taxdate2 != null && !string.IsNullOrEmpty(item.mgtkey) && item.statecode >= 300) /*취소 and 발행일 and 세금계산서문서번호 */
|
||||||
{
|
{
|
||||||
<a href="#" onclick="viewtaxinvoice('@(item.payno)')">[인쇄]</a>
|
<a href="#" onclick="viewtaxinvoice('@(item.payno)')">[인쇄]</a>
|
||||||
}
|
}
|
||||||
|
|
@ -239,6 +239,10 @@ else
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="pd5">
|
||||||
|
<th>발행요청일</th>
|
||||||
|
<td><input type="text" name="taxdatereq" id="taxdatereq" data-date-format="yyyy-mm-dd" class="datepicker-input" value="" autocomplete="off" /></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h4 class="bskTitle">발행업체 정보</h4>
|
<h4 class="bskTitle">발행업체 정보</h4>
|
||||||
<table class="odrTable th150">
|
<table class="odrTable th150">
|
||||||
|
|
@ -329,7 +333,7 @@ else
|
||||||
<th>사업자등록번호</th>
|
<th>사업자등록번호</th>
|
||||||
<td><input type="text" name="tbrno" id="tbrno" disabled value="" maxlength="12" /></td>
|
<td><input type="text" name="tbrno" id="tbrno" disabled value="" maxlength="12" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="pd5">
|
<tr class="pd5" style="display:none;">
|
||||||
<th>법인등록번호</th>
|
<th>법인등록번호</th>
|
||||||
<td><input type="text" name="tgrno" id="tgrno" disabled value="" maxlength="14" /></td>
|
<td><input type="text" name="tgrno" id="tgrno" disabled value="" maxlength="14" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -374,6 +378,10 @@ else
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="pd5">
|
||||||
|
<th>발행요청일</th>
|
||||||
|
<td><input type="text" name="ttaxdatereq" id="ttaxdatereq" disabled value="" /></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div><!-- clsPopCont -->
|
</div><!-- clsPopCont -->
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -402,6 +410,8 @@ else
|
||||||
}
|
}
|
||||||
@section scripts{
|
@section scripts{
|
||||||
@Html.Partial("./Partial/ScriptPost")
|
@Html.Partial("./Partial/ScriptPost")
|
||||||
|
@Html.Partial("./Partial/ScriptDate")
|
||||||
|
<script src="~/js/moment.js"></script>
|
||||||
<script>
|
<script>
|
||||||
function certification(lectno) {
|
function certification(lectno) {
|
||||||
var pop = window.open('@ViewBag.reporturl/certification.aspx?lectno='+lectno, "certprint", "width=" + (screen.availWidth) + ", height=" + (screen.availHeight) + ", scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0");
|
var pop = window.open('@ViewBag.reporturl/certification.aspx?lectno='+lectno, "certprint", "width=" + (screen.availWidth) + ", height=" + (screen.availHeight) + ", scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0");
|
||||||
|
|
@ -497,7 +507,10 @@ else
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function save() {
|
function save() {
|
||||||
if (check("asname", null, "회사명을 입력해주세요.")) { }
|
if (val("taxdatereq") == "") {
|
||||||
|
msg("발행요청일을 입력해주세요.");
|
||||||
|
}
|
||||||
|
else if (check("asname", null, "회사명을 입력해주세요.")) { }
|
||||||
else if (check("ceoname", null, "대표자명을 입력해주세요.")) { }
|
else if (check("ceoname", null, "대표자명을 입력해주세요.")) { }
|
||||||
else if (check("brno", null, "사업자등록번호를 입력해주세요.")) { }
|
else if (check("brno", null, "사업자등록번호를 입력해주세요.")) { }
|
||||||
//else if (check("grno", null, "법인등록번호를 입력해주세요.")) { }
|
//else if (check("grno", null, "법인등록번호를 입력해주세요.")) { }
|
||||||
|
|
@ -570,6 +583,7 @@ else
|
||||||
$("#tfile").html(file);
|
$("#tfile").html(file);
|
||||||
}
|
}
|
||||||
$("input:radio[name='tisreceipt']:radio[value='" + paytax.isreceipt + "']").prop('checked', true);
|
$("input:radio[name='tisreceipt']:radio[value='" + paytax.isreceipt + "']").prop('checked', true);
|
||||||
|
$("#ttaxdatereq").val(moment(paytax.taxdatereq).isValid() ? moment(paytax.taxdatereq).format('YYYY-MM-DD') : "");
|
||||||
$("#pop2").fadeIn("fast", function () {
|
$("#pop2").fadeIn("fast", function () {
|
||||||
$(".pop2box").scrollTop(0);
|
$(".pop2box").scrollTop(0);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1213,6 +1213,10 @@ namespace NP.Model
|
||||||
/// 현금영수증 발급 TID 가상계좌 채번시 현금영수증자동발급 설정을 한 거래건에한해 전달
|
/// 현금영수증 발급 TID 가상계좌 채번시 현금영수증자동발급 설정을 한 거래건에한해 전달
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public String cshrpgkey { get; set; }
|
public String cshrpgkey { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 세금계산서 상태코드
|
||||||
|
/// </summary>
|
||||||
|
public int statecode { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 자격검정시험
|
/// 자격검정시험
|
||||||
|
|
|
||||||
|
|
@ -63,5 +63,13 @@ namespace NP.Model
|
||||||
/// 계산서발행여부 - 0:미발행,1:발행
|
/// 계산서발행여부 - 0:미발행,1:발행
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int isbill { get; set; }
|
public int isbill { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 영수,청구구분 0:청구, 1:영수
|
||||||
|
/// </summary>
|
||||||
|
public int isreceipt { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 발행요청일
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? taxdatereq { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
60
Model/Pay.cs
60
Model/Pay.cs
|
|
@ -1005,6 +1005,66 @@ namespace NP.Model
|
||||||
/// 사업장상세주소
|
/// 사업장상세주소
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public String address2 { get; set; }
|
public String address2 { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 발행요청일
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? taxdatereq { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 세금계산서 상태코드
|
||||||
|
/// </summary>
|
||||||
|
public int statecode { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 세금계산서 발행상태
|
||||||
|
/// </summary>
|
||||||
|
public string status
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string returnString = "미발행";
|
||||||
|
if (iscancel == 1)
|
||||||
|
{
|
||||||
|
returnString = "발행취소";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (statecode)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
returnString = "미발행";
|
||||||
|
break;
|
||||||
|
case 100:
|
||||||
|
returnString = "미발행"; //"임시저장";
|
||||||
|
break;
|
||||||
|
case 300:
|
||||||
|
returnString = "발행완료";
|
||||||
|
break;
|
||||||
|
case 301:
|
||||||
|
returnString = "발행완료"; //"국세청-전송전";
|
||||||
|
break;
|
||||||
|
case 302:
|
||||||
|
returnString = "발행완료"; //"국세청-전송대기";
|
||||||
|
break;
|
||||||
|
case 303:
|
||||||
|
returnString = "발행완료"; //"국세청-전송중";
|
||||||
|
break;
|
||||||
|
case 304:
|
||||||
|
returnString = "발행완료"; //"국세청-전송성공";
|
||||||
|
break;
|
||||||
|
case 305:
|
||||||
|
returnString = "발행완료"; //"국세청-전송실패";
|
||||||
|
break;
|
||||||
|
case 600:
|
||||||
|
returnString = "발행취소";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
returnString = $"stateCode:{statecode}";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnString;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class PayRfd : BaseModel
|
public class PayRfd : BaseModel
|
||||||
|
|
|
||||||
|
|
@ -62,5 +62,13 @@ namespace NP.Model
|
||||||
public int isbill { get; set; }
|
public int isbill { get; set; }
|
||||||
public System.Collections.Hashtable payParams { get; set; }
|
public System.Collections.Hashtable payParams { get; set; }
|
||||||
public CM CM { get; set; }
|
public CM CM { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 영수,청구구분 0:청구, 1:영수
|
||||||
|
/// </summary>
|
||||||
|
public int isreceipt { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 발행요청일
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? taxdatereq { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue