|
@@ -207,11 +207,11 @@ func (this *Invoice) Addinvoice() error {
|
|
|
//公对公转账 账单金额可以修改 开发票应取实付金额 pay_money
|
|
|
//微信支付宝支付 pay_money为订单金额减去微信or支付包红包
|
|
|
if qutil.ObjToString((*u)["pay_way"]) == "transferAccounts" {
|
|
|
- prices = qutil.Float64All((*u)["pay_money"]) / float64(100)
|
|
|
+ prices = qutil.Float64All((*u)["pay_money"]) // float64(100)
|
|
|
} else {
|
|
|
- prices = qutil.Float64All((*u)["order_money"]) / float64(100)
|
|
|
+ prices = qutil.Float64All((*u)["order_money"]) // float64(100)
|
|
|
}
|
|
|
- price = strconv.FormatFloat(prices, 'f', -1, 64)
|
|
|
+ //price = strconv.FormatFloat(prices, 'f', -1, 64)
|
|
|
product_name = (*u)["product_type"].(string)
|
|
|
applyBill_status = 1
|
|
|
data := make(map[string]interface{})
|
|
@@ -240,7 +240,7 @@ func (this *Invoice) Addinvoice() error {
|
|
|
data["create_time"] = time.Now().Unix()
|
|
|
data["user_id"] = userId
|
|
|
data["invoice_status"] = 0
|
|
|
- //data["invoice_money"] = price
|
|
|
+ data["invoice_money"] = prices
|
|
|
var orders = []map[string]interface{}{}
|
|
|
var items = []map[string]interface{}{}
|
|
|
item := map[string]interface{}{
|
|
@@ -249,7 +249,7 @@ func (this *Invoice) Addinvoice() error {
|
|
|
"yhzcbs": config.InvoiceConfig.Tax_policy,
|
|
|
"lineType": config.InvoiceConfig.Invoice_nature,
|
|
|
"taxRate": config.InvoiceConfig.Tax_rate,
|
|
|
- "taxPrice": price,
|
|
|
+ "taxPrice": price,// 不再使用
|
|
|
"totalAmount": price,
|
|
|
"quantity": "1",
|
|
|
}
|