From 0f89f464cab063864d7064d2f940571b7c755e8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 23 Sep 2020 15:38:47 +0200 Subject: [PATCH] S:C:CustomerVendorTurnover: Sortierung der Belege absteigend nach Datum --- SL/Controller/CustomerVendorTurnover.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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', ); } -- 2.20.1