@ -1826,13 +1826,8 @@ namespace DSWeb.Areas.Account.Controllers
if ( head . INVITERFACE = = "诺诺全电发票" )
{
//redhead仅用于向诺诺全电红字申请单接口发送用
//redhead = AutoMapperHelper.MapTo<ChInvoice_HangXin, ChInvoice_HangXin>(head);
redhead . GID = System . Guid . NewGuid ( ) . ToString ( ) ;
redhead . BILLNO = PubSysDAL . GetBillNo ( "0308" ) ;
//redhead.BILLNO = PubSysDAL.GetBillNo("0308");
redhead . PTORRED = "2" ; // 开票类型 红票
redhead . redReason = redReason ;
@ -1854,10 +1849,8 @@ namespace DSWeb.Areas.Account.Controllers
redhead . REMARK = REDREMARK_Quandian ( redhead ) ;
//红字申请单申请编号 即为发票业务编号 到时候红票的订单编号也是这个
/ /
//head.billUuid = redhead.BILLNO;
}
}
var modb = new ModelObjectDB ( ) ;
@ -1949,9 +1942,12 @@ namespace DSWeb.Areas.Account.Controllers
//如非成功和15 则返回错误 并清空billuuid;
//2 如果ch_fee_invoice.billuuid无值 则重新产生值并发出红字确认单
//此时head.billUuid如果不为空 代表 是第一次冲红
//此时head.billUuid如果不为空 代表 已有红字申请单
if ( ! string . IsNullOrWhiteSpace ( head . billUuid ) ) //&&
{
redhead . BILLNO = redhead . billUuid ;
var _r = hx . ReadRedConfirm ( ref redhead , detailList ) ;
if ( ! _r . Success )
@ -1960,6 +1956,8 @@ namespace DSWeb.Areas.Account.Controllers
}
else
{
//var hx = 诺诺全电发票.getHelper(head.TAXCODE);
if ( ! hx . CanUse )
{
@ -1973,7 +1971,7 @@ namespace DSWeb.Areas.Account.Controllers
// var _r = TokenPage();
// return _r;
//}
result = hx . ReadInvoice ( head) ;
result = hx . ReadInvoice ( red head) ;
if ( ! result . Success )
{
@ -1990,9 +1988,9 @@ namespace DSWeb.Areas.Account.Controllers
returndate = ChinvoiceDAL . GetData ( " BILLNO='" + head . BILLNO + "'" ) ;
if ( head. PTORRED = = "2" )
if ( red head. PTORRED = = "2" )
{
ChinvoiceDAL . SetRed ( head) ;
ChinvoiceDAL . SetRed ( red head) ;
//将原票内的申请和费用恢复原状
//var BlueInvoice = ChinvoiceDAL.GetData(" cm.INVOICECODE='" + head.REDCODE + "' and cm.INVOICENO='" + head.REDNUM + "'");
@ -2023,7 +2021,13 @@ namespace DSWeb.Areas.Account.Controllers
}
else
{
//head.billUuid如果不为空 代表还没发红字申请单
//获取红票信息并发出
redhead . BILLNO = PubSysDAL . GetBillNo ( "0308" ) ;
head . billUuid = redhead . BILLNO ;
result = hx . PostRedConfirm ( redhead , ref head , detailList ) ;
}
//诺诺全电票根据红字申请单的结果读取确认单