2019-04-24 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdlibrary(1) that caused the 'Cart Report' to
	show duplicate lines for carts containing more than one cut.
This commit is contained in:
Fred Gleason 2019-04-24 12:49:47 -04:00
parent 9f95fec5e1
commit b807ab0598
2 changed files with 99 additions and 91 deletions

View File

@ -18588,3 +18588,6 @@
2019-04-22 Patrick Linstruth <patrick@deltecent.com>
* Fixed a bug in rdlogmanager(1) that could corrupt the
'CLOCK_LINES' table when renaming an event.
2019-04-24 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdlibrary(1) that caused the 'Cart Report' to
show duplicate lines for carts containing more than one cut.

View File

@ -2,7 +2,7 @@
//
// List RDLibrary Reports
//
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2019 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
@ -222,8 +222,12 @@ void ListReports::GenerateCartReport(QString *report)
sql+=RDCartSearchText(list_filter,list_group,schedcode,true)+" && "+
list_type_filter+" order by NUMBER";
}
unsigned prev_cartnum=0;
q=new RDSqlQuery(sql);
while(q->next()) {
if(q->value(1).toUInt()!=prev_cartnum) { // So we don't show duplicates
prev_cartnum=q->value(1).toUInt();
//
// Cart Type
//
@ -318,6 +322,7 @@ void ListReports::GenerateCartReport(QString *report)
//
*report+="\n";
}
}
delete q;
}