mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
[FEAT/BE] fixing remaining stock check closing response
This commit is contained in:
@@ -65,7 +65,7 @@ type SapronakCategoryRowDTO struct {
|
||||
QtyOut float64 `json:"qty_out"`
|
||||
QtyUsed float64 `json:"qty_used"`
|
||||
Description string `json:"description"`
|
||||
ProductCategory []string `json:"product_category"`
|
||||
ProductCategory string `json:"product_category"`
|
||||
UnitPrice float64 `json:"unit_price"`
|
||||
TotalAmount float64 `json:"total_amount"`
|
||||
Notes string `json:"notes"`
|
||||
@@ -183,13 +183,13 @@ func ToSapronakProjectAggregatedFromReport(report *SapronakReportDTO, flag strin
|
||||
"PULLET": 0,
|
||||
}
|
||||
|
||||
buildFlagList := func(productID uint, fallback string) []string {
|
||||
buildFlagList := func(productID uint, fallback string) string {
|
||||
rawFlags := productFlags[productID]
|
||||
if len(rawFlags) == 0 {
|
||||
if fallback == "" {
|
||||
return []string{}
|
||||
return ""
|
||||
}
|
||||
return []string{fallback}
|
||||
return fallback
|
||||
}
|
||||
seen := make(map[string]struct{}, len(rawFlags))
|
||||
ordered := make([]string, 0, len(rawFlags))
|
||||
@@ -220,7 +220,7 @@ func ToSapronakProjectAggregatedFromReport(report *SapronakReportDTO, flag strin
|
||||
}
|
||||
return li < lj
|
||||
})
|
||||
return ordered
|
||||
return strings.Join(ordered, " ")
|
||||
}
|
||||
|
||||
for _, group := range report.Groups {
|
||||
|
||||
-2
@@ -308,7 +308,6 @@ func (s projectFlockKandangService) CheckClosing(c *fiber.Ctx, id uint) (*Closin
|
||||
}
|
||||
|
||||
for _, pw := range productWarehouses {
|
||||
if pw.Quantity > 0 {
|
||||
category := ""
|
||||
if pw.Product.ProductCategory.Id != 0 {
|
||||
category = pw.Product.ProductCategory.Name
|
||||
@@ -329,7 +328,6 @@ func (s projectFlockKandangService) CheckClosing(c *fiber.Ctx, id uint) (*Closin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
expenseSummaries := make([]ExpenseSummary, 0)
|
||||
if s.ExpenseRepo != nil {
|
||||
|
||||
Reference in New Issue
Block a user