没商品不打印

This commit is contained in:
苏尹岚
2020-11-18 16:33:26 +08:00
parent f9b2917c99
commit f1cb1cfd67
2 changed files with 6 additions and 0 deletions

View File

@@ -210,6 +210,9 @@ func (c *PrinterHandler) GetPrinterStatus(ctx *jxcontext.Context, printerSN, pri
func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store, order *model.GoodsOrder) (printerStatus *partner.PrinterStatus, err error) {
globals.SugarLogger.Debugf("feie PrintOrderByOrder orderID:%s, storeID:%d", order.VendorOrderID, store.ID)
if len(order.Skus) == 0 {
return
}
content := ""
if store.PrinterFontSize == partner.PrinterFontSizeBig {
content = c.getOrderContentBig(order, store.Tel1)

View File

@@ -204,6 +204,9 @@ func (c *PrinterHandler) GetPrinterStatus(ctx *jxcontext.Context, machineCode, p
func (c *PrinterHandler) PrintOrder(ctx *jxcontext.Context, store *model.Store, order *model.GoodsOrder) (printerStatus *partner.PrinterStatus, err error) {
globals.SugarLogger.Debugf("yilianyun PrintOrderByOrder orderID:%s, storeID:%d", order.VendorOrderID, store.ID)
if len(order.Skus) == 0 {
return
}
content := ""
if store.PrinterFontSize == partner.PrinterFontSizeBig {
content = c.getOrderContentBig(order, store.Tel1)