|
@@ -148,6 +148,7 @@ func (im *InvoiceManager) simpleMakeInvoice(ctx context.Context) (total, okNum i
|
|
|
var (
|
|
|
orderCode = gconv.String(m["order_code"])
|
|
|
iType = gconv.String(m["invoice_type"])
|
|
|
+ remark = gconv.String(m["remark"])
|
|
|
prices float64
|
|
|
)
|
|
|
|
|
@@ -160,9 +161,10 @@ func (im *InvoiceManager) simpleMakeInvoice(ctx context.Context) (total, okNum i
|
|
|
}
|
|
|
|
|
|
c := MakeInvoiceData{
|
|
|
- Type: "2",
|
|
|
- Id: orderCode,
|
|
|
- Fhr: g.Cfg().MustGet(ctx, "company.hfr", "贺鹏飞").String(),
|
|
|
+ Type: "2",
|
|
|
+ Id: orderCode,
|
|
|
+ Notes: remark,
|
|
|
+ Fhr: g.Cfg().MustGet(ctx, "company.hfr", "贺鹏飞").String(),
|
|
|
InvoiceArr: []MakeInvoiceItems{{
|
|
|
Xmmc: g.Cfg().MustGet(ctx, "company.taxCode").String(), //开票项
|
|
|
WhStatus: 1, //开票项是否维护
|
|
@@ -197,7 +199,7 @@ func (im *InvoiceManager) selfMakeInvoice(ctx context.Context) (total, okNum int
|
|
|
var (
|
|
|
res gdb.Result
|
|
|
)
|
|
|
- res, err = g.DB().Query(ctx, "SELECT a.invoice_money,a.only_Identifying,a.invoice_type,a.company_name,a.taxpayer_identnum FROM invoice a WHERE a.invoice_status=0 AND a.invoice_changed=0 AND a.invoice_variety='电子普通发票' AND a.invoice_order_code is not NULL GROUP BY invoice_order_code")
|
|
|
+ res, err = g.DB().Query(ctx, "SELECT a.invoice_money,a.only_Identifying,a.invoice_type,a.company_name,a.taxpayer_identnum,a.remark FROM invoice a WHERE a.invoice_status=0 AND a.invoice_changed=0 AND a.invoice_variety='电子普通发票' AND a.invoice_order_code is not NULL GROUP BY invoice_order_code")
|
|
|
if err != nil {
|
|
|
return -1, -1, gerror.Wrap(err, "selfMakeInvoice-查询待开票异常")
|
|
|
}
|
|
@@ -213,11 +215,13 @@ func (im *InvoiceManager) selfMakeInvoice(ctx context.Context) (total, okNum int
|
|
|
orderCode = gconv.String(m["only_Identifying"])
|
|
|
iType = gconv.String(m["invoice_type"])
|
|
|
prices = gconv.String(m["invoice_money"])
|
|
|
+ remark = gconv.String(m["remark"])
|
|
|
)
|
|
|
c := MakeInvoiceData{
|
|
|
- Type: "2",
|
|
|
- Id: orderCode,
|
|
|
- Fhr: g.Cfg().MustGet(ctx, "company.hfr", "贺鹏飞").String(),
|
|
|
+ Type: "2",
|
|
|
+ Id: orderCode,
|
|
|
+ Notes: remark,
|
|
|
+ Fhr: g.Cfg().MustGet(ctx, "company.hfr", "贺鹏飞").String(),
|
|
|
InvoiceArr: []MakeInvoiceItems{{
|
|
|
Xmmc: g.Cfg().MustGet(ctx, "company.taxCode").String(), //开票项
|
|
|
WhStatus: 1, //开票项是否维护
|