问题1:小程序从微信卡包获取电子发票后,无法区分电子发票是普票还是专票
问题2:从微信卡包获取微信发票后总价会自动去除小数点(例如:总价本来是199.00,识别出来的总价是19900)
上传一张电子专票,返回了普票;这是返回的代码:
卡包返回报文:[{"errcode":0,"errmsg":"ok","card_id":"p4gLgvv_BVrox1lo7eFrLqEVyOgM","openid":"o8k0R5aRnkYJjByxISx1i8RSaQLM","type":"增值税电子普通发票","payee":"上海七斗星商旅酒店管理有限公司郑州大学路分公司","detail":"","user_info":{"fee":35000,"title":"好享家舒适智能家居股份有限公司","billing_time":1713744000,"billing_no":"24412000000059699391","billing_code":"","info":[{"name":"*住宿服务*住宿费","fee":33019}],"fee_without_tax":33019,"tax":1980,"pdf_url":"https://mp.weixin.qq.com/intp/invoice/getpdf?type=invoice&card_id=p4gLgvv_BVrox1lo7eFrLqEVyOgM&wx_invoice_token=XKEkdz2FkNEs8vkJiFrblG-iLpQe4bM6Cwla-kd4VHN4DUf-GMbY4PGVYxwwpnOTlILtP-RpZE9dkRxC91DhAw.%3D","reimburse_status":"INVOICE_REIMBURSE_INIT","order_id":"addinvoice_24412000000059699391__2641328381","s_pdf_media_id":"24578697875496960","check_code":"","buyer_number":"","buyer_address_and_phone":"","buyer_bank_account":"","seller_number":"","seller_address_and_phone":"","seller_bank_account":""},"weixinCardId":"p4gLgvv_BVrox1lo7eFrLqEVyOgM","weixinEncryptCode":"O/mPnGTpBu22a1szmK2ogzhFPBh9eYzv2p70L8yzyym1CRfkhxMspMBRj11hxaPi+d3TSD1UyffhH7sm5MMPaJt/jey70VDCE0UXLF08DLniWvazlsAyMw9Xs2zsLp1H"}]
上传一张电子普票返回了普票;这是返回的代码:
卡包返回报文:[{"errcode":0,"errmsg":"ok","card_id":"p4gLgviV3y-FOxa_DNavKVQ_D2Yk","openid":"o8k0R5aRnkYJjByxISx1i8RSaQLM","type":"增值税电子普通发票","payee":"广汽传祺汽车销售有限公司","detail":"","user_info":{"fee":165000,"title":"珠海华发天成汽车有限公司","billing_time":1640217600,"billing_no":"21441000000000000142","billing_code":"","info":[{"name":"*交通运输设备*行车记录仪","fee":146018}],"fee_without_tax":146018,"tax":18982,"pdf_url":"https://mp.weixin.qq.com/intp/invoice/getpdf?type=invoice&card_id=p4gLgviV3y-FOxa_DNavKVQ_D2Yk&wx_invoice_token=FOLXi2RVupdfURCa5Z4R9MjgZ6pVIYl89BCPzUtDBJMC1INM3EernwSjzfbCEizwtYI-8OKBU-b8f1XRE3i4Hg.%3D","reimburse_status":"INVOICE_REIMBURSE_INIT","order_id":"addinvoice_21441000000000000142__2641328381","s_pdf_media_id":"24578314214383616","check_code":"","buyer_number":"91440400796220358E","buyer_address_and_phone":"","buyer_bank_account":"","seller_number":"914401013275898060","seller_address_and_phone":"","seller_bank_account":""},"weixinCardId":"p4gLgviV3y-FOxa_DNavKVQ_D2Yk","weixinEncryptCode":"O/mPnGTpBu22a1szmK2ogzhFPBh9eYzv2p70L8yzyym1CRfkhxMspMBRj11hxaPi8Og3/E2NnWjwWC6KcJcSdvrWoQMNw6K5bP/SudGhN8/iWvazlsAyMw9Xs2zsLp1H"}]
问题 解决了吗?
1、type字段就是发票类型
2、微信发票的单位均为分,何来自动去除小数点一说?
卡包返回报文:[{"errcode":0,"errmsg":"ok","card_id":"p4gLgvv_BVrox1lo7eFrLqEVyOgM","openid":"o8k0R5aRnkYJjByxISx1i8RSaQLM","type":"增值税电子普通发票","payee":"上海七斗星商旅酒店管理有限公司郑州大学路分公司","detail":"","user_info":{"fee":35000,"title":"好享家舒适智能家居股份有限公司","billing_time":1713744000,"billing_no":"24412000000059699391","billing_code":"","info":[{"name":"*住宿服务*住宿费","fee":33019}],"fee_without_tax":33019,"tax":1980,"pdf_url":"https://mp.weixin.qq.com/intp/invoice/getpdf?type=invoice&card_id=p4gLgvv_BVrox1lo7eFrLqEVyOgM&wx_invoice_token=XKEkdz2FkNEs8vkJiFrblG-iLpQe4bM6Cwla-kd4VHN4DUf-GMbY4PGVYxwwpnOTlILtP-RpZE9dkRxC91DhAw.%3D","reimburse_status":"INVOICE_REIMBURSE_INIT","order_id":"addinvoice_24412000000059699391__2641328381","s_pdf_media_id":"24578697875496960","check_code":"","buyer_number":"","buyer_address_and_phone":"","buyer_bank_account":"","seller_number":"","seller_address_and_phone":"","seller_bank_account":""},"weixinCardId":"p4gLgvv_BVrox1lo7eFrLqEVyOgM","weixinEncryptCode":"O/mPnGTpBu22a1szmK2ogzhFPBh9eYzv2p70L8yzyym1CRfkhxMspMBRj11hxaPi+d3TSD1UyffhH7sm5MMPaJt/jey70VDCE0UXLF08DLniWvazlsAyMw9Xs2zsLp1H"}]
卡包返回报文:[{"errcode":0,"errmsg":"ok","card_id":"p4gLgviV3y-FOxa_DNavKVQ_D2Yk","openid":"o8k0R5aRnkYJjByxISx1i8RSaQLM","type":"增值税电子普通发票","payee":"广汽传祺汽车销售有限公司","detail":"","user_info":{"fee":165000,"title":"珠海华发天成汽车有限公司","billing_time":1640217600,"billing_no":"21441000000000000142","billing_code":"","info":[{"name":"*交通运输设备*行车记录仪","fee":146018}],"fee_without_tax":146018,"tax":18982,"pdf_url":"https://mp.weixin.qq.com/intp/invoice/getpdf?type=invoice&card_id=p4gLgviV3y-FOxa_DNavKVQ_D2Yk&wx_invoice_token=FOLXi2RVupdfURCa5Z4R9MjgZ6pVIYl89BCPzUtDBJMC1INM3EernwSjzfbCEizwtYI-8OKBU-b8f1XRE3i4Hg.%3D","reimburse_status":"INVOICE_REIMBURSE_INIT","order_id":"addinvoice_21441000000000000142__2641328381","s_pdf_media_id":"24578314214383616","check_code":"","buyer_number":"91440400796220358E","buyer_address_and_phone":"","buyer_bank_account":"","seller_number":"914401013275898060","seller_address_and_phone":"","seller_bank_account":""},"weixinCardId":"p4gLgviV3y-FOxa_DNavKVQ_D2Yk","weixinEncryptCode":"O/mPnGTpBu22a1szmK2ogzhFPBh9eYzv2p70L8yzyym1CRfkhxMspMBRj11hxaPi8Og3/E2NnWjwWC6KcJcSdvrWoQMNw6K5bP/SudGhN8/iWvazlsAyMw9Xs2zsLp1H"}]
第一段是电子专票,但是返回了普票;第二段是普票返回值正常。