|
|
|
@ -1570,18 +1570,21 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public DBResult SetInvoiceFee(ChInvoice_HangXin BlueInvoice)
|
|
|
|
|
{
|
|
|
|
|
var result = new DBResult();
|
|
|
|
|
if (BlueInvoice.INVOICETYPE == 2)
|
|
|
|
|
{
|
|
|
|
|
//申请开票
|
|
|
|
|
var dataList = ChinvoiceapplicationDAL.GetDataListAll("INVBILLNO='" + BlueInvoice.BILLNO + "'", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"]));
|
|
|
|
|
result = ChinvoiceDAL.DelAppList(dataList, BlueInvoice.BILLNO);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var dataList = ChinvoiceDAL.GetBodyList("BILLNO='" + BlueInvoice.BILLNO + "'");
|
|
|
|
|
result = ChinvoiceDAL.DelFeeDo(dataList, BlueInvoice.GID);
|
|
|
|
|
}
|
|
|
|
|
//var result = new DBResult();
|
|
|
|
|
//if (BlueInvoice.INVOICETYPE == 2)
|
|
|
|
|
//{
|
|
|
|
|
// //申请开票
|
|
|
|
|
// var dataList = ChinvoiceapplicationDAL.GetDataListAll("INVBILLNO='" + BlueInvoice.BILLNO + "'", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"]));
|
|
|
|
|
// result = ChinvoiceDAL.DelAppList(dataList, BlueInvoice.BILLNO);
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// var dataList = ChinvoiceDAL.GetBodyList("BILLNO='" + BlueInvoice.BILLNO + "'");
|
|
|
|
|
// result = ChinvoiceDAL.DelFeeDo(dataList, BlueInvoice.GID);
|
|
|
|
|
//}
|
|
|
|
|
//return result;
|
|
|
|
|
|
|
|
|
|
var result = ChinvoiceDAL.SetInvoiceFee(BlueInvoice,Session);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2031,8 +2034,8 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
ChinvoiceDAL.SetRed(redhead);
|
|
|
|
|
|
|
|
|
|
//将原票内的申请和费用恢复原状
|
|
|
|
|
//var BlueInvoice = ChinvoiceDAL.GetData(" cm.INVOICECODE='" + head.REDCODE + "' and cm.INVOICENO='" + head.REDNUM + "'");
|
|
|
|
|
//result = SetInvoiceFee(BlueInvoice);
|
|
|
|
|
BlueInvoice = ChinvoiceDAL.GetData(" cm.INVOICECODE='" + redhead.REDCODE + "' and cm.INVOICENO='" + redhead.REDNUM + "'");
|
|
|
|
|
result = SetInvoiceFee(BlueInvoice);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//如果状态为开出成功 则执行锁定
|
|
|
|
@ -2066,7 +2069,7 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
head.billUuid = redhead.BILLNO;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result = hx.PostRedConfirm(redhead, ref head, detailList);
|
|
|
|
|
result = hx.PostRedConfirm(redhead, ref head, detailList,Session);
|
|
|
|
|
if (result.Success == false)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|