func NewBalance(amount domain.Amount, date time.Time, withTime bool) *BalanceDataElement {
	var debitCredit string
	if amount.Amount < 0 {
		debitCredit = "D"
	} else {
		debitCredit = "C"
	}
	b := &BalanceDataElement{
		DebitCreditIndicator: NewAlphaNumeric(debitCredit, 1),
		Amount:               NewValue(math.Abs(amount.Amount)),
		Currency:             NewCurrency(amount.Currency),
		TransmissionDate:     NewDate(date),
	}
	if withTime {
		b.TransmissionTime = NewTime(date)
	}
	b.DataElement = NewGroupDataElementGroup(balanceGDEG, 5, b)
	return b
}
// NewBalance returns a new BalanceDataElement
NewBalance returns a new BalanceDataElement
// NewBalance returns a new BalanceDataElement
func NewBalance(amount domain.Amount, date time.Time, withTime bool) *BalanceDataElement {
	var debitCredit string
	if amount.Amount < 0 {
		debitCredit = "D"
	} else {
		debitCredit = "C"
	}
	b := &BalanceDataElement{
		DebitCreditIndicator: NewAlphaNumeric(debitCredit, 1),
		Amount:               NewValue(math.Abs(amount.Amount)),
		Currency:             NewCurrency(amount.Currency),
		TransmissionDate:     NewDate(date),
	}
	if withTime {
		b.TransmissionTime = NewTime(date)
	}
	b.DataElement = NewGroupDataElementGroup(balanceGDEG, 5, b)
	return b
}
func NewBalance ( amount domain . Amount , date time . Time , withTime bool ) * BalanceDataElement { var debitCredit string if amount . Amount < 0 { debitCredit = " " } else { debitCredit = " " } b := & BalanceDataElement { DebitCreditIndicator : NewAlphaNumeric ( debitCredit , 1 ) , Amount : NewValue ( math . Abs ( amount . Amount ) ) , Currency : NewCurrency ( amount . Currency ) , TransmissionDate : NewDate ( date ) , } if withTime { b . TransmissionTime = NewTime ( date ) } b . DataElement = NewGroupDataElementGroup ( balanceGDEG , 5 , b ) return b }
NewBalance returns a new BalanceDataElement
NewBalance returns a new BalanceDataElement