mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-09 14:33:28 +02:00
2020-02-25 Fred Gleason <fredg@paravelsystems.com>
* Reverted the leading '0' fix to the 'CounterPoint Traffic Reconciliation' report generator. * Added a 'CounterPoint Traffic Reconciliation v2' report.
This commit is contained in:
parent
82c00c2f2a
commit
a29dd16eb8
@ -19678,3 +19678,7 @@
|
||||
* Fixed a bug in the 'CounterPoint Traffic Reconciliation' report
|
||||
generator in rdlogmanager(1) that caused it to omit the leading '0'
|
||||
from values in the 'Scheduled event length' column.
|
||||
2020-02-25 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Reverted the leading '0' fix to the 'CounterPoint Traffic
|
||||
Reconciliation' report generator.
|
||||
* Added a 'CounterPoint Traffic Reconciliation v2' report.
|
||||
|
@ -30,8 +30,20 @@
|
||||
|
||||
bool RDReport::ExportRadioTraffic(const QString &filename,
|
||||
const QDate &startdate,const QDate &enddate,
|
||||
const QString &mixtable)
|
||||
const QString &mixtable,int version)
|
||||
{
|
||||
//
|
||||
// Maintainer's Note:
|
||||
// This method implements the 'CounterPoint' reconciliation format as
|
||||
// documented in 'docs/misc/scheduler_formats.ods'.
|
||||
//
|
||||
// The 'version' field is for maintaining bug-for-bug backwards
|
||||
// compatibility. Recognized values are:
|
||||
// 0 - The original implementation. This is missing a leading '0'
|
||||
// column 3 ['Scheduled event length'].
|
||||
//
|
||||
// 1 - Fixes the 'missing leading zero' error in column 3.
|
||||
//
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
QString air_fmt;
|
||||
@ -75,7 +87,10 @@ bool RDReport::ExportRadioTraffic(const QString &filename,
|
||||
*strm << q->value(4).toTime().toString("hh:mm:ss")+" ";
|
||||
*strm << q->value(2).toDateTime().toString("hh:mm:ss")+" ";
|
||||
if(q->value(5).toInt()>0) {
|
||||
*strm << QString("0")+RDGetTimeLength(q->value(5).toInt(),true,false)+" ";
|
||||
if(version>0) {
|
||||
*strm << QString("0");
|
||||
}
|
||||
*strm << RDGetTimeLength(q->value(5).toInt(),true,false)+" ";
|
||||
}
|
||||
else {
|
||||
*strm << "00:00:00 ";
|
||||
|
@ -765,6 +765,10 @@
|
||||
<source>-- End of List --</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CounterPoint Traffic Reconciliation v2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -761,6 +761,10 @@
|
||||
<source>-- End of List --</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CounterPoint Traffic Reconciliation v2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -761,6 +761,10 @@
|
||||
<source>-- End of List --</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CounterPoint Traffic Reconciliation v2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -731,6 +731,10 @@
|
||||
<source>-- End of List --</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CounterPoint Traffic Reconciliation v2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -761,6 +761,10 @@
|
||||
<source>-- End of List --</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CounterPoint Traffic Reconciliation v2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -761,6 +761,10 @@
|
||||
<source>-- End of List --</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CounterPoint Traffic Reconciliation v2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -761,6 +761,10 @@
|
||||
<source>-- End of List --</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CounterPoint Traffic Reconciliation v2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RDAddCart</name>
|
||||
|
@ -610,7 +610,7 @@ bool RDReport::generateReport(const QDate &startdate,const QDate &enddate,
|
||||
break;
|
||||
|
||||
case RDReport::RadioTraffic:
|
||||
ret=ExportRadioTraffic(filename,startdate,enddate,mixname);
|
||||
ret=ExportRadioTraffic(filename,startdate,enddate,mixname,0);
|
||||
break;
|
||||
|
||||
case RDReport::VisualTraffic:
|
||||
@ -619,11 +619,15 @@ bool RDReport::generateReport(const QDate &startdate,const QDate &enddate,
|
||||
|
||||
case RDReport::CounterPoint:
|
||||
case RDReport::WideOrbit:
|
||||
ret=ExportRadioTraffic(filename,startdate,enddate,mixname);
|
||||
ret=ExportRadioTraffic(filename,startdate,enddate,mixname,0);
|
||||
break;
|
||||
|
||||
case RDReport::CounterPoint2:
|
||||
ret=ExportRadioTraffic(filename,startdate,enddate,mixname,1);
|
||||
break;
|
||||
|
||||
case RDReport::Music1:
|
||||
ret=ExportRadioTraffic(filename,startdate,enddate,mixname);
|
||||
ret=ExportRadioTraffic(filename,startdate,enddate,mixname,0);
|
||||
break;
|
||||
|
||||
case RDReport::MusicClassical:
|
||||
@ -697,6 +701,9 @@ QString RDReport::filterText(RDReport::ExportFilter filter)
|
||||
case RDReport::CounterPoint:
|
||||
return QObject::tr("CounterPoint Traffic Reconciliation");
|
||||
|
||||
case RDReport::CounterPoint2:
|
||||
return QObject::tr("CounterPoint Traffic Reconciliation v2");
|
||||
|
||||
case RDReport::MrMaster:
|
||||
return QObject::tr("Mr. Master Reconciliation");
|
||||
|
||||
@ -724,9 +731,10 @@ QString RDReport::filterText(RDReport::ExportFilter filter)
|
||||
case RDReport::CutLog:
|
||||
return QObject::tr("Cut Log");
|
||||
|
||||
default:
|
||||
return QObject::tr("Unknown");
|
||||
case RDReport::LastFilter:
|
||||
break;
|
||||
}
|
||||
|
||||
return QObject::tr("Unknown");
|
||||
}
|
||||
|
||||
@ -758,6 +766,7 @@ bool RDReport::multipleDaysAllowed(RDReport::ExportFilter filter)
|
||||
case RDReport::RadioTraffic:
|
||||
case RDReport::VisualTraffic:
|
||||
case RDReport::CounterPoint:
|
||||
case RDReport::CounterPoint2:
|
||||
case RDReport::LastFilter:
|
||||
case RDReport::MrMaster:
|
||||
case RDReport::Music1:
|
||||
@ -789,6 +798,7 @@ bool RDReport::multipleMonthsAllowed(RDReport::ExportFilter filter)
|
||||
case RDReport::RadioTraffic:
|
||||
case RDReport::VisualTraffic:
|
||||
case RDReport::CounterPoint:
|
||||
case RDReport::CounterPoint2:
|
||||
case RDReport::LastFilter:
|
||||
case RDReport::MrMaster:
|
||||
case RDReport::Music1:
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Abstract a Rivendell Report Descriptor
|
||||
//
|
||||
// (C) Copyright 2002-2006,2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -37,7 +37,7 @@ class RDReport
|
||||
CounterPoint=7,Music1=8,MusicSummary=9,WideOrbit=10,
|
||||
NprSoundExchange=11,MusicPlayout=12,NaturalLog=13,
|
||||
MusicClassical=14,MrMaster=15,SpinCount=16,CutLog=17,
|
||||
LastFilter=18};
|
||||
CounterPoint2=18,LastFilter=19};
|
||||
enum ExportOs {Linux=0,Windows=1};
|
||||
enum ExportType {Generic=0,Traffic=1,Music=2};
|
||||
enum StationType {TypeOther=0,TypeAm=1,TypeFm=2,TypeLast=3};
|
||||
@ -112,7 +112,8 @@ class RDReport
|
||||
bool ExportNprSoundEx(const QString &filename,const QDate &startdate,
|
||||
const QDate &enddate,const QString &mixtable);
|
||||
bool ExportRadioTraffic(const QString &filename,const QDate &startdate,
|
||||
const QDate &enddate,const QString &mixtable);
|
||||
const QDate &enddate,const QString &mixtable,
|
||||
int version);
|
||||
bool ExportMusicClassical(const QString &filename,const QDate &startdate,
|
||||
const QDate &enddate,const QString &mixtable);
|
||||
bool ExportMusicPlayout(const QString &filename,const QDate &startdate,
|
||||
|
Loading…
x
Reference in New Issue
Block a user