mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-05 06:59:08 +02:00
2021-08-20 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression that broke searching for carts by Scheduler Code. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
ecd6a404b2
commit
83c35bfa6a
@ -22323,3 +22323,6 @@
|
|||||||
2021-08-20 Fred Gleason <fredg@paravelsystems.com>
|
2021-08-20 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Cleaned up warnings in 'lib/rdwavefile.cpp' when building
|
* Cleaned up warnings in 'lib/rdwavefile.cpp' when building
|
||||||
with OggVorbis support disabled.
|
with OggVorbis support disabled.
|
||||||
|
2021-08-20 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a regression that broke searching for carts by
|
||||||
|
Scheduler Code.
|
||||||
|
@ -92,7 +92,7 @@ RDCartFilter::RDCartFilter(bool show_drag_box,bool user_is_admin,
|
|||||||
d_codes_label->setFont(labelFont());
|
d_codes_label->setFont(labelFont());
|
||||||
d_codes_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
d_codes_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||||
connect(d_codes_box,SIGNAL(activated(const QString &)),
|
connect(d_codes_box,SIGNAL(activated(const QString &)),
|
||||||
this,SLOT(groupChangedData(const QString &)));
|
this,SLOT(schedulerCodeChangedData(const QString &)));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Results Counter
|
// Results Counter
|
||||||
@ -202,10 +202,21 @@ QSizePolicy RDCartFilter::sizePolicy() const
|
|||||||
QString RDCartFilter::filterSql(const QStringList &and_fields) const
|
QString RDCartFilter::filterSql(const QStringList &and_fields) const
|
||||||
{
|
{
|
||||||
QString sql=" where ";
|
QString sql=" where ";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Cart Type Filter
|
||||||
|
//
|
||||||
sql+=RDCartFilter::typeFilter(d_showaudio_check->isChecked(),
|
sql+=RDCartFilter::typeFilter(d_showaudio_check->isChecked(),
|
||||||
d_showmacro_check->isChecked(),
|
d_showmacro_check->isChecked(),
|
||||||
d_show_cart_type);
|
d_show_cart_type);
|
||||||
|
//
|
||||||
|
// Full Text Filter
|
||||||
|
//
|
||||||
sql+=RDCartFilter::phraseFilter(d_filter_edit->text().trimmed(),true);
|
sql+=RDCartFilter::phraseFilter(d_filter_edit->text().trimmed(),true);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Group Filter
|
||||||
|
//
|
||||||
QStringList groups;
|
QStringList groups;
|
||||||
for(int i=0;i<d_group_box->count();i++) {
|
for(int i=0;i<d_group_box->count();i++) {
|
||||||
if(d_group_box->itemText(i)!=tr("ALL")) {
|
if(d_group_box->itemText(i)!=tr("ALL")) {
|
||||||
@ -222,7 +233,20 @@ QString RDCartFilter::filterSql(const QStringList &and_fields) const
|
|||||||
else {
|
else {
|
||||||
sql+="`CART`.`OWNER` is null ";
|
sql+="`CART`.`OWNER` is null ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Schedule Code Filter
|
||||||
|
//
|
||||||
|
if(d_codes_box->currentText()!=tr("ALL")) {
|
||||||
|
sql+="&&(`CART_SCHED_CODES`.`SCHED_CODE`='"+
|
||||||
|
RDEscapeString(d_codes_box->currentText())+"') ";
|
||||||
|
}
|
||||||
|
|
||||||
sql+="order by `CART`.`NUMBER` ";
|
sql+="order by `CART`.`NUMBER` ";
|
||||||
|
|
||||||
|
//
|
||||||
|
// Return Size Limit
|
||||||
|
//
|
||||||
if(d_showmatches_box->isChecked()) {
|
if(d_showmatches_box->isChecked()) {
|
||||||
sql+=QString().sprintf("limit %d ",RD_LIMITED_CART_SEARCH_QUANTITY);
|
sql+=QString().sprintf("limit %d ",RD_LIMITED_CART_SEARCH_QUANTITY);
|
||||||
}
|
}
|
||||||
@ -453,6 +477,12 @@ void RDCartFilter::groupChangedData(const QString &str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RDCartFilter::schedulerCodeChangedData(const QString &str)
|
||||||
|
{
|
||||||
|
filterChangedData("");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RDCartFilter::checkChangedData(int n)
|
void RDCartFilter::checkChangedData(int n)
|
||||||
{
|
{
|
||||||
filterChangedData("");
|
filterChangedData("");
|
||||||
|
@ -79,6 +79,7 @@ class RDCartFilter : public RDWidget
|
|||||||
void searchClickedData();
|
void searchClickedData();
|
||||||
void clearClickedData();
|
void clearClickedData();
|
||||||
void groupChangedData(const QString &str);
|
void groupChangedData(const QString &str);
|
||||||
|
void schedulerCodeChangedData(const QString &str);
|
||||||
void checkChangedData(int n);
|
void checkChangedData(int n);
|
||||||
void dragsChangedData(int n);
|
void dragsChangedData(int n);
|
||||||
void searchLimitChangedData(int state);
|
void searchLimitChangedData(int state);
|
||||||
|
@ -740,7 +740,9 @@ QString sql=QString("select ")+
|
|||||||
"`CART`.`NOTES` "+ // 30
|
"`CART`.`NOTES` "+ // 30
|
||||||
"from `CART` "+
|
"from `CART` "+
|
||||||
"left join `GROUPS` on `CART`.`GROUP_NAME`=`GROUPS`.`NAME` "+
|
"left join `GROUPS` on `CART`.`GROUP_NAME`=`GROUPS`.`NAME` "+
|
||||||
"left join `CUTS` on `CART`.`NUMBER`=`CUTS`.`CART_NUMBER` ";
|
"left join `CUTS` on `CART`.`NUMBER`=`CUTS`.`CART_NUMBER` "+
|
||||||
|
"left join `CART_SCHED_CODES` "+
|
||||||
|
"on `CART`.`NUMBER`=`CART_SCHED_CODES`.`CART_NUMBER` ";
|
||||||
|
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user