|
@@ -481,7 +481,7 @@ func (this *Invoice) ShowinvoiceList() {
|
|
isReopen = util.Mysql.Count("invoice_fail_record", map[string]interface{}{
|
|
isReopen = util.Mysql.Count("invoice_fail_record", map[string]interface{}{
|
|
"only_Identifying": data["only_Identifying"],
|
|
"only_Identifying": data["only_Identifying"],
|
|
"order_code": order_code,
|
|
"order_code": order_code,
|
|
- }) >= config.InvoiceConfig.SubmitNum
|
|
|
|
|
|
+ })+1 >= config.InvoiceConfig.SubmitNum
|
|
}
|
|
}
|
|
data["only_Identifying"] = encrypt.SE.EncodeString(qutil.InterfaceToStr(data["only_Identifying"]))
|
|
data["only_Identifying"] = encrypt.SE.EncodeString(qutil.InterfaceToStr(data["only_Identifying"]))
|
|
data["isReopen"] = isReopen
|
|
data["isReopen"] = isReopen
|
|
@@ -1349,6 +1349,15 @@ func (this *Invoice) Invoiceinfo() {
|
|
}
|
|
}
|
|
delete((*status), "d_relation_id")
|
|
delete((*status), "d_relation_id")
|
|
(*status)["countdown"] = countdowntime
|
|
(*status)["countdown"] = countdowntime
|
|
|
|
+ var isCanInvoic bool
|
|
|
|
+ create_time, _ := time.ParseInLocation(Date_Full_Layout, qutil.ObjToString((*status)["create_time"]), time.Local)
|
|
|
|
+ if create_time.Unix() > config.InvoiceConfig.Order_createtime {
|
|
|
|
+ //剩余可开票金额
|
|
|
|
+ isCanInvoic = IsAllowInvoice(*status)
|
|
|
|
+ }
|
|
|
|
+ (*status)["is_can_invoice"] = isCanInvoic
|
|
|
|
+ //是否存在可查看发票
|
|
|
|
+ (*status)["invoice_show"] = len(ShowList(order_code)) > 0
|
|
this.ServeJson(map[string]interface{}{
|
|
this.ServeJson(map[string]interface{}{
|
|
"status": "success",
|
|
"status": "success",
|
|
"data": status,
|
|
"data": status,
|
|
@@ -1389,6 +1398,9 @@ func LastInvoiceSource(orderCode string) int64 {
|
|
|
|
|
|
// 是否可开票
|
|
// 是否可开票
|
|
func IsAllowInvoice(res map[string]interface{}) bool {
|
|
func IsAllowInvoice(res map[string]interface{}) bool {
|
|
|
|
+ if qutil.IntAll(res["applybill_status"]) > 0 {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
filter := qutil.ObjToString(res["filter"].(string))
|
|
filter := qutil.ObjToString(res["filter"].(string))
|
|
filter_map := map[string]interface{}{}
|
|
filter_map := map[string]interface{}{}
|
|
_ = json.Unmarshal([]byte(filter), &filter_map)
|
|
_ = json.Unmarshal([]byte(filter), &filter_map)
|
|
@@ -1764,12 +1776,14 @@ func (this *Invoice) InvoiceQuery() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
this.ServeJson(NewResult(map[string]interface{}{
|
|
this.ServeJson(NewResult(map[string]interface{}{
|
|
"orderCodes": strings.Join(orderArr, ","),
|
|
"orderCodes": strings.Join(orderArr, ","),
|
|
"money": money,
|
|
"money": money,
|
|
"invoice": &invoiceOne,
|
|
"invoice": &invoiceOne,
|
|
"operator": operator,
|
|
"operator": operator,
|
|
"company_name": companyName,
|
|
"company_name": companyName,
|
|
|
|
+ "isFollowWx": 1,
|
|
}, nil))
|
|
}, nil))
|
|
}
|
|
}
|
|
|
|
|