From 52177a1d16cf22a928936368cb3c6c4b46ad356e Mon Sep 17 00:00:00 2001
From: muzexing <muzexing@qq.com>
Date: 星期四, 04 七月 2024 20:39:03 +0800
Subject: [PATCH] 出库/入库打印 修改bug

---
 service/more_units.go |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/service/more_units.go b/service/more_units.go
index 729ce4a..5abdb09 100644
--- a/service/more_units.go
+++ b/service/more_units.go
@@ -11,6 +11,9 @@
 func CreateMoreUnit(amount decimal.Decimal, units []models.UnitItems) []models.UnitItems {
 	moreValueArr := make([]models.UnitItems, 0, len(units))
 	for _, unitItem := range units {
+		if unitItem.Amount.IsZero() {
+			continue
+		}
 		moreValueArr = append(moreValueArr, models.UnitItems{
 			Amount:   amount.Div(unitItem.Amount),
 			Unit:     unitItem.Unit,

--
Gitblit v1.8.0