|
@@ -375,14 +375,14 @@ func (this *Invoice) Showinvoice() {
|
|
|
}
|
|
|
this.ServeJson(map[string]interface{}{
|
|
|
"status": "success",
|
|
|
- "changed": qutil.If(count > 0, true, false).(bool),
|
|
|
+ "changed": qutil.If(count > 1, true, false).(bool),
|
|
|
"data": data,
|
|
|
"redSwitchInfo": redSwitchInfo,
|
|
|
})
|
|
|
} else {
|
|
|
this.ServeJson(map[string]interface{}{
|
|
|
"status": "processing",
|
|
|
- "changed": qutil.If(count > 0, true, false).(bool),
|
|
|
+ "changed": qutil.If(count > 1, true, false).(bool),
|
|
|
"data": data,
|
|
|
"redSwitchInfo": redSwitchInfo,
|
|
|
})
|
|
@@ -1191,6 +1191,11 @@ func (this *Invoice) InvoiceSubmit() {
|
|
|
if !util.Mysql.ExecTx("发票信息保存", func(tx *sql.Tx) bool {
|
|
|
for orderCode, money := range orderMap {
|
|
|
userId := GetUserId(orderCode)
|
|
|
+ orderInfo := util.Mysql.FindOne("dataexport_order", map[string]interface{}{"order_code": orderCode}, "product_type,user_mail", "")
|
|
|
+ productType := ""
|
|
|
+ if orderInfo != nil {
|
|
|
+ productType = qutil.InterfaceToStr((*orderInfo)["product_type"])
|
|
|
+ }
|
|
|
data := map[string]interface{}{
|
|
|
"order_code": orderCode,
|
|
|
"company_name": this.GetString("company_name"),
|
|
@@ -1219,6 +1224,7 @@ func (this *Invoice) InvoiceSubmit() {
|
|
|
"bank_name": this.GetString("bank_name"),
|
|
|
"recipient": this.GetString("recipient"),
|
|
|
"delivery_address": this.GetString("delivery_address"),
|
|
|
+ "product_type": productType,
|
|
|
}
|
|
|
if util.Mysql.Insert("invoice", data) <= 0 {
|
|
|
return false
|