Possible fix for transactions under postgres

This commit is contained in:
Tom Bloor 2019-07-14 18:47:48 +01:00
parent 330a4a93ed
commit 00dbb77130
No known key found for this signature in database
GPG Key ID: 4657C7EBE42CC5CC
1 changed files with 13 additions and 1 deletions

View File

@ -84,11 +84,23 @@ sub post_lcc_suppliers {
return 0 unless $lcc_import_ext_ref;
my $columns = [qw/
sales.id
seller.id
organisation.id
organisation.name
organisation.street_name
organisation.town
organisation.postcode
organisation.country
/];
my $lcc_suppliers = $user->entity->purchases->search_related('seller',undef)->search(
undef,
{
prefetch => ['sales', 'organisation'],
group_by => 'seller.id',
columns => $columns,
group_by => $columns,
'+select' => [
{
'sum' => 'sales.value',