From: Bernd Bleßmann Date: Wed, 23 Sep 2020 13:38:47 +0000 (+0200) Subject: S:C:CustomerVendorTurnover: Sortierung der Belege absteigend nach Datum X-Git-Tag: release-3.5.6.1~8 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0f89f464cab063864d7064d2f940571b7c755e8f;p=kivitendo-erp.git S:C:CustomerVendorTurnover: Sortierung der Belege absteigend nach Datum --- diff --git a/SL/Controller/CustomerVendorTurnover.pm b/SL/Controller/CustomerVendorTurnover.pm index e1267dd1d..5a59f1fbd 100644 --- a/SL/Controller/CustomerVendorTurnover.pm +++ b/SL/Controller/CustomerVendorTurnover.pm @@ -27,6 +27,7 @@ sub action_list_turnover { amount => { lt => \'paid'}, ], ], + sort_by => 'transdate DESC', with_objects => [ 'dunnings' ], ); } else { @@ -38,7 +39,7 @@ sub action_list_turnover { amount => { lt => \'paid'}, ], ], - sort_by => 'invnumber DESC', + sort_by => 'transdate DESC', ); } my $open_items; @@ -180,12 +181,12 @@ sub action_get_invoices { if ( $::form->{db} eq 'customer' ) { $invoices = SL::DB::Manager::Invoice->get_all( query => [ customer_id => $cv, ], - sort_by => 'invnumber DESC', + sort_by => 'transdate DESC', ); } else { $invoices = SL::DB::Manager::PurchaseInvoice->get_all( query => [ vendor_id => $cv, ], - sort_by => 'invnumber DESC', + sort_by => 'transdate DESC', ); } $self->render('customer_vendor_turnover/invoices_statistic', { layout => 0 }, invoices => $invoices); @@ -205,7 +206,7 @@ sub action_get_orders { customer_id => $cv, quotation => ($type eq 'quotation' ? 'T' : 'F') ], - sort_by => ( $type eq 'order' ? 'ordnumber DESC' : 'quonumber DESC'), + sort_by => 'transdate DESC', ); } else { $orders = SL::DB::Manager::Order->get_all( @@ -213,7 +214,7 @@ sub action_get_orders { vendor_id => $cv, quotation => ($type eq 'quotation' ? 'T' : 'F') ], - sort_by => ( $type eq 'order' ? 'ordnumber DESC' : 'quonumber DESC'), + sort_by => 'transdate DESC', ); } if ( $type eq 'order') { @@ -236,7 +237,7 @@ sub _get_open_orders { customer_id => $cv, closed => 'F', ], - sort_by => 'ordnumber DESC', + sort_by => 'transdate DESC', ); } else { $open_orders = SL::DB::Manager::Order->get_all( @@ -244,7 +245,7 @@ sub _get_open_orders { vendor_id => $cv, closed => 'F', ], - sort_by => 'ordnumber DESC', + sort_by => 'transdate DESC', ); }