mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 21:59:53 +05:00
AccountS - debitUnits for concreteBalance, Balance SetDecimalValue and DecimalValue export methods
This commit is contained in:
@@ -87,6 +87,16 @@ func (b *Balance) Compile() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// SetDecimalValue populates the internal decimal value
|
||||
func (b *Balance) SetDecimalValue(dVal *decimal.Big) {
|
||||
b.val = dVal
|
||||
}
|
||||
|
||||
// DecimalValue returns the internal decimal value
|
||||
func (b *Balance) DecimalValue() *decimal.Big {
|
||||
return b.val
|
||||
}
|
||||
|
||||
// ActionProfiles is a sortable list of ActionProfiles
|
||||
type AccountProfiles []*AccountProfile
|
||||
|
||||
|
||||
@@ -31,3 +31,7 @@ func MultiplyBig(x, y *decimal.Big) *decimal.Big {
|
||||
func AddBig(x, y *decimal.Big) *decimal.Big {
|
||||
return new(decimal.Big).Add(x, y)
|
||||
}
|
||||
|
||||
func SubstractBig(x, y *decimal.Big) *decimal.Big {
|
||||
return new(decimal.Big).Sub(x, y)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user