1
This commit is contained in:
@@ -708,6 +708,29 @@ func (c *PurchaseHandler) ApplyCompensationOrder(order *model.GoodsOrder) (strin
|
||||
}
|
||||
|
||||
// UploadInvoice 回复用户发票申请
|
||||
func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg) ([]string, []string, error) {
|
||||
return nil, nil, nil
|
||||
func (c *PurchaseHandler) UploadInvoice(param *model.InvoiceMsg, base64 string) ([]string, []string, error) {
|
||||
order, _ := partner.CurOrderManager.LoadOrder(param.OrderId, model.VendorIDJD)
|
||||
storeDetail, err := partner.CurOrderManager.LoadStoreDetail(order.JxStoreID, model.VendorIDJD)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if storeDetail == nil {
|
||||
return nil, nil, fmt.Errorf("未查询到门店[%d]", order.JxStoreID)
|
||||
}
|
||||
if storeDetail.LicenceCode == "" {
|
||||
return nil, nil, fmt.Errorf("未查询到门店营业执照编号,请天假门店营业执照信息[%s]", storeDetail.Name)
|
||||
}
|
||||
blue := &jdapi.BlueTicketParam{
|
||||
OrderId: order.VendorOrderID,
|
||||
ReceiverTaxNo: storeDetail.LicenceCode,
|
||||
ReceiverName: storeDetail.Name,
|
||||
InvoiceCode: param.InvoiceId,
|
||||
IvcTitle: "个人", // 4-个人,5-公司
|
||||
TotalPrice: utils.Float64ToStr(float64(param.InvoiceAmount) / float64(100)),
|
||||
InvoiceTime: utils.Time2DateStr(time.Now()),
|
||||
PdfInfo: base64,
|
||||
FullEleInvoiceNo: param.InvoiceId,
|
||||
}
|
||||
|
||||
return nil, nil, getAPI(order.VendorOrgCode).UploadBlueTicket(blue)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user