bugfix
This commit is contained in:
parent
845405eed3
commit
1127211706
1 changed files with 5 additions and 3 deletions
|
|
@ -115,7 +115,7 @@ public class OPListExportAdapter extends POIFindReplaceAdapter {
|
|||
this.updateFileData(document.getFileData(targetName), document, replaceDevList, eval);
|
||||
|
||||
// now we add separate lines for each invoice....
|
||||
logger.info("... insert invoices..");
|
||||
logger.info("... insert invoices - filter="+filter);
|
||||
insertInvoiceRows(document, targetName, filter);
|
||||
} catch (PluginException | IOException | QueryException e) {
|
||||
throw new PluginException(OPListExportAdapter.class.getSimpleName(), ERROR_CONFIG,
|
||||
|
|
@ -368,6 +368,7 @@ public class OPListExportAdapter extends POIFindReplaceAdapter {
|
|||
if (filter) {
|
||||
Date date = invoice.getItemValueDate("invoice.duedate");
|
||||
if (OPListExportAdapter.isOverdue(date, invoice.getTaskID())) {
|
||||
//logger.info("...invoice - " +invoice.getUniqueID() + " is in overdue");
|
||||
invoiceList.add(invoice);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -395,9 +396,10 @@ public class OPListExportAdapter extends POIFindReplaceAdapter {
|
|||
|
||||
public static boolean isOverdue(Date date, int taskid) {
|
||||
Date now = new Date();
|
||||
long diffInMillies = Math.abs(now.getTime() - date.getTime());
|
||||
long diffInMillies = now.getTime() - date.getTime();
|
||||
int tage = (int) (diffInMillies / 1000 / 60 / 60 / 24);
|
||||
return ((taskid >= TASK_MAHNUNG_2ND && taskid <= TASK_MAHNUNG_2ND) || tage >= 21);
|
||||
//logger.info("...taskid=" + taskid + " date=" + date + " tage=" + tage);
|
||||
return ((taskid >= TASK_MAHNUNG_2ND && taskid <= TASK_MAHNUNG_LAST) || tage >= 21);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue