|
@@ -457,7 +457,7 @@ func (this *Invoice) ShowinvoiceList() {
|
|
|
for _, data := range invoices {
|
|
|
//是否换过票
|
|
|
isChanged := qutil.IntAll(data["isChanged"]) > 1
|
|
|
- if isChanged && data["invoice_changed"] == 0 { //换过票的 只展示换票后的数据
|
|
|
+ if isChanged && qutil.IntAll(data["invoice_changed"]) == 0 { //换过票的 只展示换票后的数据
|
|
|
continue
|
|
|
}
|
|
|
delete(data, "user_id")
|
|
@@ -483,6 +483,7 @@ func (this *Invoice) ShowinvoiceList() {
|
|
|
"order_code": order_code,
|
|
|
})+1 >= config.InvoiceConfig.SubmitNum
|
|
|
}
|
|
|
+ data["only_Identifying"] = encrypt.SE.EncodeString(qutil.InterfaceToStr(data["only_Identifying"]))
|
|
|
data["isReopen"] = isReopen
|
|
|
invoiceData = append(invoiceData, data)
|
|
|
}
|
|
@@ -525,9 +526,10 @@ func (this *Invoice) NewInvoiceShow() {
|
|
|
case "1": //订单回显金额
|
|
|
data["pay_money"] = ResidueMoney(code)
|
|
|
case "2": //发票信息回显
|
|
|
- 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", "")
|
|
|
+ invoice := util.Mysql.FindOne("invoice", map[string]interface{}{"id": encrypt.SE.Decode4Hex(code)}, "id,only_Identifying,order_code,invoice_money,remark,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
|
|
|
+ (*invoice)["only_Identifying"] = encrypt.SE.EncodeString(qutil.InterfaceToStr((*invoice)["only_Identifying"]))
|
|
|
}
|
|
|
data["invoice"] = invoice
|
|
|
}
|
|
@@ -1121,7 +1123,7 @@ func (this *Invoice) NewReplaceinvoice() {
|
|
|
//userId := qutil.ObjToString(this.GetSession("userId")) 支持扫描换票
|
|
|
//order_code := this.GetString("order_code")
|
|
|
sid := encrypt.SE.Decode4Hex(this.GetString("sid"))
|
|
|
- oRes := util.Mysql.FindOne(dbname, map[string]interface{}{"id": sid, "invoice_changed": 0}, "", "") //仅线上开发票可换票
|
|
|
+ oRes := util.Mysql.FindOne(dbname, map[string]interface{}{"id": sid, "invoice_changed": 0, "invoice_status": 1}, "", "") //仅线上开发票可换票
|
|
|
if oRes != nil && len(*oRes) > 0 &&
|
|
|
((*oRes)["invoicing_entity"] == nil || qutil.InterfaceToStr((*oRes)["invoicing_entity"]) == config.InvoiceConfig.SigningSubject) {
|
|
|
var (
|
|
@@ -1130,19 +1132,16 @@ func (this *Invoice) NewReplaceinvoice() {
|
|
|
//saveData []map[string]interface{}
|
|
|
resArr []map[string]interface{}
|
|
|
)
|
|
|
- if qutil.IntAll((*oRes)["invoice_status"]) == -2 {
|
|
|
- this.ServeJson(map[string]interface{}{
|
|
|
- "invoice_status": -2,
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+ pCode := qutil.InterfaceToStr((*oRes)["order_code"])
|
|
|
+ //多订单联合开票
|
|
|
if invoice_order_code := qutil.InterfaceToStr((*oRes)["invoice_order_code"]); len(strings.Split(invoice_order_code, ",")) > 1 {
|
|
|
- qSql = fmt.Sprintf(`SELECT * FROM invoice WHERE invoice_order_code = '%s' `, qutil.InterfaceToStr((*oRes)["invoice_order_code"]))
|
|
|
+ pCode = invoice_order_code
|
|
|
+ qSql = fmt.Sprintf(`SELECT * FROM invoice WHERE invoice_order_code = '%s' and invoice_changed = 0 and invoice_status = 1`, qutil.InterfaceToStr((*oRes)["invoice_order_code"]))
|
|
|
res1 := util.Mysql.SelectBySql(qSql)
|
|
|
if res1 != nil && len(*res1) > 0 {
|
|
|
resArr = *res1
|
|
|
}
|
|
|
- } else { //多订单联合开票
|
|
|
+ } else {
|
|
|
resArr = append(resArr, *oRes)
|
|
|
}
|
|
|
var isMail bool
|
|
@@ -1159,55 +1158,65 @@ func (this *Invoice) NewReplaceinvoice() {
|
|
|
}) > 1 {
|
|
|
continue
|
|
|
}
|
|
|
- res["phone"] = phone
|
|
|
- res["mail"] = e_mail
|
|
|
- res["invoice_content"] = invoiceContent
|
|
|
+
|
|
|
res["company_phone"] = this.GetString("company_phone")
|
|
|
- res["taxpayer_identnum"] = id_num
|
|
|
res["operable_time"] = FormatDate(&tm, Date_Full_Layout)
|
|
|
- res["remark"] = remark
|
|
|
- res["invoice_variety"] = invoiceVariety
|
|
|
res["bank_account"] = this.GetString("bank_account")
|
|
|
res["company_address"] = this.GetString("company_address")
|
|
|
res["bank_name"] = this.GetString("bank_name")
|
|
|
res["recipient"] = this.GetString("recipient")
|
|
|
res["delivery_address"] = this.GetString("delivery_address")
|
|
|
- res["company_name"] = company_name
|
|
|
- res["invoice_type"] = invoice_type
|
|
|
data := res
|
|
|
delete(data, "id")
|
|
|
switch IsEdit(res, phone, e_mail, id_num, company_name, invoice_type, invoiceContent, remark, invoiceVariety) {
|
|
|
case true:
|
|
|
- var html string
|
|
|
- if invoice_type == "个人" {
|
|
|
- emailHtml := emailHtml_gr
|
|
|
- emailHtmls := fmt.Sprintf(emailHtml, phone, e_mail)
|
|
|
- html = fmt.Sprintf(email_format, res["order_code"], res["url"], emailHtmls)
|
|
|
- } else {
|
|
|
- emailHtml := emailHtml_gs
|
|
|
- emailHtmls := fmt.Sprintf(emailHtml, company_name, id_num, phone, e_mail)
|
|
|
- html = fmt.Sprintf(email_format, res["order_code"], res["url"], emailHtmls)
|
|
|
- }
|
|
|
+ data["phone"] = phone
|
|
|
+ data["mail"] = e_mail
|
|
|
+ data["invoice_content"] = invoiceContent
|
|
|
+ data["company_name"] = company_name
|
|
|
+ data["invoice_type"] = invoice_type
|
|
|
+ data["taxpayer_identnum"] = id_num
|
|
|
+ data["remark"] = remark
|
|
|
+ data["invoice_variety"] = invoiceVariety
|
|
|
+ //var html string
|
|
|
+ //if invoice_type == "个人" {
|
|
|
+ // emailHtml := emailHtml_gr
|
|
|
+ // emailHtmls := fmt.Sprintf(emailHtml, phone, e_mail)
|
|
|
+ // html = fmt.Sprintf(email_format, data["order_code"], data["url"], emailHtmls)
|
|
|
+ //} else {
|
|
|
+ // emailHtml := emailHtml_gs
|
|
|
+ // emailHtmls := fmt.Sprintf(emailHtml, company_name, id_num, phone, e_mail)
|
|
|
+ // html = fmt.Sprintf(email_format, data["order_code"], data["url"], emailHtmls)
|
|
|
+ //}
|
|
|
data["invoice_changed"] = 1
|
|
|
data["invoice_status"] = 1
|
|
|
data["billing_time"] = tm.Unix()
|
|
|
data["create_time"] = tm.Unix()
|
|
|
order_id := util.Mysql.Insert(dbname, data)
|
|
|
if order_id == -1 {
|
|
|
- errCode = append(errCode, fmt.Sprintf("%s_%s", res["order_code"], res["invoice_order_code"]))
|
|
|
+ errCode = append(errCode, fmt.Sprintf("%s_%s", data["order_code"], data["invoice_order_code"]))
|
|
|
}
|
|
|
if !isMail { //成功发邮件
|
|
|
isMail = true
|
|
|
- InvoiceSendMail(res["mail"].(string), html, "电子发票")
|
|
|
+ sendMail(invoice_type, pCode, company_name, id_num, e_mail, phone, qutil.InterfaceToStr(data["url"]), invoiceContent)
|
|
|
+ //InvoiceSendMail(data["mail"].(string), html, "电子发票")
|
|
|
}
|
|
|
case false:
|
|
|
- if util.Mysql.Count(dbname, map[string]interface{}{
|
|
|
- "order_code": res["order_code"],
|
|
|
- "user_id": res["user_id"],
|
|
|
- "only_Identifying": res["only_Identifying"],
|
|
|
- }) > 1 {
|
|
|
- continue
|
|
|
+ if !config.InvoiceConfig.Third_party_switch {
|
|
|
+ this.ServeJson(map[string]interface{}{
|
|
|
+ "error_code": -2,
|
|
|
+ "error_msg": "暂不支持换票",
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
+ data["phone"] = phone
|
|
|
+ data["mail"] = e_mail
|
|
|
+ data["invoice_content"] = invoiceContent
|
|
|
+ data["company_name"] = company_name
|
|
|
+ data["invoice_type"] = invoice_type
|
|
|
+ data["taxpayer_identnum"] = id_num
|
|
|
+ data["remark"] = remark
|
|
|
+ data["invoice_variety"] = invoiceVariety
|
|
|
dataexport_data := make(map[string]interface{})
|
|
|
if invoice_type == "个人" {
|
|
|
dataexport_data["applyBill_type"] = 0
|
|
@@ -1230,20 +1239,20 @@ func (this *Invoice) NewReplaceinvoice() {
|
|
|
data["invoice_status"] = invoice_status
|
|
|
order_id := util.Mysql.Insert(dbname, data)
|
|
|
if order_id == -1 {
|
|
|
- errCode = append(errCode, fmt.Sprintf("%s_%s", res["order_code"], res["invoice_order_code"]))
|
|
|
+ errCode = append(errCode, fmt.Sprintf("%s_%s", data["order_code"], data["invoice_order_code"]))
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
log.Println("换票错误信息:", errCode)
|
|
|
- if !config.InvoiceConfig.Third_party_switch {
|
|
|
- this.ServeJson(map[string]interface{}{
|
|
|
- "invoice_status": invoice_status,
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+ this.ServeJson(map[string]interface{}{
|
|
|
+ "error_code": 0,
|
|
|
+ "error_msg": "",
|
|
|
+ })
|
|
|
+
|
|
|
} else {
|
|
|
this.ServeJson(map[string]interface{}{
|
|
|
- "invoice_status": -1,
|
|
|
+ "error_code": -1,
|
|
|
+ "error_msg": "订单状态异常",
|
|
|
})
|
|
|
return
|
|
|
}
|
|
@@ -1252,7 +1261,8 @@ func (this *Invoice) NewReplaceinvoice() {
|
|
|
|
|
|
func IsEdit(res map[string]interface{}, phone, e_mail, id_num, company_name, invoice_type, invoiceContent, remark, invoiceVariety string) bool {
|
|
|
if invoice_type == "个人" {
|
|
|
- if phone == res["phone"] && e_mail == res["mail"] && res["invoice_type"] == "个人" {
|
|
|
+ if phone == res["phone"] && e_mail == res["mail"] && res["invoice_type"] == "个人" &&
|
|
|
+ res["invoice_content"] == invoiceContent && res["remark"] == remark && res["invoice_variety"] == invoiceVariety {
|
|
|
return true
|
|
|
}
|
|
|
} else {
|
|
@@ -1382,13 +1392,14 @@ func IsAllowInvoice(res map[string]interface{}) bool {
|
|
|
filter := qutil.ObjToString(res["filter"].(string))
|
|
|
filter_map := map[string]interface{}{}
|
|
|
_ = json.Unmarshal([]byte(filter), &filter_map)
|
|
|
- if qutil.IntAll(res["order_status"]) == 1 && qutil.InterfaceToStr(filter_map["badge"]) != "exchange" &&
|
|
|
- //用户下单|| 代用户下单|| qmx下单 已全额回款 发票企业为剑鱼
|
|
|
- (qutil.IntAll(res["is_backstage_order"]) == 0 || qutil.InterfaceToStr(res["order_channel"]) == "xdqd04" ||
|
|
|
- (qutil.IntAll(res["return_status"]) == 1 && util.Mysql.Count("invoice", map[string]interface{}{
|
|
|
- "order_code": res["order_code"],
|
|
|
- }) == 0 && qutil.InterfaceToStr(res["signing_subject"]) == config.InvoiceConfig.SigningSubject)) {
|
|
|
- return true
|
|
|
+ if qutil.IntAll(res["order_status"]) == 1 && qutil.InterfaceToStr(filter_map["badge"]) != "exchange" {
|
|
|
+ //用户下单|| 代用户下单
|
|
|
+ if qutil.IntAll(res["is_backstage_order"]) == 0 || qutil.InterfaceToStr(res["order_channel"]) == "xdqd04" {
|
|
|
+ return len(ShowList(qutil.InterfaceToStr(res["order_code"]))) == 0
|
|
|
+ } else { //qmx下单 已全额回款 发票企业为剑鱼
|
|
|
+ return qutil.IntAll(res["return_status"]) == 1 && qutil.InterfaceToStr(res["signing_subject"]) == "h01" &&
|
|
|
+ len(ShowList(qutil.InterfaceToStr(res["order_code"]))) == 0
|
|
|
+ }
|
|
|
}
|
|
|
return false
|
|
|
}
|
|
@@ -1413,6 +1424,8 @@ func (this *Invoice) Available() {
|
|
|
status = 1
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ status = 1
|
|
|
}
|
|
|
}
|
|
|
this.ServeJson(map[string]interface{}{
|
|
@@ -1468,8 +1481,8 @@ func (this *Invoice) InvoiceSubmit() {
|
|
|
return
|
|
|
}
|
|
|
now := time.Now()
|
|
|
- again, _ := this.GetInteger("again") //是否是失败重新开票 0 首次提交 1 再此提交
|
|
|
- oldOnlyIdentifying := this.GetString("oldOnlyIdentifying") //最后一次失败的发票信息唯一标识
|
|
|
+ again, _ := this.GetInteger("again") //是否是失败重新开票 0 首次提交 1 再此提交
|
|
|
+ oldOnlyIdentifying := encrypt.SE.DecodeString(this.GetString("oldOnlyIdentifying")) //最后一次失败的发票信息唯一标识
|
|
|
data := map[string]interface{}{
|
|
|
"company_name": this.GetString("company_name"),
|
|
|
"phone": this.GetString("phone"),
|
|
@@ -1561,9 +1574,9 @@ func JyOpenInvoice(orderCode, userId string, data map[string]interface{}) error
|
|
|
if qutil.ObjToString((*orderInfo)["signing_subject"]) == "h02" {
|
|
|
return errors.New("签约主体为拓普")
|
|
|
}
|
|
|
- if qutil.IntAll((*orderInfo)["applybill_status"]) != 0 {
|
|
|
+ /*if qutil.IntAll((*orderInfo)["applybill_status"]) != 0 {
|
|
|
return errors.New("已提交发票信息")
|
|
|
- }
|
|
|
+ }*/
|
|
|
invoicedMoney := InvoiceAmount(orderCode) //已开票金额
|
|
|
invoiceMoney := qutil.Int64All((*orderInfo)["pay_money"]) - invoicedMoney
|
|
|
data["order_code"] = orderCode
|
|
@@ -1595,6 +1608,10 @@ func JyOpenInvoice(orderCode, userId string, data map[string]interface{}) error
|
|
|
}
|
|
|
|
|
|
func AdminOpenInvoice(onlyIdentifying, invoiceMoney, operator string, data map[string]interface{}) error {
|
|
|
+ //二维码
|
|
|
+ path := "/front/invoiceScan/qr"
|
|
|
+ urlStr := fmt.Sprintf("onlyIdentifying=%s&invoiceMoney=%s&operator=%s", encrypt.SE.EncodeString(onlyIdentifying), encrypt.SE.EncodeString(invoiceMoney), encrypt.SE.Encode2HexByCheck(operator))
|
|
|
+ fullUrl := path + "?" + urlStr
|
|
|
oldData := util.Mysql.FindOne("invoice", map[string]interface{}{
|
|
|
"only_Identifying": onlyIdentifying,
|
|
|
}, "id", "")
|
|
@@ -1642,6 +1659,7 @@ func AdminOpenInvoice(onlyIdentifying, invoiceMoney, operator string, data map[s
|
|
|
data["user_id"] = qutil.ObjToString((*orderInfo)["user_id"])
|
|
|
data["operator"] = operator
|
|
|
data["source"] = 1
|
|
|
+ data["code_url"] = fullUrl
|
|
|
if util.Mysql.Insert("invoice", data) <= 0 {
|
|
|
log.Println("扫码开票插入invoice表出错", orderCode)
|
|
|
return false
|
|
@@ -1674,6 +1692,7 @@ func InvoiceFailRecord(oldOnlyIdentifying string) bool {
|
|
|
ok := util.Mysql.ExecTx("插入开票失败记录表", func(tx *sql.Tx) bool {
|
|
|
for _, val := range *invoiceData {
|
|
|
delete(val, "id")
|
|
|
+ delete(val, "code_url")
|
|
|
if util.Mysql.InsertByTx(tx, "invoice_fail_record", val) <= 0 {
|
|
|
return false
|
|
|
}
|
|
@@ -1713,7 +1732,7 @@ func (this *Invoice) InvoiceQuery() {
|
|
|
}
|
|
|
invoiceOne := util.Mysql.FindOne("invoice", map[string]interface{}{
|
|
|
"only_Identifying": onlyIdentifying,
|
|
|
- }, "id,invoice_changed,order_code, bank_account, company_phone,company_name, phone, mail,company_phone, invoice_type, invoice_content, url, invoice_status, invoice_serialnum, taxpayer_identnum, operator, operable_time, invoicing_entity, remark, invoice_variety, logistics_code, company_address, bank_name, recipient, delivery_address", " create_time DESC")
|
|
|
+ }, "id,invoice_changed,order_code, bank_account,invoice_code, create_time,invoice_number,company_phone,company_name, phone, mail,company_phone, invoice_type, invoice_content, url, invoice_status, invoice_serialnum, taxpayer_identnum,operator, operable_time, invoicing_entity, remark, invoice_variety, logistics_code, company_address, bank_name, recipient, delivery_address,only_Identifying", " create_time DESC")
|
|
|
companyName := ""
|
|
|
if invoiceOne == nil {
|
|
|
//查询公司名称
|
|
@@ -1723,20 +1742,26 @@ func (this *Invoice) InvoiceQuery() {
|
|
|
companyName = qutil.ObjToString((*orderArr)[0]["company_name"])
|
|
|
}
|
|
|
} else {
|
|
|
+ (*invoiceOne)["id"] = encrypt.SE.Encode2Hex(qutil.InterfaceToStr((*invoiceOne)["id"]))
|
|
|
+ timeLimit := qutil.Int64All((*invoiceOne)["create_time"]) <= config.InvoiceConfig.Order_createtime //24年之前的发票不让换票
|
|
|
switch qutil.IntAll((*invoiceOne)["invoice_status"]) {
|
|
|
case 1:
|
|
|
- //是否换票
|
|
|
- isJyInvoice := !strings.Contains(qutil.InterfaceToStr((*invoiceOne)["url"]), "/jyInvoice/") //非数电票
|
|
|
+ isJyInvoice := !(qutil.InterfaceToStr((*invoiceOne)["invoice_number"]) != "" && qutil.InterfaceToStr((*invoiceOne)["invoice_code"]) == "") //非数电票
|
|
|
+ isJyEntity := (*invoiceOne)["invoicing_entity"] != nil && qutil.InterfaceToStr((*invoiceOne)["invoicing_entity"]) != config.InvoiceConfig.SigningSubject
|
|
|
isChanged := util.Mysql.Count("invoice", map[string]interface{}{
|
|
|
"only_Identifying": onlyIdentifying,
|
|
|
"order_code": (*invoiceOne)["order_code"],
|
|
|
}) > 1
|
|
|
- (*invoiceOne)["changed"] = qutil.If(isJyInvoice || isChanged, true, false)
|
|
|
+ (*invoiceOne)["changed"] = qutil.If(isJyInvoice || isChanged || isJyEntity || timeLimit, true, false)
|
|
|
case -1: //失败支持重新提交否
|
|
|
- (*invoiceOne)["isReopen"] = util.Mysql.Count("invoice_fail_record", map[string]interface{}{
|
|
|
- "only_Identifying": (*invoiceOne)["only_Identifying"],
|
|
|
- "order_code": (*invoiceOne)["order_code"],
|
|
|
- })+1 >= config.InvoiceConfig.SubmitNum
|
|
|
+ if !timeLimit {
|
|
|
+ (*invoiceOne)["isReopen"] = util.Mysql.Count("invoice_fail_record", map[string]interface{}{
|
|
|
+ "only_Identifying": onlyIdentifying,
|
|
|
+ "order_code": (*invoiceOne)["order_code"],
|
|
|
+ })+1 >= config.InvoiceConfig.SubmitNum
|
|
|
+ } else {
|
|
|
+ (*invoiceOne)["isReopen"] = false
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
this.ServeJson(NewResult(map[string]interface{}{
|
|
@@ -1783,7 +1808,7 @@ func htjs(body map[string]interface{}, orderCode []string, invoiceType, companyN
|
|
|
defer response.Body.Close()
|
|
|
resData := (*resMap)["data"].(map[string]interface{})
|
|
|
if invoice_status == 1 {
|
|
|
- sendMail(invoiceType, strings.Join(orderCode, ","), companyName, taxpayerIdentnum, mail, phone, qutil.InterfaceToStr(resData["path"]))
|
|
|
+ sendMail(invoiceType, strings.Join(orderCode, ","), companyName, taxpayerIdentnum, mail, phone, qutil.InterfaceToStr(resData["path"]), "")
|
|
|
}
|
|
|
for _, v := range orderCode {
|
|
|
util.Mysql.Update(dbname, map[string]interface{}{"order_code": v, "invoice_status": 0}, map[string]interface{}{
|
|
@@ -1829,16 +1854,16 @@ func InvoiceStatusHandle(orderCode string) bool {
|
|
|
}
|
|
|
|
|
|
// 电子普票发邮箱
|
|
|
-func sendMail(invoiceType, orderCode, companyName, taxpayerIdentnum, mail, phone, url string) {
|
|
|
+func sendMail(invoiceType, orderCode, companyName, taxpayerIdentnum, mail, phone, url, invoiceContent string) {
|
|
|
if invoiceType == "个人" {
|
|
|
emailHtml := emailHtml_gr
|
|
|
emailHtmls := fmt.Sprintf(emailHtml, phone, mail)
|
|
|
- html := fmt.Sprintf(email_format, orderCode, "电子普通发票", fmt.Sprintf("<a href=\"%s\" download class=\"download\">下载发票</a>", url), "电子普通发票", emailHtmls)
|
|
|
+ html := fmt.Sprintf(email_format, orderCode, "电子普通发票", fmt.Sprintf("<a href=\"%s\" download class=\"download\">查看发票</a>", url), "电子普通发票", invoiceContent, emailHtmls)
|
|
|
InvoiceSendMail(mail, html, "电子发票")
|
|
|
} else {
|
|
|
emailHtml := emailHtml_gs
|
|
|
emailHtmls := fmt.Sprintf(emailHtml, companyName, taxpayerIdentnum, phone, mail)
|
|
|
- html := fmt.Sprintf(email_format, orderCode, "电子普通发票", fmt.Sprintf("<a href=\"%s\" download class=\"download\">下载发票</a>", url), "电子普通发票", emailHtmls)
|
|
|
+ html := fmt.Sprintf(email_format, orderCode, "电子普通发票", fmt.Sprintf("<a href=\"%s\" download class=\"download\">查看发票</a>", url), "电子普通发票", invoiceContent, emailHtmls)
|
|
|
InvoiceSendMail(mail, html, "电子发票")
|
|
|
}
|
|
|
}
|