Authored by yyq

fix

... ... @@ -22,7 +22,16 @@ const detail = (req, res, next) => {
};
const supply = (req, res, next) => {
return req.ctx(invoiceModel).submitInvoiceSupply(req.body, req.user.uid).then(result => {
let params = req.body;
// 5.8.1 发票优化需求
// 只接受电子发票(1 纸质 2 电子),发票内容为明细(id 12:明细)
Object.assign(params, {
invoicesType: 2,
contentId: 12
});
return req.ctx(invoiceModel).submitInvoiceSupply(params, req.user.uid).then(result => {
res.send(result);
}).catch(next);
};
... ...
... ... @@ -31,8 +31,8 @@ module.exports = class extends global.yoho.BaseModel {
let param = {
order_code: info.orderCode,
invoices_type: info.invoicesType,
invoices_title: info.invoicesTitle,
invoice_content: info.invoicesContent,
invoices_title: info.titleName,
invoice_content: info.contentId,
receiverMobile: info.receiver,
buyerTaxNumber: info.taxNumber,
invoice_payable_type: info.taxNumber ? 2 : 1
... ...