|
@@ -461,6 +461,7 @@ func (this *Invoice) ShowinvoiceList() {
|
|
|
continue
|
|
|
}
|
|
|
delete(data, "user_id")
|
|
|
+ data["id"] = encrypt.SE.Encode2Hex(qutil.InterfaceToStr(data["id"]))
|
|
|
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
|
|
@@ -524,7 +525,10 @@ func (this *Invoice) NewInvoiceShow() {
|
|
|
case "1": //订单回显金额
|
|
|
data["pay_money"] = ResidueMoney(code)
|
|
|
case "2": //发票信息回显
|
|
|
- invoice := util.Mysql.FindOne("invoice", map[string]interface{}{"id": code}, "id,only_Identifying,order_code,invoice_money,invoice_type,invoice_content,invoice_variety,company_name,phone,mail,taxpayer_identnum,invoice_money,invoice_order_money,company_address,bank_name,recipient,delivery_address,bank_account,company_phone", "")
|
|
|
+ invoice := util.Mysql.FindOne("invoice", map[string]interface{}{"id": encrypt.SE.Decode4Hex(code)}, "id,only_Identifying,order_code,invoice_money,invoice_type,invoice_content,invoice_variety,company_name,phone,mail,taxpayer_identnum,invoice_money,invoice_order_money,company_address,bank_name,recipient,delivery_address,bank_account,company_phone", "")
|
|
|
+ if invoice != nil {
|
|
|
+ (*invoice)["id"] = code
|
|
|
+ }
|
|
|
data["invoice"] = invoice
|
|
|
}
|
|
|
this.ServeJson(map[string]interface{}{
|
|
@@ -1113,7 +1117,7 @@ func (this *Invoice) NewReplaceinvoice() {
|
|
|
invoice_status := 0
|
|
|
//userId := qutil.ObjToString(this.GetSession("userId")) 支持扫描换票
|
|
|
//order_code := this.GetString("order_code")
|
|
|
- sid := this.GetString("sid")
|
|
|
+ sid := encrypt.SE.Decode4Hex(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.InvoiceConfig.SigningSubject) {
|