Orchestrator refactoring + planned amounts

This commit is contained in:
Stephan D
2026-03-11 20:04:10 +01:00
parent 208b4283d0
commit f578278205
111 changed files with 2485 additions and 1517 deletions

View File

@@ -5,6 +5,7 @@ import (
"time"
"github.com/shopspring/decimal"
"github.com/tech/sendico/payments/quotation/internal/shared"
"github.com/tech/sendico/payments/storage/model"
"github.com/tech/sendico/pkg/merrors"
paymenttypes "github.com/tech/sendico/pkg/payments/types"
@@ -23,10 +24,7 @@ type moneyGetter interface {
}
func cloneMoney(input *paymenttypes.Money) *paymenttypes.Money {
if input == nil {
return nil
}
return &paymenttypes.Money{Currency: input.GetCurrency(), Amount: input.GetAmount()}
return shared.CloneModelMoneyRaw(input)
}
func cloneStringList(values []string) []string {
@@ -100,10 +98,7 @@ func protoMoney(m *paymenttypes.Money) *moneyv1.Money {
}
func cloneProtoMoney(input *moneyv1.Money) *moneyv1.Money {
if input == nil {
return nil
}
return &moneyv1.Money{Currency: input.GetCurrency(), Amount: input.GetAmount()}
return shared.CloneProtoMoneyRaw(input)
}
func decimalFromProto(value *moneyv1.Decimal) *paymenttypes.Decimal {