|
@@ -1070,7 +1070,9 @@ func (this *Invoice) InvoiceSubmit() {
|
|
orderArr = append(orderArr, invoiceMoneyArr[0])
|
|
orderArr = append(orderArr, invoiceMoneyArr[0])
|
|
Allmoney += qutil.Int64All(invoiceMoneyArr[1])
|
|
Allmoney += qutil.Int64All(invoiceMoneyArr[1])
|
|
orderMap[invoiceMoneyArr[0]] = invoiceMoneyArr[1]
|
|
orderMap[invoiceMoneyArr[0]] = invoiceMoneyArr[1]
|
|
- mailOrderArr = append(mailOrderArr, fmt.Sprintf("%s(%s元)", invoiceMoneyArr[0], qutil.InterfaceToStr(qutil.Int64All(invoiceMoneyArr[1])/100)))
|
|
|
|
|
|
+ prices := qutil.Float64All(invoiceMoneyArr[1]) / float64(100)
|
|
|
|
+ price := strconv.FormatFloat(prices, 'f', -1, 64)
|
|
|
|
+ mailOrderArr = append(mailOrderArr, fmt.Sprintf("%s(%s元)", invoiceMoneyArr[0], price))
|
|
|
|
|
|
}
|
|
}
|
|
//提交时订单金额再做一次校验
|
|
//提交时订单金额再做一次校验
|
|
@@ -1128,14 +1130,16 @@ func (this *Invoice) InvoiceSubmit() {
|
|
//走航天金税开票
|
|
//走航天金税开票
|
|
var orders = []map[string]interface{}{}
|
|
var orders = []map[string]interface{}{}
|
|
var items = []map[string]interface{}{}
|
|
var items = []map[string]interface{}{}
|
|
|
|
+ prices := qutil.Float64All(Allmoney) / float64(100)
|
|
|
|
+ price := strconv.FormatFloat(prices, 'f', -1, 64)
|
|
item := map[string]interface{}{
|
|
item := map[string]interface{}{
|
|
"name": "技术服务费",
|
|
"name": "技术服务费",
|
|
"code": config.InvoiceConfig.Code,
|
|
"code": config.InvoiceConfig.Code,
|
|
"yhzcbs": config.InvoiceConfig.Tax_policy,
|
|
"yhzcbs": config.InvoiceConfig.Tax_policy,
|
|
"lineType": config.InvoiceConfig.Invoice_nature,
|
|
"lineType": config.InvoiceConfig.Invoice_nature,
|
|
"taxRate": config.InvoiceConfig.Tax_rate,
|
|
"taxRate": config.InvoiceConfig.Tax_rate,
|
|
- "taxPrice": Allmoney,
|
|
|
|
- "totalAmount": Allmoney,
|
|
|
|
|
|
+ "taxPrice": price,
|
|
|
|
+ "totalAmount": price,
|
|
"quantity": "1",
|
|
"quantity": "1",
|
|
}
|
|
}
|
|
items = append(items, item)
|
|
items = append(items, item)
|
|
@@ -1166,11 +1170,13 @@ func (this *Invoice) InvoiceSubmit() {
|
|
recipientStr = fmt.Sprintf("<p class=\"item\">\n <span class=\"label\">收件人:</span>\n <span class=\"value\">%s</span>\n </p>", this.GetString("recipient"))
|
|
recipientStr = fmt.Sprintf("<p class=\"item\">\n <span class=\"label\">收件人:</span>\n <span class=\"value\">%s</span>\n </p>", this.GetString("recipient"))
|
|
deliveryAddressStr = fmt.Sprintf("<p class=\"item\">\n <span class=\"label\">收件地址:</span>\n <span class=\"value\">%s</span>\n </p>", this.GetString("delivery_address"))
|
|
deliveryAddressStr = fmt.Sprintf("<p class=\"item\">\n <span class=\"label\">收件地址:</span>\n <span class=\"value\">%s</span>\n </p>", this.GetString("delivery_address"))
|
|
}
|
|
}
|
|
|
|
+ prices := qutil.Float64All(Allmoney) / float64(100)
|
|
|
|
+ price := strconv.FormatFloat(prices, 'f', -1, 64)
|
|
html := fmt.Sprintf(email_format_new,
|
|
html := fmt.Sprintf(email_format_new,
|
|
FormatDate(&now, Date_Full_Layout),
|
|
FormatDate(&now, Date_Full_Layout),
|
|
strings.Join(orderArr, ","),
|
|
strings.Join(orderArr, ","),
|
|
strings.Join(mailOrderArr, ","),
|
|
strings.Join(mailOrderArr, ","),
|
|
- Allmoney/100,
|
|
|
|
|
|
+ price,
|
|
this.GetString("invoice_variety"),
|
|
this.GetString("invoice_variety"),
|
|
qutil.InterfaceToStr(qutil.If(this.GetString("invoice_type") == "", "--", this.GetString("invoice_type"))),
|
|
qutil.InterfaceToStr(qutil.If(this.GetString("invoice_type") == "", "--", this.GetString("invoice_type"))),
|
|
qutil.InterfaceToStr(qutil.If(this.GetString("company_name") == "", "--", this.GetString("company_name"))),
|
|
qutil.InterfaceToStr(qutil.If(this.GetString("company_name") == "", "--", this.GetString("company_name"))),
|