|
@@ -461,9 +461,10 @@ func (this *Invoice) ShowinvoiceList() {
|
|
|
continue
|
|
|
}
|
|
|
delete(data, "user_id")
|
|
|
- isJyInvoice := !strings.Contains(qutil.InterfaceToStr(data["url"]), "/jyInvoice/") //非数电票
|
|
|
- isJyEntity := data["invoicing_entity"] != nil && qutil.InterfaceToStr(data["invoicing_entity"]) != config.Config.SigningSubject
|
|
|
- data["changed"] = qutil.If(isJyInvoice || isChanged || isJyEntity, true, false)
|
|
|
+ timeLimit := qutil.Int64All(data["create_time"]) <= config.InvoiceConfig.Order_createtime //24年之前的发票不让换票
|
|
|
+ isJyInvoice := !strings.Contains(qutil.InterfaceToStr(data["url"]), "/jyInvoice/") //非数电票
|
|
|
+ isJyEntity := data["invoicing_entity"] != nil && qutil.InterfaceToStr(data["invoicing_entity"]) != config.InvoiceConfig.SigningSubject
|
|
|
+ data["changed"] = qutil.If(isJyInvoice || isChanged || isJyEntity || timeLimit, true, false)
|
|
|
if url := qutil.InterfaceToStr(data["url"]); url != "" {
|
|
|
//ios 移动端
|
|
|
if isIos {
|
|
@@ -473,12 +474,13 @@ func (this *Invoice) ShowinvoiceList() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- var isReopen bool
|
|
|
- if data["invoice_status"] == -1 {
|
|
|
+ isReopen := timeLimit
|
|
|
+ //var isReopen bool
|
|
|
+ if data["invoice_status"] == -1 && !isReopen {
|
|
|
isReopen = util.Mysql.Count("invoice_fail_record", map[string]interface{}{
|
|
|
"only_Identifying": data["only_Identifying"],
|
|
|
"order_code": order_code,
|
|
|
- })+1 >= config.Config.SubmitNum
|
|
|
+ })+1 >= config.InvoiceConfig.SubmitNum
|
|
|
}
|
|
|
data["isReopen"] = isReopen
|
|
|
invoiceData = append(invoiceData, data)
|
|
@@ -1114,7 +1116,7 @@ func (this *Invoice) NewReplaceinvoice() {
|
|
|
sid := this.GetString("sid")
|
|
|
oRes := util.Mysql.FindOne(dbname, map[string]interface{}{"id": sid, "invoie_changed": 0}, "", "") //仅线上开发票可换票
|
|
|
if oRes != nil && len(*oRes) > 0 &&
|
|
|
- ((*oRes)["invoicing_entity"] == nil || qutil.InterfaceToStr((*oRes)["invoicing_entity"]) == config.Config.SigningSubject) {
|
|
|
+ ((*oRes)["invoicing_entity"] == nil || qutil.InterfaceToStr((*oRes)["invoicing_entity"]) == config.InvoiceConfig.SigningSubject) {
|
|
|
var (
|
|
|
qSql string
|
|
|
errCode []string
|
|
@@ -1372,7 +1374,7 @@ func QmxInvoice(res map[string]interface{}) bool {
|
|
|
if res["is_backstage_order"] == 1 && res["order_channel"] != "xdqd04" {
|
|
|
if res["return_status"] == 1 && util.Mysql.Count("invoice", map[string]interface{}{
|
|
|
"order_code": res["order_code"],
|
|
|
- }) == 0 && res["signing_subject"] == config.Config.SigningSubject {
|
|
|
+ }) == 0 && res["signing_subject"] == config.InvoiceConfig.SigningSubject {
|
|
|
return true
|
|
|
}
|
|
|
}
|
|
@@ -1525,7 +1527,7 @@ func OpenInvoiceAgain(oldOnlyIdentifying string, data map[string]interface{}) er
|
|
|
if !ok {
|
|
|
return errors.New("插入失败记录出错")
|
|
|
}
|
|
|
- if util.Mysql.Count("invoice_fail_record", map[string]interface{}{"only_Identifying": oldOnlyIdentifying}) >= int64(config.Config.SubmitNum) {
|
|
|
+ if util.Mysql.Count("invoice_fail_record", map[string]interface{}{"only_Identifying": oldOnlyIdentifying}) >= config.InvoiceConfig.SubmitNum {
|
|
|
return errors.New("提交次数已达上限")
|
|
|
}
|
|
|
if !util.Mysql.Update("invoice", map[string]interface{}{"only_Identifying": oldOnlyIdentifying}, data) {
|
|
@@ -1719,7 +1721,7 @@ func (this *Invoice) InvoiceQuery() {
|
|
|
(*invoiceOne)["isReopen"] = util.Mysql.Count("invoice_fail_record", map[string]interface{}{
|
|
|
"only_Identifying": (*invoiceOne)["only_Identifying"],
|
|
|
"order_code": (*invoiceOne)["order_code"],
|
|
|
- })+1 >= config.Config.SubmitNum
|
|
|
+ })+1 >= config.InvoiceConfig.SubmitNum
|
|
|
}
|
|
|
}
|
|
|
this.ServeJson(NewResult(map[string]interface{}{
|