fix(BE): edit customer, finance: bank optional, nominal minus, and filter

This commit is contained in:
Hafizh A. Y
2026-01-24 13:35:13 +07:00
parent 42f030a780
commit 458c8e0a91
12 changed files with 226 additions and 37 deletions
@@ -156,6 +156,22 @@ func (s customerService) UpdateOne(c *fiber.Ctx, req *validation.Update, id uint
updateBody["type"] = typ
}
if req.Address != nil {
updateBody["address"] = *req.Address
}
if req.Phone != nil {
updateBody["phone"] = *req.Phone
}
if req.Email != nil {
updateBody["email"] = *req.Email
}
if req.AccountNumber != nil {
updateBody["account_number"] = *req.AccountNumber
}
if len(updateBody) == 0 {
return s.GetOne(c, id)
}