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 | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/service/more_units.go b/service/more_units.go
index 3a4cf49..5abdb09 100644
--- a/service/more_units.go
+++ b/service/more_units.go
@@ -11,8 +11,11 @@
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.Mul(unitItem.Amount),
+ Amount: amount.Div(unitItem.Amount),
Unit: unitItem.Unit,
Floating: unitItem.Floating,
})
--
Gitblit v1.8.0