parent
49a70b5b6b
commit
f03906a349
|
|
@ -129,7 +129,7 @@
|
||||||
<div class="line line-dashed line-lg pull-in"></div>
|
<div class="line line-dashed line-lg pull-in"></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 col-md-2 control-label">결제방법</label>
|
<label class="col-sm-4 col-md-2 control-label">결제방법</label>
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "6:무료;1:신용카드;3:무통장입금(가상계좌);4:현금" }, { "checked", 6 }, { "name", "ptype" } })</div>
|
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "6:무료;1:신용카드;3:무통장입금(가상계좌);4:현금;0:결제대기" }, { "checked", 6 }, { "name", "ptype" } })</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="line line-dashed line-lg pull-in"></div>
|
<div class="line line-dashed line-lg pull-in"></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -324,6 +324,14 @@
|
||||||
$(a).closest("li").remove();
|
$(a).closest("li").remove();
|
||||||
}
|
}
|
||||||
function save() {
|
function save() {
|
||||||
|
var ta = 0;
|
||||||
|
var tcash = 0;
|
||||||
|
var tcard = 0;
|
||||||
|
$.each($("#layertable tbody tr"), function (i, r) {
|
||||||
|
ta += getint($(r).find("td.payamt input").val());
|
||||||
|
tcash += getint($(r).find("td.payamtcash input").val());
|
||||||
|
tcard += getint($(r).find("td.payamtcard input").val());
|
||||||
|
});
|
||||||
var isrebate = $("input:radio[name='isrebate']:checked").val() == "1" ? true : false;
|
var isrebate = $("input:radio[name='isrebate']:checked").val() == "1" ? true : false;
|
||||||
var iscompany= $("input:radio[name='iscompany']:checked").val() == "1" ? true : false;
|
var iscompany= $("input:radio[name='iscompany']:checked").val() == "1" ? true : false;
|
||||||
if (check("cmno", null, "강좌ID를 선택해주세요.")) { }
|
if (check("cmno", null, "강좌ID를 선택해주세요.")) { }
|
||||||
|
|
@ -337,7 +345,7 @@
|
||||||
else if (isrebate && check("rbankowner", null, "예금주를 등록해주세요.")) { }
|
else if (isrebate && check("rbankowner", null, "예금주를 등록해주세요.")) { }
|
||||||
else if (check("userno", null, "신청자ID를 선택해주세요.")) { }
|
else if (check("userno", null, "신청자ID를 선택해주세요.")) { }
|
||||||
else if (iscompany && check("asno", null, "회사정보를 선택해주세요.")) { }
|
else if (iscompany && check("asno", null, "회사정보를 선택해주세요.")) { }
|
||||||
else if (getrv("ptype") != "6" && val("payamt") < 1) { msg("결제금액을 입력해주세요."); }
|
else if (getrv("ptype") != "6" && getrv("ptype") != "0" && ta < 1) { msg("결제금액을 입력해주세요."); }
|
||||||
else if (confirm("교육생을 등록하시겠습니까?")) {
|
else if (confirm("교육생을 등록하시겠습니까?")) {
|
||||||
var pplog = {};
|
var pplog = {};
|
||||||
pplog.cmno = val("cmno");
|
pplog.cmno = val("cmno");
|
||||||
|
|
|
||||||
|
|
@ -240,9 +240,11 @@ namespace NP.Base.Controllers
|
||||||
isinmoney = 1,
|
isinmoney = 1,
|
||||||
payamt = payitems.Sum(s => s.payamt),
|
payamt = payitems.Sum(s => s.payamt),
|
||||||
PIs = payitems,
|
PIs = payitems,
|
||||||
|
cmno = Convert.ToInt32(payitems.First().itemno),
|
||||||
cmnos = string.Join(",", payitems.Select(s => s.itemno)),
|
cmnos = string.Join(",", payitems.Select(s => s.itemno)),
|
||||||
iscashrct = 0,
|
iscashrct = 0,
|
||||||
pplno = pplog.pplno,
|
pplno = pplog.pplno,
|
||||||
|
cmisno = pplog.cmisno,
|
||||||
uno = SUserInfo.UserNo,
|
uno = SUserInfo.UserNo,
|
||||||
uip = GetUserIP()
|
uip = GetUserIP()
|
||||||
};
|
};
|
||||||
|
|
@ -258,6 +260,23 @@ namespace NP.Base.Controllers
|
||||||
{
|
{
|
||||||
return JsonOK(-4);
|
return JsonOK(-4);
|
||||||
}
|
}
|
||||||
|
if(pay.ptype == 0)
|
||||||
|
{
|
||||||
|
Dao.Insert("pay.standbypay.admin", pay);
|
||||||
|
int bcnt = 0;
|
||||||
|
if (pay.payno > 0)
|
||||||
|
{
|
||||||
|
foreach (var d in pay.PIs)
|
||||||
|
{
|
||||||
|
bcnt++;
|
||||||
|
d.payno = pay.payno;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Dao.Save("pay.standbypayitem.admin", pay) == bcnt + 1)
|
||||||
|
{
|
||||||
|
return JsonOK(pay.payno);
|
||||||
|
}
|
||||||
|
}
|
||||||
return JsonOK(Dao.SavePay(pay, true, true));
|
return JsonOK(Dao.SavePay(pay, true, true));
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -335,12 +335,44 @@
|
||||||
update pay a
|
update pay a
|
||||||
inner join users b on b.userno=a.userno
|
inner join users b on b.userno=a.userno
|
||||||
set a.ptype=#ptype#,a.paylimit=#paylimit#,a.orgamt=#orgamt#,a.payamt=#payamt#,a.isbill=#isbill#
|
set a.ptype=#ptype#,a.paylimit=#paylimit#,a.orgamt=#orgamt#,a.payamt=#payamt#,a.isbill=#isbill#
|
||||||
|
,a.pstatus = case when #ptype# = 6 then 1 else a.pstatus end
|
||||||
|
,a.payoktime = case when #ptype# = 6 then now() else a.payoktime end
|
||||||
where a.payno=#payno# and a.userno=#userno# and a.pstatus=21;
|
where a.payno=#payno# and a.userno=#userno# and a.pstatus=21;
|
||||||
|
|
||||||
update payitem a
|
update payitem a
|
||||||
inner join users b on b.userno=a.userno
|
inner join users b on b.userno=a.userno
|
||||||
set a.orgamt=#orgamt#,a.payamt=#payamt#
|
set a.orgamt=#orgamt#,a.payamt=#payamt#
|
||||||
|
,a.pstatus = case when #ptype# = 6 then 1 else a.pstatus end
|
||||||
|
,a.rstatus = 0
|
||||||
where a.payno=#payno# and a.userno=#userno# and a.pstatus=21;
|
where a.payno=#payno# and a.userno=#userno# and a.pstatus=21;
|
||||||
|
|
||||||
|
update lect a
|
||||||
|
inner join users b on b.userno = a.userno
|
||||||
|
set a.status = case when #ptype# = 6 then 1 else a.status end
|
||||||
|
where a.payno=#payno# and a.userno = #userno#;
|
||||||
|
|
||||||
|
update lect a
|
||||||
|
inner join cm b on a.cmno = b.cmno
|
||||||
|
inner join pay c on a.payno = c.payno
|
||||||
|
left outer join cminningscd d on d.cmisno = a.cmisno
|
||||||
|
set
|
||||||
|
a.sdate = case when b.cshape <> 1 then date_format(a.cdt,'%Y-%m-%d 00:00:00')
|
||||||
|
else
|
||||||
|
case when date_format(b.retime,'%Y-%m-%d')='2099-12-31' then date_format(c.payoktime,'%Y-%m-%d 00:00:00')
|
||||||
|
else b.sstime end
|
||||||
|
end,
|
||||||
|
a.edate = case when b.cshape <> 1 then
|
||||||
|
case when d.eend is not null then date_format(d.eend,'%Y-%m-%d 23:59:59')
|
||||||
|
else
|
||||||
|
case when date_format(b.retime,'%Y-%m-%d')='2099-12-31' then date_format(date_add(c.payoktime,interval b.studydays day),'%Y-%m-%d 23:59:59')
|
||||||
|
else b.setime end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
case when date_format(b.retime,'%Y-%m-%d')='2099-12-31' then date_format(date_add(c.payoktime,interval b.studydays day),'%Y-%m-%d 23:59:59')
|
||||||
|
else b.setime
|
||||||
|
end
|
||||||
|
end
|
||||||
|
where a.payno = #payno# and c.pstatus = 1 and c.payoktime is not null;
|
||||||
</update>
|
</update>
|
||||||
<select id="pay.pay" parameterClass="hashtable" resultClass="pay">
|
<select id="pay.pay" parameterClass="hashtable" resultClass="pay">
|
||||||
select a.payno,a.ptype,a.isgroup,a.isexam,a.userno,a.pstatus,a.payamt,a.rstatus,a.refundamt,a.ispg,a.paylimit
|
select a.payno,a.ptype,a.isgroup,a.isexam,a.userno,a.pstatus,a.payamt,a.rstatus,a.refundamt,a.ispg,a.paylimit
|
||||||
|
|
@ -1106,6 +1138,24 @@
|
||||||
set iscashrct = null
|
set iscashrct = null
|
||||||
where payno = #payno#;
|
where payno = #payno#;
|
||||||
</update>
|
</update>
|
||||||
|
<!--관리자 결제대기 생성 :: 대기강좌신청 승인완료 상태 처럼-->
|
||||||
|
<insert id="pay.standbypay.admin" parameterClass="hashtable">
|
||||||
|
insert into pay(ptype,ispg,isgroup,userno,username,isexam,pstatus,rstatus,refunding,orgamt,discamt,deliamt,isrefunddvr,payamt,refundamt,pplno,isbill,iscashrct,<include refid="sql.inc"></include>)
|
||||||
|
values (#ptype#,0,0,#userno#,#username#,0,21,0,0,0,0,0,0,0,0,#pplno#,0,0,<include refid="sql.inv"></include>);
|
||||||
|
<selectKey type="post" property="payno" resultClass="long">SELECT LAST_INSERT_ID()</selectKey>
|
||||||
|
</insert>
|
||||||
|
<update id="pay.standbypayitem.admin" parameterClass="hashtable">
|
||||||
|
insert into payitem (payno,ptype,itemno,userno,pstatus,rstatus,pcnt
|
||||||
|
,orgamt,discamt,payamt,payamtcash,payamtcard,refundamt,isrebate,<include refid="sql.inc"></include>)
|
||||||
|
values(#payno#,0,#cmno#,#userno#,21,0,1
|
||||||
|
,0,0,0,0,0,0,#isrebate#,<include refid="sql.inv"></include>);
|
||||||
|
|
||||||
|
insert into lect(cmno,payno,pino,userno,status,attrate,isrebate,ispc,isjoin,ischanged,isready,cmisno,<include refid="sql.inc"></include>)
|
||||||
|
select #cmno#,#payno#,LAST_INSERT_ID(),a.userno,4,0,#isrebate#,0,ifnull(b.isjoin,0),0,1,#cmisno#,<include refid="sql.inv"></include>
|
||||||
|
from users a
|
||||||
|
left outer join assign b on b.asno=a.asno
|
||||||
|
where a.userno=#userno#;
|
||||||
|
</update>
|
||||||
</statements>
|
</statements>
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@ namespace NP.Model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Int64? pplno { get; set; }
|
public Int64? pplno { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 교육일정번호
|
||||||
|
/// </summary>
|
||||||
|
public Int64? cmisno { get; set; }
|
||||||
|
/// <summary>
|
||||||
/// 결제방식 1:신용카드,2:계좌이체,3:가상계좌,4:현금,5:현금+카드,6:무료,7:대기신청,9:위탁계약
|
/// 결제방식 1:신용카드,2:계좌이체,3:가상계좌,4:현금,5:현금+카드,6:무료,7:대기신청,9:위탁계약
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ptype { get; set; }
|
public int ptype { get; set; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue