amount => { lt => \'paid'},
],
],
+ sort_by => 'transdate DESC',
with_objects => [ 'dunnings' ],
);
} else {
amount => { lt => \'paid'},
],
],
- sort_by => 'invnumber DESC',
+ sort_by => 'transdate DESC',
);
}
my $open_items;
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);
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(
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') {
customer_id => $cv,
closed => 'F',
],
- sort_by => 'ordnumber DESC',
+ sort_by => 'transdate DESC',
);
} else {
$open_orders = SL::DB::Manager::Order->get_all(
vendor_id => $cv,
closed => 'F',
],
- sort_by => 'ordnumber DESC',
+ sort_by => 'transdate DESC',
);
}