mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 07:38:45 +05:00
CdrExporter.ExportFolder to CdrExporter ExportDirectory, fixed tutorial files with proper cdrexport field type
This commit is contained in:
@@ -767,6 +767,7 @@ func (cdr *CDR) AsExportRecord(exportFields []*config.CfgCdrField, costShiftDigi
|
||||
var err error
|
||||
expRecord := make([]string, len(exportFields))
|
||||
for idx, cfgFld := range exportFields {
|
||||
utils.Logger.Debug(fmt.Sprintf("CDR with export field: %+v", cfgFld))
|
||||
layout := cfgFld.Layout
|
||||
if len(layout) == 0 {
|
||||
layout = time.RFC3339
|
||||
@@ -807,6 +808,7 @@ func (cdr *CDR) AsExportRecord(exportFields []*config.CfgCdrField, costShiftDigi
|
||||
outVal, err = cdr.combimedCdrFieldVal(cfgFld, groupedCDRs)
|
||||
case utils.META_COMPOSED:
|
||||
outVal, err = cdr.exportFieldValue(cfgFld, costShiftDigits, roundDecimals, layout, maskLen, maskDestID)
|
||||
utils.Logger.Debug(fmt.Sprintf("CDR: %+v, outVal: %+v, err: %+v", cdr, outVal, err))
|
||||
case utils.MetaMaskedDestination:
|
||||
if len(maskDestID) != 0 && CachedDestHasPrefix(maskDestID, cdr.Destination) {
|
||||
outVal = "1"
|
||||
|
||||
Reference in New Issue
Block a user