Fix import ref
This commit is contained in:
parent
9aa52036a2
commit
461dd88691
1 changed files with 4 additions and 6 deletions
|
@ -17,14 +17,12 @@ sub post_lcc_transactions {
|
||||||
|
|
||||||
return $c->api_validation_error if $validation->has_error;
|
return $c->api_validation_error if $validation->has_error;
|
||||||
|
|
||||||
my $search_ref = undef;
|
my $search_ref = { 'me.buyer_id' => $user->entity->id };
|
||||||
if ( $validation->param('search') ) {
|
if ($validation->param('search')) {
|
||||||
$search_ref = {
|
$search_ref->{"organisation.name"} = { '-like' => join('', '%', $validation->param('search'), '%') };
|
||||||
"organisation.name" => { '-like' => join( '', '%', $validation->param('search'), '%' ) },
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
my $lcc_transactions = $lcc_import_ext_ref->transactions->search(
|
my $lcc_transactions = $c->schema->resultset('Transaction')->search(
|
||||||
$search_ref,
|
$search_ref,
|
||||||
{
|
{
|
||||||
page => $validation->param('page') || 1,
|
page => $validation->param('page') || 1,
|
||||||
|
|
Reference in a new issue