Skip to content

Commit

Permalink
updated reports. issue #2165
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Sep 10, 2024
1 parent 0a96f3b commit 95fb214
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ public final void setEntry(Invoice invoice) {
this.cmdSave.setEnabled(invoice != null && invoice.getId() != null);

this.cmbInvoiceSender.setSelectedItem(UserSettings.getInstance().getCurrentUser().getPrincipalId());

this.currentEntry = invoice;

this.cmdNavigateToDocument.setEnabled(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5252,6 +5252,7 @@ public Invoice updateInvoice(String caseId, Invoice invoice) throws Exception {
updatedInvoice.setStatus(invoice.getStatus());
updatedInvoice.setSmallBusiness(invoice.isSmallBusiness());
updatedInvoice.setCurrency(invoice.getCurrency());
updatedInvoice.setSender(invoice.getSender());

this.invoicesFacade.edit(updatedInvoice);
this.updateInvoiceTotal(invoice.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ public ReportResult invokeReport(String reportId, Object... params) throws Excep
+ " else 'unbekannt'\n"
+ " end as Status,\n"
+ " round(inv.total, 2) Nettobetrag, round(inv.total_gross, 2) Bruttobetrag, ifnull(round(sum(acce.in_earnings), 2), 0) Zahlungseingang, inv.currency as Waehrung, DATE_FORMAT(inv.created,'%Y-%m-%d') as erstellt,\n"
+ " DATE_FORMAT(inv.due_date,'%Y-%m-%d') as faellig, inv.name as Bezeichnung, inv.description as Beschreibung, cont.name as EmpfaengerName, cont.company as EmpfaengerFirma, cases.fileNumber as Aktenzeichen, cases.name as Rubrum, cases.reason as wegen, cases.lawyer as Anwalt, cases.assistant as Sachbearbeiter FROM invoices inv\n"
+ " DATE_FORMAT(inv.due_date,'%Y-%m-%d') as faellig, inv.name as Bezeichnung, inv.description as Beschreibung, inv.sender_id as Von, cont.name as EmpfaengerName, cont.company as EmpfaengerFirma, cases.fileNumber as Aktenzeichen, cases.name as Rubrum, cases.reason as wegen, cases.lawyer as Anwalt, cases.assistant as Sachbearbeiter FROM invoices inv\n"
+ "left join case_account_entries acce on acce.invoice_id=inv.id \n"
+ "left join contacts cont on inv.contact_id=cont.id\n"
+ "left join invoice_types invt on inv.invoice_type=invt.id\n"
Expand All @@ -820,7 +820,7 @@ public ReportResult invokeReport(String reportId, Object... params) throws Excep
+ " else 'unbekannt'\n"
+ " end as Status,\n"
+ " round(inv.total, 2) Nettobetrag, round(inv.total_gross, 2) Bruttobetrag, ifnull(round(sum(acce.in_earnings), 2), 0) Zahlungseingang, inv.currency as Waehrung, DATE_FORMAT(inv.created,'%Y-%m-%d') as erstellt,\n"
+ " DATE_FORMAT(inv.due_date,'%Y-%m-%d') as faellig, TIMESTAMPDIFF(DAY, inv.due_date, curdate()) as TageFaellig, inv.name as Bezeichnung, inv.description as Beschreibung, cont.name as EmpfaengerName, cont.company as EmpfaengerFirma, cases.fileNumber as Aktenzeichen, cases.name as Rubrum, cases.reason as wegen, cases.lawyer as Anwalt, cases.assistant as Sachbearbeiter FROM invoices inv\n"
+ " DATE_FORMAT(inv.due_date,'%Y-%m-%d') as faellig, TIMESTAMPDIFF(DAY, inv.due_date, curdate()) as TageFaellig, inv.name as Bezeichnung, inv.description as Beschreibung, inv.sender_id as Von, cont.name as EmpfaengerName, cont.company as EmpfaengerFirma, cases.fileNumber as Aktenzeichen, cases.name as Rubrum, cases.reason as wegen, cases.lawyer as Anwalt, cases.assistant as Sachbearbeiter FROM invoices inv\n"
+ "left join case_account_entries acce on acce.invoice_id=inv.id \n"
+ "left join contacts cont on inv.contact_id=cont.id\n"
+ "left join invoice_types invt on inv.invoice_type=invt.id\n"
Expand Down Expand Up @@ -880,7 +880,7 @@ public ReportResult invokeReport(String reportId, Object... params) throws Excep
+ " else 'unbekannt'\n"
+ " end as Status,\n"
+ " round(inv.total, 2) Nettobetrag, round(inv.total_gross, 2) Bruttobetrag, ifnull(round(sum(acce.in_earnings), 2), 0) Zahlungseingang, inv.currency as Waehrung, DATE_FORMAT(inv.created,'%Y-%m-%d') as erstellt,\n"
+ " DATE_FORMAT(inv.due_date,'%Y-%m-%d') as faellig, TIMESTAMPDIFF(DAY, inv.due_date, curdate()) as TageFaellig, inv.name as Bezeichnung, inv.description as Beschreibung, cont.name as EmpfaengerName, cont.company as EmpfaengerFirma, cases.fileNumber as Aktenzeichen, cases.name as Rubrum, cases.reason as wegen, cases.lawyer as Anwalt, cases.assistant as Sachbearbeiter FROM invoices inv\n"
+ " DATE_FORMAT(inv.due_date,'%Y-%m-%d') as faellig, TIMESTAMPDIFF(DAY, inv.due_date, curdate()) as TageFaellig, inv.name as Bezeichnung, inv.description as Beschreibung, inv.sender_id as Von, cont.name as EmpfaengerName, cont.company as EmpfaengerFirma, cases.fileNumber as Aktenzeichen, cases.name as Rubrum, cases.reason as wegen, cases.lawyer as Anwalt, cases.assistant as Sachbearbeiter FROM invoices inv\n"
+ "left join case_account_entries acce on acce.invoice_id=inv.id \n"
+ "left join contacts cont on inv.contact_id=cont.id\n"
+ "left join invoice_types invt on inv.invoice_type=invt.id\n"
Expand Down

0 comments on commit 95fb214

Please sign in to comment.