loader db updates for rounding stuf movement

This commit is contained in:
Radu Ioan Fericean
2014-05-07 15:31:54 +03:00
parent dc7330b3c9
commit 7a70b50bf4
4 changed files with 12 additions and 9 deletions

View File

@@ -943,8 +943,9 @@ func (self *SQLStorage) GetTpDestinationRates(tpid, tag string) (map[string]*uti
defer rows.Close()
for rows.Next() {
var id int
var tpid, tag, destinations_tag, rate_tag string
if err := rows.Scan(&id, &tpid, &tag, &destinations_tag, &rate_tag); err != nil {
var tpid, tag, destinations_tag, rate_tag, rounding_method string
var rounding_decimals int
if err := rows.Scan(&id, &tpid, &tag, &destinations_tag, &rate_tag, &rounding_method, &rounding_decimals); err != nil {
return nil, err
}
@@ -953,8 +954,10 @@ func (self *SQLStorage) GetTpDestinationRates(tpid, tag string) (map[string]*uti
DestinationRateId: tag,
DestinationRates: []*utils.DestinationRate{
&utils.DestinationRate{
DestinationId: destinations_tag,
RateId: rate_tag,
DestinationId: destinations_tag,
RateId: rate_tag,
RoundingMethod: rounding_method,
RoundingDecimals: rounding_decimals,
},
},
}